fix(mlsysim/tutorial): switch from texgyreheros to Latin Modern Sans/Mono

After three rounds of trying to get texgyreheros to resolve on the
Ubuntu mlsysim-build-pdfs runner (explicit `tex-gyre` apt install,
explicit `mktexlsr` post-install, 40-min job timeout), xelatex still
errored with 'The font texgyreheros-regular cannot be found'. The .otf
files were present on disk but invisible to kpsewhich; the slides-build
workflow with the same package set somehow finds them, the mlsysim
workflow doesn't, and that environmental delta is opaque after several
diagnostic passes.

Switch the tutorial decks to Latin Modern Sans / Mono via file-pattern
lookup against the `lm` family (lmsans10, lmmono10). These ship in
the `lmodern` apt package which is a hard Depends already installed
in the workflow and which the Mac TeX Live install also has — both
environments resolve cleanly.

Visual cost: tutorial decks now use Latin Modern instead of a Helvetica
clone — slightly more 'TeX-looking' than the chapter decks, but
internally consistent and pixel-stable across macOS and Ubuntu. Local
Mac build verified: 47-page PDFs, fonts embedded as LMSans10 +
LMMono10.

Strategic note: the chapter decks still use texgyreheros and work on
their own runner. We could unify both onto Latin Modern in a follow-up,
or unify both onto texgyreheros once the package-resolution mystery
is understood — see proposed composite `setup-texlive` action.
This commit is contained in:
Vijay Janapa Reddi
2026-05-12 11:02:35 -04:00
parent 2a7f9c900e
commit 6678b7abca
2 changed files with 28 additions and 24 deletions
+14 -12
View File
@@ -13,26 +13,28 @@
}
% --- Fonts ---
% Matches the canonical lecture-deck pattern (slides/vol1/01_introduction).
% texgyreheros/texgyrecursor live in the Ubuntu `tex-gyre` apt package
% (NOT pulled in by texlive-fonts-extra automatically — it's only a
% suggested dep, which --no-install-recommends skips). The
% mlsysim-build-pdfs workflow explicitly installs `tex-gyre` so the
% xelatex kpsewhich lookup finds these .otf files on Ubuntu CI.
% Latin Modern Sans / Mono — TeX Live's default family, shipped in the
% texlive-base Depends chain. No separate package install required,
% no kpsewhich/mktexlsr/--no-install-recommends games, no dpkg trigger
% lottery. The chapter-deck pattern uses texgyreheros (Helvetica clone)
% which lives in Ubuntu's `tex-gyre` Suggests package and was
% intermittently invisible to xelatex on the mlsysim CI runner even
% after explicit install + mktexlsr. Latin Modern is visually distinct
% from the Helvetica family — slightly more "TeX-looking" — but the
% trade-off (slight typographic drift from lecture decks) is preferable
% to a brittle Helvetica chain that breaks the publish pipeline.
\usepackage{fontspec}
\setsansfont{texgyreheros}[
\setsansfont{lmsans10}[
Extension=.otf,
UprightFont=*-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic,
ItalicFont=*-oblique,
BoldItalicFont=*-boldoblique,
]
\setmonofont{texgyrecursor}[
\setmonofont{lmmono10}[
Extension=.otf,
UprightFont=*-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic,
Scale=0.85,
]
+14 -12
View File
@@ -13,26 +13,28 @@
}
% --- Fonts ---
% Matches the canonical lecture-deck pattern (slides/vol1/01_introduction).
% texgyreheros/texgyrecursor live in the Ubuntu `tex-gyre` apt package
% (NOT pulled in by texlive-fonts-extra automatically — it's only a
% suggested dep, which --no-install-recommends skips). The
% mlsysim-build-pdfs workflow explicitly installs `tex-gyre` so the
% xelatex kpsewhich lookup finds these .otf files on Ubuntu CI.
% Latin Modern Sans / Mono — TeX Live's default family, shipped in the
% texlive-base Depends chain. No separate package install required,
% no kpsewhich/mktexlsr/--no-install-recommends games, no dpkg trigger
% lottery. The chapter-deck pattern uses texgyreheros (Helvetica clone)
% which lives in Ubuntu's `tex-gyre` Suggests package and was
% intermittently invisible to xelatex on the mlsysim CI runner even
% after explicit install + mktexlsr. Latin Modern is visually distinct
% from the Helvetica family — slightly more "TeX-looking" — but the
% trade-off (slight typographic drift from lecture decks) is preferable
% to a brittle Helvetica chain that breaks the publish pipeline.
\usepackage{fontspec}
\setsansfont{texgyreheros}[
\setsansfont{lmsans10}[
Extension=.otf,
UprightFont=*-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic,
ItalicFont=*-oblique,
BoldItalicFont=*-boldoblique,
]
\setmonofont{texgyrecursor}[
\setmonofont{lmmono10}[
Extension=.otf,
UprightFont=*-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic,
Scale=0.85,
]