docs: Explain how to make macros persist. (#2702)

* docs: Explain how make macros persist.

* Revise per comments.

* Pick up comments.
This commit is contained in:
Ron Kok
2020-12-27 12:34:20 -08:00
committed by GitHub
parent 75a3af9725
commit 26ed77f598
2 changed files with 25 additions and 1 deletions

View File

@@ -332,7 +332,9 @@ Macros can also be defined in the KaTeX [rendering options](options.md).
Macros accept up to nine arguments: #1, #2, etc.
`\gdef`, `\xdef`, `\global\def`, `\global\edef`, `\global\let`, and `\global\futurelet` will persist between math expressions.
<div id="gdef"></div>
Macros defined by `\gdef`, `\xdef`, `\global\def`, `\global\edef`, `\global\let`, and `\global\futurelet` will persist between math expressions. (Exception: macro persistence may be disabled. There are legitimate security reasons for that.)
KaTeX has no `\par`, so all macros are long by default and `\long` will be ignored.