Implement command tokens and handlers in parser #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For now only font commands are commands, previously these were styles and implemented along with other prefixes. Now commands will become new binary prefix nodes in the AST which can apply special commands on the nodes below. For fonts this means to some text transforms or add style attributes. In the future we might implement color #40 and align #39 with command tokens.
Language Changes
bf it A
. Not all font commands stack though e.g.fr bb
will not give you double-struck fraktur.Output Changes
mathvariant="normal"
we no longer use themathvariant
attribute. Instead we apply the relevant text transform directly and the unicode characters in the output (see mathvariant is mostly depricated #70).bf
,it
,sf
andtt
on texts (e.g.bf tt "text"
). The latter two change the font-family of the output. If you want control of sans-serif and monospace fonts in the output you can set the CSS custom properties--mathup-font-family-sans-serif
and--mathup-font-family-monospace
respectively.Breaking Changes
bf A_(i j)
would previously also boldface the indices (i j), but now it only boldfaces the matrix A.bf(A)
previously the parenteses would be stripped, and you would only end up with A. Now the parenteses are left as is.Resolves: #70
Resolves: #77
Resolves: #78