I’m looking into producing my Scala/FP book as a PDF, and as part of that I have been looking into Pandoc. With the exception of converting HTML tables into other formats such as Markdown or LaTeX, Pandoc has been working well so far.
Here are a couple of Pandoc commands to show you how easy this is:
# create a pdf from a markdown doc
pandoc test1.md -s -o test1.pdf
# create an html doc from a markdown doc, long form
pandoc test1.md -f markdown -t html -s -o test1.html
# convert markdown to latex
pandoc test1.md -s -o test1.tex
pandoc test1.md -f markdown -t latex -s -o test1.tex
# read a markdown doc and print html to stdout
pandoc -s table.md --to html
As a “note to self,” this command helps with the Pandoc HTML to Markdown table conversion problem:
pandoc table.html --to=markdown_github -o table.md
I think the problem is that I’m used to a specific type of table markdown, and Pandoc emits something else by default.
For more information on Pandoc, see their getting started doc and user’s manual.