mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
feat(macro): improve argument parsing (#2085)
* Improve macro argument parsing
* Make \above a primitive command
* Fix screenshotter data
* Normalize argument where necessary
* Improve argument location info
* Update comments
* Minor refactor
* Modularize group parsers
* Allow braced and blank size argument
for non-strict mode and \genfrac, respectively.
* Minor refactor & update comments
* Remove raw option in parseStringGroup
* Update tests
* Fix { delimited parameter
* Update tests
* Update tests
* Normalize argument in \genfrac
* Update tests
* Consume space before scanning an optional argument
* Fix \\, \newline, and \cr behavior
* Fix flow error
* Update comments
* Remove unnecessary mode switching
Parser mode affects neither fetch nor consume.
* Allow single (active) character macro
* Add function property `primitive`
* Set \mathchoice and \*style primitive
* Separate size-related improvements out to #2139
* Fix flow error
* Update screenshots
* Update demo example
* Add a migration guide
* Fix capitalization
* Make a primitive function unexpandable
* Update screenshots
* Update screenshots
* Revert "Document \def doesn't support delimiters (#2288) (#2289)"
This reverts commit f96fba6f7f
.
* Update comments, errors, and tests
* Update screenshots
This commit is contained in:
@@ -62,9 +62,9 @@
|
||||
</a>
|
||||
</div>
|
||||
<textarea id="demo-input" spellcheck="false">
|
||||
% \f is defined as f(#1) using the macro
|
||||
\f{x} = \int_{-\infty}^\infty
|
||||
\hat \f\xi\,e^{2 \pi i \xi x}
|
||||
% \f is defined as #1f(#2) using the macro
|
||||
\f\relax{x} = \int_{-\infty}^\infty
|
||||
\f\hat\xi,e^{2 \pi i \xi x}
|
||||
\,d\xi</textarea>
|
||||
</div>
|
||||
<div class="demo-right">
|
||||
@@ -181,7 +181,7 @@
|
||||
<h4><label for="macros">macros</label></h4>
|
||||
<textarea id="macros" placeholder="JSON">
|
||||
{
|
||||
"\\f": "f(#1)"
|
||||
"\\f": "#1f(#2)"
|
||||
}</textarea>
|
||||
|
||||
<h3>Editor Options</h3>
|
||||
|
@@ -3,6 +3,6 @@
|
||||
"Installation": ["node", "browser"],
|
||||
"Usage": ["api", "cli", "autorender", "libs"],
|
||||
"Configuring KaTeX": ["options", "security", "error", "font"],
|
||||
"Misc": ["supported", "support_table", "issues"]
|
||||
"Misc": ["supported", "support_table", "issues", "migration"]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user