* mathcolor attribute in MathML (mkiv)
@ 2021-05-27 15:47 Duncan Hothersall
2021-05-27 16:18 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Duncan Hothersall @ 2021-05-27 15:47 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 304 bytes --]
Hello list.
I'm trying to use colour in some MathML formulae using the mathcolor
attribute. It seems to have no effect on the output. I can
see \applymmlmathcolor in the x-mathml.mkiv source but I can't see how to
make it work. Does anyone have any pointers?
(Does lmtx support this?)
Thanks.
Duncan
[-- Attachment #1.2: Type: text/html, Size: 743 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mathcolor attribute in MathML (mkiv)
2021-05-27 15:47 mathcolor attribute in MathML (mkiv) Duncan Hothersall
@ 2021-05-27 16:18 ` Hans Hagen
2021-05-27 16:30 ` Duncan Hothersall
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2021-05-27 16:18 UTC (permalink / raw)
To: mailing list for ConTeXt users, Duncan Hothersall
On 5/27/2021 5:47 PM, Duncan Hothersall wrote:
> Hello list.
>
> I'm trying to use colour in some MathML formulae using the mathcolor
> attribute. It seems to have no effect on the output. I can
> see \applymmlmathcolor in the x-mathml.mkiv source but I can't see how
> to make it work. Does anyone have any pointers?
>
> (Does lmtx support this?)
MWE needed
-----------------------------------------------------------------
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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mathcolor attribute in MathML (mkiv)
2021-05-27 16:18 ` Hans Hagen
@ 2021-05-27 16:30 ` Duncan Hothersall
2021-05-27 17:00 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Duncan Hothersall @ 2021-05-27 16:30 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1117 bytes --]
Apologies Hans.
MWE:
\usemodule[newmml]
\starttext
\xmlprocessdata{}{<formula>
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<mi>E</mi>
<mfenced>
<mo mathcolor="red">π</mo>
</mfenced>
</math>
</formula>}{}
\stoptext
The π symbol does not show in red.
Duncan
On Thu, 27 May 2021 at 17:18, Hans Hagen <j.hagen@xs4all.nl> wrote:
> On 5/27/2021 5:47 PM, Duncan Hothersall wrote:
> > Hello list.
> >
> > I'm trying to use colour in some MathML formulae using the mathcolor
> > attribute. It seems to have no effect on the output. I can
> > see \applymmlmathcolor in the x-mathml.mkiv source but I can't see how
> > to make it work. Does anyone have any pointers?
> >
> > (Does lmtx support this?)
> MWE needed
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>
[-- Attachment #1.2: Type: text/html, Size: 2293 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mathcolor attribute in MathML (mkiv)
2021-05-27 16:30 ` Duncan Hothersall
@ 2021-05-27 17:00 ` Hans Hagen
2021-05-27 17:07 ` Duncan Hothersall
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2021-05-27 17:00 UTC (permalink / raw)
To: Duncan Hothersall; +Cc: mailing list for ConTeXt users
On 5/27/2021 6:30 PM, Duncan Hothersall wrote:
> Apologies Hans.
>
> MWE:
>
> \usemodule[newmml]
> \starttext
> \xmlprocessdata{}{<formula>
> <math xmlns='http://www.w3.org/1998/Math/MathML
> <http://www.w3.org/1998/Math/MathML>'>
> <mi>E</mi>
> <mfenced>
> <mo mathcolor="red">π</mo>
> </mfenced>
> </math>
> </formula>}{}
> \stoptext
>
> The π symbol does not show in red.
Kind of trivial ... i'll send you a patched module.
If you want you can check with the standard and see where we need to add
it. I'll then adapt the mkiv file before taking a look at upgrading the
lmtx one.
For decades this mathml stuff has been a bit of a pain, because when one
uses it for a mixed web / text project one always needs to satisfy the
latest greatest either or not bugged web rendering, it disappearing from
browsers, coming back, rendered remote or in the browser, mixed
(in/with) asciimath which has its own tweaks. A pitty that content
mathml never took off, probbably also due to the failure of openmath
which took away attention from it and that we actually sort of
support(ed). So when it comes to (reasonable quality) rendering in print
one always runs a bit behind.
I'm also always a bit hesitant to touch the code because it's actually
used by a collegue in some (zero budget, so me looking at the mml is
just hobbying) projects concerning math school books where often the web
part controls the limitations and enforces weird coding (tens of
thousands of files with plenty mathml). Btw, especially symbols are a
mess and interfere with assumed structure, so that's always tricky to
touch. Especially when you want to have it specific for (mid/high)
school math.
But anyway things like a bit of color and so are not that hard to
support (more a matter of making sure performance is not hit).
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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mathcolor attribute in MathML (mkiv)
2021-05-27 17:00 ` Hans Hagen
@ 2021-05-27 17:07 ` Duncan Hothersall
0 siblings, 0 replies; 5+ messages in thread
From: Duncan Hothersall @ 2021-05-27 17:07 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 3292 bytes --]
Understood and appreciated, Hans, and many thanks for the patch which I
will be testing shortly.
Completely agree re the real world of MathML. We are still converting our
MathML masters to other formats after many years for various uses and fixes
because of the situation you describe with patchy and dodgy support
especially in the browser world. Maths on the web is still a little bit
wild west.
Thanks again.
Duncan
On Thu, 27 May 2021 at 18:00, Hans Hagen <j.hagen@xs4all.nl> wrote:
> On 5/27/2021 6:30 PM, Duncan Hothersall wrote:
> > Apologies Hans.
> >
> > MWE:
> >
> > \usemodule[newmml]
> > \starttext
> > \xmlprocessdata{}{<formula>
> > <math xmlns='http://www.w3.org/1998/Math/MathML
> > <http://www.w3.org/1998/Math/MathML>'>
> > <mi>E</mi>
> > <mfenced>
> > <mo mathcolor="red">π</mo>
> > </mfenced>
> > </math>
> > </formula>}{}
> > \stoptext
> >
> > The π symbol does not show in red.
> Kind of trivial ... i'll send you a patched module.
>
> If you want you can check with the standard and see where we need to add
> it. I'll then adapt the mkiv file before taking a look at upgrading the
> lmtx one.
>
> For decades this mathml stuff has been a bit of a pain, because when one
> uses it for a mixed web / text project one always needs to satisfy the
> latest greatest either or not bugged web rendering, it disappearing from
> browsers, coming back, rendered remote or in the browser, mixed
> (in/with) asciimath which has its own tweaks. A pitty that content
> mathml never took off, probbably also due to the failure of openmath
> which took away attention from it and that we actually sort of
> support(ed). So when it comes to (reasonable quality) rendering in print
> one always runs a bit behind.
>
> I'm also always a bit hesitant to touch the code because it's actually
> used by a collegue in some (zero budget, so me looking at the mml is
> just hobbying) projects concerning math school books where often the web
> part controls the limitations and enforces weird coding (tens of
> thousands of files with plenty mathml). Btw, especially symbols are a
> mess and interfere with assumed structure, so that's always tricky to
> touch. Especially when you want to have it specific for (mid/high)
> school math.
>
> But anyway things like a bit of color and so are not that hard to
> support (more a matter of making sure performance is not hit).
>
> 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
> -----------------------------------------------------------------
>
--
Duncan Hothersall, Operations Director
CAPDM Limited - Online Program Enablers
0131 677 2400 www.capdm.com
Registered in Scotland: SC168970 VAT: 682 846 983
Registered address: 20 Forth Street Edinburgh EH1 3LH UK
<https://maps.google.com/?q=22+Forth+Street,+Edinburgh,+EH1+3LH,+UK&entry=gmail&source=g>
Capture, author, publish, deliver and manage your learning materials.
*Sign up to the CAPDM newsletter here <http://eepurl.com/bqzBQn>*
[-- Attachment #1.2: Type: text/html, Size: 5009 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-05-27 17:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27 15:47 mathcolor attribute in MathML (mkiv) Duncan Hothersall
2021-05-27 16:18 ` Hans Hagen
2021-05-27 16:30 ` Duncan Hothersall
2021-05-27 17:00 ` Hans Hagen
2021-05-27 17:07 ` Duncan Hothersall
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).