I'm writing a paper for a conference that requires section headings to have a certain format, with the font size specified in points. There seem to be two packages for changing the fonts of section headings, titlesec and sectsty. However, with sectsty I can't work out how to make subsubsection headings non-bold (which I also need), and with titlesec I can't see how to specify the font size in points, rather than just as "big", "medium", etc.

For completeness, what I need to do is this:

  • typeset \section headings in 11pt bold

  • typeset \subsection headings in 10pt bold

  • typeset \subsubsection headings in 10pt roman

  • remove the whitespace following \subsection and \subsubsection headings.

What is the best way to achieve these effects, using either package?

1 Answer 1


With sectsty it's difficult to change the spacings; with titlesec one has to rebuild all headings. Probably copying the definitions from article.cls and modifying them is the easiest way:


                {-3.5ex \@plus -1ex \@minus -.2ex}%
                {2.3ex \@plus.2ex}%
                {\normalfont\fontsize{10.95}{13.6}\bfseries}% 11pt
                {-3.25ex\@plus -1ex \@minus -.2ex}%
                {1sp}% No space after subsections
                {\normalfont\normalsize\bfseries}% normal size, boldface
                {-3.25ex\@plus -1ex \@minus -.2ex}%
                {1sp}% No space after subsubsections
                {\normalfont\normalsize}% normal size, medium

\usepackage{lipsum} % to provide mock text

\section{This is large boldface}
\subsection{This is normal size boldface}
\subsubsection{This is normal size medium}

enter image description here

The 1sp for getting zero space is just a trick: if we put 0pt, the heading would be in line (an optimization trick used by LaTeX not to increase the number of arguments). But 1sp is just indistinguishable from zero.

  • Thanks, this looks great. I'll leave the question open for a bit in case someone has a better answer (this one feels like a little bit of a hack, but that's nitpicking), and if not I'll accept this. By the way, where do the numbers come from in the \fontsize{10.95}{13.6} command?
    – N. Virgo
    Nov 8, 2012 at 13:01
  • @Nathaniel They come from the setting used from LaTeX for 11pt type size (see the file size11.clo). The interline skip (13.6pt) is relevant only if the section title needs to be split across lines.
    – egreg
    Nov 8, 2012 at 13:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .