mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-08-03 12:14:39 -05:00
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:
@@ -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,
|
||||
]
|
||||
|
||||
|
||||
@@ -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,
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user