我想压缩 llncs 文档中的节、子节和子子节的空间。以下只能压缩子子节。我该如何压缩节和子节?
\documentclass{llncs}% http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0
\begin{document}
\section{A section}
Some text
\subsection{A subsection}
Some text
\subsubsection{A subsubsection}
Some text
\subsubsection{Another subsubsection}
Some text
\bigskip
% Put the block below in your LaTeX preamble
\makeatletter
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-8\p@ \@plus -4\p@ \@minus -4\p@}% Formerly -18\p@ \@plus -4\p@ \@minus -4\p@
{-0.5em \@plus -0.22em \@minus -0.1em}%
{\normalfont\normalsize\bfseries\boldmath}}
\makeatother
\section{A section}
Some text
\subsection{A subsection}
Some text
\subsubsection{A subsubsection}
Some text
\subsubsection{Another subsubsection}
Some text
\end{document}
答案1
我找到了答案,只需使用以下代码即可
\makeatletter
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-8\p@ \@plus -4\p@ \@minus -4\p@}%
{6\p@ \@plus 4\p@ \@minus 4\p@}%
{\normalfont\large\bfseries\boldmath
\rightskip=\z@ \@plus 8em\pretolerance=10000 }}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-8\p@ \@plus -4\p@ \@minus -4\p@}%
{6\p@ \@plus 4\p@ \@minus 4\p@}%
{\normalfont\normalsize\bfseries\boldmath
\rightskip=\z@ \@plus 8em\pretolerance=10000 }}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-4\p@ \@plus -4\p@ \@minus -4\p@}%
{-1.5em \@plus -0.22em \@minus -0.1em}%
{\normalfont\normalsize\bfseries\boldmath}}
\makeatother