-
Notifications
You must be signed in to change notification settings - Fork 343
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
svg links work in HTML but not in PDF #12096
Comments
You are using a pretty old version of Quarto. Side note: if not all the options you've set are not required to reproduce, please don't include them. Only include what's required. This avoid users or us to have to remove them to check the issue does not come from them. ---
format: pdf
---
 <!-- NOTE THAT THIS DOES NOT WORK-->
 <!-- This works --> |
Thanks for your answer, so when trying with the stripped down MWE:
I get the same error with Quarto 1.5.57 (included in current RStudio), as well as with in the Terminal with the most recent Quarto 1.6.40:
|
Thanks for the report. I'm not sure I want to fix this, because of reproducibility reasons. An external image in HTML is something we more or less cannot avoid (even though this is what people call "hot linking" and it's sometimes frowned upon by web admins, since you're technically using their servers to host an image for your document). In a .qmd file that is supposed to render to PDFs, though, I believe we can and should avoid it. The presence of such a link means that the document won't necessarily render consistently from one run to another. I think the appropriate solution here is for us to warn about such images in the PDF format, and encourage users to write either a project script that downloads the assets as needed, or to do the same thing in a filter. |
Thanks for the clarifications! These arguments totally make sense to me. I solved my rendering by using a local copy. Feel free to close this issue when appropriate. Note: I assume this affects any image format that is hot linked, not only SVGs. |
To make things a bit more complicated, let me note that I recently learned/realized that Quarto does actually fetch .png and .jpg images during a PDF render. I wish it didn't for the same reasons that I argued above, but the current situation is more fragmented than I thought. |
Bug description
A badge in SVG format works in our book when rendering as HTML, but not when rendering as PDF.
Since version 1.3 quarto automatically transform SVG images for PDF output.
This however, appears to work only with local files and no links.
Steps to reproduce
With the following
*.qmd file
:Actual behavior
Error message:
Package svg Error: File `569245031_svg-tex.pdf' is missing.
Expected behavior
No response
Your environment
No response
Quarto check output
The text was updated successfully, but these errors were encountered: