-
I am using Quarto 1.2.207 and Jupyter Notebook (6.5.2), Python 3.9.6 (default, Aug 5 2022, 15:21:02) I am using the elsevier template, invoked as "quarto use template quarto-journals/elsevier" The kernel is Julia 1.8.2. There is a code cell that creates and displays a VegaLite graphic, as follows: #| label: fig-boxplots u = tidybox |> @vlplot(:boxplot, y=:value, x=:year, column=:index) where tidybox is a dataframe read from a csv file. when I render I get the error below. I have tried nearly everything, including changing pdf-engines, ensuring I have Inkscape in the path, etc. "LaTeX Error: Cannot determine size of graphic in hpf_files/figure-pdf/fig-boxplots-output-1.svg (no BoundingBox). See the LaTeX manual or LaTeX Companion for explanation. l.370 ...les/figure-pdf/fig-boxplots-output-1.svg}" The same thing also occurs if I render the qmd file. Relevant YAML header options are as follows: header-includes:
Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
We should first start by making sure you're using the latest v1.2 prerelease, which is v1.2.269. But I think the issue is ultimately coming the fact that the library you're using (whatever has the I haven't used this library and I will need a fully reproducible example to test any of this on my side, but you could try to have your plotting library emit a high-resolution PNG, which isn't an ideal solution but would probably work. |
Beta Was this translation helpful? Give feedback.
-
I'm actually having an issue including just any SVG in LaTeX output, even with height and width defined. I'm using Quarto 1.2.280 and just barely upgraded TinyTex to v2022.12.12.
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg>
# hello there
 Render, and for me it complains about the bounding box: quarto render test.qmd --to pdf
|
Beta Was this translation helpful? Give feedback.
-
Same problem (LaTex no BoundingBox error) still exists in version 1.3.302 with tinytex v2023.04 in Windows 11. |
Beta Was this translation helpful? Give feedback.
-
Quarto should now handle SVG image in PDF output format, by converting the SVG file to PDF file for inclusion. This is a new feature of Quarto 1.3 and it requires This is documented for now a 1.3 release feature : https://quarto.org/docs/prerelease/1.3/pdf.html#svg-images with some indication on how to install Taking the example from @kjohnsen at #3283 (comment) ---
title: Testing SVG
format: pdf
---
# hello there

with <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg> This should render without error now, the For context, this was done in #2575 |
Beta Was this translation helpful? Give feedback.
Quarto should now handle SVG image in PDF output format, by converting the SVG file to PDF file for inclusion. This is a new feature of Quarto 1.3 and it requires
rsvg-convert
CLI tool.This is documented for now a 1.3 release feature : https://quarto.org/docs/prerelease/1.3/pdf.html#svg-images with some indication on how to install
rsvg-convert
for each OS.Taking the example from @kjohnsen at #3283 (comment)
with
test.svg
beingThis should render without err…