Commit 6d5731b
fix(writeup): sanitize abstract before render_tex
The abstract string on the Paper dataclass comes straight from
idea.get("Abstract") (produced by the ideation step), not from the
per-section LLM pass, so it bypassed the SANITIZE_PIPELINE entirely.
Real-world demo run hit "Missing $ inserted" on the very first
pdflatex pass because ideas.json contained "perplexity_gap" — an
underscore LaTeX tries to open a subscript with.
Running _sanitize_latex on the abstract covers the same failure modes
as every other text block (underscore escape, orphan $, prose
specials, reasoning-tag leakage, etc.) for ~zero cost.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 3902ca3 commit 6d5731b
2 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
416 | 423 | | |
417 | 424 | | |
418 | | - | |
| 425 | + | |
419 | 426 | | |
420 | 427 | | |
421 | 428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
64 | 80 | | |
65 | 81 | | |
66 | 82 | | |
| |||
0 commit comments