feat(parser): add \mathord, \mathrel, \mathbin, \mathop, \mathopen, \mathclose, \mathpunct, \mathinner
This PR implements the `amsmath` atom-type commands which set the math class of their argument.
For single-character arguments, it emits the corresponding `Content` variant (`Ordinary`, `BinaryOp`, `Relation`, `Delimiter`, `Open`/`Close`, `Punctuation`, or `LargeOp` for `\mathop`), so spacing in the generated MathML matches the TeXbook (p. 153 & p. 170).
For multi-character `\mathop` arguments, it emits a `Function` event so they render like `\operatorname{foo}`. For other classes with multi-token arguments, the parsed content is wrapped in a normal group; the surrounding spacing then follows the `Inner` atom class, which matches `\mathinner` and is a reasonable fallback elsewhere.
合并状态:未合并 1 条评论