svg links work in HTML but not in PDF

Open
#12,096 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, latex
Domain
build-system, cli

Research direction

Start by rendering the provided .qmd file to PDF with use-rsvg-convert enabled, comparing the remote DOI SVG with the local SVG. Trace the PDF/SVG conversion entry point; done when the remote linked SVG renders successfully without the missing 569245031_svg-tex.pdf error.

Written by the indexing model from the issue text.

Description

enhancement latex needs-discussion
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:

---
title: "title"
subtitle: "subtitle"
author: "me, & them"
nocite: |
  @*
format:
  pdf:
    toc: true
    toc-depth: 2
    number-sections: true
    number-depth: 2
    use-rsvg-convert: true
    output-file: "test"
    output-ext:  "pdf"
    # resource-path: ["book/figures/"]
    # linkcolor: RSSblue
    # urlcolor: RSSblue
    # include-in-header: 
    #    - "_styles.tex"
editor: source
---

![DOI](https://zenodo.org/badge/569245031.svg) <!-- NOTE THAT THIS DOES NOT WORK-->
![DOI](book/figures/zenodo.7740560.svg)        <!-- This works -->

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
Quarto 1.4.555
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.555
      Path: /usr/lib/rstudio/resources/app/bin/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2025.02
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/fabian/.TinyTeX/bin/x86_64-linux
      Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.3
      Path: /usr/bin/python3
      Jupyter: 5.3.2
      Kernels: python3

(|) Checking Jupyter engine render....Traceback (most recent call last):
  File "/usr/lib/rstudio/resources/app/bin/quarto/share/jupyter/jupyter.py", line 21, in <module>
    from notebook import notebook_execute, RestartKernel
  File "/usr/lib/rstudio/resources/app/bin/quarto/share/jupyter/notebook.py", line 18, in <module>
    from nbclient import NotebookClient
ModuleNotFoundError: No module named 'nbclient'
[✓] Checking Jupyter engine render....OK
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.