nml/readme/Imports.html

1 line
2.8 KiB
HTML
Raw Permalink Normal View History

2024-11-03 14:12:43 +01:00
<!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>