
On 7/10/2025 9:08 AM, Max Chernoff via ntg-context wrote:
Hi Pablo,
(resending since my attachments were too large for the mailing list the first time)
I did some experiments yesterday, and I was able to produce a file (PDF and source attached) that validates as PDF/UA-2 with veraPDF and that Ulrike Fischer and David Carlisle (who work on the LaTeX accessibility) confirmed was actually accessible.
I started from the "lpdf-tag-imp-testing.lmt" file that you posted on the mailing list a while back (I've attached my modified version), and I also had to modify "lpdf-tag.lmt" (also attached). To get the WTPDF tags, I also had to uncomment the "conformance" lines in both lpdf-fmt-imp-ua2.lmt and lpdf-fmt.lmt.
thanks for testing
Some notes:
here's the thing: without yoyur changes (like markinfo which I'm was checking for the version for a reason, i don't add that kind of checks for fun), the document validates here, so then i thought, well, let's update verapdf and for sure a document that validated a while ago doesn't now .. one can wondert how many validated documents there are around that actually invalidate now ...
- I had to manually tag every paragraph with \startparagraph/\stopparagraph, which was annoying.
well, that also depends on the concept of paragraph i guess .. one can't make structure from non-structure
- I had to hardcode mapping all sections to H1 for the validation to pass; this obviously won't work in real documents. There's code that purports to handle this at the end of "lpdf-tag-imp-testing.lmt", but I couldn't get it to work.
but you still have a lot of NonStructs (the way to play safe) and span's also can be tricky as (last time Mikael and I looked into that there were quite some restrictions of what could go in there; the sam eis true for lbl etc)
- "\setupbackend[format=pdf/ua-2]" needs to come before "\setuptagging[state=start]", otherwise lots of stuff will silently break.
Indeed, the format influences some later settings (arbitrary order initializations would complicate the code with no real gain) .. it might im prove over time but all this tagging is mostly a "when we're in the mood and has to be done when we are motivated" and it comes for free (so it's not driven by some paid project that can set priorities) which btw is true for pretty much most of context anyway.
- I've heard that it's actually usually better to put the TeX source in the Alt text for math instead of the current generated prose, because most people reading math are familiar with TeX anyways.
Well, i never meet people who are familiar with latex input ... or expect that from us ... do you expect me to generate something latex math from less verbose context math? And what about all kind of (educational) stuff inside there. We try to accomodate what users expect and challenge us to because that's the world we deal with. The latex is just a different world (to us); little or no overlap. Also, isn't the persistent messaging (and ranting) that one should not use context for articles and such, so why bother. And the embeded xml blob is probably more reliable than any context -> latex math conversion. When it comes to math I think most context users are in education so that's what we focus on. The proze is also our way to deal with making sure the meaning is kept. You need to keep in mind that when we started with all this there were no programs that did anything useful with tagging, that the spec was (and is) not stable, that validation is a moving target etc ... it's all about adaptation and it's always easy to point out whatever without looking at the past and reality one has / had to deal with. A few decades from not all this tagging will probably be seen as kind of rediculous anyway.
- The file validates successfully, but there are lots of "Nested MCID" warnings.
But not invalid, right? Anyway, I need to check these proposed changes against the (older and newer) specification, Again, thanks, Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------