* [NTG-context] Tagging Math
@ 2025-04-10 17:11 Matthias Weber
2025-04-10 18:20 ` [NTG-context] " Mikael Sundqvist
0 siblings, 1 reply; 26+ messages in thread
From: Matthias Weber @ 2025-04-10 17:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 817 bytes --]
Dear All,
Following the instructions in tagging.pdf,
I tried
\setupbackend[format=pdf/ua-2]
\setuptagging[state=start]
\enabledirectives [backend.usetags=crap]
\registermathsymbol[default][en][ z ][the variable]
\registermathsymbol[default][en][ k ][the index]
\starttext
\startformula
\startalign
\NC \left|(z_0+h)^n - z_0^n\right| \NC = \left|\sum_{k=1}^n \binom{n}{k}h^k z_0^{n-k}\right| \NR
\NC \NC = \left |h \sum_{k=0}^{n-1} \binom{n}{k+1} h^k z_0^{n-1-k}\right| \NR
\NC \NC = \left|h \sum_{k=0}^{n-1} \frac n {k+1} \binom{n-1}{k} h^k z_0^{n-1-k}\right| \NR
\NC \NC \le n | h| \sum_{k=0}^{n-1} \binom{n-1}{k} |h|^k |z_0|^{n-1-k} \NR
\NC \NC \le n | h| (|z_0|+|h|)^{n-1} \NR
\stopalign
\stopformula
\stoptext
This creates within the pdf the XML attachment below:
[-- Attachment #2: math-0001.xml --]
[-- Type: application/xml, Size: 2910 bytes --]
[-- Attachment #3: Type: text/plain, Size: 174 bytes --]
This XML contains all the information from the formula. Wrapping it into
\usemodule[mathml]
\starttext
\xmlprocessdata{}{
% content of XML file
}{}
\stoptext
produces
[-- Attachment #4: Untitled.pdf --]
[-- Type: application/pdf, Size: 5564 bytes --]
[-- Attachment #5: Type: text/plain, Size: 201 bytes --]
which is also what my Mac screen reads from the original PDF, but it is evidently not what I want.
Does someone have a working example that shows how to do this right?
Thanks,
Matthias
[-- Attachment #6: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-10 17:11 [NTG-context] Tagging Math Matthias Weber
@ 2025-04-10 18:20 ` Mikael Sundqvist
2025-04-10 19:02 ` Matthias Weber
0 siblings, 1 reply; 26+ messages in thread
From: Mikael Sundqvist @ 2025-04-10 18:20 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
I don't know what you expect, but you can try
%%%
\setupbackend[format=pdf/ua-2]
\setuptagging[state=start]
\registermathsymbol[default][en]["1D467][the variable]
\registermathsymbol[default][en]["1D458][the index]
\enabletrackers[math.textblobs]
\setupnote
[mathnote]
[location=margin]
\starttext
\startformula
\abs {(z__0 + h)^n - z__0^n }
\alignhere
= \abs {\sum_{k = 1}^n \binom{n}{k} h^k z__0^{n - k} }
\breakhere
= \abs {h \sum_{k = 0}^{n - 1} \binom{n}{k + 1} h^k z__0^{n - 1 - k} }
\breakhere
= \abs {h \sum_{k = 0}^{n - 1} \frac {n}{k + 1} \binom{n - 1}{k} h^k
z__0^{n - 1 - k} }
\breakhere
\le n \abs{h} \sum_{k = 0}^{n - 1} \binom{n - 1}{k} \abs{h}^k
\abs{z__0}^{n - 1 - k}
\breakhere
\le n \abs{h} (\abs{z__0} + \abs{h})^{n - 1}
\stopformula
\placenotes[mathnote]
\registermathsymbol[default][en][lowercasebold][the vector]
\startformula
(\alpha + \beta) \mathbf{u} = \alpha \mathbf{u} + \beta \mathbf{u}
\stopformula
\placenotes[mathnote]
\stoptext
%%%
As you see in the text the z and k are now interpreted as variable and
index. The second example gives "the vector" for all lowercasebold.
I will not paste the mathml blob from the bigger formula, but the
smaller one looks like this:
<math>
<mrow>
<mo stretchy="false">(</mo>
<mi>𝛼</mi>
<mo>+</mo>
<mi>𝛽</mi>
<mo stretchy="false">)</mo>
<mi>𝐮</mi>
<mo>=</mo>
<mi>𝛼</mi>
<mi>𝐮</mi>
<mo>+</mo>
<mi>𝛽</mi>
<mi>𝐮</mi>
</mrow>
</math>
/Mikael
On Thu, Apr 10, 2025 at 7:58 PM Matthias Weber
<matthiasweber64@gmail.com> wrote:
>
> Dear All,
>
>
> Following the instructions in tagging.pdf,
>
> I tried
>
> \setupbackend[format=pdf/ua-2]
> \setuptagging[state=start]
>
> \enabledirectives [backend.usetags=crap]
>
> \registermathsymbol[default][en][ z ][the variable]
> \registermathsymbol[default][en][ k ][the index]
>
>
> \starttext
> \startformula
> \startalign
> \NC \left|(z_0+h)^n - z_0^n\right| \NC = \left|\sum_{k=1}^n \binom{n}{k}h^k z_0^{n-k}\right| \NR
> \NC \NC = \left |h \sum_{k=0}^{n-1} \binom{n}{k+1} h^k z_0^{n-1-k}\right| \NR
> \NC \NC = \left|h \sum_{k=0}^{n-1} \frac n {k+1} \binom{n-1}{k} h^k z_0^{n-1-k}\right| \NR
> \NC \NC \le n | h| \sum_{k=0}^{n-1} \binom{n-1}{k} |h|^k |z_0|^{n-1-k} \NR
> \NC \NC \le n | h| (|z_0|+|h|)^{n-1} \NR
> \stopalign
> \stopformula
> \stoptext
>
> This creates within the pdf the XML attachment below:
>
>
>
> This XML contains all the information from the formula. Wrapping it into
>
> \usemodule[mathml]
>
> \starttext
> \xmlprocessdata{}{
> % content of XML file
> }{}
> \stoptext
>
> produces
>
>
>
> which is also what my Mac screen reads from the original PDF, but it is evidently not what I want.
> Does someone have a working example that shows how to do this right?
>
> Thanks,
>
> Matthias
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-10 18:20 ` [NTG-context] " Mikael Sundqvist
@ 2025-04-10 19:02 ` Matthias Weber
2025-04-11 10:53 ` Ulrike Fischer
2025-04-11 15:47 ` Hans Hagen via ntg-context
0 siblings, 2 replies; 26+ messages in thread
From: Matthias Weber @ 2025-04-10 19:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thank you Mikael,
What I would like to to is to have what \placenotes[mathnote] produces added to the pdf as a tag so that a screen reader would be able to read the math. Right now,
with your example, it reads the typeset math in an extremely garbled way (but the mathnotes at leats make sense).
So the question is how to get the content of the mathnotes into the PDF tags…
Matthias
> On Apr 10, 2025, at 2:20 PM, Mikael Sundqvist <mickep@gmail.com> wrote:
>
> Hi,
>
> I don't know what you expect, but you can try
>
> %%%
> \setupbackend[format=pdf/ua-2]
>
> \setuptagging[state=start]
>
> \registermathsymbol[default][en]["1D467][the variable]
> \registermathsymbol[default][en]["1D458][the index]
>
> \enabletrackers[math.textblobs]
>
> \setupnote
> [mathnote]
> [location=margin]
>
> \starttext
> \startformula
> \abs {(z__0 + h)^n - z__0^n }
> \alignhere
> = \abs {\sum_{k = 1}^n \binom{n}{k} h^k z__0^{n - k} }
> \breakhere
> = \abs {h \sum_{k = 0}^{n - 1} \binom{n}{k + 1} h^k z__0^{n - 1 - k} }
> \breakhere
> = \abs {h \sum_{k = 0}^{n - 1} \frac {n}{k + 1} \binom{n - 1}{k} h^k
> z__0^{n - 1 - k} }
> \breakhere
> \le n \abs{h} \sum_{k = 0}^{n - 1} \binom{n - 1}{k} \abs{h}^k
> \abs{z__0}^{n - 1 - k}
> \breakhere
> \le n \abs{h} (\abs{z__0} + \abs{h})^{n - 1}
> \stopformula
>
> \placenotes[mathnote]
>
> \registermathsymbol[default][en][lowercasebold][the vector]
>
> \startformula
> (\alpha + \beta) \mathbf{u} = \alpha \mathbf{u} + \beta \mathbf{u}
> \stopformula
>
> \placenotes[mathnote]
>
> \stoptext
> %%%
>
> As you see in the text the z and k are now interpreted as variable and
> index. The second example gives "the vector" for all lowercasebold.
>
> I will not paste the mathml blob from the bigger formula, but the
> smaller one looks like this:
>
> <math>
> <mrow>
> <mo stretchy="false">(</mo>
> <mi>𝛼</mi>
> <mo>+</mo>
> <mi>𝛽</mi>
> <mo stretchy="false">)</mo>
> <mi>𝐮</mi>
> <mo>=</mo>
> <mi>𝛼</mi>
> <mi>𝐮</mi>
> <mo>+</mo>
> <mi>𝛽</mi>
> <mi>𝐮</mi>
> </mrow>
> </math>
>
> /Mikael
>
>
> On Thu, Apr 10, 2025 at 7:58 PM Matthias Weber
> <matthiasweber64@gmail.com> wrote:
>>
>> Dear All,
>>
>>
>> Following the instructions in tagging.pdf,
>>
>> I tried
>>
>> \setupbackend[format=pdf/ua-2]
>> \setuptagging[state=start]
>>
>> \enabledirectives [backend.usetags=crap]
>>
>> \registermathsymbol[default][en][ z ][the variable]
>> \registermathsymbol[default][en][ k ][the index]
>>
>>
>> \starttext
>> \startformula
>> \startalign
>> \NC \left|(z_0+h)^n - z_0^n\right| \NC = \left|\sum_{k=1}^n \binom{n}{k}h^k z_0^{n-k}\right| \NR
>> \NC \NC = \left |h \sum_{k=0}^{n-1} \binom{n}{k+1} h^k z_0^{n-1-k}\right| \NR
>> \NC \NC = \left|h \sum_{k=0}^{n-1} \frac n {k+1} \binom{n-1}{k} h^k z_0^{n-1-k}\right| \NR
>> \NC \NC \le n | h| \sum_{k=0}^{n-1} \binom{n-1}{k} |h|^k |z_0|^{n-1-k} \NR
>> \NC \NC \le n | h| (|z_0|+|h|)^{n-1} \NR
>> \stopalign
>> \stopformula
>> \stoptext
>>
>> This creates within the pdf the XML attachment below:
>>
>>
>>
>> This XML contains all the information from the formula. Wrapping it into
>>
>> \usemodule[mathml]
>>
>> \starttext
>> \xmlprocessdata{}{
>> % content of XML file
>> }{}
>> \stoptext
>>
>> produces
>>
>>
>>
>> which is also what my Mac screen reads from the original PDF, but it is evidently not what I want.
>> Does someone have a working example that shows how to do this right?
>>
>> Thanks,
>>
>> Matthias
>>
>>
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>>
>> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
>> archive : https://github.com/contextgarden/context
>> wiki : https://wiki.contextgarden.net
>> ___________________________________________________________________________________
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-10 19:02 ` Matthias Weber
@ 2025-04-11 10:53 ` Ulrike Fischer
2025-04-11 12:12 ` Matthias Weber
2025-04-11 15:47 ` Hans Hagen via ntg-context
1 sibling, 1 reply; 26+ messages in thread
From: Ulrike Fischer @ 2025-04-11 10:53 UTC (permalink / raw)
To: ntg-context
Am Thu, 10 Apr 2025 15:02:53 -0400 schrieb Matthias Weber:
> Thank you Mikael,
>
> What I would like to to is to have what \placenotes[mathnote]
> \f\fproduces added to the pdf as a tag so that a screen reader
> would be able to read the math.
The only reader that can currently make use of MathML embedded as
associated file is Foxit together with a beta version of NVDA and a
current MathCat.
See
https://latex3.github.io/tagging-project/documentation/wtpdf/fulldoc
for some discussions.
To find and use the associated MathML file Foxit requires that it is
attached to a Formula element in the PDF 2.0 namespace:
https://github.com/foxitsoftware/PDF_UA-2.
context attaches the MathML to a `math` element declared in a
context specific namespace and then rolemapped (like all other
structure elements) to the NonStruct structure element (which as the
name implies has no semantic meaning). This means that this MathML
is not seen by any reader and useless. If some math is read then
simply in the amount reader can extract math from untagged PDFs.
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-11 10:53 ` Ulrike Fischer
@ 2025-04-11 12:12 ` Matthias Weber
0 siblings, 0 replies; 26+ messages in thread
From: Matthias Weber @ 2025-04-11 12:12 UTC (permalink / raw)
To: news3, mailing list for ConTeXt users
Thanks Ulrike,
This is helpful (and sad) information.
Would it be possible to have ConTeXt produce two documents, one that shows the typeset formula as usual, and a second one that shows instead of the formula the text that Mikael’s example shows as a note? Then screen-reading the second output should be acceptable, at least as far as math is concerned?
Thanks,
Matthias
> On Apr 11, 2025, at 6:53 AM, Ulrike Fischer <news3@nililand.de> wrote:
>
> Am Thu, 10 Apr 2025 15:02:53 -0400 schrieb Matthias Weber:
>
>> Thank you Mikael,
>>
>> What I would like to to is to have what \placenotes[mathnote]
>> \f\fproduces added to the pdf as a tag so that a screen reader
>> would be able to read the math.
>
> The only reader that can currently make use of MathML embedded as
> associated file is Foxit together with a beta version of NVDA and a
> current MathCat.
> See
> https://latex3.github.io/tagging-project/documentation/wtpdf/fulldoc
> for some discussions.
>
> To find and use the associated MathML file Foxit requires that it is
> attached to a Formula element in the PDF 2.0 namespace:
> https://github.com/foxitsoftware/PDF_UA-2.
>
> context attaches the MathML to a `math` element declared in a
> context specific namespace and then rolemapped (like all other
> structure elements) to the NonStruct structure element (which as the
> name implies has no semantic meaning). This means that this MathML
> is not seen by any reader and useless. If some math is read then
> simply in the amount reader can extract math from untagged PDFs.
>
>
> --
> Ulrike Fischer
> http://www.troubleshooting-tex.de/
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-10 19:02 ` Matthias Weber
2025-04-11 10:53 ` Ulrike Fischer
@ 2025-04-11 15:47 ` Hans Hagen via ntg-context
2025-04-11 16:44 ` Matthias Weber
1 sibling, 1 reply; 26+ messages in thread
From: Hans Hagen via ntg-context @ 2025-04-11 15:47 UTC (permalink / raw)
To: ntg-context; +Cc: Hans Hagen
On 4/10/2025 9:02 PM, Matthias Weber wrote:
> Thank you Mikael,
>
> What I would like to to is to have what \placenotes[mathnote] produces added to the pdf as a tag so that a screen reader would be able to read the math. Right now,
> with your example, it reads the typeset math in an extremely garbled way (but the mathnotes at leats make sense).
>
>
> So the question is how to get the content of the mathnotes into the PDF tags…
Last time we looked into this (over a year ago) we tested several
variants with some viewers (Mikael and I use Sumatra (mupdf) and Okular)
and did some tests with speech. We don't have acrobat installed and
can't assume users have anyway, esp not on linux.
We checked what is done with Alt and ActualText and such and decided
that it made no sense to keep trial and erroring. Okular can show the
embedded xml blob fine.
So at that time we settled on adding the serialized formula as
ActualText because that at least gave no errors in validators. We
explicitly decided not to flag /math as Formula because that gave
validating issues with complex formulas that have non-math inside. (We
expect that by llm will be able to interpret a '/math' tag some day, why
not.)
So, from our perspective, we try to make sure something validates, add
as much structure as possible / reasonable, then wait till the viewers
that we use catch up (maybe they do when all that tagging dust has
settled and standards are stable) and then pick up the thread when we
know how to adapt.
In the meantime users can finetune mapping as they like, but we don't
want to be held responsbile for a mess. After all users know what they
coded and want out of it. As said before, tagging is not that complex to
support. The only condition it that we don't want to cripple context
structure support by adapting to suboptimal situations.
So patience is your friend.
Hans
ps. For decades we now use as test a math content base that covers a lot
of dutch education and we had to go from content mathml (nice) to
openmath (mess) to presentational mathml (dropped from browsers) to
asciimath (insufficient) to again a mix of presentational mathml (back
in browsers) and asciimath to ... so we know a bit what we're dealing
with here: multiple output from the same source (web as well as properly
made up teacher driven math). Everything web related keeps changing,
often in an oscillating way.
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-11 15:47 ` Hans Hagen via ntg-context
@ 2025-04-11 16:44 ` Matthias Weber
2025-04-11 17:53 ` Hans Hagen via ntg-context
2025-04-15 15:39 ` Pablo Rodriguez via ntg-context
0 siblings, 2 replies; 26+ messages in thread
From: Matthias Weber @ 2025-04-11 16:44 UTC (permalink / raw)
To: ntg-context
Thanks Hans,
I agree and I am merely weighing my options. I don’t want anyone to waste their time on something useless just to satisfy some compliance mandate.
Any document I want to make available to my students needs to be “compliant” by April 2026. Nobody knows what that exactly means or how this will be tested.
I strongly support providing accessibility in addition to what I want my students to use.
The best way(while waiting) seems to be to provide two documents, where the accessible version replaces all images with text that I write, and all formulas with the text that Mikael’s example produces. So my question is just this: how do I make that automatic: have all formulas replaced by a text that reads like a spoken formula?
Matthias
> On Apr 11, 2025, at 11:52, Hans Hagen via ntg-context <ntg-context@ntg.nl> wrote:
>
> On 4/10/2025 9:02 PM, Matthias Weber wrote:
>> Thank you Mikael,
>> What I would like to to is to have what \placenotes[mathnote] produces added to the pdf as a tag so that a screen reader would be able to read the math. Right now,
>> with your example, it reads the typeset math in an extremely garbled way (but the mathnotes at leats make sense).
>> So the question is how to get the content of the mathnotes into the PDF tags…
>
> Last time we looked into this (over a year ago) we tested several variants with some viewers (Mikael and I use Sumatra (mupdf) and Okular) and did some tests with speech. We don't have acrobat installed and can't assume users have anyway, esp not on linux.
>
> We checked what is done with Alt and ActualText and such and decided that it made no sense to keep trial and erroring. Okular can show the embedded xml blob fine.
>
> So at that time we settled on adding the serialized formula as ActualText because that at least gave no errors in validators. We explicitly decided not to flag /math as Formula because that gave validating issues with complex formulas that have non-math inside. (We expect that by llm will be able to interpret a '/math' tag some day, why not.)
>
> So, from our perspective, we try to make sure something validates, add as much structure as possible / reasonable, then wait till the viewers that we use catch up (maybe they do when all that tagging dust has settled and standards are stable) and then pick up the thread when we know how to adapt.
>
> In the meantime users can finetune mapping as they like, but we don't want to be held responsbile for a mess. After all users know what they coded and want out of it. As said before, tagging is not that complex to support. The only condition it that we don't want to cripple context structure support by adapting to suboptimal situations.
>
> So patience is your friend.
>
> Hans
>
> ps. For decades we now use as test a math content base that covers a lot of dutch education and we had to go from content mathml (nice) to openmath (mess) to presentational mathml (dropped from browsers) to asciimath (insufficient) to again a mix of presentational mathml (back in browsers) and asciimath to ... so we know a bit what we're dealing with here: multiple output from the same source (web as well as properly made up teacher driven math). Everything web related keeps changing, often in an oscillating way.
>
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-11 16:44 ` Matthias Weber
@ 2025-04-11 17:53 ` Hans Hagen via ntg-context
2025-04-11 18:38 ` Matthias Weber
2025-04-15 15:39 ` Pablo Rodriguez via ntg-context
1 sibling, 1 reply; 26+ messages in thread
From: Hans Hagen via ntg-context @ 2025-04-11 17:53 UTC (permalink / raw)
To: ntg-context; +Cc: Hans Hagen
On 4/11/2025 6:44 PM, Matthias Weber wrote:
> Any document I want to make available to my students needs to be “compliant” by April 2026. Nobody knows what that exactly means or how this will be tested.
> I strongly support providing accessibility in addition to what I want my students to use.
ok, so we have some time to see how things evolve and adapt
> The best way(while waiting) seems to be to provide two documents, where the accessible version replaces all images with text that I write, and all formulas with the text that Mikael’s example produces. So my question is just this: how do I make that automatic: have all formulas replaced by a text that reads like a spoken formula?
checking: you mean in the typeset text?
concerning images, we can make some mechanism for that: adding more
elaborate descriptions (alongside images, or in files) and some mode
control
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-11 17:53 ` Hans Hagen via ntg-context
@ 2025-04-11 18:38 ` Matthias Weber
2025-04-12 2:33 ` Aditya Mahajan
0 siblings, 1 reply; 26+ messages in thread
From: Matthias Weber @ 2025-04-11 18:38 UTC (permalink / raw)
To: mailing list for ConTeXt users
Yes, no rush at all.
I think the best and most consistent way to currently provide accessibility is to replace all math by what the tracker/placenote ‘magically’ produces.
So at the end of the day there would be two documents, one with
1+1 =2
and one with
one plus one equals two
As for images, I can use modes to accomplish that. The accessible PDF would contain text only.
There are other things to worry about at some point like indices, hyperlinks, tables.
Matthias
> On Apr 11, 2025, at 1:53 PM, Hans Hagen via ntg-context <ntg-context@ntg.nl> wrote:
>
> On 4/11/2025 6:44 PM, Matthias Weber wrote:
>
>> Any document I want to make available to my students needs to be “compliant” by April 2026. Nobody knows what that exactly means or how this will be tested.
>> I strongly support providing accessibility in addition to what I want my students to use.
>
> ok, so we have some time to see how things evolve and adapt
>
>> The best way(while waiting) seems to be to provide two documents, where the accessible version replaces all images with text that I write, and all formulas with the text that Mikael’s example produces. So my question is just this: how do I make that automatic: have all formulas replaced by a text that reads like a spoken formula?
>
> checking: you mean in the typeset text?
>
> concerning images, we can make some mechanism for that: adding more elaborate descriptions (alongside images, or in files) and some mode control
>
> 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
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-11 18:38 ` Matthias Weber
@ 2025-04-12 2:33 ` Aditya Mahajan
0 siblings, 0 replies; 26+ messages in thread
From: Aditya Mahajan @ 2025-04-12 2:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
On Fri, 11 Apr 2025, Matthias Weber wrote:
> Yes, no rush at all.
>
> I think the best and most consistent way to currently provide accessibility is to replace all math by what the tracker/placenote ‘magically’ produces.
> So at the end of the day there would be two documents, one with
>
> 1+1 =2
>
> and one with
>
> one plus one equals two
>
> As for images, I can use modes to accomplish that. The accessible PDF would contain text only.
> There are other things to worry about at some point like indices, hyperlinks, tables.
Have you considered exporting to XHTML/XML? That may be more reliably read by screen readers.
Aditya
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-11 16:44 ` Matthias Weber
2025-04-11 17:53 ` Hans Hagen via ntg-context
@ 2025-04-15 15:39 ` Pablo Rodriguez via ntg-context
2025-04-15 16:40 ` Matthias Weber
1 sibling, 1 reply; 26+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-04-15 15:39 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 4/11/25 18:44, Matthias Weber wrote:
> [...]
> The best way(while waiting) seems to be to provide two documents, where
> the accessible version replaces all images with text that I write, and
> all formulas with the text that Mikael’s example produces. So my question
> is just this: how do I make that automatic: have all formulas replaced
> by a text that reads like a spoken formula?
Sorry for the late comment, but I think an easier solution is adding
label to provide alternative texts in formulas.
This is required in PDF/UA-1 and afaIk not forbidden in PDF/UA-2.
So, there would be no need to generate an accesible and non-accesible
version of each document.
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-15 15:39 ` Pablo Rodriguez via ntg-context
@ 2025-04-15 16:40 ` Matthias Weber
2025-04-15 19:31 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 26+ messages in thread
From: Matthias Weber @ 2025-04-15 16:40 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thanks Pablo,
I don’t understand how to do this.
The following compiles, but I don’t think the label made it into the pdf.
\enabledirectives [backend.usetags=crap]
\setuptagging[state=start]
\setupstructure[state=start]
\setupbackend
[format=PDF/A-3a,
intent=sRGB IEC61966-2.1,
level=0]
\setupbackend[format=pdf/ua-1]
\starttext
\startformula[label=e to the power of parenthesis pi times i end parenthesis plus 1 equals 0]
e^{\pi i}+1 =0
\stopformula
\stoptext
I would prefer not to have to type out the text of hundreds of formulas because ConTeXt does already a pretty good job of converting formulas into (machine) readable text.
What I would like to work is something like
\enabletrackers[math.textblobs]
\setupnote
[mathnote]
[location=tag]
\starttext
\startformula
e^{\pi i}+1 =0
\stopformula
\stoptext
so that the output of the tracker is used as a tag for the formula.
Thanks,
Matthias
> On Apr 15, 2025, at 11:39 AM, Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> wrote:
>
> On 4/11/25 18:44, Matthias Weber wrote:
>> [...]
>> The best way(while waiting) seems to be to provide two documents, where
>> the accessible version replaces all images with text that I write, and
>> all formulas with the text that Mikael’s example produces. So my question
>> is just this: how do I make that automatic: have all formulas replaced
>> by a text that reads like a spoken formula?
>
> Sorry for the late comment, but I think an easier solution is adding
> label to provide alternative texts in formulas.
>
> This is required in PDF/UA-1 and afaIk not forbidden in PDF/UA-2.
>
> So, there would be no need to generate an accesible and non-accesible
> version of each document.
>
> Pablo
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-15 16:40 ` Matthias Weber
@ 2025-04-15 19:31 ` Pablo Rodriguez via ntg-context
2025-04-15 22:50 ` Matthias Weber
0 siblings, 1 reply; 26+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-04-15 19:31 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 4/15/25 18:40, Matthias Weber wrote:
> Thanks Pablo,
>
> I don’t understand how to do this.
> [...]
> I would prefer not to have to type out the text of hundreds of formulas
> because ConTeXt does already a pretty good job of converting formulas
> into (machine) readable text.
Matthias,
ConTeXt is doing it automatically, but the alternative text is placed in
a different object as the one tagged as formula.
As soon as the other thread (about alternate text for images) is solved,
I think this would be settled for you.
BTW, I will be away for almost a week, so no testing possible. I don’t
know whether I could check this tomorrow soon.
Many thanks for your patience,
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-15 19:31 ` Pablo Rodriguez via ntg-context
@ 2025-04-15 22:50 ` Matthias Weber
2025-04-16 4:32 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 26+ messages in thread
From: Matthias Weber @ 2025-04-15 22:50 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thanks Pablo, this is excellent news. There is no urgency, but I will be happy to try it out and use it.
Matthias
> On Apr 15, 2025, at 3:31 PM, Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> wrote:
>
> On 4/15/25 18:40, Matthias Weber wrote:
>> Thanks Pablo,
>>
>> I don’t understand how to do this.
>> [...]
>> I would prefer not to have to type out the text of hundreds of formulas
>> because ConTeXt does already a pretty good job of converting formulas
>> into (machine) readable text.
>
> Matthias,
>
> ConTeXt is doing it automatically, but the alternative text is placed in
> a different object as the one tagged as formula.
>
> As soon as the other thread (about alternate text for images) is solved,
> I think this would be settled for you.
>
> BTW, I will be away for almost a week, so no testing possible. I don’t
> know whether I could check this tomorrow soon.
>
> Many thanks for your patience,
>
> Pablo
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-15 22:50 ` Matthias Weber
@ 2025-04-16 4:32 ` Pablo Rodriguez via ntg-context
2025-04-16 22:59 ` Matthias Weber
0 siblings, 1 reply; 26+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-04-16 4:32 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
[-- Attachment #1: Type: text/plain, Size: 2736 bytes --]
On 4/16/25 00:50, Matthias Weber wrote:
> Thanks Pablo, this is excellent news. There is no urgency, but I
> will be happy to try it out and use it.
Matthias,
there is another approach with some cheating that may also work.
The attached PDF document is the compilation from the source below.
First you have to add math tagging in lpdf-tag-imp-testing.lmt (right
after "-- no math here"):
math = { pua = "ua1", pdf = "Formula" },
inlinemath = { pua = "ua1", pdf = "Formula" },
displaymath = { pua = "ua1", pdf = "Formula" },
Then you need to patch lpdf-tag.lmt:
--- lpdf-tag.lmt 2025-04-15 19:44:55.157060209 +0200
+++ mkxl/lpdf-tag.lmt 2025-04-16 06:26:56.731391047 +0200
@@ -1062 +1062 @@
- -- Alt = alternate,
+ Alt = actualtext or nil,
@@ -1064 +1064 @@
- ActualText = actualtext or nil,
+ -- ActualText = actualtext or nil,
@@ -1090 +1090 @@
- -- Alt = alternate,
+ Alt = actualtext or nil,
@@ -1092 +1092 @@
- ActualText = actualtext or nil,
+ -- ActualText = actualtext or nil,
@@ -1141 +1141 @@
- Alt = pdfunicode(label ~= "" and label or "image"),
+ -- Alt = pdfunicode(label ~= "" and label or "image"),
@@ -1142,0 +1143 @@
+ parent.dict.Alt = pdfunicode(label ~= "" and label or "image")
And it should work for PDF/UA-1. Please, don’t forget that I don’t use
math in ConTeXt at all (only for these testings).
Source for the attached PDF document:
\enabledirectives [backend.usetags=testing]
\setupstructure[state=start]
\setupbackend
[format=PDF/A-3a,
intent=sRGB IEC61966-2.1,
level=0]
\setupbackend[format=pdf/ua-1]
\setuptagging[state=start]
\registermathsymbol[default][en]["1D467][the variable]
\registermathsymbol[default][en]["1D458][the index]
\starttext
\startformula
\abs {(z__0 + h)^n - z__0^n }
\alignhere
= \abs {\sum_{k = 1}^n \binom{n}{k} h^k z__0^{n - k} }
\breakhere
= \abs {h \sum_{k = 0}^{n - 1} \binom{n}{k + 1} h^k z__0^{n - 1 - k} }
\breakhere
= \abs {h \sum_{k = 0}^{n - 1} \frac {n}{k + 1} \binom{n - 1}{k} h^k
z__0^{n - 1 - k} }
\breakhere
\le n \abs{h} \sum_{k = 0}^{n - 1} \binom{n - 1}{k} \abs{h}^k
\abs{z__0}^{n - 1 - k}
\breakhere
\le n \abs{h} (\abs{z__0} + \abs{h})^{n - 1}
\stopformula
\registermathsymbol[default][en][lowercasebold][the vector]
\startformula
(\alpha + \beta) \mathbf{u} = \alpha \mathbf{u} + \beta \mathbf{u}
\stopformula
\stoptext
I hope it helps,
Pablo
[-- Attachment #2: tagged-math.pdf --]
[-- Type: application/pdf, Size: 53214 bytes --]
[-- Attachment #3: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-16 4:32 ` Pablo Rodriguez via ntg-context
@ 2025-04-16 22:59 ` Matthias Weber
2025-04-23 17:01 ` Pablo Rodriguez via ntg-context
2025-04-23 18:06 ` Ulrike Fischer
0 siblings, 2 replies; 26+ messages in thread
From: Matthias Weber @ 2025-04-16 22:59 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thanks Pablo,
I managed to patch the files (I don’t have lpdf-tag-imp-testing.lmt but patched lpdf-tag-imp-mkiv.lmt instead, as well as lpdf-tag.lmt),
and Acrobat finds the tags and is able to read the math.
This will need some work, in order to have variables and symbols to be read properly, but it is a very promising beginning.
Matthias
> On Apr 16, 2025, at 12:32 AM, Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> wrote:
>
> On 4/16/25 00:50, Matthias Weber wrote:
>> Thanks Pablo, this is excellent news. There is no urgency, but I
>> will be happy to try it out and use it.
>
> Matthias,
>
> there is another approach with some cheating that may also work.
>
> The attached PDF document is the compilation from the source below.
>
> First you have to add math tagging in lpdf-tag-imp-testing.lmt (right
> after "-- no math here"):
>
> math = { pua = "ua1", pdf = "Formula" },
> inlinemath = { pua = "ua1", pdf = "Formula" },
> displaymath = { pua = "ua1", pdf = "Formula" },
>
> Then you need to patch lpdf-tag.lmt:
>
> --- lpdf-tag.lmt 2025-04-15 19:44:55.157060209 +0200
> +++ mkxl/lpdf-tag.lmt 2025-04-16 06:26:56.731391047 +0200
> @@ -1062 +1062 @@
> - -- Alt = alternate,
> + Alt = actualtext or nil,
> @@ -1064 +1064 @@
> - ActualText = actualtext or nil,
> + -- ActualText = actualtext or nil,
> @@ -1090 +1090 @@
> - -- Alt = alternate,
> + Alt = actualtext or nil,
> @@ -1092 +1092 @@
> - ActualText = actualtext or nil,
> + -- ActualText = actualtext or nil,
> @@ -1141 +1141 @@
> - Alt = pdfunicode(label ~= "" and label or "image"),
> + -- Alt = pdfunicode(label ~= "" and label or "image"),
> @@ -1142,0 +1143 @@
> + parent.dict.Alt = pdfunicode(label ~= "" and label or "image")
>
> And it should work for PDF/UA-1. Please, don’t forget that I don’t use
> math in ConTeXt at all (only for these testings).
>
> Source for the attached PDF document:
>
> \enabledirectives [backend.usetags=testing]
> \setupstructure[state=start]
> \setupbackend
> [format=PDF/A-3a,
> intent=sRGB IEC61966-2.1,
> level=0]
> \setupbackend[format=pdf/ua-1]
>
> \setuptagging[state=start]
>
> \registermathsymbol[default][en]["1D467][the variable]
> \registermathsymbol[default][en]["1D458][the index]
>
> \starttext
> \startformula
> \abs {(z__0 + h)^n - z__0^n }
> \alignhere
> = \abs {\sum_{k = 1}^n \binom{n}{k} h^k z__0^{n - k} }
> \breakhere
> = \abs {h \sum_{k = 0}^{n - 1} \binom{n}{k + 1} h^k z__0^{n - 1 - k} }
> \breakhere
> = \abs {h \sum_{k = 0}^{n - 1} \frac {n}{k + 1} \binom{n - 1}{k} h^k
> z__0^{n - 1 - k} }
> \breakhere
> \le n \abs{h} \sum_{k = 0}^{n - 1} \binom{n - 1}{k} \abs{h}^k
> \abs{z__0}^{n - 1 - k}
> \breakhere
> \le n \abs{h} (\abs{z__0} + \abs{h})^{n - 1}
> \stopformula
>
> \registermathsymbol[default][en][lowercasebold][the vector]
>
> \startformula
> (\alpha + \beta) \mathbf{u} = \alpha \mathbf{u} + \beta \mathbf{u}
> \stopformula
>
> \stoptext
>
> I hope it helps,
>
> Pablo
> <tagged-math.pdf>___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-16 22:59 ` Matthias Weber
@ 2025-04-23 17:01 ` Pablo Rodriguez via ntg-context
2025-04-23 18:06 ` Ulrike Fischer
1 sibling, 0 replies; 26+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-04-23 17:01 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 4/17/25 00:59, Matthias Weber wrote:
> Thanks Pablo,
Hi Matthias,
> I managed to patch the files (I don’t have lpdf-tag-imp-testing.lmt
I attached it to the other thread (about alternate text for images,
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/YEWPKPJSPTGL7YG7HCDZJTDJA462ADQP/attachment/4/lpdf-tag-imp-testing.lmt).
> but patched lpdf-tag-imp-mkiv.lmt instead, as well as lpdf-tag.lmt), and
> Acrobat finds the tags and is able to read the math.
Do as you see it fits, but it might be better to have a testing file, to
avoid modifying (and having issues with) the distribution files.
> This will need some work, in order to have variables and symbols to
> be read properly, but it is a very promising beginning.
I’m afraid I cannot help there. Math is all Greek to me.
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-16 22:59 ` Matthias Weber
2025-04-23 17:01 ` Pablo Rodriguez via ntg-context
@ 2025-04-23 18:06 ` Ulrike Fischer
2025-04-24 15:38 ` Pablo Rodriguez via ntg-context
1 sibling, 1 reply; 26+ messages in thread
From: Ulrike Fischer @ 2025-04-23 18:06 UTC (permalink / raw)
To: ntg-context
Am Wed, 16 Apr 2025 18:59:42 -0400 schrieb Matthias Weber:
> Thanks Pablo,
>
> I managed to patch the files (I don’t have lpdf-tag-imp-testing.lmt but patched lpdf-tag-imp-mkiv.lmt instead, as well as lpdf-tag.lmt),
> and Acrobat finds the tags and is able to read the math.
> This will need some work, in order to have variables and symbols to be read properly, but it is a very promising beginning.
You should be aware that while alt is better than nothing, it has
lots of problems. E.g. for braille displays it is typically much too
verbose.
There is nice presentation from Neil Soiffer here that demonstrate
the benefits of mathml:
https://www.youtube.com/watch?v=ja7gjDCN8n8&t=1201s
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-23 18:06 ` Ulrike Fischer
@ 2025-04-24 15:38 ` Pablo Rodriguez via ntg-context
2025-04-25 8:32 ` Ulrike Fischer
0 siblings, 1 reply; 26+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-04-24 15:38 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 4/23/25 20:06, Ulrike Fischer wrote:
> [...]
> You should be aware that while alt is better than nothing, it has
> lots of problems. E.g. for braille displays it is typically much too
> verbose.
Many thanks for your comment, Ulrike.
I thought that PDF/UA-1 didn’t allow (or at least, require) mathml.
> There is nice presentation from Neil Soiffer here that demonstrate
> the benefits of mathml:
>
> https://www.youtube.com/watch?v=ja7gjDCN8n8&t=1201s
Interesting to know that Adobe funded PDF accessibility in LaTeX
(https://youtubenuker.lol/watch?v=ja7gjDCN8n8&t=1600).
Many thanks for your help,
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-24 15:38 ` Pablo Rodriguez via ntg-context
@ 2025-04-25 8:32 ` Ulrike Fischer
2025-04-26 20:23 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 26+ messages in thread
From: Ulrike Fischer @ 2025-04-25 8:32 UTC (permalink / raw)
To: ntg-context
Am Thu, 24 Apr 2025 17:38:26 +0200 schrieb Pablo Rodriguez via
ntg-context:
>> You should be aware that while alt is better than nothing, it has
>> lots of problems. E.g. for braille displays it is typically much too
>> verbose.
>
> Many thanks for your comment, Ulrike.
>
> I thought that PDF/UA-1 didn’t allow (or at least, require) mathml.
Yes, PDF/UA-1 is basically unusable for sensible math tagging.
If you really want to produce accessible math (and not only fool
some validator) then you should use PDF 2.0 and UA-2 and MathML
(either as structure elements or as associated file on the Formula
tag).
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-25 8:32 ` Ulrike Fischer
@ 2025-04-26 20:23 ` Pablo Rodriguez via ntg-context
2025-04-26 20:58 ` Ulrike Fischer
0 siblings, 1 reply; 26+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-04-26 20:23 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 4/25/25 10:32, Ulrike Fischer wrote:
> Am Thu, 24 Apr 2025 17:38:26 +0200 schrieb Pablo Rodriguez via
> ntg-context:
>> [...]
>> I thought that PDF/UA-1 didn’t allow (or at least, require) mathml.
>
> Yes, PDF/UA-1 is basically unusable for sensible math tagging.
>
> If you really want to produce accessible math (and not only fool
> some validator) then you should use PDF 2.0 and UA-2 and MathML
> (either as structure elements or as associated file on the Formula
> tag).
Many thanks for your reply, Ulrike,
the issue I see is that we don’t have PDF/A-4f for PDF/UA-2, so there
would be no way to use images with math.
That being said, I have just discovered that there is an associated file
for all math content in both PDF/UA-1 and PDF/UA-2 (although it has
other problems in PDF/UA-2).
Many thanks for your help,
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-26 20:23 ` Pablo Rodriguez via ntg-context
@ 2025-04-26 20:58 ` Ulrike Fischer
2025-04-26 22:30 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 26+ messages in thread
From: Ulrike Fischer @ 2025-04-26 20:58 UTC (permalink / raw)
To: ntg-context
Am Sat, 26 Apr 2025 22:23:12 +0200 schrieb Pablo Rodriguez via
ntg-context:
> Many thanks for your reply, Ulrike,
>
> the issue I see is that we don’t have PDF/A-4f for PDF/UA-2, so there
> would be no way to use images with math.
Sorry I have no idea what you mean. What has A-4f to do with image
with math?
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-26 20:58 ` Ulrike Fischer
@ 2025-04-26 22:30 ` Pablo Rodriguez via ntg-context
2025-04-27 7:39 ` Hans Hagen via ntg-context
0 siblings, 1 reply; 26+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-04-26 22:30 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 4/26/25 22:58, Ulrike Fischer wrote:
> Am Sat, 26 Apr 2025 22:23:12 +0200 schrieb Pablo Rodriguez via
> ntg-context:
>
>> Many thanks for your reply, Ulrike,
>>
>> the issue I see is that we don’t have PDF/A-4f for PDF/UA-2, so there
>> would be no way to use images with math.
>
> Sorry I have no idea what you mean. What has A-4f to do with image
> with math?
Sorry, my fault at least in the explanation.
For some strange reason (I don’t know whether this is intended), I
always get PDF/A-3a when asking only for PDF/UA-2 in ConTeXt.
Because of this, I thought color profiles required PDF/A in PDF/UA.
Sorry for the noise,
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-26 22:30 ` Pablo Rodriguez via ntg-context
@ 2025-04-27 7:39 ` Hans Hagen via ntg-context
2025-04-27 9:54 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 26+ messages in thread
From: Hans Hagen via ntg-context @ 2025-04-27 7:39 UTC (permalink / raw)
To: Pablo Rodriguez via ntg-context; +Cc: Hans Hagen
On 4/27/2025 12:30 AM, Pablo Rodriguez via ntg-context wrote:
> On 4/26/25 22:58, Ulrike Fischer wrote:
>> Am Sat, 26 Apr 2025 22:23:12 +0200 schrieb Pablo Rodriguez via
>> ntg-context:
>>
>>> Many thanks for your reply, Ulrike,
>>>
>>> the issue I see is that we don’t have PDF/A-4f for PDF/UA-2, so there
>>> would be no way to use images with math.
>>
>> Sorry I have no idea what you mean. What has A-4f to do with image
>> with math?
>
> Sorry, my fault at least in the explanation.
>
> For some strange reason (I don’t know whether this is intended), I
> always get PDF/A-3a when asking only for PDF/UA-2 in ConTeXt.
>
> Because of this, I thought color profiles required PDF/A in PDF/UA.
A few weeks ago Mikael and I looked into the A4 standard(s) and added
those so for 2.0 we (sort of) default to those. We just didn't upload a
new distribuition yet (read: moved on to more interesting things than
standards). In the process color profile handling was also adapted,
hopefully a bit less visible for users who care little but still want to
validate.
I'll probaly do an upload today or tomorrow (the usual end of april one).
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-27 7:39 ` Hans Hagen via ntg-context
@ 2025-04-27 9:54 ` Pablo Rodriguez via ntg-context
2025-04-27 10:02 ` Hans Hagen
0 siblings, 1 reply; 26+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2025-04-27 9:54 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 4/27/25 09:39, Hans Hagen via ntg-context wrote:
>
> A few weeks ago Mikael and I looked into the A4 standard(s) and added
> those so for 2.0 we (sort of) default to those. We just didn't upload a
> new distribuition yet (read: moved on to more interesting things than
> standards). In the process color profile handling was also adapted,
> hopefully a bit less visible for users who care little but still want to
> validate.
Many thanks for your reply, Hans.
These are really good news (maybe some subcolummsets related stuff,
taking place BachoTeX in a few days?) .
> I'll probaly do an upload today or tomorrow (the usual end of april one).
Looking forward having these new upload.
Many thanks for your help and your work,
Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
* [NTG-context] Re: Tagging Math
2025-04-27 9:54 ` Pablo Rodriguez via ntg-context
@ 2025-04-27 10:02 ` Hans Hagen
0 siblings, 0 replies; 26+ messages in thread
From: Hans Hagen @ 2025-04-27 10:02 UTC (permalink / raw)
To: Pablo Rodriguez via ntg-context
On 4/27/2025 11:54 AM, Pablo Rodriguez via ntg-context wrote:
> These are really good news (maybe some subcolummsets related stuff,
> taking place BachoTeX in a few days?) .
indeed, among other 'new' things
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2025-04-27 10:06 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-10 17:11 [NTG-context] Tagging Math Matthias Weber
2025-04-10 18:20 ` [NTG-context] " Mikael Sundqvist
2025-04-10 19:02 ` Matthias Weber
2025-04-11 10:53 ` Ulrike Fischer
2025-04-11 12:12 ` Matthias Weber
2025-04-11 15:47 ` Hans Hagen via ntg-context
2025-04-11 16:44 ` Matthias Weber
2025-04-11 17:53 ` Hans Hagen via ntg-context
2025-04-11 18:38 ` Matthias Weber
2025-04-12 2:33 ` Aditya Mahajan
2025-04-15 15:39 ` Pablo Rodriguez via ntg-context
2025-04-15 16:40 ` Matthias Weber
2025-04-15 19:31 ` Pablo Rodriguez via ntg-context
2025-04-15 22:50 ` Matthias Weber
2025-04-16 4:32 ` Pablo Rodriguez via ntg-context
2025-04-16 22:59 ` Matthias Weber
2025-04-23 17:01 ` Pablo Rodriguez via ntg-context
2025-04-23 18:06 ` Ulrike Fischer
2025-04-24 15:38 ` Pablo Rodriguez via ntg-context
2025-04-25 8:32 ` Ulrike Fischer
2025-04-26 20:23 ` Pablo Rodriguez via ntg-context
2025-04-26 20:58 ` Ulrike Fischer
2025-04-26 22:30 ` Pablo Rodriguez via ntg-context
2025-04-27 7:39 ` Hans Hagen via ntg-context
2025-04-27 9:54 ` Pablo Rodriguez via ntg-context
2025-04-27 10:02 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).