mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
677f218df5
commit
06f00545ff
@@ -61,9 +61,12 @@ epub: $(PNGs)
|
|||||||
$(SOURCEDIR)/set_versions.py
|
$(SOURCEDIR)/set_versions.py
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
# Note: we need to pass buf_size here (which is also configurable from
|
||||||
|
# texmf.cnf), to avoid following error:
|
||||||
|
# Unable to read an entire line---bufsize=200000. Please increase buf_size in texmf.cnf.
|
||||||
latexpdf: $(PDFs)
|
latexpdf: $(PDFs)
|
||||||
$(SOURCEDIR)/set_versions.py
|
$(SOURCEDIR)/set_versions.py
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
buf_size=10000000 $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
all: html epub latexpdf
|
all: html epub latexpdf
|
||||||
|
|
||||||
|
|||||||
@@ -158,9 +158,14 @@ html_last_updated_fmt = '%b %d, %Y'
|
|||||||
# Remove the trailing 'dot' in section numbers
|
# Remove the trailing 'dot' in section numbers
|
||||||
html_secnumber_suffix = " "
|
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 = {
|
latex_elements = {
|
||||||
'passoptionstopackages': '\\PassOptionsToPackage{bookmarksdepth=5}{hyperref}',
|
'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
|
# Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG
|
||||||
|
|||||||
Reference in New Issue
Block a user