mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add xeCJKVerbAddon to default fvset config for Chinese documents
Prevent xeCJK from adding extra spaces in fancyvrb Verbatim enviroment. Fixes: #9414 Signed-off-by: Shengjing Zhu <i@zhsj.me>
This commit is contained in:
parent
b09acabf00
commit
92c9cabae5
@ -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'``
|
||||
|
@ -198,6 +198,9 @@ ADDITIONAL_SETTINGS: Dict[Any, Dict[str, Any]] = {
|
||||
'polyglossia': '',
|
||||
'babel': '\\usepackage{babel}',
|
||||
'fontenc': '\\usepackage{xeCJK}',
|
||||
# set formatcom=\xeCJKVerbAddon to prevent xeCJK from adding extra spaces in
|
||||
# fancyvrb Verbatim enviroment.
|
||||
'fvset': '\\fvset{fontsize=\\small,formatcom=\\xeCJKVerbAddon}',
|
||||
},
|
||||
('xelatex', 'el'): {
|
||||
'fontpkg': XELATEX_GREEK_DEFAULT_FONTPKG,
|
||||
|
Loading…
Reference in New Issue
Block a user