pandoc-plot 0.9.4.0 → 1.0.0.0
raw patch · 10 files changed
+292/−273 lines, 10 filesdep +lifted-basedep ~pandoc-typesPVP ok
version bump matches the API change (PVP)
Dependencies added: lifted-base
Dependency ranges changed: pandoc-types
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- README.md +1/−1
- docs/MANUAL.html +253/−253
- executable/Main.hs +5/−5
- pandoc-plot.cabal +3/−2
- src/Text/Pandoc/Filter/Plot/Configuration.hs +1/−1
- src/Text/Pandoc/Filter/Plot/Monad/Logging.hs +1/−1
- src/Text/Pandoc/Filter/Plot/Monad/Types.hs +1/−1
- src/Text/Pandoc/Filter/Plot/Scripting.hs +10/−5
- stack.yaml +11/−4
CHANGELOG.md view
@@ -2,6 +2,12 @@ pandoc-plot uses [Semantic Versioning](http://semver.org/spec/v2.0.0.html) +Release 1.0.0.0 +--------------- + +* Added support for Pandoc 2.11. Unfortunately, there is no way to support prior versions of Pandoc at the same time. +* With release 1.0.0.0, `pandoc-plot` has stabilized. The Haskell library API will not change until version 2+. + Release 0.9.4.0 ---------------
README.md view
@@ -36,7 +36,7 @@ pandoc --filter pandoc-plot input.md --output output.html ``` -*Note that pandoc-plot only works with pandoc \>= 2.10 because of some +*Note that pandoc-plot only works with pandoc \>= 2.11 because of some breaking changes in pandoc’s API.* ## Supported toolkits
docs/MANUAL.html view
@@ -4,7 +4,7 @@ <meta charset="utf-8" /> <meta name="generator" content="pandoc" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> - <title>pandoc-plot 0.9.4.0 manual</title> + <title>pandoc-plot 1.0.0.0 manual</title> <style> code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} @@ -83,7 +83,7 @@ </head> <body> <header id="title-block-header"> -<h1 class="title">pandoc-plot 0.9.4.0 manual</h1> +<h1 class="title">pandoc-plot 1.0.0.0 manual</h1> </header> <!-- The file MANUAL.md is automatically generated by the tools/mkmanual.ps1 script. Do not edit manually. @@ -115,59 +115,59 @@ <h3 id="captions">Captions</h3> <p>You can also specify a caption for your image. This is done using the optional <code>caption</code> parameter.</p> <p><strong>Markdown</strong>:</p> -<div class="sourceCode" id="cb1"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="in">```{.matlabplot caption="This is a simple figure with a **Markdown** caption"}</span></span> -<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="in">x = 0: .1 : 2*pi;</span></span> -<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a><span class="in">y1 = cos(x);</span></span> -<span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><span class="in">y2 = sin(x);</span></span> -<span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a></span> -<span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a><span class="in">figure</span></span> -<span id="cb1-7"><a href="#cb1-7" aria-hidden="true"></a><span class="in">plot(x, y1, 'b', x, y2, 'r-.', 'LineWidth', 2)</span></span> -<span id="cb1-8"><a href="#cb1-8" aria-hidden="true"></a><span class="in">```</span></span></code></pre></div> +<div class="sourceCode" id="cb1"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="in">```{.matlabplot caption="This is a simple figure with a **Markdown** caption"}</span></span> +<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="in">x = 0: .1 : 2*pi;</span></span> +<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="in">y1 = cos(x);</span></span> +<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="in">y2 = sin(x);</span></span> +<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="in">figure</span></span> +<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="in">plot(x, y1, 'b', x, y2, 'r-.', 'LineWidth', 2)</span></span> +<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span></code></pre></div> <p><strong>LaTex</strong>:</p> -<div class="sourceCode" id="cb2"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">minted</span>}[caption=This is a simple figure with a caption]{matlabplot}</span> -<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a><span class="vs">x = 0: .1 : 2*pi;</span></span> -<span id="cb2-3"><a href="#cb2-3" aria-hidden="true"></a><span class="vs">y1 = cos(x);</span></span> -<span id="cb2-4"><a href="#cb2-4" aria-hidden="true"></a><span class="vs">y2 = sin(x);</span></span> -<span id="cb2-5"><a href="#cb2-5" aria-hidden="true"></a></span> -<span id="cb2-6"><a href="#cb2-6" aria-hidden="true"></a><span class="vs">figure</span></span> -<span id="cb2-7"><a href="#cb2-7" aria-hidden="true"></a><span class="vs">plot(x, y1, 'b', x, y2, 'r-.', 'LineWidth', 2)</span></span> -<span id="cb2-8"><a href="#cb2-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> +<div class="sourceCode" id="cb2"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">minted</span>}[caption=This is a simple figure with a caption]{matlabplot}</span> +<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="vs">x = 0: .1 : 2*pi;</span></span> +<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="vs">y1 = cos(x);</span></span> +<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="vs">y2 = sin(x);</span></span> +<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="vs">figure</span></span> +<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a><span class="vs">plot(x, y1, 'b', x, y2, 'r-.', 'LineWidth', 2)</span></span> +<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> <p>Caption formatting unfortunately cannot be determined automatically. To specify a caption format (e.g. “markdown”, “LaTeX”, etc.), see <a href="#configuration">Configuration</a>.</p> <h3 id="link-to-source-code">Link to source code</h3> <p>In case of an output format that supports links (e.g. HTML), the embedded image generated by <code>pandoc-plot</code> can show a link to the source code which was used to generate the file. Therefore, other people can see what code was used to create your figures.</p> <p>You can turn this on via the <code>source=true</code> key:</p> <p><strong>Markdown</strong>:</p> -<div class="sourceCode" id="cb3"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="in">```{.mathplot source=true}</span></span> -<span id="cb3-2"><a href="#cb3-2" aria-hidden="true"></a><span class="in">...</span></span> -<span id="cb3-3"><a href="#cb3-3" aria-hidden="true"></a><span class="in">```</span></span></code></pre></div> +<div class="sourceCode" id="cb3"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="in">```{.mathplot source=true}</span></span> +<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="in">...</span></span> +<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span></code></pre></div> <p><strong>LaTex</strong>:</p> -<div class="sourceCode" id="cb4"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">minted</span>}[source=true]{mathplot}</span> -<span id="cb4-2"><a href="#cb4-2" aria-hidden="true"></a><span class="vs">...</span></span> -<span id="cb4-3"><a href="#cb4-3" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> +<div class="sourceCode" id="cb4"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">minted</span>}[source=true]{mathplot}</span> +<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="vs">...</span></span> +<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> <p>or via a <a href="#Configuration">configuration file</a>.</p> <h3 id="preamble-scripts">Preamble scripts</h3> <p>If you find yourself always repeating some steps, inclusion of scripts is possible using the <code>preamble</code> parameter. For example, if you want all Matplotlib plots to have the <a href="https://matplotlib.org/tutorials/introductory/customizing.html#sphx-glr-tutorials-introductory-customizing-py"><code>ggplot</code></a> style, you can write a very short preamble <code>style.py</code> like so:</p> -<div class="sourceCode" id="cb5"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a><span class="im">import</span> matplotlib.pyplot <span class="im">as</span> plt</span> -<span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a>plt.style.use(<span class="st">'ggplot'</span>)</span></code></pre></div> +<div class="sourceCode" id="cb5"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> matplotlib.pyplot <span class="im">as</span> plt</span> +<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>plt.style.use(<span class="st">'ggplot'</span>)</span></code></pre></div> <p>and include it in your document as follows:</p> -<div class="sourceCode" id="cb6"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a><span class="in">```{.matplotlib preamble=style.py}</span></span> -<span id="cb6-2"><a href="#cb6-2" aria-hidden="true"></a><span class="in">plt.figure()</span></span> -<span id="cb6-3"><a href="#cb6-3" aria-hidden="true"></a><span class="in">plt.plot([0,1,2,3,4], [1,2,3,4,5])</span></span> -<span id="cb6-4"><a href="#cb6-4" aria-hidden="true"></a><span class="in">plt.title('This is an example figure')</span></span> -<span id="cb6-5"><a href="#cb6-5" aria-hidden="true"></a><span class="in">```</span></span></code></pre></div> +<div class="sourceCode" id="cb6"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="in">```{.matplotlib preamble=style.py}</span></span> +<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="in">plt.figure()</span></span> +<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="in">plt.plot([0,1,2,3,4], [1,2,3,4,5])</span></span> +<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="in">plt.title('This is an example figure')</span></span> +<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span></code></pre></div> <p>Which is equivalent to writing the following markdown:</p> -<div class="sourceCode" id="cb7"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true"></a><span class="in">```{.matplotlib}</span></span> -<span id="cb7-2"><a href="#cb7-2" aria-hidden="true"></a><span class="in">import matplotlib.pyplot as plt</span></span> -<span id="cb7-3"><a href="#cb7-3" aria-hidden="true"></a><span class="in">plt.style.use('ggplot')</span></span> -<span id="cb7-4"><a href="#cb7-4" aria-hidden="true"></a></span> -<span id="cb7-5"><a href="#cb7-5" aria-hidden="true"></a><span class="in">plt.figure()</span></span> -<span id="cb7-6"><a href="#cb7-6" aria-hidden="true"></a><span class="in">plt.plot([0,1,2,3,4], [1,2,3,4,5])</span></span> -<span id="cb7-7"><a href="#cb7-7" aria-hidden="true"></a><span class="in">plt.title('This is an example figure')</span></span> -<span id="cb7-8"><a href="#cb7-8" aria-hidden="true"></a><span class="in">```</span></span></code></pre></div> +<div class="sourceCode" id="cb7"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="in">```{.matplotlib}</span></span> +<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="in">import matplotlib.pyplot as plt</span></span> +<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="in">plt.style.use('ggplot')</span></span> +<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a><span class="in">plt.figure()</span></span> +<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a><span class="in">plt.plot([0,1,2,3,4], [1,2,3,4,5])</span></span> +<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a><span class="in">plt.title('This is an example figure')</span></span> +<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span></code></pre></div> <p>The equivalent LaTeX usage is as follows:</p> -<div class="sourceCode" id="cb8"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">minted</span>}[include=style.py]{matplotlib}</span> -<span id="cb8-2"><a href="#cb8-2" aria-hidden="true"></a></span> -<span id="cb8-3"><a href="#cb8-3" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> +<div class="sourceCode" id="cb8"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">minted</span>}[include=style.py]{matplotlib}</span> +<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> <p>This <code>preamble</code> parameter is perfect for longer documents with many plots. Simply define the style you want in a separate script! You can also import packages this way, or define functions you often use.</p> <h3 id="support-for-interactive-plots">Support for interactive plots</h3> <p>Starting with version 0.8.0.0, <code>pandoc-plot</code> supports the creation of interactive plots (if a toolkit supports it). All you need to do is set the save format to <code>html</code>. The resulting plot is fully self-contained, so it can be displayed offline.</p> @@ -178,74 +178,74 @@ <h3 id="compatibility-with-pandoc-crossref">Compatibility with pandoc-crossref</h3> <p><a href="https://github.com/lierdakil/pandoc-crossref"><code>pandoc-crossref</code></a> is a pandoc filter that makes it effortless to cross-reference objects in Markdown documents.</p> <p>You can use <code>pandoc-crossref</code> in conjunction with <code>pandoc-plot</code> for the ultimate figure-making pipeline. You can combine both in a figure like so:</p> -<div class="sourceCode" id="cb9"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true"></a><span class="in">```{#fig:myexample .plotly_python caption="This is a caption"}</span></span> -<span id="cb9-2"><a href="#cb9-2" aria-hidden="true"></a><span class="in"># Insert figure script here</span></span> -<span id="cb9-3"><a href="#cb9-3" aria-hidden="true"></a><span class="in">```</span></span> -<span id="cb9-4"><a href="#cb9-4" aria-hidden="true"></a></span> -<span id="cb9-5"><a href="#cb9-5" aria-hidden="true"></a>As you can see in @fig:myexample, ...</span></code></pre></div> +<div class="sourceCode" id="cb9"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="in">```{#fig:myexample .plotly_python caption="This is a caption"}</span></span> +<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="in"># Insert figure script here</span></span> +<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span> +<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a>As you can see in @fig:myexample, ...</span></code></pre></div> <p>If the above source is located in file <code>myfile.md</code>, you can render the figure and references by applying <code>pandoc-plot</code> <strong>first</strong>, and then <code>pandoc-crossref</code>. For example:</p> -<div class="sourceCode" id="cb10"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true"></a><span class="ex">pandoc</span> --filter pandoc-plot --filter pandoc-crossref -i myfile.md -o myfile.html</span></code></pre></div> +<div class="sourceCode" id="cb10"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pandoc</span> --filter pandoc-plot --filter pandoc-crossref -i myfile.md -o myfile.html</span></code></pre></div> <h2 id="detailed-usage">Detailed usage</h2> <p><code>pandoc-plot</code> is a command line executable with a few functions. You can take a look at the help using the <code>-h</code>/<code>--help</code> flag:</p> -<div class="sourceCode" id="cb11"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true"></a><span class="ex">pandoc-plot</span> 0.9.4.0 - generate figures directly in documents</span> -<span id="cb11-2"><a href="#cb11-2" aria-hidden="true"></a></span> -<span id="cb11-3"><a href="#cb11-3" aria-hidden="true"></a><span class="ex">Usage</span>: pandoc-plot.EXE [(-v<span class="kw">|</span><span class="ex">--version</span>) <span class="kw">|</span> <span class="ex">--full-version</span> <span class="kw">|</span> <span class="kw">(</span><span class="ex">-m</span><span class="kw">|</span><span class="ex">--manual</span><span class="kw">)</span>] </span> -<span id="cb11-4"><a href="#cb11-4" aria-hidden="true"></a> [<span class="ex">COMMAND</span>] [AST]</span> -<span id="cb11-5"><a href="#cb11-5" aria-hidden="true"></a> <span class="ex">This</span> pandoc filter generates plots from code blocks using a multitude of</span> -<span id="cb11-6"><a href="#cb11-6" aria-hidden="true"></a> <span class="ex">possible</span> renderers. This allows to keep documentation and figures in perfect</span> -<span id="cb11-7"><a href="#cb11-7" aria-hidden="true"></a> <span class="ex">synchronicity.</span></span> -<span id="cb11-8"><a href="#cb11-8" aria-hidden="true"></a></span> -<span id="cb11-9"><a href="#cb11-9" aria-hidden="true"></a><span class="ex">Available</span> options:</span> -<span id="cb11-10"><a href="#cb11-10" aria-hidden="true"></a> <span class="ex">-v</span>,--version Show version number and exit.</span> -<span id="cb11-11"><a href="#cb11-11" aria-hidden="true"></a> <span class="ex">--full-version</span> Show full version information and exit.</span> -<span id="cb11-12"><a href="#cb11-12" aria-hidden="true"></a> <span class="ex">-m</span>,--manual Open the manual page in the default web browser and</span> -<span id="cb11-13"><a href="#cb11-13" aria-hidden="true"></a> <span class="ex">exit.</span></span> -<span id="cb11-14"><a href="#cb11-14" aria-hidden="true"></a> <span class="ex">-h</span>,--help Show this help text</span> -<span id="cb11-15"><a href="#cb11-15" aria-hidden="true"></a></span> -<span id="cb11-16"><a href="#cb11-16" aria-hidden="true"></a><span class="ex">Available</span> commands:</span> -<span id="cb11-17"><a href="#cb11-17" aria-hidden="true"></a> <span class="ex">toolkits</span> Show information on toolkits and exit.</span> -<span id="cb11-18"><a href="#cb11-18" aria-hidden="true"></a> <span class="ex">clean</span> Clean output directories where figures from FILE and</span> -<span id="cb11-19"><a href="#cb11-19" aria-hidden="true"></a> <span class="ex">log</span> files might be stored. WARNING: All files in</span> -<span id="cb11-20"><a href="#cb11-20" aria-hidden="true"></a> <span class="ex">those</span> directories will be deleted.</span> -<span id="cb11-21"><a href="#cb11-21" aria-hidden="true"></a> <span class="ex">write-example-config</span> Write example configuration to a file and exit.</span> -<span id="cb11-22"><a href="#cb11-22" aria-hidden="true"></a></span> -<span id="cb11-23"><a href="#cb11-23" aria-hidden="true"></a><span class="ex">More</span> information can be found via the manual (pandoc-plot --manual) <span class="ex">or</span> the</span> -<span id="cb11-24"><a href="#cb11-24" aria-hidden="true"></a><span class="ex">repository</span> README, located at https://github.com/LaurentRDC/pandoc-plot</span></code></pre></div> +<div class="sourceCode" id="cb11"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pandoc-plot</span> 0.9.4.0 - generate figures directly in documents</span> +<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Usage</span>: pandoc-plot.EXE [(-v<span class="kw">|</span><span class="ex">--version</span>) <span class="kw">|</span> <span class="ex">--full-version</span> <span class="kw">|</span> <span class="kw">(</span><span class="ex">-m</span><span class="kw">|</span><span class="ex">--manual</span><span class="kw">)</span>] </span> +<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a> [<span class="ex">COMMAND</span>] [AST]</span> +<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">This</span> pandoc filter generates plots from code blocks using a multitude of</span> +<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">possible</span> renderers. This allows to keep documentation and figures in perfect</span> +<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">synchronicity.</span></span> +<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb11-9"><a href="#cb11-9" aria-hidden="true" tabindex="-1"></a><span class="ex">Available</span> options:</span> +<span id="cb11-10"><a href="#cb11-10" aria-hidden="true" tabindex="-1"></a> <span class="ex">-v</span>,--version Show version number and exit.</span> +<span id="cb11-11"><a href="#cb11-11" aria-hidden="true" tabindex="-1"></a> <span class="ex">--full-version</span> Show full version information and exit.</span> +<span id="cb11-12"><a href="#cb11-12" aria-hidden="true" tabindex="-1"></a> <span class="ex">-m</span>,--manual Open the manual page in the default web browser and</span> +<span id="cb11-13"><a href="#cb11-13" aria-hidden="true" tabindex="-1"></a> <span class="ex">exit.</span></span> +<span id="cb11-14"><a href="#cb11-14" aria-hidden="true" tabindex="-1"></a> <span class="ex">-h</span>,--help Show this help text</span> +<span id="cb11-15"><a href="#cb11-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb11-16"><a href="#cb11-16" aria-hidden="true" tabindex="-1"></a><span class="ex">Available</span> commands:</span> +<span id="cb11-17"><a href="#cb11-17" aria-hidden="true" tabindex="-1"></a> <span class="ex">toolkits</span> Show information on toolkits and exit.</span> +<span id="cb11-18"><a href="#cb11-18" aria-hidden="true" tabindex="-1"></a> <span class="ex">clean</span> Clean output directories where figures from FILE and</span> +<span id="cb11-19"><a href="#cb11-19" aria-hidden="true" tabindex="-1"></a> <span class="ex">log</span> files might be stored. WARNING: All files in</span> +<span id="cb11-20"><a href="#cb11-20" aria-hidden="true" tabindex="-1"></a> <span class="ex">those</span> directories will be deleted.</span> +<span id="cb11-21"><a href="#cb11-21" aria-hidden="true" tabindex="-1"></a> <span class="ex">write-example-config</span> Write example configuration to a file and exit.</span> +<span id="cb11-22"><a href="#cb11-22" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb11-23"><a href="#cb11-23" aria-hidden="true" tabindex="-1"></a><span class="ex">More</span> information can be found via the manual (pandoc-plot --manual) <span class="ex">or</span> the</span> +<span id="cb11-24"><a href="#cb11-24" aria-hidden="true" tabindex="-1"></a><span class="ex">repository</span> README, located at https://github.com/LaurentRDC/pandoc-plot</span></code></pre></div> <h3 id="as-a-filter">As a filter</h3> <p>The most common use for <code>pandoc-plot</code> is as a pandoc filter, in which case it should be called without arguments. For example:</p> -<div class="sourceCode" id="cb12"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true"></a><span class="ex">pandoc</span> --filter pandoc-plot -i input.md -o output.html</span></code></pre></div> +<div class="sourceCode" id="cb12"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pandoc</span> --filter pandoc-plot -i input.md -o output.html</span></code></pre></div> <p>If <code>pandoc-plot</code> fails to render a code block into a figure, the filtering will not stop. Your code blocks will stay unchanged.</p> <p>You can chain other filters with it (e.g., <a href="https://github.com/lierdakil/pandoc-crossref"><code>pandoc-crossref</code></a>) like so:</p> -<div class="sourceCode" id="cb13"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true"></a><span class="ex">pandoc</span> --filter pandoc-plot --filter pandoc-crossref -i input.md -o output.html</span></code></pre></div> +<div class="sourceCode" id="cb13"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pandoc</span> --filter pandoc-plot --filter pandoc-crossref -i input.md -o output.html</span></code></pre></div> <h3 id="syntax">Syntax</h3> <p>The syntax for code blocks in documents is shown below. <code>pandoc-plot</code> looks for code blocks with a specific class, depending on the toolkit you want to use. <code>pandoc-plot</code> will run the code and capture the figure output. There can only be <strong>one</strong> figure per code block.</p> <p>The possible parameters and options are described in <a href="#parameters-and-options">further below</a>.</p> <h4 id="markdown">Markdown</h4> -<div class="sourceCode" id="cb14"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true"></a> <span class="in">```{.cls param1=value1 param2=value2 ...}</span></span> -<span id="cb14-2"><a href="#cb14-2" aria-hidden="true"></a><span class="in"> # script content</span></span> -<span id="cb14-3"><a href="#cb14-3" aria-hidden="true"></a><span class="in"> ```</span></span></code></pre></div> +<div class="sourceCode" id="cb14"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a> <span class="in">```{.cls param1=value1 param2=value2 ...}</span></span> +<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a><span class="in"> # script content</span></span> +<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a><span class="in"> ```</span></span></code></pre></div> <h4 id="latex">LaTeX</h4> <p>Note that the <code>minted</code> LaTeX package need not be installed.</p> -<div class="sourceCode" id="cb15"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">minted</span>}[param1=value1, param2=value2, ...]{cls}</span> -<span id="cb15-2"><a href="#cb15-2" aria-hidden="true"></a><span class="vs">...</span></span> -<span id="cb15-3"><a href="#cb15-3" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> +<div class="sourceCode" id="cb15"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">minted</span>}[param1=value1, param2=value2, ...]{cls}</span> +<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a><span class="vs">...</span></span> +<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> <h3 id="parameters-and-options">Parameters and options</h3> <p>There are parameters that affect the figure that will be included in your document. Here are all the possible general parameters, in Markdown syntax:</p> -<div class="sourceCode" id="cb16"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true"></a> <span class="in">```{.cls </span></span> -<span id="cb16-2"><a href="#cb16-2" aria-hidden="true"></a><span class="in"> .language</span></span> -<span id="cb16-3"><a href="#cb16-3" aria-hidden="true"></a><span class="in"> directory=(path) </span></span> -<span id="cb16-4"><a href="#cb16-4" aria-hidden="true"></a><span class="in"> caption=(text) </span></span> -<span id="cb16-5"><a href="#cb16-5" aria-hidden="true"></a><span class="in"> format=(PNG|PDF|SVG|JPG|EPS|GIF|TIF|WEBP|HTML) </span></span> -<span id="cb16-6"><a href="#cb16-6" aria-hidden="true"></a><span class="in"> source=(true|false) </span></span> -<span id="cb16-7"><a href="#cb16-7" aria-hidden="true"></a><span class="in"> preamble=(path) </span></span> -<span id="cb16-8"><a href="#cb16-8" aria-hidden="true"></a><span class="in"> dpi=(integer)</span></span> -<span id="cb16-9"><a href="#cb16-9" aria-hidden="true"></a><span class="in"> dependencies=[...]</span></span> -<span id="cb16-10"><a href="#cb16-10" aria-hidden="true"></a><span class="in"> file=(path)</span></span> -<span id="cb16-11"><a href="#cb16-11" aria-hidden="true"></a><span class="in"> executable=(path) </span></span> -<span id="cb16-12"><a href="#cb16-12" aria-hidden="true"></a><span class="in"> caption_format=(text)</span></span> -<span id="cb16-13"><a href="#cb16-13" aria-hidden="true"></a><span class="in"> }</span></span> -<span id="cb16-14"><a href="#cb16-14" aria-hidden="true"></a><span class="in"> # script content</span></span> -<span id="cb16-15"><a href="#cb16-15" aria-hidden="true"></a><span class="in"> ```</span></span></code></pre></div> +<div class="sourceCode" id="cb16"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a> <span class="in">```{.cls </span></span> +<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a><span class="in"> .language</span></span> +<span id="cb16-3"><a href="#cb16-3" aria-hidden="true" tabindex="-1"></a><span class="in"> directory=(path) </span></span> +<span id="cb16-4"><a href="#cb16-4" aria-hidden="true" tabindex="-1"></a><span class="in"> caption=(text) </span></span> +<span id="cb16-5"><a href="#cb16-5" aria-hidden="true" tabindex="-1"></a><span class="in"> format=(PNG|PDF|SVG|JPG|EPS|GIF|TIF|WEBP|HTML) </span></span> +<span id="cb16-6"><a href="#cb16-6" aria-hidden="true" tabindex="-1"></a><span class="in"> source=(true|false) </span></span> +<span id="cb16-7"><a href="#cb16-7" aria-hidden="true" tabindex="-1"></a><span class="in"> preamble=(path) </span></span> +<span id="cb16-8"><a href="#cb16-8" aria-hidden="true" tabindex="-1"></a><span class="in"> dpi=(integer)</span></span> +<span id="cb16-9"><a href="#cb16-9" aria-hidden="true" tabindex="-1"></a><span class="in"> dependencies=[...]</span></span> +<span id="cb16-10"><a href="#cb16-10" aria-hidden="true" tabindex="-1"></a><span class="in"> file=(path)</span></span> +<span id="cb16-11"><a href="#cb16-11" aria-hidden="true" tabindex="-1"></a><span class="in"> executable=(path) </span></span> +<span id="cb16-12"><a href="#cb16-12" aria-hidden="true" tabindex="-1"></a><span class="in"> caption_format=(text)</span></span> +<span id="cb16-13"><a href="#cb16-13" aria-hidden="true" tabindex="-1"></a><span class="in"> }</span></span> +<span id="cb16-14"><a href="#cb16-14" aria-hidden="true" tabindex="-1"></a><span class="in"> # script content</span></span> +<span id="cb16-15"><a href="#cb16-15" aria-hidden="true" tabindex="-1"></a><span class="in"> ```</span></span></code></pre></div> <ul> <li><code>cls</code> must be one of the following: <code>matplotlib</code>, <code>matlabplot</code>, <code>plotly_python</code>, <code>plotly_r</code>, <code>mathplot</code>, <code>octaveplot</code>, <code>ggplot2</code>, <code>gnuplot</code>, <code>graphviz</code>, <code>bokeh</code>, <code>plotsjl</code>.</li> </ul> @@ -265,144 +265,144 @@ </ul> <h4 id="code-highlighting">Code highlighting</h4> <p>If your editor supports code highlighting in code blocks, you can also include the programming language. In Markdown:</p> -<div class="sourceCode" id="cb17"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true"></a> <span class="in">```{.language .cls (options)}</span></span> -<span id="cb17-2"><a href="#cb17-2" aria-hidden="true"></a><span class="in"> # script content</span></span> -<span id="cb17-3"><a href="#cb17-3" aria-hidden="true"></a><span class="in"> ```</span></span></code></pre></div> +<div class="sourceCode" id="cb17"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a> <span class="in">```{.language .cls (options)}</span></span> +<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a><span class="in"> # script content</span></span> +<span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a><span class="in"> ```</span></span></code></pre></div> <p>or Latex:</p> -<div class="sourceCode" id="cb18"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">minted</span>}[(options)]{language, cls}</span> -<span id="cb18-2"><a href="#cb18-2" aria-hidden="true"></a><span class="vs"> # script content</span></span> -<span id="cb18-3"><a href="#cb18-3" aria-hidden="true"></a><span class="vs"> </span><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> +<div class="sourceCode" id="cb18"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">minted</span>}[(options)]{language, cls}</span> +<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a><span class="vs"> # script content</span></span> +<span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a><span class="vs"> </span><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> <p>For example, for GGPlot2 figures:</p> -<div class="sourceCode" id="cb19"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true"></a> <span class="in">```{.r .ggplot2 caption=Highlighted code block}</span></span> -<span id="cb19-2"><a href="#cb19-2" aria-hidden="true"></a><span class="in"> # script content</span></span> -<span id="cb19-3"><a href="#cb19-3" aria-hidden="true"></a><span class="in"> ```</span></span></code></pre></div> +<div class="sourceCode" id="cb19"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a> <span class="in">```{.r .ggplot2 caption=Highlighted code block}</span></span> +<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a><span class="in"> # script content</span></span> +<span id="cb19-3"><a href="#cb19-3" aria-hidden="true" tabindex="-1"></a><span class="in"> ```</span></span></code></pre></div> <p>or (Latex):</p> -<div class="sourceCode" id="cb20"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">minted</span>}[caption=Highlighted code block]{r, ggplot2}</span> -<span id="cb20-2"><a href="#cb20-2" aria-hidden="true"></a><span class="vs"> # script content</span></span> -<span id="cb20-3"><a href="#cb20-3" aria-hidden="true"></a><span class="vs"> </span><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> +<div class="sourceCode" id="cb20"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">minted</span>}[caption=Highlighted code block]{r, ggplot2}</span> +<span id="cb20-2"><a href="#cb20-2" aria-hidden="true" tabindex="-1"></a><span class="vs"> # script content</span></span> +<span id="cb20-3"><a href="#cb20-3" aria-hidden="true" tabindex="-1"></a><span class="vs"> </span><span class="kw">\end</span>{<span class="ex">minted</span>}</span></code></pre></div> <p>This way, you benefit from code highlighting <em>and</em> <code>pandoc-plot</code>.</p> <h3 id="interactive-html-figures">Interactive HTML figures</h3> <p>Interactive HTML figures are available for a few toolkits, e.g. <code>bokeh</code>. To make a figure interactive, use the output format <code>format=html</code>. This only makes sense if your output file is also HTML.</p> <p>You can take a look at the <a href="https://laurentrdc.github.io/pandoc-plot/">demonstration page</a> for an example result.</p> <p>Many interactive plots rely on javascript scripts stored on the internet. If you want to have a self-contained document that can be viewed offline – or you want your document to work for the next 10 years –, you can use pandoc’s <code>--self-contained</code> flag:</p> -<div class="sourceCode" id="cb21"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true"></a><span class="ex">pandoc</span> --self-contained --filter pandoc-plot -i mydoc.md -o webpage.html </span></code></pre></div> +<div class="sourceCode" id="cb21"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pandoc</span> --self-contained --filter pandoc-plot -i mydoc.md -o webpage.html </span></code></pre></div> <p>The resulting output <code>webpage.html</code> will contain everything, at the cost of size.</p> <h3 id="configuration">Configuration</h3> <p>To avoid repetition, <code>pandoc-plot</code> can be configured using simple YAML files. Here are <strong>all</strong> the possible parameters:</p> -<div class="sourceCode" id="cb22"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true"></a></span> -<span id="cb22-2"><a href="#cb22-2" aria-hidden="true"></a><span class="co"># This is an example configuration. Everything in this file is optional.</span></span> -<span id="cb22-3"><a href="#cb22-3" aria-hidden="true"></a><span class="co"># Please refer to the documentation to know about the parameters herein.</span></span> -<span id="cb22-4"><a href="#cb22-4" aria-hidden="true"></a><span class="co">#</span></span> -<span id="cb22-5"><a href="#cb22-5" aria-hidden="true"></a><span class="co"># The `executable` parameter for all toolkits can be either the</span></span> -<span id="cb22-6"><a href="#cb22-6" aria-hidden="true"></a><span class="co"># executable name (if it is present on the PATH), or</span></span> -<span id="cb22-7"><a href="#cb22-7" aria-hidden="true"></a><span class="co"># the full path to the executable.</span></span> -<span id="cb22-8"><a href="#cb22-8" aria-hidden="true"></a><span class="co"># E.g.:</span></span> -<span id="cb22-9"><a href="#cb22-9" aria-hidden="true"></a><span class="co"># executable: python3</span></span> -<span id="cb22-10"><a href="#cb22-10" aria-hidden="true"></a><span class="co"># executable: "C:\Python37\Scripts\python.exe"</span></span> -<span id="cb22-11"><a href="#cb22-11" aria-hidden="true"></a></span> -<span id="cb22-12"><a href="#cb22-12" aria-hidden="true"></a><span class="co"># The following parameters affect all toolkits</span></span> -<span id="cb22-13"><a href="#cb22-13" aria-hidden="true"></a><span class="co"># Directory where to save the plots. The path can be relative to pandoc-plot's</span></span> -<span id="cb22-14"><a href="#cb22-14" aria-hidden="true"></a><span class="co"># current working directory, or absolute.</span></span> -<span id="cb22-15"><a href="#cb22-15" aria-hidden="true"></a><span class="fu">directory</span><span class="kw">:</span><span class="at"> plots/</span></span> -<span id="cb22-16"><a href="#cb22-16" aria-hidden="true"></a></span> -<span id="cb22-17"><a href="#cb22-17" aria-hidden="true"></a><span class="co"># Whether or not to include a link to the source script in the caption. </span></span> -<span id="cb22-18"><a href="#cb22-18" aria-hidden="true"></a><span class="co"># Particularly useful for HTML output.</span></span> -<span id="cb22-19"><a href="#cb22-19" aria-hidden="true"></a><span class="fu">source</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span> -<span id="cb22-20"><a href="#cb22-20" aria-hidden="true"></a></span> -<span id="cb22-21"><a href="#cb22-21" aria-hidden="true"></a><span class="co"># Default density of figures in dots per inches (DPI). </span></span> -<span id="cb22-22"><a href="#cb22-22" aria-hidden="true"></a><span class="co"># This can be changed in the document specifically as well.</span></span> -<span id="cb22-23"><a href="#cb22-23" aria-hidden="true"></a><span class="fu">dpi</span><span class="kw">:</span><span class="at"> </span><span class="dv">80</span></span> -<span id="cb22-24"><a href="#cb22-24" aria-hidden="true"></a></span> -<span id="cb22-25"><a href="#cb22-25" aria-hidden="true"></a><span class="co"># Default format in which to save the figures. This can be specified </span></span> -<span id="cb22-26"><a href="#cb22-26" aria-hidden="true"></a><span class="co"># individually as well.</span></span> -<span id="cb22-27"><a href="#cb22-27" aria-hidden="true"></a><span class="fu">format</span><span class="kw">:</span><span class="at"> PNG</span></span> -<span id="cb22-28"><a href="#cb22-28" aria-hidden="true"></a></span> -<span id="cb22-29"><a href="#cb22-29" aria-hidden="true"></a><span class="co"># Default files/directories on which all figures depend. If any of these files/directories</span></span> -<span id="cb22-30"><a href="#cb22-30" aria-hidden="true"></a><span class="co"># changes, all figures will be re-rendered.</span></span> -<span id="cb22-31"><a href="#cb22-31" aria-hidden="true"></a><span class="co"># Dependencies specified in code blocks will be appended to this list.</span></span> -<span id="cb22-32"><a href="#cb22-32" aria-hidden="true"></a><span class="fu">dependencies</span><span class="kw">:</span></span> -<span id="cb22-33"><a href="#cb22-33" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> file1.txt</span></span> -<span id="cb22-34"><a href="#cb22-34" aria-hidden="true"></a><span class="at"> </span><span class="kw">-</span><span class="at"> file2.txt</span></span> -<span id="cb22-35"><a href="#cb22-35" aria-hidden="true"></a></span> -<span id="cb22-36"><a href="#cb22-36" aria-hidden="true"></a><span class="co"># Text format for the captions. Unfortunately, there is no way to detect</span></span> -<span id="cb22-37"><a href="#cb22-37" aria-hidden="true"></a><span class="co"># this automatically. You can use the same notation as Pandoc's --from </span></span> -<span id="cb22-38"><a href="#cb22-38" aria-hidden="true"></a><span class="co"># parameter, specified here: </span></span> -<span id="cb22-39"><a href="#cb22-39" aria-hidden="true"></a><span class="co"># https://pandoc.org/MANUAL.html#option--from</span></span> -<span id="cb22-40"><a href="#cb22-40" aria-hidden="true"></a><span class="co"># Example: markdown, rst+raw_tex</span></span> -<span id="cb22-41"><a href="#cb22-41" aria-hidden="true"></a><span class="fu">caption_format</span><span class="kw">:</span><span class="at"> markdown+tex_math_dollars</span></span> -<span id="cb22-42"><a href="#cb22-42" aria-hidden="true"></a></span> -<span id="cb22-43"><a href="#cb22-43" aria-hidden="true"></a><span class="co"># Logging configuration</span></span> -<span id="cb22-44"><a href="#cb22-44" aria-hidden="true"></a><span class="fu">logging</span><span class="kw">:</span></span> -<span id="cb22-45"><a href="#cb22-45" aria-hidden="true"></a><span class="co"> # Possible verbosity values: debug, error, warning, info, silent</span></span> -<span id="cb22-46"><a href="#cb22-46" aria-hidden="true"></a><span class="at"> </span><span class="fu">verbosity</span><span class="kw">:</span><span class="at"> warning</span></span> -<span id="cb22-47"><a href="#cb22-47" aria-hidden="true"></a><span class="co"> # If the filepath below is not present, then pandoc-plot will log to stderr</span></span> -<span id="cb22-48"><a href="#cb22-48" aria-hidden="true"></a><span class="co"> # Otherwise, log messages will be appended to the filepath.</span></span> -<span id="cb22-49"><a href="#cb22-49" aria-hidden="true"></a><span class="co"> # filepath: path/to/file.txt</span></span> -<span id="cb22-50"><a href="#cb22-50" aria-hidden="true"></a></span> -<span id="cb22-51"><a href="#cb22-51" aria-hidden="true"></a><span class="co"># The possible parameters for the Matplotlib toolkit</span></span> -<span id="cb22-52"><a href="#cb22-52" aria-hidden="true"></a><span class="fu">matplotlib</span><span class="kw">:</span></span> -<span id="cb22-53"><a href="#cb22-53" aria-hidden="true"></a><span class="co"> # preamble: matplotlib.py</span></span> -<span id="cb22-54"><a href="#cb22-54" aria-hidden="true"></a><span class="at"> </span><span class="fu">tight_bbox</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span> -<span id="cb22-55"><a href="#cb22-55" aria-hidden="true"></a><span class="at"> </span><span class="fu">transparent</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span> -<span id="cb22-56"><a href="#cb22-56" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> python</span></span> -<span id="cb22-57"><a href="#cb22-57" aria-hidden="true"></a></span> -<span id="cb22-58"><a href="#cb22-58" aria-hidden="true"></a><span class="co"># The possible parameters for the MATLAB toolkit</span></span> -<span id="cb22-59"><a href="#cb22-59" aria-hidden="true"></a><span class="fu">matlabplot</span><span class="kw">:</span></span> -<span id="cb22-60"><a href="#cb22-60" aria-hidden="true"></a><span class="co"> # preamble: matlab.m</span></span> -<span id="cb22-61"><a href="#cb22-61" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> matlab</span></span> -<span id="cb22-62"><a href="#cb22-62" aria-hidden="true"></a></span> -<span id="cb22-63"><a href="#cb22-63" aria-hidden="true"></a><span class="co"># The possible parameters for the Plotly/Python toolkit</span></span> -<span id="cb22-64"><a href="#cb22-64" aria-hidden="true"></a><span class="fu">plotly_python</span><span class="kw">:</span></span> -<span id="cb22-65"><a href="#cb22-65" aria-hidden="true"></a><span class="co"> # preamble: plotly-python.py</span></span> -<span id="cb22-66"><a href="#cb22-66" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> python</span></span> -<span id="cb22-67"><a href="#cb22-67" aria-hidden="true"></a></span> -<span id="cb22-68"><a href="#cb22-68" aria-hidden="true"></a><span class="co"># The possible parameters for the Plotly/R toolkit</span></span> -<span id="cb22-69"><a href="#cb22-69" aria-hidden="true"></a><span class="fu">plotly_r</span><span class="kw">:</span></span> -<span id="cb22-70"><a href="#cb22-70" aria-hidden="true"></a><span class="co"> # preamble: plotly-r.r</span></span> -<span id="cb22-71"><a href="#cb22-71" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> Rscript</span></span> -<span id="cb22-72"><a href="#cb22-72" aria-hidden="true"></a></span> -<span id="cb22-73"><a href="#cb22-73" aria-hidden="true"></a><span class="co"># The possible parameters for the Mathematica toolkit</span></span> -<span id="cb22-74"><a href="#cb22-74" aria-hidden="true"></a><span class="fu">mathplot</span><span class="kw">:</span></span> -<span id="cb22-75"><a href="#cb22-75" aria-hidden="true"></a><span class="co"> # preamble: mathematica.m</span></span> -<span id="cb22-76"><a href="#cb22-76" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> math</span></span> -<span id="cb22-77"><a href="#cb22-77" aria-hidden="true"></a></span> -<span id="cb22-78"><a href="#cb22-78" aria-hidden="true"></a><span class="co"># The possible parameters for the GNU Octave toolkit</span></span> -<span id="cb22-79"><a href="#cb22-79" aria-hidden="true"></a><span class="fu">octaveplot</span><span class="kw">:</span></span> -<span id="cb22-80"><a href="#cb22-80" aria-hidden="true"></a><span class="co"> # preamble: octave.m</span></span> -<span id="cb22-81"><a href="#cb22-81" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> octave</span></span> -<span id="cb22-82"><a href="#cb22-82" aria-hidden="true"></a></span> -<span id="cb22-83"><a href="#cb22-83" aria-hidden="true"></a><span class="co"># The possible parameters for the ggplot2 toolkit</span></span> -<span id="cb22-84"><a href="#cb22-84" aria-hidden="true"></a><span class="fu">ggplot2</span><span class="kw">:</span></span> -<span id="cb22-85"><a href="#cb22-85" aria-hidden="true"></a><span class="co"> # preamble: ggplot2.r</span></span> -<span id="cb22-86"><a href="#cb22-86" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> Rscript</span></span> -<span id="cb22-87"><a href="#cb22-87" aria-hidden="true"></a></span> -<span id="cb22-88"><a href="#cb22-88" aria-hidden="true"></a><span class="co"># The possible parameters for the gnuplot toolkit</span></span> -<span id="cb22-89"><a href="#cb22-89" aria-hidden="true"></a><span class="fu">gnuplot</span><span class="kw">:</span></span> -<span id="cb22-90"><a href="#cb22-90" aria-hidden="true"></a><span class="co"> # preamble: gnuplot.gp</span></span> -<span id="cb22-91"><a href="#cb22-91" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> gnuplot</span></span> -<span id="cb22-92"><a href="#cb22-92" aria-hidden="true"></a></span> -<span id="cb22-93"><a href="#cb22-93" aria-hidden="true"></a><span class="co"># The possible parameters for the graphviz toolkit</span></span> -<span id="cb22-94"><a href="#cb22-94" aria-hidden="true"></a><span class="fu">graphviz</span><span class="kw">:</span></span> -<span id="cb22-95"><a href="#cb22-95" aria-hidden="true"></a><span class="co"> # preamble: graphviz.dot</span></span> -<span id="cb22-96"><a href="#cb22-96" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> dot</span></span> -<span id="cb22-97"><a href="#cb22-97" aria-hidden="true"></a></span> -<span id="cb22-98"><a href="#cb22-98" aria-hidden="true"></a><span class="fu">bokeh</span><span class="kw">:</span></span> -<span id="cb22-99"><a href="#cb22-99" aria-hidden="true"></a><span class="co"> # preamble: bokeh.py</span></span> -<span id="cb22-100"><a href="#cb22-100" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> python</span></span> -<span id="cb22-101"><a href="#cb22-101" aria-hidden="true"></a></span> -<span id="cb22-102"><a href="#cb22-102" aria-hidden="true"></a><span class="fu">plotsjl</span><span class="kw">:</span></span> -<span id="cb22-103"><a href="#cb22-103" aria-hidden="true"></a><span class="co"> # preamble: plotsjl.jl</span></span> -<span id="cb22-104"><a href="#cb22-104" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> julia</span></span></code></pre></div> +<div class="sourceCode" id="cb22"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-2"><a href="#cb22-2" aria-hidden="true" tabindex="-1"></a><span class="co"># This is an example configuration. Everything in this file is optional.</span></span> +<span id="cb22-3"><a href="#cb22-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Please refer to the documentation to know about the parameters herein.</span></span> +<span id="cb22-4"><a href="#cb22-4" aria-hidden="true" tabindex="-1"></a><span class="co">#</span></span> +<span id="cb22-5"><a href="#cb22-5" aria-hidden="true" tabindex="-1"></a><span class="co"># The `executable` parameter for all toolkits can be either the</span></span> +<span id="cb22-6"><a href="#cb22-6" aria-hidden="true" tabindex="-1"></a><span class="co"># executable name (if it is present on the PATH), or</span></span> +<span id="cb22-7"><a href="#cb22-7" aria-hidden="true" tabindex="-1"></a><span class="co"># the full path to the executable.</span></span> +<span id="cb22-8"><a href="#cb22-8" aria-hidden="true" tabindex="-1"></a><span class="co"># E.g.:</span></span> +<span id="cb22-9"><a href="#cb22-9" aria-hidden="true" tabindex="-1"></a><span class="co"># executable: python3</span></span> +<span id="cb22-10"><a href="#cb22-10" aria-hidden="true" tabindex="-1"></a><span class="co"># executable: "C:\Python37\Scripts\python.exe"</span></span> +<span id="cb22-11"><a href="#cb22-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-12"><a href="#cb22-12" aria-hidden="true" tabindex="-1"></a><span class="co"># The following parameters affect all toolkits</span></span> +<span id="cb22-13"><a href="#cb22-13" aria-hidden="true" tabindex="-1"></a><span class="co"># Directory where to save the plots. The path can be relative to pandoc-plot's</span></span> +<span id="cb22-14"><a href="#cb22-14" aria-hidden="true" tabindex="-1"></a><span class="co"># current working directory, or absolute.</span></span> +<span id="cb22-15"><a href="#cb22-15" aria-hidden="true" tabindex="-1"></a><span class="fu">directory</span><span class="kw">:</span><span class="at"> plots/</span></span> +<span id="cb22-16"><a href="#cb22-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-17"><a href="#cb22-17" aria-hidden="true" tabindex="-1"></a><span class="co"># Whether or not to include a link to the source script in the caption. </span></span> +<span id="cb22-18"><a href="#cb22-18" aria-hidden="true" tabindex="-1"></a><span class="co"># Particularly useful for HTML output.</span></span> +<span id="cb22-19"><a href="#cb22-19" aria-hidden="true" tabindex="-1"></a><span class="fu">source</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span> +<span id="cb22-20"><a href="#cb22-20" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-21"><a href="#cb22-21" aria-hidden="true" tabindex="-1"></a><span class="co"># Default density of figures in dots per inches (DPI). </span></span> +<span id="cb22-22"><a href="#cb22-22" aria-hidden="true" tabindex="-1"></a><span class="co"># This can be changed in the document specifically as well.</span></span> +<span id="cb22-23"><a href="#cb22-23" aria-hidden="true" tabindex="-1"></a><span class="fu">dpi</span><span class="kw">:</span><span class="at"> </span><span class="dv">80</span></span> +<span id="cb22-24"><a href="#cb22-24" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-25"><a href="#cb22-25" aria-hidden="true" tabindex="-1"></a><span class="co"># Default format in which to save the figures. This can be specified </span></span> +<span id="cb22-26"><a href="#cb22-26" aria-hidden="true" tabindex="-1"></a><span class="co"># individually as well.</span></span> +<span id="cb22-27"><a href="#cb22-27" aria-hidden="true" tabindex="-1"></a><span class="fu">format</span><span class="kw">:</span><span class="at"> PNG</span></span> +<span id="cb22-28"><a href="#cb22-28" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-29"><a href="#cb22-29" aria-hidden="true" tabindex="-1"></a><span class="co"># Default files/directories on which all figures depend. If any of these files/directories</span></span> +<span id="cb22-30"><a href="#cb22-30" aria-hidden="true" tabindex="-1"></a><span class="co"># changes, all figures will be re-rendered.</span></span> +<span id="cb22-31"><a href="#cb22-31" aria-hidden="true" tabindex="-1"></a><span class="co"># Dependencies specified in code blocks will be appended to this list.</span></span> +<span id="cb22-32"><a href="#cb22-32" aria-hidden="true" tabindex="-1"></a><span class="fu">dependencies</span><span class="kw">:</span></span> +<span id="cb22-33"><a href="#cb22-33" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> file1.txt</span></span> +<span id="cb22-34"><a href="#cb22-34" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> file2.txt</span></span> +<span id="cb22-35"><a href="#cb22-35" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-36"><a href="#cb22-36" aria-hidden="true" tabindex="-1"></a><span class="co"># Text format for the captions. Unfortunately, there is no way to detect</span></span> +<span id="cb22-37"><a href="#cb22-37" aria-hidden="true" tabindex="-1"></a><span class="co"># this automatically. You can use the same notation as Pandoc's --from </span></span> +<span id="cb22-38"><a href="#cb22-38" aria-hidden="true" tabindex="-1"></a><span class="co"># parameter, specified here: </span></span> +<span id="cb22-39"><a href="#cb22-39" aria-hidden="true" tabindex="-1"></a><span class="co"># https://pandoc.org/MANUAL.html#option--from</span></span> +<span id="cb22-40"><a href="#cb22-40" aria-hidden="true" tabindex="-1"></a><span class="co"># Example: markdown, rst+raw_tex</span></span> +<span id="cb22-41"><a href="#cb22-41" aria-hidden="true" tabindex="-1"></a><span class="fu">caption_format</span><span class="kw">:</span><span class="at"> markdown+tex_math_dollars</span></span> +<span id="cb22-42"><a href="#cb22-42" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-43"><a href="#cb22-43" aria-hidden="true" tabindex="-1"></a><span class="co"># Logging configuration</span></span> +<span id="cb22-44"><a href="#cb22-44" aria-hidden="true" tabindex="-1"></a><span class="fu">logging</span><span class="kw">:</span></span> +<span id="cb22-45"><a href="#cb22-45" aria-hidden="true" tabindex="-1"></a><span class="co"> # Possible verbosity values: debug, error, warning, info, silent</span></span> +<span id="cb22-46"><a href="#cb22-46" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">verbosity</span><span class="kw">:</span><span class="at"> warning</span></span> +<span id="cb22-47"><a href="#cb22-47" aria-hidden="true" tabindex="-1"></a><span class="co"> # If the filepath below is not present, then pandoc-plot will log to stderr</span></span> +<span id="cb22-48"><a href="#cb22-48" aria-hidden="true" tabindex="-1"></a><span class="co"> # Otherwise, log messages will be appended to the filepath.</span></span> +<span id="cb22-49"><a href="#cb22-49" aria-hidden="true" tabindex="-1"></a><span class="co"> # filepath: path/to/file.txt</span></span> +<span id="cb22-50"><a href="#cb22-50" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-51"><a href="#cb22-51" aria-hidden="true" tabindex="-1"></a><span class="co"># The possible parameters for the Matplotlib toolkit</span></span> +<span id="cb22-52"><a href="#cb22-52" aria-hidden="true" tabindex="-1"></a><span class="fu">matplotlib</span><span class="kw">:</span></span> +<span id="cb22-53"><a href="#cb22-53" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: matplotlib.py</span></span> +<span id="cb22-54"><a href="#cb22-54" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">tight_bbox</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span> +<span id="cb22-55"><a href="#cb22-55" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">transparent</span><span class="kw">:</span><span class="at"> </span><span class="ch">false</span></span> +<span id="cb22-56"><a href="#cb22-56" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> python</span></span> +<span id="cb22-57"><a href="#cb22-57" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-58"><a href="#cb22-58" aria-hidden="true" tabindex="-1"></a><span class="co"># The possible parameters for the MATLAB toolkit</span></span> +<span id="cb22-59"><a href="#cb22-59" aria-hidden="true" tabindex="-1"></a><span class="fu">matlabplot</span><span class="kw">:</span></span> +<span id="cb22-60"><a href="#cb22-60" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: matlab.m</span></span> +<span id="cb22-61"><a href="#cb22-61" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> matlab</span></span> +<span id="cb22-62"><a href="#cb22-62" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-63"><a href="#cb22-63" aria-hidden="true" tabindex="-1"></a><span class="co"># The possible parameters for the Plotly/Python toolkit</span></span> +<span id="cb22-64"><a href="#cb22-64" aria-hidden="true" tabindex="-1"></a><span class="fu">plotly_python</span><span class="kw">:</span></span> +<span id="cb22-65"><a href="#cb22-65" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: plotly-python.py</span></span> +<span id="cb22-66"><a href="#cb22-66" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> python</span></span> +<span id="cb22-67"><a href="#cb22-67" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-68"><a href="#cb22-68" aria-hidden="true" tabindex="-1"></a><span class="co"># The possible parameters for the Plotly/R toolkit</span></span> +<span id="cb22-69"><a href="#cb22-69" aria-hidden="true" tabindex="-1"></a><span class="fu">plotly_r</span><span class="kw">:</span></span> +<span id="cb22-70"><a href="#cb22-70" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: plotly-r.r</span></span> +<span id="cb22-71"><a href="#cb22-71" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> Rscript</span></span> +<span id="cb22-72"><a href="#cb22-72" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-73"><a href="#cb22-73" aria-hidden="true" tabindex="-1"></a><span class="co"># The possible parameters for the Mathematica toolkit</span></span> +<span id="cb22-74"><a href="#cb22-74" aria-hidden="true" tabindex="-1"></a><span class="fu">mathplot</span><span class="kw">:</span></span> +<span id="cb22-75"><a href="#cb22-75" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: mathematica.m</span></span> +<span id="cb22-76"><a href="#cb22-76" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> math</span></span> +<span id="cb22-77"><a href="#cb22-77" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-78"><a href="#cb22-78" aria-hidden="true" tabindex="-1"></a><span class="co"># The possible parameters for the GNU Octave toolkit</span></span> +<span id="cb22-79"><a href="#cb22-79" aria-hidden="true" tabindex="-1"></a><span class="fu">octaveplot</span><span class="kw">:</span></span> +<span id="cb22-80"><a href="#cb22-80" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: octave.m</span></span> +<span id="cb22-81"><a href="#cb22-81" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> octave</span></span> +<span id="cb22-82"><a href="#cb22-82" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-83"><a href="#cb22-83" aria-hidden="true" tabindex="-1"></a><span class="co"># The possible parameters for the ggplot2 toolkit</span></span> +<span id="cb22-84"><a href="#cb22-84" aria-hidden="true" tabindex="-1"></a><span class="fu">ggplot2</span><span class="kw">:</span></span> +<span id="cb22-85"><a href="#cb22-85" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: ggplot2.r</span></span> +<span id="cb22-86"><a href="#cb22-86" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> Rscript</span></span> +<span id="cb22-87"><a href="#cb22-87" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-88"><a href="#cb22-88" aria-hidden="true" tabindex="-1"></a><span class="co"># The possible parameters for the gnuplot toolkit</span></span> +<span id="cb22-89"><a href="#cb22-89" aria-hidden="true" tabindex="-1"></a><span class="fu">gnuplot</span><span class="kw">:</span></span> +<span id="cb22-90"><a href="#cb22-90" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: gnuplot.gp</span></span> +<span id="cb22-91"><a href="#cb22-91" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> gnuplot</span></span> +<span id="cb22-92"><a href="#cb22-92" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-93"><a href="#cb22-93" aria-hidden="true" tabindex="-1"></a><span class="co"># The possible parameters for the graphviz toolkit</span></span> +<span id="cb22-94"><a href="#cb22-94" aria-hidden="true" tabindex="-1"></a><span class="fu">graphviz</span><span class="kw">:</span></span> +<span id="cb22-95"><a href="#cb22-95" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: graphviz.dot</span></span> +<span id="cb22-96"><a href="#cb22-96" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> dot</span></span> +<span id="cb22-97"><a href="#cb22-97" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-98"><a href="#cb22-98" aria-hidden="true" tabindex="-1"></a><span class="fu">bokeh</span><span class="kw">:</span></span> +<span id="cb22-99"><a href="#cb22-99" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: bokeh.py</span></span> +<span id="cb22-100"><a href="#cb22-100" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> python</span></span> +<span id="cb22-101"><a href="#cb22-101" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb22-102"><a href="#cb22-102" aria-hidden="true" tabindex="-1"></a><span class="fu">plotsjl</span><span class="kw">:</span></span> +<span id="cb22-103"><a href="#cb22-103" aria-hidden="true" tabindex="-1"></a><span class="co"> # preamble: plotsjl.jl</span></span> +<span id="cb22-104"><a href="#cb22-104" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> julia</span></span></code></pre></div> <p>A file like the above sets the <strong>default</strong> values; you can still override them in documents directly.</p> <p>The easiest way to specify configuration for <code>pandoc-plot</code> is to place a <code>.pandoc-plot.yml</code> file in the current working directory. You can also specify a configuration file in document metadata, under the <code>plot-configuration</code> key. For example, in Markdown:</p> -<div class="sourceCode" id="cb23"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true"></a><span class="co">---</span></span> -<span id="cb23-2"><a href="#cb23-2" aria-hidden="true"></a><span class="an">title:</span><span class="co"> My document</span></span> -<span id="cb23-3"><a href="#cb23-3" aria-hidden="true"></a><span class="an">author:</span><span class="co"> John Doe</span></span> -<span id="cb23-4"><a href="#cb23-4" aria-hidden="true"></a><span class="an">plot-configuration:</span><span class="co"> /path/to/file.yml</span></span> -<span id="cb23-5"><a href="#cb23-5" aria-hidden="true"></a><span class="co">---</span></span></code></pre></div> +<div class="sourceCode" id="cb23"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="co">---</span></span> +<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a><span class="an">title:</span><span class="co"> My document</span></span> +<span id="cb23-3"><a href="#cb23-3" aria-hidden="true" tabindex="-1"></a><span class="an">author:</span><span class="co"> John Doe</span></span> +<span id="cb23-4"><a href="#cb23-4" aria-hidden="true" tabindex="-1"></a><span class="an">plot-configuration:</span><span class="co"> /path/to/file.yml</span></span> +<span id="cb23-5"><a href="#cb23-5" aria-hidden="true" tabindex="-1"></a><span class="co">---</span></span></code></pre></div> <p>or on the command line, using the pandoc <code>-M/--metadata</code> flag:</p> -<div class="sourceCode" id="cb24"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true"></a><span class="ex">pandoc</span> --filter pandoc-plot -M plot-configuration=/path/to/file.yml ...</span></code></pre></div> +<div class="sourceCode" id="cb24"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pandoc</span> --filter pandoc-plot -M plot-configuration=/path/to/file.yml ...</span></code></pre></div> <p>The hierarchy of configuration files is as follows:</p> <ol type="1"> <li>A configuration file specified in the metadata under the <code>plot-configuration</code> key;</li> @@ -412,10 +412,10 @@ <h4 id="executables">Executables</h4> <p>The <code>executable</code> parameter for all toolkits can be either the executable name (if it is present on the PATH), or the full path to the executable.</p> <p>Examples:</p> -<div class="sourceCode" id="cb25"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true"></a><span class="fu">matplotlib</span><span class="kw">:</span></span> -<span id="cb25-2"><a href="#cb25-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> python3</span></span></code></pre></div> -<div class="sourceCode" id="cb26"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true"></a><span class="fu">matlabplot</span><span class="kw">:</span></span> -<span id="cb26-2"><a href="#cb26-2" aria-hidden="true"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> </span><span class="st">"C:\Program Files\Matlab\R2019b</span><span class="sc">\b</span><span class="st">in\matlab.exe"</span></span></code></pre></div> +<div class="sourceCode" id="cb25"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="fu">matplotlib</span><span class="kw">:</span></span> +<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> python3</span></span></code></pre></div> +<div class="sourceCode" id="cb26"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="fu">matlabplot</span><span class="kw">:</span></span> +<span id="cb26-2"><a href="#cb26-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">executable</span><span class="kw">:</span><span class="at"> </span><span class="st">"C:\Program Files\Matlab\R2019b</span><span class="sc">\b</span><span class="st">in\matlab.exe"</span></span></code></pre></div> <h4 id="toolkit-specific-options">Toolkit-specific options</h4> <h5 id="matplotlib">Matplotlib</h5> <ul> @@ -424,49 +424,49 @@ </ul> <h4 id="logging">Logging</h4> <p>If you are running <code>pandoc-plot</code> on a large document, you might want to turn on logging. You can do so via the configuration file as follows:</p> -<div class="sourceCode" id="cb27"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true"></a><span class="fu">logging</span><span class="kw">:</span></span> -<span id="cb27-2"><a href="#cb27-2" aria-hidden="true"></a><span class="co"> # Possible verbosity values: debug, error, warning, info, silent</span></span> -<span id="cb27-3"><a href="#cb27-3" aria-hidden="true"></a><span class="co"> # debug level shows all messages</span></span> -<span id="cb27-4"><a href="#cb27-4" aria-hidden="true"></a><span class="co"> # error level shows all but debug messages, etc.</span></span> -<span id="cb27-5"><a href="#cb27-5" aria-hidden="true"></a><span class="at"> </span><span class="fu">verbosity</span><span class="kw">:</span><span class="at"> info</span></span> -<span id="cb27-6"><a href="#cb27-6" aria-hidden="true"></a><span class="at"> </span></span> -<span id="cb27-7"><a href="#cb27-7" aria-hidden="true"></a><span class="co"> # OPTIONAL: log to file</span></span> -<span id="cb27-8"><a href="#cb27-8" aria-hidden="true"></a><span class="co"> # Remove line below to log to stderr</span></span> -<span id="cb27-9"><a href="#cb27-9" aria-hidden="true"></a><span class="at"> </span><span class="fu">filepath</span><span class="kw">:</span><span class="at"> log.txt</span></span></code></pre></div> +<div class="sourceCode" id="cb27"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="fu">logging</span><span class="kw">:</span></span> +<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a><span class="co"> # Possible verbosity values: debug, error, warning, info, silent</span></span> +<span id="cb27-3"><a href="#cb27-3" aria-hidden="true" tabindex="-1"></a><span class="co"> # debug level shows all messages</span></span> +<span id="cb27-4"><a href="#cb27-4" aria-hidden="true" tabindex="-1"></a><span class="co"> # error level shows all but debug messages, etc.</span></span> +<span id="cb27-5"><a href="#cb27-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">verbosity</span><span class="kw">:</span><span class="at"> info</span></span> +<span id="cb27-6"><a href="#cb27-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span></span> +<span id="cb27-7"><a href="#cb27-7" aria-hidden="true" tabindex="-1"></a><span class="co"> # OPTIONAL: log to file</span></span> +<span id="cb27-8"><a href="#cb27-8" aria-hidden="true" tabindex="-1"></a><span class="co"> # Remove line below to log to stderr</span></span> +<span id="cb27-9"><a href="#cb27-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">filepath</span><span class="kw">:</span><span class="at"> log.txt</span></span></code></pre></div> <p>By default, <code>pandoc-plot</code> logs warnings and errors to the standard error stream only.</p> <h3 id="other-commands">Other commands</h3> <h4 id="finding-installed-toolkits">Finding installed toolkits</h4> <p>You can determine which toolkits are available on your current machine using the <code>pandoc-plot toolkits</code> command. Here is the full help text:</p> -<div class="sourceCode" id="cb28"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true"></a><span class="ex">Usage</span>: pandoc-plot.EXE toolkits [--config PATH]</span> -<span id="cb28-2"><a href="#cb28-2" aria-hidden="true"></a> <span class="ex">Show</span> information on toolkits and exit.</span> -<span id="cb28-3"><a href="#cb28-3" aria-hidden="true"></a></span> -<span id="cb28-4"><a href="#cb28-4" aria-hidden="true"></a><span class="ex">Available</span> options:</span> -<span id="cb28-5"><a href="#cb28-5" aria-hidden="true"></a> <span class="ex">--config</span> PATH Path to optional configuration file.</span> -<span id="cb28-6"><a href="#cb28-6" aria-hidden="true"></a> <span class="ex">-h</span>,--help Show this help text</span></code></pre></div> +<div class="sourceCode" id="cb28"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="ex">Usage</span>: pandoc-plot.EXE toolkits [--config PATH]</span> +<span id="cb28-2"><a href="#cb28-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">Show</span> information on toolkits and exit.</span> +<span id="cb28-3"><a href="#cb28-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb28-4"><a href="#cb28-4" aria-hidden="true" tabindex="-1"></a><span class="ex">Available</span> options:</span> +<span id="cb28-5"><a href="#cb28-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">--config</span> PATH Path to optional configuration file.</span> +<span id="cb28-6"><a href="#cb28-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">-h</span>,--help Show this help text</span></code></pre></div> <h4 id="cleaning-output">Cleaning output</h4> <p>Figures produced by <code>pandoc-plot</code> can be placed in a few different locations. You can set a default location in the <a href="#configuration">Configuration</a>, but you can also re-direct specific figures in other directories if you use the <code>directory=...</code> argument in code blocks. These figures will build up over time. You can use the <code>clean</code> command to scan documents and delete the associated <code>pandoc-plot</code> output files. For example, to delete the figures generated from the <code>input.md</code> file:</p> -<div class="sourceCode" id="cb29"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true"></a><span class="ex">pandoc-plot</span> clean input.md</span></code></pre></div> +<div class="sourceCode" id="cb29"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pandoc-plot</span> clean input.md</span></code></pre></div> <p>This sill remove all directories where a figure <em>could</em> have been placed. <strong>WARNING</strong>: all files will be removed.</p> <p>Here is the full help text for the <code>clean</code> command:</p> -<div class="sourceCode" id="cb30"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true"></a><span class="ex">Usage</span>: pandoc-plot.EXE clean [--config PATH] FILE</span> -<span id="cb30-2"><a href="#cb30-2" aria-hidden="true"></a> <span class="ex">Clean</span> output directories where figures from FILE and log files might be</span> -<span id="cb30-3"><a href="#cb30-3" aria-hidden="true"></a> <span class="ex">stored.</span> WARNING: All files in those directories will be deleted.</span> -<span id="cb30-4"><a href="#cb30-4" aria-hidden="true"></a></span> -<span id="cb30-5"><a href="#cb30-5" aria-hidden="true"></a><span class="ex">Available</span> options:</span> -<span id="cb30-6"><a href="#cb30-6" aria-hidden="true"></a> <span class="ex">--config</span> PATH Path to optional configuration file.</span> -<span id="cb30-7"><a href="#cb30-7" aria-hidden="true"></a> <span class="ex">-h</span>,--help Show this help text</span></code></pre></div> +<div class="sourceCode" id="cb30"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="ex">Usage</span>: pandoc-plot.EXE clean [--config PATH] FILE</span> +<span id="cb30-2"><a href="#cb30-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">Clean</span> output directories where figures from FILE and log files might be</span> +<span id="cb30-3"><a href="#cb30-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">stored.</span> WARNING: All files in those directories will be deleted.</span> +<span id="cb30-4"><a href="#cb30-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb30-5"><a href="#cb30-5" aria-hidden="true" tabindex="-1"></a><span class="ex">Available</span> options:</span> +<span id="cb30-6"><a href="#cb30-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">--config</span> PATH Path to optional configuration file.</span> +<span id="cb30-7"><a href="#cb30-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">-h</span>,--help Show this help text</span></code></pre></div> <h4 id="configuration-template">Configuration template</h4> <p>Because <code>pandoc-plot</code> supports a few toolkits, there are a lot of configuration options. Don’t start from scratch! The <code>write-example-config</code> command will create a file for you, which you can then modify:</p> -<div class="sourceCode" id="cb31"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true"></a><span class="ex">pandoc-plot</span> write-example-config</span></code></pre></div> +<div class="sourceCode" id="cb31"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pandoc-plot</span> write-example-config</span></code></pre></div> <p>You will need to re-name the file to <code>.pandoc-ploy.yml</code> to be able to use it, so don’t worry about overwriting your own configuration.</p> <p>Here is the full help text for the <code>write-example-config</code> command:</p> -<div class="sourceCode" id="cb32"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true"></a><span class="ex">Usage</span>: pandoc-plot.EXE write-example-config [--path FILE]</span> -<span id="cb32-2"><a href="#cb32-2" aria-hidden="true"></a> <span class="ex">Write</span> example configuration to a file and exit.</span> -<span id="cb32-3"><a href="#cb32-3" aria-hidden="true"></a></span> -<span id="cb32-4"><a href="#cb32-4" aria-hidden="true"></a><span class="ex">Available</span> options:</span> -<span id="cb32-5"><a href="#cb32-5" aria-hidden="true"></a> <span class="ex">--path</span> FILE Target location of the configuration file. Default is</span> -<span id="cb32-6"><a href="#cb32-6" aria-hidden="true"></a> <span class="st">".example-pandoc-plot.yml"</span></span> -<span id="cb32-7"><a href="#cb32-7" aria-hidden="true"></a> <span class="ex">-h</span>,--help Show this help text</span></code></pre></div> +<div class="sourceCode" id="cb32"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="ex">Usage</span>: pandoc-plot.EXE write-example-config [--path FILE]</span> +<span id="cb32-2"><a href="#cb32-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">Write</span> example configuration to a file and exit.</span> +<span id="cb32-3"><a href="#cb32-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb32-4"><a href="#cb32-4" aria-hidden="true" tabindex="-1"></a><span class="ex">Available</span> options:</span> +<span id="cb32-5"><a href="#cb32-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">--path</span> FILE Target location of the configuration file. Default is</span> +<span id="cb32-6"><a href="#cb32-6" aria-hidden="true" tabindex="-1"></a> <span class="st">".example-pandoc-plot.yml"</span></span> +<span id="cb32-7"><a href="#cb32-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">-h</span>,--help Show this help text</span></code></pre></div> <h2 id="warning">Warning</h2> <p>Do not run this filter on unknown documents. There is nothing in <code>pandoc-plot</code> that can stop a script from performing <strong>evil actions</strong>.</p>
executable/Main.hs view
@@ -166,16 +166,16 @@ plotTransform c doc --- | Check that the runtime version of Pandoc is at least 2.8. The return value +-- | Check that the runtime version of Pandoc is at least 2.11. The return value -- indicates whether the Pandoc version is new enough or not. checkRuntimePandocVersion :: IO Bool checkRuntimePandocVersion = do - -- Please note that for some reason, makeVersion [2, 10, 0, 0] > makeVersion [2, 10] - let minimumPandocVersion = V.makeVersion [2, 10] + -- Please note that for some reason, makeVersion [2, 11, 0, 0] > makeVersion [2, 11] + let minimumPandocVersion = V.makeVersion [2, 11] -- Pandoc runs filters in an environment with two variables: -- PANDOV_VERSION and PANDOC_READER_OPTS - -- We can use the former to ensure that people are not using pandoc < 2.10 + -- We can use the former to ensure that people are not using pandoc < 2.11 pandocV <- lookupEnv "PANDOC_VERSION" case pandocV >>= readVersion of Nothing -> return True @@ -183,7 +183,7 @@ then do hPutStrLn stderr $ mconcat [ "ERROR (pandoc-plot) The pandoc-plot filter only " - , "supports Pandoc 2.10 and newer. " + , "supports Pandoc 2.11 and newer. " , "but you are using Pandoc " , showVersion v ]
pandoc-plot.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: pandoc-plot -version: 0.9.4.0 +version: 1.0.0.0 synopsis: A Pandoc filter to include figures generated from code blocks using your plotting toolkit of choice. description: A Pandoc filter to include figures generated from code blocks. Keep the document and code in the same location. Output is captured and included as a figure. category: Text @@ -91,8 +91,9 @@ , filepath >= 1.4 && < 2 , hashable >= 1 && < 2 , pandoc >= 2.10 && < 3 - , pandoc-types >= 1.21 && < 1.22 + , pandoc-types >= 1.22 && < 1.23 , lifted-async >= 0.10 && < 1 + , lifted-base >= 0.2 && < 1 , shakespeare >= 2.0 && < 3 , tagsoup >= 0.14 && < 1 , text >= 1 && < 2
src/Text/Pandoc/Filter/Plot/Configuration.hs view
@@ -20,7 +20,7 @@ import Data.Maybe (fromMaybe) import Data.Text (Text, pack, unpack) import qualified Data.Text.IO as TIO -import Data.Yaml +import Data.Yaml ((.!=), (.:?), FromJSON(parseJSON), Value(Object, Null)) import Data.Yaml.Config (ignoreEnv, loadYamlSettings) import System.FilePath (normalise)
src/Text/Pandoc/Filter/Plot/Monad/Logging.hs view
@@ -31,7 +31,7 @@ import Data.String (IsString(..)) import Data.Text (Text, unpack) import Data.Text.IO (hPutStr) -import Data.Yaml +import Data.Yaml (FromJSON(parseJSON), Value(String)) import System.IO (stderr, withFile, IOMode (AppendMode) )
src/Text/Pandoc/Filter/Plot/Monad/Types.hs view
@@ -35,7 +35,7 @@ import Data.List (intersperse) import Data.String (IsString (..)) import Data.Text (Text, pack) -import Data.Yaml +import Data.Yaml (FromJSON, ToJSON(toJSON)) import GHC.Generics (Generic) import System.FilePath (splitFileName)
src/Text/Pandoc/Filter/Plot/Scripting.hs view
@@ -18,6 +18,7 @@ , figurePath ) where +import Control.Exception.Lifted (bracket) import Control.Monad.Reader import Data.Hashable (hash) @@ -182,13 +183,17 @@ -- | Prepend a directory to the PATH environment variable for the duration -- of a computation. +-- +-- This function is exception-safe; even if an exception happens during the +-- computation, the PATH environment variable will be reverted back to +-- its initial value. withPrependedPath :: FilePath -> PlotM a -> PlotM a -withPrependedPath dir f = do +withPrependedPath dir f = do pathVar <- liftIO $ getEnv "PATH" let pathVarPrepended = mconcat [dir, ";", pathVar] - liftIO $ setEnv "PATH" $ pathVarPrepended - r <- f - liftIO $ setEnv "PATH" pathVar - return r + bracket + ( liftIO $ setEnv "PATH" pathVarPrepended) + (\_ -> liftIO $ setEnv "PATH" pathVar) + (\_ -> f)
stack.yaml view
@@ -1,12 +1,19 @@-resolver: nightly-2020-06-29 # GHC 8.10.1 +resolver: nightly-2020-10-11 # GHC 8.10.2 packages: - . +# GHC 8.10.2 is broken on Windows: +# https://gitlab.haskell.org/ghc/ghc/-/issues/18550 +compiler: ghc-8.10.1 + extra-deps: -- pandoc-2.10 -- hslua-1.1.2@sha256:6c231b2af447430d1ed04f065d40bb6882ece93cc7f32f4051dc99deb69beeae,9694 -- jira-wiki-markup-1.3.2@sha256:b5f0901208a0ee07aff60f5356aeb851b7aa7950c75a18a15fd34247a35886d8,3819 +- pandoc-2.11 +- citeproc-0.1@sha256:0c82d6cf5be3d82d4f755e6a2075ce224b9f2bdb891f1417ca49f5e78ac4e26a,5355 +- commonmark-0.1.0.2@sha256:fbff7a2ade0ce7d699964a87f765e503a3a9e22542c05f0f02ba7aad64e38af4,3278 +- commonmark-extensions-0.2.0.1@sha256:647aa8dba5fd46984ddedc15c3693c9c4d9655503d42006576bd8f0dadf8cd39,3176 +- commonmark-pandoc-0.2.0.1@sha256:529c6e2c6cabf61558b66a28123eafc1d90d3324be29819f59f024e430312c1f,1105 + # For development - git: https://github.com/owickstrom/pandoc-include-code.git commit: d5cbdc86eb1abcd9561c0965ac423d7011378ddb