mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
LaTeX: for French and xelatex, use babel not polyglossia (fix: #4272)
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -33,6 +33,7 @@ Bugs fixed
|
||||
* #5091: latex: curly braces in index entries are not handled correctly
|
||||
* #5070: epub: Wrong internal href fragment links
|
||||
* #5104: apidoc: Interface of ``sphinx.apidoc:main()`` has changed
|
||||
* #4272: PDF builds of French projects have issues with XeTeX
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
@@ -453,6 +453,14 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
# sort out some elements
|
||||
self.elements = DEFAULT_SETTINGS.copy()
|
||||
self.elements.update(ADDITIONAL_SETTINGS.get(builder.config.latex_engine, {}))
|
||||
# for xelatex+French, don't use polyglossia
|
||||
if self.elements['latex_engine'] == 'xelatex':
|
||||
if builder.config.language:
|
||||
if builder.config.language[:2] == 'fr':
|
||||
self.elements.update({
|
||||
'polyglossia': '',
|
||||
'babel': '\\usepackage{babel}',
|
||||
})
|
||||
# allow the user to override them all
|
||||
self.check_latex_elements()
|
||||
self.elements.update(builder.config.latex_elements)
|
||||
|
||||
Reference in New Issue
Block a user