Files
Vijay Janapa Reddi d07cf72528 refactor: migrate slides + mlsysim tutorial from xelatex to pdflatex
Switches 35 chapter decks (slides/vol1 + slides/vol2) and 2 mlsysim
tutorial decks (mlsysim/tutorial/slides/tutorial_part{1,2}.tex) from
xelatex+fontspec+texgyreheros to pdflatex+helvet+courier.

Why
---
Yesterday's slides-publish-live shipped PDFs with completely blank text
(see https://github.com/harvard-edge/cs249r_book/releases/download/
slides-latest/vol1_00_course_overview.pdf — Liberation Sans was
embedded but glyphs were missing because xelatex on Ubuntu CI could
not find texgyreheros.otf and silently fell back). The mlsysim
tutorial decks fared no better, requiring four rounds of fixes
(Helvetica Neue → texgyreheros → tex-gyre apt + mktexlsr → Latin
Modern) before they would even compile.

The root cause is engine choice: fontspec on xelatex makes runtime
OS-font discovery the build's critical path. If the host TeX install
or fontconfig doesn't have the requested font, fontspec either errors
hard (mlsysim's experience) or silently substitutes (slides' silent
broken-PDF failure mode). Either way the build is fragile.

paper.tex has been using pdflatex+helvet+mathpazo+courier for months
without a single font issue. Bringing slides + mlsysim tutorial onto
the same engine + font convention eliminates the entire failure class.

Changes
-------
* 35 chapter decks: replace
    \usepackage{fontspec}
    \setsansfont{texgyreheros}[Extension=.otf, ...]
    \setmonofont{texgyrecursor}[Extension=.otf, ...]
  with
    \usepackage[T1]{fontenc}
    \usepackage[scaled=0.9]{helvet}
    \usepackage{courier}
    \renewcommand{\familydefault}{\sfdefault}
  Same Helvetica-class look (NimbusSans = URW's Helvetica clone in
  helvet), shipped via texlive-fonts-recommended Depends.

* 2 mlsysim tutorial decks: same swap (was Latin Modern from the prior
  retry).

* slides/Makefile: LATEX := xelatex → pdflatex.
* mlsysim/tutorial/Makefile: same.

* slides-build-pdfs.yml: drop texlive-xetex (engine), drop
  texlive-fonts-extra (was for tex-gyre). Result: smaller apt-install,
  no fontspec silent-fallback class of bugs.

* mlsysim-build-pdfs.yml: same engine + apt cleanup; drop JetBrains
  Mono manual fc-cache step (we no longer reference JetBrains Mono).

Bar copy
--------
* mlsysim/docs/config/announcement.yml: append Lecture Slides to the
  "Alongside the book" row — the mlsysim tutorial deliverable IS slides,
  so cross-linking is natural.

* site/config/announcement.yml: drop the "🎓 Teach with it: Lecture
  Slides · Instructor Hub" line entirely from the landing bar. Landing
  is for learners; teachers find Instructor Hub via the navbar Teach
  menu, and Slides via Instructor Hub.

Verification
------------
Local Mac builds with pdflatex:
  - vol1/01_introduction: 52 pages, NimbusSans-Regu/Bold embedded
  - vol2/05_distributed_training: 48 pages, NimbusSans embedded
  - mlsysim tutorial_part1: 90 pages, NimbusSans embedded
  - mlsysim tutorial_part2: 47 pages, NimbusSans embedded
All Type 1, sub-set, Unicode tag yes — renders cleanly.
2026-05-13 10:55:42 -04:00
..