7

I would like to make section headings bold and sans-serif (helvet package). I found a snippet that produces sans serif headings:

\renewcommand\section{\@startsection{section}{1}{\z@}%
  {1em}{1em}{\normalsize\sf}}

Now I have the problem that \sf\bf does not produce bold and sans-serif text. I know that nesting of \textbf etc. macros does the trick but I wonder how I should incorporate this into my snippet.

  • 3
    don't use \sf or \bf they don't combine as you saw (and the command is not even defined by default in LaTeX), use \normalfont\sffamily\bfseries but note not every sans font has a bold variant. – David Carlisle Apr 17 '13 at 9:57
16

The command \allsectionsfont{\normalfont\sffamily\bfseries} of the sectsty package achieves this easily.

  • Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}) or hit Ctrl+K. – Claudio Fiandrino Apr 17 '13 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.