nml/readme.nml

87 lines
1.5 KiB
Text
Raw Normal View History

2024-07-19 11:57:09 +02:00
@html.page_title = NML -- Readme
@html.title = NML -- The nice markup languge!
@'html.css = style.css
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
@tex.main.fontsize = 9
@tex.main.preamble = \usepackage{xcolor} \\
\definecolor{__color1}{HTML}{d5d5d5} \\
\everymath{\color{__color1}\displaystyle}
@tex.main.block_prepend = \color{__color1}
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
# Paragraphs
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
Blank lines (or multiple `\\n`'s) create new paragraphs!
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
```Plain Text, Example
First paragraph :: first '\n'
:: second '\n'
Second paragraph
2024-04-10 12:42:24 +02:00
```
2024-07-19 11:57:09 +02:00
# Lists
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
Numbered lists `-`:
- first
- second
- third
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
Unnumbered lists `\*`:
* A
* B
* C
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
NML also supports list nesting of multiple kinds:
* first
* second
*- 2.1
*- 2.2
*-* even more nested
* third
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
# Style
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
NML supports markdown-based text styling:
* \*\*bold\*\* -> **bold**
* \*italic\* -> *italic*
* \__underline\__ -> __underline__
* \`emphasis\` -> `emphasis`
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
Some additionally supportd text styling
* \`\`inline code\`\` -> ``inline code``
* \`\`C, int main()\`\` -> ``C, int main()``
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
# Code
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
```[line_offset=64] C, Some C code
int main(int argc, char** argv)
{
return 0;
}
2024-04-10 12:42:24 +02:00
```
2024-07-19 11:57:09 +02:00
# Lua kernel
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
Simple kernel named `example`:
``Lua
@<example
function make_bold(text)
return "**" .. text .. "**"
end
>@
``
@<example
function make_bold(text)
return "**" .. text .. "**"
end
>@
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
Evaluating `!` from a kernel: `\%<![kernel] eval>\%`
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
* `\%<![example] make_bold("Hello, World!")>\%` → %<![example] make_bold("Hello, World!")>%
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
# Latex
2024-04-10 12:42:24 +02:00
2024-07-19 11:57:09 +02:00
# Support for inline maths:
* $\sum^{\infty}_{k=1} \frac{1}{k^2} = \frac{\pi^2}{6}$
* $n! = \int_0^\infty t^n e^{-t} \text{ d}t$