mathjax / mathjax/MathJax

make ams equation numbering more robust when `labels` object already contain tag

Open
#1,705 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Investigate
Dominant language
JavaScript
Stars
10.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm using math-jax dynamically and manually resets the equation numbers when I render each line.

I noticed that the ams package fails silently when the labels object already contains a key that the rerendered block has.

I need the labels object to contain all past objects so that my equation referencing can work. Would it be possible to add an option to make the amsmath package more robust in this case?

I have thought about it and this seems to be the best solution.

Thanks in advance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a file, test, or entry point. Start by tracing amsmath handling of the labels object during dynamic rerendering, then define how duplicate tags should be handled without failing silently while preserving earlier labels; done means the requested option works for repeated labels and equation references remain usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, latex
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.