From 1ca844121bcc490699c88eb4bc153bda7b3da759 Mon Sep 17 00:00:00 2001 From: Antonin Godard Date: Wed, 6 Nov 2024 08:48:24 +0100 Subject: doc: Makefile: add support for xelatex This patch makes the "latexpdf" target compile the documentation with xelatex instead of the default pdflatex engine. The reason behind this is stated in [YOCTO #14357]: pdflatex does not support compiling foreign characters, so we need to resort to another engine, here xelatex. It also increases the texmf config buf_size to 10000000 to avoid a compilation error. (From yocto-docs rev: 22f2365417ea5a9a7970e2475925f4f8eb983acf) Signed-off-by: Antonin Godard (cherry picked from commit 93848842b3ad8aa6b9c9f46d60f2c2ad396c6971) Signed-off-by: Antonin Godard Signed-off-by: Steve Sakoman --- documentation/conf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'documentation/conf.py') diff --git a/documentation/conf.py b/documentation/conf.py index 9e87df0564..c7dd4e03fc 100644 --- a/documentation/conf.py +++ b/documentation/conf.py @@ -158,9 +158,14 @@ html_last_updated_fmt = '%b %d, %Y' # Remove the trailing 'dot' in section numbers html_secnumber_suffix = " " +# We need XeTeX to process special unicode character, sometimes the contributor +# list from the release note contains those. +# See https://docs.readthedocs.io/en/stable/guides/pdf-non-ascii-languages.html. +latex_engine = 'xelatex' +latex_use_xindy = False latex_elements = { 'passoptionstopackages': '\\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', - 'preamble': '\\setcounter{tocdepth}{2}', + 'preamble': '\\usepackage[UTF8]{ctex}\n\\setcounter{tocdepth}{2}', } # Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG -- cgit v1.2.3-54-g00ecf