Repository navigation
v0.7.0
This release makes normalized output reparse to the same tree, so normalizing it again no longer changes it, and stops math-mode \& from turning into an alignment tab. Both fixes change the tree shape; see Changed for migration notes.
Changed
- Breaking: A bare
&now parses as a newAlignmentTabnode inSyntaxNode,Node, andNodeKind, andChar('&')always means a literal ampersand. Code that matched or builtChar('&')for an alignment tab should useAlignmentTab, and exhaustive matches need the new variant.Document::create_alignment_tabstages one (create_alignment_tabin Python,createAlignmentTabin JavaScript); node kinds report"AlignmentTab"in Python and"alignmentTab"in JavaScript. - Breaking: A command argument whose content is a single brace group now parses to an implicit container around that group, so a brace group directly in any slot owns that slot's braces. FlattenGroups always unwraps redundant user braces in argument slots, and the
command_argumentguard and its report field are removed from Rust, Python, and JavaScript. - The default packages are now
base,ams,braket,textmacros,bboldx, andboldsymbol;physicsmust be loaded explicitly.
Fixed
- Normalizing the output of
normalizeagain no longer changes it. Argument braces around a single brace group are kept (\overline{{{\Psi}}},\mathrm{{}}), braces that protect a closing delimiter inside an optional argument are restored on output (\xrightarrow[{]}]{x}no longer becomes\xrightarrow [ ] ] { x }), and a lone\at a line end or input end is a control space, as in TeX. - Optional,
Delimited, andPairedarguments track brace depth, so protected content such as\qty[{]}]parses. - In text mode, whitespace after an argument-free control word is no longer content:
\text{\bf\large x}no longer normalizes to\textbf{ x}. - Math-mode
\&, such asa \& bor\mathrm{\&}, is serialized as\&instead of a bare&that became a column separator insidematrixoralign. All profiles were affected, including plain parse and serialize.