build based on d2297b5

gh-pages
Documenter.jl 2020-09-08 13:22:25 +00:00
parent 66d9d5a449
commit 8d6e527e2f
26 changed files with 90 additions and 50 deletions

View File

@ -7277,6 +7277,8 @@ html.theme--documenter-dark {
opacity: 0.2; }
html.theme--documenter-dark .docstring > section:hover a.docs-sourcelink {
opacity: 1; }
html.theme--documenter-dark .documenter-example-output {
background-color: #1f2424; }
html.theme--documenter-dark .content pre {
border: 1px solid #5e6d6f; }
html.theme--documenter-dark .content code {
@ -7379,6 +7381,7 @@ html.theme--documenter-dark {
margin-bottom: 0.4em; }
html.theme--documenter-dark #documenter .docs-main .docs-footer {
display: flex;
flex-wrap: wrap;
margin-left: 0;
margin-right: 0;
border-top: 1px solid #5e6d6f;
@ -7392,6 +7395,13 @@ html.theme--documenter-dark {
flex-grow: 1; }
html.theme--documenter-dark #documenter .docs-main .docs-footer .docs-footer-nextpage {
text-align: right; }
html.theme--documenter-dark #documenter .docs-main .docs-footer .flexbox-break {
flex-basis: 100%;
height: 0; }
html.theme--documenter-dark #documenter .docs-main .docs-footer .footer-message {
font-size: 0.8em;
margin: 0.5em auto 0 auto;
text-align: center; }
html.theme--documenter-dark #documenter .docs-sidebar {
display: flex;
flex-direction: column;

View File

@ -7239,6 +7239,9 @@ h1:hover .docs-heading-anchor-permalink, h2:hover .docs-heading-anchor-permalink
.docstring > section:hover a.docs-sourcelink {
opacity: 1; }
.documenter-example-output {
background-color: white; }
.content pre {
border: 1px solid #dbdbdb; }
@ -7360,6 +7363,7 @@ html {
#documenter .docs-main .docs-footer {
display: flex;
flex-wrap: wrap;
margin-left: 0;
margin-right: 0;
border-top: 1px solid #dbdbdb;
@ -7373,6 +7377,13 @@ html {
flex-grow: 1; }
#documenter .docs-main .docs-footer .docs-footer-nextpage {
text-align: right; }
#documenter .docs-main .docs-footer .flexbox-break {
flex-basis: 100%;
height: 0; }
#documenter .docs-main .docs-footer .footer-message {
font-size: 0.8em;
margin: 0.5em auto 0 auto;
text-align: center; }
#documenter .docs-sidebar {
display: flex;

View File

@ -1,11 +1,13 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Chunk Options · Weave.jl</title><link rel="canonical" href="http://weavejl.mpastell.com/stable/chunk_options/"/><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="../search/"><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 class="is-active"><a class="tocitem" href>Chunk Options</a><ul class="internal"><li><a class="tocitem" href="#Syntax-1"><span>Syntax</span></a></li><li><a class="tocitem" href="#Weave-Chunk-Options-1"><span>Weave Chunk Options</span></a></li><li><a class="tocitem" href="#Default-Chunk-Options-1"><span>Default Chunk Options</span></a></li></ul></li><li><a class="tocitem" href="../header/">Header Configuration</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>Chunk Options</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Chunk Options</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JunoLab/Weave.jl/blob/master/doc/src/chunk_options.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><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 class="content" id="documenter-page"><h1 id="chunk-options-1"><a class="docs-heading-anchor" href="#chunk-options-1">Chunk Options</a><a class="docs-heading-anchor-permalink" href="#chunk-options-1" title="Permalink"></a></h1><p>You can use chunk options to configure how each chunk is evaluated, rendered, etc. Most of the ideas came from <a href="http://yihui.name/knitr/options">chunk options in RMarkdown</a>.</p><h2 id="Syntax-1"><a class="docs-heading-anchor" href="#Syntax-1">Syntax</a><a class="docs-heading-anchor-permalink" href="#Syntax-1" title="Permalink"></a></h2><p>Chunk options come after <a href="../usage/#code-chunks-1">code chunk</a> header. There are two (slightly) different syntax to write them:</p><ul><li>(Julia&#39;s toplevel expression) options are separated by semicolon (<code>;</code>)</li><li>(RMarkdown style) options are separated by comma (<code>,</code>)</li></ul><p>Let&#39;s take a look at examples. All the following code chunk header are valid, and so configured to hide the source code from generated output (<code>echo = false</code>) and displays figures with 12cm width (<code>out_width = &quot;12cm&quot;</code>):</p><pre><code class="language-md"> ```julia; echo = false; out_width = &quot;12cm&quot;
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Chunk Options · Weave.jl</title><link rel="canonical" href="http://weavejl.mpastell.com/stable/chunk_options/"/><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="../search/"><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 class="is-active"><a class="tocitem" href>Chunk Options</a><ul class="internal"><li><a class="tocitem" href="#Syntax"><span>Syntax</span></a></li><li><a class="tocitem" href="#Weave-Chunk-Options"><span>Weave Chunk Options</span></a></li><li><a class="tocitem" href="#Default-Chunk-Options"><span>Default Chunk Options</span></a></li></ul></li><li><a class="tocitem" href="../header/">Header Configuration</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>Chunk Options</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Chunk Options</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JunoLab/Weave.jl/blob/master/doc/src/chunk_options.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><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 class="content" id="documenter-page"><h1 id="chunk-options"><a class="docs-heading-anchor" href="#chunk-options">Chunk Options</a><a id="chunk-options-1"></a><a class="docs-heading-anchor-permalink" href="#chunk-options" title="Permalink"></a></h1><p>You can use chunk options to configure how each chunk is evaluated, rendered, etc. Most of the ideas came from <a href="http://yihui.name/knitr/options">chunk options in RMarkdown</a>.</p><h2 id="Syntax"><a class="docs-heading-anchor" href="#Syntax">Syntax</a><a id="Syntax-1"></a><a class="docs-heading-anchor-permalink" href="#Syntax" title="Permalink"></a></h2><p>Chunk options come after <a href="../usage/#code-chunks">code chunk</a> header. There are two (slightly) different syntax to write them:</p><ul><li>(Julia&#39;s toplevel expression) options are separated by semicolon (<code>;</code>)</li><li>(RMarkdown style) options are separated by comma (<code>,</code>)</li></ul><p>Let&#39;s take a look at examples. All the following code chunk header are valid, and so configured to hide the source code from generated output (<code>echo = false</code>) and displays figures with 12cm width (<code>out_width = &quot;12cm&quot;</code>):</p><pre><code class="language-md"> ```julia; echo = false; out_width = &quot;12cm&quot;
```{julia; echo = false; out_width = &quot;12cm&quot;}
```julia, echo = false, out_width = &quot;12cm&quot;
```{julia, echo = false, out_width = &quot;12cm&quot;}</code></pre><h2 id="Weave-Chunk-Options-1"><a class="docs-heading-anchor" href="#Weave-Chunk-Options-1">Weave Chunk Options</a><a class="docs-heading-anchor-permalink" href="#Weave-Chunk-Options-1" title="Permalink"></a></h2><p>Weave currently supports the following chunk options: we&#39;ve mostly followed <a href="http://yihui.name/knitr/options">RMarkdown&#39;s namings</a>, but not all options are implemented.</p><h3 id="Evaluation-1"><a class="docs-heading-anchor" href="#Evaluation-1">Evaluation</a><a class="docs-heading-anchor-permalink" href="#Evaluation-1" title="Permalink"></a></h3><ul><li><code>eval = true</code>: Evaluate the code chunk. If <code>false</code> the chunk wont be executed.</li><li><code>cache = false</code>: Cache results, depending on <code>cache</code> parameter on <a href="../usage/#Weave.weave"><code>weave</code></a> function.</li><li><code>tangle = true</code>: Set tangle to <code>false</code> to exclude chunk from tangled code.</li></ul><h3 id="Rendering-1"><a class="docs-heading-anchor" href="#Rendering-1">Rendering</a><a class="docs-heading-anchor-permalink" href="#Rendering-1" title="Permalink"></a></h3><ul><li><code>echo = true</code>: Echo the code in the output document. If <code>false</code> the source code will be hidden.</li><li><code>results = &quot;markup&quot;</code>: The output format of the printed results. <code>&quot;markup&quot;</code> for literal block, <code>&quot;hidden&quot;</code> for hidden results, or anything else for raw output (I tend to use <code>&quot;tex&quot;</code> for Latex and <code>&quot;rst&quot;</code> for rest). Raw output is useful if you want to e.g. create tables from code chunks.</li><li><code>term = false</code>: If <code>true</code> the output emulates a REPL session. Otherwise only stdout and figures will be included in output.</li><li><code>wrap = true</code>: Wrap long lines from output.</li><li><code>line_width = 75</code>: Line width for wrapped lines.</li><li><code>hold = false</code>: Hold all results until the end of the chunk.</li></ul><h3 id="Figures-1"><a class="docs-heading-anchor" href="#Figures-1">Figures</a><a class="docs-heading-anchor-permalink" href="#Figures-1" title="Permalink"></a></h3><ul><li><code>label = nothing</code>: Chunk label, will be used for figure labels in Latex as <code>fig:label</code>.</li><li><code>fig_width = 6</code>: Figure width passed to plotting library.</li><li><code>fig_height = 4</code>: Figure height passed to plotting library.</li><li><code>out_width</code>: Width of saved figure in output markup e.g. <code>&quot;50%&quot;</code>, <code>&quot;12cm&quot;</code>, <code>0.5\linewidth</code></li><li><code>out_height</code>: Height of saved figure in output markup</li><li><code>dpi = 96</code>: Resolution of saved figures.</li><li><code>fig_cap</code>: Figure caption.</li><li><code>fig_ext</code>: File extension (format) of saved figures.</li><li><code>fig_pos = &quot;!h&quot;</code>: Figure position in Latex, e.g.: <code>&quot;ht&quot;</code>.</li><li><code>fig_env = &quot;figure&quot;</code>: Figure environment in Latex.</li></ul><h2 id="Default-Chunk-Options-1"><a class="docs-heading-anchor" href="#Default-Chunk-Options-1">Default Chunk Options</a><a class="docs-heading-anchor-permalink" href="#Default-Chunk-Options-1" title="Permalink"></a></h2><p>You can set the default chunk options (and <code>weave</code> arguments) for a document using <code>weave_options</code> key in YAML <a href="../header/#Header-Configuration-1">Header Configuration</a>. E.g. to set the default <code>out_width</code> of all figures you can use:</p><pre><code class="language-yaml">---
```{julia, echo = false, out_width = &quot;12cm&quot;}</code></pre><h2 id="Weave-Chunk-Options"><a class="docs-heading-anchor" href="#Weave-Chunk-Options">Weave Chunk Options</a><a id="Weave-Chunk-Options-1"></a><a class="docs-heading-anchor-permalink" href="#Weave-Chunk-Options" title="Permalink"></a></h2><p>Weave currently supports the following chunk options: we&#39;ve mostly followed <a href="http://yihui.name/knitr/options">RMarkdown&#39;s namings</a>, but not all options are implemented.</p><h3 id="Evaluation"><a class="docs-heading-anchor" href="#Evaluation">Evaluation</a><a id="Evaluation-1"></a><a class="docs-heading-anchor-permalink" href="#Evaluation" title="Permalink"></a></h3><ul><li><code>eval = true</code>: Evaluate the code chunk. If <code>false</code> the chunk wont be executed.</li><li><code>error = true</code>: If <code>true</code> <a href="../usage/#Weave.weave"><code>weave</code></a> won&#39;t stop on errors and rather they will be included in output document. If <code>false</code>, <a href="../usage/#Weave.weave"><code>weave</code></a> will halt on any of un-caught errors.</li><li><code>cache = false</code>: Cache results, depending on <code>cache</code> parameter on <a href="../usage/#Weave.weave"><code>weave</code></a> function.</li><li><code>tangle = true</code>: Set tangle to <code>false</code> to exclude chunk from tangled code.</li></ul><h3 id="Rendering"><a class="docs-heading-anchor" href="#Rendering">Rendering</a><a id="Rendering-1"></a><a class="docs-heading-anchor-permalink" href="#Rendering" title="Permalink"></a></h3><ul><li><code>echo = true</code>: Echo the code in the output document. If <code>false</code> the source code will be hidden.</li><li><code>results = &quot;markup&quot;</code>: The output format of the printed results. <code>&quot;markup&quot;</code> for literal block, <code>&quot;hidden&quot;</code> for hidden results, or anything else for raw output (I tend to use <code>&quot;tex&quot;</code> for Latex and <code>&quot;rst&quot;</code> for rest). Raw output is useful if you want to e.g. create tables from code chunks.</li><li><code>term = false</code>: If <code>true</code> the output emulates a REPL session. Otherwise only stdout and figures will be included in output.</li><li><code>wrap = true</code>: Wrap long lines from output.</li><li><code>line_width = 75</code>: Line width for wrapped lines.</li><li><code>hold = false</code>: Hold all results until the end of the chunk.</li></ul><h3 id="Figures"><a class="docs-heading-anchor" href="#Figures">Figures</a><a id="Figures-1"></a><a class="docs-heading-anchor-permalink" href="#Figures" title="Permalink"></a></h3><ul><li><code>label = nothing</code>: Chunk label, will be used for figure labels in Latex as <code>fig:label</code>.</li><li><code>fig_width = 6</code>: Figure width passed to plotting library.</li><li><code>fig_height = 4</code>: Figure height passed to plotting library.</li><li><code>out_width</code>: Width of saved figure in output markup e.g. <code>&quot;50%&quot;</code>, <code>&quot;12cm&quot;</code>, <code>0.5\linewidth</code></li><li><code>out_height</code>: Height of saved figure in output markup</li><li><code>dpi = 96</code>: Resolution of saved figures.</li><li><code>fig_cap</code>: Figure caption.</li><li><code>fig_ext</code>: File extension (format) of saved figures.</li><li><code>fig_pos = &quot;!h&quot;</code>: Figure position in Latex, e.g.: <code>&quot;ht&quot;</code>.</li><li><code>fig_env = &quot;figure&quot;</code>: Figure environment in Latex.</li></ul><h2 id="Default-Chunk-Options"><a class="docs-heading-anchor" href="#Default-Chunk-Options">Default Chunk Options</a><a id="Default-Chunk-Options-1"></a><a class="docs-heading-anchor-permalink" href="#Default-Chunk-Options" title="Permalink"></a></h2><p>You can set the default chunk options (and <code>weave</code> arguments) for a document using <code>weave_options</code> key in YAML <a href="../header/#Header-Configuration">Header Configuration</a>. E.g. to set the default <code>out_width</code> of all figures you can use:</p><pre><code class="language-yaml">---
weave_options:
out_width : 50%
---</code></pre><p>You can also set or change the default chunk options for a document either before weave using the <code>set_chunk_defaults</code> function.</p><article class="docstring"><header><a class="docstring-binding" id="Weave.set_chunk_defaults!" href="#Weave.set_chunk_defaults!"><code>Weave.set_chunk_defaults!</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">set_chunk_defaults!(opts::Dict{Symbol, Any})</code></pre><p>Set default options for code chunks, use <a href="#Weave.get_chunk_defaults"><code>get_chunk_defaults</code></a> to see the current values.</p><p>E.g.: set default <code>dpi</code> to <code>200</code> and <code>fig_width</code> to <code>8</code></p><pre><code class="language-julia">julia&gt; set_chunk_defaults!(Dict(:dpi =&gt; 200, :fig_width =&gt; 8))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/078181b9bf59007cf3c8747f4e4f6e800ef502bc/src/config.jl#L39-L49">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Weave.get_chunk_defaults" href="#Weave.get_chunk_defaults"><code>Weave.get_chunk_defaults</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">get_chunk_defaults()</code></pre><p>Get default options used for code chunks.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/078181b9bf59007cf3c8747f4e4f6e800ef502bc/src/config.jl#L52-L56">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Weave.restore_chunk_defaults!" href="#Weave.restore_chunk_defaults!"><code>Weave.restore_chunk_defaults!</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">restore_chunk_defaults!()</code></pre><p>Restore Weave.jl default chunk options.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/078181b9bf59007cf3c8747f4e4f6e800ef502bc/src/config.jl#L59-L63">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../publish/">« Publishing to HTML and PDF</a><a class="docs-footer-nextpage" href="../header/">Header Configuration »</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="Tuesday 2 June 2020 11:21">Tuesday 2 June 2020</span>. Using Julia version 1.4.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
---</code></pre><p>You can also set or change the default chunk options for a document either before weave using the <code>set_chunk_defaults</code> function.</p><article class="docstring"><header><a class="docstring-binding" id="Weave.set_chunk_defaults!" href="#Weave.set_chunk_defaults!"><code>Weave.set_chunk_defaults!</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">set_chunk_defaults!(k, v)
set_chunk_defaults!(kv::Pair...)
set_chunk_defaults!(opts::AbstractDict)</code></pre><p>Set default options for code chunks, use <a href="#Weave.get_chunk_defaults"><code>get_chunk_defaults</code></a> to see the current values.</p><p>E.g.: all the three examples below will set default <code>dpi</code> to <code>200</code> and <code>fig_width</code> to <code>8</code>:</p><ul><li><code>set_chunk_defaults!(:dpi, 200); set_chunk_defaults!(:fig_width, 8)</code></li><li><code>set_chunk_defaults!(:dpi =&gt; 200, :fig_width =&gt; 8)</code></li><li><code>set_chunk_defaults!(Dict(:dpi =&gt; 200, :fig_width =&gt; 8))</code></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/d2297b5266c888949c9eacb381283137530226ff/src/config.jl#L30-L41">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Weave.get_chunk_defaults" href="#Weave.get_chunk_defaults"><code>Weave.get_chunk_defaults</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">get_chunk_defaults()</code></pre><p>Get default options used for code chunks.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/d2297b5266c888949c9eacb381283137530226ff/src/config.jl#L46-L50">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Weave.restore_chunk_defaults!" href="#Weave.restore_chunk_defaults!"><code>Weave.restore_chunk_defaults!</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">restore_chunk_defaults!()</code></pre><p>Restore Weave.jl default chunk options.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JunoLab/Weave.jl/blob/d2297b5266c888949c9eacb381283137530226ff/src/config.jl#L53-L57">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../publish/">« Publishing to HTML and PDF</a><a class="docs-footer-nextpage" href="../header/">Header Configuration »</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="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="Tuesday 8 September 2020 13:18">Tuesday 8 September 2020</span>. Using Julia version 1.5.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

View File

@ -9,7 +9,7 @@ date: 21th April 2016
This an example of a julia script that can be published using
[Weave](http://mpastell.github.io/Weave.jl/latest/usage/).
[Weave](http://weavejl.mpastell.com/dev/usage/).
The script can be executed normally using Julia
or published to HTML or pdf with Weave.
Text is written in markdown in lines starting with "`#'` " and code

View File

@ -1,3 +1,8 @@
---
author: "Matti Pastell"
title: "FIR filter design with Julia"
date: "21th April 2016"
---
@ -5,7 +10,7 @@
This an example of a julia script that can be published using
[Weave](http://mpastell.github.io/Weave.jl/latest/usage/).
[Weave](http://weavejl.mpastell.com/dev/usage/).
The script can be executed normally using Julia
or published to HTML or pdf with Weave.
Text is written in markdown in lines starting with "`#'` " and code
@ -40,6 +45,7 @@ DSP.jl package doesn't (yet) have a method to calculate the
the frequency response of a FIR filter so we define it:
~~~~{.julia}
using Plots, DSP
gr()
@ -78,6 +84,7 @@ We will use the Hamming window, which is defined as:
$w(n) = \alpha - \beta\cos\frac{2\pi n}{N-1}$, where $\alpha=0.54$ and $\beta=0.46$
~~~~{.julia}
fs = 20
f = digitalfilter(Lowpass(5, fs = fs), FIRWindow(hamming(61)))
w = range(0, stop=pi, length=1024)
@ -150,6 +157,7 @@ julia> ws = w/pi*(fs/2)
~~~~{.julia}
plot(ws, h_db,
xlabel = "Frequency (Hz)", ylabel = "Magnitude (db)")
~~~~~~~~~~~~~
@ -163,6 +171,7 @@ plot(ws, h_db,
And again with default options
~~~~{.julia}
h_phase = unwrap(-atan.(imag.(h),real.(h)))
plot(ws, h_phase,
xlabel = "Frequency (Hz)", ylabel = "Phase (radians)")

View File

@ -1,3 +1,8 @@
---
author: "Matti Pastell"
title: "FIR filter design with Julia"
date: "21th April 2016"
---
@ -5,7 +10,7 @@
This an example of a julia script that can be published using
[Weave](http://mpastell.github.io/Weave.jl/latest/usage/).
[Weave](http://weavejl.mpastell.com/dev/usage/).
The script can be executed normally using Julia
or published to HTML or pdf with Weave.
Text is written in markdown in lines starting with "`#'` " and code
@ -40,6 +45,7 @@ DSP.jl package doesn't (yet) have a method to calculate the
the frequency response of a FIR filter so we define it:
~~~~{.julia}
using Plots, DSP
gr()
@ -78,6 +84,7 @@ We will use the Hamming window, which is defined as:
$w(n) = \alpha - \beta\cos\frac{2\pi n}{N-1}$, where $\alpha=0.54$ and $\beta=0.46$
~~~~{.julia}
fs = 20
f = digitalfilter(Lowpass(5, fs = fs), FIRWindow(hamming(61)))
w = range(0, stop=pi, length=1024)
@ -150,6 +157,7 @@ julia> ws = w/pi*(fs/2)
~~~~{.julia}
plot(ws, h_db,
xlabel = "Frequency (Hz)", ylabel = "Magnitude (db)")
~~~~~~~~~~~~~
@ -163,6 +171,7 @@ plot(ws, h_db,
And again with default options
~~~~{.julia}
h_phase = unwrap(-atan.(imag.(h),real.(h)))
plot(ws, h_phase,
xlabel = "Frequency (Hz)", ylabel = "Phase (radians)")

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
#' # Introduction
#' This an example of a julia script that can be published using
#' [Weave](http://mpastell.github.io/Weave.jl/latest/usage/).
#' [Weave](http://weavejl.mpastell.com/dev/usage/).
#' The script can be executed normally using Julia
#' or published to HTML or pdf with Weave.
#' Text is written in markdown in lines starting with "`#'` " and code

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Getting started · Weave.jl</title><link rel="canonical" href="http://weavejl.mpastell.com/stable/getting_started/"/><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="../search/"><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 class="is-active"><a class="tocitem" href>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="../header/">Header Configuration</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>Getting started</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Getting started</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JunoLab/Weave.jl/blob/master/doc/src/getting_started.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><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 class="content" id="documenter-page"><h1 id="Getting-started-1"><a class="docs-heading-anchor" href="#Getting-started-1">Getting started</a><a class="docs-heading-anchor-permalink" href="#Getting-started-1" title="Permalink"></a></h1><p>The best way to get started using Weave.jl is to look at the example input and output documents. Examples for different formats are included in the package&#39;s <a href="https://github.com/JunoLab/Weave.jl/tree/master/examples"><code>examples</code></a> directory.</p><p>First have a look at source document using markdown code chunks and <a href="https://github.com/JuliaPlots/Plots.jl">Plots.jl</a> for figures:</p><p>All the different format documents below are generated from a single Weave document <a href="../examples/FIR_design.jmd"><code>FIR_design.jmd</code></a>:</p><ul><li>HTML: <a href="../examples/FIR_design.html"><code>FIR_design.html</code></a></li><li>PDF: <a href="../examples/FIR_design.pdf"><code>FIR_design.pdf</code></a></li><li>Pandoc markdown: <a href="../examples/FIR_design.txt"><code>FIR_design.txt</code></a></li></ul><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>Producing PDF output requires that you have XeLateX installed.</p></div></div><p>Add dependencies for the example if needed:</p><pre><code class="language-julia">using Pkg; Pkg.add.([&quot;Plots&quot;, &quot;DSP&quot;])</code></pre><p>Weave the files to your working directory:</p><pre><code class="language-julia">using Weave
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Getting started · Weave.jl</title><link rel="canonical" href="http://weavejl.mpastell.com/stable/getting_started/"/><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="../search/"><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 class="is-active"><a class="tocitem" href>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="../header/">Header Configuration</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>Getting started</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Getting started</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JunoLab/Weave.jl/blob/master/doc/src/getting_started.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><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 class="content" id="documenter-page"><h1 id="Getting-started"><a class="docs-heading-anchor" href="#Getting-started">Getting started</a><a id="Getting-started-1"></a><a class="docs-heading-anchor-permalink" href="#Getting-started" title="Permalink"></a></h1><p>The best way to get started using Weave.jl is to look at the example input and output documents. Examples for different formats are included in the package&#39;s <a href="https://github.com/JunoLab/Weave.jl/tree/master/examples"><code>examples</code></a> directory.</p><p>First have a look at source document using markdown code chunks and <a href="https://github.com/JuliaPlots/Plots.jl">Plots.jl</a> for figures:</p><p>All the different format documents below are generated from a single Weave document <a href="../examples/FIR_design.jmd"><code>FIR_design.jmd</code></a>:</p><ul><li>HTML: <a href="../examples/FIR_design.html"><code>FIR_design.html</code></a></li><li>PDF: <a href="../examples/FIR_design.pdf"><code>FIR_design.pdf</code></a></li><li>Pandoc markdown: <a href="../examples/FIR_design.txt"><code>FIR_design.txt</code></a></li></ul><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>Producing PDF output requires that you have XeLateX installed.</p></div></div><p>Add dependencies for the example if needed:</p><pre><code class="language-julia">using Pkg; Pkg.add.([&quot;Plots&quot;, &quot;DSP&quot;])</code></pre><p>Weave the files to your working directory:</p><pre><code class="language-julia">using Weave
filename = normpath(Weave.EXAMPLE_FOLDER, &quot;FIR_design.jmd&quot;)
@ -10,4 +10,4 @@ weave(filename; doctype = &quot;md2html&quot;, out_path = :pwd)
weave(filename; doctype = &quot;md2pdf&quot;, out_path = :pwd)
# Julia markdown to Pandoc markdown
weave(filename; doctype = &quot;pandoc&quot;, out_path = :pwd)</code></pre><div class="admonition is-category-tips"><header class="admonition-header">Tips</header><div class="admonition-body"><p><code>Weave.EXAMPLE_FOLDER</code> points to <a href="https://github.com/JunoLab/Weave.jl/tree/master/examples">the <code>examples</code> directory</a>.</p></div></div></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="Tuesday 2 June 2020 11:21">Tuesday 2 June 2020</span>. Using Julia version 1.4.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
weave(filename; doctype = &quot;pandoc&quot;, out_path = :pwd)</code></pre><div class="admonition is-category-tips"><header class="admonition-header">Tips</header><div class="admonition-body"><p><code>Weave.EXAMPLE_FOLDER</code> points to <a href="https://github.com/JunoLab/Weave.jl/tree/master/examples">the <code>examples</code> directory</a>.</p></div></div></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><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="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="Tuesday 8 September 2020 13:18">Tuesday 8 September 2020</span>. Using Julia version 1.5.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

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Publishing to HTML and PDF · Weave.jl</title><link rel="canonical" href="http://weavejl.mpastell.com/stable/publish/"/><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="../search/"><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 class="is-active"><a class="tocitem" href>Publishing to HTML and PDF</a><ul class="internal"><li><a class="tocitem" href="#Templates-1"><span>Templates</span></a></li><li><a class="tocitem" href="#Supported-Markdown-syntax-1"><span>Supported Markdown syntax</span></a></li></ul></li><li><a class="tocitem" href="../chunk_options/">Chunk Options</a></li><li><a class="tocitem" href="../header/">Header Configuration</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>Publishing to HTML and PDF</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Publishing to HTML and PDF</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JunoLab/Weave.jl/blob/master/doc/src/publish.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><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 class="content" id="documenter-page"><h1 id="Publishing-to-HTML-and-PDF-1"><a class="docs-heading-anchor" href="#Publishing-to-HTML-and-PDF-1">Publishing to HTML and PDF</a><a class="docs-heading-anchor-permalink" href="#Publishing-to-HTML-and-PDF-1" title="Permalink"></a></h1><p>You can also publish any supported input format to HTML and PDF documents.</p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>Producing PDF output requires that you have XeLaTex installed and in your path.</p></div></div><p>You can use a YAML header in the beginning of the input document delimited with <code>---</code> to set the document title, author and date, e.g.:</p><pre><code class="language-none">---
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Publishing to HTML and PDF · Weave.jl</title><link rel="canonical" href="http://weavejl.mpastell.com/stable/publish/"/><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="../search/"><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 class="is-active"><a class="tocitem" href>Publishing to HTML and PDF</a><ul class="internal"><li><a class="tocitem" href="#Templates"><span>Templates</span></a></li><li><a class="tocitem" href="#Supported-Markdown-syntax"><span>Supported Markdown syntax</span></a></li></ul></li><li><a class="tocitem" href="../chunk_options/">Chunk Options</a></li><li><a class="tocitem" href="../header/">Header Configuration</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>Publishing to HTML and PDF</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Publishing to HTML and PDF</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JunoLab/Weave.jl/blob/master/doc/src/publish.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><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 class="content" id="documenter-page"><h1 id="Publishing-to-HTML-and-PDF"><a class="docs-heading-anchor" href="#Publishing-to-HTML-and-PDF">Publishing to HTML and PDF</a><a id="Publishing-to-HTML-and-PDF-1"></a><a class="docs-heading-anchor-permalink" href="#Publishing-to-HTML-and-PDF" title="Permalink"></a></h1><p>You can also publish any supported input format to HTML and PDF documents.</p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>Producing PDF output requires that you have XeLaTex installed and in your path.</p></div></div><p>You can use a YAML header in the beginning of the input document delimited with <code>---</code> to set the document title, author and date, e.g.:</p><pre><code class="language-none">---
title : Weave example
author : Matti Pastell
date: 15th December 2016
---</code></pre><p>Here are sample input and outputs:</p><ul><li>input (Julia markdown format): <a href="../examples/FIR_design_plots.jl"><code>FIR_design_plots.jl</code></a> (its path is bound to <code>Weave.SAMPLE_JL_DOC</code>)</li><li>HTML output: <a href="../examples/FIR_design_plots.html"><code>FIR_design_plots.html</code></a></li><li>PDF output: <a href="../examples/FIR_design_plots.pdf"><code>FIR_design_plots.pdf</code></a></li></ul><p>They are generated as follows:</p><pre><code class="language-julia">weave(Weave.SAMPLE_JL_DOC)) # default to md2html output format
weave(Weave.SAMPLE_JL_DOC; doctype = &quot;md2pdf&quot;)</code></pre><div class="admonition is-category-tips"><header class="admonition-header">Tips</header><div class="admonition-body"><p><code>Weave.SAMPLE_JL_DOC</code> is the path of <a href="../examples/FIR_design.jl">FIR_design.jl</a>.</p></div></div><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p><code>&quot;md2html&quot;</code> and <code>&quot;md2pdf&quot;</code> assume Julia markdown format as an input, while <code>pandoc2pdf</code> and <code>pandoc2html</code> assume Noweb input format (i.e. Pandoc markdown).</p></div></div><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>md2html</code> and <code>md2pdf</code> formats with <code>template</code> keyword option, e.g.: <code>weave(&quot;FIR_design_plots.jl&quot;, template = &quot;custom.tpl&quot;</code>.</p><p>As starting point, you can use the existing templates:</p><ul><li>HTML (<code>md2html</code>): <a href="https://github.com/mpastell/Weave.jl/blob/master/templates/md2html.tpl"><code>md2html.tpl</code></a></li><li>LaTex (<code>md2pdf</code>): <a href="https://github.com/mpastell/Weave.jl/blob/master/templates/md2pdf.tpl"><code>md2pdf.tpl</code></a></li></ul><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><h3 id="Comments-1"><a class="docs-heading-anchor" href="#Comments-1">Comments</a><a class="docs-heading-anchor-permalink" href="#Comments-1" title="Permalink"></a></h3><p>You can add comments using html syntax: <code>&lt;!-- --&gt;</code></p><h3 id="Multiline-equations-1"><a class="docs-heading-anchor" href="#Multiline-equations-1">Multiline equations</a><a class="docs-heading-anchor-permalink" href="#Multiline-equations-1" title="Permalink"></a></h3><p>You can add multiline equations using:</p><pre><code class="language-none">$$
weave(Weave.SAMPLE_JL_DOC; doctype = &quot;md2pdf&quot;)</code></pre><div class="admonition is-category-tips"><header class="admonition-header">Tips</header><div class="admonition-body"><p><code>Weave.SAMPLE_JL_DOC</code> is the path of <a href="../examples/FIR_design.jl">FIR_design.jl</a>.</p></div></div><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p><code>&quot;md2html&quot;</code> and <code>&quot;md2pdf&quot;</code> assume Julia markdown format as an input, while <code>pandoc2pdf</code> and <code>pandoc2html</code> assume Noweb input format (i.e. Pandoc markdown).</p></div></div><h2 id="Templates"><a class="docs-heading-anchor" href="#Templates">Templates</a><a id="Templates-1"></a><a class="docs-heading-anchor-permalink" href="#Templates" title="Permalink"></a></h2><p>You can use a custom template with <code>md2html</code> and <code>md2pdf</code> formats with <code>template</code> keyword option, e.g.: <code>weave(&quot;FIR_design_plots.jl&quot;, template = &quot;custom.tpl&quot;</code>.</p><p>As starting point, you can use the existing templates:</p><ul><li>HTML (<code>md2html</code>): <a href="https://github.com/JunoLab/Weave.jl/blob/master/templates/md2html.tpl"><code>md2html.tpl</code></a></li><li>LaTex (<code>md2pdf</code>): <a href="https://github.com/JunoLab/Weave.jl/blob/master/templates/md2pdf.tpl"><code>md2pdf.tpl</code></a></li></ul><p>Templates are rendered using <a href="https://github.com/jverzani/Mustache.jl">Mustache.jl</a>.</p><h2 id="Supported-Markdown-syntax"><a class="docs-heading-anchor" href="#Supported-Markdown-syntax">Supported Markdown syntax</a><a id="Supported-Markdown-syntax-1"></a><a class="docs-heading-anchor-permalink" href="#Supported-Markdown-syntax" 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><h3 id="Comments"><a class="docs-heading-anchor" href="#Comments">Comments</a><a id="Comments-1"></a><a class="docs-heading-anchor-permalink" href="#Comments" title="Permalink"></a></h3><p>You can add comments using html syntax: <code>&lt;!-- --&gt;</code></p><h3 id="Multiline-equations"><a class="docs-heading-anchor" href="#Multiline-equations">Multiline equations</a><a id="Multiline-equations-1"></a><a class="docs-heading-anchor-permalink" href="#Multiline-equations" title="Permalink"></a></h3><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="Tuesday 2 June 2020 11:21">Tuesday 2 June 2020</span>. Using Julia version 1.4.2.</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><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="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="Tuesday 8 September 2020 13:18">Tuesday 8 September 2020</span>. Using Julia version 1.5.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/"/><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="../header/">Header Configuration</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="Tuesday 2 June 2020 11:21">Tuesday 2 June 2020</span>. Using Julia version 1.4.2.</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/"/><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="../header/">Header Configuration</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><nav class="docs-footer"><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="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="Tuesday 8 September 2020 13:18">Tuesday 8 September 2020</span>. Using Julia version 1.5.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>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long