Project

General

Profile

Actions

Feature #42605

open

Enable commonmark math support using the math_latex extension

Added by Marius BĂLTEANU over 1 year ago. Updated 17 days ago.

Status:
New
Priority:
Normal
Category:
Text formatting
Resolution:

Description

The latest versions of the 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

Actions #1

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
Actions #2

Updated by Marius BĂLTEANU 18 days ago

  • Description updated (diff)
Actions #3

Updated by Marius BĂLTEANU 18 days ago

  • Description updated (diff)
Actions #4

Updated by Go MAEDA 18 days ago

I am not familiar with LaTeX, so I may be missing something obvious. Could you explain what problem this change is intended to solve?

Actions #5

Updated by Marius BĂLTEANU 18 days ago

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.

Actions #6

Updated by Go MAEDA 17 days ago

Thank you for the explanation. I understand that the goal is to add rendering of mathematical expressions to Redmine.

Actions

Also available in: Atom PDF