Skip to content

v0.7.0

Choose a tag to compare

@moeakwak moeakwak released this 26 Sep 06:01
· 78 commits to main since this release
21aff1b

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 new AlignmentTab node in SyntaxNode, Node, and NodeKind, and Char('&') always means a literal ampersand. Code that matched or built Char('&') for an alignment tab should use AlignmentTab, and exhaustive matches need the new variant. Document::create_alignment_tab stages one (create_alignment_tab in Python, createAlignmentTab in 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_argument guard and its report field are removed from Rust, Python, and JavaScript.
  • The default packages are now base, ams, braket, textmacros, bboldx, and boldsymbol; physics must be loaded explicitly.

Fixed

  • Normalizing the output of normalize again 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, and Paired arguments 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 as a \& b or \mathrm{\&}, is serialized as \& instead of a bare & that became a column separator inside matrix or align. All profiles were affected, including plain parse and serialize.