[PR #1500] [MERGED] fix(book/vol2): escape LaTeX underscore bug in inference index entries #18945

Closed
opened 2026-05-28 22:31:44 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1500
Author: @profvjreddi
Created: 4/22/2026
Status: Merged
Merged: 4/22/2026
Merged by: @profvjreddi

Base: devHead: fix/book-vol2-latex-underscore


📝 Commits (1)

  • f4dcccf fix(book/vol2): escape LaTeX underscore bug in inference index entries

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 book/quarto/contents/vol2/inference/inference.qmd (+3 -3)

📄 Description

Summary

Fixes the current failing Book Validate (Dev) workflow (Vol II PDF Linux build).

LuaLaTeX fails on \item Batching_timeout_ms in the generated index, because underscores in \index{} keys are treated as subscript in math mode. The Linux PDF pipeline surfaces this; Windows doesn't trip the same path.

Root cause (line 1909-1911 of book/quarto/contents/vol2/inference/inference.qmd):

\index{Max_batch_size}
\index{Batching_timeout_ms}
\index{Preferred_batch_size}

Fix: move to lowercase subentries under the existing Batching main entry, per .claude/rules/index.md (Title Case main, lowercase subentries, plain text in keys — no reserved LaTeX chars):

\index{Batching!max batch size}
\index{Batching!timeout parameter}
\index{Batching!preferred batch size}

This also consolidates three orphan entries under the already-used Batching entry for better index navigation.

Test plan

  • Pre-commit hooks pass locally (51 hooks, all green)
  • grep -rn '\\index{[A-Za-z][A-Za-z0-9]*_[A-Za-z]' book/quarto/contents returns zero matches (no other underscore-in-index entries remain book-wide)
  • Book Validate (Dev) workflow succeeds on this PR

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1500 **Author:** [@profvjreddi](https://github.com/profvjreddi) **Created:** 4/22/2026 **Status:** ✅ Merged **Merged:** 4/22/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `fix/book-vol2-latex-underscore` --- ### 📝 Commits (1) - [`f4dcccf`](https://github.com/harvard-edge/cs249r_book/commit/f4dcccfa51824b328247403765b4bcc85cd6ccea) fix(book/vol2): escape LaTeX underscore bug in inference index entries ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `book/quarto/contents/vol2/inference/inference.qmd` (+3 -3) </details> ### 📄 Description ## Summary Fixes the current failing Book Validate (Dev) workflow (Vol II PDF Linux build). LuaLaTeX fails on `\item Batching_timeout_ms` in the generated index, because underscores in `\index{}` keys are treated as subscript in math mode. The Linux PDF pipeline surfaces this; Windows doesn't trip the same path. **Root cause** (line 1909-1911 of `book/quarto/contents/vol2/inference/inference.qmd`): ``` \index{Max_batch_size} \index{Batching_timeout_ms} \index{Preferred_batch_size} ``` **Fix**: move to lowercase subentries under the existing `Batching` main entry, per `.claude/rules/index.md` (Title Case main, lowercase subentries, plain text in keys — no reserved LaTeX chars): ``` \index{Batching!max batch size} \index{Batching!timeout parameter} \index{Batching!preferred batch size} ``` This also consolidates three orphan entries under the already-used `Batching` entry for better index navigation. ## Test plan - [x] Pre-commit hooks pass locally (51 hooks, all green) - [x] `grep -rn '\\index{[A-Za-z][A-Za-z0-9]*_[A-Za-z]' book/quarto/contents` returns zero matches (no other underscore-in-index entries remain book-wide) - [ ] Book Validate (Dev) workflow succeeds on this PR --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-28 22:31:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#18945