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

deeply nested markdown #7

Open
gmdjango opened this issue Nov 27, 2019 · 1 comment
Open

deeply nested markdown #7

gmdjango opened this issue Nov 27, 2019 · 1 comment

Comments

@gmdjango
Copy link

Hi,

While it is not an issue of vim-pandoc-markdown-preview, since there is a possible solution, it would be great to solve it.

Problem: markdown which is deeply nested (say 5+ levels), is not parsed by pandoc to pdf

However, pandoc converts the same deply nested markdown to html just fine.

I was wondering, can you somehow make this work off an html file?

example of my mapping:
nnoremap <Leader>pd :w!<CR>:w!/home/myuser/tmp/vim-markdown.md<CR>:!pandoc -s -f markdown -t html -o /home/myuser/tmp/vim-markdown.html /home/myuser/tmp/vim-markdown.md<CR>:!dillo /home/myuser/tmp/vim-markdown.html > /dev/null 2> /dev/null&<CR><CR>

as you can see, i am using a temporary file, and a browser called dillo which has a very small footprint. But, it's not a real time rendering..

Let me know what you think.

@jasonccox
Copy link

Pandoc's --pdf-engine option makes it possible to compile Markdown to PDF using HTML as the intermediate step. You could set g:md_args to something like --pdf-engine=wkhtmltopdf to have this plugin do that. If Pandoc can convert your nested Markdown to HTML fine, then I would guess that would work to convert it to PDF as well.

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

No branches or pull requests

2 participants