From adb4100e58d9ea073ee8caa454bb7c885b6a83ed Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Fri, 12 Nov 2021 09:36:18 +0100 Subject: [PATCH] Refs #33247 -- Used XeLaTeX for PDF docs build. --- docs/conf.py | 40 ++++++++++++++-------------------------- 1 file 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}} """, }