Prevent image alt text from showing up under images as captions #9310
-
DescriptionWhile many markdown implementations (e.g. github, common mark, pandoc) define the link text for images (within |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Yes, use the Pandoc/Quarto Sy tex as described: https://quarto.org/docs/authoring/figures.html#alt-text Note that, the caption is used as alt-text only because there is no alt-text set. |
Beta Was this translation helpful? Give feedback.
-
@joelostblom, note that Pandoc does the same thing when the extension
So when using a tool that will use Pandoc, you need to make sure that Images are not considered figures. Here is an example of different syntax. ---
title: "Test alt"
---
Pandoc's Markdown syntax for Image being a figure with caption

Pandoc's Markdown syntax for Image as inline image (no caption)
\
Quarto explicit syntax for no caption and alt text
{fig-alt="Test"}
Quarto explicit syntax for caption and alt text
{fig-alt="Test"}
|
Beta Was this translation helpful? Give feedback.
-
An additional note about the use of backslash to make the text between square brackets appear as alt-text:
|
Beta Was this translation helpful? Give feedback.
@joelostblom, note that Pandoc does the same thing when the extension
implicit_figures
is active. And this is the case in Quarto.See https://pandoc.org/MANUAL.html#extension-implicit_figures
So when using a tool that will use Pandoc, you need to make sure that Images are not considered figures.
Here is an example of different syntax.