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.

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).

share|improve this question

migrated from stackoverflow.com Jan 2 '13 at 1:05

This question came from our site for professional and enthusiast programmers.

Does this question work for you? The default set-up of sphinx uses the standard latex classes, and the titlesec package works for those. –  Andrew Swann 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. –  mark 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! –  Peter Jansson 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? –  mark 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. –  Andrew Swann Jan 3 '13 at 9:58

1 Answer 1

up vote 2 down vote accepted

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@
share|improve this answer

Your Answer


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.