]> granicus.if.org Git - python/commitdiff
bpo-31423: Fix building the PDF documentation (GH-3693)
authorFrançois Magimel <francois.magimel@alumni.enseeiht.fr>
Fri, 22 Sep 2017 17:16:57 +0000 (19:16 +0200)
committerZachary Ware <zachary.ware@gmail.com>
Fri, 22 Sep 2017 17:16:57 +0000 (12:16 -0500)
Use prefixed macro names for the `authoraddress` function, add T2A to the font encoding in LaTeX sources to support Cyrillic characters in the PDF documentation, and replace the deprecated `font_size` config option with `pointsize`.

Doc/conf.py

index c1c2472a19630a0a960af24e85ccab7fd7893598..c4ae16a2054305ccfd2ab65df6b7757fb1f43b63 100644 (file)
@@ -90,13 +90,17 @@ html_split_index = True
 # ------------------------
 
 # Get LaTeX to handle Unicode correctly
-latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
+latex_elements = {
+    'inputenc': r'\usepackage[utf8x]{inputenc}',
+    'utf8extra': '',
+    'fontenc': r'\usepackage[T1,T2A]{fontenc}',
+}
 
 # Additional stuff for the LaTeX preamble.
 latex_elements['preamble'] = r'''
 \authoraddress{
-  \strong{Python Software Foundation}\\
-  Email: \email{docs@python.org}
+  \sphinxstrong{Python Software Foundation}\\
+  Email: \sphinxemail{docs@python.org}
 }
 \let\Verbatim=\OriginalVerbatim
 \let\endVerbatim=\endOriginalVerbatim
@@ -106,7 +110,7 @@ latex_elements['preamble'] = r'''
 latex_elements['papersize'] = 'a4'
 
 # The font size ('10pt', '11pt' or '12pt').
-latex_elements['font_size'] = '10pt'
+latex_elements['pointsize'] = '10pt'
 
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, document class [howto/manual]).