[Note: The last is a forwarded reply from David Carlisle via
https://github.com/latex3/tagging-project/issues/1491#issuecomment-5064433061
]

On Thu, Jul 23, 2026 at 10:30 PM Charles Staats <
[email protected]> wrote:

> @charlesstaats  I think this is being CC'ed to the texinfo list
> (somewhere?) but as I'm seeing it on the github issue the original email
> context is stripped, but feel free to forward.
>
> > .  However, it looks like it was added in 2021,
>
> yes
>
> > What happens if graphicx is older with an unknown alt= passed?
>
> it would error but you could add code to the latex preamble to
> conditionally make it a defined (and no-op) or you could make all such
> accessibility additions conditional on `\DocumentMetadata`   being defined
> (that was also added in 2021)
>
> > In case it is possible to use \DocumentMetadata, which should be the
> format of the lang?  Some examples on the internet look like BCP 47
>
> yes or omit it and it defaults to `en`
>
> > Not sure that there is a use [for artifact] in Texinfo to LaTeX
> conversion.
>
> possibly not, it is for marking essentially decorative images which you
> want to drop entirely from the accessible view.
>
> > It seems to be actualtext=, not actual=.  We could use a file like
> image.txt that we use in Info output, for example for that.  It is not
> clear, however, how to specify it.  Is it an issue if there are end of
> line in it?  Blank lines?  The manual does not show any example.
>
> In the end it needs to resolve to a plain text string that is a PDF
> property value so ends of lines are OK, but are spaces as is normal in TeX.
> The PDF standard suggests this should be for small sections  of text
> typically replacing a custom symbol (or a textual image) not for paragraph
> length
>
> > It is not clear to me why style=nextline is incompatible with tagging.
> Is it really important, or should it be fixed someday?
>
> We'll fix that. Most of `enumitem` keys are emulated by the new built-in
> accessible list code however that one is currently document as `todo`
> so I added a quick workaround in this document, but just assume it works.
>
>
> > The noparboxtagging stuff seems obscure to me, but I can add it if there
> is some explanation,
>
> Please ignore that, it will go, we were just forcing in some markup to
> check that we could generate a PDF/UA-2 accessible file from the texinfo
> source. Now we know it's possible we can fix up the markup.
>
> > Regarding `\usepackage{unicode-math`}, I do not have a clear idea
> whether it is a good idea to use that instead of amsmath.
>
> It's just a lot easier to generate MathML accessible mathematics (which is
> required to be in Unicode) if you use a Unicode engine and Unicode math
> fonts in the original. However it is possible to use legacy tex math fonts
> and map to unicode so it's not essential, but in general accessibility is
> better from luatex than pdftex.
>
> ----
> so in short if you ignore the experimental ad-hoc commands added to fix up
> the test document so it worked today, what would be good would be
>
> * an option or configuration or whatever that allowed you to choose
> accessibility options for latex, so
>
> ```
> \DocumentMetadata{
> lang=<document-language-from-texinfo>,
> pdfstandard=ua-2,
> tagging=on
> }
> ```
>
> there are other options that could be added there but keeping things
> simple....
>
> * then use `unicode-math` instead of `amsmath`  and pass the alt text
> argument on graphics through to `\includegraphics`
>
> it might be nice to have some way of saying to use that argument as
> actualtext instead of alt but if that doesn't really fit the texinfo input
> syntax I don't think that's essential. If alt is OK for the html
> translation it's probably OK for pdf too.
>
> * set the pdf metadata dc:title based on information in the texinfo source.
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Jul 23, 2026 at 2:31 PM Patrice Dumas <[email protected]> wrote:
>
>> On Thu, Jul 23, 2026 at 11:07:25AM -0600, Charles Staats wrote:
>> > Hello,
>> >
>> > Currently, `texi2any --latex` appears to discard any alt text tag, see
>> >
>> https://github.com/latex3/tagging-project/issues/1491#issuecomment-5061006949
>> .
>> > Would it be possible to change this?
>> >
>> > Ideally, there would be some sort of flag like `--accessible` or
>> > `--latex-tagging` that could be passed to the texi2any script that would
>> > cause certain changes to the TeX and pdf output, such as the following:
>>
>> I do not think that a command-line should be used for that.  Maybe a
>> customization variable.
>>
>> > * Forward any alt text to the `\includegraphics` commands.
>>
>> This seems to be relevant independently of the remaining.  However, it
>> looks like it was added in 2021, according to
>>
>> https://ctan.tetaneutral.net/macros/latex/required/graphics/grfguide.pdf
>>
>> What happends if graphicx is older with an unknown alt= passed?
>>
>> > * Insert a `\DocumentMetadata` command (with appropriate settings) at
>> the
>> > beginning of the document.
>>
>> Which LaTeX version support \DocumentMetadata?  What happens if the
>> version used does not?
>>
>> In case it is possible to use \DocumentMetadata, which should be the
>> format of the lang?  Some examples on the internet look like BCP 47, but
>> it is not so clear.
>>
>> > * (For pdf output) compile with lualatex instead of pdflatex.
>>
>> texi2any does not compile the LaTeX file, just produces it.
>>
>> > * Ideally, we would also have "actual" and "artifact" tags as well. If I
>> > understand correctly, the "actual=<stuff>" tag indicates to
>> screenreaders
>> > that the image should be treated as if it were the text "<stuff>";
>>
>> It seems to be actualtext=, not actual=.  We could use a file like
>> image.txt that we use in Info output, for example for that.  It is not
>> clear, however, how to specify it.  Is it an issue if there are end of
>> line in it?  Blank lines?  The manual does not show any example.
>>
>> Also it seems to be quite recent, end of 2024, similarly, what happens
>> with older graphicx with an unknown actualtext= passed?
>>
>> > the
>> > "artifact" tag tells the screenreader to ignore the image altogether
>> (used,
>> > e.g., for logos).
>>
>> Not sure that there is a use in Texinfo to LaTeX conversion.
>>
>> > There may be other changes needed, as discussed in the issue linked
>> above.
>> > (Note: Some of these may be better dealt with on the TeX side rather
>> than
>> > the texinfo side.)
>>
>> I think that \hypersetup{pdftitle={}} could be added.  It looks like a
>> relevant addition in the default case.
>>
>> It is not clear to me why style=nextline is incompatible with tagging.
>> Is it really important, or should it be fixed someday?
>>
>> The noparboxtagging stuff seems obscure to me, but I can add it if there
>> is some explanation, and also it is not clear to me if
>> \AssignTaggingSocketPlug
>> and \tagpdfparaOff are backward compatible enough.
>>
>> Regarding \usepackage{unicode-math}, I do not have a clear idea whether
>> it is a good idea to use that instead of amsmath.  It seems that the
>> \mathbf and similar commands should be changed, but it is not so clear
>> either.  Also it seems to require some specific fonts.  Maybe there
>> could be some customization option to generate LaTeX for an engine or
>> the other.
>>
>> --
>> Pat
>>
>

Reply via email to