Skip to content

Commit

Permalink
LaTeX: use babel for French with lualatex, not polyglossia
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed Jul 13, 2024
1 parent 063c973 commit 0ff8a01
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ Bugs fixed
* #12380: LaTeX: Footnote mark sometimes indicates ``Page N`` where ``N`` is
the current page number and the footnote does appear on that same page.
Patch by Jean-François B.
* #12410: LaTeX: for French and ``'lualatex'`` as :confval:`latex_engine`
``polyglossia`` and not ``babel`` is used (contrarily to ``'xelatex'``).
Patch by Jean-François B.
* #12416: Ensure that configuration setting aliases are always synchronised
when one value or the other is modified.
Patch by Bénédikt Tran.
Expand Down
15 changes: 4 additions & 11 deletions doc/latex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,11 @@ Keys that you may want to override include:
``'lualatex'`` uses same default setting as ``'xelatex'``

.. versionchanged:: 1.7.6
For French with ``xelatex`` (not ``lualatex``) the default is to use
``babel``, not ``polyglossia``. To let ``lualatex`` use ``babel``,
use this:
For French with ``'xelatex'`` (not ``'lualatex'``) the default is to
use ``babel``, not ``polyglossia``.

.. code-block:: python
latex_elements = {
'polyglossia': '',
'babel': r'\usepackage{babel}',
}
in file :file:`conf.py`.
.. versionchanged:: 7.4.0
For French with ``'lualatex'`` the default is to use ``babel``.

``'fontpkg'``
Font package inclusion. The default is::
Expand Down
5 changes: 5 additions & 0 deletions sphinx/builders/latex/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@
},

# special settings for latex_engine + language_code
('lualatex', 'fr'): {
# use babel instead of polyglossia by default
'polyglossia': '',
'babel': '\\usepackage{babel}',
},
('xelatex', 'fr'): {
# use babel instead of polyglossia by default
'polyglossia': '',
Expand Down

0 comments on commit 0ff8a01

Please sign in to comment.