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
Now you can stack some font commands to combine them. For example, if you want bold italic A you can write bf it A. Not all font commands stack though e.g. fr bb will not give you double-struck fraktur.
Output Changes
With the exception of mathvariant="normal" we no longer use the mathvariant attribute. Instead we apply the relevant text transform directly and the unicode characters in the output (see #70).
Text gets some font commands applied via CSS (see #78). Specifically this is bf, it, sf and tt 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
Font commands now only applies to the first item in a term, previously it was applied on the entire term (see #77). bf A_(i j) would previously also boldface the indices (i j), but now it only boldfaces the matrix A.
Font commands will no longer unwrap fences around the operant. For example if you write bf(A) previously the parenteses would be stripped, and you would only end up with A. Now the parenteses are left as is.
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 #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