Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
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
add comment

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
    
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
    
@ClaudioFiandrino Thanks! –  Michael Apr 17 '13 at 11:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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