/
When writing TeX formulae, you may want to use custom macros.
The .texmacro {name} {content} docs ↗ function defines a new macro that can be used in equations.
.texmacro {\gradient} {\nabla}
$ \gradient f $As with every Quarkdown function, you can use the last argument as a block argument.
.texmacro {\gradient}
\nablaMacros can feature a variable number of parameters, which are referenced inside the macro content as #1, #2, and so on.
.texmacro {\sumlim}
\sum_{#1}^{#2}
$ \sumlim{i=1}{n} a_i $You can define multiple macros and combine them, as you would do in LaTeX:
.texmacro {\hello}
\text {Hello, \textit {world}}
.texmacro {\highlight}
\colorbox{blue}{#1}
$ \highlight{\hello} $You can also compose them on top of other macros:
.texmacro {\hello}
\text {Hello, \textit {world}}
.texmacro {\highlighthello}
\colorbox{blue}{\hello}
$ \highlighthello $