I’m trying to test out Weave.jl and it works fine when converting to .html, but I can’t get it to convert to .pdf. My project directory looks like this:
WeaveTest/
-src/
--main.jl
--test.jmd
In main.jl
, I am calling weave(raw"C:\Users\mthel\Julia\WeaveTest\src\test.jmd", doctype="md2pdf")
and it produces this error:
ERROR: IOError: could not spawn `xelatex -shell-escape -halt-on-error test.tex`: no such file or directory (ENOENT)
Stacktrace:
[1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Union{RawFD, Base.Libc.WindowsRawSocket, IO}})
@ Base .\process.jl:128
[2] #724
@ .\process.jl:139 [inlined]
[3] setup_stdios(f::Base.var"#724#725"{Cmd}, stdios::Vector{Union{RawFD, Base.Libc.WindowsRawSocket, IO}})
@ Base .\process.jl:223
[4] _spawn
@ .\process.jl:138 [inlined]
[5] run(::Cmd; wait::Bool)
@ Base .\process.jl:479
[6] run
@ .\process.jl:477 [inlined]
[7] write_doc(docformat::Weave.LaTeX2PDF, doc::Weave.WeaveDoc, rendered::String, out_path::String)
@ Weave C:\Users\mthel\.julia\packages\Weave\f7Ly3\src\writer\latex.jl:10
[8] write_doc(doc::Weave.WeaveDoc, rendered::String, out_path::String)
@ Weave C:\Users\mthel\.julia\packages\Weave\f7Ly3\src\writer\writer.jl:2
[9] weave(source::String; doctype::String, informat::Nothing, out_path::Symbol, args::Dict{Any, Any}, mod::Nothing, fig_path::Nothing, fig_ext::Nothing, cache_path::String, cache::Symbol, template::Nothing, css::Nothing, highlight_theme::Nothing, pandoc_options::Vector{String}, latex_cmd::Vector{String}, keep_unicode::Bool)
@ Weave C:\Users\mthel\.julia\packages\Weave\f7Ly3\src\Weave.jl:226
[10] top-level scope
@ c:\Users\mthel\Julia\WeaveTest\src\main.jl:3
After calling weave
, I get a test.tex
file and if I open a console and manually input the command: xelatex -shell-escape -halt-on-error test.tex
, it produces the .pdf as expected.