4

I know from this github issue opened on 16 July 2024 that the tablenotes from threeparttable is incompatible with tagpdf.

I am able to reproduce this error as well with this minimal example below:

\DocumentMetadata{lang=en-UK,
tagging=on,
pdfstandard=UA-2}

\documentclass[12pt]{article}

% --- Packages ---
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{threeparttable}


% -- Package setup -- %
\tagpdfsetup{
  tabsorder = structure,
}

\hypersetup{
  pdftitle={How to make PDF-UA2},
  pdfauthor={Miloop Karja},
  pdfkeywords={accessibility, tagging, PDF-UA2, LuaLaTeX},
}

\begin{document}

\begin{table}
\begin{threeparttable}
\caption{Recruitment in A-team.}
\begin{tabular}{l l}
Name\tnote{1} & Reason\tnote{2} \\
Miara& They can write backwards \\
Teiman & They can jump very high \\
Ruital & Can think on their feet\\
\end{tabular}
\begin{tablenotes}
\item[1] Only first name. \item[2] Deemed by the coach
\end{tablenotes}
\end{threeparttable}
\end{table}

\begin{figure}[h!]
\includegraphics[width=\textwidth]{example-image}
\end{figure}
%%FYI, verPDF still deems this document PDF-UA2 compliant even though I haven't added alt={} to the figure... ?? 

\end{document}

I get the error:

! Package tagpdf Error: The number of automatic begin (5) and end (4)
(tagpdf) text-unit para hooks differ!
For immediate help type H <return>.

Is a fix available, or a tag-friendly alternative approach?

6
  • 1
    Regarding the figure, you get a warning: Package tagpdf Warning: Alternative text for graphic is missing. Using 'example-image.pdf' instead. VeraPDF considers this sufficient. IIRC, PAC considers this suspicious, but still passes the file. Commented Nov 6 at 14:11
  • I think I have somewhere a reimplementation but I can't look now. Commented Nov 6 at 14:48
  • regarding the alt-text: check the log-file, it says Package tagpdf Warning: Alternative text for graphic is missing. Using 'example-image.pdf' instead. Commented Nov 6 at 22:43
  • 2
    I have posted a first fix in the github issue. Commented Nov 7 at 15:35
  • @UlrikeFischer: Thanks for the GitHub solution. It works well and VeraPDF seems to be happy with the document! Thanks. Commented Nov 7 at 16:33

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.