Refs #33247 -- Used XeLaTeX for PDF docs build.

This commit is contained in:
Mariusz Felisiak 2021-11-12 09:36:18 +01:00 committed by GitHub
parent 661316b066
commit adb4100e58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 26 deletions

View File

@ -272,34 +272,22 @@ rst_epilog = """
# -- Options for LaTeX output -------------------------------------------------- # -- Options for LaTeX output --------------------------------------------------
# Use lualatex for Unicode support. # Use XeLaTeX for Unicode support.
latex_engine = 'lualatex' latex_engine = 'xelatex'
# Set fonts and fallbacks for CJK and Emojis. latex_use_xindy = False
# Set font for CJK and fallbacks for unicode characters.
latex_elements = { latex_elements = {
'fontpkg': r"""
\setmainfont{Symbola}
""",
'preamble': r""" 'preamble': r"""
\directlua{ \usepackage{newunicodechar}
luaotfload.add_fallback("seriffallbacks", { \usepackage[UTF8]{ctex}
"Noto Serif CJK SC:style=Regular;", \newunicodechar{π}{\ensuremath{\pi}}
"Symbola:Style=Regular;" \newunicodechar{}{\ensuremath{\le}}
}) \newunicodechar{}{\ensuremath{\ge}}
} \newunicodechar{}{\ensuremath{\heartsuit}}
\setmainfont{FreeSerif}[RawFeature={fallback=seriffallbacks}] \newunicodechar{}{\ensuremath{\ldots}}
\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}]
""", """,
} }