MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Copy As MathML Weirdness

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102016] Copy As MathML Weirdness
  • From: Helen Read <hpr at together.net>
  • Date: Sun, 26 Jul 2009 03:57:24 -0400 (EDT)
  • Reply-to: HPR <read at math.uvm.edu>

I sometimes make up quiz questions, solutions, etc. in Mathematica and 
paste into a Word document. I like the ability to copy as MathML 
directly into Word 2007, which is very handy for copying functions, 
integrals, etc. into Word. However, I have noticed some odd behavior 
when copying decimal values out of Mathematica into Word as MathML. 
Sometimes the pasted values in Word are rounded differently than they 
were in Mathematica, or truncated rather than rounded, or just plain 
rounded incorrectly.

Here is an example to illustrate. Try evaluating the following two grids 
in Mathematica, then select the output, Copy As MathML, and paste into 
Word 2007 if you have it.

Grid[Table[{x, N[Sin[x], 5]}, {x, 0, 3, 1/2}], Frame -> All]

Grid[Table[{x, N[Sin[x], 10]}, {x, 0, 3, 1/2}], Frame -> All]

Compare the values in Mathematica's output with the values pasted into 
Word. Some look the same, others not. I have observed this behavior in 
Vista and XP.

Copying the output into a text cell in Mathematica (which I would have 
thought converts everything into strings) before copy/paste as MathML 
into Word does not help any, and the behavior seems specific to copying 
as MathML. If you copy/paste the "normal" way (as text), the numerical 
values paste into Word correctly -- but of course, you lose all the 
formatting.

Another little thing: I use Grid all the time, with Frame->All, and wish 
that the frame copied along with the Grid when copying as MathML into 
another application.

-- 
Helen Read
University of Vermont


  • Prev by Date: Re: Optimize evaluation of symbolic expressions
  • Next by Date: Re: solving a system of two equations
  • Previous by thread: Export
  • Next by thread: Mathematica Animations by High School Students