Skip to content

Commit 4be66b6

Browse files
authored
Fix warnings due to deprecated latex options (GH-1563)
1 parent c7362b4 commit 4be66b6

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

Doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PAPER =
1010
SOURCES =
1111
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
1212

13-
ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \
13+
ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_elements.papersize=$(PAPER) \
1414
$(SPHINXOPTS) . build/$(BUILDER) $(SOURCES)
1515

1616
.PHONY: help build html htmlhelp latex text changes linkcheck \

Doc/conf.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,24 @@
8282
# Options for LaTeX output
8383
# ------------------------
8484

85+
# Get LaTeX to handle Unicode correctly
86+
latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
87+
88+
# Additional stuff for the LaTeX preamble.
89+
latex_elements['preamble'] = r'''
90+
\authoraddress{
91+
\strong{Python Software Foundation}\\
92+
Email: \email{[email protected]}
93+
}
94+
\let\Verbatim=\OriginalVerbatim
95+
\let\endVerbatim=\endOriginalVerbatim
96+
'''
97+
8598
# The paper size ('letter' or 'a4').
86-
latex_paper_size = 'a4'
99+
latex_elements['papersize'] = 'a4'
87100

88101
# The font size ('10pt', '11pt' or '12pt').
89-
latex_font_size = '10pt'
102+
latex_elements['font_size'] = '10pt'
90103

91104
# Grouping the document tree into LaTeX files. List of tuples
92105
# (source start file, target name, title, author, document class [howto/manual]).
@@ -119,30 +132,15 @@
119132
for fn in os.listdir('howto')
120133
if fn.endswith('.rst') and fn != 'index.rst')
121134

122-
# Additional stuff for the LaTeX preamble.
123-
latex_preamble = r'''
124-
\authoraddress{
125-
\strong{Python Software Foundation}\\
126-
Email: \email{[email protected]}
127-
}
128-
\let\Verbatim=\OriginalVerbatim
129-
\let\endVerbatim=\endOriginalVerbatim
130-
'''
131-
132135
# Documents to append as an appendix to all manuals.
133136
latex_appendices = ['glossary', 'about', 'license', 'copyright']
134137

135-
# Get LaTeX to handle Unicode correctly
136-
latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
137-
138-
139138
# Options for Epub output
140139
# -----------------------
141140

142141
epub_author = 'Python Documentation Authors'
143142
epub_publisher = 'Python Software Foundation'
144143

145-
146144
# Options for the coverage checker
147145
# --------------------------------
148146

0 commit comments

Comments
 (0)