Add compiled docs

This commit is contained in:
ef3d0c3e 2024-11-03 14:12:43 +01:00
parent 18d69b6d85
commit 1451ee26a4
20 changed files with 350 additions and 3 deletions

View file

@ -20,8 +20,7 @@ you need to install the `dot` program from [Graphviz](https://graphviz.org/).
## Lua kernels ## Lua kernels
To execute Lua kernels you need to install `liblua` version 5.4. NML statically compiles liblua5.4 to use the lua features.
Support for a statically linked Lua may be added in the future.
# Compiling # Compiling
@ -38,11 +37,11 @@ cargo build --release --bin nml
- [x] References - [x] References
- [x] Navigation - [x] Navigation
- [x] Cross-Document references - [x] Cross-Document references
- [x] LSP
- [ ] Complete Lua api - [ ] Complete Lua api
- [ ] Documentation - [ ] Documentation
- [ ] Table - [ ] Table
- [ ] LaTeX output - [ ] LaTeX output
- [ ] LSP
# License # License

File diff suppressed because one or more lines are too long

1
readme/Basic Styles.html Normal file
View file

@ -0,0 +1 @@
<!DOCTYPE HTML><html><head><meta charset="UTF-8"><title>NML | Basic Styles</title><link rel="stylesheet" href="../style.css"></head><body><div class="layout"><input id="navbar-checkbox" class="toggle" type="checkbox" style="display:none" checked><div id="navbar"><ul><li class="navbar-entry"><a href="Getting Started.html">Getting Started</a></li><li class="navbar-entry"><a href="Sections.html">Sections</a></li><li class="navbar-entry"><a href="Variables.html">Variables</a></li><li class="navbar-entry"><a href="References.html">References</a></li><li class="navbar-entry"><a href="Imports.html">Imports</a></li><li class="navbar-entry"><a href="Raw.html">Raw</a></li><li class="navbar-entry"><a href="Comments.html">Comments</a></li><li><details><summary class="navbar-category">External Tools</summary><ul><li class="navbar-entry"><a href="Graphviz.html">Graphviz</a></li><li class="navbar-entry"><a href="LaTeX.html">LaTeX</a></li></ul></details></li><li><details><summary class="navbar-category">Blocks</summary><ul><li class="navbar-entry"><a href="Blockquotes.html">Blockquotes</a></li><li class="navbar-entry"><a href="Code.html">Code</a></li><li class="navbar-entry"><a href="Lists.html">Lists</a></li></ul></details></li><li><details><summary class="navbar-category">Lua</summary><ul><li class="navbar-entry"><a href="Lua Basics.html">Lua</a></li></ul></details></li><li><details open><summary class="navbar-category">Styles</summary><ul><li class="navbar-entry-current"><a href="Basic Styles.html">Basic</a></li><li class="navbar-entry"><a href="Basic Layouts.html">Layouts</a></li><li class="navbar-entry"><a href="User-Defined Styles.html">User-Defined</a></li></ul></details></li></ul></div><label for="navbar-checkbox" class="navbar-checkbox-label">&#9776;</label><div class="content"><div class="toc"><span>Table of Content</span><ol><li value="1"><a href="#Basic_styles">Basic styles</a></li><ol><li value="1"><a href="#Bold">Bold</a></li><li value="2"><a href="#Italic">Italic</a></li><li value="3"><a href="#Underline">Underline</a></li><li value="4"><a href="#Highlighted">Highlighted</a></li></div><h1 id="Basic_styles">1. Basic styles <a class="section-link" href="#Basic_styles">🔗 </a> </h1><h2 id="Bold">1.1. Bold <a class="section-link" href="#Bold">🔗 </a> </h2><p>Enclose text between two <a class="inline-code"><code><span style="color:#c0c5ce;">**</span></code></a> to render it <b>bold</b>!</p><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">**Bold text**</span></code></a><b>Bold text</b></li><li><a class="inline-code"><code><span style="color:#c0c5ce;">Bold [**link**](#)</span></code></a> → Bold <a href="#"><b>link</b></a></li></ul><h2 id="Italic">1.2. Italic <a class="section-link" href="#Italic">🔗 </a> </h2><p>Enclose text between two <a class="inline-code"><code><span style="color:#c0c5ce;">*</span></code></a> to render it <i>italic</i>!</p><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">*Italic text*</span></code></a><i>Italic text</i></li><li><a class="inline-code"><code><span style="color:#c0c5ce;">**Bold + *Italic***</span></code></a><b>Bold + <i>Italic</b></i></li></ul><h2 id="Underline">1.3. Underline <a class="section-link" href="#Underline">🔗 </a> </h2><p>Enclose text between two <a class="inline-code"><code><span style="color:#c0c5ce;">__</span></code></a> to render it <u>underlined</u>!</p><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">__Underlined text__</span></code></a><u>Underlined text</u></li><li><a class="inline-code"><code><span style="color:#c0c5ce;">__Underline + *Italic*__</span></code></a><u>Underline + <i>Italic</i></u></li></ul><h2 id="Highlighted">1.4. Highlighted <a class="section-link" href="#Highlighted">🔗 </a> </h2><p>Enclose text between two <a class="inline-code"><code><span style="color:#c0c5ce;">`</span></code></a> to render it <em>overlined</em>!</p><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">`Highlighted text`</span></code></a><em>Highlighted text</em></li><li><a class="inline-code"><code><span style="color:#c0c5ce;">`Highlight + **Bold**`</span></code></a><em>Highlight + <b>Bold</b></em></li></ul><p></p></div></div></body></html>

1
readme/Blockquotes.html Normal file

File diff suppressed because one or more lines are too long

1
readme/Code.html Normal file

File diff suppressed because one or more lines are too long

1
readme/Comments.html Normal file
View file

@ -0,0 +1 @@
<!DOCTYPE HTML><html><head><meta charset="UTF-8"><title>NML | Comments</title><link rel="stylesheet" href="../style.css"></head><body><div class="layout"><input id="navbar-checkbox" class="toggle" type="checkbox" style="display:none" checked><div id="navbar"><ul><li class="navbar-entry"><a href="Getting Started.html">Getting Started</a></li><li class="navbar-entry"><a href="Sections.html">Sections</a></li><li class="navbar-entry"><a href="Variables.html">Variables</a></li><li class="navbar-entry"><a href="References.html">References</a></li><li class="navbar-entry"><a href="Imports.html">Imports</a></li><li class="navbar-entry"><a href="Raw.html">Raw</a></li><li class="navbar-entry-current"><a href="Comments.html">Comments</a></li><li><details><summary class="navbar-category">External Tools</summary><ul><li class="navbar-entry"><a href="Graphviz.html">Graphviz</a></li><li class="navbar-entry"><a href="LaTeX.html">LaTeX</a></li></ul></details></li><li><details><summary class="navbar-category">Blocks</summary><ul><li class="navbar-entry"><a href="Blockquotes.html">Blockquotes</a></li><li class="navbar-entry"><a href="Code.html">Code</a></li><li class="navbar-entry"><a href="Lists.html">Lists</a></li></ul></details></li><li><details><summary class="navbar-category">Lua</summary><ul><li class="navbar-entry"><a href="Lua Basics.html">Lua</a></li></ul></details></li><li><details><summary class="navbar-category">Styles</summary><ul><li class="navbar-entry"><a href="Basic Styles.html">Basic</a></li><li class="navbar-entry"><a href="Basic Layouts.html">Layouts</a></li><li class="navbar-entry"><a href="User-Defined Styles.html">User-Defined</a></li></ul></details></li></ul></div><label for="navbar-checkbox" class="navbar-checkbox-label">&#9776;</label><div class="content"><div class="toc"><span>Table of Content</span><ol><li value="1"><a href="#Comments">Comments</a></li></div><h1 id="Comments">1. Comments <a class="section-link" href="#Comments">🔗 </a> </h1><p>NML supports line comment with the following syntax: <a class="inline-code"><code><span style="color:#c0c5ce;">:: Comment</span></code></a></p><p>Comments will eat any preceding white space.</p><p><b>Example</b></p><div class="split-container"><div class="split"><p><a class="inline-code"><code><span style="font-weight:bold;color:#ebcb8b;">**Bold Text**</span><span style="color:#c0c5ce;"> :: This is a comment</span></code></a></p></div><div class="split"><p><b>Bold Text</b></p></div></div><p></p></div></div></body></html>

File diff suppressed because one or more lines are too long

333
readme/Graphviz.html Normal file

File diff suppressed because one or more lines are too long

1
readme/Imports.html Normal file
View file

@ -0,0 +1 @@
<!DOCTYPE HTML><html><head><meta charset="UTF-8"><title>NML | Imports</title><link rel="stylesheet" href="../style.css"></head><body><div class="layout"><input id="navbar-checkbox" class="toggle" type="checkbox" style="display:none" checked><div id="navbar"><ul><li class="navbar-entry"><a href="Getting Started.html">Getting Started</a></li><li class="navbar-entry"><a href="Sections.html">Sections</a></li><li class="navbar-entry"><a href="Variables.html">Variables</a></li><li class="navbar-entry"><a href="References.html">References</a></li><li class="navbar-entry-current"><a href="Imports.html">Imports</a></li><li class="navbar-entry"><a href="Raw.html">Raw</a></li><li class="navbar-entry"><a href="Comments.html">Comments</a></li><li><details><summary class="navbar-category">External Tools</summary><ul><li class="navbar-entry"><a href="Graphviz.html">Graphviz</a></li><li class="navbar-entry"><a href="LaTeX.html">LaTeX</a></li></ul></details></li><li><details><summary class="navbar-category">Blocks</summary><ul><li class="navbar-entry"><a href="Blockquotes.html">Blockquotes</a></li><li class="navbar-entry"><a href="Code.html">Code</a></li><li class="navbar-entry"><a href="Lists.html">Lists</a></li></ul></details></li><li><details><summary class="navbar-category">Lua</summary><ul><li class="navbar-entry"><a href="Lua Basics.html">Lua</a></li></ul></details></li><li><details><summary class="navbar-category">Styles</summary><ul><li class="navbar-entry"><a href="Basic Styles.html">Basic</a></li><li class="navbar-entry"><a href="Basic Layouts.html">Layouts</a></li><li class="navbar-entry"><a href="User-Defined Styles.html">User-Defined</a></li></ul></details></li></ul></div><label for="navbar-checkbox" class="navbar-checkbox-label">&#9776;</label><div class="content"><div class="toc"><span>Table of Content</span><ol><li value="1"><a href="#Imports">Imports</a></li><li value="2"><a href="#Scoped_imports">Scoped imports</a></li></div><h1 id="Imports">1. Imports <a class="section-link" href="#Imports">🔗 </a> </h1><p>NML lets you import documents into the current document via the following syntax:</p><p><a class="inline-code"><code><span style="color:#c0c5ce;">@import &lt;PATH.nml&gt;</span></code></a> Note that this will import everything from the other document, such as content but also variables and references.</p><h1 id="Scoped_imports">2. Scoped imports <a class="section-link" href="#Scoped_imports">🔗 </a> </h1><p>If you wish to import a document, while not overwriting current variables and references, use the following:</p><p><a class="inline-code"><code><span style="color:#c0c5ce;">@import[as=util] lib.nml</span></code></a> With this syntax, any variable or reference imported will be prefixed with <a class="inline-code"><code><span style="color:#c0c5ce;">util.</span></code></a></p></div></div></body></html>

1
readme/LaTeX.html Normal file

File diff suppressed because one or more lines are too long

1
readme/Lists.html Normal file

File diff suppressed because one or more lines are too long

1
readme/Lua Basics.html Normal file
View file

@ -0,0 +1 @@
<!DOCTYPE HTML><html><head><meta charset="UTF-8"><title>NML | Lua Basics</title><link rel="stylesheet" href="../style.css"></head><body><div class="layout"><input id="navbar-checkbox" class="toggle" type="checkbox" style="display:none" checked><div id="navbar"><ul><li class="navbar-entry"><a href="Getting Started.html">Getting Started</a></li><li class="navbar-entry"><a href="Sections.html">Sections</a></li><li class="navbar-entry"><a href="Variables.html">Variables</a></li><li class="navbar-entry"><a href="References.html">References</a></li><li class="navbar-entry"><a href="Imports.html">Imports</a></li><li class="navbar-entry"><a href="Raw.html">Raw</a></li><li class="navbar-entry"><a href="Comments.html">Comments</a></li><li><details><summary class="navbar-category">External Tools</summary><ul><li class="navbar-entry"><a href="Graphviz.html">Graphviz</a></li><li class="navbar-entry"><a href="LaTeX.html">LaTeX</a></li></ul></details></li><li><details><summary class="navbar-category">Blocks</summary><ul><li class="navbar-entry"><a href="Blockquotes.html">Blockquotes</a></li><li class="navbar-entry"><a href="Code.html">Code</a></li><li class="navbar-entry"><a href="Lists.html">Lists</a></li></ul></details></li><li><details open><summary class="navbar-category">Lua</summary><ul><li class="navbar-entry-current"><a href="Lua Basics.html">Lua</a></li></ul></details></li><li><details><summary class="navbar-category">Styles</summary><ul><li class="navbar-entry"><a href="Basic Styles.html">Basic</a></li><li class="navbar-entry"><a href="Basic Layouts.html">Layouts</a></li><li class="navbar-entry"><a href="User-Defined Styles.html">User-Defined</a></li></ul></details></li></ul></div><label for="navbar-checkbox" class="navbar-checkbox-label">&#9776;</label><div class="content"><div class="toc"><span>Table of Content</span><ol><li value="1"><a href="#Running_lua_code">Running lua code</a></li><ol><li value="1"><a href="#Lua_to_text">Lua to text</a></li><li value="2"><a href="#Parse_lua_string">Parse lua string</a></li></div><h1 id="Running_lua_code">1. Running lua code <a class="section-link" href="#Running_lua_code">🔗 </a> </h1><p>Running lua code is done using the following syntax: <a class="inline-code"><code><span style="color:#c0c5ce;">%&lt;</span><span style="color:#96b5b4;">print</span><span style="color:#c0c5ce;">(&quot;</span><span style="color:#a3be8c;">Hello World!</span><span style="color:#c0c5ce;">&quot;)&gt;%</span></code></a></p><h2 id="Lua_to_text">1.1. Lua to text <a class="section-link" href="#Lua_to_text">🔗 </a> </h2><p>To convert the return value of your lua code, append <a class="inline-code"><code><span style="color:#c0c5ce;">&quot;</span></code></a> at the start of your lua expression:</p><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">%&lt;&quot;</span><span style="color:#a3be8c;">return </span><span style="color:#c0c5ce;">&quot;Hello World&quot;</span><span style="color:#a3be8c;">&gt;%</span></code></a> → Hello World</li><li><a class="inline-code"><code><span style="color:#c0c5ce;">%&lt;&quot; &quot;Hello, &quot;</span><span style="color:#a3be8c;"> .. </span><span style="color:#c0c5ce;">&quot;World&quot;</span><span style="color:#a3be8c;">&gt;%</span></code></a> → Hello, World</li></ul><h2 id="Parse_lua_string">1.2. Parse lua string <a class="section-link" href="#Parse_lua_string">🔗 </a> </h2><p>Additionnaly, you can output lua to be parsed by the document's parser. To do so, append <a class="inline-code"><code><span style="color:#c0c5ce;">!</span></code></a> at the start of your lua expression:</p><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">%&lt;!&quot;</span><span style="color:#a3be8c;">**</span><span style="color:#c0c5ce;">&quot; .. &quot;</span><span style="color:#a3be8c;">Bold from lua?</span><span style="color:#c0c5ce;">&quot; .. &quot;</span><span style="color:#a3be8c;">**</span><span style="color:#c0c5ce;">&quot;&gt;%</span></code></a><b>Bold from lua?</b></li><li><a class="inline-code"><code><span style="color:#c0c5ce;">%&lt;!&quot;</span><span style="color:#a3be8c;">[</span><span style="color:#c0c5ce;">&quot; .. &quot;</span><span style="color:#a3be8c;">Link from Lua</span><span style="color:#c0c5ce;">&quot; .. &quot;</span><span style="color:#a3be8c;">](#)</span><span style="color:#c0c5ce;">&quot;&gt;%</span></code></a><a href="#">Link from Lua</a></li></ul><p></p></div></div></body></html>

1
readme/Raw.html Normal file
View file

@ -0,0 +1 @@
<!DOCTYPE HTML><html><head><meta charset="UTF-8"><title>NML | Raw</title><link rel="stylesheet" href="../style.css"></head><body><div class="layout"><input id="navbar-checkbox" class="toggle" type="checkbox" style="display:none" checked><div id="navbar"><ul><li class="navbar-entry"><a href="Getting Started.html">Getting Started</a></li><li class="navbar-entry"><a href="Sections.html">Sections</a></li><li class="navbar-entry"><a href="Variables.html">Variables</a></li><li class="navbar-entry"><a href="References.html">References</a></li><li class="navbar-entry"><a href="Imports.html">Imports</a></li><li class="navbar-entry-current"><a href="Raw.html">Raw</a></li><li class="navbar-entry"><a href="Comments.html">Comments</a></li><li><details><summary class="navbar-category">External Tools</summary><ul><li class="navbar-entry"><a href="Graphviz.html">Graphviz</a></li><li class="navbar-entry"><a href="LaTeX.html">LaTeX</a></li></ul></details></li><li><details><summary class="navbar-category">Blocks</summary><ul><li class="navbar-entry"><a href="Blockquotes.html">Blockquotes</a></li><li class="navbar-entry"><a href="Code.html">Code</a></li><li class="navbar-entry"><a href="Lists.html">Lists</a></li></ul></details></li><li><details><summary class="navbar-category">Lua</summary><ul><li class="navbar-entry"><a href="Lua Basics.html">Lua</a></li></ul></details></li><li><details><summary class="navbar-category">Styles</summary><ul><li class="navbar-entry"><a href="Basic Styles.html">Basic</a></li><li class="navbar-entry"><a href="Basic Layouts.html">Layouts</a></li><li class="navbar-entry"><a href="User-Defined Styles.html">User-Defined</a></li></ul></details></li></ul></div><label for="navbar-checkbox" class="navbar-checkbox-label">&#9776;</label><div class="content"><div class="toc"><span>Table of Content</span><ol><li value="1"><a href="#Inline_raws">Inline raws</a></li><li value="2"><a href="#Block_raws">Block raws</a></li><li value="3"><a href="#Properties">Properties</a></li></div><p>Raws are elements to be rendered as-is by the compiler.</p><h1 id="Inline_raws">1. Inline raws <a class="section-link" href="#Inline_raws">🔗 </a> </h1><p>Inline raws are meant to be used inside a paragraph and thus, don't break the paragraph. Here's the syntax for inline raws: <a class="inline-code"><code><span style="color:#c0c5ce;">{?[kind=inline] CONTENT ?}</span></code></a>. Here, <a class="inline-code"><code><span style="color:#c0c5ce;">CONTENT</span></code></a> will added directly to the resulting document.</p><p><b>Example</b></p><div class="split-container"><div class="split"><p><a class="inline-code"><code><span style="color:#c0c5ce;">{? &lt;a style=&quot;color:red&quot;&gt; ?} Some text {? &lt;/a&gt; ?}</span></code></a></p></div><div class="split"><p><a style="color:red"> Some text </a></p></div></div><p>Raws are better paired with Lua, see <a href="User-Defined Styles.html#Defining_a_custom_style">Defining a custom style</a> for how to use them.</p><h1 id="Block_raws">2. Block raws <a class="section-link" href="#Block_raws">🔗 </a> </h1><p>You can have raw elements take a full block to define additional capabilities. The syntax is similar to inline raws, except that <a class="inline-code"><code><span style="color:#c0c5ce;">kind=block</span></code></a> is used instead.</p><p><b>Example</b></p><div class="centered"><div class="split-container"><div class="split"><p><a class="inline-code"><code><span style="color:#c0c5ce;">{?[kind=block] &lt;img src=&quot;assets/duck.jpg&quot; style=&quot;max-height:100%;max-width:100%;&quot;&gt; ?}</span></code></a></p></div><div class="split"><img src="assets/duck.jpg" style="max-height:100%;max-width:100%;"></div></div></div><h1 id="Properties">3. Properties <a class="section-link" href="#Properties">🔗 </a> </h1><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">kind</span></code></a> The element kind of the resulting raw, defaults to <em>inline</em>, allowed values:</li><ol><li value="1"><a class="inline-code"><code><span style="color:#c0c5ce;">inline</span></code></a>: Make the raw element inline</li><li value="2"><a class="inline-code"><code><span style="color:#c0c5ce;">block</span></code></a>: Make the raw element a full block</li></ol></ul><p></p></div></div></body></html>

1
readme/References.html Normal file
View file

@ -0,0 +1 @@
<!DOCTYPE HTML><html><head><meta charset="UTF-8"><title>NML | References</title><link rel="stylesheet" href="../style.css"></head><body><div class="layout"><input id="navbar-checkbox" class="toggle" type="checkbox" style="display:none" checked><div id="navbar"><ul><li class="navbar-entry"><a href="Getting Started.html">Getting Started</a></li><li class="navbar-entry"><a href="Sections.html">Sections</a></li><li class="navbar-entry"><a href="Variables.html">Variables</a></li><li class="navbar-entry-current"><a href="References.html">References</a></li><li class="navbar-entry"><a href="Imports.html">Imports</a></li><li class="navbar-entry"><a href="Raw.html">Raw</a></li><li class="navbar-entry"><a href="Comments.html">Comments</a></li><li><details><summary class="navbar-category">External Tools</summary><ul><li class="navbar-entry"><a href="Graphviz.html">Graphviz</a></li><li class="navbar-entry"><a href="LaTeX.html">LaTeX</a></li></ul></details></li><li><details><summary class="navbar-category">Blocks</summary><ul><li class="navbar-entry"><a href="Blockquotes.html">Blockquotes</a></li><li class="navbar-entry"><a href="Code.html">Code</a></li><li class="navbar-entry"><a href="Lists.html">Lists</a></li></ul></details></li><li><details><summary class="navbar-category">Lua</summary><ul><li class="navbar-entry"><a href="Lua Basics.html">Lua</a></li></ul></details></li><li><details><summary class="navbar-category">Styles</summary><ul><li class="navbar-entry"><a href="Basic Styles.html">Basic</a></li><li class="navbar-entry"><a href="Basic Layouts.html">Layouts</a></li><li class="navbar-entry"><a href="User-Defined Styles.html">User-Defined</a></li></ul></details></li></ul></div><label for="navbar-checkbox" class="navbar-checkbox-label">&#9776;</label><div class="content"><div class="toc"><span>Table of Content</span><ol><li value="1"><a href="#Internal_references">Internal references</a></li><ol><li value="1"><a href="#Media_references">Media references</a></li></ol><li value="2"><a href="#External_references">External references</a></li><li value="3"><a href="#Properties">Properties</a></li></div><h1 id="Internal_references">1. Internal references <a class="section-link" href="#Internal_references">🔗 </a> </h1><p>Internal references allow you to create references to elements defined within the current document.</p><p>Reference the the current section: <a class="inline-code"><code><span style="color:#c0c5ce;">&amp;{internal_reference}</span></code></a><a class="section-reference" href="#Internal_references">(Internal references)</a></p><h2 id="Media_references">1.1. Media references <a class="section-link" href="#Media_references">🔗 </a> </h2><div class="media"><div id="medium-1" class="medium"><video controls><source src="assets/flower.webm"></video><p class="medium-refname">(1) Flower</p></div></div><p>When you reference a medium from the current document, the reference can be hovered to show the referenced medium: <a class="medium-ref" href="#medium-1">(1)<video><source src="assets/flower.webm"></video></a>.</p><h1 id="External_references">1. External references <a class="section-link" href="#External_references">🔗 </a> </h1><p>You can reference elements from other documents by adding the document's name before the reference name (separated by a <a class="inline-code"><code><span style="color:#c0c5ce;">#</span></code></a>). The document name refers to the output file (as defined by the variable <em>compiler.output</em>) excluding the extension.</p><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">&amp;{doc#ref}</span></code></a>: Finds reference named <em>ref</em> in document named <em>doc</em>.</li><li><a class="inline-code"><code><span style="color:#c0c5ce;">&amp;{#ref}</span></code></a>: Finds reference named <em>ref</em> in all documents. Note that this will fail if there are multiple documents defining reference <em>ref</em>.</li></ul><p>For instance:</p><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">&amp;{LaTeX#tex_env}[caption=LaTeX environment]</span></code></a><a href="LaTeX.html#LaTeX_environment">LaTeX environment</a></li><li><a class="inline-code"><code><span style="color:#c0c5ce;">&amp;{#tex_env}[caption=LaTeX environment]</span></code></a><a href="LaTeX.html#LaTeX_environment">LaTeX environment</a></li></ul><h1 id="Properties">2. Properties <a class="section-link" href="#Properties">🔗 </a> </h1><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">caption</span></code></a> The display caption for the reference</li></ul><p></p></div></div></body></html>

1
readme/Sections.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
readme/Variables.html Normal file
View file

@ -0,0 +1 @@
<!DOCTYPE HTML><html><head><meta charset="UTF-8"><title>NML | Variables</title><link rel="stylesheet" href="../style.css"></head><body><div class="layout"><input id="navbar-checkbox" class="toggle" type="checkbox" style="display:none" checked><div id="navbar"><ul><li class="navbar-entry"><a href="Getting Started.html">Getting Started</a></li><li class="navbar-entry"><a href="Sections.html">Sections</a></li><li class="navbar-entry-current"><a href="Variables.html">Variables</a></li><li class="navbar-entry"><a href="References.html">References</a></li><li class="navbar-entry"><a href="Imports.html">Imports</a></li><li class="navbar-entry"><a href="Raw.html">Raw</a></li><li class="navbar-entry"><a href="Comments.html">Comments</a></li><li><details><summary class="navbar-category">External Tools</summary><ul><li class="navbar-entry"><a href="Graphviz.html">Graphviz</a></li><li class="navbar-entry"><a href="LaTeX.html">LaTeX</a></li></ul></details></li><li><details><summary class="navbar-category">Blocks</summary><ul><li class="navbar-entry"><a href="Blockquotes.html">Blockquotes</a></li><li class="navbar-entry"><a href="Code.html">Code</a></li><li class="navbar-entry"><a href="Lists.html">Lists</a></li></ul></details></li><li><details><summary class="navbar-category">Lua</summary><ul><li class="navbar-entry"><a href="Lua Basics.html">Lua</a></li></ul></details></li><li><details><summary class="navbar-category">Styles</summary><ul><li class="navbar-entry"><a href="Basic Styles.html">Basic</a></li><li class="navbar-entry"><a href="Basic Layouts.html">Layouts</a></li><li class="navbar-entry"><a href="User-Defined Styles.html">User-Defined</a></li></ul></details></li></ul></div><label for="navbar-checkbox" class="navbar-checkbox-label">&#9776;</label><div class="content"><div class="toc"><span>Table of Content</span><ol><li value="1"><a href="#Variable_definition">Variable definition</a></li><li value="2"><a href="#Variable_substitution">Variable substitution</a></li></div><h1 id="Variable_definition">1. Variable definition <a class="section-link" href="#Variable_definition">🔗 </a> </h1><p>In NML you can defines variables and call them later.</p><p>Currently, two types of variables are supported:</p><ul><li><b>Text variables</b>: Just simple text</li><li><b>Path variables</b>: Path aware variables, that will display an error if the path doesn't exist or is not accessible</li></ul><p>To define a variable use the following syntax:</p><div class="code-block"><div class="code-block-content"><table cellspacing="0"><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">@var = value</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">:: Text variable</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">@&#39;my_file = ./pic.png</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">:: Path variable</span></pre></td></tr></table></div></div><p>Variable names cannot contain <em>%</em> or <em>=</em>. However variables values can span across multiple lines:</p><div class="code-block"><div class="code-block-content"><table cellspacing="0"><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">@var = A\</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">B</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">:: var == &quot;AB&quot;</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">@var = A</span><span style="color:#96b5b4;">\\</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">B</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">:: var == &quot;A\nB&quot;</span></pre></td></tr></table></div></div><p>Using a single <em>\</em>'s will ignore the following newline, using two <em>\\</em>'s will keep the newline.</p><h1 id="Variable_substitution">2. Variable substitution <a class="section-link" href="#Variable_substitution">🔗 </a> </h1><p>Once variables have been defined, you can call them to be expanded to their content:</p><div class="code-block"><div class="code-block-content"><table cellspacing="0"><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">@var = Hello, World!</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">:: Definition</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">%var%</span></pre></td></tr><tr><td class="code-block-line"><pre><span style="color:#c0c5ce;">:: Substitution</span></pre></td></tr></table></div></div><p>Expanded variables will be processed by the parser to display their content, as if you had written the variable's value directly.</p></div></div></body></html>

BIN
readme/assets/duck.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

BIN
readme/assets/flower.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 KiB

BIN
readme/assets/flower.webm Normal file

Binary file not shown.