Browse Source

build based on 92a2ba5

gh-pages
autodocs 8 years ago
parent
commit
1e7930a7e2
  1. 6
      latest/outputformats.html

6
latest/outputformats.html

@ -27,7 +27,7 @@ When adding `x` and `y` together we obtain a new rational number: @@ -27,7 +27,7 @@ When adding `x` and `y` together we obtain a new rational number:
```@example name
z = x + y
```</code></pre><p>We note that lines starting with <code>#&#39;</code> is printed as regular markdown, and the code lines have been wrapped in <code>@example</code> blocks.</p><p>Some of the output rendering can be controlled with keyword arguments to <a href="outputformats.html#Literate.markdown"><code>Literate.markdown</code></a>:</p><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Literate.markdown" href="#Literate.markdown"><code>Literate.markdown</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">Literate.markdown(inputfile, outputdir; kwargs...)</code></pre><p>Generate a markdown file from <code>inputfile</code> and write the result to the directory<code>outputdir</code>.</p><p>Keyword arguments:</p><ul><li><p><code>name</code>: name of the output file, excluding <code>.md</code>. <code>name</code> is also used to name all the <code>@example</code> blocks, and to replace <code>@__NAME__</code>. Defaults to the filename of <code>inputfile</code>.</p></li><li><p><code>preprocess</code>, <code>postprocess</code>: custom pre- and post-processing functions, see the <a href="customprocessing.html#Custom-pre-and-post-processing-1">Custom pre- and post-processing</a> section of the manual. Defaults to <code>identity</code>.</p></li><li><p><code>documenter</code>: boolean that tells if the output is intended to use with Documenter.jl. Defaults to <code>true</code>. See the the manual section on <a href="documenter.html#Interaction-with-Documenter-1">Interaction with Documenter</a>.</p></li><li><p><code>codefence</code>: A <code>Pair</code> of opening and closing code fence. Defaults to</p><pre><code class="language-none">&quot;```@example $(name)&quot; =&gt; &quot;```&quot;</code></pre><p>if <code>documenter = true</code> and</p><pre><code class="language-none">&quot;```julia&quot; =&gt; &quot;```&quot;</code></pre><p>if <code>documenter = false</code>.</p></li></ul></div><a class="source-link" target="_blank" href="https://github.com/fredrikekre/Literate.jl/blob/51cabecaec40afde7cc8034eef65c23f149873a4/src/Literate.jl#L245-L270">source</a></section><h2><a class="nav-anchor" id="Notebook-Output-1" href="#Notebook-Output-1"><strong>4.2.</strong> Notebook Output</a></h2><p>The (default) notebook output of the source snippet above is as follows</p><pre><code class="language-none"> │ # Rational numbers
```</code></pre><p>We note that lines starting with <code>#&#39;</code> is printed as regular markdown, and the code lines have been wrapped in <code>@example</code> blocks.</p><p>Some of the output rendering can be controlled with keyword arguments to <a href="outputformats.html#Literate.markdown"><code>Literate.markdown</code></a>:</p><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Literate.markdown" href="#Literate.markdown"><code>Literate.markdown</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">Literate.markdown(inputfile, outputdir; kwargs...)</code></pre><p>Generate a markdown file from <code>inputfile</code> and write the result to the directory<code>outputdir</code>.</p><p>Keyword arguments:</p><ul><li><p><code>name</code>: name of the output file, excluding <code>.md</code>. <code>name</code> is also used to name all the <code>@example</code> blocks, and to replace <code>@__NAME__</code>. Defaults to the filename of <code>inputfile</code>.</p></li><li><p><code>preprocess</code>, <code>postprocess</code>: custom pre- and post-processing functions, see the <a href="customprocessing.html#Custom-pre-and-post-processing-1">Custom pre- and post-processing</a> section of the manual. Defaults to <code>identity</code>.</p></li><li><p><code>documenter</code>: boolean that tells if the output is intended to use with Documenter.jl. Defaults to <code>true</code>. See the the manual section on <a href="documenter.html#Interaction-with-Documenter-1">Interaction with Documenter</a>.</p></li><li><p><code>codefence</code>: A <code>Pair</code> of opening and closing code fence. Defaults to</p><pre><code class="language-none">&quot;```@example $(name)&quot; =&gt; &quot;```&quot;</code></pre><p>if <code>documenter = true</code> and</p><pre><code class="language-none">&quot;```julia&quot; =&gt; &quot;```&quot;</code></pre><p>if <code>documenter = false</code>.</p></li></ul></div><a class="source-link" target="_blank" href="https://github.com/fredrikekre/Literate.jl/blob/92a2ba5e1dcf972c7d3e337a6240fd23ec1a51f1/src/Literate.jl#L245-L270">source</a></section><h2><a class="nav-anchor" id="Notebook-Output-1" href="#Notebook-Output-1"><strong>4.2.</strong> Notebook Output</a></h2><p>The (default) notebook output of the source snippet above is as follows</p><pre><code class="language-none"> │ # Rational numbers
│ In julia rational numbers can be constructed with the `//` operator.
│ Lets define two rational numbers, `x` and `y`:
@ -41,8 +41,8 @@ Out[2]: │ 2//5 @@ -41,8 +41,8 @@ Out[2]: │ 2//5
│ When adding `x` and `y` together we obtain a new rational number:
In[3]: │ z = x + y
Out[3]: │ 11/15</code></pre><p>We note that lines starting with <code>#&#39;</code> is put in markdown cells, and the code lines have been put in code cells. By default the notebook is also executed and output cells populated. Some of the output rendering can be controlled with keyword arguments to <a href="outputformats.html#Literate.notebook"><code>Literate.notebook</code></a>:</p><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Literate.notebook" href="#Literate.notebook"><code>Literate.notebook</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">Literate.notebook(inputfile, outputdir; kwargs...)</code></pre><p>Generate a notebook from <code>inputfile</code> and write the result to <code>outputdir</code>.</p><p>Keyword arguments:</p><ul><li><p><code>name</code>: name of the output file, excluding <code>.ipynb</code>. <code>name</code> is also used to replace <code>@__NAME__</code>. Defaults to the filename of <code>inputfile</code>.</p></li><li><p><code>preprocess</code>, <code>postprocess</code>: custom pre- and post-processing functions, see the <a href="customprocessing.html#Custom-pre-and-post-processing-1">Custom pre- and post-processing</a> section of the manual. Defaults to <code>identity</code>.</p></li><li><p><code>execute</code>: a boolean deciding if the generated notebook should also be executed or not. Defaults to <code>true</code>.</p></li><li><p><code>documenter</code>: boolean that says if the source contains Documenter.jl specific things to filter out during notebook generation. Defaults to <code>true</code>. See the the manual section on <a href="documenter.html#Interaction-with-Documenter-1">Interaction with Documenter</a>.</p></li></ul></div><a class="source-link" target="_blank" href="https://github.com/fredrikekre/Literate.jl/blob/51cabecaec40afde7cc8034eef65c23f149873a4/src/Literate.jl#L341-L357">source</a></section><h2><a class="nav-anchor" id="Script-Output-1" href="#Script-Output-1"><strong>4.3.</strong> Script Output</a></h2><p>The (default) script output of the source snippet above is as follows</p><pre><code class="language-julia">x = 1//3
Out[3]: │ 11/15</code></pre><p>We note that lines starting with <code>#&#39;</code> is put in markdown cells, and the code lines have been put in code cells. By default the notebook is also executed and output cells populated. Some of the output rendering can be controlled with keyword arguments to <a href="outputformats.html#Literate.notebook"><code>Literate.notebook</code></a>:</p><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Literate.notebook" href="#Literate.notebook"><code>Literate.notebook</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">Literate.notebook(inputfile, outputdir; kwargs...)</code></pre><p>Generate a notebook from <code>inputfile</code> and write the result to <code>outputdir</code>.</p><p>Keyword arguments:</p><ul><li><p><code>name</code>: name of the output file, excluding <code>.ipynb</code>. <code>name</code> is also used to replace <code>@__NAME__</code>. Defaults to the filename of <code>inputfile</code>.</p></li><li><p><code>preprocess</code>, <code>postprocess</code>: custom pre- and post-processing functions, see the <a href="customprocessing.html#Custom-pre-and-post-processing-1">Custom pre- and post-processing</a> section of the manual. Defaults to <code>identity</code>.</p></li><li><p><code>execute</code>: a boolean deciding if the generated notebook should also be executed or not. Defaults to <code>true</code>.</p></li><li><p><code>documenter</code>: boolean that says if the source contains Documenter.jl specific things to filter out during notebook generation. Defaults to <code>true</code>. See the the manual section on <a href="documenter.html#Interaction-with-Documenter-1">Interaction with Documenter</a>.</p></li></ul></div><a class="source-link" target="_blank" href="https://github.com/fredrikekre/Literate.jl/blob/92a2ba5e1dcf972c7d3e337a6240fd23ec1a51f1/src/Literate.jl#L341-L357">source</a></section><h2><a class="nav-anchor" id="Script-Output-1" href="#Script-Output-1"><strong>4.3.</strong> Script Output</a></h2><p>The (default) script output of the source snippet above is as follows</p><pre><code class="language-julia">x = 1//3
y = 2//5
z = x + y</code></pre><p>We note that lines starting with <code>#&#39;</code> are removed and only the code lines have been kept. Some of the output rendering can be controlled with keyword arguments to <a href="outputformats.html#Literate.script"><code>Literate.script</code></a>:</p><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Literate.script" href="#Literate.script"><code>Literate.script</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">Literate.script(inputfile, outputdir; kwargs...)</code></pre><p>Generate a plain script file from <code>inputfile</code> and write the result to <code>outputdir</code>.</p><p>Keyword arguments:</p><ul><li><p><code>name</code>: name of the output file, excluding <code>.jl</code>. <code>name</code> is also used to replace <code>@__NAME__</code>. Defaults to the filename of <code>inputfile</code>.</p></li><li><p><code>preprocess</code>, <code>postprocess</code>: custom pre- and post-processing functions, see the <a href="customprocessing.html#Custom-pre-and-post-processing-1">Custom pre- and post-processing</a> section of the manual. Defaults to <code>identity</code>.</p></li><li><p><code>documenter</code>: boolean that says if the source contains Documenter.jl specific things to filter out during script generation. Defaults to <code>true</code>. See the the manual section on <a href="documenter.html#Interaction-with-Documenter-1">Interaction with Documenter</a>.</p></li></ul></div><a class="source-link" target="_blank" href="https://github.com/fredrikekre/Literate.jl/blob/51cabecaec40afde7cc8034eef65c23f149873a4/src/Literate.jl#L189-L203">source</a></section><footer><hr/><a class="previous" href="pipeline.html"><span class="direction">Previous</span><span class="title"><strong>3.</strong> Processing pipeline</span></a><a class="next" href="customprocessing.html"><span class="direction">Next</span><span class="title"><strong>5.</strong> Custom pre- and post-processing</span></a></footer></article></body></html>
z = x + y</code></pre><p>We note that lines starting with <code>#&#39;</code> are removed and only the code lines have been kept. Some of the output rendering can be controlled with keyword arguments to <a href="outputformats.html#Literate.script"><code>Literate.script</code></a>:</p><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Literate.script" href="#Literate.script"><code>Literate.script</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">Literate.script(inputfile, outputdir; kwargs...)</code></pre><p>Generate a plain script file from <code>inputfile</code> and write the result to <code>outputdir</code>.</p><p>Keyword arguments:</p><ul><li><p><code>name</code>: name of the output file, excluding <code>.jl</code>. <code>name</code> is also used to replace <code>@__NAME__</code>. Defaults to the filename of <code>inputfile</code>.</p></li><li><p><code>preprocess</code>, <code>postprocess</code>: custom pre- and post-processing functions, see the <a href="customprocessing.html#Custom-pre-and-post-processing-1">Custom pre- and post-processing</a> section of the manual. Defaults to <code>identity</code>.</p></li><li><p><code>documenter</code>: boolean that says if the source contains Documenter.jl specific things to filter out during script generation. Defaults to <code>true</code>. See the the manual section on <a href="documenter.html#Interaction-with-Documenter-1">Interaction with Documenter</a>.</p></li></ul></div><a class="source-link" target="_blank" href="https://github.com/fredrikekre/Literate.jl/blob/92a2ba5e1dcf972c7d3e337a6240fd23ec1a51f1/src/Literate.jl#L189-L203">source</a></section><footer><hr/><a class="previous" href="pipeline.html"><span class="direction">Previous</span><span class="title"><strong>3.</strong> Processing pipeline</span></a><a class="next" href="customprocessing.html"><span class="direction">Next</span><span class="title"><strong>5.</strong> Custom pre- and post-processing</span></a></footer></article></body></html>

Loading…
Cancel
Save