1 | # Presentation
|
2 |
|
3 | TODO
|
4 |
|
5 | # Type configuration
|
6 |
|
7 | Every node type transformation to LaTeX can be customized thanks to the plugin configuration.
|
8 |
|
9 | Basically you have to give your custom function to translate the node and its content.
|
10 |
|
11 | Most of *macro* functions have this prototype : `(innerText) => str`
|
12 |
|
13 | Exceptions are :
|
14 |
|
15 | - `link.macro` : its prototype is `(displayedText, url, title) => str`, another parameter exists to autoprepend a customized domain to the url
|
16 | for example, with `link.prefix = 'https://zestedesavoir.com'` every url starting with `/` will become `http://zestedesavoir.com{url}`.
|
17 | - `table` : as table is a complex one, the macro takes `(ctx, node) => str` where `ctx` are the rebber options and `node` the current mdast node
|
18 | - `list` : gets a second boolean argument wich defines if the list is ordered
|
19 |
|
20 | Before rendering, we use a bunch of preparsers --actually MDAST visitors-- to ensure a latex-complient tree.
|