Refs #33247 -- Used XeLaTeX for PDF docs build.
This commit is contained in:
parent
661316b066
commit
adb4100e58
40
docs/conf.py
40
docs/conf.py
|
@ -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}]
|
|
||||||
""",
|
""",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue