You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changed in version 1.7.6: For French, xelatex and lualatex default to using babel, not polyglossia.
This is true for 'xelatex' but not for 'lualatex' value of latex_engine.
How to Reproduce
index.rst
test
===
nothing
conf.py
language = 'fr'
latex_engine = 'lualatex'
Then make latex and the LaTeX file will contain \usepackage{polyglossia}.
Environment Information
Sphinx 7.3.7
Sphinx extensions
No response
Additional context
The discrepancy between 'xelatex' and 'lualatex' has been there ever since v1.7.6. There is a code comment # for xelatex+French, don't use polyglossia in sphinx/writers/latex.py but no explanation for why 'xelatex' only. But the documentation mentions the two so is buggy.
(edited) The faulty commit was 8a23ad1. It followed on #5178 fixing #4272.
Either
fix the documentation to explain 'lualatex' uses polyglossia,
My current opinion is that lualatex should by default use same as xelatex for French i.e. babel not polyglossia because the former more completely implements French typographical rules. In the past I would have pushed the change to a branch for major releases as this is breaking change (I do not believe it matters really in that case because French users either do not care and will not notice the change or they do care and already have suitable conf.py). Ping @AA-Turner about what is policy. As said in my parenthetical remark I think we can do the change on master but what about "more breaking" changes in some other situation, should it arise?
Describe the bug
At our doc for
'babel'
key of'latex_elements'
, it is said:This is true for
'xelatex'
but not for'lualatex'
value oflatex_engine
.How to Reproduce
index.rst
test === nothing
conf.py
Then
make latex
and the LaTeX file will contain\usepackage{polyglossia}
.Environment Information
Sphinx extensions
No response
Additional context
The discrepancy between
'xelatex'
and'lualatex'
has been there ever sincev1.7.6
. There is a code comment# for xelatex+French, don't use polyglossia
in sphinx/writers/latex.py but no explanation for why'xelatex'
only. But the documentation mentions the two so is buggy.(edited) The faulty commit was 8a23ad1. It followed on #5178 fixing #4272.
Either
'lualatex'
uses polyglossia,'lualatex'
also usebabel
with French language.Note that there are quite a few differences between babel and polyglossia for French language in output PDF, particularly regarding lists.
Hoping for comments by LaTeX experts.
The text was updated successfully, but these errors were encountered: