Re: Support alt text in LaTeX output
Charles Staats <[email protected]> Fri, 24 Jul 2026 07:58:41 -0600
| Newsgroups | gmane.comp.tex.texinfo.bugs |
|---|---|
| Message-ID | <CAP-6jhFG8CuuzzbyFczyShMy63k=NJanp_VAOQjKM7ZvsfihUA@mail.gmail.com> |
--000000000000d8f48906575bc5ca
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
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 other
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 check
if a document is "accessible" or not.
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.
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 standard
(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 for
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 less
important. If generating 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'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.
On Fri, Jul 24, 2026 at 6:57=E2=80=AFAM Charles Staats <charles.staats.iii@=
gmail.com>
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-5069=
856482>
>>
>> @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 need
>> 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 make
>> the distinction. But it would be good if an existing non-empty alternati=
ve
>> 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 wha=
t
>>> an
>>> > "accessible" document is, why it is important, and how you would chec=
k
>>> 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 for
>>> 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 tracke=
r
>>> > in the first place, as that would seem not to be the responsibility o=
f
>>> > the LaTeX project in the first place.
>>>
>>> That's because the LaTeX project people generate LaTeX from Texinfo for
>>> 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 to
>>> 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
>>>
>>
--000000000000d8f48906575bc5ca
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">From David Carlisle:<div><br></div><div>@charlesstaats <br=
><br>> Charles forwarded the discussion here with the purprose of having=
<br>texi2any changed, which looks good to me.<br><br>Note that for those of=
us seeing this on github all email addresses are stripped so we have no id=
ea where "here" is and can not reply to you other than pinging Ch=
arles and asking him to forward.<br><br>=C2=A0> I feel that this discuss=
ion is missing important context, such as what an =C2=A0"accessible&qu=
ot; document is, why it is important, and how you would check if a document=
is "accessible" or not.<br><br>accessibility means in this conte=
xt having a pdf that exposes structure to the operating system accessibilit=
y API so screen readers and braille displays can make use of the document. =
<br><br>You can check a pdf with the common `pdfinfo` commandline utility a=
nd 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/">=
https://pdfa.org/iso-14289-2-pdfua-2/</a>) =C2=A0In many jurisdictions publ=
ic bodies such as Universities have a legal requirement to produce accessib=
le documents (aside from the fact that doing so is a good thing 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 has been supported=
for over 5 years and if you want to support older latex you can add<br><br=
>```<br>\makeatletter <br>\define@key{Gin}{alt}{}<br>\makeatother<br>```<br=
><br>so it doesn't error.<br><br>Adding `\DocumentMetadata{tagging=3Don=
}` would also be convenient but less important. If generating PDF from texi=
nfo I'd expect to modify the generated latex preamble, to use A4 paper =
or choosing fonts etc, so adding Tagging declarations isn't so much mor=
e, but it's a lot harder to re-parse the texinfo source, extract all th=
e 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_quote gmail_quote_=
container"><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:charles.staats.iii@gmail=
.com">[email protected]</a>> wrote:<br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex"><div dir=3D"ltr">+David Carlisle. (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:charles.staats.iii=
@gmail.com" target=3D"_blank">[email protected]</a>> wrote:<b=
r></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-fischer</strong>=
left a comment <a href=3D"https://github.com/latex3/tagging-project/issues=
/1491#issuecomment-5069856482" target=3D"_blank">(latex3/tagging-project#14=
91)</a></div><p dir=3D"auto">@charlesstaats these email-cc on the github ar=
e a bit confusing ;-). <br><br>But if they want to use the alt-key even wit=
h older LaTeX they only need to define the keys with some dummy commands:<b=
r><br>~~~~<br>\usepackage{keyval}<br>\makeatletter <br>\define@key{Gin}{alt=
}{}<br>\define@key{Gin}{actualtext}{}<br>\define@key{Gin}{artifact}{}<br>\m=
akeatother<br>\usepackage{graphicx}<br>~~~~<br><br>From what I understood f=
rom the input shown by David (`@center @image{./flowchartdemo,www,hhh,a flo=
wchart}` ), I think that the `actualtext` =C2=A0option would be difficult t=
o use as the input doesn't make the distinction. But it would be good i=
f 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 the key `artifa=
ct`. <br><br></p></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas=
s=3D"gmail_attr">On Fri, Jul 24, 2026 at 5:24=E2=80=AFAM Patrice Dumas <=
<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&=
gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fr=
i, 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>
--000000000000d8f48906575bc5ca--