ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Accents in MathML
       [not found] <20050526100002.E69D8127D0@ronja.ntg.nl>
@ 2005-05-26 15:06 ` Duncan Hothersall
  2005-05-28 13:33   ` James Cloos
  0 siblings, 1 reply; 2+ messages in thread
From: Duncan Hothersall @ 2005-05-26 15:06 UTC (permalink / raw)


I said:

> Interestingly, if I forget about unicode and use &eacute; instead of é,
> then no matter what I put in the preamble I get the e with a guillemot
> superimposed. So whatever is mapping é incorrectly seems also to be
> mapping &eacute; incorrectly.

Further testing suggests that my problem is this:

Between \startXMLdata and \stopXMLdata, where MathML is being parsed
directly by ConTeXt, I get the wrong results for accented characters
within <mtext> elements. For example, I get an e character with a
guillemot superimposed on top when I want an e with an acute accent. It
doesn't seem to matter whether the markup is unicode é, the entity
&eacute;, or the command \eacute.

Similar problems happen with other accents I have tried. In the case of
  ñ the accent is almost right but comes out too big (looks like the
maths version of the accent?).

The following is my local test file, using unicode and comparing running
text to <mtext> in MathML:

--
\mainlanguage[es]\enableregime[utf]\useencoding[uc]
\usemodule[mathml]\setupoutput[pdftex]
\starttext
Situación niños volúmenes sí interés:
\startXMLdata <formula><math><mfrac><mrow><mtext>Situación niños
volúmenes</mtext></mrow><mrow><mtext>sí
interés</mtext></mrow></mfrac></math></formula>\stopXMLdata
\stoptext
--

The following is a non-unicode test file that will process on Live and
exhibits the same errors in the MathML accent rendering. It uses entity
references instead of unicode in the MathML, but because they map to the
same thing the output is the same:

--
\mainlanguage[es]\enableregime[utf]\useencoding[uc]
\usemodule[mathml]\setupoutput[pdftex]
\starttext
\startXMLdata <formula><math><mfrac><mrow><mtext>Situaci&oacute;n
ni&ntilde;os vol&uacute;menes</mtext></mrow><mrow><mtext>s&iacute;
inter&eacute;s</mtext></mrow></mfrac></math></formula>\stopXMLdata
\stoptext
--

I have a feeling I have made this more complex than it needed to be, but
can anyone shed light on how to fix it?

Thanks,

Duncan

PS Apologies for the nonsense Spanish content - it's just random words
with accents.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Re: Accents in MathML
  2005-05-26 15:06 ` Accents in MathML Duncan Hothersall
@ 2005-05-28 13:33   ` James Cloos
  0 siblings, 0 replies; 2+ messages in thread
From: James Cloos @ 2005-05-28 13:33 UTC (permalink / raw)


I gave the original snippit a test.

The mail was in latin1, so I had to convert the file to utf8.
Once I did that texexec and dvips processed it w/o error.
The resulting postscript had the correct accent.

The relevant chunk of the postscript is:

%%Page: 1 1
TeXDict begin 1 0 bop 1738 77 a Fa(1)-9 563 y(Maths)33
b(with)g(accen)m(ts:)1622 773 y(in)m(ter)m(\023)-46 b(es)p
eop end
%%Trailer

Where you can see that the acute (\023) was overlapped
on the suceeding e, rather than using a precomposed é.

This is on a gentoo linux¹ box w/ tetex-3.0.

-JimC

¹ Have to add that now that gentoo has bsd and osx support. :)

-- 
James H. Cloos, Jr. <cloos@jhcloos.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-28 13:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20050526100002.E69D8127D0@ronja.ntg.nl>
2005-05-26 15:06 ` Accents in MathML Duncan Hothersall
2005-05-28 13:33   ` James Cloos

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).