Skip to content

PDF export of Markdown documents (sharing)

Abel Vertesy edited this page Oct 17, 2017 · 1 revision

In general, you can use your favorite markdown editor to export a .pdf file.

Nevertheless, export on Mac OS X suffers from low quality png conversions of embedded (linked) PDF images upon export of a markdown document. The importance of vector graphics is to be discussed elsewhere, but png is often not an option in science.

Workaround

I believe it is problem with OS X's pdf printer (tried in MOU, same results). A current workaround is using pandoc conversion pandoc X.md -o X.pdf.

Limitations

  • Pandoc uses a different CSS by default, that yields a classic LateX document feel over the github flavoured markdown look.
  • Code-block style disappears (incl syntax highlight).
  • Table of contents generated by Typora is lost. You can add --toc to pandoc, but it puts it before anything else, yielding a document that does not start with its title.