UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

76 lines (60 loc) 9.44 kB
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>Documentation markdown language &mdash; The lpdoc Documentation Generator v3.5</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">&#9776;</span></a><div id="sidebar" class="lpdoc-sidebar"><div style="height: 40px; margin-left: auto; margin-right: auto"><img src="lpdoc-logo-128_autofig.png" width=auto height=100%></div><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="lpdoc_ref_man.html">&#x2191;</a><a class="lpdoc-navbutton" href="doccomments_doc.html">&#x2190;</a><a class="lpdoc-navbutton" href="assertions_doc.html">&#x2192;</a><a class="lpdoc-navbutton" href="lpdoc_ref_mansearch.html">&#x1F50D;</a></span><span><a href="lpdoc_ref_manfulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="lpdoc_ref_man.html">The lpdoc Documentation Generator</a> &raquo;<br/> </li><li><a href=""><strong>Documentation markdown language</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Syntax">Syntax</a></li><ul><li><a href="#Sections">Sections</a></li><li><a href="#Styling text">Styling text</a></li><li><a href="#Paragraphs">Paragraphs</a></li><li><a href="#Lists">Lists</a></li><ul><li><a href="#Links (markdown style)">Links (markdown style)</a></li><li><a href="#Code spans and code blocks">Code spans and code blocks</a></li></ul></ul></ul></div><div class="lpdoc-main"><div id=""><h1>Documentation markdown language</h1> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="The Ciao Development Team" href="lpdoc_ref_mansearch.html#The Ciao Development Team">The Ciao Development Team</a>.<p> This section describes the <em>markdown</em>-flavor lightweight syntax for writing documentation. <a class="lpdoc-idx-anchor" id="0" href="lpdoc_ref_mansearch.html#LPdoc"><tt>LPdoc</tt></a> supports combining both markup and markdown syntax in the same document. Internally, all markdown syntax is translated to the equivalent markup before processing.<p><div id="Syntax"><h2>Syntax</h2> <p><div id="Sections"><h3>Sections</h3> <p>Sections are marked with one or more <tt>#</tt> symbols at the beginning of a line:<p><pre class="lpdoc-codeblock"># Sections and subsections Text for the section. ## Subsection Text for the subsection. ### Subsubsection Text for the subsubsection.</pre></div><div id="Styling text"><h3>Styling text</h3> <p>Text surrounded by <tt>_</tt> (or <tt>*</tt>), <tt>__</tt> (or <tt>**</tt>) produces emphasized or bold text: <pre class="lpdoc-codeblock">Text can be _emphasized_ (*emphasized*) or __bold__ (**bold**).</pre>produces the following results:<p><div class="lpdoc-note"> Text can be <em>emphasized</em> (<em>emphasized</em>) or <strong>bold</strong> (<strong>bold</strong>). </div> <p></div><div id="Paragraphs"><h3>Paragraphs</h3> <p>Paragraphs are break by blank lines, as follows: <pre class="lpdoc-codeblock">Begin of a paragraph. This paragraph ends here. Begin of a new paragraph. This paragraph ends here. The last new paragraph. This paragraph ends here.</pre>which produce the following results:<p><div class="lpdoc-note"> Begin of a paragraph. This paragraph ends here.<p>Begin of a new paragraph. This paragraph ends here.<p>The last new paragraph. This paragraph ends here. </div> <p></div><div id="Lists"><h3>Lists</h3> <p>Lists are composed of lines beginning with <tt>-</tt> items, which can be nested:<p><pre class="lpdoc-codeblock">- item 1 - subitem 1-1 - subitem 1-2 - subitem 1-2-1 - subitem 1-3 - item 2 - subitem 2-1 - item 3</pre>produces the following result:<p><div class="lpdoc-note"> <ul> <li>item 1 <ul> <li>subitem 1-1 <li>subitem 1-2 <ul> <li>subitem 1-2-1 </ul> <li>subitem 1-3 </ul> <li>item 2 <ul> <li>subitem 2-1 </ul> <li>item 3 </ul> </div> <p>Additionally you can write <em>enumerated lists</em>:<p><pre class="lpdoc-codeblock">Enumerated list with automatic numbering: -# First -# Second -# Third Enumerated list with explicit numbering: 1. First 2. Second 3. Third Enumerated list with non-consecutive explicit numbering: 2. First 4. Second 6. Third Enumerated list mixing all above: 2. First 4. Second -# Third -# Fourth 10. Fifth -# Sixth</pre>producing:<p><div class="lpdoc-note"> Enumerated list with automatic numbering: <ol> <li > First <li > Second <li > Third </ol> Enumerated list with explicit numbering: <ol> <li value="1"> First <li value="2"> Second <li value="3"> Third </ol> Enumerated list with non-consecutive explicit numbering: <ol> <li value="2"> First <li value="4"> Second <li value="6"> Third </ol> Enumerated list mixing all above:<p><ol> <li value="2"> First <li value="4"> Second <li > Third <li > Fourth <li value="10"> Fifth <li > Sixth </ol> </div> <p>Description lists are used to describe some denoted elements:<p><pre class="lpdoc-codeblock">- opt :: First - foo :: Second - bar :: Third</pre>which produces:<p><div class="lpdoc-note"> <dl> <dt>opt<dd> First <dt>foo<dd> Second <dt>bar<dd> Third </dl> </div> <p>Description lists may contain richer elements as items:<p><pre class="lpdoc-codeblock">- `atom` :: an atom. - `append/3` :: a predicate or functor name. - `f(X0,...,Xn)` :: some term with variables `X0`, ..., `Xn`. - `X` :: a variable. - $x^2$ :: some math. - $igwedge_j f_j(x_0, ldots, x_n)$ :: some complex math.</pre>which produces:<p><div class="lpdoc-note"> <dl> <dt><tt>atom</tt><dd> an atom. <dt><a class="lpdoc-idx-anchor" id="1" href="lpdoc_ref_mansearch.html#append/3"><tt>append/3</tt></a><dd> a predicate or functor name. <dt><tt>f(X0,...,Xn)</tt><dd> some term with variables <span class="lpdoc-var">X0</span>, ..., <span class="lpdoc-var">Xn</span>. <dt><span class="lpdoc-var">X</span><dd> a variable. <dt><script type="math/tex">x^2</script><dd> some math. <dt><script type="math/tex">igwedge_j f_j(x_0, ldots, x_n)</script><dd> some complex math. </dl> </div> <p><div id="Links (markdown style)"><h4>Links (markdown style)</h4> <p>You can write links in markdown style:<p><pre class="lpdoc-codeblock">A link to \href{https://ciao-lang.org} showing its URL. A link to [Ciao](https://ciao-lang.org) hiding its URL. A link to [The **Ciao** System](https://ciao-lang.org) hiding its URL with a complex string.</pre>which produces:<p><div class="lpdoc-note"> A link to <a href="https://ciao-lang.org">https://ciao-lang.org</a> showing its URL.<p>A link to <a href="https://ciao-lang.org">Ciao</a> hiding its URL.<p>A link to <a href="https://ciao-lang.org">The <strong>Ciao</strong> System</a> hiding its URL with a complex string. </div> <p>Org-mode style links are also suppored:<p><pre class="lpdoc-codeblock">A link to [[https://ciao-lang.org]] showing its URL. A link to [[https://ciao-lang.org][Ciao]] hiding its URL. A link to [[https://ciao-lang.org][The **Ciao** System]] hiding its URL with a complex string.</pre><div class="lpdoc-note"> A link to <a href="https://ciao-lang.org">https://ciao-lang.org</a> showing its URL.<p>A link to <a href="https://ciao-lang.org">Ciao</a> hiding its URL.<p>A link to <a href="https://ciao-lang.org">The <strong>Ciao</strong> System</a> hiding its URL with a complex string. </div> <p></div><div id="Code spans and code blocks"><h4>Code spans and code blocks</h4> <p>In addition to the <tt>@tt{}</tt> markup environments, we support code spans with a single backtick, as follows:<p><pre class="lpdoc-codeblock">This is a predicate name `append/3`, a variable name `X`, an atom name `foo`, a quoted atom name `&apos;foo&apos;`.</pre>producing:<p><div class="lpdoc-note"> This is a predicate name <a class="lpdoc-idx-anchor" id="2" href="lpdoc_ref_mansearch.html#append/3"><tt>append/3</tt></a>, a variable name <span class="lpdoc-var">X</span>, an atom name <tt>foo</tt>, a quoted atom name <tt>&apos;foo&apos;</tt>. </div> <p>Blocks of code are marked with triple backticks (you may use <tt>~~~</tt> to escape <tt>```</tt>, if your code contains that sequence of backtick characters):<p><pre class="lpdoc-codeblock">Text that is 4-char indented is recognized as code: list([]). list([X|Xs]) :- list(Xs) </pre>which produces:<p><div class="lpdoc-note"> Text that is 4-char indented is recognized as code:<p><pre class="lpdoc-codeblock">list([]). list([X|Xs]) :- list(Xs)</pre></div> <p>Code blocks also support (optional) language specifier to enable syntax coloring and other special features (like <a class="lpdoc-idx-anchor" id="3" href="lpdoc_ref_mansearch.html#runnable"><em>runnable</em></a> code blocks):<p><pre class="lpdoc-codeblock">```ciao list([]). list([X|Xs]) :- list(Xs) ```</pre>which produces:<p><pre class="lpdoc-codeblock"><span class="ciao-face-clauseheadname">list</span>([]). <span class="ciao-face-clauseheadname">list</span>([<span class="ciao-face-variable">X</span>|<span class="ciao-face-variable">Xs</span>]) <span class="ciao-face-prompt">:-</span> list(<span class="ciao-face-variable">Xs</span>)</pre></div></div></div><br/></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>