latex3 / tagpdf

Tagging support code for LaTeX
60 stars 7 forks source link

list sample conflicts with paratagging property in the config #46

Closed bdoubrov closed 2 years ago

bdoubrov commented 2 years ago

Adding paratagging to the tagpdf setup in the ex-patch-list.tex sample results in the invalid structure tree. Namely, we get the following structure for each list item:

L
 LI
  LBL
   LBody
     P 
       P

Having P inside P is clearly invalid.

u-fischer commented 2 years ago

Well yes, the example surrounds every list body with the commands \TAGP and \PGAT which add a P-structure:

\newcommand\TAGP{\tagstructbegin{tag=P}\tagmcbegin{tag=P}}
\newcommand\PGAT{\tagmcend\tagstructend}

This naturally gives together with the automatic P-tagging now two P-structures. Remove the commands from the lists or redefine them to do nothing:

\newcommand\TAGP{}
\newcommand\PGAT{}

The comment at the begin actually tells you that:

% not really up-to-date, with paratagging one could simplify things.

FrankMittelbach commented 2 years ago

but might be a good test file so perhaps should be kept open and added as such a thing when resolved

u-fischer commented 2 years ago

@FrankMittelbach the test file is still in tagpdf.

But I think it is not really clear from the example file that it is older and has been made when paratagging didn't fully worked yet. So I will rename the file to make clear that it is more or less obsolete and add a comment and make an example with paratagging.