Closed lrnv closed 5 months ago
Looks related to https://github.com/quarto-dev/quarto-cli/issues/722
Why is this coming from a show
method that renders text/html
though I wonder. There is no :pdf
symbol in our code base so at least we're not setting that.
Indeed, very good question. I guess htere has been some kind of issues with that already on the jupyter-julia version, I think that somewhere quarto is asking for the plot to be rendered with weird inputs...
It seems that the support for pdf output in Plots.jl
>= 1.28.1 is intended to be for IJulia only:
https://github.com/JuliaPlots/Plots.jl/compare/v1.28.0...v1.28.1 , bottom of page
Outside of IJulia, allowed values for fmt
are png
and svg
:
https://docs.juliaplots.org/stable/generated/attributes_plot/
With the new QuartoNotebookWorker
, what is the canonical way for a Quarto user to modify the package integrations in src/QuartoNotebookWorker/ext
?
what is the canonical way for a Quarto user to modify the package integrations
It'll depend on which and what is needing modification. For a quarto
user, it's via the frontmatter, and that will modify the behaviours, so no change compared to previous non-QuartoNotebookWorker
.
A temp "solution" so that pdf at least doesn't error would be to use :png
. Though I don't particularly like that since the quality suffers.
Doesn't it actually look like our code was already supposed to catch this bug by choosing png
if "pdf"
was specified? We copied that from somewhere else I think, where this workaround was already in use, maybe the quarto julia jupyter engine. But the error specifies that :pdf
is not known, which is different from "pdf"
, thereby circumventing that path. Maybe we just need to check the value correctly for now.
Right, look here, they interpolated that string variable with a leading :
making it a Symbol, that's the difference
Thans a lot @MichaelHatherly I will come back if i have any other issues :)
Conside the follwoing:
Error showing value of type Plots.Plot{Plots.GRBackend} only png or svg allowed. got: :pdf Stacktrace: [1] error(s::String) @ Base .\error.jl:35 [2] _show(io::IOContext{IOBuffer}, ::MIME{Symbol("text/html")}, plt::Plots.Plot{Plots.GRBackend}) @ Plots [...]\src\output.jl:203 [3] #invokelatest#2 @ .\essentials.jl:887 [inlined] [4] invokelatest @ .\essentials.jl:884 [inlined] [5] show(io::IOContext{IOBuffer}, m::MIME{Symbol("text/html")}, plt::Plots.Plot{Plots.GRBackend}) @ Plots [...]\src\output.jl:232 [6] show(io::IOContext{IOBuffer}, m::String, x::Plots.Plot{Plots.GRBackend}) @ Base.Multimedia .\multimedia.jl:123