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 e92e87c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
13 changes: 3 additions & 10 deletions doc/latex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,10 @@ Keys that you may want to override include:

.. 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:
``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 e92e87c

Please sign in to comment.