You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an item with an optional argument follows a nested list it errors:
\DocumentMetadata{tagging=on}
\documentclass{article}
\begin{document}
\begin{itemize}
\item some text
\begin{itemize}
\item hallo
\end{itemize}
% \par
\item[!] %<---
\begin{itemize}
\item Welt
\end{itemize}
\end{itemize}
\end{document}
errors
! Package tagpdf Error: The number of automatic begin (5) and end (6)
(tagpdf) text-unit para hooks differ!
.....
! Package tagpdf Error: there is no open structure on the stack
Removing the optional argument or inserting a \par avoids the error.
The text was updated successfully, but these errors were encountered:
The \item without optional argument contain a \MakeLinkTarget[\@listctr]{} (or \MakeLinkTarget[]{} is there is no counter). \MakeLinkTarget contains a \smash and that issues a \color@endgroup which contains a \@endpefalse that correctly closes the previous list.
In the \item with optional argument the \MakeLinkTarget is missing and so also the \@endpefalse.
Imho one should add a \MakeLinkTarget also for the item with option argument (useful for pageref links if hyperref is used). This will resolve the problem for now. But additionally we should look if there is a place where an explicit \@endpefalse should be added so that one doesn't rely on some internal code from \MakeLinkTarget.
If an item with an optional argument follows a nested list it errors:
errors
Removing the optional argument or inserting a
\par
avoids the error.The text was updated successfully, but these errors were encountered: