[Infrastructure] Experiment: Recompile using entirely Pandoc

Jos Purvis (jopurvis) jopurvis at cisco.com
Sun Apr 7 11:32:01 MST 2019


It’s astonishing what you can get done when you’re avoiding other work. ☺ For fun[0], I decided to see how much would need to change in the BRs to get Pandoc to produce a PDF from them, since it can happily take the same source document and also produce DOCX, HTML, and even ODT. Turns out, it wasn’t much:
I removed the funky Kramdown table header lines from the list of ballots and the list of effective dates at the top of the document.
I removed some zero-length Unicode space characters that had crept into one of the 7.2.2.X.X.X sections.
That’s it. Really.

 

>From there, I added a metadata file (“BR.yaml”) that contains some document variables like the title and copyright info, and a template LaTeX document with a nice-looking title page, since that’s what Pandoc uses in the background to produce a PDF. Then I converted the old title block for the document to a ‘Verso’ page so there’s still a title at the top of the Markdown file. The result is attached: I think it looks pretty close to what we were looking for, including an automatically-generated table of contents and a nice title page, and we can use the same toolset to generate all of the output artifacts. From there, next steps would be to generate a similarly nice-looking Word doc (Pandoc will take an existing DOCX as a template and use its formatting styles) and CSS for the other two formats.

 

Note that we don’t need to go this route, but it’s cool to note that a little tinkering with the Markdown generated something that will produce all three outputs pretty easily. If you’re curious, I forked the repo and the changes and artifact output are here:

            https://github.com/castillar/documents

 

            --Jos

 

[0] For interesting values of “fun” that include “avoiding house-cleaning”.

 

 

-- 
Jos Purvis (jopurvis at cisco.com)
.:|:.:|:. cisco systems  | Cryptographic Services
PGP: 0xFD802FEE07D19105  | +1 919.991.9114 (desk)

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cabforum.org/pipermail/infrastructure/attachments/20190407/46d3c0c4/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BR.pdf
Type: application/pdf
Size: 252169 bytes
Desc: not available
URL: <http://cabforum.org/pipermail/infrastructure/attachments/20190407/46d3c0c4/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BR.docx
Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Size: 73813 bytes
Desc: not available
URL: <http://cabforum.org/pipermail/infrastructure/attachments/20190407/46d3c0c4/attachment-0001.docx>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cabforum.org/pipermail/infrastructure/attachments/20190407/46d3c0c4/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2095 bytes
Desc: not available
URL: <http://cabforum.org/pipermail/infrastructure/attachments/20190407/46d3c0c4/attachment-0001.p7s>


More information about the Infrastructure mailing list