2

I want to squeeze the space for sections, subsections, and subsubsections on a llncs document. The following can only squeeze subsubsections. How could I squeeze sections and subsections?

   \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}

enter image description here

3
  • Have you tried to do to same \renewcommand{\subsection} and \renecommand{section} with \@startsection and replacing subsubsection there with subsection and section respectively? You've to replace the individual spacings of course too and the first figure too.
    – user31729
    Oct 16, 2015 at 11:51
  • 1
    If you plan to use the documentclass for something official (e.g., conference/journal/book submission) then it is probably not allowed to change spacing like this.
    – Marijn
    Oct 16, 2015 at 11:56
  • I deleted my post since I find it's no good idea to screw up the spacings etc.
    – user31729
    Oct 16, 2015 at 12:19

1 Answer 1

3

I have found an answer, just using the following code, can do it

\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
2
  • This is basically the same I had in my (deleted) answer
    – user31729
    Oct 17, 2015 at 7:51
  • @ChristianHupfer I copyed from the original one from llncs, and then just changed the line spacing number
    – sweetyBaby
    Oct 17, 2015 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.