mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-12 06:28:40 +00:00
Add support for \expandafter, \noexpand, \edef, \let, and \long (#2122)
* Add support for \expandafter * Add support for \noexpand * Add support for \edef * Update comments * Allow \long before macro definition * Update documentation * Update comments * Fix defPrefix * Add support for \let * Update documentation * Print error token * Update documentation * Check whether command is expandable * Add tests * Fix token order * Make noexpand a Token property * Throw error if control sequence is undefined when expanding * Rename expandableOnly to expandOnly * Make unexpandable macro property * Move \expandafter to macros.js * Add TODO * Fix merge conflict * Update a test case * Remove unused functions in MacroContextInterface * Update comments * Refactor code * Move \noexpand to macros * Update MacroExpander.js * Add a test case * Separate control sequence check to a function * Add support for \futurelet * Separate RHS getter to a function * Update documentation * Move expandOnly logic to expandOnce * Refactor code and update comments Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
This commit is contained in:
@@ -24,6 +24,9 @@ title: Common Issues
|
||||
behavior matches MathJax with its `color.js` extension enabled.
|
||||
- Equivalents of MathJax `\class`, `\cssId`, and `\style` are `\htmlClass`,
|
||||
`\htmlId`, and `\htmlStyle`, respectively, to avoid ambiguity.
|
||||
- Some symbols are defined using macro instead of `\DeclareMathSymbol` or similar
|
||||
as in LaTeX. This may cause different behavior in expansion. They may expand
|
||||
into multiple tokens and be affected by `\expandafter` and `\noexpand`.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
Reference in New Issue
Block a user