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?
Best Answer
With
sectsty
it's difficult to change the spacings; withtitlesec
one has to rebuild all headings. Probably copying the definitions fromarticle.cls
and modifying them is the easiest way:The
1sp
for getting zero space is just a trick: if we put0pt
, 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.