From f1701a7880eb4040a860c88dbb14df6b99c9f220 Mon Sep 17 00:00:00 2001 From: Eric Zhao <21zhaoe@protonmail.com> Date: Mon, 9 Oct 2023 23:53:33 -0400 Subject: [PATCH] formalism: Use xelatex --- formalism/latexmkrc | 2 +- formalism/preamble/preamble.tex | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/formalism/latexmkrc b/formalism/latexmkrc index 8dadbe5..60c9486 100644 --- a/formalism/latexmkrc +++ b/formalism/latexmkrc @@ -1,4 +1,4 @@ $out_dir = 'build'; $pdf_mode = 1; -$pdflatex = 'pdflatex -interaction=nonstopmode -shell-escape'; +$pdflatex = 'xelatex -interaction=nonstopmode -shell-escape'; diff --git a/formalism/preamble/preamble.tex b/formalism/preamble/preamble.tex index 965347b..01afe38 100644 --- a/formalism/preamble/preamble.tex +++ b/formalism/preamble/preamble.tex @@ -1,16 +1,6 @@ \hbadness=99999 \usepackage{silence} -% font -\usepackage{iftex} -\ifPDFTeX - \usepackage{libertinust1math} - \usepackage{libertine} -\else - \usepackage{libertinus} -\fi -\usepackage[scaled=0.8]{FiraMono} - % geometry \usepackage[margin=1in]{geometry} @@ -26,6 +16,18 @@ \WarningFilter{latexfont}{Font shape `U/stmry/b/n' undefined} \WarningFilter{latexfont}{Some font shapes were not available} +% font +\usepackage{iftex} +\ifPDFTeX + \usepackage{libertinust1math} + \usepackage{libertine} +\else + \expandafter\def\csname ver@unicode-math.sty\endcsname{} + \usepackage[nomath]{libertinus} + \usepackage{libertinust1math} +\fi +\usepackage[scaled=0.8]{FiraMono} + \usepackage{bm} \usepackage{relsize} \usepackage{centernot}