feat: \nonumber/\notag support, \tag per row of {align} (#2952)

* feat: \nonumber and \notag support

Support `\nonumber` (and equivalent `\notag`) using a global macro
`\@eqnsw` to track whether one occurs in each row, similar to how
amsmath uses global `\@eqnswtrue`/`\@eqnswfalse`.

Fix #2950

* Remove duplicate mention of align*

* Working version of \tag within {align}

* Simpler subparse mechanism

* Fix flow errors, clarifying set-to-undefined

* Document that \tag works in rows

* Add screenshot tests

* Add Jest tests

* Add Safari screenshot

* Commit message about fixing \tag

Fixes #2379

* Apply suggestions from code review

Co-authored-by: ylemkimon <y@ylem.kim>

* Revise and move getAutoTag

* Fix handling of split

* Remove unnecessary feedTokens

Co-authored-by: ylemkimon <y@ylem.kim>

Co-authored-by: ylemkimon <y@ylem.kim>
This commit is contained in:
Erik Demaine
2021-10-31 17:40:06 -04:00
committed by GitHub
parent a59135fd77
commit 52c4778b15
12 changed files with 131 additions and 29 deletions

View File

@@ -748,10 +748,11 @@ use `\ce` instead|
|\nobreakspace|$a\nobreakspace b$|`a\nobreakspace b`|
|\noexpand|||
|\nolimits|$\lim\nolimits_x$|`\lim\nolimits_x`|
|\nonumber|$$\begin{align}a&=b+c\nonumber\\d+e&=f\end{align}$$|`\begin{align}`<br>&nbsp;&nbsp;&nbsp;`a&=b+c \nonumber\\`<br>&nbsp;&nbsp;&nbsp;`d+e&=f`<br>`\end{align}`|
|\normalfont|<span style="color:firebrick;">Not supported</span>||
|\normalsize|$\normalsize normalsize$|`\normalsize normalsize`|
|\not|$\not =$|`\not =`|
|\notag|<span style="color:firebrick;">Not supported</span>||
|\notag|$$\begin{align}a&=b+c\notag\\d+e&=f\end{align}$$|`\begin{align}`<br>&nbsp;&nbsp;&nbsp;`a&=b+c \notag\\`<br>&nbsp;&nbsp;&nbsp;`d+e&=f`<br>`\end{align}`|
|\notin|$\notin$||
|\notni|$\notni$||
|\nparallel|$\nparallel$||