-
Notifications
You must be signed in to change notification settings - Fork 383
Description
Bug description
Given a qmd document with multiple, computed figure captions generated using {glue}
, quarto render
happily renders the document. However, quarto inspect
fails with a YAMLError: unknown tag
Steps to reproduce
---
title: "A Good Title"
date: last-modified
date-format: YYYY-MM-DD HH:mm
format:
html:
self-contained: true
---
This is an example showing how to use {glue} in figure captions.
First, we set up our multiple variables.
```{r}
#| label: use-variables
library(ggplot2)
library(glue)
data(mtcars)
use_vars = c("mpg", "hp", "wt")
plot_list = list(mpg = ggplot(mtcars, aes(x = disp, y = mpg)) + geom_point(),
hp = ggplot(mtcars, aes(x = disp, y = hp)) + geom_point(),
wt = ggplot(mtcars, aes(x = disp, y = wt)) + geom_point())
```
And then multiple figures with different captions.
```{r}
#| label: fig-disp-other
#| fig-cap: !expr glue::glue("This should be {use_vars}")
#| fig-keep: all
purrr::walk(plot_list, \(in_plot){
print(in_plot)
})
```
Expected behavior
I expect if quarto render
works, then quarto inspect
should work as well.
Actual behavior
quarto inspect
generates an error.
Your environment
- Running from the terminal.
- Pop!OS 22.04 (Ubuntu based)
- quarto 1.5.45
Quarto check output
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.45
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /home/rmflight/.TinyTeX/bin/x86_64-linux
Version: 2022
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.12
Path: /usr/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK
Version: 4.3.0
Path: /rmflight_stuff/software/R-4.3.0
LibPaths:
- /home/rmflight/Projects/personal/targets_quarto_yaml/renv/library/R-4.3/x86_64-pc-linux-gnu
- /home/rmflight/.cache/R/renv/sandbox/R-4.3/x86_64-pc-linux-gnu/3f5517f9
knitr: 1.47
rmarkdown: 2.27
[✓] Checking Knitr engine render......OK