8

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.

1
  • 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. Apr 17, 2013 at 9:57

1 Answer 1

17

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

1
  • 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. Apr 17, 2013 at 10:24

You must log in to answer this question.

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