vim-instant-markdown
vim-instant-markdown copied to clipboard
Convert Markdown to PDF Locally with this flavour
Perhaps someone with more experience can help me with this. Is there an easy way to use this github-like flavour of markdown to convert a markdown file to a pdf locally?
For example, is there a way to tell pandoc to use the flavour used here by referring it to the css file or something?
Dunno if you'd consider this "easy", but how about when you have the markdown preview open in your browser, use your browser's "print to PDF" functionality?
On Fri, May 20, 2016 at 8:04 PM, Steven Hall [email protected] wrote:
Perhaps someone with more experience can help me with this. Is there an easy way to use this github-like flavour of markdown to convert a markdown file to a pdf locally?
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/suan/vim-instant-markdown/issues/94
I would consider it easy normally, but I was planning on doing it for scripting purposes so having a bash command I could use would be best. Plus printing to PDF shows the URL at the top (at least by default), which I would rather not have on the PDF.
I'll think about it a bit to see if I can think of something, but if you or anyone else has any other suggestions that would be appreciated.
For the sake of completeness, if I find a solution for my needs I will come back here to post.
I like the way that the markdown looks when it gets converted here, which is why I wanted this style specifically.
@hallzy never found an alternative?
@nraw No, never did. But honestly, I forgot about this issue until just now so I haven't really been looking around lately
You could use smdv
in place of instant-markdown-d. smdv
uses pandoc
AFAIK.
But... if you need to simply generate a PDF, use pandoc
directly! The vim plugin sends content in the buffer as stdin, an pandoc accepts such stdin as input! Add an option here:
https://github.com/instant-markdown/vim-instant-markdown/blob/fc2ca4b31e4c48990a1c5aadef5f9e7d19c62052/after/ftplugin/markdown/instant-markdown.vim#L120-L124