Skip to content
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

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

Open
LBeaulaton opened this issue Jan 21, 2025 · 3 comments
Open

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

LBeaulaton opened this issue Jan 21, 2025 · 3 comments
Labels
bug Something isn't working latex LaTeX engines related libraries and technologies projects

Comments

@LBeaulaton
Copy link

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
@LBeaulaton LBeaulaton added the bug Something isn't working label Jan 21, 2025
@mcanouil
Copy link
Collaborator

mcanouil commented Jan 21, 2025

I believe this to be kind of expected for "single document projects":

@LBeaulaton
Copy link
Author

Changing for a book type fixes indeed the problem.

the new _quarto.yml

project: 
  output-dir: output
  type: book

book:
  chapters:
    - index.qmd

format:
  pdf

Your comment #2171 (comment) do not however completely reflect my case.

@mcanouil
Copy link
Collaborator

mcanouil commented Jan 21, 2025

Since this comment, there was some internal change that made "single document" behaves more like project such as Book/Website.

And LaTeX is not HTML.

The issue here is mostly some side effects of having single documents behave as project (i.e., allowing output-dir) which is not yet handled in every corner of the codebase.

@mcanouil mcanouil added the latex LaTeX engines related libraries and technologies label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working latex LaTeX engines related libraries and technologies projects
Projects
None yet
Development

No branches or pull requests

2 participants