From 15d74eaaf4538ea749f63244d7203a52dd6809cd Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sun, 3 May 2020 07:47:03 +0200 Subject: [PATCH] use xetex to generate pdf To correctly handle unicode art in code blocks... --- docs/Makefile | 5 +++-- docs/conf.py | 12 +++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index ec93edb4..6928ecdf 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -73,10 +73,11 @@ html: ${GENERATED_SYNOPSIS} .PHONY: latexpdf latexpdf: ${GENERATED_SYNOPSIS} + @echo "Requires python3-sphinx, texlive-xetex and xindy" $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." + @echo "Running LaTeX files through xelatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + @echo "xelatex finished; the PDF files are in $(BUILDDIR)/latex." .PHONY: epub3 epub3: ${GENERATED_SYNOPSIS} diff --git a/docs/conf.py b/docs/conf.py index 3c859e07..6235783d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -251,14 +251,24 @@ htmlhelp_basename = 'ProxmoxBackupdoc' # -- Options for LaTeX output --------------------------------------------- +latex_engine = 'xelatex' + latex_elements = { + 'fontenc': '\\usepackage{fontspec}', + # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'a4paper', # The font size ('10pt', '11pt' or '12pt'). # - 'pointsize': '12pt', + 'pointsize': '10pt', + + 'fontpkg': r''' +\setmainfont{DejaVu Serif} +\setsansfont{DejaVu Sans} +\setmonofont{DejaVu Sans Mono} +''', # Additional stuff for the LaTeX preamble. #