Org: Add a LuaLaTeX check around Julia fontspec

This commit is contained in:
TEC 2022-09-13 18:38:44 +08:00
parent 5eb173a3ee
commit 69655f37fc
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 6 additions and 4 deletions

View File

@ -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.