The Story

I wrote a markdown book on Programming and Digital Humanities. I learned how to use Rstudio and Rbookdown on the way, they made it super easy to write the book. So I ended up with an R Markdown file (.Rmd).

GitHub was the first choice to share it. It renders Markdown directly, but not .Rmd — Yuhui has a wonderful post on why .Rmd is not rendered as .md on GitHub. So I changed it to standard Markdown (.md). People can preview the book, something may get lost in translation, but having the stuff out was already cool.

I also thought that if you really really really want the book you can clone it, renamed as .Rmd as R build it.

Still, the book was not so user friendly for people in academia and humanities. Plus, it would be cool to have a tool to make the GitHub book an ebook that compiles on all formats. (I know more people that read ebooks than those that can clone and process .Rmd bookdown.)

Leanpub proves to be such a tool, but before reaching the goal there are more struggles with markdown flavors.

So here I am, transitioning the book into a new Markdown flavor, Markua.

Introducing Markua

Leanpub has its own version of markdown called Markua which works for courses and books you may display on their website. Specs are here in book format and here in their latest version.

When moving content across formats its good to know what features you are using, how they are supported in the current format, and how they are implemented in the target format. Basically, that was my path:

  1. find out what you need to render the book;
  2. find out how that’s done in Markua;
  3. if Markua’s way is different from Rmd, write a script to fix it for you;
  4. and be sure to test the stuff.

(If you are interested in further moving to Markua experience, here’s another take on that.)

#markua #leanpub #markdown #digital-humanities #python

Rstudio Markdown to Markua: A Leanpub Tale of Markdown Flavors
2.35 GEEK