mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
LaTeX: inhibit so-called TeX Ligatures with xelatex and lualatex
Closes: #6886 It is difficult to understand why fontspec _by default_ turns straight double quotes " into ” i.e. right curly ones, calling this "TeX ligature", but that's life and fortunately fontspec also provides a way to turn this off. With this workaround also a straight ' in LaTeX file, (i.e. a straight ' in source and smartquotes = False was used) will not become a curly quote and this is an advantage compared to the pdflatex situation. We suppress TeX Ligatures also for \ttfamily (used in code-blocks) but that appears to be already the case with fontspec although user manual does not seem explicit (and no list of what exactly the TeX Ligatures are is to be found in fontspec user documentation, one has to go into its source code). (the fact that Pygmentize escapes the " to \char`\" TeX mark-up would not by itself prevent the transformation into a curly double quote, it is because fontspec does not apply this transform to monospace typeface that it did not show).
This commit is contained in:
parent
7292ab7eef
commit
bc1557528f
2
CHANGES
2
CHANGES
@ -81,6 +81,8 @@ Bugs fixed
|
||||
include this match.
|
||||
* #6848: config.py shouldn't pop extensions from overrides
|
||||
* #6867: text: extra spaces are inserted to hyphenated words on folding lines
|
||||
* #6886: LaTeX: xelatex converts straight double quotes into right curly ones
|
||||
(shows when :confval:`smartquotes` is ``False``)
|
||||
* #6876: LaTeX: multi-line display of authors on title page has ragged edges
|
||||
|
||||
Testing
|
||||
|
@ -194,7 +194,8 @@ ADDITIONAL_SETTINGS = {
|
||||
'latex_engine': 'xelatex',
|
||||
'polyglossia': '\\usepackage{polyglossia}',
|
||||
'babel': '',
|
||||
'fontenc': '\\usepackage{fontspec}',
|
||||
'fontenc': ('\\usepackage{fontspec}\n'
|
||||
'\\defaultfontfeatures[\\rmfamily,\\sffamily,\\ttfamily]{}'),
|
||||
'fontpkg': XELATEX_DEFAULT_FONTPKG,
|
||||
'textgreek': '',
|
||||
'utf8extra': ('\\catcode`^^^^00a0\\active\\protected\\def^^^^00a0'
|
||||
@ -205,7 +206,7 @@ ADDITIONAL_SETTINGS = {
|
||||
'polyglossia': '\\usepackage{polyglossia}',
|
||||
'babel': '',
|
||||
'fontenc': ('\\usepackage{fontspec}\n'
|
||||
'\\defaultfontfeatures[\\rmfamily,\\sffamily]{}'),
|
||||
'\\defaultfontfeatures[\\rmfamily,\\sffamily,\\ttfamily]{}'),
|
||||
'fontpkg': LUALATEX_DEFAULT_FONTPKG,
|
||||
'textgreek': '',
|
||||
'utf8extra': ('\\catcode`^^^^00a0\\active\\protected\\def^^^^00a0'
|
||||
|
Loading…
Reference in New Issue
Block a user