Skip to content

Commit 6de3584

Browse files
authored
[3.6] bpo-31423: Fix building the PDF documentation (GH-3693) (GH-3699)
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`. (cherry picked from commit da9b4cf)
1 parent eef49f5 commit 6de3584

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Doc/conf.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,17 @@
8989
# ------------------------
9090

9191
# Get LaTeX to handle Unicode correctly
92-
latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
92+
latex_elements = {
93+
'inputenc': r'\usepackage[utf8x]{inputenc}',
94+
'utf8extra': '',
95+
'fontenc': r'\usepackage[T1,T2A]{fontenc}',
96+
}
9397

9498
# Additional stuff for the LaTeX preamble.
9599
latex_elements['preamble'] = r'''
96100
\authoraddress{
97-
\strong{Python Software Foundation}\\
98-
Email: \email{docs@python.org}
101+
\sphinxstrong{Python Software Foundation}\\
102+
Email: \sphinxemail{docs@python.org}
99103
}
100104
\let\Verbatim=\OriginalVerbatim
101105
\let\endVerbatim=\endOriginalVerbatim
@@ -105,7 +109,7 @@
105109
latex_elements['papersize'] = 'a4'
106110

107111
# The font size ('10pt', '11pt' or '12pt').
108-
latex_elements['font_size'] = '10pt'
112+
latex_elements['pointsize'] = '10pt'
109113

110114
# Grouping the document tree into LaTeX files. List of tuples
111115
# (source start file, target name, title, author, document class [howto/manual]).

0 commit comments

Comments
 (0)