Browse Source

build based on 90b2468

gh-pages
Documenter.jl 1 year ago
parent
commit
7519e6cc67
  1. 2
      dev/.documenter-siteinfo.json
  2. 53
      dev/assets/documenter.js
  3. 2
      dev/assets/themes/catppuccin-frappe.css
  4. 2
      dev/assets/themes/catppuccin-latte.css
  5. 2
      dev/assets/themes/catppuccin-macchiato.css
  6. 2
      dev/assets/themes/catppuccin-mocha.css
  7. 2
      dev/assets/themes/documenter-dark.css
  8. 2
      dev/assets/themes/documenter-light.css
  9. 4
      dev/changelog/index.html
  10. 2
      dev/customprocessing/index.html
  11. 2
      dev/documenter/index.html
  12. 2
      dev/fileformat/index.html
  13. 128
      dev/generated/example.ipynb
  14. 64
      dev/generated/example/cefaa8f2.svg
  15. 4
      dev/generated/example/index.html
  16. 2
      dev/generated/name/index.html
  17. 2
      dev/index.html
  18. BIN
      dev/objects.inv
  19. 6
      dev/outputformats/index.html
  20. 2
      dev/pipeline/index.html
  21. 2
      dev/reference/index.html
  22. 2
      dev/search_index.js
  23. 2
      dev/tips/index.html

2
dev/.documenter-siteinfo.json

@ -1 +1 @@ @@ -1 +1 @@
{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-13T07:07:08","documenter_version":"1.5.0"}}
{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-13T07:14:57","documenter_version":"1.7.0"}}

53
dev/assets/documenter.js

@ -77,30 +77,35 @@ require(['jquery'], function($) { @@ -77,30 +77,35 @@ require(['jquery'], function($) {
let timer = 0;
var isExpanded = true;
$(document).on("click", ".docstring header", function () {
let articleToggleTitle = "Expand docstring";
debounce(() => {
if ($(this).siblings("section").is(":visible")) {
$(this)
.find(".docstring-article-toggle-button")
.removeClass("fa-chevron-down")
.addClass("fa-chevron-right");
} else {
$(this)
.find(".docstring-article-toggle-button")
.removeClass("fa-chevron-right")
.addClass("fa-chevron-down");
$(document).on(
"click",
".docstring .docstring-article-toggle-button",
function () {
let articleToggleTitle = "Expand docstring";
const parent = $(this).parent();
debounce(() => {
if (parent.siblings("section").is(":visible")) {
parent
.find("a.docstring-article-toggle-button")
.removeClass("fa-chevron-down")
.addClass("fa-chevron-right");
} else {
parent
.find("a.docstring-article-toggle-button")
.removeClass("fa-chevron-right")
.addClass("fa-chevron-down");
articleToggleTitle = "Collapse docstring";
}
articleToggleTitle = "Collapse docstring";
}
$(this)
.find(".docstring-article-toggle-button")
.prop("title", articleToggleTitle);
$(this).siblings("section").slideToggle();
});
});
parent
.children(".docstring-article-toggle-button")
.prop("title", articleToggleTitle);
parent.siblings("section").slideToggle();
});
}
);
$(document).on("click", ".docs-article-toggle-button", function (event) {
let articleToggleTitle = "Expand docstring";
@ -110,7 +115,7 @@ $(document).on("click", ".docs-article-toggle-button", function (event) { @@ -110,7 +115,7 @@ $(document).on("click", ".docs-article-toggle-button", function (event) {
debounce(() => {
if (isExpanded) {
$(this).removeClass("fa-chevron-up").addClass("fa-chevron-down");
$(".docstring-article-toggle-button")
$("a.docstring-article-toggle-button")
.removeClass("fa-chevron-down")
.addClass("fa-chevron-right");
@ -119,7 +124,7 @@ $(document).on("click", ".docs-article-toggle-button", function (event) { @@ -119,7 +124,7 @@ $(document).on("click", ".docs-article-toggle-button", function (event) {
$(".docstring section").slideUp(animationSpeed);
} else {
$(this).removeClass("fa-chevron-down").addClass("fa-chevron-up");
$(".docstring-article-toggle-button")
$("a.docstring-article-toggle-button")
.removeClass("fa-chevron-right")
.addClass("fa-chevron-down");

2
dev/assets/themes/catppuccin-frappe.css

File diff suppressed because one or more lines are too long

2
dev/assets/themes/catppuccin-latte.css

File diff suppressed because one or more lines are too long

2
dev/assets/themes/catppuccin-macchiato.css

File diff suppressed because one or more lines are too long

2
dev/assets/themes/catppuccin-mocha.css

File diff suppressed because one or more lines are too long

2
dev/assets/themes/documenter-dark.css

File diff suppressed because one or more lines are too long

2
dev/assets/themes/documenter-light.css

File diff suppressed because one or more lines are too long

4
dev/changelog/index.html

File diff suppressed because one or more lines are too long

2
dev/customprocessing/index.html

@ -26,4 +26,4 @@ include(&quot;file2.jl&quot;)</code></pre><p>Let&#39;s say we have saved this fi @@ -26,4 +26,4 @@ include(&quot;file2.jl&quot;)</code></pre><p>Let&#39;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. <a href="../outputformats/#Literate.markdown"><code>Literate.markdown</code></a> as</p><pre><code class="language-julia hljs">Literate.markdown(&quot;examples.jl&quot;, &quot;path/to/save/markdown&quot;;
name = &quot;markdown_file_name&quot;, 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 <a href="https://juliadynamics.github.io/TimeseriesPrediction.jl/latest/stexamples/">the examples</a> in the documentation of the <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl">TimeseriesPrediction.jl</a> package. The <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/tree/dcb080376a7861716147c04e45c473f55bb9a078/examples">example files</a>, included together in the <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/blob/dcb080376a7861716147c04e45c473f55bb9a078/docs/src/stexamples.jl">stexamples.jl</a> file, are processed by literate via this <a href="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><nav class="docs-footer"><a class="docs-footer-prevpage" href="../outputformats/">« <strong>4.</strong> Output formats</a><a class="docs-footer-nextpage" href="../documenter/"><strong>6.</strong> Interaction with Documenter.jl »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Friday 13 September 2024 07:07">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
name = &quot;markdown_file_name&quot;, 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 <a href="https://juliadynamics.github.io/TimeseriesPrediction.jl/latest/stexamples/">the examples</a> in the documentation of the <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl">TimeseriesPrediction.jl</a> package. The <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/tree/dcb080376a7861716147c04e45c473f55bb9a078/examples">example files</a>, included together in the <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/blob/dcb080376a7861716147c04e45c473f55bb9a078/docs/src/stexamples.jl">stexamples.jl</a> file, are processed by literate via this <a href="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><nav class="docs-footer"><a class="docs-footer-prevpage" href="../outputformats/">« <strong>4.</strong> Output formats</a><a class="docs-footer-nextpage" href="../documenter/"><strong>6.</strong> Interaction with Documenter.jl »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Friday 13 September 2024 07:14">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

2
dev/documenter/index.html

@ -11,4 +11,4 @@ EditURL = &quot;$(relpath(inputfile, outputdir))&quot; @@ -11,4 +11,4 @@ EditURL = &quot;$(relpath(inputfile, outputdir))&quot;
\int f dx
$$</code></pre></li><li>Whereas Documenter requires HTML blocks to be escaped<pre><code class="nohighlight hljs">```@raw html
&lt;tag&gt;...&lt;/tag&gt;
```</code></pre>the output to a notebook markdown cell will be raw HTML<pre><code class="nohighlight hljs">&lt;tag&gt;...&lt;/tag&gt;</code></pre></li></ul><h3 id="[Literate.script](@ref):"><a class="docs-heading-anchor" href="#[Literate.script](@ref):"><a href="../outputformats/#Literate.script"><code>Literate.script</code></a>:</a><a id="[Literate.script](@ref):-1"></a><a class="docs-heading-anchor-permalink" href="#[Literate.script](@ref):" title="Permalink"></a></h3><ul><li>Documenter style <code>@ref</code>s, <code>@extref</code>s and <code>@id</code> will be removed. This means that you can use <code>@ref</code>, <code>@extref</code> and <code>@id</code> in the source file without them leaking to the script.</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../customprocessing/">« <strong>5.</strong> Custom pre- and post-processing</a><a class="docs-footer-nextpage" href="../tips/"><strong>7.</strong> Tips and tricks »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Friday 13 September 2024 07:07">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
```</code></pre>the output to a notebook markdown cell will be raw HTML<pre><code class="nohighlight hljs">&lt;tag&gt;...&lt;/tag&gt;</code></pre></li></ul><h3 id="[Literate.script](@ref):"><a class="docs-heading-anchor" href="#[Literate.script](@ref):"><a href="../outputformats/#Literate.script"><code>Literate.script</code></a>:</a><a id="[Literate.script](@ref):-1"></a><a class="docs-heading-anchor-permalink" href="#[Literate.script](@ref):" title="Permalink"></a></h3><ul><li>Documenter style <code>@ref</code>s, <code>@extref</code>s and <code>@id</code> will be removed. This means that you can use <code>@ref</code>, <code>@extref</code> and <code>@id</code> in the source file without them leaking to the script.</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../customprocessing/">« <strong>5.</strong> Custom pre- and post-processing</a><a class="docs-footer-nextpage" href="../tips/"><strong>7.</strong> Tips and tricks »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Friday 13 September 2024 07:14">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

2
dev/fileformat/index.html

@ -29,4 +29,4 @@ blah blah blah @@ -29,4 +29,4 @@ blah blah blah
#md # Literate.notebook
#md # Literate.script
#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 simply 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><code class="language-julia hljs">using Test #src
@test result == expected_result #src</code></pre><h2 id="Default-replacements"><a class="docs-heading-anchor" href="#Default-replacements"><strong>2.3.</strong> Default replacements</a><a id="Default-replacements-1"></a><a class="docs-heading-anchor-permalink" href="#Default-replacements" title="Permalink"></a></h2><p>The following convenience &quot;macros&quot;/source placeholders are always expanded:</p><ul><li><p><code>@__NAME__</code>:</p><p>expands to the <code>name</code> keyword argument to <a href="../outputformats/#Literate.markdown"><code>Literate.markdown</code></a>, <a href="../outputformats/#Literate.notebook"><code>Literate.notebook</code></a> and <a href="../outputformats/#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>Can be used to link to files in the repository. For example <code>@__REPO_ROOT_URL__/src/Literate.jl</code> would link to the <a href="https://github.com/fredrikekre/Literate.jl/blob/master/src/Literate.jl">source of the Literate module</a>. This variable is automatically determined on Travis CI, GitHub Actions and GitLab CI, but can be configured, see <a href="../outputformats/#Configuration">Configuration</a>.</p></li><li><p><code>@__NBVIEWER_ROOT_URL__</code>:</p><p>Can be used if you want a link that opens the generated notebook in <a href="http://nbviewer.jupyter.org/">http://nbviewer.jupyter.org/</a>. This variable is automatically determined on Travis CI, GitHub Actions and GitLab CI, but can be configured, see <a href="../outputformats/#Configuration">Configuration</a>.</p></li><li><p><code>@__BINDER_ROOT_URL__</code>:</p><p>Can be used if you want a link that opens the generated notebook in <a href="https://mybinder.org/">https://mybinder.org/</a>. For example, to add a binder-badge in e.g. the HTML output you can use:</p><pre><code class="nohighlight hljs">[![Binder](https://mybinder.org/badge_logo.svg)](@__BINDER_ROOT_URL__/path/to/notebook.inpynb)</code></pre><p>This variable is automatically determined on Travis CI, GitHub Actions and GitLab CI, but can be configured, see <a href="../outputformats/#Configuration">Configuration</a>.</p></li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« <strong>1.</strong> Introduction</a><a class="docs-footer-nextpage" href="../pipeline/"><strong>3.</strong> Processing pipeline »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Friday 13 September 2024 07:07">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
@test result == expected_result #src</code></pre><h2 id="Default-replacements"><a class="docs-heading-anchor" href="#Default-replacements"><strong>2.3.</strong> Default replacements</a><a id="Default-replacements-1"></a><a class="docs-heading-anchor-permalink" href="#Default-replacements" title="Permalink"></a></h2><p>The following convenience &quot;macros&quot;/source placeholders are always expanded:</p><ul><li><p><code>@__NAME__</code>:</p><p>expands to the <code>name</code> keyword argument to <a href="../outputformats/#Literate.markdown"><code>Literate.markdown</code></a>, <a href="../outputformats/#Literate.notebook"><code>Literate.notebook</code></a> and <a href="../outputformats/#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>Can be used to link to files in the repository. For example <code>@__REPO_ROOT_URL__/src/Literate.jl</code> would link to the <a href="https://github.com/fredrikekre/Literate.jl/blob/master/src/Literate.jl">source of the Literate module</a>. This variable is automatically determined on Travis CI, GitHub Actions and GitLab CI, but can be configured, see <a href="../outputformats/#Configuration">Configuration</a>.</p></li><li><p><code>@__NBVIEWER_ROOT_URL__</code>:</p><p>Can be used if you want a link that opens the generated notebook in <a href="http://nbviewer.jupyter.org/">http://nbviewer.jupyter.org/</a>. This variable is automatically determined on Travis CI, GitHub Actions and GitLab CI, but can be configured, see <a href="../outputformats/#Configuration">Configuration</a>.</p></li><li><p><code>@__BINDER_ROOT_URL__</code>:</p><p>Can be used if you want a link that opens the generated notebook in <a href="https://mybinder.org/">https://mybinder.org/</a>. For example, to add a binder-badge in e.g. the HTML output you can use:</p><pre><code class="nohighlight hljs">[![Binder](https://mybinder.org/badge_logo.svg)](@__BINDER_ROOT_URL__/path/to/notebook.inpynb)</code></pre><p>This variable is automatically determined on Travis CI, GitHub Actions and GitLab CI, but can be configured, see <a href="../outputformats/#Configuration">Configuration</a>.</p></li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« <strong>1.</strong> Introduction</a><a class="docs-footer-nextpage" href="../pipeline/"><strong>3.</strong> Processing pipeline »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Friday 13 September 2024 07:14">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

128
dev/generated/example.ipynb

File diff suppressed because one or more lines are too long

64
dev/generated/example/f8fc77e4.svg → dev/generated/example/cefaa8f2.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

4
dev/generated/example/index.html

@ -13,7 +13,7 @@ foo()</code></pre><pre class="documenter-example-output"><code class="nohighligh @@ -13,7 +13,7 @@ foo()</code></pre><pre class="documenter-example-output"><code class="nohighligh
x = range(0, stop=6π, length=1000)
y1 = sin.(x)
y2 = cos.(x)
plot(x, [y1, y2])</code></pre><img src="f8fc77e4.svg" alt="Example block output"/><h3 id="Custom-processing"><a class="docs-heading-anchor" href="#Custom-processing">Custom processing</a><a id="Custom-processing-1"></a><a class="docs-heading-anchor-permalink" href="#Custom-processing" title="Permalink"></a></h3><p>It is possible to give Literate custom pre- and post-processing functions. For example, here we insert a placeholder value <code>y = 321</code> in the source, and use a preprocessing function that replaces it with <code>y = 321</code> in the rendered output.</p><pre><code class="language-julia hljs">x = 123</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">123</code></pre><p>In this case the preprocessing function is defined by</p><pre><code class="language-julia hljs">function pre(s::String)
plot(x, [y1, y2])</code></pre><img src="cefaa8f2.svg" alt="Example block output"/><h3 id="Custom-processing"><a class="docs-heading-anchor" href="#Custom-processing">Custom processing</a><a id="Custom-processing-1"></a><a class="docs-heading-anchor-permalink" href="#Custom-processing" title="Permalink"></a></h3><p>It is possible to give Literate custom pre- and post-processing functions. For example, here we insert a placeholder value <code>y = 321</code> in the source, and use a preprocessing function that replaces it with <code>y = 321</code> in the rendered output.</p><pre><code class="language-julia hljs">x = 123</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">123</code></pre><p>In this case the preprocessing function is defined by</p><pre><code class="language-julia hljs">function pre(s::String)
s = replace(s, &quot;x = 123&quot; =&gt; &quot;y = 321&quot;)
return s
end</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">pre (generic function with 1 method)</code></pre><h3 id="documenter-interaction"><a class="docs-heading-anchor" href="#documenter-interaction">Documenter.jl interaction</a><a id="documenter-interaction-1"></a><a class="docs-heading-anchor-permalink" href="#documenter-interaction" 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, <a href="#documenter-interaction">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><p class="math-container">\[\int_\Omega \nabla v \cdot \nabla u\ \mathrm{d}\Omega = \int_\Omega v f\ \mathrm{d}\Omega\]</p><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><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../tips/">« <strong>7.</strong> Tips and tricks</a><a class="docs-footer-nextpage" href="../../changelog/"><strong>9.</strong> Changelog »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Friday 13 September 2024 07:07">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
end</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">pre (generic function with 1 method)</code></pre><h3 id="documenter-interaction"><a class="docs-heading-anchor" href="#documenter-interaction">Documenter.jl interaction</a><a id="documenter-interaction-1"></a><a class="docs-heading-anchor-permalink" href="#documenter-interaction" 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, <a href="#documenter-interaction">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><p class="math-container">\[\int_\Omega \nabla v \cdot \nabla u\ \mathrm{d}\Omega = \int_\Omega v f\ \mathrm{d}\Omega\]</p><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><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../tips/">« <strong>7.</strong> Tips and tricks</a><a class="docs-footer-nextpage" href="../../changelog/"><strong>9.</strong> Changelog »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Friday 13 September 2024 07:14">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

2
dev/generated/name/index.html

File diff suppressed because one or more lines are too long

2
dev/index.html

File diff suppressed because one or more lines are too long

BIN
dev/objects.inv

Binary file not shown.

6
dev/outputformats/index.html

File diff suppressed because one or more lines are too long

2
dev/pipeline/index.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><code class="language-markdown hljs">When adding `x` and `y` together we obtain a new rational number:</code></pre><p>Chunk #4:</p><pre><code class="language-julia hljs">z = x + y</code></pre><p>It is then up to the <a href="#Document-generation">Document generation</a> step to decide how these chunks should be treated.</p><h3 id="Custom-control-over-chunk-splits"><a class="docs-heading-anchor" href="#Custom-control-over-chunk-splits">Custom control over chunk splits</a><a id="Custom-control-over-chunk-splits-1"></a><a class="docs-heading-anchor-permalink" href="#Custom-control-over-chunk-splits" 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 &quot;chunk-splitters&quot;:</p><pre><code class="language-julia hljs">x = 1 // 3
y = 2 // 5
#-
z = x + y</code></pre><p>The example above would result in two consecutive code-chunks.</p><div class="admonition is-success"><header class="admonition-header">Tip</header><div class="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&#39;s &quot;continued&quot;-blocks, see the <a href="https://juliadocs.github.io/Documenter.jl/stable/">Documenter manual</a>.</p><h2 id="Document-generation"><a class="docs-heading-anchor" href="#Document-generation"><strong>3.3.</strong> Document generation</a><a id="Document-generation-1"></a><a class="docs-heading-anchor-permalink" href="#Document-generation" 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 described in more detail in the Output format sections: <a href="../outputformats/#Markdown-output">Markdown output</a>, <a href="../outputformats/#Notebook-output">Notebook output</a> and <a href="../outputformats/#Script-output">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><h2 id="Post-processing"><a class="docs-heading-anchor" href="#Post-processing"><strong>3.4.</strong> Post-processing</a><a id="Post-processing-1"></a><a class="docs-heading-anchor-permalink" href="#Post-processing" 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 <a href="../customprocessing/#Custom-pre-and-post-processing">Custom pre- and post-processing</a>.</p><h2 id="Writing-to-file"><a class="docs-heading-anchor" href="#Writing-to-file"><strong>3.5.</strong> Writing to file</a><a id="Writing-to-file-1"></a><a class="docs-heading-anchor-permalink" href="#Writing-to-file" 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 being files in the repo.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../fileformat/">« <strong>2.</strong> File format</a><a class="docs-footer-nextpage" href="../outputformats/"><strong>4.</strong> Output formats »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Friday 13 September 2024 07:07">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="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><div class="admonition is-success"><header class="admonition-header">Tip</header><div class="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&#39;s &quot;continued&quot;-blocks, see the <a href="https://juliadocs.github.io/Documenter.jl/stable/">Documenter manual</a>.</p><h2 id="Document-generation"><a class="docs-heading-anchor" href="#Document-generation"><strong>3.3.</strong> Document generation</a><a id="Document-generation-1"></a><a class="docs-heading-anchor-permalink" href="#Document-generation" 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 described in more detail in the Output format sections: <a href="../outputformats/#Markdown-output">Markdown output</a>, <a href="../outputformats/#Notebook-output">Notebook output</a> and <a href="../outputformats/#Script-output">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><h2 id="Post-processing"><a class="docs-heading-anchor" href="#Post-processing"><strong>3.4.</strong> Post-processing</a><a id="Post-processing-1"></a><a class="docs-heading-anchor-permalink" href="#Post-processing" 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 <a href="../customprocessing/#Custom-pre-and-post-processing">Custom pre- and post-processing</a>.</p><h2 id="Writing-to-file"><a class="docs-heading-anchor" href="#Writing-to-file"><strong>3.5.</strong> Writing to file</a><a id="Writing-to-file-1"></a><a class="docs-heading-anchor-permalink" href="#Writing-to-file" 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 being files in the repo.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../fileformat/">« <strong>2.</strong> File format</a><a class="docs-footer-nextpage" href="../outputformats/"><strong>4.</strong> Output formats »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Friday 13 September 2024 07:14">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

2
dev/reference/index.html

File diff suppressed because one or more lines are too long

2
dev/search_index.js

File diff suppressed because one or more lines are too long

2
dev/tips/index.html

@ -27,4 +27,4 @@ Literate.notebook(&quot;example.jl&quot;, &quot;tmp/&quot;; preprocess = nb_note @@ -27,4 +27,4 @@ Literate.notebook(&quot;example.jl&quot;, &quot;tmp/&quot;; preprocess = nb_note
This is a useful note.</code></pre><p>and a quotation style formatting in the generated notebook cell:</p><pre><code class="language-julia hljs">&gt; *Note*
&gt; This is a useful note.</code></pre><p>which, in an actual notebook cell, will look similar to:</p><blockquote><p><em>Note</em><br/>This is a useful note.</p></blockquote><h3 id="debug-execution"><a class="docs-heading-anchor" href="#debug-execution">Debugging code execution</a><a id="debug-execution-1"></a><a class="docs-heading-anchor-permalink" href="#debug-execution" title="Permalink"></a></h3><p>When Literate is executing code (i.e. when <code>execute = true</code> is set), it does so quietly. All the output gets captured and nothing gets printed into the terminal. This can make it tricky to know where things go wrong, e.g. when the execution stalls due to an infinite loop.</p><p>To help debug this, Literate has an <code>@debug</code> statement that prints out each code block that is being executed. In general, to enable the printing of Literate&#39;s <code>@debug</code> statements, you can set the <code>JULIA_DEBUG</code> environment variable to <code>&quot;Literate&quot;</code>.</p><p>The easiest way to do that is to set the variable in the Julia session before running Literate by doing</p><pre><code class="language-julia hljs">ENV[&quot;JULIA_DEBUG&quot;]=&quot;Literate&quot;</code></pre><p>Alternatively, you can also set the environment variable before starting the Julia session, e.g.</p><pre><code class="language-sh hljs">$ JULIA_DEBUG=Literate julia</code></pre><p>or by wrapping the Literate calls in an <code>withenv</code> block</p><pre><code class="language-julia hljs">withenv(&quot;JULIA_DEBUG&quot; =&gt; &quot;Literate&quot;) do
Literate.notebook(&quot;myscript.jl&quot;; execute=true)
end</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../documenter/">« <strong>6.</strong> Interaction with Documenter.jl</a><a class="docs-footer-nextpage" href="../generated/example/"><strong>8.</strong> Example »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Friday 13 September 2024 07:07">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
end</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../documenter/">« <strong>6.</strong> Interaction with Documenter.jl</a><a class="docs-footer-nextpage" href="../generated/example/"><strong>8.</strong> Example »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Friday 13 September 2024 07:14">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

Loading…
Cancel
Save