From cd4009d7e1cca89a75a81227702631aba161b75e Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Sat, 25 Feb 2023 12:11:04 +0100 Subject: [PATCH] DOC/LaTeX: use lualatex/fontspec for selecting fonts (#711) --- .circleci/config.yml | 2 +- doc/conf.py | 37 ++++++++++++++++++++----------------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ad9e454..410c5719 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -76,7 +76,7 @@ jobs: name: Building PDF command: | cd build/sphinx/latex - latexmk -pdf + latexmk -pdflua - store_artifacts: name: Uploading PDF file diff --git a/doc/conf.py b/doc/conf.py index 425bc7f3..11c2b4d2 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -140,27 +140,30 @@ 'papersize': 'a4paper', 'printindex': '', 'sphinxsetup': r""" - %verbatimwithframe=false, - %verbatimwrapslines=false, - %verbatimhintsturnover=false, - noteBorderColor={HTML}{E0E0E0}, - noteborder=1.5pt, - warningBorderColor={HTML}{E0E0E0}, - warningborder=1.5pt, - warningBgColor={HTML}{FBFBFB}, - """, - 'preamble': r""" -\usepackage[sc,osf]{mathpazo} +HeaderFamily=\rmfamily\bfseries, +%verbatimwithframe=false, +%verbatimwrapslines=false, +%verbatimhintsturnover=false, +noteBorderColor={HTML}{E0E0E0}, +noteborder=1.5pt, +warningBorderColor={HTML}{E0E0E0}, +warningborder=1.5pt, +warningBgColor={HTML}{FBFBFB}, +""", + 'fontpkg': r""" +\usepackage{mathpazo} \linespread{1.05} % see http://www.tug.dk/FontCatalogue/urwpalladio/ -\renewcommand{\sfdefault}{pplj} % Palatino instead of sans serif -\IfFileExists{zlmtt.sty}{ - \usepackage[light,scaled=1.05]{zlmtt} % light typewriter font from lmodern -}{ - \renewcommand{\ttdefault}{lmtt} % typewriter font from lmodern -} +\setmainfont{TeX Gyre Pagella}[Numbers=OldStyle] +\setmonofont{Latin Modern Mono Light}[Numbers=Lining] +""", + 'preamble': r""" +\urlstyle{tt} """, } +latex_engine = 'lualatex' +latex_use_xindy = False + latex_table_style = ['booktabs'] latex_documents = [