mathlive icon indicating copy to clipboard operation
mathlive copied to clipboard

[FEATURE] Equation numbering: align vs align*

Open kelvinsjk opened this issue 4 years ago • 2 comments

Description

Both the align and align* environments when rendering static math seem to produce the same result without equation numberings. Is that a supported feature for mathlive?

Codepen example: https://codepen.io/kelvin-soh/pen/OJpxjdN

Steps to Reproduce

  1. Render the align environment (using either renderMathInDocument or convertMathToLatex)
  2. Render the align* environment (using either renderMathInDocument or convertMathToLatex)

Actual Behavior

Both show the aligned equations without equation numbering

Expected Behavior

The align environment should include equation numbers while the align* environment does not

Environment

MathLive version 0.67.0

Operating System Windows 10 and Ubuntu

Browser Chrome and Opera

kelvinsjk avatar May 28 '21 15:05 kelvinsjk

Equation numbering is currently not supported. I could see it making sense particularly when using static math (or read-only mathfields). One question though would be how should the counter work. Starting from 1 and incrementing by the order in which the (numbered) equations are encountered in the document?

arnog avatar May 28 '21 15:05 arnog

I think that's how it's currently implemented in KaTeX (based on the order they are encountered in the document,, using a css-based counter). It's often useful the first few times they're called, but at the first instance it doesn't work I recall having to manually update each individual equation number thereafter with their implementation of the tag command.

It seems a javascript based counter is one of the "Version 1.0 milestones" for that project.

kelvinsjk avatar May 28 '21 16:05 kelvinsjk