ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Two further MathML queries
@ 2005-06-22 20:33 Duncan Hothersall
  2005-06-22 20:48 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Duncan Hothersall @ 2005-06-22 20:33 UTC (permalink / raw)


Thanks a million Hans. I guess my only issue now is displaying spaces 
within text inside what I used to have as <mtext>, but that can be done 
explicitly with <mspace> elements for the time being.

Thanks for taking the time to understand and solve.

Duncan

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

* Re: Two further MathML queries
  2005-06-22 20:33 Two further MathML queries Duncan Hothersall
@ 2005-06-22 20:48 ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2005-06-22 20:48 UTC (permalink / raw)


Duncan Hothersall wrote:
> Thanks a million Hans. I guess my only issue now is displaying spaces 
> within text inside what I used to have as <mtext>, but that can be done 
> explicitly with <mspace> elements for the time being.
> 
> Thanks for taking the time to understand and solve.

btw, can you add your test/example code to the wiki (mathml corner; we can also 
collect wishes there)?

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

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

* Re: Two further MathML queries
  2005-06-22 10:22 Duncan Hothersall
  2005-06-22 18:38 ` Hans Hagen
  2005-06-22 19:02 ` Hans Hagen
@ 2005-06-22 19:43 ` Hans Hagen
  2 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2005-06-22 19:43 UTC (permalink / raw)


Duncan Hothersall wrote:

> #1 Inline MathML has a wide space before, and no space after.

the space before is a bug: in xtag-ini, locate:

.unexpanded.def<B.doXMLelementE*

and add the * (comment token) which prevents the spurious space. (interesting 
that this went unnoticed so long)

the space after ... well, it took me a while to notice that this is expected 
behaviour (space after \stopXMLdata is naturally gobbled):

MathML aligns \startXMLdata<imath><mi>x</mi></imath>\stopXMLdata\space
squashed to the right.\par

\startbuffer
MathML aligns <imath><ci>x</ci></imath> squashed to the right.
\stopbuffer

\processXMLbuffer

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

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

* Re: Two further MathML queries
  2005-06-22 10:22 Duncan Hothersall
  2005-06-22 18:38 ` Hans Hagen
@ 2005-06-22 19:02 ` Hans Hagen
  2005-06-22 19:43 ` Hans Hagen
  2 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2005-06-22 19:02 UTC (permalink / raw)


Duncan Hothersall wrote:

> #2 Display MathML doesn't reduce font size for <mtext> content such as 
> fractions within fractions.

mtext is a hbox; try

$$\frac{\frac{\hbox{\rm Q}}{\hbox{\rm P}}}{\hbox{\rm R}}$$

in mml we have:

startXMLdata
<formula>
     <dmath>
         <mfrac>
             <mrow>
                 <mfrac>
                     <mrow>
                         <mi mathvariant='normal'>R</mi>
                     </mrow>
                     <mrow>
                         <mi mathvariant='normal'>P</mi>
                     </mrow>
                 </mfrac>
             </mrow>
             <mrow>
                 <mi mathvariant='normal'>R</mi>
             </mrow>
         </mfrac>
     </dmath>
</formula>
\stopXMLdata

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

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

* Re: Two further MathML queries
  2005-06-22 10:22 Duncan Hothersall
@ 2005-06-22 18:38 ` Hans Hagen
  2005-06-22 19:02 ` Hans Hagen
  2005-06-22 19:43 ` Hans Hagen
  2 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2005-06-22 18:38 UTC (permalink / raw)


Duncan Hothersall wrote:

> I have done a fair bit of source- and archive-surfing on both these but 
> no luck. Many thanks for any help.

hm i need to take a closer look; now you know why i favor content mml over 
presentation mml -)

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

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

* Two further MathML queries
@ 2005-06-22 10:22 Duncan Hothersall
  2005-06-22 18:38 ` Hans Hagen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Duncan Hothersall @ 2005-06-22 10:22 UTC (permalink / raw)


Apologies for all the MathML queries. Here are two more, embedded in one 
test file which will run on live.contextgarden.net:

--
\usemodule[mathml]
\setupwhitespace[medium]
\starttext
\TeX{} maths aligns $x$ well.\par
MathML aligns 
\startXMLdata<imath><math><mi>x</mi></math></imath>\stopXMLdata squashed 
to the right.\par
Also:\par
\TeX{} display maths makes text go smaller for fractions inside fractions:
$${{\rm Q}\over{\rm P}}\over{\rm R}$$
I'd like the same to happen for MathML:
\startXMLdata <formula><math><mfrac><mrow>
<mfrac><mrow><mtext>Q</mtext></mrow><mrow><mtext>P</mtext></mrow></mfrac></mrow>
<mrow><mtext>R</mtext></mrow></mfrac></math></formula>\stopXMLdata
\stoptext
--

In summary:

#1 Inline MathML has a wide space before, and no space after.

#2 Display MathML doesn't reduce font size for <mtext> content such as 
fractions within fractions.

I have done a fair bit of source- and archive-surfing on both these but 
no luck. Many thanks for any help.

Duncan

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

end of thread, other threads:[~2005-06-22 20:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-22 20:33 Two further MathML queries Duncan Hothersall
2005-06-22 20:48 ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2005-06-22 10:22 Duncan Hothersall
2005-06-22 18:38 ` Hans Hagen
2005-06-22 19:02 ` Hans Hagen
2005-06-22 19:43 ` 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).