3

I'm using the IEEEtran document class and want my subsubsection to have arabic numbering and a linebreak between the subsubsection title and the subsubsection body. I've achieved the arabic numbering with the following code.

\def\thesubsubsectiondis{\thesubsectiondis\arabic{subsubsection}}

However, no matter what I do I cannot get a linebreak between the title and body. Can anyone tell me how to achieve that?

Patrick
  • 43

1 Answers1

3

With reference to Where can I find help files or documentation for commands like \@startsection for LaTeX?, here is the definition of \subsubsection within IEEEtran.cls:

\def\subsubsection{%
  \@startsection
    {subsubsection}                 % name
    {3}                             % level
    {\parindent}                    % indent
    {0ex plus 0.1ex minus 0.1ex}    % beforeskip
    {0ex}                           % afterskip
    {\normalfont\normalsize\itshape}% style
}%

Note that the afterskip length is 0ex (not positive):

afterskip: If positive, then skip to leave below heading, else negative of skip to leave to right of run-in heading.

As such, \subsubsection will be set as a run-in heading. That is, no following line/paragraph break. If you want this, use some length that is positive. Here's an example that matches the definition of \subsection's afterskip:

enter image description here

\documentclass{IEEEtran}

\def\thesubsubsectiondis{\thesubsectiondis\arabic{subsubsection}}

\makeatletter
\def\subsubsection{%
  \@startsection
    {subsubsection}                 % type
    {3}                             % level
    {\parindent}                    % indent
    {3.5ex plus 1.5ex minus 1.5ex}  % beforeskip {0ex plus 0.1ex minus 0.1ex}
    {0.7ex plus .5ex minus 0ex}     % afterskip {0ex}
    {\normalfont\normalsize\itshape}% style
}
\makeatother


\begin{document}

\section{A section}
Lorem ipsum \ldots

\subsection{A subsection}
Lorem ipsum \ldots

\subsubsection{A subsubsection}
Lorem ipsum \ldots

\end{document}

You'll see that I also changed the beforeskip to that of \subsection. Using the default seemed strange.

Werner
  • 603,163
  • 3
    This is the most clean, clear, and sufficiently detailed explanation of section command definition that I have ever seen. I've been unable to grasp any of the related documentation for quite a while, but this finally sheds some light on it, especially the link to the @startsection explanation. It's especially helpful that you broke out each part of the command definition on a separate line with a commented description of what each part does. Thank you! – Patrick Oct 29 '18 at 06:41