latex3 / tagpdf

Tagging support code for LaTeX
60 stars 7 forks source link

empty mc/structure gives invalid dict in luamode #25

Closed u-fischer closed 4 years ago

u-fischer commented 4 years ago
\documentclass{book}
\usepackage{tagpdf}
\pagestyle{empty}
\tagpdfsetup{tabsorder=structure,uncompress,activate-all,interwordspace=true}

\begin{document}
\tagstructbegin{tag={Document}}
\tagstructbegin{tag=H1}
\tagmcbegin{tag=P}\tagmcend
\tagstructend
\tagstructbegin{tag=P}
\tagmcbegin{tag=P}abc\tagmcend
\tagstructend
\tagstructend
\end{document}

gives

9 0 obj
<<  /Type /StructElem /S /H1 /P 8 0 R /K  >>
endobj

It is unclear how to resolve it: removing the StructElem would break the tree. And leaving out the /K probably be invalid. Perhaps a dummy kid?

bdoubrov commented 4 years ago

Leaving out /K is OK according to ISO 32000-1. This entry is marked as optional in ISO 32000-1, Table 323.