mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-11 22:18:41 +00:00
Builtin macros, macro arguments, overset and underset
* Ship predefined macros with the library, in macros.js. * Allow macro arguments #1 and so on, with argument count deduced from string. * Use these features to implement \overset and \underset, fixes #484.
This commit is contained in:
15
src/macros.js
Normal file
15
src/macros.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Predefined macros for KaTeX.
|
||||
* This can be used to define some commands in terms of others.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// amsmath.sty
|
||||
|
||||
// \def\overset#1#2{\binrel@{#2}\binrel@@{\mathop{\kern\z@#2}\limits^{#1}}}
|
||||
"\\overset": "\\mathop{#2}\\limits^{#1}",
|
||||
"\\underset": "\\mathop{#2}\\limits_{#1}",
|
||||
|
||||
};
|
Reference in New Issue
Block a user