Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Markdown to PDF Locally with this flavour #94

Open
hallzy opened this issue May 21, 2016 · 6 comments
Open

Convert Markdown to PDF Locally with this flavour #94

hallzy opened this issue May 21, 2016 · 6 comments

Comments

@hallzy
Copy link

hallzy commented May 21, 2016

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?

@suan
Copy link
Collaborator

suan commented May 21, 2016

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
#94

@hallzy
Copy link
Author

hallzy commented May 21, 2016

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.

@nraw
Copy link

nraw commented Oct 2, 2020

@hallzy never found an alternative?

@hallzy
Copy link
Author

hallzy commented Oct 2, 2020

@nraw No, never did. But honestly, I forgot about this issue until just now so I haven't really been looking around lately

@ashwinvis
Copy link
Collaborator

You could use smdv in place of instant-markdown-d. smdv uses pandoc AFAIK.

@ashwinvis
Copy link
Collaborator

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:

if g:instant_markdown_python
call s:systemasync(env.'smdv --stdin'.argv, a:initialMDLines)
else
call s:systemasync(env.'instant-markdown-d'.argv, a:initialMDLines)
endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants