summaryrefslogtreecommitdiff
path: root/doc/conf.py
diff options
context:
space:
mode:
authorjfbu <jfbu@free.fr>2018-11-15 18:04:11 +0100
committerjfbu <jfbu@free.fr>2018-11-16 21:14:51 +0100
commit2825e338c250ba8e089b53e8d0c1a644aae8a29f (patch)
tree86076eff6961f8926a7c78a67760c268eb03a1b5 /doc/conf.py
parent6c94801ec23ff6d4dda1e2aeb2f874bfb8b382ed (diff)
downloadsphinx-git-2825e338c250ba8e089b53e8d0c1a644aae8a29f.tar.gz
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
Diffstat (limited to 'doc/conf.py')
-rw-r--r--doc/conf.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/conf.py b/doc/conf.py
index e06d70150..661efb434 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -56,10 +56,17 @@ latex_documents = [('contents', 'sphinx.tex', 'Sphinx Documentation',
'Georg Brandl', 'manual', 1)]
latex_logo = '_static/sphinx.png'
latex_elements = {
+ 'fontenc': r'\usepackage[LGR,T2A,T1]{fontenc}',
'fontpkg': r'''
\usepackage[sc]{mathpazo}
\usepackage[scaled]{helvet}
\usepackage{courier}
+\substitutefont{LGR}{\rmdefault}{udidot}
+\substitutefont{LGR}{\sfdefault}{neohellenic}
+\substitutefont{LGR}{\ttdefault}{cmtt}
+\substitutefont{T2A}{\rmdefault}{fcm}
+\substitutefont{T2A}{\sfdefault}{fcs}
+\substitutefont{T2A}{\ttdefault}{fct}
''',
'passoptionstopackages': '\\PassOptionsToPackage{svgnames}{xcolor}',
'preamble': '\\DeclareUnicodeCharacter{229E}{\\ensuremath{\\boxplus}}',