Reputation: 18012
Been using Markdown using Mou on the Mac alot recently, and would really like to use it in my technical writing - it is much easier than messing around with .doc formats.
The question is what is the best way to convert to a .doc format or a .pdf, i will need elements like repeating headers / footers, but other than that i just need the HTML / CSS to break sensibly accross pages.
Actually i guess what i am asking - is how do i print my styled Markdown output in a sensible fashion to .doc / .pdf in A4 or standard paper sizing.
Upvotes: 7
Views: 8290
Reputation: 2953
You could also try Marked by Brett Terpstra. It handles custom CSS and outputs to a variety of formats, including PDF, with page breaks. It's not free, but it is great and worth the - very reasonable - price.
Upvotes: 0
Reputation: 403
My solution (for windows) was to install wkhtmltopdf, which works through cmd, and then call it in r using the r base command shell
.
You can call it in r by the following line:
shell('"c:\\...\\wkhtmltopdf\\bin\\wkhtmltopdf.exe" c:\\...inputdestination...\\htmlFile.html c:\\...outputdestination...\\nameForPdf.pdf')
The htmlFile.html and the (htmlFile_files) folder containing .css file need to be in the same folder.
Upvotes: 0
Reputation: 20640
You could consider using Pandoc, AsciiDoc or reStructuredText. They're similar to Markdown – simple plain text formats – but have plenty of support for publishing to a variety of formats.
Upvotes: 2
Reputation: 1912
I'm trying this for technical docs as well. The best tool I found to generate PDFs is gimli. In our environment:
Works a treat so far.
Upvotes: 2