Introduce defineMacro function
… as suggested by Erik Demaine, to future-proof the code.
This commit is contained in:
parent
7ec455083f
commit
96d1e6aea7
|
@ -3,13 +3,14 @@
|
|||
* This can be used to define some commands in terms of others.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
// This function might one day accept additional argument and do more things.
|
||||
function defineMacro(name, body) {
|
||||
module.exports[name] = body;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// amsmath.sty
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// 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}",
|
||||
|
||||
};
|
||||
// \def\overset#1#2{\binrel@{#2}\binrel@@{\mathop{\kern\z@#2}\limits^{#1}}}
|
||||
defineMacro("\\overset", "\\mathop{#2}\\limits^{#1}");
|
||||
defineMacro("\\underset", "\\mathop{#2}\\limits_{#1}");
|
||||
|
|
Loading…
Reference in New Issue
Block a user