diff options
author | Antonin Godard <antonin.godard@bootlin.com> | 2024-11-06 08:48:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-12 11:09:51 +0000 |
commit | 06f00545ffbc3dd8b045ab56c03d1e8226dac981 (patch) | |
tree | 2a6c6af9f65ae5887d2a477fdcf634dd133d3a3d /documentation | |
parent | 677f218df5fc0cc3285427a102a26dc9dc6b7553 (diff) | |
download | poky-06f00545ffbc3dd8b045ab56c03d1e8226dac981.tar.gz |
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: bd6265ca323fac547a197bb516dc4a9ef3897508)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/Makefile | 5 | ||||
-rw-r--r-- | documentation/conf.py | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/documentation/Makefile b/documentation/Makefile index 541390b2a1..30bb71cb31 100644 --- a/documentation/Makefile +++ b/documentation/Makefile | |||
@@ -61,9 +61,12 @@ epub: $(PNGs) | |||
61 | $(SOURCEDIR)/set_versions.py | 61 | $(SOURCEDIR)/set_versions.py |
62 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | 62 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
63 | 63 | ||
64 | # Note: we need to pass buf_size here (which is also configurable from | ||
65 | # texmf.cnf), to avoid following error: | ||
66 | # Unable to read an entire line---bufsize=200000. Please increase buf_size in texmf.cnf. | ||
64 | latexpdf: $(PDFs) | 67 | latexpdf: $(PDFs) |
65 | $(SOURCEDIR)/set_versions.py | 68 | $(SOURCEDIR)/set_versions.py |
66 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | 69 | buf_size=10000000 $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
67 | 70 | ||
68 | all: html epub latexpdf | 71 | all: html epub latexpdf |
69 | 72 | ||
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' | |||
158 | # Remove the trailing 'dot' in section numbers | 158 | # Remove the trailing 'dot' in section numbers |
159 | html_secnumber_suffix = " " | 159 | html_secnumber_suffix = " " |
160 | 160 | ||
161 | # We need XeTeX to process special unicode character, sometimes the contributor | ||
162 | # list from the release note contains those. | ||
163 | # See https://docs.readthedocs.io/en/stable/guides/pdf-non-ascii-languages.html. | ||
164 | latex_engine = 'xelatex' | ||
165 | latex_use_xindy = False | ||
161 | latex_elements = { | 166 | latex_elements = { |
162 | 'passoptionstopackages': '\\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', | 167 | 'passoptionstopackages': '\\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', |
163 | 'preamble': '\\setcounter{tocdepth}{2}', | 168 | 'preamble': '\\usepackage[UTF8]{ctex}\n\\setcounter{tocdepth}{2}', |
164 | } | 169 | } |
165 | 170 | ||
166 | # Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG | 171 | # Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG |