LaTeX: support for Greek and Cyrillic

0. do not escape Unicode Greek letters via LaTeX math mark-up: pass them
   through un-modified to LaTeX document,

1. if "fontenc" receives extra option LGR, then pdflatex will support
   Unicode Greek letters (not in math), and with extra option T2A it
   will support (most) Unicode Cyrillic letters.

2. for pdflatex with LGR, this will use "textalpha" LaTeX package and
   "substitutefont" package to set up some automatic font substitution
   to work around the unavailability of Greek with "times"
   package (which is default font package chosen by Sphinx for
   pdflatex), same with T2A and "substitutefont" for Cyrillic.

3. for xelatex/lualatex, set up Computer Modern Unicode as default font,
   as it supports Cyrillic and Greek scripts,

4. for platex, don't do anything special as the engine already has
   its default font supporting Cyrillic and Greek (even in math mode!)

Closes: #5251
Fixes:  #5248
Fixes:  #5247
This commit is contained in:
jfbu
2018-11-15 18:04:11 +01:00
parent 6c94801ec2
commit 2825e338c2
10 changed files with 286 additions and 112 deletions

View File

@@ -216,7 +216,7 @@ def get_verifier(verify, verify_re):
'verify',
u'Γ\\\\∞$',
None,
r'\(\Gamma\)\textbackslash{}\(\infty\)\$',
u'Γ\\textbackslash{}\\(\\infty\\)\\$',
),
(
# in verbatim code fragments
@@ -225,7 +225,7 @@ def get_verifier(verify, verify_re):
None,
(u'\\fvset{hllines={, ,}}%\n'
u'\\begin{sphinxVerbatim}[commandchars=\\\\\\{\\}]\n'
u'@\\(\\Gamma\\)\\PYGZbs{}\\(\\infty\\)\\PYGZdl{}\\PYGZob{}\\PYGZcb{}\n'
u'@Γ\\PYGZbs{}\\(\\infty\\)\\PYGZdl{}\\PYGZob{}\\PYGZcb{}\n'
u'\\end{sphinxVerbatim}'),
),
(