tags:

views:

636

answers:

5

I would like to set my chapter/section/subsection headings to use a sans-serif font, but keep the serif font for the body text. How can this be done?

+1  A: 

The first possibility that comes to my mind is to use a document class from the KOMA-script package, they have this set up as a default.

Tobias
+8  A: 

You can use the sectsty LaTeX package.

Put this in the preamble:

\usepackage{sectsty}
\allsectionsfont{\sffamily}
Ville Laurikari
Thanks. There's a manual here if anyone's interested: http://www.ctan.org/tex-archive/macros/latex/contrib/sectsty/sectsty.pdf
nearly_lunchtime
+1  A: 

For the people who want to know why this has to be done differently from e.g. normal text. It is because of the distinction between robust commands and fragile commands. Headings do not allow fragile commands, so you have to specifically tell latex it is robust for example.

This link explains this further, and this link shows another alternative to do it.

bastijn
+1  A: 

You can also use the titlesec package, which allows greater flexibility of customisation than sectsty.

\usepackage[sf]{titlesec}
Will Robertson
A: 

This wotks very fine for all Headings including "Bibliography" and "Appendix" but what of the "list of Contents" "List of Figures" and "List of Tables"? They do not have my chapter-font size or layout and they use roman-style fint not sanf serif.

Anyone has a solution?

I don't know the KOMA script, is there some package I can download and use? I use MIKTEX 2.8 and Texniccenter by the way..

Charlotte
http://www.ctan.org/tex-archive/macros/latex/contrib/koma-script/ - you use scrartcl in place of article (or scrreprt in place of report). It has san serif headings by default, but also has other differences and is much more easily customised than the standard classes. Check the excellent documentation. It should be installed with miktex I think.
thrope