mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
LaTeX: use `\small
` fontsize in code-blocks with xelatex and lualatex
This commit is contained in:
parent
6a40dd9272
commit
022fc9d3b6
@ -2301,20 +2301,16 @@ information.
|
|||||||
index is full of long entries.
|
index is full of long entries.
|
||||||
|
|
||||||
``'fvset'``
|
``'fvset'``
|
||||||
Customization of ``fancyvrb`` LaTeX package. Currently, Sphinx uses
|
Customization of ``fancyvrb`` LaTeX package. Sphinx does by default
|
||||||
this key to set the fontsize in code-blocks according to the
|
``'fvset': '\\fvset{fontsize=\\small}'``, to adjust for the large
|
||||||
:confval:`latex_engine`.
|
character width of the monospace font, used in code-blocks.
|
||||||
|
You may need to modify this if you use custom fonts.
|
||||||
- ``'pdflatex'`` uses ``'fvset': '\\fvset{fontsize=\\small}'``,
|
|
||||||
to mitigate the size difference between the default monospaced font
|
|
||||||
(Courier) and the default text font (Times). You may need to modify
|
|
||||||
this if you use custom fonts.
|
|
||||||
|
|
||||||
- ``'xelatex'`` and ``'lualatex'`` use ``'\\fvset{fontsize=auto}'``,
|
|
||||||
as there is no size difference between the regular and the
|
|
||||||
monospaced fonts used by default by Sphinx with these engines.
|
|
||||||
|
|
||||||
.. versionadded:: 1.8
|
.. versionadded:: 1.8
|
||||||
|
.. versionchanged:: 2.0
|
||||||
|
Due to new default font choice for ``'xelatex'`` and ``'lualatex'``
|
||||||
|
(FreeFont), Sphinx does ``\\fvset{fontsize=\\small}`` also with these
|
||||||
|
engines (and not ``\\fvset{fontsize=auto}``).
|
||||||
|
|
||||||
* Keys that are set by other options and therefore should not be overridden
|
* Keys that are set by other options and therefore should not be overridden
|
||||||
are:
|
are:
|
||||||
|
@ -202,7 +202,6 @@ ADDITIONAL_SETTINGS = {
|
|||||||
'textgreek': '',
|
'textgreek': '',
|
||||||
'utf8extra': ('\\catcode`^^^^00a0\\active\\protected\\def^^^^00a0'
|
'utf8extra': ('\\catcode`^^^^00a0\\active\\protected\\def^^^^00a0'
|
||||||
'{\\leavevmode\\nobreak\\ }'),
|
'{\\leavevmode\\nobreak\\ }'),
|
||||||
'fvset': '\\fvset{fontsize=auto}',
|
|
||||||
},
|
},
|
||||||
'lualatex': {
|
'lualatex': {
|
||||||
'latex_engine': 'lualatex',
|
'latex_engine': 'lualatex',
|
||||||
@ -213,7 +212,6 @@ ADDITIONAL_SETTINGS = {
|
|||||||
'textgreek': '',
|
'textgreek': '',
|
||||||
'utf8extra': ('\\catcode`^^^^00a0\\active\\protected\\def^^^^00a0'
|
'utf8extra': ('\\catcode`^^^^00a0\\active\\protected\\def^^^^00a0'
|
||||||
'{\\leavevmode\\nobreak\\ }'),
|
'{\\leavevmode\\nobreak\\ }'),
|
||||||
'fvset': '\\fvset{fontsize=auto}',
|
|
||||||
},
|
},
|
||||||
'platex': {
|
'platex': {
|
||||||
'latex_engine': 'platex',
|
'latex_engine': 'platex',
|
||||||
|
Loading…
Reference in New Issue
Block a user