In the newest version of pandoc (2.0), option --latex-engine changed to --pdf-engine (as well as --latex-engine-opt to --pdf-engine-opt, so there is no possibility to generate pdf from markdown now (pandoc returns error).
I see. I will fix it this weekend. Thanks!
On Oct 30, 2017 6:24 AM, "Darek Bobak" notifications@github.com wrote:
In the newest version of pandoc (2.0), option --latex-engine changed to
--pdf-engine (as well as --latex-engine-opt to --pdf-engine-opt, so there
is no possibility to generate pdf from markdown now (pandoc returns error).—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/shd101wyy/markdown-preview-enhanced/issues/665, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AB0gf9T1y-rahHHiyua0SthrPPQKqfoUks5sxbH9gaJpZM4QLCEd
.
Before I fix this issue, you can use custom document instead.
Thank you!
I've forgotten about custom document option, so in the meantime, I've manually modified pandoc-convert.js :)
BTW, is it possible to specify in the custom document format to generate file of the same name, as source? Something like:
output:
custom_document:
path: /Exports/%filename%.pdf
@dbobak --latex-engine is now changed to --pdf-engine.
Great, thanks! Works with no problem.
I was unable to render any PDFs from the Right Click --> Pandoc feature due to this change while having pandoc 1.19.2.1 installed. Installing pandoc 2.0.1.1 fixes the below error. Thanks for this thread.
Error: Command failed: /usr/local/bin/pandoc -f markdown -o file.pdf --toc --toc-depth=6 --highlight-style=tango --pdf-engine=pdflatex pandoc: unrecognized option `--pdf-engine=pdflatex' Try pandoc --help for more information.
Just a question here: I updated to pandoc 2, but I also got the same error. After changing from --pdf-engine (the method described in the docs) back to --latex-engine, the error disappeared and it worked as usual. Is this still to be updated or did I do something wrong?
I am also running pandoc v1.19 and cannot seem to get this to work. This appears to be the latest version available through the conda installer. I'm trying to create the custom doc, but when I add in a new pandoc_arg to use --latex-engine=pdflatex, it's still tacking on the --pdf-engine=pdflatex at the end and screwing everything up.
Here's the error:
Error: Command failed: C:\Users\sharkweek\AppData\Local\Continuum\anaconda3\Scripts\pandoc.exe -f markdown+tex_math_single_backslash -o C:\Users\sharkweek\Desktop\test.pdf --latex-engine=pdflatex --pdf-engine=pdflatex pandoc.exe: unrecognized option `--pdf-engine=pdflatex' Try pandoc.exe --help for more information.
And here's the header I'm using:
title: "Test Doc"
output:
custom_document:
path: C:/Users/sharkweek/Desktop/test.pdf
pandoc_args: ["--latex-engine=pdflatex"]
---
What am I doing wrong?
@sharkweek MPE now only supports pandoc v2.0+ now. Please upgrade your pandoc.
Most helpful comment
I was unable to render any PDFs from the Right Click --> Pandoc feature due to this change while having pandoc 1.19.2.1 installed. Installing pandoc 2.0.1.1 fixes the below error. Thanks for this thread.