MyST-Parser icon indicating copy to clipboard operation
MyST-Parser copied to clipboard

Add `:tag:` Option for Custom Equation Numbering in `{math}` Directives

Open mscharling opened this issue 2 months ago • 1 comments

Describe the feature you'd like to request

I am proposing the addition of a :tag: option for the {math} directive. Currently, equations can only be labeled for referencing within the document using :label:, and they automatically receive a numeric identifier. It would be beneficial, especially when covering properties of some specific math area, to allow custom tags for equations using a :tag: option.

Describe the solution you'd like

Enable the use of a :tag: option within {math} blocks to specify custom equation numbers directly in the text, allowing for alphanumeric identifiers like "A1", "B2", etc. This feature would help maintain consistency in mathematical notation, especially in texts transitioning from traditional LaTeX environments or requiring specific identification schemes for equations.

Describe alternatives you've considered

I have considered using the LaTeX \tag{} command within double-dollar environments as an alternative to address custom equation tagging needs: $$\frac{a}{b} \pm \frac{c}{d} = \frac{ad \pm bc}{bd} \tag{B1}$$ While this method allows for custom tags within equations, it introduces inconsistencies in font style between the equation content and the tag. The tag rendered by \tag{} often does not match the main document font when refering, leading to a disjointed visual appearance.

mscharling avatar May 01 '24 22:05 mscharling

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar May 01 '24 22:05 welcome[bot]