* 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>
Close all groups after parse, in particular in case of parse error,
completing `Namespace`'s simulation of local definitions.
Fixes#3122
Co-authored-by: ylemkimon <y@ylem.kim>
* \newcommand, \renewcommand, \providecommand
* Tests
* Add comment
* Add symbols to the set of already defined things
* Add implicitCommands, catch \hline outside array
* Add \relax
* Move isDefined to be a method of MacroExpander
* Namespace.has
* Reword error messages
* Add \hdashline given #1407
* Nested environments of macro definitions
* Rename environment -> namespace
* \def support
* Clean up \df@tag at beginning
* \global\def support
* Fix \global via new setMacro helper
* Fix caching behavior and build array on top of it
Also avoid double lookup of macros
* Add tests
* Add argument tests
* Remove global pointer
* Note about macros object being modified
* add __defineMacro
* Add \global\def test
* More \global tests
* Constant-time lookup
Rewrite to use an "undo" stack similar to TeX, so get and set are
constant-time operations. get() still has to check two objects: one with all
current settings, and then the built-ins. Local set() sets the current value
and (when appropriate) adds an undo operation to the undo stack. Global set()
still takes time linear in the number of groups, possibly changing the undo
operation at every level.
`Namespace` now refers to a space of things like macros or lengths.
* Add \def to-dos
* Put optional arguments in their own group
* Rename `pushNamespace` -> `beginGroup`
* Wrap each expression in a group namespace
* Add comments