Skip to content

Notebooks: escape prices in markdown, repair two eaten escapes, check both - #10

Merged
yamierick merged 1 commit into
mainfrom
notebooks/dollar-signs
Oct 27, 2026
Merged

yamierick merged 1 commit into
mainfrom
notebooks/dollar-signs

Conversation

@yamierick

Copy link
Copy Markdown
Contributor

Prices rendering as LaTeX. Colab and Jupyter pair unescaped $ signs as inline math. The ESM chat hit this in its own notebooks and flagged that this repo might have it too. It does: in notebook 13's last exercise, "$8.0/kt … $3.0" was already rendering as math. All eleven prices in markdown (notebooks 01, 04, 12, 13) are now written \$.

Two characters eaten by escapes. seed_simplex.py (PR #8) wrote \binom and \times where they became a backspace and a tab, so simplex_by_hand cell 9 showed garbage. Repaired in the seed and in the notebook.

Guards. check_notebooks.py gains two rules: no control character in any cell (and no tab in markdown), and no unescaped price in markdown. Both were watched to fail on the pre-fix notebooks, flagging every price and the corrupted cell, and to pass after.

Markdown-only edits, made identically in seed and notebook, so outputs are untouched. Locally, check_seeds, check_notebooks, ruff and pytest (215) are all clean.

Note: v1.0.0 still carries both problems, because Colab clones the tag. A v1.0.1 release would bump TAG and the 22 setup cells; that would be a separate PR.

🤖 Generated with Claude Code

… both

Colab and Jupyter pair unescaped dollar signs as inline LaTeX. Eleven prices
in markdown (notebooks 01, 04, 12, 13) are now written \$; in 13's last
exercise two of them on one line were already rendering as math. Raised by
the ESM chat, which found the same in its own notebooks.

seed_simplex.py had lost two characters to escapes: "\binom" became a
backspace + "inom" and "\times" a tab + "imes", so simplex_by_hand cell 9
showed garbage. Repaired in the seed and the notebook.

check_notebooks.py gains two rules: no control character in any cell (no tab
in markdown), and no unescaped price in markdown. Both were watched to fail
on the pre-fix notebooks (all five files, every price) and pass after.
Markdown-only edits, made identically in seed and notebook; outputs untouched.
check_seeds, check_notebooks, ruff and pytest (215) clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yamierick
yamierick merged commit e5ee153 into main Oct 27, 2026
2 checks passed
yamierick added a commit that referenced this pull request Oct 27, 2026
Release 1.0.1: notebooks clone the tag with the #10 fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant