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

-

## migrated from stackoverflow.comJan 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

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
\pdfmapfile{lcdftools.map}

% use BebasNeue font for headings
\titleformat{\section}
{\fontfamily{BebasNeue}\selectfont\LARGE}
{\thesection}{1em}{}
\titleformat{\subsection}
{\fontfamily{BebasNeue}\selectfont\large}
{\thesubsection}{1em}{}

% modifications to the the part page
\makeatletter
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\else
\fi
\markboth{}{}%
{\centering
\interlinepenalty \@M
\normalfont
\ifnum \c@secnumdepth >-2\relax
\fontfamily{BebasNeue}\selectfont\huge \partname\nobreakspace\thepart
\par
\vskip 20\p@
\fi
\fontfamily{BebasNeue}\selectfont\Huge \bfseries #2\par}%
\@endpart}
\makeatother

% modifications to fncychap style Bjarne
\ChNameVar{\raggedleft\normalsize\fontfamily{BebasNeue}\selectfont}
\ChNumVar{\raggedleft\normalsize\fontfamily{BebasNeue}\selectfont}
\ChTitleVar{\raggedleft\huge\fontfamily{BebasNeue}\selectfont}
\makeatletter
\renewcommand\DOCH{%
\mghrulefill{\RW}\par\nobreak
\CNV\FmN{\@chapapp}\space \CNoV\thechapter\par\nobreak
\vskip -1\baselineskip\vskip 5pt
\mghrulefill{\RW}\par\nobreak
\vskip 20\p@
}
\makeatother

-