UNPKG

926 BMarkdownView Raw
1# Presentation
2
3TODO
4
5# Type configuration
6
7Every node type transformation to LaTeX can be customized thanks to the plugin configuration.
8
9Basically you have to give your custom function to translate the node and its content.
10
11Most of *macro* functions have this prototype : `(innerText) => str`
12
13Exceptions are :
14
15- `link.macro` : its prototype is `(displayedText, url, title) => str`, another parameter exists to autoprepend a customized domain to the url
16for 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
20Before rendering, we use a bunch of preparsers --actually MDAST visitors-- to ensure a latex-complient tree.