Tools for converting markdown to other formats with templating support
jgm at berkeley.edu
Sat Dec 22 15:09:24 EST 2012
+++ James Laver [Dec 22 12 18:06 ]:
> Hi all,
> I'm new to the list but I've been using markdown for a while and I wonder if it might make the things I've been doing recently easier if I could find a tool that does what I need.
> Essentially, I've been writing a lot of technical proposals of late (mostly using google docs), but I'd like to switch to writing them in Markdown (which handily means I can track revisions and collaborate with git). However, the finished output needs to be in both pdf and html and I'd like to apply templates to both. Additionally I have a requirement for a cover page for the PDF Copy. I'd also like to be able to paginate the HTML at the same boundaries as the PDF copy is paginated.
> Now I've seen a number of markdown libraries that can generate TeX and HTML but I don't seem to be able to apply a TeX template to them (and indeed my knowledge of TeX stops at writing a CV for which I haven't written a document template).
> So, my requirements are:
> - Generate a PDF copy
> - With company cover page
> - With company header, footer and ideally something in a margin like a logo
> - Generate a HTML copy
> - With company branding applied via CSS
> - Ideally paginated at the breaks of where the PDF would be paginated.
Pandoc should be able to do all of this, except for synchronizing
the page breaks. Pandoc supports templates for all formats:
Since PDF output is via LaTeX, you'll need to customize the LaTeX
template for PDF. The pandoc-discuss group is a good place to
ask questions about this if you get stuck. Pandoc supports a
title block with title, author, and date; if you need other metadata
you can populate template variables with a command-line flag.
More information about the Markdown-Discuss