I need to use a serif font – eg Times (New Roman) or Palatino – for the main text and a sans serif font – eg Helvetica or Arial – for headings and labelling diagrams, etc.
How do I get this format ?
In my class file, I have this:
\RequirePackage{sectsty,caption}
\ifthenelse{\boolean{sansheadings}}
{\allsectionsfont{\sffamily}
\renewcommand{\@chapterfont}{\sffamily}
\renewcommand{\captionfont}{\sffamily}
\renewcommand{\headfootstyle}{\normalsize\sffamily}}
{}
Ideally I want to use Tahoma or Verdana (sans serif) for chapter titles and
serif fonts (Charter or Palatino) in the remaining text. How do I get this?
Best Answer
With
xelatex
, the definition of fonts is done this way (at least I do it this way):Concerning the titles, you're right by using the
sectsty
package. But there is a more efficient way to define the font to use for all title or just for chapter.If you only want to change the chapter title font:
For further informations, you can read the documentation: http://texdoc.net/texmf-dist/doc/latex/sectsty/sectsty.pdf
For the captions, the
caption
package allows you to do some customisations by passing parameters.Here again, the documentation gives some example of customization (e.g. if you just want the label to be sans-serif or the whole caption).