-
Notifications
You must be signed in to change notification settings - Fork 426
fig-alt not propagated to .tex file with PDF/UA-2 compliance #14315
Copy link
Copy link
Open
Labels
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
When rendering to .pdf with pdf-standard: ua-2, the alt-text is not included in the .tex file, whereas when rendering to .html, it is included.
Steps to reproduce
---
title: "accessibility test"
format:
pdf:
keep-tex: true
pdf-standard: ua-2
lang: en
html:
embed-resources: true
html-math-method:
method: mathjax
url: "https://cdn.jsdelivr.net/npm/mathjax@4.1/tex-mml-chtml.js"
---
A plot of $X$ vs. $X^2$:
```{r}
#| fig-alt: "scatterplot of X vs. X^2"
#| echo: false
#| warning: false
library(ggplot2)
X <- rnorm(5)
ggplot(NULL, aes(x=X, y=X^2)) + geom_point()
```Actual behavior
The relevant line in the .tex file:
\pandocbounded{\includegraphics[keepaspectratio]{test_files/figure-pdf/unnamed-chunk-1-1.pdf}}
The relevant lines in the .html file (image id edited):
<figure class="figure">
<p><img role="img" aria-label="scatterplot of X vs. X^2" src="data:image/png;base64,..." class="img-fluid figure-img" alt="scatterplot of X vs. X^2" width="672"></p>
</figure>
Expected behavior
The .tex should read:
\pandocbounded{\includegraphics[alt={scatterplot of X vs. X^2}, keepaspectratio]{test_files/figure-pdf/unnamed-chunk-1-1.pdf}}
Your environment
IDE: RStudio 2026.01.1+403
OS: Windows 11 Pro 24H2
Quarto check output
C:\Users>quarto check
Quarto 1.9.36
[>] Checking environment information...
Quarto cache location: C:\Users\***\***\Local\quarto
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.9.36
Path: C:\Program Files\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: v2026.03.02
Chromium: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[>] Checking LaTeX....................OK
Using: TinyTex
Path: C:\Users\***\AppData\Roaming\TinyTeX\bin\windows\
Version: 2026
[>] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: C:\Program Files\Google\Chrome\Application\chrome.exe
Source: Windows Registry
[>] Checking basic markdown render....OK
[>] Checking R installation...........OK
Version: 4.4.3
Path: C:/PROGRA~1/R/R-44~1.3
LibPaths:
- C:/R/Library
- C:/Program Files/R/R-4.4.3/library
knitr: 1.51
rmarkdown: 2.27
[>] Checking Knitr engine render......OK
[>] Checking Python 3 installation....OK
Version: 3.10.6
Path: C:/Users/***/AppData/Local/Programs/Python/Python310/python.exe
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with py -m pip install jupyter
[>] Checking Julia installation...
Reactions are currently unavailable