Skip to content

Commit

Permalink
Add xeCJKVerbAddon to default fvset config for Chinese documents
Browse files Browse the repository at this point in the history
Fixes: sphinx-doc#9414

Signed-off-by: Shengjing Zhu <i@zhsj.me>
  • Loading branch information
zhsj committed Jul 7, 2021
1 parent b09acab commit cde021e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/latex.rst
Expand Up @@ -531,6 +531,10 @@ Keys that don't need to be overridden unless in special cases are:
Changed default for ``'pdflatex'``. Previously it was using
``'\\fvset{fontsize=\\small}'``.

.. versionchanged:: 4.1.0
Changed default for Chinese documents to
``'\\fvset{fontsize=\\small,formatcom=\\xeCJKVerbAddon}'``

Keys that are set by other options and therefore should not be overridden are:

``'docclass'``
Expand Down
1 change: 1 addition & 0 deletions sphinx/builders/latex/constants.py
Expand Up @@ -198,6 +198,7 @@
'polyglossia': '',
'babel': '\\usepackage{babel}',
'fontenc': '\\usepackage{xeCJK}',
'fvset': '\\fvset{fontsize=\\small,formatcom=\\xeCJKVerbAddon}',
},
('xelatex', 'el'): {
'fontpkg': XELATEX_GREEK_DEFAULT_FONTPKG,
Expand Down

0 comments on commit cde021e

Please sign in to comment.