![如何减少作者区块和论文文本之间的空间?sig-alternate.cls](https://linux22.com/image/250394/%E5%A6%82%E4%BD%95%E5%87%8F%E5%B0%91%E4%BD%9C%E8%80%85%E5%8C%BA%E5%9D%97%E5%92%8C%E8%AE%BA%E6%96%87%E6%96%87%E6%9C%AC%E4%B9%8B%E9%97%B4%E7%9A%84%E7%A9%BA%E9%97%B4%EF%BC%9Fsig-alternate.cls.png)
我正在使用模板sig-alternate.cls
,但我发现作者区块和论文正文之间的间距太大,如何减小这个间距?
编辑:我想减少作者区块和论文文本之间的空间。
\documentclass{sig-alternate}
\begin{document}
\title{shrink space}
\author{XXX}
\maketitle
paper text here!
\end{document}
答案1
您的文档类使用额外的垂直跳跃来定义命令\@maketitle
。使用以下定义来减少空间:
\def\@maketitle{\newpage
\null
\setbox\@acmtitlebox\vbox{%
\baselineskip 20pt
\vskip 2em % Vertical space above title.
\begin{center}
{\ttlfnt \@title\par} % Title set in 18pt Helvetica (Arial) bold size.
\vskip 1.5em % Vertical space after title.
%This should be the subtitle.
{\subttlfnt \the\subtitletext\par}\vskip 1.25em%\fi
{\baselineskip 16pt\aufnt % each author set in \12 pt Arial, in a
\lineskip .5em % tabular environment
\begin{tabular}[t]{c}\@author
\end{tabular}\par}
\vskip 1.5em % Vertical space after author.
\end{center}}
\dimen0=\ht\@acmtitlebox
% \advance\dimen0 by -12.75pc\relax % comment by Marco Daniel
\unvbox\@acmtitlebox
\ifdim\dimen0<0.0pt\relax\vskip-\dimen0\fi}
未经修改:
修改后:
以下是完整的 MWE:
\documentclass{sig-alternate}
\usepackage{kantlipsum}
\makeatletter
\def\@maketitle{\newpage
\null
\setbox\@acmtitlebox\vbox{%
\baselineskip 20pt
\vskip 2em % Vertical space above title.
\begin{center}
{\ttlfnt \@title\par} % Title set in 18pt Helvetica (Arial) bold size.
\vskip 1.5em % Vertical space after title.
%This should be the subtitle.
{\subttlfnt \the\subtitletext\par}\vskip 1.25em%\fi
{\baselineskip 16pt\aufnt % each author set in \12 pt Arial, in a
\lineskip .5em % tabular environment
\begin{tabular}[t]{c}\@author
\end{tabular}\par}
\vskip 1.5em % Vertical space after author.
\end{center}}
\dimen0=\ht\@acmtitlebox
% \advance\dimen0 by -12.75pc\relax % comment by Marco Daniel
\unvbox\@acmtitlebox
\ifdim\dimen0<0.0pt\relax\vskip-\dimen0\fi}
\makeatother
\begin{document}
\title{shrink space}
\author{XXX}
\maketitle
\kant
\end{document}
答案2
我觉得下面的方法是更直接的办法:在sig-alternate.cls中注释掉这一行。
\advance\dimen0 by -12.75pc\relax % Increased space for title box -- KBT
此行在 的定义中\@maketitle
,旨在增加作者块和论文文本之间的空间。