For rendering markdown straight into PDF (and other formats), have a look at pandoc, it&#x27;s really powerful. If you can make your markdown flavour compatible with (or a superset of) pandoc markdown it should be simple. See RMarkdown for inspiration.