From: Hans Hagen <pragma@wxs.nl>
Subject: Re: MathML <mover> element for accents?
Date: Tue, 09 Nov 2004 14:59:57 +0100 [thread overview]
Message-ID: <4190CD5D.2030506@wxs.nl> (raw)
In-Reply-To: <41909449.6060502@capdm.com>
Duncan Hothersall wrote:
> Hello ConTeXters.
>
> I am using the wonderful ability of ConTeXt to directly typeset MathML
> equations, and have come across a problem with trying to put a line
> above a character using the <mover> element. Here's what I try:
>
> \setuppagenumbering[state=stop]
> \starttext
> \startXMLdata
> <math display="block">
> <mover accent="true">
> <mi>x</mi>
> <mo>¯</mo>
> </mover>
> </math>
> \stopXMLdata
> \stoptext
>
> The output I get is as if the accent="true" attribute wasn't set - i.e.
> the line is a long way above the x, not like an accent.
>
> Is there another way to place math accents in presentational MathML?
>
> My versions:
> TeXVersion 0.1 / Taco Hoekwater 2004
> texexec : TeXExec 4.4 - ConTeXt / PRAGMA ADE 1997-2004
> texutil : TeXUtil 8.2 - ConTeXt / PRAGMA ADE 1992-2004
> tex : pdfeTeXk, 3.141592-1.11a-2.1 (Web2C 7.5.2)
> context : ver: 2004.8.15
> cont-en : ver: 2004.8.15 fmt: 2004.8.22 mes: english
>
> (PS (Patrick) - I tried to get a minimal file working on
> live.contextgarden but couldn't get any maths formatting to come out.
> Perhaps MathML support is not enabled there?)
\starttext
\usemodule[mathml] \useXMLfilter[utf]
\unprotect
\remapXMLsequence [mover] [CPA] \MMLpOVER
\remapXMLsequence [munder] [CPA] \MMLpUNDER
\def\MMLpUNDER#1#2%
{\getXMLarguments{munder}{accent="false" #1}%
\withnexttwoXMLRelements\doMMLpUNDER#2}
\def\MMLpOVER#1#2%
{\getXMLarguments{mover}{accent="false" #1}%
\withnexttwoXMLRelements\doMMLpOVER #2}
\def\doMMLpUNDER
{\doifelse{\XMLpar{munder}{accent}{}}{true}
{\secondXMLRelement\firstXMLRelement}
{\mathop{\vtop{\m@th\ialign{\hss##\hss\crcr
\disabledelimiter\doMMLfiller\firstXMLRelement
\crcr\noalign{\kern3\p@\nointerlineskip}%
\disabledelimiter\doMMLfiller\secondXMLRelement
\crcr\noalign{\kern3\p@}}}}\limits}}
\def\doMMLpOVER
{\doifelse{\XMLpar{mover}{accent}{}}{true}
{\secondXMLRelement\firstXMLRelement}
{\mathop{\vbox{\m@th\ialign{\hss##\hss\crcr\noalign{\kern3\p@}%
\disabledelimiter\doMMLfiller\secondXMLRelement
\crcr\noalign{\kern3\p@\nointerlineskip}%
\disabledelimiter\doMMLfiller\firstXMLRelement
\crcr}}}\limits}}
\protect
% \useXMLfilter[mea,meb,mec,meh,men,meo,mer]
% \useXMLfilter[mxa,mxb,mxc,mxh,mxn,mxo,mxr]
Normal: \startXMLdata<math><mover
><mi>a</mi><mo>¯</mo></mover></math>\stopXMLdata \par
Accent: \startXMLdata<math><mover
accent="true"><mi>x</mi><mo>¯</mo></mover></math>\stopXMLdata \par
\stoptext
now, the problem is that this funny char between <mo></mo> has to become a math
accent, so what is the code? (name) someplace we need to handle that kind of things
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
next prev parent reply other threads:[~2004-11-09 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-09 9:56 Duncan Hothersall
2004-11-09 13:59 ` Hans Hagen [this message]
2004-11-09 16:09 ` Patrick Gundlach
[not found] <20041110110003.333341278D@ronja.ntg.nl>
2004-11-10 11:17 ` Duncan Hothersall
2004-11-10 11:18 ` Duncan Hothersall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4190CD5D.2030506@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).