Weave.jl
Weave.jl copied to clipboard
Error when weaving slides
I am trying to create some slides using Weave.jl and Remark.jl. When weaving the simple document
# myTitle
## mySubtitle
myAuthor
myDate
---
## Empty Slide
TEST
---
## Hello World
```julia
println("Hello")
```
with
Weave.weave("test.jmd", out_path = "build", doctype = "github")
I get the error
ERROR: LoadError: MethodError: Cannot `convert` an object of type
String to an object of type
Dict
Closest candidates are:
convert(::Type{T}, ::T) where T<:AbstractDict at abstractdict.jl:486
convert(::Type{T}, ::AbstractDict) where T<:AbstractDict at abstractdict.jl:489
convert(::Type{T}, ::T) where T at essentials.jl:171
...
Stacktrace:
[1] Weave.WeaveDoc(::String, ::Array{Any,1}, ::String) at /Users/mkraus/.julia/packages/Weave/zT0iu/src/chunks.jl:24
[2] read_doc(::String, ::Symbol) at /Users/mkraus/.julia/packages/Weave/zT0iu/src/readers.jl:58
[3] weave(::String; doctype::String, informat::Symbol, out_path::String, args::Dict{Any,Any}, mod::Symbol, fig_path::String, fig_ext::Nothing, cache_path::String, cache::Symbol, throw_errors::Bool, template::Nothing, highlight_theme::Nothing, css::Nothing, pandoc_options::Array{String,1}, latex_cmd::String, latex_keep_unicode::Bool) at /Users/mkraus/.julia/packages/Weave/zT0iu/src/Weave.jl:102
[4] top-level scope at <...>/test.jl:4
[5] include(::Module, ::String) at ./Base.jl:377
[6] exec_options(::Base.JLOptions) at ./client.jl:288
[7] _start() at ./client.jl:484
in expression starting at <...>/test.jl:4
When removing any of the three slides, the error disappears.
I am using Julia v1.4.0 and Weave v0.9.4.
Adding an empty julia block
```julia
```
to the beginning of the first slide gets rid of the error, but produces an output file, where
- the second slide is missing
- all slide separators
---
are removed:
# myTitle
## mySubtitle
myAuthor
myDate
## Hello World
````julia
println("Hello")
````
````
Hello
````
````