1

I'm trying to modify a template I'm using, and it has the following code to define the section creation commands.

\renewcommand{\section}{\@startsection{section}{1}{0mm}%
                            {-1ex plus -.5ex minus -.2ex}%
                            {0.5ex plus .2ex}%x
                            {\normalfont\large\bfseries}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{0mm}%
                            {-1explus -.5ex minus -.2ex}%
                            {0.5ex plus .2ex}%
                            {\normalfont\small\bfseries}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0mm}%
                            {-1ex plus -.5ex minus -.2ex}%
                            {1ex plus .2ex}%
                            {\normalfont\scriptsize\bfseries}}
\makeatother

Can anyone tell me what the "-1ex plus -.5ex minus -.2ex" and "1ex plug .2ex" lines do and how they work/what the syntax is? I'm guessing they have something to do with the spacing around section headers, but I can't figure out how to modify them properly.

Thanks for the help!

Patrick
  • 43
  • 1
    See https://tex.stackexchange.com/questions/31780/where-can-i-find-help-files-or-documentation-for-commands-like-startsection-fo for an answer. The meaning of renewcommand is straight forward, but you can read the not short intro to latex for a more complete view. –  Apr 29 '18 at 04:44
  • 1
    Two remarks -- (a) To really understand what's going on, you need to get into the weeds, so to speak, and learn about the very-low-level \@startsection macro, which takes six arguments. (The 4th arg is about the spacing (if any) above the sectioning header, and the 5th arg is about the spacing (if any) below the sectioning header.) (b) Does your template really specify \scriptsize as the font size for subsubsection-level headers? I sure hope that's not the case -- mostly for the sake of the readers of your document. – Mico Apr 29 '18 at 05:24
  • both the subsection and subsection definitions look odd, specifying heading fonts that are smaller than the body font – David Carlisle Apr 29 '18 at 08:02

0 Answers0