How to use subsubsection in the llncs style

1,594 views
Skip to first unread message

Amy

unread,
Sep 22, 2008, 8:43:17 AM9/22/08
to LaTeX Users Group
I have tried to use \subsubsection with the \documentclass{llncs}. I
have modified the llncs.cls by setting \setcounter{secnumdepth}{3}.
The makes the \subsubsection can be compiled but the format is not
right. The title of the subsubsection is right but the paragraph in
the subsubsection will come after the section tilte. I can not make a
new line after the title. Any ideas about it? Thanks a million.

jon

unread,
Sep 22, 2008, 3:51:24 PM9/22/08
to LaTeX Users Group
not familiar with your document class, but you'll want to put
something like this in your preamble:

\makeatletter
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{15mm}
{-\baselineskip}
{1\baselineskip}
{\normalfont\normalsize\bfseries}
\makeatother

the first line controls the 'depth' or 'level' of subsubsection, which
is normally 3, and how far indented from the left margin you want the
subsubsection header indented.
the second and third lines control how far below the subsubsection
title is set compared to the above paragraph and how much space you
want between the subsubsection title and the ensuing text; these can
be changed, but this is probably what you want (i hope).
the last line sets the font declarations you want to use for the
subsubsection title; these can be changed, but should blend well with
the other section-styles.

needless to say, you can redefine chapters, sections, etc. in the same
way (just fix the first line accordingly).

cheers,
jon.

Amy

unread,
Sep 23, 2008, 5:11:43 AM9/23/08
to LaTeX Users Group
Hi Jon,
Thank you very much for your kind reply.
The LLNCS DOCUMENT CLASS can be found with
http://www.cs.utexas.edu/~moore/publications/how-to-prove-thms/llncs.cls
This part is like what you said:
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-18\p@ \@plus -4\p@ \@minus -4\p@}%
{12\p@ \@plus 4\p@ \@minus 4\p@}%
{\normalfont\large\bfseries\boldmath
\rightskip=\z@ \@plus 8em
\pretolerance=10000 }}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-18\p@ \@plus -4\p@ \@minus -4\p@}%
{8\p@ \@plus 4\p@ \@minus 4\p@}%
{\normalfont\normalsize\bfseries\boldmath
\rightskip=\z@ \@plus 8em
\pretolerance=10000 }}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-18\p@ \@plus -4\p@ \@minus -4\p@}%
{-0.5em \@plus -0.22em \@minus -0.1em}%
{\normalfont\normalsize\bfseries\boldmath
\rightskip=\z@ \@plus 8em
\pretolerance=10000 }}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{-12\p@ \@plus -4\p@ \@minus -4\p@}%
{-0.5em \@plus -0.22em \@minus -0.1em}%
{\normalfont\normalsize\itshape}}
\renewcommand\subparagraph[1]{\typeout{LLNCS warning: You should not
use
\string\subparagraph\space with this class}
\vskip0.5cm
You should not use \verb|\subparagraph| with this class.\vskip0.5cm}

It seems that it has the definition in it. But it just doesn't work.
Thank you very much for your help.

Regards

jon

unread,
Sep 23, 2008, 2:10:27 PM9/23/08
to LaTeX Users Group


On Sep 23, 5:11 am, Amy <Amy....@gmail.com> wrote:

> \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
> {-18\p@ \@plus -4\p@ \@minus -4\p@}%
> {8\p@ \@plus 4\p@ \@minus 4\p@}%
> {\normalfont\normalsize\bfseries\boldmath
> \rightskip=\z@ \@plus 8em
> \pretolerance=10000 }}
> \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
> {-18\p@ \@plus -4\p@ \@minus -4\p@}%
> {-0.5em \@plus -0.22em \@minus -0.1em}%
> {\normalfont\normalsize\bfseries\boldmath
> \rightskip=\z@ \@plus 8em
> \pretolerance=10000 }}

> It seems that it has the definition in it. But it just doesn't work.
> Thank you very much for your help.

i'm not sure what you mean. the subsubsection is clearly defined; i
thought you just wanted to make the text following the subsubparagh
title to start on a new line. in this case, the definition of the
third line of \renewcommand\subsubsection is the key.

let's say you wanted the space between the subsubsection and the
following text to be the same distance as that for subsection. in
this case, put the following in your preamble:

\makeatletter %% this is crucial
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-18\p@ \@plus -4\p@ \@minus -4\p@}%
{8\p@ \@plus 4\p@ \@minus 4\p@}% <-- this
is copied from the subsection command
{\normalfont\normalsize\bfseries\boldmath
\rightskip=\z@ \@plus 8em
\pretolerance=10000 }}
\makeatother %% this is crucial

cheers,
jon.

Amy

unread,
Sep 24, 2008, 6:01:49 AM9/24/08
to LaTeX Users Group
Hi Jon,
Thank you so much for your help.
It works. Perfectly.
I made a mistake. I tried to modify the llncs.cls file.
I should put them in my preamble. That's the reason.
After I put them in my preamble, it works.
Great.

Cheers

Amy
Reply all
Reply to author
Forward
0 new messages