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

Support for pandoc versions <2.0 on Julia 1.0? #146

Open
tlnagy opened this issue Sep 20, 2018 · 1 comment
Open

Support for pandoc versions <2.0 on Julia 1.0? #146

tlnagy opened this issue Sep 20, 2018 · 1 comment

Comments

@tlnagy
Copy link
Collaborator

tlnagy commented Sep 20, 2018

The latest version of pandoc on Ubuntu 18.04 LTS is pandoc 1.19.2.4 and PDF generation fails on Julia 1.0 with Weave 0.6.2 because pandoc 1.19 still has --latex-engine as the option instead of --pdf-engine. Any chance that this can be supported as a backup?

julia> using Weave

julia> weave("analysis.jmd", doctype="pandoc2pdf")
[ Info: Weaving chunk 1 from line 5
[ Info: Done executing code. Running xelatex
pandoc: unrecognized option `--pdf-engine=xelatex'
Try pandoc --help for more information.
┌ Warning: Error converting document to pdf
└ @ Weave ~/.julia/packages/Weave/1O5IK/src/pandoc.jl:102
ERROR: IOError: write: broken pipe (EPIPE)
Stacktrace:
 [1] macro expansion at ./logging.jl:318 [inlined]
 [2] pandoc2pdf(::String, ::Weave.WeaveDoc, ::String, ::Array{String,1}) at /home/tamas/.julia/packages/Weave/1O5IK/src/pandoc.jl:89

Interestingly, this code runs on Julia 0.6.x with Weave 0.5.2

julia> weave("analysis.jmd", doctype="pandoc2pdf")
INFO: Weaving chunk 1 from line 5
INFO: Done executing code. Running xelatex
INFO: Report weaved to analysis.pdf
@tlnagy
Copy link
Collaborator Author

tlnagy commented Sep 20, 2018

It looks like this was changed in 4cd0b92. I think a workable solution would be to attempt to use --pdf-engine first and if that fails use --latex-engine as an option. There are lots of systems that are still using pandoc <2.0 out there so it would be shame to drop support for all of them due to a small flag change.

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

1 participant