Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeX: for French language and lualatex engine polyglossia and not babel is used contrarily to Sphinx documentation #12410

Open
jfbu opened this issue Jun 5, 2024 · 1 comment

Comments

@jfbu
Copy link
Contributor

jfbu commented Jun 5, 2024

Describe the bug

At our doc for 'babel' key of 'latex_elements', it is said:

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

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.

jfbu added a commit that referenced this issue Jun 5, 2024
…2410)

This fixes the documentation which was faulty since v1.7.6, but #12410 is left open until a decision is taken.
jfbu added a commit that referenced this issue Jun 5, 2024
This fixes the documentation which was faulty since v1.7.6, but #12410 is left open until a decision is taken.
@jfbu
Copy link
Contributor Author

jfbu commented Jun 26, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant