build based on 629d540

gh-pages
zeptodoctor 2020-03-18 02:13:34 +00:00
parent 4977e2d005
commit 2a4ac0176f
8 changed files with 10 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -11,4 +11,4 @@ weave(joinpath(dirname(pathof(Weave)), "../examples", "FIR_design
#Markdown
weave(joinpath(dirname(pathof(Weave)), "../examples", "FIR_design.jmd"),
doctype="pandoc",
out_path=:pwd)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Weave.jl - Scientific Reports Using Julia</a><a class="docs-footer-nextpage" href="../usage/">Using Weave »</a></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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 18 March 2020 01:46">Wednesday 18 March 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
out_path=:pwd)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Weave.jl - Scientific Reports Using Julia</a><a class="docs-footer-nextpage" href="../usage/">Using Weave »</a></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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 18 March 2020 02:10">Wednesday 18 March 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,4 +6,4 @@ date: 15th December 2016
---</code></pre><p>Here is a a sample document and output:</p><p><a href="../examples/FIR_design_plots.jl">FIR<em>design</em>plots.jl</a>, <a href="../examples/FIR_design_plots.html">FIR<em>design</em>plots.html</a> , <a href="../examples/FIR_design_plots.pdf">FIR<em>design</em>plots.pdf</a>.</p><pre><code class="language-julia">weave(&quot;FIR_design_plots.jl&quot;)
weave(&quot;FIR_design_plots.jl&quot;, docformat = &quot;md2pdf&quot;)</code></pre><p><strong>Note:</strong> docformats <code>md2pdf</code> and <code>md2html</code> use Julia markdown and <code>pandoc2pdf</code> and <code>pandoc2html</code> use Pandoc.</p><h2 id="Templates-1"><a class="docs-heading-anchor" href="#Templates-1">Templates</a><a class="docs-heading-anchor-permalink" href="#Templates-1" title="Permalink"></a></h2><p>You can use a custom template with <code>md2pdf</code> and <code>md2html</code> formats with <code>template</code> argument (e.g) <code>weave(&quot;FIR_design_plots.jl&quot;, template = &quot;custom.tpl&quot;</code>). You can use the existing templates as starting point.</p><p>For HTML: <a href="https://github.com/mpastell/Weave.jl/blob/master/templates/julia_html.tpl">julia_html.tpl</a> and LaTex: <a href="https://github.com/mpastell/Weave.jl/blob/master/templates/julia_tex.tpl">julia_tex.tpl</a></p><p>Templates are rendered using <a href="https://github.com/jverzani/Mustache.jl">Mustache.jl</a>.</p><h2 id="Supported-Markdown-syntax-1"><a class="docs-heading-anchor" href="#Supported-Markdown-syntax-1">Supported Markdown syntax</a><a class="docs-heading-anchor-permalink" href="#Supported-Markdown-syntax-1" title="Permalink"></a></h2><p>The markdown variant used by Weave is <a href="https://docs.julialang.org/en/v1/stdlib/Markdown/#">Julia markdown</a>. In addition Weave supports few additional Markdown features:</p><p><strong>Comments</strong></p><p>You can add comments using html syntax: <code>&lt;!-- --&gt;</code></p><p><strong>Multiline equations</strong></p><p>You can add multiline equations using:</p><pre><code class="language-none">$$
x^2 = x*x
$$</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../usage/">« Using Weave</a><a class="docs-footer-nextpage" href="../chunk_options/">Chunk options »</a></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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 18 March 2020 01:46">Wednesday 18 March 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
$$</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../usage/">« Using Weave</a><a class="docs-footer-nextpage" href="../chunk_options/">Chunk options »</a></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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 18 March 2020 02:10">Wednesday 18 March 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

View File

@ -1,2 +1,2 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · Weave.jl</title><link rel="canonical" href="http://weavejl.mpastell.com/stable/search/index.html"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit">Weave.jl</span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Weave.jl - Scientific Reports Using Julia</a></li><li><a class="tocitem" href="../getting_started/">Getting started</a></li><li><a class="tocitem" href="../usage/">Using Weave</a></li><li><a class="tocitem" href="../publish/">Publishing to html and pdf</a></li><li><a class="tocitem" href="../chunk_options/">Chunk options</a></li><li><a class="tocitem" href="../notebooks/">Working with Jupyter notebooks</a></li><li><a class="tocitem" href="../function_index/">Function index</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article></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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 18 March 2020 01:46">Wednesday 18 March 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · Weave.jl</title><link rel="canonical" href="http://weavejl.mpastell.com/stable/search/index.html"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit">Weave.jl</span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Weave.jl - Scientific Reports Using Julia</a></li><li><a class="tocitem" href="../getting_started/">Getting started</a></li><li><a class="tocitem" href="../usage/">Using Weave</a></li><li><a class="tocitem" href="../publish/">Publishing to html and pdf</a></li><li><a class="tocitem" href="../chunk_options/">Chunk options</a></li><li><a class="tocitem" href="../notebooks/">Working with Jupyter notebooks</a></li><li><a class="tocitem" href="../function_index/">Function index</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article></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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 18 March 2020 02:10">Wednesday 18 March 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html>

View File

@ -9,7 +9,7 @@ weave(joinpath(dirname(pathof(Weave)), &quot;../examples&quot;, &quot;FIR_design
cache_path = &quot;cache&quot;, cache=:off,
template = nothing, highlight_theme = nothing, css = nothing,
pandoc_options = &quot;&quot;,
latex_cmd = &quot;xelatex&quot;)</code></pre><p>Weave an input document to output file.</p><ul><li><code>doctype</code>: :auto = set based on file extension or specify one of the supported formats. See <code>list_out_formats()</code></li><li><code>informat</code>: :auto = set based on file extension or set to <code>&quot;noweb&quot;</code>, <code>&quot;markdown&quot;</code> or <code>script</code></li><li><code>out_path</code>: Path where the output is generated. Can be: <code>:doc</code>: Path of the source document, <code>:pwd</code>: Julia working directory, <code>&quot;somepath&quot;</code>: output directory as a String e.g <code>&quot;/home/mpastell/weaveout&quot;</code> or filename as string e.g. ~/outpath/outfile.tex.</li><li><code>args</code>: dictionary of arguments to pass to document. Available as WEAVE_ARGS</li><li><code>mod</code>: Module where Weave <code>eval</code>s code. Defaults to <code>:sandbox</code> to create new sandbox module, you can also pass a module e.g. <code>Main</code>.</li><li><code>fig_path</code>: where figures will be generated, relative to out_path</li><li><code>fig_ext</code>: Extension for saved figures e.g. <code>&quot;.pdf&quot;</code>, <code>&quot;.png&quot;</code>. Default setting depends on <code>doctype</code>.</li><li><code>cache_path</code>: where of cached output will be saved.</li><li><code>cache</code>: controls caching of code: <code>:off</code> = no caching, <code>:all</code> = cache everything, <code>:user</code> = cache based on chunk options, <code>:refresh</code>, run all code chunks and save new cache.</li><li><code>throw_errors</code>: if <code>false</code> errors are included in output document and the whole document is executed. if <code>true</code> errors are thrown when they occur.</li><li><code>template</code>: Template (file path) or MustacheTokens for md2html or md2tex formats.</li><li><code>highlight_theme</code>: Theme (Highlights.AbstractTheme) for used syntax highlighting</li><li><code>css</code>: CSS (file path) used for md2html format</li><li><code>pandoc_options</code>: String array of options to pass to pandoc for <code>pandoc2html</code> and <code>pandoc2pdf</code> formats e.g. [&quot;toc&quot;, &quot;-N&quot;]</li><li><code>latex_cmd</code>: the command used to make pdf from .tex</li><li><code>latex_keep_unicode</code>: if set to true (default is false), do not convert unicode characters to their</li></ul><p>respective latex representation. This is especially useful if a font and tex-engine with support for unicode characters are used.</p><p><strong>Note:</strong> Run Weave from terminal and not using IJulia, Juno or ESS, they tend to mess with capturing output.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/6b0da16a8fa2a37b0f41a3166356cd5129df2282/src/Weave.jl#L52-L91">source</a></section></article><h2 id="Tangle-1"><a class="docs-heading-anchor" href="#Tangle-1">Tangle</a><a class="docs-heading-anchor-permalink" href="#Tangle-1" title="Permalink"></a></h2><p>Tangling extracts the code from document:</p><article class="docstring"><header><a class="docstring-binding" id="Weave.tangle-Tuple{Any}" href="#Weave.tangle-Tuple{Any}"><code>Weave.tangle</code></a><span class="docstring-category">Method</span></header><section><div><p><code>tangle(source ; out_path=:doc, informat=&quot;noweb&quot;)</code></p><p>Tangle source code from input document to .jl file.</p><ul><li><code>informat</code>: <code>&quot;noweb&quot;</code> of <code>&quot;markdown&quot;</code></li><li><code>out_path</code>: Path where the output is generated. Can be: <code>:doc</code>: Path of the source document, <code>:pwd</code>: Julia working directory, <code>&quot;somepath&quot;</code>, directory name as a string e.g <code>&quot;/home/mpastell/weaveout&quot;</code></li></ul><p>or filename as string e.g. ~/outpath/outfile.jl.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/6b0da16a8fa2a37b0f41a3166356cd5129df2282/src/Weave.jl#L22-L30">source</a></section></article><h2 id="Supported-output-formats-1"><a class="docs-heading-anchor" href="#Supported-output-formats-1">Supported output formats</a><a class="docs-heading-anchor-permalink" href="#Supported-output-formats-1" title="Permalink"></a></h2><p>Weave sets the output format based on the file extension, but you can also set it using <code>doctype</code> option. The rules for detecting the format are:</p><pre><code class="language-julia">ext == &quot;.jl&quot; &amp;&amp; return &quot;md2html&quot;
latex_cmd = &quot;xelatex&quot;)</code></pre><p>Weave an input document to output file.</p><ul><li><code>doctype</code>: :auto = set based on file extension or specify one of the supported formats. See <code>list_out_formats()</code></li><li><code>informat</code>: :auto = set based on file extension or set to <code>&quot;noweb&quot;</code>, <code>&quot;markdown&quot;</code> or <code>script</code></li><li><code>out_path</code>: Path where the output is generated. Can be: <code>:doc</code>: Path of the source document, <code>:pwd</code>: Julia working directory, <code>&quot;somepath&quot;</code>: output directory as a String e.g <code>&quot;/home/mpastell/weaveout&quot;</code> or filename as string e.g. ~/outpath/outfile.tex.</li><li><code>args</code>: dictionary of arguments to pass to document. Available as WEAVE_ARGS</li><li><code>mod</code>: Module where Weave <code>eval</code>s code. Defaults to <code>:sandbox</code> to create new sandbox module, you can also pass a module e.g. <code>Main</code>.</li><li><code>fig_path</code>: where figures will be generated, relative to out_path</li><li><code>fig_ext</code>: Extension for saved figures e.g. <code>&quot;.pdf&quot;</code>, <code>&quot;.png&quot;</code>. Default setting depends on <code>doctype</code>.</li><li><code>cache_path</code>: where of cached output will be saved.</li><li><code>cache</code>: controls caching of code: <code>:off</code> = no caching, <code>:all</code> = cache everything, <code>:user</code> = cache based on chunk options, <code>:refresh</code>, run all code chunks and save new cache.</li><li><code>throw_errors</code>: if <code>false</code> errors are included in output document and the whole document is executed. if <code>true</code> errors are thrown when they occur.</li><li><code>template</code>: Template (file path) or MustacheTokens for md2html or md2tex formats.</li><li><code>highlight_theme</code>: Theme (Highlights.AbstractTheme) for used syntax highlighting</li><li><code>css</code>: CSS (file path) used for md2html format</li><li><code>pandoc_options</code>: String array of options to pass to pandoc for <code>pandoc2html</code> and <code>pandoc2pdf</code> formats e.g. [&quot;toc&quot;, &quot;-N&quot;]</li><li><code>latex_cmd</code>: the command used to make pdf from .tex</li><li><code>latex_keep_unicode</code>: if set to true (default is false), do not convert unicode characters to their</li></ul><p>respective latex representation. This is especially useful if a font and tex-engine with support for unicode characters are used.</p><p><strong>Note:</strong> Run Weave from terminal and not using IJulia, Juno or ESS, they tend to mess with capturing output.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/629d540dc5853776cc1b86bc1b4b18d204623386/src/Weave.jl#L52-L91">source</a></section></article><h2 id="Tangle-1"><a class="docs-heading-anchor" href="#Tangle-1">Tangle</a><a class="docs-heading-anchor-permalink" href="#Tangle-1" title="Permalink"></a></h2><p>Tangling extracts the code from document:</p><article class="docstring"><header><a class="docstring-binding" id="Weave.tangle-Tuple{Any}" href="#Weave.tangle-Tuple{Any}"><code>Weave.tangle</code></a><span class="docstring-category">Method</span></header><section><div><p><code>tangle(source ; out_path=:doc, informat=&quot;noweb&quot;)</code></p><p>Tangle source code from input document to .jl file.</p><ul><li><code>informat</code>: <code>&quot;noweb&quot;</code> of <code>&quot;markdown&quot;</code></li><li><code>out_path</code>: Path where the output is generated. Can be: <code>:doc</code>: Path of the source document, <code>:pwd</code>: Julia working directory, <code>&quot;somepath&quot;</code>, directory name as a string e.g <code>&quot;/home/mpastell/weaveout&quot;</code></li></ul><p>or filename as string e.g. ~/outpath/outfile.jl.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/629d540dc5853776cc1b86bc1b4b18d204623386/src/Weave.jl#L22-L30">source</a></section></article><h2 id="Supported-output-formats-1"><a class="docs-heading-anchor" href="#Supported-output-formats-1">Supported output formats</a><a class="docs-heading-anchor-permalink" href="#Supported-output-formats-1" title="Permalink"></a></h2><p>Weave sets the output format based on the file extension, but you can also set it using <code>doctype</code> option. The rules for detecting the format are:</p><pre><code class="language-julia">ext == &quot;.jl&quot; &amp;&amp; return &quot;md2html&quot;
contains(ext, &quot;.md&quot;) &amp;&amp; return &quot;md2html&quot;
contains(ext, &quot;.rst&quot;) &amp;&amp; return &quot;rst&quot;
contains(ext, &quot;.tex&quot;) &amp;&amp; return &quot;texminted&quot;
@ -26,7 +26,7 @@ rst: reStructuredText and Sphinx
multimarkdown: MultiMarkdown
md2pdf: Julia markdown to latex
asciidoc: AsciiDoc
hugo: Hugo markdown (using shortcodes)</code></pre><article class="docstring"><header><a class="docstring-binding" id="Weave.list_out_formats-Tuple{}" href="#Weave.list_out_formats-Tuple{}"><code>Weave.list_out_formats</code></a><span class="docstring-category">Method</span></header><section><div><p><code>list_out_formats()</code></p><p>List supported output formats</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/6b0da16a8fa2a37b0f41a3166356cd5129df2282/src/Weave.jl#L10-L14">source</a></section></article><h2 id="Document-syntax-1"><a class="docs-heading-anchor" href="#Document-syntax-1">Document syntax</a><a class="docs-heading-anchor-permalink" href="#Document-syntax-1" title="Permalink"></a></h2><p>Weave uses markdown, Noweb or script syntax for defining the code chunks and documentation chunks. You can also weave Jupyter notebooks. The format is detected based on the file extension, but you can also set it manually using the <code>informat</code> parameter.</p><p>The rules for autodetection are:</p><pre><code class="language-julia">ext == &quot;.jl&quot; &amp;&amp; return &quot;script&quot;
hugo: Hugo markdown (using shortcodes)</code></pre><article class="docstring"><header><a class="docstring-binding" id="Weave.list_out_formats-Tuple{}" href="#Weave.list_out_formats-Tuple{}"><code>Weave.list_out_formats</code></a><span class="docstring-category">Method</span></header><section><div><p><code>list_out_formats()</code></p><p>List supported output formats</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/629d540dc5853776cc1b86bc1b4b18d204623386/src/Weave.jl#L10-L14">source</a></section></article><h2 id="Document-syntax-1"><a class="docs-heading-anchor" href="#Document-syntax-1">Document syntax</a><a class="docs-heading-anchor-permalink" href="#Document-syntax-1" title="Permalink"></a></h2><p>Weave uses markdown, Noweb or script syntax for defining the code chunks and documentation chunks. You can also weave Jupyter notebooks. The format is detected based on the file extension, but you can also set it manually using the <code>informat</code> parameter.</p><p>The rules for autodetection are:</p><pre><code class="language-julia">ext == &quot;.jl&quot; &amp;&amp; return &quot;script&quot;
ext == &quot;.jmd&quot; &amp;&amp; return &quot;markdown&quot;
ext == &quot;.ipynb&quot; &amp;&amp; return &quot;notebook&quot;
return &quot;noweb&quot;</code></pre><h2 id="Documentation-chunks-1"><a class="docs-heading-anchor" href="#Documentation-chunks-1">Documentation chunks</a><a class="docs-heading-anchor-permalink" href="#Documentation-chunks-1" title="Permalink"></a></h2><p>In Markdown and Noweb input formats documentation chunks are the parts that aren&#39;t inside code delimiters. Documentation chunks can be written with several different markup languages.</p><h2 id="Code-chunks-1"><a class="docs-heading-anchor" href="#Code-chunks-1">Code chunks</a><a class="docs-heading-anchor-permalink" href="#Code-chunks-1" title="Permalink"></a></h2><h3 id="Markdown-format-1"><a class="docs-heading-anchor" href="#Markdown-format-1">Markdown format</a><a class="docs-heading-anchor-permalink" href="#Markdown-format-1" title="Permalink"></a></h3><p>Markdown code chunks are defined using fenced code blocks with options following on the same line. e.g. to hide code from output you can use:</p><pre><code class="language-none"> ```julia; echo=false</code></pre><p><a href=" https:/github.com/mpastell/Weave.jl/blob/master/examples/FIR_design.jmd">Sample document</a></p><h2 id="Inline-code-1"><a class="docs-heading-anchor" href="#Inline-code-1">Inline code</a><a class="docs-heading-anchor-permalink" href="#Inline-code-1" title="Permalink"></a></h2><p>You can also add inline code to your documents using</p><pre><code class="language-none">`j juliacode`</code></pre><p>or</p><pre><code class="language-none">! juliacode</code></pre><p>syntax. Using the <code>j code</code> syntax you can insert code anywhere in a line and with the <code>!</code> syntax the whole line after <code>!</code> will be executed. The code will be replaced with captured output in the weaved document.</p><p>If the code produces figures the filename or base64 encoded string will be added to output e.g. to include a Plots figure in markdown you can use:</p><pre><code class="language-none">![A plot](`j plot(1:10)`)</code></pre><p>or to produce any html output:</p><pre><code class="language-none">! display(&quot;text/html&quot;, &quot;Header from julia&quot;);</code></pre><h3 id="Noweb-format-1"><a class="docs-heading-anchor" href="#Noweb-format-1">Noweb format</a><a class="docs-heading-anchor-permalink" href="#Noweb-format-1" title="Permalink"></a></h3><p>Code chunks start with a line marked with <code>&lt;&lt;&gt;&gt;=</code> or <code>&lt;&lt;options&gt;&gt;=</code> and end with line marked with <code>@</code>. The code between the start and end markers is executed and the output is captured to the output document. See <a href="../chunk_options/">chunk options</a>.</p><h3 id="Script-format-1"><a class="docs-heading-anchor" href="#Script-format-1">Script format</a><a class="docs-heading-anchor-permalink" href="#Script-format-1" title="Permalink"></a></h3><p>Weave also support script input format with a markup in comments. These scripts can be executed normally using Julia or published with Weave. Documentation is in lines starting with <code>#&#39;</code>, <code>#%%</code> or <code># %%</code>, and code is executed and results are included in the weaved document.</p><p>All lines that are not documentation are treated as code. You can set chunk options using lines starting with <code>#+</code> just before code e.g. <code>#+ term=true</code>.</p><p>The format is identical to <a href="http://mpastell.com/pweave/pypublish.html">Pweave</a> and the concept is similar to publishing documents with MATLAB or using Knitr&#39;s <a href="http://yihui.name/knitr/demo/stitch/">spin</a>. Weave will remove the first empty space from each line of documentation.</p><p><a href="https://github.com/mpastell/Weave.jl/blob/master/examples/FIR_design.jl">See sample document:</a></p><h2 id="Setting-document-options-in-header-1"><a class="docs-heading-anchor" href="#Setting-document-options-in-header-1">Setting document options in header</a><a class="docs-heading-anchor-permalink" href="#Setting-document-options-in-header-1" title="Permalink"></a></h2><p>You can use a YAML header in the beginning of the input document delimited with &quot;-&quot; to set the document title, author and date e.g. and default document options. Each of Weave command line arguments and chunk options can be set in header using <code>options</code> field. Below is an example that sets document <code>out_path</code> and <code>doctype</code> using the header.</p><pre><code class="language-yaml">---
@ -46,4 +46,4 @@ options:
---</code></pre><h2 id="Passing-arguments-to-documents-1"><a class="docs-heading-anchor" href="#Passing-arguments-to-documents-1">Passing arguments to documents</a><a class="docs-heading-anchor-permalink" href="#Passing-arguments-to-documents-1" title="Permalink"></a></h2><p>You can pass arguments as dictionary to the weaved document using the <code>args</code> argument to <code>weave</code>. The dictionary will be available as <code>WEAVE_ARGS</code> variable in the document.</p><p>This makes it possible to create the same report easily for e.g. different date ranges of input data from a database or from files with similar format giving the filename as input.</p><p>In order to pass a filename to a document you need call <code>weave</code> using:</p><pre><code class="language-julia">weave(&quot;mydoc.jmd&quot;, args = Dict(&quot;filename&quot; =&gt; &quot;somedata.h5&quot;))</code></pre><p>and you can access the filename from document as follows:</p><pre><code class="language-none"> ```julia
print(WEAVE_ARGS[&quot;filename&quot;])
```</code></pre><p>You can use the <code>out_path</code> argument to control the name of the output document.</p><h2 id="Include-Weave-document-in-Julia-1"><a class="docs-heading-anchor" href="#Include-Weave-document-in-Julia-1">Include Weave document in Julia</a><a class="docs-heading-anchor-permalink" href="#Include-Weave-document-in-Julia-1" title="Permalink"></a></h2><p>You can call <code>include_weave</code> on a Weave document to run the contents of all code chunks in Julia.</p><article class="docstring"><header><a class="docstring-binding" id="Weave.include_weave" href="#Weave.include_weave"><code>Weave.include_weave</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">include_weave(doc, informat=:auto)
include_weave(m::Module, doc, informat=:auto)</code></pre><p>Include code from Weave document calling <code>include_string</code> on all code from doc. Code is run in the path of the include document.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/6b0da16a8fa2a37b0f41a3166356cd5129df2282/src/Weave.jl#L204-L210">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../getting_started/">« Getting started</a><a class="docs-footer-nextpage" href="../publish/">Publishing to html and pdf »</a></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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 18 March 2020 01:46">Wednesday 18 March 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
include_weave(m::Module, doc, informat=:auto)</code></pre><p>Include code from Weave document calling <code>include_string</code> on all code from doc. Code is run in the path of the include document.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/629d540dc5853776cc1b86bc1b4b18d204623386/src/Weave.jl#L204-L210">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../getting_started/">« Getting started</a><a class="docs-footer-nextpage" href="../publish/">Publishing to html and pdf »</a></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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 18 March 2020 02:10">Wednesday 18 March 2020</span>. Using Julia version 1.3.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>