quarto-dev / quarto-dev/quarto-cli

Image file note remove when rendering pdf with output-dir option

Open
#11,922 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug description

If you have some image file in your quarto and you want render a pdf using output-dir option, the image file are copied in the specified output directory and won't be removed after the rendering process.

Steps to reproduce

the _quarto.yml file

project: 
  output-dir: output

the index.qmd file

---
format:
  pdf
---

![my img](my_img.png)

put any image file in my_img.png

Expected behavior

only index.pdf is produced in the output directory

Actual behavior

index.pdf is produced in the output directory but my_img.png is also find in the output directory

Your environment

Ubuntu 24.04
Quarto 16.04
VSCodium 1.92.2

Quarto check output
quarto check
Quarto 1.6.40
[✓] Checking environment information...
      Quarto cache location: /home/lbeaulaton/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.6.40
      Path: /opt/quarto/bin

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

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/bin
      Version: 2023

[✓] 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 "/opt/quarto/share/jupyter/jupyter.py", line 21, in <module>
    from notebook import notebook_execute, RestartKernel
  File "/opt/quarto/share/jupyter/notebook.py", line 20, in <module>
    from nbclient import NotebookClient
ModuleNotFoundError: No module named 'nbclient'
[✓] Checking Jupyter 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.

Research direction

Reproduce the issue with the shown _quarto.yml and index.qmd files, using a local image and the output-dir option. Start by tracing how PDF rendering handles copied assets in the output directory. Done means rendering produces index.pdf in output without leaving my_img.png there.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.