Feature #42605
openEnable commonmark math support using the math_latex extension
Description
commonmarker gem (#44352) introduce a new math_latex extension. This extension natively supports standard LaTeX-style delimiters instead of dollar signs:
- Inline math:
\(...\) - Display/block math:
\[...\]
I propose we enable math_latex: true in CommonMark formatter configuration in favour of dollar delimiter.
Files
Updated by Marius BĂLTEANU 18 days ago
- Subject changed from Enable commonmark math extension to Enable commonmark math support using the math_latex extension
- Description updated (diff)
- Category set to Text formatting
- Assignee set to Marius BĂLTEANU
- Target version set to Candidate for next major release
Updated by Marius BĂLTEANU 18 days ago
- File Screenshot 2026-08-20 at 09.08.41.png Screenshot 2026-08-20 at 09.08.41.png added
- File Screenshot 2026-08-20 at 08.55.16.png Screenshot 2026-08-20 at 08.55.16.png added
To support mathematical expressions (math syntax) in CommonMark, the commonmarker gem provides three extension options:
1. math_dollars: Uses `$` and `$$` delimiters for inline and display math.
2. math_code: Uses code block syntax ( ```math ) for display math.
3. math_latex: Uses standard LaTeX delimiters (\( ... \) for inline math and \[ ... \] for display math.
From my understanding, using math_latex eliminates the risk of currency collisions (where typing values like $10 or $20 accidentally triggers math rendering) while still supporting both inline and block equations cleanly.
I've attached two screenshots with simple math syntax rendered.