summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/Makefile.sphinx6
-rw-r--r--Documentation/conf.py11
2 files changed, 14 insertions, 3 deletions
diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
index fdef3a4bc8c7..16a3502c9e40 100644
--- a/Documentation/Makefile.sphinx
+++ b/Documentation/Makefile.sphinx
@@ -29,7 +29,7 @@ else ifneq ($(DOCBOOKS),)
else # HAVE_SPHINX
# User-friendly check for pdflatex
-HAVE_PDFLATEX := $(shell if which pdflatex >/dev/null 2>&1; then echo 1; else echo 0; fi)
+HAVE_PDFLATEX := $(shell if which xelatex >/dev/null 2>&1; then echo 1; else echo 0; fi)
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -68,11 +68,11 @@ htmldocs:
pdfdocs:
ifeq ($(HAVE_PDFLATEX),0)
- $(warning The 'pdflatex' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
+ $(warning The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
@echo " SKIP Sphinx $@ target."
else # HAVE_PDFLATEX
@$(call loop_cmd,sphinx,latex,.,latex,.)
- $(Q)$(MAKE) -C $(BUILDDIR)/latex
+ $(Q)$(MAKE) PDFLATEX=xelatex -C $(BUILDDIR)/latex
endif # HAVE_PDFLATEX
epubdocs:
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 429183a03b92..06e6db916d2f 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -254,6 +254,10 @@ latex_elements = {
# Latex figure (float) alignment
#'figure_align': 'htbp',
+# Don't mangle with UTF-8 chars
+'inputenc': '',
+'utf8extra': '',
+
# Additional stuff for the LaTeX preamble.
'preamble': '''
% Allow generate some pages in landscape
@@ -281,6 +285,13 @@ latex_elements = {
\\end{graybox}
}
\\makeatother
+
+ % Use some font with UTF-8 support with XeLaTeX
+ \\usepackage{fontspec}
+ \\setsansfont{DejaVu Serif}
+ \\setromanfont{DejaVu Sans}
+ \\setmonofont{DejaVu Sans Mono}
+
'''
}