6 ms·
Author here. Typesetting Markdown is a multi-part series that describes an ecosystem for typesetting Markdown documents using pandoc and ConTeXt. Here's a brie
by thangalin 7y ago
Author here.
Typesetting Markdown is a multi-part series that describes an ecosystem for typesetting Markdown documents using pandoc and ConTeXt. Here's a brief walk-through:
Parts 1, 2, & 3 are about the ecosystem: writing reusable and user-friendly bash scripts that autogenerate PDF files when content in the source documents change. They introduce the reader to ConTeXt, pandoc, and scripting.
Part 4 enhances the ecosystem a bit more before describing one way to apply colours and other presentation in the output document, independently from the Markdown source.
Part 5 demonstrates what I feel is missing from almost all editors, Markdown or otherwise: interpolated variables. I've posted an architecture diagram at https://i.imgur.com/8IMpAkN.png https://i.imgur.com/8IMpAkN.png for the curious. This part describes how to externalize variables (e.g., in YAML) and reference them within Markdown documents.
Part 6 adds R into the mix, including how to generate then embed graphical output into R Markdown documents.
Part 7 uses R to generate a high-level return-on-investment document outlining how long it will take to pay off an electric vehicle versus maintaining a gas guzzler. This part also describes how to have plain TeX (not LaTeX) typeset in the final document.
Part 8 (soon!) revisits themes to demonstrate how different styles can be isolated and applied to novels. It will show ways of setting up directory structures, how to use ConTeXt "modes", and, by the end, will show a way to typeset famous (public domain) novels by applying a couple different styles.
- vehemenz 7y agoThis is very cool. Thanks for posting. How does this set of tools compare to something like Prince XML? I have put together several user manuals with it, and I've personally found it very easy to use.
- sandGorgon 7y agodid you explore alternatives like asciidoc ? just curious if that ecosystem does not solve a lot of these problems.
- thangalin 7y agoAsciiDoc is amazing. Take another look at the architecture diagram. AsciiDoc is listed under the Proposed Text Edit: https://i.imgur.com/8IMpAkN.png https://i.imgur.com/8IMpAkN.png Pandoc can convert between Markdown and AsciiDoc, so it really isn't an either-or decision. For much of the blog you can tell pandoc to use AsciiDoc as the source document instead of Markdown. The conversion to ConTeXt will (should?) generate the same output. One feature of AsciiDoc that's quite appealing is cross-references. The main reason I gravitated towards Markdown was because of its simple and terse syntax.
- sandGorgon 7y agoThanks for your reply. Well I'm asking about retrospective. Today you have to do a whole lot to markdown submit to your toolchain. Would asciidoc not have been better ? Is the syntax of asciidoc that much worse ? It's still human readable
- thangalin 7y ago> Today you have to do a whole lot to markdown submit to your toolchain The brunt of transcoding from Markdown to AsciiDoc can be accomplished in a single line, something like: find . -type f -name '*.md' -exec pandoc -f markdown -t asciidoc {} \; AsciiDoc is a superset of Markdown, so pandoc should be able to do a nearly flawless job at converting: https://asciidoctor.org/docs/asciidoc-vs-markdown/ https://asciidoctor.org/docs/asciidoc-vs-markdown/ At that point it's a matter of updating a few build scripts to pass AsciiDoc files to pandoc instead of Markdown. I wouldn't say starting with AsciiDoc would have been better or worse, just different. Starting with Microsoft Word would have been worse.