Skip to content

Commit ca1002c

Browse files
committed
Configuration to properly generate french and japanese PDF.
This will have to be ported to cpython Doc/conf.py, if we find a way to do it cleanly. For the moment, it looks like we don't know the language in conf.py so it's hard, see: sphinx-doc/sphinx#4150 (comment)
1 parent 12c93fb commit ca1002c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

build_docs.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@
5353
'ja'
5454
]
5555

56+
SPHINXOPTS = {
57+
'ja': ['-D latex_engine=platex',
58+
'-D latex_elements.inputenc=',
59+
'-D latex_elements.fontenc='],
60+
'fr': ['-D latex_engine=xelatex',
61+
'-D latex_elements.inputenc=',
62+
'-D latex_elements.fontenc='],
63+
'en': ['-D latex_engine=xelatex',
64+
'-D latex_elements.inputenc=',
65+
'-D latex_elements.fontenc=']
66+
}
67+
5668

5769
def _file_unchanged(old, new):
5870
with open(old, "rb") as fp1, open(new, "rb") as fp2:
@@ -161,7 +173,8 @@ def build_one(version, isdev, quick, venv, build_root, www_root,
161173
checkout = build_root + "/python" + str(version).replace('.', '')
162174
logging.info("Build start for version: %s, language: %s",
163175
str(version), language)
164-
sphinxopts = ['-j4']
176+
sphinxopts = SPHINXOPTS[language].copy()
177+
sphinxopts.append('-j4')
165178
if language == 'en':
166179
target = os.path.join(www_root, str(version))
167180
else:

0 commit comments

Comments
 (0)