Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different font for all headings in LaTeX

Tags:

latex

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?

like image 530
nearly_lunchtime Avatar asked Jun 10 '09 10:06

nearly_lunchtime


People also ask

Can you use different fonts in LaTeX?

By default, LaTeX typesets documents using the \text{Computer Modern} typeface family but you can use LaTeX packages to use different fonts according to your needs or preferences.

How do you change the font of text in LaTeX?

Font styles Part of this text is written \textsl{in a different font style} to highlight it. If you want to go back to "normal" font style (default for the LaTeX class you are using), this can be done by using the \textnormal{...} command or the \normalfont switch command.

How do I use different font size in LaTeX?

If you want a different size for your document, you can use extsizes packages. The command used are \documentclass[10pt]{extarticle} and \documentclass[14pt]{extreport}. You can also style the text differently.


1 Answers

You can use the sectsty LaTeX package.

Put this in the preamble:

\usepackage{sectsty}
\allsectionsfont{\sffamily}
like image 54
Ville Laurikari Avatar answered Oct 13 '22 11:10

Ville Laurikari