Skip to content

docs+test(epub): document EPUB math-to-speech (#1355) and harden its tests - #1369

Merged
accesswatch merged 1 commit into
mainfrom
docs/epub-math-speech-followup
Aug 9, 2026
Merged

docs+test(epub): document EPUB math-to-speech (#1355) and harden its tests#1369
accesswatch merged 1 commit into
mainfrom
docs/epub-math-speech-followup

Conversation

@accesswatch

Copy link
Copy Markdown
Contributor

Follow-up to #1355 (EPUB MathML/LaTeX → speech), which I reviewed and merged.

Review finding: brittle tests (fixed here)

The three new math tests asserted exact spoken phrasing, which depends on the installed math backend. They pass in CI (which hits the template fallback) but fail wherever MathCAT is installed — e.g. a full local install renders a²+b²=c² as "eigh squared plus b squared, is equal to c squared" and ½ as "1 half", not the template's "…equals…" / "the fraction 1 over 2". This PR rewrites them to assert the stable [Math Equation: …] marker and a non-empty rendering (via a small _math_equations helper), so they pass with or without MathCAT and don't pin to one engine's words. Verified locally (MathCAT present) and structurally CI-safe.

The feature code itself is sound — correct MathCAT→template→raw fallback, lazy imports, no impact on non-math books — so it stands as merged.

Documentation (all four surfaces)

HTML/EPUB regenerated for the three docs under docs/; parity gate passes; the epub tests pass locally and lint is clean.

🤖 Generated with Claude Code

…tests

Follow-up to #1355 (EPUB MathML/LaTeX -> speech).

Tests: the three new epub math tests asserted exact spoken phrasing, which
depends on the installed backend — they pass in CI (template fallback) but fail
wherever MathCAT is installed (e.g. a full local install), which renders the
same equations differently ("1 half" vs "the fraction 1 over 2"). Rewrite them
to assert the stable `[Math Equation: ...]` marker and a non-empty rendering
rather than any one engine's words, so they pass with or without MathCAT.

Docs: document the feature across all four surfaces —
- PRD §5.94 (Math in QUILL): a paragraph on EPUB extraction detecting MathML +
  LaTeX and reading it via speech.speak() with graceful fallback.
- User guide (EPUB Navigator): equations in e-books are spoken, not skipped.
- CHANGELOG (1.0.0 New) and release notes (Equations section).
HTML/EPUB artifacts regenerated for the three docs under docs/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@accesswatch
accesswatch merged commit 23c38b8 into main Aug 9, 2026
14 checks passed
@accesswatch
accesswatch deleted the docs/epub-math-speech-followup branch August 9, 2026 18:04
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