quarto-dev / quarto-dev/quarto-cli

`pdf-images.lua` doesn't take `resource-path` into account

Open
#9,282 16 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Jun 5, 2024.

bug latex
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

Text in an SVG image appears broken, and the image itself is weirdly cropped

Actual image:

image

Image when rendered in the quarto PDF document:

image

Steps to reproduce
  1. Include the SVG in the markdown document: ![](bubbleup.svg)
  2. Run quarto render
  3. The text in the SVG appears broken

The offending SVG file:

bubbleup

Quarto config:

project:
  render: ["report.qmd"]
  output-dir: .


resource-path: ['.','figures']
bibliography: references.bib  
csl: ieee-with-url.csl

link-citations: true
links-as-notes: true # links as footnotes
number-sections: true

date-format: full

format:
  pdf:
    pdf-engine: pdflatex
    # use quarto's latexmk wrapper to auto install missing packages
    latex-auto-mk : true
    documentclass: scrartcl
    papersize: a4
    geometry: a4paper
    highlight-style: haddock
    header-includes: |
      \usepackage{charter}
    classoption: headings=standardclasses,headings=big
Expected behavior

SVG should be rendered correctly as a figure inside the PDF document

Actual behavior

SVG is rendered broken

Your environment
  • OS: Linux (Fedora Workstation 39)
  • IDE: NVim v0.9.5
  • Quarto v. 1.4.552 (installed from the release tarball)
  • RStudio: 2023.12.1+402 (installed from official fedora repo)
Quarto check output
Quarto 1.4.552
[✓] 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.552
      Path: /opt/quarto-1.4.552/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.04
      Chromium: 869685

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

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

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

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.3.3
      Path: /usr/lib64/R
      LibPaths:
        - /home/mayday/R/x86_64-redhat-linux-gnu-library/4.3
        - /usr/lib64/R/library
        - /usr/share/R/library
      knitr: 1.43
      rmarkdown: 2.24

[✓] Checking Knitr engine render......OK

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.