summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-11-12 09:36:18 +0100
committerGitHub <noreply@github.com>2021-11-12 09:36:18 +0100
commitadb4100e58d9ea073ee8caa454bb7c885b6a83ed (patch)
tree17148b7f26b9d2e8f95946d848b39fecc828b47f /docs/conf.py
parent661316b066923493ff91d6d2aa92e463f595a6b1 (diff)
Refs #33247 -- Used XeLaTeX for PDF docs build.
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py40
1 files changed, 14 insertions, 26 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 96c78672ca..81a8ce4a2a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -272,34 +272,22 @@ rst_epilog = """
# -- Options for LaTeX output --------------------------------------------------
-# Use lualatex for Unicode support.
-latex_engine = 'lualatex'
-# Set fonts and fallbacks for CJK and Emojis.
+# Use XeLaTeX for Unicode support.
+latex_engine = 'xelatex'
+latex_use_xindy = False
+# Set font for CJK and fallbacks for unicode characters.
latex_elements = {
+ 'fontpkg': r"""
+ \setmainfont{Symbola}
+ """,
'preamble': r"""
- \directlua{
- luaotfload.add_fallback("seriffallbacks", {
- "Noto Serif CJK SC:style=Regular;",
- "Symbola:Style=Regular;"
- })
- }
- \setmainfont{FreeSerif}[RawFeature={fallback=seriffallbacks}]
-
- \directlua{
- luaotfload.add_fallback("sansfallbacks", {
- "Noto Sans CJK SC:style=Regular;",
- "Symbola:Style=Regular;"
- })
- }
- \setsansfont{FreeSans}[RawFeature={fallback=sansfallbacks}]
-
- \directlua{
- luaotfload.add_fallback("monofallbacks", {
- "Noto Sans Mono CJK SC:style=Regular;",
- "Symbola:Style=Regular;"
- })
- }
- \setmonofont{FreeMono}[RawFeature={fallback=monofallbacks}]
+ \usepackage{newunicodechar}
+ \usepackage[UTF8]{ctex}
+ \newunicodechar{π}{\ensuremath{\pi}}
+ \newunicodechar{≤}{\ensuremath{\le}}
+ \newunicodechar{≥}{\ensuremath{\ge}}
+ \newunicodechar{♥}{\ensuremath{\heartsuit}}
+ \newunicodechar{…}{\ensuremath{\ldots}}
""",
}