quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.89k stars 320 forks source link

quarto render fails when enabling self-contained or embed-resources in yaml #11206

Closed eeenilsson closed 14 minutes ago

eeenilsson commented 3 hours ago

Bug description

Problem: quarto render fails when enabling self-contained or embed-resources in yaml.

Steps to reproduce:

  1. In terminal: > quarto create project book testbook

  2. Add the following to _quarto.yml (any of these options produce same error):

    format:
    html:
    self-contained: true
    embed-resources: true
  3. Add to any qmd file:

```{r } 
#| label: test-plot

plot(1:10, 1:10)
  1. > quarto render

Result in error:

ERROR: 
compilation failed- error
Unable to load picture or PDF file 'intro_files/figure-pdf/test-plot-1.pdf'.

...and warning:

[WARNING] Could not fetch resource ./summary.html

Works when option quarto render --to html is used. Curiously, quarto render --to pdfalso works if run separately.

System info:

quarto --version: 1.5.57 on Arch linux This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex)

Steps to reproduce

No response

Expected behavior

quarto render should produce html and pdf book

Actual behavior

quarto render fails quarto render --to html and quarto render --to pdf works

Your environment

Linux Version: 6.9.2.arch1-1 quarto --version: 1.5.57 on Arch linux This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex) R version 4.4.0

Quarto check output

> quarto check

Quarto 1.5.57 [✓] Checking versions of quarto binary dependencies... Pandoc version 3.2.0: OK Dart Sass version 1.70.0: OK Deno version 1.41.0: OK Typst version 0.11.0: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.5.57 Path: /opt/quarto/bin

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

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

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

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

(/) Checking Jupyter engine render....Traceback (most recent call last): File "/opt/quarto/share/jupyter/jupyter.py", line 21, in from notebook import notebook_execute, RestartKernel File "/opt/quarto/share/jupyter/notebook.py", line 15, in from yaml import safe_load as parse_string ModuleNotFoundError: No module named 'yaml' [✓] Checking Jupyter engine render....OK

mcanouil commented 3 hours ago

self-contained is the outdated name. You should only use embed-resources as documented.

Book project using HTML are multi-page site. As with Website project, embed-resources cannot really work.

What is your use case? Why do you want your book to have all dependencies embedded in the HTML code (thus duplicated leading to bigger files)?

eeenilsson commented 2 hours ago

Thanks for the input! However, embed resources gives the same error.

Den lör 26 okt. 2024 20:08Mickaël Canouil @.***> skrev:

self-contained is the outdated name. You should only use embed-resources as documented.

Book project using HTML are multi-page site. As with Website project, embed-resources cannot really work.

— Reply to this email directly, view it on GitHub https://github.com/quarto-dev/quarto-cli/issues/11206#issuecomment-2439678882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7K5ZAWGRXH42H73VRO7GDZ5PLANAVCNFSM6AAAAABQVAFGAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZGY3TQOBYGI . You are receiving this because you authored the thread.Message ID: @.***>

mcanouil commented 2 hours ago

Yes, as I explained, it's not supposed to be used for multi-pages project such as book/website.

eeenilsson commented 19 minutes ago

Ok, that explains it then! Thanks for the clarification.

Den lör 26 okt. 2024 21:36Mickaël Canouil @.***> skrev:

Yes, as I explained, it's not supposed to be used for multi-pages project such as book/website.

— Reply to this email directly, view it on GitHub https://github.com/quarto-dev/quarto-cli/issues/11206#issuecomment-2439714118, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7K5ZBZNFNOLNHVLRVRLPLZ5PVLZAVCNFSM6AAAAABQVAFGAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZG4YTIMJRHA . You are receiving this because you authored the thread.Message ID: @.***>