v0.3.24
Linux-X64: pandoc-crossref v0.3.24 git commit d84f1ed (HEAD) built with Pandoc v3.9, pandoc-types v1.23.1.1 and GHC 9.8.4
Windows-X64: pandoc-crossref v0.3.24 git commit d84f1ed (HEAD) built with Pandoc v3.9, pandoc-types v1.23.1.1 and GHC 9.8.4
macOS-ARM64: pandoc-crossref v0.3.24 git commit d84f1ed (HEAD) built with Pandoc v3.9, pandoc-types v1.23.1.1 and GHC 9.8.4
macOS-X64: pandoc-crossref v0.3.24 git commit d84f1ed (HEAD) built with Pandoc v3.9, pandoc-types v1.23.1.1 and GHC 9.8.4
Changelog
-
Fix for #506
A prior fix/workaround for jgm/pandoc#9720 had
unintentionally clobbered explicitly-specifiedaltattributes on images.Unfortunately, Pandoc does not expose
altattribute explicitly to filters,
instead it's only seen as image caption. So a simple heuristic is used:
if image caption does not match the figure caption, we assume it's an
explicitly-specified alt text and preserve it. Otherwise, clobber it. -
preserveAltTextoption. As stated above, ifaltis missing or matches the
figure caption, it will be clobbered, and figure caption will be generated
by Pandoc witharia-hidden="true". WhenpreserveAltTextis set toTrue,
pandoc-crossref will preserve the alt text (be it explicit or implicit from
caption) verbatim, forcing Pandoc to produce both alt text and figure
caption in the output. The hope is this may prove useful in some workflows,
but you definitely should just specify alt text on all your images if you
care about screen readers at all.