latex3 / tagging-project

Issues related to the tagging project
https://latex3.github.io/tagging-project/
LaTeX Project Public License v1.3c
42 stars 15 forks source link

Does not work with TVCG journal template #61

Open domoritz opened 9 months ago

domoritz commented 9 months ago

I am trying to add \DocumentMetadata{testphase={phase-III}} to the template from https://github.com/ieeevgtc/tvcg-journal-latex/releases/tag/2023.08.08. When I compile it with pdflatex-dev template (using latest updates of packages as of today), I get the following error:

...
(/usr/local/texlive/2023/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.cod
e.tex
(/usr/local/texlive/2023/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothan
dlers.code.tex)
(/usr/local/texlive/2023/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.cod
e.tex)
(/usr/local/texlive/2023/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie
s/tikzlibrarytopaths.code.tex)))
(/usr/local/texlive/2023/texmf-dist/tex/generic/pgf/frontendlayer/tikz/librarie
s/tikzlibrarysvg.path.code.tex
(/usr/local/texlive/2023/texmf-dist/tex/generic/pgf/libraries/pgflibrarysvg.pat
h.code.tex
(/usr/local/texlive/2023/texmf-dist/tex/generic/pgf/modules/pgfmoduleparser.cod
e.tex))) (/usr/local/texlive/2023/texmf-dist/tex/latex/silence/silence.sty)
(/usr/local/texlive/2023/texmf-dist/tex/latex/caption/caption.sty
(/usr/local/texlive/2023/texmf-dist/tex/latex/caption/caption3.sty))
(/usr/local/texlive/2023/texmf-dist/tex/latex/caption/subcaption.sty)
(/usr/local/texlive/2023/texmf-dist/tex/latex/psnfss/t1ptm.fd) (./template.aux)
! Undefined control sequence.
<argument> \ERROR
                  \cs_set_eq:NN \__fnote_tmp:w \exp_stop_f:
l.120 \begin{document}

? ^C^D
! Emergency stop.
<argument> \ERROR
                  \cs_set_eq:NN \__fnote_tmp:w \exp_stop_f:
l.120 \begin{document}

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on template.log.

It looks like the code comes from the latex-lab-footnotes package but I am not familiar enough with latex internals to know what causes the issue.

u-fischer commented 9 months ago

Sorry but the class is currently not compatible with the tagging code. It loads packages that aren't supported yet like enumitem, caption and cleveref (that is the cause of the error). It also redefines \maketitle.

u-fischer commented 9 months ago

Actually you can get around the cleveref problem, by using the firstaid module, it contains a patch:

\DocumentMetadata{testphase={phase-III,firstaid}}

The template then still breaks on the maketitle (in part because of an error in the tagging code, but also because it has lots of elements). And you should remove the tabu package. That will quite probably never work.

domoritz commented 9 months ago

Oh sweet. Thanks for looking into this and helping me to get it working. the document mostly works if I comment out the tabu include and table code. I noticed that including the caption in the teaser breaks. Is this a know issue that you talk about?

The document works with this

\teaser{
  \centering
  \includegraphics[width=\linewidth]{CypressView}
%   \caption{%
%       In the Clouds: Vancouver from Cypress Mountain.
%       Note that the teaser may not be wider than the abstract block.%
%   }
  \label{fig:teaser}
}

When I comment out the caption, I get this error

...
(/usr/local/texlive/2023/texmf-dist/tex/latex/psnfss/ot1ptm.fd)

Package tagpdf Warning: Alternative text for graphic is missing.
(tagpdf)                Using 'figs/CypressView.jpg' instead

! Missing number, treated as zero.
<to be read again>
                   \__int_eval_end:
l.131 \maketitle

?
u-fischer commented 9 months ago

I noticed that including the caption in the teaser breaks. Is this a know issue that you talk about?

Yes the float code didn't expect a \caption outside a float. I fixed that, so with the next LaTeX it will not error (but it is not quite clear if it will always give a good structure).

the document mostly works

But be aware that no errors doesn't mean that ever structure is right ;-). Also the layout can change as the tagging overwrites settings.

domoritz commented 9 months ago

Absolutely. We will wait for the official release before asking people at the conference to use tagging. I tried the generated PDF with VoiceOver and the reading order is all over the place but having some tags is already such a leap forward.

I'm super excited about the progress you made! I have been pushing our main conference towards more accessible documents and many authors have spent a lot of time with Acrobat to tag their documents but it's such a cumbersome process that not everyone will do it (right). Having tagging built in will be a game changer.

Feel free to close this issue as you addressed the compile errors (except tabu) unless you think there are actionable steps left.

FrankMittelbach commented 9 months ago

I tried the generated PDF with VoiceOver and the reading order is all over the place

Normally that shouldn't be the case, but perhaps it is due to too many parts are not tagged correctly yet with this class.

Or you have generated PDF 2.0 and VoiceOver can't yet deal with that ...

FrankMittelbach commented 9 months ago

The project will be unable to adjust all special purpose class files out there as part of the project, but the intention is to offer the right kind of tools so that such class files can be augmented (relatively easily) to support tagging. That said, we intend to work with class maintainers to jointly figure out how such interfaces need to look like and as part of this process classes whose maintainer show interest will certainly be fixed early on. So your TVCG journal template might easily fit into this if you are interested. As you said, it is next to imposible to do postprocessing to get good accessible documents, especially as any change afterwards has to go through all the remediation steps, so even if people understand the need for this their frustration level has to be extremely high.

On the other hand, in many cases it is not that much magic that is needed (even though we are still far from a final polished product). For example, for the paper that I'm giving at the DEIMS conference in a few days only a few adjustments to the conference class were needed to get a tagged version (and some of them where not even related to tagging but just bugs in the class that got highlighted we we tried to apply tagging).

So if you are interested to keep testing and working on updating a version of the template several times until it work reasonably well out of the box, then by all means I would keep it open and we go on from there.

ps as to tabu: throw it out. It had nice ideas but its not maintained since 2007 or so and is broken in many places (and not correctly working with current LaTeX). We took a look if we could take over maintenance, but it proved to be too much of a nightmare to attempt that in earnest.

u-fischer commented 9 months ago

Absolutely. We will wait for the official release before asking people at the conference to use tagging.

As Frank wrote: The class will need adjustments too. E.g. it is up-to impossible to handle a complex \maketitle definition from the outside. And you should consider to make your class compatible with lualatex. It is less fragile and handles space chars better.

domoritz commented 9 months ago

Thank you. I have written a bunch of papers in latex but have very little understanding of the internals to maintain the class myself but I can try to learn. I am definitely interested in updating the TVCG template to better support tags! @mattbrehmer and @codydunne (as the current maintainers of the template) would you be supportive of improving the template for better tagging?

mattbrehmer commented 9 months ago

Yes, I'm supportive of this @domoritz. In the meantime, I'll also circle back with a lead on a different postprocessing process that doesn't involve Acrobat contributed by VGTC ExCom member Ed Swan, which still requires more documentation before sharing. Stay tuned.