Support \tag, \tag*, and \gdef (#1309)

* Tag sketch

* Drop objectAssign; already using Object.assign elsewhere

* Basic \gdef support

* Bug fix

* Finish \tag

* MathML numbers equations with <mlabeledtr>

* Fix flow bugs

* \gdef tests

* Add basic \tag tests

* Screenshot test for \tag

* \tag* test

* Add missing file

* Bug fix screenshot

* Major refactor

* Represent tag at top level of parse tree, requiring less hackery
  * No more \@tag function; it was essentially just doing \text
* Wrap tag in group so e.g. ( and ) are formatted the same
* Add `feed` method to MacroExpander for multiple inputs (for tag)
* Bug fixes in buildHTML, makeTextRow, _getBuilt (for display mode)
* Remove excess <mrow> wrapper when unnecessary

* Update screenshot from tag being wrapped in group

* Add maxExpand limit
This commit is contained in:
Erik Demaine
2018-05-19 16:19:21 -04:00
committed by Kevin Barabash
parent 99b2afa935
commit a0ddad338e
19 changed files with 370 additions and 107 deletions

View File

@@ -332,6 +332,9 @@ SvgReset:
Symbols1: |
\maltese\degree\pounds\$
\text{\maltese\degree\pounds\textdollar}
Tag:
tex: \tag{$+$hi} \frac{x^2}{y}+x^{2^y}
display: 1
Text: \frac{a}{b}\text{c~ {ab} \ e}+fg
TextSpace:
\begin{array}{l}