Skip to content

Commit da86874

Browse files
authored
[2.7] bpo-31423: Fix building the PDF documentation (GH-3693) (GH-3700)
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 5b6452d commit da86874

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
@@ -83,13 +83,17 @@
8383
# ------------------------
8484

8585
# Get LaTeX to handle Unicode correctly
86-
latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
86+
latex_elements = {
87+
'inputenc': r'\usepackage[utf8x]{inputenc}',
88+
'utf8extra': '',
89+
'fontenc': r'\usepackage[T1,T2A]{fontenc}',
90+
}
8791

8892
# Additional stuff for the LaTeX preamble.
8993
latex_elements['preamble'] = r'''
9094
\authoraddress{
91-
\strong{Python Software Foundation}\\
92-
Email: \email{docs@python.org}
95+
\sphinxstrong{Python Software Foundation}\\
96+
Email: \sphinxemail{docs@python.org}
9397
}
9498
\let\Verbatim=\OriginalVerbatim
9599
\let\endVerbatim=\endOriginalVerbatim
@@ -99,7 +103,7 @@
99103
latex_elements['papersize'] = 'a4'
100104

101105
# The font size ('10pt', '11pt' or '12pt').
102-
latex_elements['font_size'] = '10pt'
106+
latex_elements['pointsize'] = '10pt'
103107

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

0 commit comments

Comments
 (0)