Table of Content
1. Defining a custom style 🔗
1 | function undercustom_start(color) |
2 | nml.raw.push("inline", "<span style=\"border-bottom: 1px dashed " .. color .. "\">") |
3 | end |
4 | |
5 | function undercustom_end() |
6 | nml.raw.push("inline", "</span>") |
7 | end |
8 | |
9 | nml.custom_style.define_toggled("Undercustom Red", "~", function() undercustom_start("red") end, undercustom_end) |
10 | nml.custom_style.define_paired("Undercustom Green", "[|", "|]", function() undercustom_start("green") end, undercustom_end) |
11 | >% |
Results in the following:
~Dashed underline~
→ Dashed underline[|Dashed underline|]
→ Dashed underline
2. Limitations 🔗
- Custom styles cannot be removed and will be defined through the entire document
- Custom styles defined from lua must have their start and end functions in the main lua kernel.