Lacking Natural Simplicity (Posts about pandoc-discuss)https://tkurtbond.github.io/categories/pandoc-discuss.atom2024-01-23T18:49:38ZT. Kurt BondNikolaHow I author e-mails to pandoc-discuss and issues on the pandoc repohttps://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/2020-08-05T14:40:53-04:002020-08-05T14:40:53-04:00T. Kurt Bond<p>To submit an issue to the <a class="reference external" href="https://pandoc.org">pandoc</a> GitHub <a class="reference external" href="https://github.com/jgm/pandoc">repository</a> or an e-mail to
the <a class="reference external" href="https://groups.google.com/forum/#!forum/pandoc-discuss">pandoc-discuss</a> Google group when it is complicated I write a
reStructuredText (<a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a>) file that shows the problem and a <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> file
that explains the problem that prompted the issue/e-mail and include
the pandoc and os version information and includes the problem <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a>
file and sometimes the resulting output files. I process these files
with <a class="reference external" href="https://pandoc.org">pandoc</a>, of course. If it is going to the mailing list I format
it to HTML with a fancy style and cut and paste it from Chrome into
gmail. If it is going to be an issue report on GitHub I format it
into <span class="file">.gfm</span> (Github Flavored Markdown: <a class="reference external" href="https://github.github.com/gfm/">GFM</a>) file because that’s
what you write GitHub issues in and also format it into HTML to check
that the <span class="file">.gfm</span> is formed properly. Typically when I’m writing the
issue <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> file I don’t use language names on code blocks for the
syntax highlighting because that doesn’t seem to come out right in
GFM.</p>
<p>For example, here is a <a class="reference external" href="https://groups.google.com/d/msg/pandoc-discuss/U44h5Uo7qgQ/xDBRWwERBAAJ">post</a>, “RST to RST Conversion Loses Interpreted
Text Roles”, to <a class="reference external" href="https://groups.google.com/forum/#!forum/pandoc-discuss">pandoc-discuss</a>.</p>
<p>Here is the problem <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> source:</p>
<div class="code"><pre class="code ReST"><a id="rest_code_641bed0480434ea193e8918219434eaa-1" name="rest_code_641bed0480434ea193e8918219434eaa-1" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_641bed0480434ea193e8918219434eaa-1"></a>RST to RST Conversion Looses Interpreted Text Roles
<a id="rest_code_641bed0480434ea193e8918219434eaa-2" name="rest_code_641bed0480434ea193e8918219434eaa-2" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_641bed0480434ea193e8918219434eaa-2"></a>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<a id="rest_code_641bed0480434ea193e8918219434eaa-3" name="rest_code_641bed0480434ea193e8918219434eaa-3" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_641bed0480434ea193e8918219434eaa-3"></a>
<a id="rest_code_641bed0480434ea193e8918219434eaa-4" name="rest_code_641bed0480434ea193e8918219434eaa-4" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_641bed0480434ea193e8918219434eaa-4"></a><span class="p">..</span> <span class="ow">role</span><span class="p">::</span> app
<a id="rest_code_641bed0480434ea193e8918219434eaa-5" name="rest_code_641bed0480434ea193e8918219434eaa-5" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_641bed0480434ea193e8918219434eaa-5"></a>
<a id="rest_code_641bed0480434ea193e8918219434eaa-6" name="rest_code_641bed0480434ea193e8918219434eaa-6" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_641bed0480434ea193e8918219434eaa-6"></a><span class="na">:app:</span><span class="nv">`GNU Emacs`</span> is an app. So is <span class="na">:app:</span><span class="nv">`Eclipse`</span>.
</pre></div>
<p>Here is the e-mail <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> source:</p>
<div class="code"><pre class="code ReST"><a id="rest_code_998ca64fa8414f989bc12babbe406cf1-1" name="rest_code_998ca64fa8414f989bc12babbe406cf1-1" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-1"></a>RST to RST Conversion Loses Interpreted Text Roles
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-2" name="rest_code_998ca64fa8414f989bc12babbe406cf1-2" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-2"></a>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-3" name="rest_code_998ca64fa8414f989bc12babbe406cf1-3" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-3"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-4" name="rest_code_998ca64fa8414f989bc12babbe406cf1-4" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-4"></a><span class="p">..</span> <span class="ow">role</span><span class="p">::</span> file(literal)
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-5" name="rest_code_998ca64fa8414f989bc12babbe406cf1-5" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-5"></a><span class="p">..</span> <span class="ow">role</span><span class="p">::</span> app
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-6" name="rest_code_998ca64fa8414f989bc12babbe406cf1-6" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-6"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-7" name="rest_code_998ca64fa8414f989bc12babbe406cf1-7" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-7"></a>It turns out that when you use <span class="na">:app:</span><span class="nv">`pandoc`</span> to convert from <span class="s">``rst``</span>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-8" name="rest_code_998ca64fa8414f989bc12babbe406cf1-8" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-8"></a>to <span class="s">``rst``</span> the process loses interpreted text roles.
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-9" name="rest_code_998ca64fa8414f989bc12babbe406cf1-9" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-9"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-10" name="rest_code_998ca64fa8414f989bc12babbe406cf1-10" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-10"></a>My <span class="na">:app:</span><span class="nv">`pandoc`</span> version is:
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-11" name="rest_code_998ca64fa8414f989bc12babbe406cf1-11" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-11"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-12" name="rest_code_998ca64fa8414f989bc12babbe406cf1-12" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-12"></a><span class="p">..</span> <span class="ow">include</span><span class="p">::</span> pandoc.version
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-13" name="rest_code_998ca64fa8414f989bc12babbe406cf1-13" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-13"></a> <span class="nc">:code:</span>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-14" name="rest_code_998ca64fa8414f989bc12babbe406cf1-14" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-14"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-15" name="rest_code_998ca64fa8414f989bc12babbe406cf1-15" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-15"></a>My OS information is:
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-16" name="rest_code_998ca64fa8414f989bc12babbe406cf1-16" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-16"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-17" name="rest_code_998ca64fa8414f989bc12babbe406cf1-17" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-17"></a><span class="p">..</span> <span class="ow">include</span><span class="p">::</span> os.version
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-18" name="rest_code_998ca64fa8414f989bc12babbe406cf1-18" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-18"></a> <span class="nc">:code:</span>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-19" name="rest_code_998ca64fa8414f989bc12babbe406cf1-19" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-19"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-20" name="rest_code_998ca64fa8414f989bc12babbe406cf1-20" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-20"></a>I generated the outputs to check with the following commands:
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-21" name="rest_code_998ca64fa8414f989bc12babbe406cf1-21" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-21"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-22" name="rest_code_998ca64fa8414f989bc12babbe406cf1-22" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-22"></a><span class="p">..</span> <span class="ow">code</span><span class="p">::</span>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-23" name="rest_code_998ca64fa8414f989bc12babbe406cf1-23" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-23"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-24" name="rest_code_998ca64fa8414f989bc12babbe406cf1-24" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-24"></a> pandoc -r rst -w rst -o r2rclitr-out.rst r2rclitr-in.rst
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-25" name="rest_code_998ca64fa8414f989bc12babbe406cf1-25" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-25"></a> pandoc -r rst -w native --output=r2rclitr-in.native r2rclitr-in.rst
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-26" name="rest_code_998ca64fa8414f989bc12babbe406cf1-26" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-26"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-27" name="rest_code_998ca64fa8414f989bc12babbe406cf1-27" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-27"></a>So, for the ReStructuredText input (file <span class="na">:file:</span><span class="nv">`r2rclitr-in.rst`</span>):
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-28" name="rest_code_998ca64fa8414f989bc12babbe406cf1-28" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-28"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-29" name="rest_code_998ca64fa8414f989bc12babbe406cf1-29" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-29"></a><span class="p">..</span> <span class="ow">include</span><span class="p">::</span> r2rclitr-in.rst
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-30" name="rest_code_998ca64fa8414f989bc12babbe406cf1-30" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-30"></a> <span class="nc">:code:</span>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-31" name="rest_code_998ca64fa8414f989bc12babbe406cf1-31" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-31"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-32" name="rest_code_998ca64fa8414f989bc12babbe406cf1-32" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-32"></a>the resulting <span class="s">``rst``</span> output (<span class="na">:file:</span><span class="nv">`r2rclitr-out.rst`</span>) is generated:
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-33" name="rest_code_998ca64fa8414f989bc12babbe406cf1-33" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-33"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-34" name="rest_code_998ca64fa8414f989bc12babbe406cf1-34" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-34"></a><span class="p">..</span> <span class="ow">include</span><span class="p">::</span> r2rclitr-out.rst
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-35" name="rest_code_998ca64fa8414f989bc12babbe406cf1-35" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-35"></a> <span class="nc">:code:</span>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-36" name="rest_code_998ca64fa8414f989bc12babbe406cf1-36" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-36"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-37" name="rest_code_998ca64fa8414f989bc12babbe406cf1-37" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-37"></a>And the <span class="s">``native``</span> output (<span class="na">:file:</span><span class="nv">`r2rclitr-in.native`</span>) generated:
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-38" name="rest_code_998ca64fa8414f989bc12babbe406cf1-38" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-38"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-39" name="rest_code_998ca64fa8414f989bc12babbe406cf1-39" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-39"></a><span class="p">..</span> <span class="ow">include</span><span class="p">::</span> r2rclitr-in.native
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-40" name="rest_code_998ca64fa8414f989bc12babbe406cf1-40" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-40"></a> <span class="nc">:code:</span>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-41" name="rest_code_998ca64fa8414f989bc12babbe406cf1-41" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-41"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-42" name="rest_code_998ca64fa8414f989bc12babbe406cf1-42" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-42"></a>has <span class="s">``Span``</span> elements with classes, so it should be possible to turn
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-43" name="rest_code_998ca64fa8414f989bc12babbe406cf1-43" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-43"></a>those back into interpreted text roles in <span class="s">``rst``</span> output. I suppose
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-44" name="rest_code_998ca64fa8414f989bc12babbe406cf1-44" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-44"></a>you'd have to write out at the beginning of the RST output file a list
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-45" name="rest_code_998ca64fa8414f989bc12babbe406cf1-45" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-45"></a>of
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-46" name="rest_code_998ca64fa8414f989bc12babbe406cf1-46" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-46"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-47" name="rest_code_998ca64fa8414f989bc12babbe406cf1-47" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-47"></a><span class="p">..</span> <span class="ow">code</span><span class="p">::</span>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-48" name="rest_code_998ca64fa8414f989bc12babbe406cf1-48" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-48"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-49" name="rest_code_998ca64fa8414f989bc12babbe406cf1-49" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-49"></a><span class="p"> ..</span> <span class="ow">role</span><span class="p">::</span> rolename
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-50" name="rest_code_998ca64fa8414f989bc12babbe406cf1-50" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-50"></a>
<a id="rest_code_998ca64fa8414f989bc12babbe406cf1-51" name="rest_code_998ca64fa8414f989bc12babbe406cf1-51" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_998ca64fa8414f989bc12babbe406cf1-51"></a>lines for every class <span class="s">``rolename``</span> in a span. Would this be possible?
</pre></div>
<p>Here is the <span class="file">GNUmakefile</span> for it:</p>
<div class="code"><pre class="code makefile"><a id="rest_code_9260a4c9af2a4d92b573078e72134607-1" name="rest_code_9260a4c9af2a4d92b573078e72134607-1" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-1"></a><span class="nf">all</span><span class="o">:</span><span class="w"> </span><span class="n">r</span>2<span class="n">rclitr</span>-<span class="n">email</span>.<span class="n">html</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-2" name="rest_code_9260a4c9af2a4d92b573078e72134607-2" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-2"></a>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-3" name="rest_code_9260a4c9af2a4d92b573078e72134607-3" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-3"></a><span class="nf">r2rclitr-email.html</span><span class="o">:</span><span class="w"> </span><span class="n">pandoc</span>.<span class="n">version</span> <span class="n">os</span>.<span class="n">version</span> <span class="n">pandoc</span>.<span class="n">style</span> \
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-4" name="rest_code_9260a4c9af2a4d92b573078e72134607-4" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-4"></a> <span class="n">r</span>2<span class="n">rclitr</span>-<span class="n">in</span>.<span class="n">rst</span> <span class="n">r</span>2<span class="n">rclitr</span>-<span class="n">out</span>.<span class="n">rst</span> <span class="n">r</span>2<span class="n">rclitr</span>-<span class="n">in</span>.<span class="n">native</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-5" name="rest_code_9260a4c9af2a4d92b573078e72134607-5" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-5"></a>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-6" name="rest_code_9260a4c9af2a4d92b573078e72134607-6" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-6"></a><span class="nf">pandoc.version</span><span class="o">:</span><span class="w"> </span><span class="k">$(</span><span class="nv">shell</span> <span class="nv">type</span> <span class="nv">-p</span> <span class="nv">pandoc</span><span class="k">)</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-7" name="rest_code_9260a4c9af2a4d92b573078e72134607-7" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-7"></a><span class="w"> </span>pandoc<span class="w"> </span>--version<span class="w"> </span><span class="p">|</span><span class="w"> </span>head<span class="w"> </span>-2<span class="w"> </span>><span class="nv">$@</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-8" name="rest_code_9260a4c9af2a4d92b573078e72134607-8" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-8"></a><span class="nf">os.version</span><span class="o">:</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-9" name="rest_code_9260a4c9af2a4d92b573078e72134607-9" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-9"></a><span class="w"> </span>osinfo<span class="w"> </span>><span class="nv">$@</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-10" name="rest_code_9260a4c9af2a4d92b573078e72134607-10" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-10"></a>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-11" name="rest_code_9260a4c9af2a4d92b573078e72134607-11" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-11"></a><span class="c"># ReST input</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-12" name="rest_code_9260a4c9af2a4d92b573078e72134607-12" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-12"></a><span class="nf">%-out.rst</span><span class="o">:</span><span class="w"> </span>%-<span class="n">in</span>.<span class="n">rst</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-13" name="rest_code_9260a4c9af2a4d92b573078e72134607-13" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-13"></a><span class="w"> </span>pandoc<span class="w"> </span>-r<span class="w"> </span>rst<span class="w"> </span>-w<span class="w"> </span>rst<span class="w"> </span>-o<span class="w"> </span><span class="nv">$@</span><span class="w"> </span>$<
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-14" name="rest_code_9260a4c9af2a4d92b573078e72134607-14" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-14"></a><span class="nf">%.html </span><span class="o">:</span><span class="w"> </span>%.<span class="n">rst</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-15" name="rest_code_9260a4c9af2a4d92b573078e72134607-15" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-15"></a><span class="w"> </span>pandoc<span class="w"> </span>-r<span class="w"> </span>rst<span class="w"> </span>-w<span class="w"> </span>html<span class="w"> </span>--include-in-header<span class="o">=</span>pandoc.style<span class="w"> </span>--output<span class="o">=</span><span class="nv">$@</span><span class="w"> </span>$<
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-16" name="rest_code_9260a4c9af2a4d92b573078e72134607-16" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-16"></a><span class="nf">%.native </span><span class="o">:</span><span class="w"> </span>%.<span class="n">rst</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-17" name="rest_code_9260a4c9af2a4d92b573078e72134607-17" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-17"></a><span class="w"> </span>pandoc<span class="w"> </span>-r<span class="w"> </span>rst<span class="w"> </span>-w<span class="w"> </span>native<span class="w"> </span>--output<span class="o">=</span><span class="nv">$@</span><span class="w"> </span>$<
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-18" name="rest_code_9260a4c9af2a4d92b573078e72134607-18" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-18"></a>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-19" name="rest_code_9260a4c9af2a4d92b573078e72134607-19" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-19"></a><span class="nf">.PHONY</span><span class="o">:</span><span class="w"> </span><span class="n">clean</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-20" name="rest_code_9260a4c9af2a4d92b573078e72134607-20" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-20"></a>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-21" name="rest_code_9260a4c9af2a4d92b573078e72134607-21" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-21"></a><span class="nf">clean</span><span class="o">:</span>
<a id="rest_code_9260a4c9af2a4d92b573078e72134607-22" name="rest_code_9260a4c9af2a4d92b573078e72134607-22" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9260a4c9af2a4d92b573078e72134607-22"></a><span class="w"> </span>-rm<span class="w"> </span>*.pdf<span class="w"> </span>*.html<span class="w"> </span>*.ms<span class="w"> </span>*.ctx<span class="w"> </span>*.ltx<span class="w"> </span>*.native<span class="w"> </span>os.version<span class="w"> </span>*-out.rst
</pre></div>
<p>When I'm doing an issue the result is a <a class="reference external" href="https://github.github.com/gfm/">GFM</a> file that I can cut and
paste into the editor used for issues on GitHub, which expects <a class="reference external" href="https://github.github.com/gfm/">GFM</a>.
I write it in <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> because that can include files and processing from
<a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> to <a class="reference external" href="https://github.github.com/gfm/">GFM</a> does the inclusion, so I don't have to do it by hand.</p>
<p>Here's an example <a class="reference external" href="https://github.com/jgm/pandoc/issues/6592">issue</a>, "Reference Not Found Error #6592" on the
pandoc <a class="reference external" href="https://github.com/jgm/pandoc">repository</a>.</p>
<p>The problem <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> file <span class="file">rnf.rst</span> is</p>
<div class="code"><pre class="code ReST"><a id="rest_code_ad6c5db11c5945b09a449eea7a47dce3-1" name="rest_code_ad6c5db11c5945b09a449eea7a47dce3-1" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_ad6c5db11c5945b09a449eea7a47dce3-1"></a> <span class="gs">**Option:**</span> Arachnaurs' webs are made with a neurotoxin_ that can
<a id="rest_code_ad6c5db11c5945b09a449eea7a47dce3-2" name="rest_code_ad6c5db11c5945b09a449eea7a47dce3-2" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_ad6c5db11c5945b09a449eea7a47dce3-2"></a> quickly paralyze their prey! When wrapped in a web, make a Vigor
<a id="rest_code_ad6c5db11c5945b09a449eea7a47dce3-3" name="rest_code_ad6c5db11c5945b09a449eea7a47dce3-3" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_ad6c5db11c5945b09a449eea7a47dce3-3"></a> roll or quickly lose consciousness.
<a id="rest_code_ad6c5db11c5945b09a449eea7a47dce3-4" name="rest_code_ad6c5db11c5945b09a449eea7a47dce3-4" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_ad6c5db11c5945b09a449eea7a47dce3-4"></a>
<a id="rest_code_ad6c5db11c5945b09a449eea7a47dce3-5" name="rest_code_ad6c5db11c5945b09a449eea7a47dce3-5" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_ad6c5db11c5945b09a449eea7a47dce3-5"></a><span class="p"> ..</span> <span class="nt">_neurotoxin:</span> https://www.sciencenews.org/article/spiders-poisonous-webs-neuro-toxins-genes
</pre></div>
<p>(The contents of the actual file are all indented 3 spaces, but I had
to prefix all the lines in the code block in this source with the
Unicode <a class="reference external" href="https://en.wikipedia.org/wiki/Zero-width_space">ZERO WIDTH SPACE</a> so the indentation would show.)</p>
<p>The issue <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> file <span class="file">rnf-issue.rst</span> is</p>
<div class="code"><pre class="code ReST"><a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-1" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-1" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-1"></a>Reference Not Found Error
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-2" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-2" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-2"></a>@@@@@@@@@@@@@@@@@@@@@@@@@
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-3" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-3" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-3"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-4" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-4" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-4"></a>When I process the following reST file (notice it the whole file is
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-5" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-5" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-5"></a>indented 3 spaces)
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-6" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-6" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-6"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-7" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-7" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-7"></a><span class="p">..</span> <span class="ow">include</span><span class="p">::</span> rnf.rst
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-8" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-8" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-8"></a> <span class="nc">:code:</span>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-9" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-9" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-9"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-10" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-10" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-10"></a>into <span class="s">``ms``</span> or PDF via <span class="s">``ms``</span> output with the command
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-11" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-11" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-11"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-12" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-12" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-12"></a><span class="p">..</span> <span class="ow">code</span><span class="p">::</span>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-13" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-13" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-13"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-14" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-14" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-14"></a> pandoc -s -r rst -w ms -o rnf.ms.pdf rnf.rst
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-15" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-15" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-15"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-16" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-16" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-16"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-17" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-17" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-17"></a>I get the errors
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-18" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-18" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-18"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-19" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-19" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-19"></a><span class="p">..</span> <span class="ow">code</span><span class="p">::</span>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-20" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-20" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-20"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-21" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-21" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-21"></a> [WARNING] Reference not found for 'neurotoxin' at chunk line 1 column 57
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-22" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-22" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-22"></a> <standard input>:70: macro error: pdfhref has no destination
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-23" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-23" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-23"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-24" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-24" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-24"></a>and the resulting output PDF file and <span class="s">``.ms``</span> file indeed do not
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-25" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-25" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-25"></a>have the link.
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-26" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-26" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-26"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-27" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-27" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-27"></a>Here's the <span class="s">``.ms``</span> file that was generated:
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-28" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-28" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-28"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-29" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-29" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-29"></a><span class="p">..</span> <span class="ow">include</span><span class="p">::</span> rnf.ms
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-30" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-30" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-30"></a> <span class="nc">:code:</span>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-31" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-31" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-31"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-32" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-32" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-32"></a>I'm using the following version of Pandoc:
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-33" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-33" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-33"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-34" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-34" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-34"></a><span class="p">..</span> <span class="ow">include</span><span class="p">::</span> pandoc.version
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-35" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-35" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-35"></a> <span class="nc">:code:</span>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-36" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-36" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-36"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-37" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-37" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-37"></a>My OS information is:
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-38" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-38" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-38"></a>
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-39" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-39" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-39"></a><span class="p">..</span> <span class="ow">include</span><span class="p">::</span> os.version
<a id="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-40" name="rest_code_4416f9f284bd4d59a1a280c974e6d3cb-40" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_4416f9f284bd4d59a1a280c974e6d3cb-40"></a> <span class="nc">:code:</span>
</pre></div>
<p>The generated <a class="reference external" href="https://github.github.com/gfm/">GFM</a> is</p>
<div class="code"><pre class="code text"><a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-1" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-1" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-1"></a>Reference Not Found Error
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-2" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-2" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-2"></a>=========================
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-3" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-3" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-3"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-4" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-4" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-4"></a>When I process the following reST file (notice it the whole file is
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-5" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-5" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-5"></a>indented 3 spaces)
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-6" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-6" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-6"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-7" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-7" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-7"></a> **Option:** Arachnaurs' webs are made with a neurotoxin_ that can
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-8" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-8" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-8"></a> quickly paralyze their prey! When wrapped in a web, make a Vigor
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-9" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-9" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-9"></a> roll or quickly lose consciousness.
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-10" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-10" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-10"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-11" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-11" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-11"></a> .. _neurotoxin: https://www.sciencenews.org/article/spiders-poisonous-webs-neuro-toxins-genes
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-12" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-12" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-12"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-13" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-13" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-13"></a>into `ms` or PDF via `ms` output with the command
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-14" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-14" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-14"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-15" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-15" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-15"></a> pandoc -s -r rst -w ms -o rnf.ms.pdf rnf.rst
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-16" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-16" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-16"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-17" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-17" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-17"></a>I get the errors
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-18" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-18" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-18"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-19" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-19" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-19"></a> [WARNING] Reference not found for 'neurotoxin' at chunk line 1 column 57
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-20" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-20" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-20"></a> <standard input>:70: macro error: pdfhref has no destination
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-21" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-21" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-21"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-22" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-22" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-22"></a>and the resulting output PDF file and `.ms` file indeed do not have the
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-23" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-23" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-23"></a>link.
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-24" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-24" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-24"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-25" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-25" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-25"></a>Here's the `.ms` file that was generated:
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-26" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-26" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-26"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-27" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-27" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-27"></a> .QS
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-28" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-28" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-28"></a> .LP
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-29" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-29" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-29"></a> \f[B]Option:\f[R] Arachnaurs\[aq] webs are made with a \c
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-30" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-30" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-30"></a> .pdfhref W -D "" -A "\c" \
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-31" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-31" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-31"></a> -- "neurotoxin"
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-32" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-32" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-32"></a> \& that can quickly paralyze their prey! When wrapped in a web, make a
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-33" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-33" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-33"></a> Vigor roll or quickly lose consciousness.
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-34" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-34" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-34"></a> .QE
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-35" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-35" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-35"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-36" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-36" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-36"></a>I'm using the following version of Pandoc:
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-37" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-37" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-37"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-38" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-38" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-38"></a> pandoc 2.10.1
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-39" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-39" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-39"></a> Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-40" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-40" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-40"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-41" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-41" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-41"></a>My OS information is:
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-42" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-42" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-42"></a>
<a id="rest_code_cd91b32f445141a1ad41a50ea66c6895-43" name="rest_code_cd91b32f445141a1ad41a50ea66c6895-43" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_cd91b32f445141a1ad41a50ea66c6895-43"></a> Mac OS X, Version 10.15.6, Build 19G73
</pre></div>
<p>Here is the <span class="file">GNUmakefile</span> for it:</p>
<div class="code"><pre class="code makefile"><a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-1" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-1" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-1"></a><span class="nf">all</span><span class="o">:</span><span class="w"> </span><span class="n">rnf</span>-<span class="n">issue</span>.<span class="n">gfm</span> <span class="n">rnf</span>-<span class="n">issue</span>.<span class="n">html</span> <span class="n">rnf</span>-<span class="n">issue</span>.<span class="n">gfm</span>.<span class="n">html</span> <span class="n">rnf</span>.<span class="n">ms</span>.<span class="n">pdf</span> <span class="n">rnf</span>.<span class="n">ms</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-2" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-2" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-2"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-3" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-3" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-3"></a><span class="nf">rnf-issue.html rnf-issue.gfm rnf-issue.gfm.html</span><span class="o">:</span><span class="w"> </span><span class="n">rnf</span>.<span class="n">rst</span> \
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-4" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-4" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-4"></a> <span class="n">pandoc</span>.<span class="n">version</span> <span class="n">os</span>.<span class="n">version</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-5" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-5" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-5"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-6" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-6" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-6"></a><span class="nf">.PRECIOUS</span><span class="o">:</span><span class="w"> </span><span class="n">rnf</span>-<span class="n">issue</span>.<span class="n">gfm</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-7" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-7" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-7"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-8" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-8" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-8"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-9" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-9" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-9"></a><span class="nf">pandoc.version</span><span class="o">:</span><span class="w"> </span><span class="k">$(</span><span class="nv">shell</span> <span class="nv">type</span> <span class="nv">-p</span> <span class="nv">pandoc</span><span class="k">)</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-10" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-10" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-10"></a><span class="w"> </span>pandoc<span class="w"> </span>--version<span class="w"> </span><span class="p">|</span><span class="w"> </span>head<span class="w"> </span>-2<span class="w"> </span>><span class="nv">$@</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-11" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-11" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-11"></a><span class="nf">os.version</span><span class="o">:</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-12" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-12" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-12"></a><span class="w"> </span>osinfo<span class="w"> </span>><span class="nv">$@</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-13" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-13" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-13"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-14" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-14" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-14"></a><span class="nf">%.ms </span><span class="o">:</span><span class="w"> </span>%.<span class="n">rst</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-15" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-15" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-15"></a><span class="w"> </span>pandoc<span class="w"> </span>-r<span class="w"> </span>rst<span class="w"> </span>-w<span class="w"> </span>ms<span class="w"> </span>-o<span class="w"> </span><span class="nv">$@</span><span class="w"> </span>$<
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-16" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-16" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-16"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-17" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-17" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-17"></a><span class="nf">%.ms.pdf </span><span class="o">:</span><span class="w"> </span>%.<span class="n">rst</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-18" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-18" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-18"></a><span class="w"> </span>pandoc<span class="w"> </span>-s<span class="w"> </span>-r<span class="w"> </span>rst<span class="w"> </span>-w<span class="w"> </span>ms<span class="w"> </span>-o<span class="w"> </span><span class="nv">$@</span><span class="w"> </span>$<
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-19" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-19" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-19"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-20" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-20" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-20"></a><span class="nf">%.html </span><span class="o">:</span><span class="w"> </span>%.<span class="n">rst</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-21" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-21" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-21"></a><span class="w"> </span>pandoc<span class="w"> </span>-s<span class="w"> </span>-r<span class="w"> </span>rst<span class="w"> </span>-w<span class="w"> </span>html<span class="w"> </span>-H<span class="w"> </span>fancy.style<span class="w"> </span>--output<span class="o">=</span><span class="nv">$@</span><span class="w"> </span>$<
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-22" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-22" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-22"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-23" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-23" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-23"></a><span class="nf">%-pandoc.html </span><span class="o">:</span><span class="w"> </span>%.<span class="n">rst</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-24" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-24" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-24"></a><span class="w"> </span>pandoc<span class="w"> </span>-r<span class="w"> </span>rst<span class="w"> </span>-w<span class="w"> </span>html<span class="w"> </span>--output<span class="o">=</span><span class="nv">$@</span><span class="w"> </span>$<
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-25" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-25" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-25"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-26" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-26" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-26"></a><span class="nf">%-docutils.html</span><span class="o">:</span><span class="w"> </span>%.<span class="n">rst</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-27" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-27" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-27"></a><span class="w"> </span>rst2html.py<span class="w"> </span>$<<span class="w"> </span><span class="p">|</span><span class="w"> </span>sed<span class="w"> </span><span class="s1">'1,/^<div class="document">/d'</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>sed<span class="w"> </span>-e<span class="w"> </span><span class="s1">'1,2d'</span><span class="w"> </span>-e<span class="w"> </span><span class="s1">'\%</div>%,$$d'</span><span class="w"> </span>><span class="nv">$@</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-28" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-28" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-28"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-29" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-29" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-29"></a><span class="nf">%.gfm </span><span class="o">:</span><span class="w"> </span>%.<span class="n">rst</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-30" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-30" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-30"></a><span class="w"> </span>pandoc<span class="w"> </span>-r<span class="w"> </span>rst<span class="w"> </span>-w<span class="w"> </span>gfm<span class="w"> </span>-o<span class="w"> </span><span class="nv">$@</span><span class="w"> </span>$<
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-31" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-31" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-31"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-32" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-32" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-32"></a><span class="nf">%.gfm.html </span><span class="o">:</span><span class="w"> </span>%.<span class="n">gfm</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-33" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-33" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-33"></a><span class="w"> </span>pandoc<span class="w"> </span>-s<span class="w"> </span>-r<span class="w"> </span>gfm<span class="w"> </span>-w<span class="w"> </span>html<span class="w"> </span>-H<span class="w"> </span>fancy.style<span class="w"> </span>-o<span class="w"> </span><span class="nv">$@</span><span class="w"> </span>$<
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-34" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-34" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-34"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-35" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-35" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-35"></a><span class="nf">.PHONY</span><span class="o">:</span><span class="w"> </span><span class="n">clean</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-36" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-36" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-36"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-37" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-37" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-37"></a><span class="nf">clean</span><span class="o">:</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-38" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-38" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-38"></a><span class="w"> </span>-rm<span class="w"> </span>*.html<span class="w"> </span>*.native<span class="w"> </span>os.version<span class="w"> </span>pandoc.version<span class="w"> </span>docutils.version<span class="w"> </span>*.gfm
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-39" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-39" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-39"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-40" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-40" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-40"></a><span class="nf">.depend</span><span class="o">:</span><span class="w"> </span><span class="n">rnf</span>-<span class="n">issue</span>.<span class="n">rst</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-41" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-41" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-41"></a><span class="w"> </span>rst-depends<span class="w"> </span>rnf-issue.rst<span class="w"> </span>><span class="nv">$@</span>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-42" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-42" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-42"></a>
<a id="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-43" name="rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-43" href="https://tkurtbond.github.io/posts/2020/08/05/how-i-author-e-mails-to-pandoc-discuss-and-issues-on-the-pandoc-repo/#rest_code_9c10c4532e0e40c1b0c45ad6fb9a9b2f-43"></a><span class="cp">include .depend</span>
</pre></div>
<p>This may seem complex, but in practice I use templates to start out
all the files and by building it all with <span class="program">make</span> and <a class="reference external" href="https://pandoc.org">pandoc</a>
using the <code class="docutils literal">include</code> directive of <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> I ensure that the contents of
the message are correctly built from the various included files.</p>Customizing pandoc ms output with a Lua filterhttps://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/2020-05-03T01:01:53-04:002020-05-03T01:01:53-04:00T. Kurt Bond<p>This article started as a <a class="reference external" href="https://groups.google.com/d/msg/pandoc-discuss/UJgyLbxTNxo/MZDVFts-BAAJ">message</a> I sent to the the <a class="reference external" href="https://groups.google.com/forum/#!forum/pandoc-discuss">pandoc-discuss</a>
Google Group. This version has more links and has been slightly
reworded.</p>
<p>I work with <a class="reference external" href="https://docutils.sourceforge.io/rst.html">ReStructuredText</a> documents a lot and often use <a class="reference external" href="https://pandoc.org/">pandoc</a> to
format them, especially to PDF by way of <span class="app">pandoc</span>'s <code class="docutils literal">ms</code>
output format, which uses <span class="app">groff</span> with the <code class="docutils literal"><span class="pre">-ms</span></code> macros to produce the
PDF output. Using <code class="docutils literal">ms</code> output is fast, <span class="app">groff</span> is usually available
on the operating systems I use, and if you <em>do</em> have to install <span class="app">groff</span>
it is easy to do and much, much smaller than any <span class="app">TeX</span> distributions.</p>
<p>However, it would be a nice to be able to customize the <code class="docutils literal">ms</code> output
more for specific input, like if you are using technical writing and
are pining for something like the various inline roles of <a class="reference external" href="https://tdg.docbook.org/tdg/5.1/ch02.html#s.inline">DocBook</a>, or
wanted poems to be typeset more stylishly that the <code class="docutils literal">ms</code> output does.</p>
<p>You should probably be a little familiar with the <a class="reference external" href="https://pandoc.org/MANUAL.html">Pandoc User
Manual</a> and have the documentation for <a class="reference external" href="https://pandoc.org/lua-filters.html">Lua Filter</a>'s available for
reference while reading this article. And having a reading
familiarity with <a class="reference external" href="https://www.gnu.org/software/groff/">groff</a> and its <a class="reference external" href="https://www.gnu.org/software/groff/manual/">manual</a> and specifically the <a class="reference external" href="https://www.gnu.org/software/groff/manual/html_node/ms.html#ms">-ms
macros</a> will be useful too. And maybe <a class="reference external" href="https://www.lua.org/">Lua</a> as well.</p>
<p>Starting with an <a class="reference external" href="https://dave.autonoma.ca/blog/2020/04/28/typesetting-markdown-part-8/">article</a> from Dave Jarvis that had an example <a class="reference external" href="https://pandoc.org/lua-filters.html">Lua
filter</a> for customizing the <span class="app">ConTeXt</span> output and a little help
from the pandoc-discuss mailing list I came up with this example <a class="reference external" href="https://pandoc.org/lua-filters.html">Lua
Filter</a> that formats program names and poems specially.</p>
<p>This filter wraps spans with a class, such as from interpreted text
roles defined in the source ReST (like <code class="docutils literal"><span class="pre">:program:`pandoc`</span></code>) in calls
to user defined <span class="app">groff</span> strings <code class="docutils literal"><span class="pre">\*[start<class>]</span></code> and
<code class="docutils literal"><span class="pre">\*[stop<class>]</span></code>. (I've specified the string definitions for
<code class="docutils literal"><span class="pre">\*[startprogram]</span></code> and <code class="docutils literal"><span class="pre">\*[stopprogram]</span></code> in the source ReST as a
raw block for <code class="docutils literal">ms</code> output but they could be in a customized <code class="docutils literal">ms</code>
pandoc template, too.) These strings can include <span class="app">groff</span> escapes to
change the font and the glyph color and then change back to the
previous font and glyph color. In this example I made PDF output for
the interpreted text role <code class="docutils literal">program</code> come out in a constant width
font and in red.</p>
<p>It also wraps divs with classes with calls to user defined <span class="app">groff</span>
macros <code class="docutils literal">.start<class></code> and <code class="docutils literal">.stop<class></code> (also included in the
source ReST in the raw block for ms output).</p>
<p>For divs with the poem class, it converts any contained LineBlock
elements into a list of Plain elements containing its contents,
avoiding the ms output for the LineBlock starting with <code class="docutils literal">.LP</code>, which
would cancel the <code class="docutils literal">.DS</code> (display start) macro I want to use in the
.startpoem macro definition. The <code class="docutils literal">.LP</code> would also reset the font family
in use to the default, another reason to avoid it. <a class="footnote-reference brackets" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#lp" id="footnote-reference-1" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a></p>
<p>The filter also converts the empty element that occurs in the line block
as a result of a blank line in the line block input into a RawBlock
that creates a blank line in the ms output, to show the division into
stanzas of the poem.</p>
<p>Interestingly, the first Str elements in the each line in the content
of the line block preserved the leading spaces from the input as
Unicode NO-BREAK SPACE characters, preserving indentation of lines in
the line block. Unfortunately, the width of those spaces alone is not
enough create a visually distinct indentation, so this filter changes
those Str elements into a RawInline that outputs a <span class="app">groff</span> horizfontal
movement whose width is based on the number of leading NO-BREAK SPACE
characters, and follow this with a new Str element that has the
leading NO-BREAK SPACE characters removed.</p>
<p>Here is the Lua filter, <span class="file">classify-rst-ms.lua</span>:</p>
<div class="code"><pre class="code lua"><a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-1" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-1" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-1"></a><span class="n">onig</span> <span class="o">=</span> <span class="nb">require</span> <span class="p">(</span><span class="s2">"rex_onig"</span><span class="p">)</span> <span class="c1">-- Need a regex package that understands UTF8.</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-2" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-2" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-2"></a><span class="c1">-- text in LineBreak preserves leading spaces as Unicode NO-BREAK SPACE</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-3" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-3" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-3"></a><span class="n">leading_nobreakspace_rx</span> <span class="o">=</span> <span class="n">onig</span><span class="p">.</span><span class="n">new</span> <span class="p">(</span><span class="s2">"^(</span><span class="se">\u{a0}</span><span class="s2">+)(.*)$"</span><span class="p">,</span> <span class="kc">nil</span><span class="p">,</span> <span class="s2">"UTF8"</span><span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-4" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-4" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-4"></a>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-5" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-5" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-5"></a><span class="kr">function</span> <span class="nf">Div</span><span class="p">(</span> <span class="n">element</span> <span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-6" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-6" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-6"></a> <span class="kd">local</span> <span class="n">annotation</span> <span class="o">=</span> <span class="n">element</span><span class="p">.</span><span class="n">classes</span><span class="p">:</span><span class="n">find_if</span><span class="p">(</span> <span class="n">matches</span> <span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-7" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-7" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-7"></a> <span class="kd">local</span> <span class="n">numPara</span> <span class="o">=</span> <span class="mi">0</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-8" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-8" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-8"></a> <span class="kr">if</span> <span class="n">annotation</span> <span class="kr">then</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-9" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-9" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-9"></a> <span class="n">annotation</span> <span class="o">=</span> <span class="n">annotation</span><span class="p">:</span><span class="n">gsub</span><span class="p">(</span> <span class="s2">"[^%w]*"</span><span class="p">,</span> <span class="s2">""</span> <span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-10" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-10" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-10"></a> <span class="kr">if</span> <span class="n">annotation</span> <span class="o">==</span> <span class="s2">"poem"</span> <span class="kr">then</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-11" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-11" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-11"></a> <span class="n">element</span> <span class="o">=</span> <span class="n">pandoc</span><span class="p">.</span><span class="n">walk_block</span> <span class="p">(</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-12" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-12" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-12"></a> <span class="n">element</span><span class="p">,</span> <span class="p">{</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-13" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-13" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-13"></a> <span class="c1">-- Replace LineBlock element with a list of Plain elements</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-14" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-14" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-14"></a> <span class="c1">-- containing the LineBlock's subelements.</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-15" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-15" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-15"></a> <span class="n">LineBlock</span> <span class="o">=</span> <span class="kr">function</span> <span class="p">(</span><span class="n">el</span><span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-16" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-16" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-16"></a> <span class="kd">local</span> <span class="n">l</span> <span class="o">=</span> <span class="p">{}</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-17" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-17" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-17"></a> <span class="kr">for</span> <span class="n">_</span><span class="p">,</span> <span class="n">subel</span> <span class="kr">in</span> <span class="nb">ipairs</span> <span class="p">(</span><span class="n">el</span><span class="p">.</span><span class="n">content</span><span class="p">)</span> <span class="kr">do</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-18" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-18" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-18"></a> <span class="kr">if</span> <span class="o">#</span><span class="n">subel</span> <span class="o">==</span> <span class="mi">0</span> <span class="kr">then</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-19" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-19" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-19"></a> <span class="c1">-- If subel is an empty table, output a raw empty line</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-20" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-20" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-20"></a> <span class="nb">table.insert</span> <span class="p">(</span><span class="n">l</span><span class="p">,</span> <span class="n">pandoc</span><span class="p">.</span><span class="n">RawBlock</span> <span class="p">(</span><span class="s2">"ms"</span><span class="p">,</span> <span class="s2">"</span><span class="se">\n\n</span><span class="s2">"</span><span class="p">))</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-21" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-21" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-21"></a> <span class="kr">else</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-22" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-22" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-22"></a> <span class="c1">-- Check for leading NO-BREAK SPACE charaters</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-23" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-23" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-23"></a> <span class="kd">local</span> <span class="n">m1</span><span class="p">,</span> <span class="n">m2</span> <span class="o">=</span> <span class="n">onig</span><span class="p">.</span><span class="n">match</span> <span class="p">(</span><span class="n">subel</span><span class="p">[</span><span class="mi">1</span><span class="p">].</span><span class="n">text</span><span class="p">,</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-24" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-24" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-24"></a> <span class="n">leading_nobreakspace_rx</span><span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-25" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-25" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-25"></a> <span class="kr">if</span> <span class="n">m1</span> <span class="kr">then</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-26" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-26" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-26"></a> <span class="c1">-- Replace the NO-BREAK SPACE characters with a raw</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-27" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-27" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-27"></a> <span class="c1">-- groff horizontal movement, because the</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-28" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-28" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-28"></a> <span class="c1">-- NO-BREAK SPACE characters are too narrow.</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-29" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-29" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-29"></a> <span class="nb">table.insert</span> <span class="p">(</span><span class="n">subel</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">pandoc</span><span class="p">.</span><span class="n">RawInline</span> <span class="p">(</span><span class="s2">"ms"</span><span class="p">,</span> <span class="nb">string.format</span> <span class="p">(</span><span class="s2">"</span><span class="se">\\</span><span class="s2">h'%dn'"</span><span class="p">,</span> <span class="nb">utf8.len</span> <span class="p">(</span><span class="n">m1</span><span class="p">))))</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-30" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-30" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-30"></a> <span class="c1">-- Modify what was used to be the first item to just</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-31" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-31" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-31"></a> <span class="c1">-- include the trailing characters of the match.</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-32" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-32" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-32"></a> <span class="n">subel</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">=</span> <span class="n">pandoc</span><span class="p">.</span><span class="n">Str</span> <span class="p">(</span><span class="n">m2</span><span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-33" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-33" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-33"></a> <span class="nb">table.insert</span> <span class="p">(</span><span class="n">l</span><span class="p">,</span> <span class="n">pandoc</span><span class="p">.</span><span class="n">Plain</span> <span class="p">(</span><span class="n">subel</span><span class="p">))</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-34" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-34" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-34"></a> <span class="kr">else</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-35" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-35" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-35"></a> <span class="c1">-- Just put the subel in Plain element.</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-36" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-36" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-36"></a> <span class="nb">table.insert</span> <span class="p">(</span><span class="n">l</span><span class="p">,</span> <span class="p">(</span><span class="n">pandoc</span><span class="p">.</span><span class="n">Plain</span> <span class="p">(</span><span class="n">subel</span><span class="p">)))</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-37" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-37" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-37"></a> <span class="kr">end</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-38" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-38" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-38"></a> <span class="kr">end</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-39" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-39" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-39"></a> <span class="kr">end</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-40" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-40" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-40"></a> <span class="kr">return</span> <span class="n">l</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-41" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-41" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-41"></a> <span class="kr">end</span> <span class="p">})</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-42" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-42" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-42"></a> <span class="kr">end</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-43" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-43" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-43"></a> <span class="kr">return</span> <span class="p">{</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-44" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-44" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-44"></a> <span class="n">ms</span><span class="p">(</span> <span class="s2">".start"</span><span class="p">,</span> <span class="n">annotation</span> <span class="p">),</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-45" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-45" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-45"></a> <span class="n">element</span><span class="p">,</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-46" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-46" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-46"></a> <span class="n">ms</span><span class="p">(</span> <span class="s2">".stop"</span><span class="p">,</span> <span class="n">annotation</span> <span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-47" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-47" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-47"></a> <span class="p">}</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-48" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-48" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-48"></a> <span class="kr">end</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-49" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-49" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-49"></a><span class="kr">end</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-50" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-50" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-50"></a>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-51" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-51" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-51"></a><span class="kr">function</span> <span class="nf">Span</span><span class="p">(</span><span class="n">element</span><span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-52" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-52" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-52"></a> <span class="kd">local</span> <span class="n">annotation</span> <span class="o">=</span> <span class="n">element</span><span class="p">.</span><span class="n">classes</span><span class="p">:</span><span class="n">find_if</span><span class="p">(</span><span class="n">matches</span><span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-53" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-53" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-53"></a>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-54" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-54" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-54"></a> <span class="kr">if</span> <span class="n">annotation</span> <span class="kr">then</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-55" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-55" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-55"></a> <span class="n">annotation</span> <span class="o">=</span> <span class="n">annotation</span><span class="p">:</span><span class="n">gsub</span><span class="p">(</span><span class="s2">"[^%w]*"</span><span class="p">,</span> <span class="s2">""</span><span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-56" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-56" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-56"></a>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-57" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-57" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-57"></a> <span class="kr">return</span> <span class="p">{</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-58" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-58" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-58"></a> <span class="n">ms_inline</span><span class="p">(</span><span class="s2">"</span><span class="se">\\</span><span class="s2">*[start"</span><span class="p">,</span> <span class="n">annotation</span><span class="p">,</span> <span class="s2">"]"</span><span class="p">),</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-59" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-59" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-59"></a> <span class="n">element</span><span class="p">,</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-60" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-60" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-60"></a> <span class="n">ms_inline</span><span class="p">(</span><span class="s2">"</span><span class="se">\\</span><span class="s2">*[stop"</span><span class="p">,</span> <span class="n">annotation</span><span class="p">,</span> <span class="s2">"]"</span><span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-61" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-61" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-61"></a> <span class="p">}</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-62" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-62" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-62"></a> <span class="kr">end</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-63" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-63" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-63"></a><span class="kr">end</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-64" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-64" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-64"></a>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-65" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-65" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-65"></a><span class="kr">function</span> <span class="nf">matches</span><span class="p">(</span> <span class="n">s</span> <span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-66" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-66" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-66"></a> <span class="kr">return</span> <span class="n">s</span><span class="p">:</span><span class="n">match</span><span class="p">(</span> <span class="s2">"^%a+"</span> <span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-67" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-67" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-67"></a><span class="kr">end</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-68" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-68" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-68"></a>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-69" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-69" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-69"></a><span class="kr">function</span> <span class="nf">ms</span><span class="p">(</span> <span class="n">macro</span><span class="p">,</span> <span class="n">annotation</span> <span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-70" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-70" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-70"></a> <span class="kr">return</span> <span class="n">pandoc</span><span class="p">.</span><span class="n">RawBlock</span><span class="p">(</span> <span class="s2">"ms"</span><span class="p">,</span> <span class="n">macro</span> <span class="o">..</span> <span class="n">annotation</span> <span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-71" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-71" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-71"></a><span class="kr">end</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-72" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-72" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-72"></a>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-73" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-73" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-73"></a><span class="kr">function</span> <span class="nf">ms_inline</span> <span class="p">(</span><span class="n">macro</span><span class="p">,</span> <span class="n">annotation</span><span class="p">,</span> <span class="n">stop</span><span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-74" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-74" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-74"></a> <span class="kr">return</span> <span class="n">pandoc</span><span class="p">.</span><span class="n">RawInline</span> <span class="p">(</span><span class="s2">"ms"</span><span class="p">,</span> <span class="n">macro</span> <span class="o">..</span> <span class="n">annotation</span> <span class="o">..</span> <span class="n">stop</span><span class="p">)</span>
<a id="rest_code_d7a56000eea347d29a9fd0b471629dbf-75" name="rest_code_d7a56000eea347d29a9fd0b471629dbf-75" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_d7a56000eea347d29a9fd0b471629dbf-75"></a><span class="kr">end</span>
</pre></div>
<p>Here is the ReST source of the document, <span class="file">poem-plus.rst</span>:</p>
<div class="code"><pre class="code ReST"><a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-1" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-1" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-1"></a>Lua Filters For Massaging <span class="s">``ms``</span> Output
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-2" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-2" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-2"></a>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-3" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-3" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-3"></a>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-4" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-4" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-4"></a><span class="p">..</span> <span class="ow">raw</span><span class="p">::</span> ms
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-5" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-5" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-5"></a>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-6" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-6" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-6"></a> .ds startprogram \\f[CW]\\m[red]
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-7" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-7" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-7"></a> .ds stopprogram \\m[]\\fP
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-8" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-8" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-8"></a> .de startpoem
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-9" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-9" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-9"></a> .ds OLDFAM \\*[FAM]
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-10" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-10" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-10"></a> .ds FAM BM
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-11" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-11" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-11"></a> .DS I 3
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-12" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-12" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-12"></a><span class="cp"> ..</span>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-13" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-13" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-13"></a><span class="cp"> .de stoppoem</span>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-14" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-14" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-14"></a><span class="cp"> .DE</span>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-15" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-15" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-15"></a><span class="cp"> .ds FAM \\*[OLDFAM]</span>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-16" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-16" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-16"></a><span class="cp"> ..</span>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-17" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-17" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-17"></a>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-18" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-18" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-18"></a><span class="p">..</span> <span class="ow">role</span><span class="p">::</span> program
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-19" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-19" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-19"></a>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-20" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-20" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-20"></a>This is a sentence. This sentence talks about <span class="na">:program:</span><span class="nv">`pandoc`</span>.
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-21" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-21" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-21"></a>This is
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-22" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-22" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-22"></a>another sentence.
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-23" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-23" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-23"></a>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-24" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-24" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-24"></a><span class="p">..</span> <span class="ow">class</span><span class="p">::</span> poem
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-25" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-25" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-25"></a>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-26" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-26" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-26"></a> <span class="o">|</span> Some say the world will end in fire,
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-27" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-27" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-27"></a> <span class="o">|</span> Some say in ice.
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-28" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-28" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-28"></a> <span class="o">|</span> From what I've tasted of desire
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-29" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-29" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-29"></a> <span class="o">|</span> I hold with those who favor fire.
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-30" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-30" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-30"></a> <span class="o">|</span> But if it had to perish twice,
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-31" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-31" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-31"></a> <span class="o">|</span> I think I know enough of hate
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-32" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-32" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-32"></a> <span class="o">|</span> To say that for destruction ice
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-33" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-33" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-33"></a> <span class="o">|</span> Is also great,
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-34" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-34" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-34"></a> <span class="o">|</span> And would suffice.
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-35" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-35" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-35"></a> |
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-36" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-36" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-36"></a> <span class="o">|</span> And another line,
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-37" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-37" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-37"></a> <span class="o">|</span> And an indented line.
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-38" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-38" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-38"></a>
<a id="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-39" name="rest_code_0f4dd3d29ca847dc943816a43dfb9cba-39" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_0f4dd3d29ca847dc943816a43dfb9cba-39"></a>This is a final sentence.
</pre></div>
<p>And here is the ms output:</p>
<div class="code"><pre class="code groff"><a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-1" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-1" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-1"></a>.<span class="k">SH</span> <span class="m">1</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-2" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-2" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-2"></a>Lua Filters For Massaging <span class="se">\f[CB]ms\f[B]</span> Output
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-3" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-3" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-3"></a>.<span class="k">pdfhref</span> <span class="s">O</span> <span class="m">1</span> <span class="s2">"Lua Filters For Massaging ms Output"</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-4" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-4" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-4"></a>.<span class="k">pdfhref</span> <span class="s">M</span> <span class="s2">"lua-filters-for-massaging-ms-output"</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-5" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-5" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-5"></a>.<span class="k">ds</span> <span class="s">startprogram</span> <span class="se">\\</span><span class="s">f[CW]\\m[red]</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-6" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-6" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-6"></a>.<span class="k">ds</span> <span class="s">stopprogram</span> <span class="se">\\</span><span class="s">m[]\\fP</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-7" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-7" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-7"></a>.<span class="k">de</span> <span class="s">startpoem</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-8" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-8" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-8"></a>.<span class="k">ds</span> <span class="s">OLDFAM</span> <span class="se">\\</span><span class="s">*[FAM]</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-9" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-9" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-9"></a>.<span class="k">ds</span> <span class="s">FAM</span> <span class="s">BM</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-10" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-10" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-10"></a>.<span class="k">DS</span> <span class="s">I</span> <span class="m">3</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-11" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-11" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-11"></a><span class="p">.</span><span class="s">.</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-12" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-12" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-12"></a>.<span class="k">de</span> <span class="s">stoppoem</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-13" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-13" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-13"></a>.<span class="k">DE</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-14" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-14" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-14"></a>.<span class="k">ds</span> <span class="s">FAM</span> <span class="se">\\</span><span class="s">*[OLDFAM]</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-15" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-15" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-15"></a><span class="p">.</span><span class="s">.</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-16" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-16" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-16"></a>.<span class="k">LP</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-17" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-17" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-17"></a>This is a sentence.
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-18" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-18" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-18"></a>This sentence talks about <span class="se">\*[startprogram]pandoc\*[stopprogram]</span>.
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-19" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-19" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-19"></a>This is
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-20" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-20" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-20"></a>another sentence.
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-21" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-21" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-21"></a>.<span class="k">startpoem</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-22" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-22" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-22"></a>Some say the world will end in fire,
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-23" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-23" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-23"></a><span class="se">\h</span>'3n'Some say in ice.
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-24" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-24" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-24"></a>From what I<span class="se">\[</span>aq]ve tasted of desire
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-25" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-25" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-25"></a><span class="se">\h</span>'3n'I hold with those who favor fire.
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-26" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-26" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-26"></a>But if it had to perish twice,
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-27" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-27" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-27"></a><span class="se">\h</span>'3n'I think I know enough of hate
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-28" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-28" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-28"></a><span class="se">\h</span>'3n'To say that for destruction ice
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-29" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-29" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-29"></a><span class="se">\h</span>'3n'Is also great,
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-30" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-30" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-30"></a>And would suffice.
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-31" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-31" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-31"></a>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-32" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-32" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-32"></a>And another line,
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-33" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-33" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-33"></a><span class="se">\h</span>'3n'And an indented line.
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-34" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-34" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-34"></a>.<span class="k">stoppoem</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-35" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-35" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-35"></a>.<span class="k">LP</span>
<a id="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-36" name="rest_code_9aca7e0f0ab1490d80af0b671f0559d1-36" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_9aca7e0f0ab1490d80af0b671f0559d1-36"></a>This is a final sentence.
</pre></div>
<p>The command to produce the ms output is:</p>
<div class="code"><pre class="code bash"><a id="rest_code_316a58b86c874e41b75bc562e8387152-1" name="rest_code_316a58b86c874e41b75bc562e8387152-1" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_316a58b86c874e41b75bc562e8387152-1"></a>pandoc<span class="w"> </span>-f<span class="w"> </span>rst<span class="w"> </span>-t<span class="w"> </span>ms<span class="w"> </span>--lua-filter<span class="w"> </span>classify-rst-ms.lua<span class="w"> </span>--wrap<span class="o">=</span>preserve<span class="w"> </span>poem-plus.rst<span class="w"> </span>--output<span class="o">=</span>poem-plus-rst.ms
</pre></div>
<p>and the command to produce a PDF is:</p>
<div class="code"><pre class="code bash"><a id="rest_code_7e7a49c659494c09ae73ebd75383748c-1" name="rest_code_7e7a49c659494c09ae73ebd75383748c-1" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#rest_code_7e7a49c659494c09ae73ebd75383748c-1"></a>pandoc<span class="w"> </span>-f<span class="w"> </span>rst<span class="w"> </span>-t<span class="w"> </span>ms<span class="w"> </span>--lua-filter<span class="w"> </span>classify-rst-ms.lua<span class="w"> </span>--wrap<span class="o">=</span>preserve<span class="w"> </span>poem-plus.rst<span class="w"> </span>--output<span class="o">=</span>poem-plus-rst.ms.pdf
</pre></div>
<p><a class="reference external" href="https://tkurtbond.github.io/poem-plus-rst.ms.pdf">Here</a> is the output PDF.</p>
<p>Being able to rewrite the tree and insert RawBlocks and RawInlines is
really powerful when it comes to customizing output for particular
output formats.</p>
<p>I hope this example is useful for others like me just learning to use
Lua filters.</p>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="lp" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="https://tkurtbond.github.io/posts/2020/05/03/customizing-pandoc-ms-output-with-a-lua-filter/#footnote-reference-1">1</a><span class="fn-bracket">]</span></span>
<p>The <code class="docutils literal">.LP</code> macro in the <code class="docutils literal"><span class="pre">-ms</span></code> macros resets a lot of
things back to the default when it is used, so if you want the custom
<span class="app">groff</span> setting from your user defined macros to continue from the
start to the end you can't allow the use of <code class="docutils literal">.LP</code> between the
<code class="docutils literal">.start<class></code> and <code class="docutils literal">.stop<class></code> macros.</p>
</aside>
</aside>