From be2cfe5ac903990629454b8c2ff32e49e550c3a6 Mon Sep 17 00:00:00 2001 From: Michele Guerini Rocco Date: Mon, 22 Apr 2024 14:07:27 +0200 Subject: [PATCH] doc: set default font, optionally --- doc/1.intro.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/1.intro.md b/doc/1.intro.md index 053c852..700545b 100644 --- a/doc/1.intro.md +++ b/doc/1.intro.md @@ -105,11 +105,6 @@ references: given: H. issued: 2003-3-5, 2003-4-5 -# Font -# mainfont: Libertinus Serif -# mathfont: Libertinus Math -# monofont: Fira Mono - # PDF output options classoptions: - a4paper @@ -124,6 +119,14 @@ css: res/style.css # pandoc-crossref options linkReferences: true tableEqns: true + +header-includes: | + ```{=latex} + % Set font only if available + \IfFontExistsTF{Libertinus Serif}{\setmainfont{Libertinus Serif}}{} + \IfFontExistsTF{Libertinus Math}{\setmonofont{Libertinus Math}}{} + \IfFontExistsTF{blabla}{\setsansfont{blablabla}}{} + ``` ... [^1]: Istituto per la Scienza e Tecnologia dei Plasmi,