MathGroup Archive 2010

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

Search the Archive

Corruption of formulas after cut-and-paste

  • To: mathgroup at
  • Subject: [mg109989] Corruption of formulas after cut-and-paste
  • From: Yen Lee Loh <yloh at>
  • Date: Thu, 27 May 2010 06:46:21 -0400 (EDT)

A warning to people who are trying to write packages: Cut and paste may
corrupt formulas, especially if they use complicated typesetting.  (My
version: Mathematica, Linux x86-64)

Example:  Open a notebook in Mathematica (e.g., a .nb file) and type

   f[x_] := x -----;

This is interpreted as "negative half x".  Now, open a new package and paste
in that definition.  The formatting is preserved.  Save the package as an .m
file.  Reload it.  Now you have

   f[x_]:=x -1/2;

which is interpreted as "x minus half".  Not good.

I didn't see any of the usual warnings about "converting to
TraditionalForm/StandardForm/paste literally" etc.

Maybe I am doing something wrong.  Anyway, I have to try to find a
workaround.  -YLL

Yen Lee Loh
Postdoctoral Associate, The Ohio State University
Home: 544 Stinchcomb Dr Apt 10, Columbus OH 43202-1728, USA
Office: 2043 Physics Research Building, 191 W Woodruff Ave, Columbus OH
43210-1117, USA
Office phone: +1 614 247 4772
Mobile phone: +1 765 532 9457
Email: yloh at

  • Prev by Date: Re: Dot product confusion
  • Next by Date: "Simplifying" expressions to not expand user-defined functions
  • Previous by thread: Re: Integrate expression
  • Next by thread: Re: Corruption of formulas after cut-and-paste