[Python-checkins] bpo-31423: Fix building the PDF documentation (GH-3693)

Zachary Ware webhook-mailer at python.org
Fri Sep 22 13:17:00 EDT 2017


https://github.com/python/cpython/commit/da9b4cfb488119f2493a762fcb1d85c58494f51d
commit: da9b4cfb488119f2493a762fcb1d85c58494f51d
branch: master
author: François Magimel <francois.magimel at alumni.enseeiht.fr>
committer: Zachary Ware <zachary.ware at gmail.com>
date: 2017年09月22日T12:16:57-05:00
summary:
bpo-31423: Fix building the PDF documentation (GH-3693)
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`.
files:
M Doc/conf.py
diff --git a/Doc/conf.py b/Doc/conf.py
index c1c2472a196..c4ae16a2054 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -90,13 +90,17 @@
 # ------------------------
 
 # 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 at python.org}
+ \sphinxstrong{Python Software Foundation}\\
+ Email: \sphinxemail{docs at python.org}
 }
 \let\Verbatim=\OriginalVerbatim
 \let\endVerbatim=\endOriginalVerbatim
@@ -106,7 +110,7 @@
 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]).


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /