Skip to content

feat: Add annotation option to wrap output in <semantics> tags#801

Merged
tmke8 merged 1 commit intomainfrom
annotation
Feb 11, 2026
Merged

feat: Add annotation option to wrap output in <semantics> tags#801
tmke8 merged 1 commit intomainfrom
annotation

Conversation

@tmke8
Copy link
Copy Markdown
Owner

@tmke8 tmke8 commented Feb 11, 2026

When enabled, the MathML output is wrapped in <semantics> with an <annotation encoding="application/x-tex"> child containing the original LaTeX source. This is useful for accessibility and round-tripping LaTeX from MathML.

The option defaults to false and is available across all interfaces: Rust, Python, WASM, and CLI (via config file).

closes #509

When enabled, the MathML output is wrapped in `<semantics>` with an
`<annotation encoding="application/x-tex">` child containing the
original LaTeX source. This is useful for accessibility and
round-tripping LaTeX from MathML.

The option defaults to `false` and is available across all interfaces:
Rust, Python, WASM, and CLI (via config file).
@github-actions
Copy link
Copy Markdown

Wasm sizes:
Base branch: 117433 bytes
PR: 118162 bytes
Size diff: +729 bytes (0.62%)

@tmke8 tmke8 merged commit 477ca17 into main Feb 11, 2026
12 checks passed
@tmke8 tmke8 deleted the annotation branch February 11, 2026 11:27
@tmke8 tmke8 mentioned this pull request Feb 11, 2026
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.

Option to include the LaTeX code in a semantics tag

1 participant