![重新定义章节后,设置第一段无缩进](https://linux22.com/image/244497/%E9%87%8D%E6%96%B0%E5%AE%9A%E4%B9%89%E7%AB%A0%E8%8A%82%E5%90%8E%EF%BC%8C%E8%AE%BE%E7%BD%AE%E7%AC%AC%E4%B8%80%E6%AE%B5%E6%97%A0%E7%BC%A9%E8%BF%9B.png)
我试图避免SciTePress.sty
样式引入的第一段缩进。我认为问题在于\section
样式内的重新定义。因为,如果我删除它,节标题后的第一段就不会缩进。
我的问题是,如何将命令的行为更改\section
为“节后不缩进”?我认为我必须在代码中重新定义它,因为我无法更改给定的样式。此外,我可以在同一次重新定义中同时将节标题设为大写吗?
平均能量损失
\documentclass[a4paper,twoside]{article}
\usepackage{calc}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{multicol}
\usepackage{pslatex}
\usepackage{apalike}
\usepackage{SciTePress}
\usepackage[small]{caption}
\usepackage{lipsum}
\begin{document}
\title{\uppercase{Authors' Instructions} \subtitle{Preparation of Camera-Ready Contributions to SciTePress Proceedings} }
\author{\authorname{First Author Name\sup{1}, Second Author Name\sup{1} and Third Author Name\sup{2}}
\affiliation{\sup{1}Institute of Problem Solving, XYZ University, My Street, MyTown, MyCountry}
\affiliation{\sup{2}Department of Computing, Main University, MySecondTown, MyCountry}
\email{\{f\_author, s\_author\}@ips.xyz.edu, t\[email protected]}
}
\keywords{\lipsum[1]}
\abstract{\lipsum[2]}
\onecolumn \maketitle \normalsize \vfill
\section{\uppercase{Introduction}}
\lipsum[3-5]
\end{document}
科学新闻网
\typeout{Conference Style for SciTePress for LaTeX 2e -- version of March 2011}
%Modified by L. Medina:
% - title, authors, keywords and abstract: commands redefinition
% - spaces above and below captions: redefinition
%Modified by V. Pedrosa:
% - title, authors, keywords and abstract: spacing is now automatic
%%Page Setup
\pagestyle{empty}
\setlength\paperheight{297mm}
\setlength\paperwidth{210mm}
\setlength\topmargin{-0.91in} \setlength\oddsidemargin{0.02362in}
\setlength\evensidemargin{0.02362in}
\setlength\textheight{8.74in} \setlength\textwidth{6.221in}
\setlength\columnsep{0.8cm}
\newlength\titlebox %\setlength\titlebox{2in}
\setlength\headheight{0pt} \setlength\headsep{36pt}
\thispagestyle{empty} \pagestyle{empty}
\flushbottom \twocolumn \sloppy
\def\addcontentsline#1#2#3{}
%%First Section
\def\title#1{\gdef\@title{ #1 \\[15pt]{\textmd {\textbf }}\\}}
\newcommand{\subtitle}[1]{\\ \fontsize{13}{15}\selectfont \textit{#1 } }
\def\keywords#1{\gdef\@keywords{\small Keywords: \hspace{0.388cm} \begin{minipage}[t]{5.45in} \fontsize{9}{11}\selectfont \vspace{-0.22cm} #1 \\ \end{minipage}}}
%\gdef\@mykeywords{}
\def\abstract#1{\gdef\@abstract{\ \\ \small Abstract: \hspace{0.6cm} \begin{minipage}[t]{5.45in} \fontsize{9}{11}\selectfont \vspace{-0.22cm} #1 \end{minipage} }}
%%%%%%%
\def\sup#1{$^{#1}$}
\newcommand{\authorname}[1]{\fontsize{11}{13}\selectfont #1 \\ }%\addtocounter{authorcounter}{1}}
\newcommand{\affiliation}[1]{\begin{minipage}[t]{6.2in} \centering \fontsize{9}{11}\selectfont \textit{ #1} \end{minipage} \\}
\newcommand{\email}[1]{\fontsize{9}{11}\selectfont \textit{#1} \\[12pt]}
%%%%%%%
\def\maketitle{\par
\begingroup
% to make the footnote style local to the title
\def\thefootnote{\fnsymbol{footnote}}
\twocolumn[
\centering {\LARGE\bf \@title \par}
\vskip -0.07in
\centering\@author
\vskip 0.51in
\@keywords
\vskip 0.02in
\@abstract
\vspace{32pt}
]
\@thanks
\endgroup
\let\maketitle\relax \let\@maketitle\relax
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}
%%Paper Contents and References
\def\pubnote#1{\thispagestyle{myheadings}
\pagestyle{myheadings}
\markboth{#1}{#1}
\setlength\headheight{10pt} \setlength\headsep{10pt}
}
% sections with less space
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Remove this definition and the indentation returns!
\def\section{\@startsection{section}{1}{\z@}{24pt plus 2pt minus 1pt}
{12pt plus 2pt minus 1pt}{\Large\bf\raggedright}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\subsection{\@startsection{subsection}{2}{\z@}{-2.0ex plus
-0.5ex minus -.2ex}{12pt plus 2pt minus 1pt}{\large\bf\raggedright}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.0ex plus
-0.5ex minus -.2ex}{12pt plus 2pt minus 1pt}{\normalsize\bf\raggedright}}
% Footnotes
\footnotesep 6.65pt %
\skip\footins 9pt plus 4pt minus 2pt
\def\footnoterule{\kern-3pt \hrule width 5pc \kern 2.6pt }
% Lists and paragraphs
\parindent 0.5cm
\topsep 4pt plus 1pt minus 2pt
\partopsep 1pt plus 0.5pt minus 0.5pt
\itemsep 2pt plus 1pt minus 0.5pt
\parsep 2pt plus 1pt minus 0.5pt
\leftmargin 15pt \leftmargini\leftmargin \leftmarginii 10pt
\leftmarginiii 5pt \leftmarginiv 5pt \leftmarginv 5pt \leftmarginvi
5pt \labelwidth\leftmargini\advance\labelwidth-\labelsep \labelsep
5pt
\def\@listi{\leftmargin\leftmargini}
\def\@listii{\leftmargin\leftmarginii
\labelwidth\leftmarginii\advance\labelwidth-\labelsep
\topsep 2pt plus 1pt minus 0.5pt
\parsep 1pt plus 0.5pt minus 0.5pt
\itemsep \parsep}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii\advance\labelwidth-\labelsep
\topsep 1pt plus 0.5pt minus 0.5pt
\parsep \z@ \partopsep 0.5pt plus 0pt minus 0.5pt
\itemsep \topsep}
\def\@listiv{\leftmargin\leftmarginiv
\labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
\labelwidth\leftmarginv\advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
\labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
\abovedisplayskip 7pt plus2pt minus5pt%
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip 0pt plus3pt%
\belowdisplayshortskip 4pt plus3pt minus3pt%
%%%%%%
\setlength{\abovecaptionskip}{4pt}%plus3pt minus3pt}%
\setlength{\belowcaptionskip}{-4pt}%plus3pt minus3pt}
%%%%%%
% Less leading in most fonts (due to the narrow columns)
% The choices were between 1-pt and 1.5-pt leading
\def\normalsize{\@setfontsize\normalsize\@xpt{11}} % 10 point on 11
\def\small{\@setfontsize\small\@ixpt{10}} % 9 point on 10
\def\smalll{\@setfontsize\smalll\@viiipt{10}} % 9 point on 9
\def\footnotesize{\@setfontsize\footnotesize\@ixpt{10}} % 9 point on 10
\def\scriptsize{\@setfontsize\scriptsize\@viipt{10}} % 7 point on 8
\def\tiny{\@setfontsize\tiny\@vipt{7}} % 6 point on 7
\def\large{\@setfontsize\large\@xipt{12}} % 11 point on 12
\def\Large{\@setfontsize\Large\@xiipt{14}} % 12 point on 14
\def\LARGE{\@setfontsize\LARGE\@xivpt{16}} % 14 point on 16
\def\huge{\@setfontsize\huge\@xviipt{20}} % 17 point on 20
\def\Huge{\@setfontsize\Huge\@xxpt{23}} % 20 point on 23
\setlength{\topmargin}{-1.1cm} \addtolength{\textheight}{-0.1cm}
\setlength{\headsep}{1.9cm}
\setlength{\footskip}{1.7cm}
\renewcommand{\large}{\fontsize{12}{15}\selectfont}
\renewcommand{\Large}{\fontsize{13}{15}\selectfont}
\renewcommand{\normalsize}{\fontsize{10}{11.5}\selectfont}
\renewcommand{\refname}{REFERENCES}
\newcommand{\F}{\mathcal{F}}
\newcommand{\I}{\mathcal{I}}
\newcommand{\D}{\mathcal{D}}
\newcommand{\T}{\mathcal{T}}
\newcommand{\R}{\mathcal{R}}
\newcommand{\rr}{\mathfrak{r}}
\newcommand{\code}[1]{\textsf{#1}}
\renewcommand\floatpagefraction{.9}
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
\renewcommand\textfraction{.1}
答案1
您应该将beforeskip
(的第 4 个参数\@startsection
) 设为负数。始终使用绝对值,但如果为负数,则会忽略标题后的段落文本的缩进。
\def\section{\@startsection{section}{1}{\z@}{24pt plus 2pt minus 1pt}
{12pt plus 2pt minus 1pt}{\Large\bf\raggedright}}
然后变成
\def\section{\@startsection{section}{1}{\z@}{-24pt plus -2pt minus -1pt}
{12pt plus 2pt minus 1pt}{\Large\bf\raggedright}}
这样应该就能解决问题了。当然,您可以在自己的源代码中执行此操作(在加载样式之后),然后需要用\makeatletter
and将其包装起来,\makeatother
因为该@
符号用于宏定义中。
关于宏的更多信息\@startsection
可以在这里找到本网站。