Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the LaTeX Tagging Project #13134

Open
skuskusku opened this issue Nov 14, 2024 · 3 comments
Open

Support for the LaTeX Tagging Project #13134

skuskusku opened this issue Nov 14, 2024 · 3 comments
Labels
builder:latex type:proposal a feature suggestion

Comments

@skuskusku
Copy link

skuskusku commented Nov 14, 2024

Hello everyone,

I would like to know if there are any plans to support the LaTeX tagging project. Using tagging, it will be one day possible to create fully tagged pdf files from LaTeX code, in order to create accessible documents (see also https://latex3.github.io/tagging-project/).

In my project I can already use this in part, but with a kludge:

In my make.bat file I prepend the tex file created from Sphinx's make with something like this:

\DocumentMetadata{
  lang        = en,
  pdfversion  = 2.0,
  pdfstandard = ua-2,
  pdfstandard = a-4f, %or a-4
  testphase   = 
    {
    title,
    table,
    firstaid
    }  
}

and after that modification I build this tex file. The result is then a pdf file that passes validation for the PDF/A-4F validation profile in verapdf. It would be nice to see latex_ configuration values for conf.py that can be used to prepend this to the tex file automatically. Are there already conf.py entries for that?

@skuskusku skuskusku added the type:proposal a feature suggestion label Nov 14, 2024
@skuskusku
Copy link
Author

the "testphase" value is AFAIK going to vanish one day, but even without this value, setting the pdfstandard and version values would be nice. Or is there another way in Sphinx to control that?

@jfbu
Copy link
Contributor

jfbu commented Nov 15, 2024

Are there already conf.py entries for that?

Not yet. It could be added as a new config value for the latex template. What to put in there looks like a moving target. It is not clear yet if this ongoing project which currently is deeply modifying upstream LaTeX will reach a stage where existing documents with old add-on packages which fixed or enriched LaTeX will be compatible. It is interesting that you observed validated compliance with your setup. Thanks

@jfbu
Copy link
Contributor

jfbu commented Dec 28, 2024

I recommend this blog post for information by one of the core LaTeX maintainer up-to-date as of September 2024, where one finds this status page providing the current status of various LaTeX packages. Full support by Sphinx will need important updates to the footnote related code, which currently works around deficiencies of LaTeX+hyperref, and, surely more daunting yet, in the area of tables. Sphinx supports tables with merged cells both horizontally and vertically for which there is no available support in the LaTeX world, and it is to be expected the current tagging related evolutions of the LaTeX kernel are incompatible. Tagging related to list structures and document sectioning should be much less problematic, perhaps this will need almost no changes here.

A related fact worth noting is that as explained in this other blog poat the LaTeX team now promotes LuaTeX as being the sole fully supported engine. PDFTeX will be supported but may be less efficient in implementing tagging, XeTeX is deprecated and its users are urged to move to LuaTeX. As per the Japanese engine upTeX it will depend whether its maintenance follows up on the core LaTeX development. The LaTeX team themselves do not test the Japanese engines.

If tagging is limited to refer to the addition of some metadata information in the produced PDF, it is to be hoped that it is only a matter for us to set-up correctly the hyperref usage, the latter being maintained by LaTeX team itself and kept in sync with LaTeX core development.

I am unable as of today to predict if Sphinx will be able in future to support \DocumentMetaData will all the tagging code activated. Sphinx uses mostly very old and light weight packages, some of those old packages are not yet declared compatible, or made compatible, with LaTeX core additions to support automatic tagging. The LaTeX maintainers intend to make tagging a default, from which you have to explicitly opt out if your document is not compatible. But what is the horizon for this: 2 years, 5 years, 10 years, never ? I have no clear idea (although I suspect either 5 years or never). Things would have been easier if LaTeX maintainers had decided to switch LaTeX2e into maintenance mode rather than transforming its internals entirely with a goal of achieving something requiring a re-write of large parts of the ecosystem.
See this blog post about LaTeX3.

We all hope for Sphinx produced PDFs to provide automatically accessibility to the widest audience. Will this prove possible without tremendous effort on our part? Impossible to tell. The LaTeX team receives Adobe support, we don't.

Already we can observe a 40% slowing down when we build a document using 2024 LaTeX compared to building it using 2019 LaTeX (see here), with no tagging activated whatsoever. As computer chips become more powerful each year, perhaps we should not worry too much (?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder:latex type:proposal a feature suggestion
Projects
None yet
Development

No branches or pull requests

3 participants