typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 58 forks source link

[Feature] selective autonumbering of equations #4746

Closed jesuslop closed 2 years ago

jesuslop commented 2 years ago

If you take a look of professional maht papers, you realize that only the important equations are numbered explicitly, to be referenced later.

In Typora it looks to me that autonumbering is an all-or-nothing thing for equations. If I want to reference a small quantity of them, I can still manage by adding \tags with the numberings, but as equation cuantity increases with additions an deletions, the burden to maintain the tags turns that approach too cumbersome.

I would like to have custom counters, or the ability to fiddle with the javascript configuring MathJax in a update-resistant way, or whatever it takes to automatically number only singled-out equations. Than would give the app a more profesional polishment. Thanks for listening!

abnerlee commented 2 years ago

Maybe enable autonumbering and disable some via \nonumber may be one option?

I wonder how LaTeX support this, btw.

jesuslop commented 2 years ago

Maybe enable autonumbering and disable some via \nonumber may be one option?

I wonder how LaTeX support this, btw.

Thanks for the idea but that is more of a hack than a supported solution. A real solution wouldn't involve manual tweaking of pasted equations (I use MathPix "OCR" to import them in bunches) or fancy latex preambles (fancier than in bare latex, I mean)

chchen2021 commented 2 years ago

MathJax offers a way to do selective auto-numbering using the equation environment. Take a look at https://docs.mathjax.org/en/v3.2-latest/input/tex/eqnumbers.html

In my field, it is typical to have automatic numbering of all equations. However, it does not hurt for Typora to offer the existing option of auto-numbering for all plus the selective auto-numbering based on \begin{equation} ... \end{equation}. On iOS, iWriter Pro offers both options, and the flexibility is useful sometimes.

jesuslop commented 2 years ago

Problem is that I cannot configure Mathjax in any Typora supported way AFAIK. Javascript is sandboxed in raw HTML.

abnerlee commented 2 years ago

MathJax offers a way to do selective auto-numbering using the equation environment. Take a look at https://docs.mathjax.org/en/v3.2-latest/input/tex/eqnumbers.html

put into #5189 since it describe it better.