I have searched through various threads orbiting questions of accessibility in Latex. I am not interested in the full glory of a fully structured/tagged document, the only thing that I need to do is to augment figures (and maybe later tables/equations) with alternate texts such that they can be read and modified by Adobe or other PDF viewers.
My understanding is that the accessibility
package could in principle do this, however it suffers from issues, like not supporting the fancyhdr
which is a requirement for me. In a minimum example I set up (see below), that package creates text, but no alternate texts.
I have tried both accsupp
and tagpdf
, I also tried pdfcomment
- none of them yield a PDF with the alternate texts readable with Adobe. The furthest I got with accsupp
, as the reader seems to detect there is some alternate text provided, it just does not show it.
Are there any other solutions I have not looked at? Is there any post-processing hack or something like that? I am a little surprised, because even Word exports PDFs with alternate texts showing up. Adding the alternate texts manually in Acrobat is not an option, as the documents will be changed/compiled frequently.
UPDATE:
Here is an uncompressed PDF with a tag that Acrobat recognizes. The title of the image is "This is the title" and the description (alt text) reads "This is the description":
\documentclass [a4paper,parskip,11pt]{scrreprt}
\usepackage[tagged]{accessibility}
\usepackage{graphicx}
\usepackage{xcolor}
\begin{document}
\newcommand{\gray}[1]{{\color{gray}#1}}
\begin{figure}
\centering
\includegraphics[width=0.6\textwidth]{grafik}
\alt{hello}
\caption{caption}
\label{fig:1}
\end{figure}
\end{document}
Some threads I checked: Need alt text for images in pdf for screen readers
\pdftooltip{}
from the PDFcomment package? There's an approach described here. It used to work, but I have not tried it for a while.