From 69655f37fc955cf53f23a6cc185967a1270b5302 Mon Sep 17 00:00:00 2001 From: TEC Date: Tue, 13 Sep 2022 18:38:44 +0800 Subject: [PATCH] Org: Add a LuaLaTeX check around Julia fontspec --- config.org | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config.org b/config.org index 86fc411..6a67403 100644 --- a/config.org +++ b/config.org @@ -9871,10 +9871,12 @@ this just as a fallback font (when it isn't a pain to do so). #+name: julia-mono-fontspec #+begin_src LaTeX -\\usepackage{fontspec} -\\newfontfamily\\JuliaMono{JuliaMono-Regular.ttf}[Path=/usr/share/fonts/truetype/, Extension=.ttf] -\\newfontface\\JuliaMonoRegular{JuliaMono-Regular} -\\setmonofont{JuliaMonoRegular}[Contextuals=Alternate, Scale=MatchLowercase] +\\ifcsname directlua\\endcsname + \\usepackage{fontspec} + \\newfontfamily\\JuliaMono{JuliaMono-Regular.ttf}[Path=/usr/share/fonts/truetype/, Extension=.ttf] + \\newfontface\\JuliaMonoRegular{JuliaMono-Regular} + \\setmonofont{JuliaMonoRegular}[Contextuals=Alternate, Scale=MatchLowercase] +\\fi #+end_src Now all that remains is to hook this into the preamble generation.