From d68515f0d8e9dab05dc834b9bc4c42ae58a39024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Wed, 13 Mar 2013 12:03:44 +0100 Subject: [PATCH] Copy some useful latex settings from NumPy --- doc/source/conf.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 975de3eb..52dc8f13 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -220,9 +220,25 @@ latex_documents = [ #latex_use_parts = False # Additional stuff for the LaTeX preamble. -latex_preamble = ''' +latex_preamble = r''' \usepackage{enumitem} \setlistdepth{100} + +\usepackage{amsmath} +\DeclareUnicodeCharacter{00A0}{\nobreakspace} + +% In the parameters section, place a newline after the Parameters header +\usepackage{expdlist} +\let\latexdescription=\description +\def\description{\latexdescription{}{} \breaklabel} + +% Make Examples/etc section headers smaller and more compact +\makeatletter +\titleformat{\paragraph}{\normalsize\py@HeaderFamily}% + {\py@TitleColor}{0em}{\py@TitleColor}{\py@NormalColor} +\titlespacing*{\paragraph}{0pt}{1ex}{0pt} +\makeatother + ''' # Documents to append as an appendix to all manuals.