@ -26,4 +26,4 @@ include("file2.jl")</code></pre><p>Let's say we have saved this fi
@@ -26,4 +26,4 @@ include("file2.jl")</code></pre><p>Let's say we have saved this fi
end
return str
end</code></pre><p>(of course replace <code>included</code> with your respective files)</p><p>Finally, you simply pass this function to e.g. <ahref="outputformats.html#Literate.markdown"><code>Literate.markdown</code></a> as</p><pre><codeclass="language-julia">Literate.markdown("examples.jl", "path/to/save/markdown";
name = "markdown_file_name", preprocess = replace_includes)</code></pre><p>and you will see that in the final output file (here <code>markdown_file_name.md</code>) the <code>include</code> statements are replaced with the actual code to be included!</p><p>This approach is used for generating <ahref="https://juliadynamics.github.io/TimeseriesPrediction.jl/latest/stexamples/">the examples</a> in the documentation of the <ahref="https://github.com/JuliaDynamics/TimeseriesPrediction.jl">TimeseriesPrediction.jl</a> package. The <ahref="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/tree/dcb080376a7861716147c04e45c473f55bb9a078/examples">example files</a>, included together in the <ahref="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/blob/dcb080376a7861716147c04e45c473f55bb9a078/docs/src/stexamples.jl">stexamples.jl</a> file, are processed by literate via this <ahref="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/blob/dcb080376a7861716147c04e45c473f55bb9a078/docs/make.jl">make.jl</a> file to generate the markdown and code cells of the documentation.</p></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="outputformats.html">« <strong>4.</strong> Output Formats</a><aclass="docs-footer-nextpage"href="documenter.html"><strong>6.</strong> Interaction with Documenter.jl »</a></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Wednesday 9 October 2019 10:02">Wednesday 9 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
name = "markdown_file_name", preprocess = replace_includes)</code></pre><p>and you will see that in the final output file (here <code>markdown_file_name.md</code>) the <code>include</code> statements are replaced with the actual code to be included!</p><p>This approach is used for generating <ahref="https://juliadynamics.github.io/TimeseriesPrediction.jl/latest/stexamples/">the examples</a> in the documentation of the <ahref="https://github.com/JuliaDynamics/TimeseriesPrediction.jl">TimeseriesPrediction.jl</a> package. The <ahref="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/tree/dcb080376a7861716147c04e45c473f55bb9a078/examples">example files</a>, included together in the <ahref="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/blob/dcb080376a7861716147c04e45c473f55bb9a078/docs/src/stexamples.jl">stexamples.jl</a> file, are processed by literate via this <ahref="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/blob/dcb080376a7861716147c04e45c473f55bb9a078/docs/make.jl">make.jl</a> file to generate the markdown and code cells of the documentation.</p></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="outputformats.html">« <strong>4.</strong> Output Formats</a><aclass="docs-footer-nextpage"href="documenter.html"><strong>6.</strong> Interaction with Documenter.jl »</a></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Tuesday 15 October 2019 10:03">Tuesday 15 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
```</code></pre>is replaced with notebook compatible<pre><codeclass="language-none">$$
\int f dx
$$</code></pre></li></ul><h3id="[Literate.script](@ref):-1"><ahref="outputformats.html#Literate.script"><code>Literate.script</code></a>:<aclass="docs-heading-anchor"href="#[Literate.script](@ref):-1"title="Permalink"></a></h3><ul><li>Documenter style <code>@ref</code>s and <code>@id</code> will be removed. This means that you can use <code>@ref</code> and <code>@id</code> in the source file without them leaking to the script.</li></ul></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="customprocessing.html">« <strong>5.</strong> Custom pre- and post-processing</a><aclass="docs-footer-nextpage"href="generated/example.html"><strong>7.</strong> Example »</a></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Wednesday 9 October 2019 10:02">Wednesday 9 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
$$</code></pre></li></ul><h3id="[Literate.script](@ref):-1"><ahref="outputformats.html#Literate.script"><code>Literate.script</code></a>:<aclass="docs-heading-anchor"href="#[Literate.script](@ref):-1"title="Permalink"></a></h3><ul><li>Documenter style <code>@ref</code>s and <code>@id</code> will be removed. This means that you can use <code>@ref</code> and <code>@id</code> in the source file without them leaking to the script.</li></ul></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="customprocessing.html">« <strong>5.</strong> Custom pre- and post-processing</a><aclass="docs-footer-nextpage"href="generated/example.html"><strong>7.</strong> Example »</a></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Tuesday 15 October 2019 10:03">Tuesday 15 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
@ -15,4 +15,4 @@ z = x + y</code></pre><p>In the lines starting with <code>#</code> we can use re
@@ -15,4 +15,4 @@ z = x + y</code></pre><p>In the lines starting with <code>#</code> we can use re
#md # Literate.notebook
#md # Literate.markdown
#md # ```</code></pre><p>The lines in the example above would be filtered out in the preprocessing step, unless we are generating a markdown file. When generating a markdown file we would simple remove the leading <code>#md</code> from the lines. Beware that the space after the tag is also removed.</p><p>The <code>#src</code> token can also be placed at the <em>end</em> of a line. This is to make it possible to have code lines exclusive to the source code, and not just comment lines. For example, if the source file is included in the test suite we might want to add a <code>@test</code> at the end without this showing up in the outputs:</p><pre><codeclass="language-julia">using Test #src
@test result == expected_result #src</code></pre><h2id="Default-Replacements-1"><strong>2.3.</strong> Default Replacements<aclass="docs-heading-anchor"href="#Default-Replacements-1"title="Permalink"></a></h2><p>The following convenience "macros" are always expanded:</p><ul><li><p><code>@__NAME__</code></p><p>expands to the <code>name</code> keyword argument to <ahref="outputformats.html#Literate.markdown"><code>Literate.markdown</code></a>, <ahref="outputformats.html#Literate.notebook"><code>Literate.notebook</code></a> and <ahref="outputformats.html#Literate.script"><code>Literate.script</code></a> (defaults to the filename of the input file).</p></li><li><p><code>@__REPO_ROOT_URL__</code></p><p>expands to <code>https://github.com/$(ENV["TRAVIS_REPO_SLUG"])/blob/master</code> and is a convenient way to use when you want to link to files outside the doc-build directory. For example <code>@__REPO_ROOT_URL__/src/Literate.jl</code> would link to the source of the Literate module.</p></li><li><p><code>@__NBVIEWER_ROOT_URL__</code></p><p>expands to <code>https://nbviewer.jupyter.org/github/$(ENV["TRAVIS_REPO_SLUG"])/blob/gh-pages/$(folder)</code> where <code>folder</code> is the folder that <code>Documenter.deploydocs</code> deploys too. This can be used if you want a link that opens the generated notebook in <ahref="http://nbviewer.jupyter.org/">http://nbviewer.jupyter.org/</a>.</p></li><li><p><code>@__BINDER_ROOT_URL__</code></p><p>expands to <code>https://mybinder.org/v2/gh/$(ENV["TRAVIS_REPO_SLUG"])/$(branch)?filepath=$(folder)</code> where <code>branch</code>/<code>folder</code> is the branch and folder where <code>Documenter.deploydocs</code> deploys too. This can be used if you want a link that opens the generated notebook in <ahref="https://mybinder.org/">https://mybinder.org/</a>. To add a binder-badge in e.g. the HTML output you can use:</p><pre><codeclass="language-none">[](@__BINDER_ROOT_URL__/path/to/notebook.inpynb)</code></pre></li></ul><divclass="admonition is-info"><headerclass="admonition-header">Note</header><divclass="admonition-body"><p><code>@__REPO_ROOT_URL__</code> and <code>@__NBVIEWER_ROOT_URL__</code> works for documentation built with <ahref="https://github.com/JuliaDocs/DocumentationGenerator.jl">DocumentationGenerator.jl</a> but <code>@__BINDER_ROOT_URL__</code> does not, since <code>mybinder.org</code> requires the files to be located inside a git repository.</p></div></div></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="index.html">« <strong>1.</strong> Introduction</a><aclass="docs-footer-nextpage"href="pipeline.html"><strong>3.</strong> Processing pipeline »</a></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Wednesday 9 October 2019 10:02">Wednesday 9 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
@test result == expected_result #src</code></pre><h2id="Default-Replacements-1"><strong>2.3.</strong> Default Replacements<aclass="docs-heading-anchor"href="#Default-Replacements-1"title="Permalink"></a></h2><p>The following convenience "macros" are always expanded:</p><ul><li><p><code>@__NAME__</code></p><p>expands to the <code>name</code> keyword argument to <ahref="outputformats.html#Literate.markdown"><code>Literate.markdown</code></a>, <ahref="outputformats.html#Literate.notebook"><code>Literate.notebook</code></a> and <ahref="outputformats.html#Literate.script"><code>Literate.script</code></a> (defaults to the filename of the input file).</p></li><li><p><code>@__REPO_ROOT_URL__</code></p><p>expands to <code>https://github.com/$(ENV["TRAVIS_REPO_SLUG"])/blob/master</code> and is a convenient way to use when you want to link to files outside the doc-build directory. For example <code>@__REPO_ROOT_URL__/src/Literate.jl</code> would link to the source of the Literate module.</p></li><li><p><code>@__NBVIEWER_ROOT_URL__</code></p><p>expands to <code>https://nbviewer.jupyter.org/github/$(ENV["TRAVIS_REPO_SLUG"])/blob/gh-pages/$(folder)</code> where <code>folder</code> is the folder that <code>Documenter.deploydocs</code> deploys too. This can be used if you want a link that opens the generated notebook in <ahref="http://nbviewer.jupyter.org/">http://nbviewer.jupyter.org/</a>.</p></li><li><p><code>@__BINDER_ROOT_URL__</code></p><p>expands to <code>https://mybinder.org/v2/gh/$(ENV["TRAVIS_REPO_SLUG"])/$(branch)?filepath=$(folder)</code> where <code>branch</code>/<code>folder</code> is the branch and folder where <code>Documenter.deploydocs</code> deploys too. This can be used if you want a link that opens the generated notebook in <ahref="https://mybinder.org/">https://mybinder.org/</a>. To add a binder-badge in e.g. the HTML output you can use:</p><pre><codeclass="language-none">[](@__BINDER_ROOT_URL__/path/to/notebook.inpynb)</code></pre></li></ul><divclass="admonition is-info"><headerclass="admonition-header">Note</header><divclass="admonition-body"><p><code>@__REPO_ROOT_URL__</code> and <code>@__NBVIEWER_ROOT_URL__</code> works for documentation built with <ahref="https://github.com/JuliaDocs/DocumentationGenerator.jl">DocumentationGenerator.jl</a> but <code>@__BINDER_ROOT_URL__</code> does not, since <code>mybinder.org</code> requires the files to be located inside a git repository.</p></div></div></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="index.html">« <strong>1.</strong> Introduction</a><aclass="docs-footer-nextpage"href="pipeline.html"><strong>3.</strong> Processing pipeline »</a></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Tuesday 15 October 2019 10:03">Tuesday 15 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
<h3id="Custom-processing-1">Custom processing<aclass="docs-heading-anchor"href="#Custom-processing-1"title="Permalink"></a></h3><p>It is possible to give Literate custom pre- and post-processing functions. For example, here we insert two placeholders, which we will replace with something else at time of generation. We have here replaced our placeholders with <code>z</code> and <code>1.0 + 2.0im</code>:</p><pre><codeclass="language-julia">z = 1.0 + 2.0im</code></pre><pre><codeclass="language-none">1.0 + 2.0im</code></pre><h3id="documenter-interaction-1">Documenter.jl interaction<aclass="docs-heading-anchor"href="#documenter-interaction-1"title="Permalink"></a></h3><p>In the source file it is possible to use Documenter.jl style references, such as <code>@ref</code> and <code>@id</code>. These will be filtered out in the notebook output. For example, <ahref="example.html#documenter-interaction-1">here is a link</a>, but it is only visible as a link if you are reading the markdown output. We can also use equations:</p><div>\[\int_\Omega \nabla v \cdot \nabla u\ \mathrm{d}\Omega = \int_\Omega v f\ \mathrm{d}\Omega\]</div><p>using Documenters math syntax. Documenters syntax is automatically changed to <code>\begin{equation} ... \end{equation}</code> in the notebook output to display correctly.</p><p><em>This page was generated using <ahref="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../documenter.html">« <strong>6.</strong> Interaction with Documenter.jl</a></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Wednesday 9 October 2019 10:02">Wednesday 9 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
<h3id="Custom-processing-1">Custom processing<aclass="docs-heading-anchor"href="#Custom-processing-1"title="Permalink"></a></h3><p>It is possible to give Literate custom pre- and post-processing functions. For example, here we insert two placeholders, which we will replace with something else at time of generation. We have here replaced our placeholders with <code>z</code> and <code>1.0 + 2.0im</code>:</p><pre><codeclass="language-julia">z = 1.0 + 2.0im</code></pre><pre><codeclass="language-none">1.0 + 2.0im</code></pre><h3id="documenter-interaction-1">Documenter.jl interaction<aclass="docs-heading-anchor"href="#documenter-interaction-1"title="Permalink"></a></h3><p>In the source file it is possible to use Documenter.jl style references, such as <code>@ref</code> and <code>@id</code>. These will be filtered out in the notebook output. For example, <ahref="example.html#documenter-interaction-1">here is a link</a>, but it is only visible as a link if you are reading the markdown output. We can also use equations:</p><div>\[\int_\Omega \nabla v \cdot \nabla u\ \mathrm{d}\Omega = \int_\Omega v f\ \mathrm{d}\Omega\]</div><p>using Documenters math syntax. Documenters syntax is automatically changed to <code>\begin{equation} ... \end{equation}</code> in the notebook output to display correctly.</p><p><em>This page was generated using <ahref="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../documenter.html">« <strong>6.</strong> Interaction with Documenter.jl</a></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Tuesday 15 October 2019 10:03">Tuesday 15 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
@ -29,4 +29,4 @@ x = 1 // 3
@@ -29,4 +29,4 @@ x = 1 // 3
y = 2 // 5</code></pre><p>Chunk #3:</p><pre><codeclass="language-markdown">When adding `x` and `y` together we obtain a new rational number:</code></pre><p>Chunk #4:</p><pre><codeclass="language-julia">z = x + y</code></pre><p>It is then up to the <ahref="pipeline.html#Document-generation-1">Document generation</a> step to decide how these chunks should be treated.</p><h3id="Custom-control-over-chunk-splits-1">Custom control over chunk splits<aclass="docs-heading-anchor"href="#Custom-control-over-chunk-splits-1"title="Permalink"></a></h3><p>Sometimes it is convenient to be able to manually control how the chunks are split. For example, if you want to split a block of code into two, such that they end up in two different <code>@example</code> blocks or notebook cells. The <code>#-</code> token can be used for this purpose. All lines starting with <code>#-</code> are used as "chunk-splitters":</p><pre><codeclass="language-julia">x = 1 // 3
y = 2 // 5
#-
z = x + y</code></pre><p>The example above would result in two consecutive code-chunks.</p><divclass="admonition is-success"><headerclass="admonition-header">Tip</header><divclass="admonition-body"><p>The rest of the line, after <code>#-</code>, is discarded, so it is possible to use e.g. <code>#-------------</code> as a chunk splitter, which may make the source code more readable.</p></div></div><p>It is also possible to use <code>#+</code> as a chunk splitter. The difference between <code>#+</code> and <code>#-</code> is that <code>#+</code> enables Documenter's "continued"-blocks, see the <ahref="https://juliadocs.github.io/Documenter.jl/stable/">Documenter manual</a>.</p><h2id="Document-generation-1"><strong>3.3.</strong> Document generation<aclass="docs-heading-anchor"href="#Document-generation-1"title="Permalink"></a></h2><p>After the parsing it is time to generate the output. What is done in this step is very different depending on the output target, and it is describe in more detail in the Output format sections: <ahref="outputformats.html#Markdown-Output-1">Markdown Output</a>, <ahref="outputformats.html#Notebook-Output-1">Notebook Output</a> and <ahref="outputformats.html#Script-Output-1">Script Output</a>. Using the default settings, the following is happening:</p><ul><li>Markdown output: markdown chunks are printed as-is, code chunks are put inside a code fence (defaults to <code>@example</code>-blocks),</li><li>Notebook output: markdown chunks are printed in markdown cells, code chunks are put in code cells,</li><li>Script output: markdown chunks are discarded, code chunks are printed as-is.</li></ul><h2id="Post-processing-1"><strong>3.4.</strong> Post-processing<aclass="docs-heading-anchor"href="#Post-processing-1"title="Permalink"></a></h2><p>When the document is generated the user, again, has the option to hook-into the generation with a custom post-processing function. The reason is that one might want to change things that are only visible in the rendered document. See <ahref="customprocessing.html#Custom-pre-and-post-processing-1">Custom pre- and post-processing</a>.</p><h2id="Writing-to-file-1"><strong>3.5.</strong> Writing to file<aclass="docs-heading-anchor"href="#Writing-to-file-1"title="Permalink"></a></h2><p>The last step of the generation is writing to file. The result is written to <code>$(outputdir)/$(name)(.md|.ipynb|.jl)</code> where <code>outputdir</code> is the output directory supplied by the user (for example <code>docs/generated</code>), and <code>name</code> is a user supplied filename. It is recommended to add the output directory to <code>.gitignore</code> since the idea is that the generated documents will be generated as part of the build process rather than beeing files in the repo.</p></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="fileformat.html">« <strong>2.</strong> File Format</a><aclass="docs-footer-nextpage"href="outputformats.html"><strong>4.</strong> Output Formats »</a></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Wednesday 9 October 2019 10:02">Wednesday 9 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
z = x + y</code></pre><p>The example above would result in two consecutive code-chunks.</p><divclass="admonition is-success"><headerclass="admonition-header">Tip</header><divclass="admonition-body"><p>The rest of the line, after <code>#-</code>, is discarded, so it is possible to use e.g. <code>#-------------</code> as a chunk splitter, which may make the source code more readable.</p></div></div><p>It is also possible to use <code>#+</code> as a chunk splitter. The difference between <code>#+</code> and <code>#-</code> is that <code>#+</code> enables Documenter's "continued"-blocks, see the <ahref="https://juliadocs.github.io/Documenter.jl/stable/">Documenter manual</a>.</p><h2id="Document-generation-1"><strong>3.3.</strong> Document generation<aclass="docs-heading-anchor"href="#Document-generation-1"title="Permalink"></a></h2><p>After the parsing it is time to generate the output. What is done in this step is very different depending on the output target, and it is describe in more detail in the Output format sections: <ahref="outputformats.html#Markdown-Output-1">Markdown Output</a>, <ahref="outputformats.html#Notebook-Output-1">Notebook Output</a> and <ahref="outputformats.html#Script-Output-1">Script Output</a>. Using the default settings, the following is happening:</p><ul><li>Markdown output: markdown chunks are printed as-is, code chunks are put inside a code fence (defaults to <code>@example</code>-blocks),</li><li>Notebook output: markdown chunks are printed in markdown cells, code chunks are put in code cells,</li><li>Script output: markdown chunks are discarded, code chunks are printed as-is.</li></ul><h2id="Post-processing-1"><strong>3.4.</strong> Post-processing<aclass="docs-heading-anchor"href="#Post-processing-1"title="Permalink"></a></h2><p>When the document is generated the user, again, has the option to hook-into the generation with a custom post-processing function. The reason is that one might want to change things that are only visible in the rendered document. See <ahref="customprocessing.html#Custom-pre-and-post-processing-1">Custom pre- and post-processing</a>.</p><h2id="Writing-to-file-1"><strong>3.5.</strong> Writing to file<aclass="docs-heading-anchor"href="#Writing-to-file-1"title="Permalink"></a></h2><p>The last step of the generation is writing to file. The result is written to <code>$(outputdir)/$(name)(.md|.ipynb|.jl)</code> where <code>outputdir</code> is the output directory supplied by the user (for example <code>docs/generated</code>), and <code>name</code> is a user supplied filename. It is recommended to add the output directory to <code>.gitignore</code> since the idea is that the generated documents will be generated as part of the build process rather than beeing files in the repo.</p></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="fileformat.html">« <strong>2.</strong> File Format</a><aclass="docs-footer-nextpage"href="outputformats.html"><strong>4.</strong> Output Formats »</a></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Tuesday 15 October 2019 10:03">Tuesday 15 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Search · Literate.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.css"rel="stylesheet"type="text/css"/><script>documenterBaseURL="."</script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js"data-main="assets/documenter.js"></script><scriptsrc="siteinfo.js"></script><scriptsrc="../versions.js"></script><linkhref="assets/custom.css"rel="stylesheet"type="text/css"/><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="assets/themes/documenter-dark.css"data-theme-name="documenter-dark"/><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="assets/themes/documenter-light.css"data-theme-name="documenter-light"data-theme-primary/><scriptsrc="assets/themeswap.js"></script></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="index.html"><imgsrc="assets/logo.png"alt="Literate.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">Literate.jl</span></div><formclass="docs-search"action="search.html"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="index.html"><strong>1.</strong> Introduction</a></li><li><aclass="tocitem"href="fileformat.html"><strong>2.</strong> File Format</a></li><li><aclass="tocitem"href="pipeline.html"><strong>3.</strong> Processing pipeline</a></li><li><aclass="tocitem"href="outputformats.html"><strong>4.</strong> Output Formats</a></li><li><aclass="tocitem"href="customprocessing.html"><strong>5.</strong> Custom pre- and post-processing</a></li><li><aclass="tocitem"href="documenter.html"><strong>6.</strong> Interaction with Documenter.jl</a></li><li><aclass="tocitem"href="generated/example.html"><strong>7.</strong> Example</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><liclass="is-active"><ahref="search.html">Search</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref="search.html">Search</a></li></ul></nav><divclass="docs-right"><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><article><pid="documenter-search-info">Loading search...</p><ulid="documenter-search-results"></ul></article></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Wednesday 9 October 2019 10:02">Wednesday 9 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body><scriptsrc="search_index.js"></script><scriptsrc="assets/search.js"></script></html>
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Search · Literate.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.css"rel="stylesheet"type="text/css"/><script>documenterBaseURL="."</script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js"data-main="assets/documenter.js"></script><scriptsrc="siteinfo.js"></script><scriptsrc="../versions.js"></script><linkhref="assets/custom.css"rel="stylesheet"type="text/css"/><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="assets/themes/documenter-dark.css"data-theme-name="documenter-dark"/><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="assets/themes/documenter-light.css"data-theme-name="documenter-light"data-theme-primary/><scriptsrc="assets/themeswap.js"></script></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="index.html"><imgsrc="assets/logo.png"alt="Literate.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">Literate.jl</span></div><formclass="docs-search"action="search.html"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="index.html"><strong>1.</strong> Introduction</a></li><li><aclass="tocitem"href="fileformat.html"><strong>2.</strong> File Format</a></li><li><aclass="tocitem"href="pipeline.html"><strong>3.</strong> Processing pipeline</a></li><li><aclass="tocitem"href="outputformats.html"><strong>4.</strong> Output Formats</a></li><li><aclass="tocitem"href="customprocessing.html"><strong>5.</strong> Custom pre- and post-processing</a></li><li><aclass="tocitem"href="documenter.html"><strong>6.</strong> Interaction with Documenter.jl</a></li><li><aclass="tocitem"href="generated/example.html"><strong>7.</strong> Example</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><liclass="is-active"><ahref="search.html">Search</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref="search.html">Search</a></li></ul></nav><divclass="docs-right"><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><article><pid="documenter-search-info">Loading search...</p><ulid="documenter-search-results"></ul></article></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Tuesday 15 October 2019 10:03">Tuesday 15 October 2019</span>. Using Julia version 1.2.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body><scriptsrc="search_index.js"></script><scriptsrc="assets/search.js"></script></html>