In pdf export the AvantGarde font is used a lot for heads and subheads. I would like to use a modern font like Helvetica. Is it possible to just exchange AvantGarde with Helvetica.

If possible I would like to just change the conf.py file (latex preamble).

  • Does this question work for you? The default set-up of sphinx uses the standard latex classes, and the titlesec package works for those. Jan 2 '13 at 11:30
  • I found out that Sphinx uses fancychap, Bjarne style by default. Once I use /titleformat as suggested I use all the formating. Jan 2 '13 at 19:48
  • Better late than never. Welcome to TeX.sx! More information on this site can be seen in the faq and the Unofficial TeX-SX FAQ meta.tex.stackexchange.com/q/1144/19384 as well as the markdown help tex.stackexchange.com/editing-help. Welcome to the community! Jan 2 '13 at 21:46
  • \usepackage{sectsty} \allsectionsfont{\fontfamily{BebasNeue}\selectfont} ...this does almost what I want. But it does not change the chapter heading. I suspect this has something to do with \pagestyle{fancy}. Any suggestions on how to approach this situation? Jan 2 '13 at 23:43
  • Have a look at the documentation for fncychap. There you will see the formatting is controlled by \ChNameVar etc. The first example "Sonny" shows how to switch various parts to sansserif; the other examples should also be useful. Jan 3 '13 at 9:58

The sphinx latex output uses facychap Bjarne style by default (see comments to question). I did not like the default layout, especially the fonts did not suite my book. Once I found out how to modify facychap I was able to make the layout changes to the preamble (in conf.py). Here is what I did:

% load BebasNeue font

% use BebasNeue font for headings

% modifications to the the part page
\ifnum \c@secnumdepth >-2\relax
 \interlinepenalty \@M
 \ifnum \c@secnumdepth >-2\relax
   \fontfamily{BebasNeue}\selectfont\huge \partname\nobreakspace\thepart
   \vskip 20\p@
 \fontfamily{BebasNeue}\selectfont\Huge \bfseries #2\par}%

% modifications to fncychap style Bjarne
  \CNV\FmN{\@chapapp}\space \CNoV\thechapter\par\nobreak 
  \vskip -1\baselineskip\vskip 5pt
  \vskip 20\p@

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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