mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
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:
@@ -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> `a&=b+c \nonumber\\`<br> `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> `a&=b+c \notag\\`<br> `d+e&=f`<br>`\end{align}`|
|
||||
|\notin|$\notin$||
|
||||
|\notni|$\notni$||
|
||||
|\nparallel|$\nparallel$||
|
||||
|
@@ -106,7 +106,7 @@ The auto-render extension will render the following environments even if they ar
|
||||
|:-----------------------------------------------|:------------------|
|
||||
| `darray`, `dcases`, `drcases` | … apply `displaystyle` |
|
||||
| `matrix*`, `pmatrix*`, `bmatrix*`<br>`Bmatrix*`, `vmatrix*`, `Vmatrix*` | … take an optional argument to set column<br>alignment, as in `\begin{matrix*}[r]`
|
||||
| `equation*`, `gather*`<br>`align*`, `alignat*` | … have no automatic numbering. |
|
||||
| `equation*`, `gather*`<br>`align*`, `alignat*` | … have no automatic numbering. Alternatively, you can use `\nonumber` or `\notag` to omit the numbering for a specific row of the equation. |
|
||||
| `gathered`, `aligned`, `alignedat` | … do not need to be in display mode.<br> … have no automatic numbering.<br> … must be inside math delimiters in<br>order to be rendered by the auto-render<br>extension. |
|
||||
|
||||
</div>
|
||||
@@ -117,7 +117,8 @@ The `{array}` environment supports `|` and `:` vertical separators.
|
||||
|
||||
The `{array}` environment does not yet support `\cline` or `\multicolumn`.
|
||||
|
||||
`\tag` can not yet be applied to individual environment rows.
|
||||
`\tag` can be applied to individual rows of top-level environments
|
||||
(`align`, `align*`, `alignat`, `alignat*`, `gather`, `gather*`).
|
||||
|
||||
<div class="katex-hopscotch">
|
||||
|
||||
|
Reference in New Issue
Block a user