# Create a macro for heading

LNCS class requires 3rd-level heading to be "Run-in Heading in Bold. Text follows" at 10 point, bold

It seems that there is no existing macro for that, so I have written:

\newcommand{\headingthree}[1]{\noindent\textbf{#1}}


I also use \paragraph, I realize that \paragraph automatically adds a line above the text, but \headingthree doesn't.

Does anyone know how to make my \headingthree automatically add space above the text as a \paragraph does?

-
Would redefining one of the existing sectional commands be an option for you? –  Gonzalo Medina Mar 21 '12 at 1:23
I don't know, it seems that LaTeX does some mysterious thing for a sectional command, adjust the position smartly... I just want to realize something close to 3rd-level heading the doc requires and be really a sectional command... –  SoftTimur Mar 21 '12 at 1:30
Please see my answer, and let me know if that is, more or less, what you need. –  Gonzalo Medina Mar 21 '12 at 1:37

With the help of the titlesec package you can redefine one of the existing sectional unit commands to produce the desired layout; in the following example I redefined \subsubsection to have a run-in title:

\documentclass{article}
\usepackage{titlesec}
\usepackage{lipsum}

\titleformat{\subsubsection}[runin]
{\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
\titlespacing*{\subsubsection}{0pt}{3.25ex plus 1ex minus .2ex}{1em}

\begin{document}

\section{Test section}
\lipsum[2]
\subsection{Test subsection}
\lipsum[2]
\subsubsection{Test subsubsection}
\lipsum[2]

\end{document}


Apparently the question has been answered; however, looking at the image that appears in the question, the following re-definitions of \section, \subsection, \subsubsection and \paragraph will produce sectioning units with the given specifications for the first four levels shown, in a document with the default 10pt size:

\documentclass{article}
\usepackage{titlesec}
\usepackage{lipsum}

\titleformat{\section}
{\normalfont\large\selectfont\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\normalsize\selectfont\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}[runin]
{\normalfont\normalsize\bfseries}{}{0em}{}[.]
\titleformat{\paragraph}[runin]
{\normalfont\normalsize\itshape}{}{0em}{}[.]

\setcounter{tocdepth}{2}% don't include subsubsections in ToC

\begin{document}
\tableofcontents
\section{Test section}
\lipsum[2]
\subsection{Test subsection}
\lipsum[2]
\subsubsection{Test subsubsection}
\lipsum[2]
\paragraph{Test paragraph}
\lipsum[2]

\end{document}


-
I see you can redefine \subsubsection, do you mind telling me directly what to do to make the title 10 point, bold as the figure requires? –  SoftTimur Mar 21 '12 at 1:50
@SoftTimur I dont undestand your comment; the code as it is will produce the title in 10pt and boldfaced. –  Gonzalo Medina Mar 21 '12 at 1:52
@SoftTimur: do you want to hard-code the 10pt size for the title? –  Gonzalo Medina Mar 21 '12 at 1:55
I see... Thank you –  SoftTimur Mar 21 '12 at 2:04

The class provides \subsubsection that does exactly what you need:

\documentclass{llncs}

\usepackage{lipsum}

\begin{document}

\mainmatter              % start of the contributions

\title{A title}
\author{A. N. Thor}
%
\institute{Nowhere University, Princeton NJ 08544, USA,\\
\email{thor@nowhere.edu}}

\maketitle              % typeset the title of the contribution

\begin{abstract}
A very short  abstract.
\end{abstract}

\section{A section}
\lipsum[2]

\subsection{A subsection}
\lipsum[2]

\subsubsection{A subsubsection}
\lipsum[2]

\paragraph{Ghi}
\lipsum[2]

\end{document}


-