Re: Support alt text in LaTeX output
Charles Staats <[email protected]> Fri, 24 Jul 2026 07:59:56 -0600
| Newsgroups | gmane.comp.tex.texinfo.bugs |
|---|---|
| Message-ID | <CAP-6jhErh7dPVAwWK5KNDDte19fkf5X3YPn8z-oy0r8V4+KLpg@mail.gmail.com> |
--0000000000005e6b5a06575bca95 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable from Charles Staats: This has turned out rather confusing, hasn't it? I'm going to stop auto-forwarding things from one discussion to the other. The "main" mailing address here is `[email protected]`; the discussion (as seen on their end) is available [here]( https://lists.gnu.org/archive/html/bug-texinfo/2026-07/msg00086.html), although that is more or less read-only. (It does have an email button, but that only emails the author of the post you're viewing, leaving out the list and the other participants). I will try to keep manually forwarding messages back and forth (which will hopefully eliminate some of the confusion vs auto-forwarding), although there will likely be a delay. One thing I should probably mention: I assumed, going into this discussion, that the pdf generated by running `texi2any --pdf` was not already accessible, and that adding an explicit `--latex` step (with a script making modifications to the tex file as necessary) was the best way to make it accessible. I also assumed that texi2any was fairly old with no major recent updates. The latter assumption turned out to be drastically mistaken. We should probably check the former assumption as well; if `texi2any --pdf` can already produce accessible pdfs, then this issue can be deprioritized and the Asymptote team can focus on adding meaningful alt tags in the texi file. On Fri, Jul 24, 2026 at 6:58=E2=80=AFAM Charles Staats <charles.staats.iii@= gmail.com> wrote: > From David Carlisle: > > @charlesstaats > > > Charles forwarded the discussion here with the purprose of having > texi2any changed, which looks good to me. > > Note that for those of us seeing this on github all email addresses are > stripped so we have no idea where "here" is and can not reply to you othe= r > than pinging Charles and asking him to forward. > > > I feel that this discussion is missing important context, such as what > an "accessible" document is, why it is important, and how you would chec= k > if a document is "accessible" or not. > > accessibility means in this context having a pdf that exposes structure t= o > the operating system accessibility API so screen readers and braille > displays can make use of the document. > > You can check a pdf with the common `pdfinfo` commandline utility and see > if it says `Tagged: yes` the actual tagging should meet PDF/UA-2 standar= d > (ISO 14289-2 https://pdfa.org/iso-14289-2-pdfua-2/) In many > jurisdictions public bodies such as Universities have a legal requirement > to produce accessible documents (aside from the fact that doing so is a > good thing in itself) > > By far the most important part of the request on the texinfo side is to > pass the alt texts through to the latex output, this has been supported f= or > over 5 years and if you want to support older latex you can add > > ``` > \makeatletter > \define@key{Gin}{alt}{} > \makeatother > ``` > > so it doesn't error. > > Adding `\DocumentMetadata{tagging=3Don}` would also be convenient but les= s > important. If generating PDF from texinfo I'd expect to modify the > generated latex preamble, to use A4 paper or choosing fonts etc, so addin= g > Tagging declarations isn't so much more, but it's a lot harder to re-pars= e > the texinfo source, extract all the alt texts and add them to the generat= ed > latex if texi2any doesn't do that. > > > > > On Fri, Jul 24, 2026 at 6:57=E2=80=AFAM Charles Staats < > [email protected]> wrote: > >> +David Carlisle. (Ulrike has not made her email address public on Github= .) >> >> On Fri, Jul 24, 2026 at 6:54=E2=80=AFAM Charles Staats < >> [email protected]> wrote: >> >>> *u-fischer* left a comment (latex3/tagging-project#1491) >>> <https://github.com/latex3/tagging-project/issues/1491#issuecomment-506= 9856482> >>> >>> @charlesstaats these email-cc on the github are a bit confusing ;-). >>> >>> But if they want to use the alt-key even with older LaTeX they only nee= d >>> to define the keys with some dummy commands: >>> >>> ~~~~ >>> \usepackage{keyval} >>> \makeatletter >>> \define@key{Gin}{alt}{} >>> \define@key{Gin}{actualtext}{} >>> \define@key{Gin}{artifact}{} >>> \makeatother >>> \usepackage{graphicx} >>> ~~~~ >>> >>> From what I understood from the input shown by David (`@center >>> @image{./flowchartdemo,www,hhh,a flowchart}` ), I think that the >>> `actualtext` option would be difficult to use as the input doesn't mak= e >>> the distinction. But it would be good if an existing non-empty alternat= ive >>> text is at least added as `alt=3D{text}`, and if an empty or missing >>> alternative text is mapped to the key `artifact`. >>> >>> >>> On Fri, Jul 24, 2026 at 5:24=E2=80=AFAM Patrice Dumas <[email protected]= > wrote: >>> >>>> On Fri, Jul 24, 2026 at 01:03:45PM +0100, Gavin Smith wrote: >>>> > You haven't explained why any of that is important. >>>> > >>>> > I feel that this discussion is missing important context, such as >>>> what an >>>> > "accessible" document is, why it is important, and how you would >>>> check if >>>> > a document is "accessible" or not. >>>> >>>> I think that it is the same as accessibility in other context, to >>>> generate PDF that people can use even without being able to see, for >>>> example. >>>> >>>> I think that it is a worthy objective in itself, as long as it >>>> integrates well with texi2any/Texinfo. Both for alt for images and fo= r >>>> the pdftitle (which I interpret as something like settitle), this >>>> fits well and seems relevant. >>>> >>>> > I don't understand why a >>>> > problem with texi2any output is being discussed on a LaTeX bug track= er >>>> > in the first place, as that would seem not to be the responsibility = of >>>> > the LaTeX project in the first place. >>>> >>>> That's because the LaTeX project people generate LaTeX from Texinfo fo= r >>>> the asymptote manual, which is in Texinfo and try to have the PDF >>>> obtained from this LaTeX be accessible according to some checker. >>>> I think that it is interesting feedback, because the people in the >>>> tracker can read and understand the LaTeX code generated by texi2any, >>>> figure out why the PDF generated from it is not accessible according t= o >>>> the tool they use and give feedback on what should be fixed, texi2any >>>> LaTeX output, or LaTex, for instance. >>>> >>>> Charles forwarded the discussion here with the purprose of having >>>> texi2any changed, which looks good to me. >>>> >>>> -- >>>> Pat >>>> >>> --0000000000005e6b5a06575bca95 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">from Charles Staats:<div><br></div><div>This has turned ou= t rather confusing, hasn't it? I'm going to stop auto-forwarding th= ings from one discussion to the other. The "main" mailing address= here is `<a href=3D"mailto:[email protected]">[email protected]</a>`; = the discussion (as seen on their end) is available [here](<a href=3D"https:= //lists.gnu.org/archive/html/bug-texinfo/2026-07/msg00086.html">https://lis= ts.gnu.org/archive/html/bug-texinfo/2026-07/msg00086.html</a>), although th= at is more or less read-only. (It does have an email button, but that only = emails the author of the post you're viewing, leaving out the list and = the other participants).<br><br>I will try to keep manually forwarding mess= ages back and forth (which will hopefully eliminate some of the confusion v= s auto-forwarding), although there will likely be a delay.<br><br>One thing= I should probably mention: I assumed, going into this discussion, that the= pdf generated by running `texi2any --pdf` was not already accessible, and = that adding an explicit `--latex` step (with a script making modifications = to the tex file as necessary) was the best way to make it accessible. I als= o assumed that texi2any was fairly old with no major recent updates. The la= tter assumption turned out to be drastically mistaken. We should probably c= heck the former assumption as well; if `texi2any --pdf` can already produce= accessible pdfs, then this issue can be deprioritized and the Asymptote te= am can focus on adding meaningful alt tags in the texi file.</div></div><br= ><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D= "gmail_attr">On Fri, Jul 24, 2026 at 6:58=E2=80=AFAM Charles Staats <<a = href=3D"mailto:[email protected]">[email protected]</= a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0p= x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><d= iv dir=3D"ltr">From David Carlisle:<div><br></div><div>@charlesstaats <br><= br>> Charles forwarded the discussion here with the purprose of having<b= r>texi2any changed, which looks good to me.<br><br>Note that for those of u= s seeing this on github all email addresses are stripped so we have no idea= where "here" is and can not reply to you other than pinging Char= les and asking him to forward.<br><br>=C2=A0> I feel that this discussio= n is missing important context, such as what an =C2=A0"accessible"= ; document is, why it is important, and how you would check if a document i= s "accessible" or not.<br><br>accessibility means in this context= having a pdf that exposes structure to the operating system accessibility = API so screen readers and braille displays can make use of the document. <b= r><br>You can check a pdf with the common `pdfinfo` commandline utility and= see if it says `Tagged: yes` =C2=A0the actual tagging should meet PDF/UA-2= standard (ISO 14289-2 <a href=3D"https://pdfa.org/iso-14289-2-pdfua-2/" ta= rget=3D"_blank">https://pdfa.org/iso-14289-2-pdfua-2/</a>) =C2=A0In many ju= risdictions public bodies such as Universities have a legal requirement to = produce accessible documents (aside from the fact that doing so is a good t= hing in itself)<br><br>By far the most important part of the request on the= texinfo side is to pass the alt texts through to the latex output, this ha= s been supported for over 5 years and if you want to support older latex yo= u can add<br><br>```<br>\makeatletter <br>\define@key{Gin}{alt}{}<br>\makea= tother<br>```<br><br>so it doesn't error.<br><br>Adding `\DocumentMetad= ata{tagging=3Don}` would also be convenient but less important. If generati= ng PDF from texinfo I'd expect to modify the generated latex preamble, = to use A4 paper or choosing fonts etc, so adding Tagging declarations isn&#= 39;t so much more, but it's a lot harder to re-parse the texinfo source= , extract all the alt texts and add them to the generated latex if texi2any= doesn't do that.<br><br><br><br></div></div><br><div class=3D"gmail_qu= ote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Jul 24, 2026 at 6:57=E2= =80=AFAM Charles Staats <<a href=3D"mailto:[email protected]"= target=3D"_blank">[email protected]</a>> wrote:<br></div><bl= ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-lef= t:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">+David Carl= isle. (Ulrike has not made her=C2=A0email address public on Github.)</div><= br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri,= Jul 24, 2026 at 6:54=E2=80=AFAM Charles Staats <<a href=3D"mailto:charl= [email protected]" target=3D"_blank">[email protected]</a>= > wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px = 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div= dir=3D"ltr"><div style=3D"white-space:pre-wrap;display:flex"><strong>u-fis= cher</strong> left a comment <a href=3D"https://github.com/latex3/tagging-p= roject/issues/1491#issuecomment-5069856482" target=3D"_blank">(latex3/taggi= ng-project#1491)</a></div><p dir=3D"auto">@charlesstaats these email-cc on = the github are a bit confusing ;-). <br><br>But if they want to use the alt= -key even with older LaTeX they only need to define the keys with some dumm= y commands:<br><br>~~~~<br>\usepackage{keyval}<br>\makeatletter <br>\define= @key{Gin}{alt}{}<br>\define@key{Gin}{actualtext}{}<br>\define@key{Gin}{arti= fact}{}<br>\makeatother<br>\usepackage{graphicx}<br>~~~~<br><br>From what I= understood from the input shown by David (`@center @image{./flowchartdemo,= www,hhh,a flowchart}` ), I think that the `actualtext` =C2=A0option would b= e difficult to use as the input doesn't make the distinction. But it wo= uld be good if an existing non-empty alternative text is at least added as = `alt=3D{text}`, and if an empty or missing alternative text is mapped to th= e key `artifact`. <br><br></p></div><br><div class=3D"gmail_quote"><div dir= =3D"ltr" class=3D"gmail_attr">On Fri, Jul 24, 2026 at 5:24=E2=80=AFAM Patri= ce Dumas <<a href=3D"mailto:[email protected]" target=3D"_blank">pertusus= @free.fr</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D= "margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le= ft:1ex">On Fri, Jul 24, 2026 at 01:03:45PM +0100, Gavin Smith wrote:<br> > You haven't explained why any of that is important.<br> > <br> > I feel that this discussion is missing important context, such as what= an<br> > "accessible" document is, why it is important, and how you w= ould check if<br> > a document is "accessible" or not.<br> <br> I think that it is the same as accessibility in other context, to<br> generate PDF that people can use even without being able to see, for<br> example.<br> <br> I think that it is a worthy objective in itself, as long as it<br> integrates well with texi2any/Texinfo.=C2=A0 Both for alt for images and fo= r<br> the pdftitle (which I interpret as something like settitle), this<br> fits well and seems relevant.<br> <br> > I don't understand why a<br> > problem with texi2any output is being discussed on a LaTeX bug tracker= <br> > in the first place, as that would seem not to be the responsibility of= <br> > the LaTeX project in the first place.<br> <br> That's because the LaTeX project people generate LaTeX from Texinfo for= <br> the asymptote manual, which is in Texinfo and try to have the PDF<br> obtained from this LaTeX be accessible according to some checker.<br> I think that it is interesting feedback, because the people in the<br> tracker can read and understand the LaTeX code generated by texi2any,<br> figure out why the PDF generated from it is not accessible according to<br> the tool they use and give feedback on what should be fixed, texi2any<br> LaTeX output, or LaTex, for instance.<br> <br> Charles forwarded the discussion here with the purprose of having<br> texi2any changed, which looks good to me.<br> <br> -- <br> Pat<br> </blockquote></div> </blockquote></div> </blockquote></div> </blockquote></div> --0000000000005e6b5a06575bca95--