Open jfbu opened 7 months ago
Em
can also be used with pdfversion 1.7, there it is role mapped to Span
which isn't allowed directly inside TOCI. So the warning is correct only a bit unclear if you don't know the inner working. (It is a bit of a struggle to get in the relevant info without getting too verbose, and quite probably the messages will continue to change based on feed back and experience). If you increase the log-level things gets a bit clearer:
\DocumentMetadata{pdfversion=1.7,testphase={phase-III},debug={log=v}}
\documentclass{article}
\begin{document}
\tagstructbegin{tag=TOCI}\tagstructbegin{tag=Em}\tagstructend\tagstructend
blub
\end{document}
this then gives:
Package tagpdf Info: Parent-Child 'TOCI' --> 'Span'.
(tagpdf) Relation is -1 (='∅')
(tagpdf) Rolemapped from: 'TOCI' --> 'Em' on line 106
Package tagpdf Warning: Parent-Child 'TOCI/' --> 'Em/pdf2'.
(tagpdf) Relation is not allowed (struct 4, /TOCI --> struct 5)
(tagpdf) on line 106
With pdf 2.0 this would change to:
Package tagpdf Info: Parent-Child 'TOCI' --> 'Em'.
(tagpdf) Relation is -1 (='∅')
(tagpdf) Rolemapped from 'TOCI/pdf' --> 'Em/pdf2' on line 106
Package tagpdf Warning: Parent-Child 'TOCI/pdf' --> 'Em/pdf2'.
(tagpdf) Relation is not allowed (struct 4, /TOCI --> struct 5)
(tagpdf) on line 106
I had not tested the increased verbosity. Would you consider adding an option to treat warnings as errors? I added this manually in my test files, was happy to find quickly how to from l3msg.pdf
:
\ExplSyntaxOn
\msg_redirect_module:nnn { tag } { warning } { error }
\ExplSyntaxOff
It works!
Artificial document (deliberately attempting illegal nesting)
generates on first pdflatex run:
but the pdfversion is 1.7. Does this mean that
Em/pdf2
is used internally (I see also /Em in the pdf if using 2.0 so not saying at all here perhaps mark-up not pdf 1.7 one, clearly that can't be the case), or is this artifact (sic) from warning process?I have not yet assimilated docs.