-
-
Notifications
You must be signed in to change notification settings - Fork 189
TeX macros
Giorgio Garofalo edited this page Apr 5, 2025
·
1 revision
When writing TeX formulas, it may come in handy to have access to user-defined macros.
The .texmacro {name} {content}
function defines a new macro which can be used in math elements.
.texmacro {\gradient} {\nabla}
$ \gradient f $
As with every Quarkdown function, the last argument can be used as a block argument.
.texmacro {\gradient}
\nabla

Macros can feature a variable number of parameters:
.texmacro {\sumlim}
\sum_{#1}^{#2}
$ \sumlim{i=1}{n} a_i $

Multiple macros can be defined and can be combined, as you would do in LaTeX:
.texmacro {\hello}
\text {Hello, \textit {world}}
.texmacro {\highlight}
\colorbox{yellow}{#1}
$ \highlight{\hello} $
And also composed with other macros:
.texmacro {\hello}
\text {Hello, \textit {world}}
.texmacro {\highlighthello}
\colorbox{yellow}{\hello}
$ \highlighthello $

- Figures
- Image size
- TeX formulas
- Table caption
- Decorative headings
- Alerts (quote types)
- Quotation source
- Page breaks
- Text symbols (text replacement)
- Syntax of a function call
- Declaring functions
- Dynamic typing
- Including other Quarkdown files
- Importing external libraries
- Localization
- Document metadata
- Theme
- CSS
- Fonts
- Page format
- Page margin content
- Page counter
- Automatic page break
- Numbering
- Paragraph style
- Caption position
- Table of contents
- Bibliography
- Stacks (row, column, grid)
- Container
- Align
- Float
- Figure
- Clip
- Box
- Collapsible
- Whitespace
- Variables
- Optionality
- Math
- Conditional statements
- Loops
- Let
- Destructuring
- String manipulation
- Table manipulation: sorting, computing, and more
- Generators
- String
- Number
- Markdown content
- Boolean
- None
- Enumeration entry
- Iterable
- Dictionary
- Range
- Lambda
- Size(s)
- Color
- Dynamic
- Paper: abstract, definitions, theorems, and more