MathGroup Archive 2011

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

Search the Archive

Re: copying Inline math to create StandardForm in Input cell

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121005] Re: copying Inline math to create StandardForm in Input cell
  • From: "David Park" <djmpark at comcast.net>
  • Date: Sun, 21 Aug 2011 05:32:55 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <14183512.7293.1313834192778.JavaMail.root@m06>

It's nice to see someone using Mathematica to communicate in an active mode.

My experience with M8 is that InlineCells have been degraded from previous
versions. I haven't so much tried to copy out of InlineCells and so haven't
noticed that problem. But there is a problem if you use a routine in an
InlineCell and then try to evaluate in place. (Select and Ctrl-Shift-Enter).
Sometimes it depends on whether you have selected the correct portion of the
InlineCell and sometimes it just messes up your Text line.

In any case, I think it would be preferable to use Input/Output cells as the
primary source and copy from them into the InlineCell - even if you have to
make a temporary Input/Output cell.

I typed the following into a notebook as StandardForm:

Limit[Sin[\[Theta]]/(
  2 Sinh[1/2 (Subscript[\[Xi], A] - Subscript[\[Xi], B])]) (Sqrt[(
    Cosh[Subscript[\[Xi], A]] + Cos[\[Theta]])/(
    Cosh[Subscript[\[Xi], B]] + Cos[\[Theta]])] - Sqrt[(
    Cosh[Subscript[\[Xi], B]] + Cos[\[Theta]])/(
    Cosh[Subscript[\[Xi], A]] + Cos[\[Theta]])]), 
 Subscript[\[Xi], A] -> \[Infinity], 
 Assumptions -> {Subscript[\[Xi], A] > 0, \[Theta] \[Element] Reals}]

I then converted it to TraditionalForm, copied it and pasted into an
InlineCell within a Text cell. That works.

I then copied the InlineCell and pasted back into a new Input cell in the
notebook. That worked fine. I evaluated the Input cell and got:

Sqrt[1/(2 Cos[\[Theta]] + 2 Cosh[Subscript[\[Xi], B]])]
  Sin[\[Theta]] (Cosh[Subscript[\[Xi], B]/2] + 
   Sinh[Subscript[\[Xi], B]/2])

But, if I selected the Limit expression in the InlineCell within the Text
cell and then evaluated it in place, Mathematica destroys the Text cell. 

So, in my opinion, WRI has clearly messed up InlineCells in Version 8. I
wouldn't hope for a fix in the next release because I don't think they
recognize it. (They think it is just a matter of selecting the right
portion.)

I would say the best strategy is to copy INTO InlineCells, but don't enter
complicated expressions directly or do math in Inline cells.


David Park
djmpark at comcast.net 
http://home.comcast.net/~djmpark/  


From: Dushan Mitrovich [mailto:dushanm at nnips.net] 


I'm using Mathematica 8 under Mac OS X.6.5.  I'd appreciate some guidance
on the proper way to copy Inline math expressions and paste them as 
StandardForm into a cell.  Sometimes it works, often it doesn't, and I 
don't know what needs be done to correct the problem.

Generally I write Notebooks as technical reports, using text and Inline 
formulas, and with executable Input cells only when needed.  When I need 
to operate in some way on an Inline math expression, I highlight the 
relevant part, copy it, past it into a separate Input cell, then edit 
that into Mathematica format (so 'sin(x)' is modified to read 'Sin[x]', 
etc.).  Sometimes extra modifications are needed as well.

Executing the Input cell generally works if there are no extra 
modifications, but if there are, various errors occur.  Apparently the 
expression being copied contains formatting information that isn't 
visible unless I paste it into a text editor.  Attempts to convert the 
expression into StandardForm or InputForm had no effect.  Here's a 
probably superfluous example:

Limit[\!\(TraditionalForm\`\(TraditionalForm\`
\*FractionBox[\(Sin[\[Theta]]\), \(2  Sinh[
\*FractionBox[\(1\), \(2\)] \((
\*SubscriptBox[\(\[Xi]\), \(A\)] -
\*SubscriptBox[\(\[Xi]\), \(B\)])\)]\)] \((
\*SqrtBox[
FractionBox[\(Cosh[
\*SubscriptBox[\(\[Xi]\), \(A\)]] + Cos[\[Theta]]\), \(Cosh[
\*SubscriptBox[\(\[Xi]\), \(B\)]] + Cos[\[Theta]]\)]] -
\*SqrtBox[
FractionBox[\(Cosh[
\*SubscriptBox[\(\[Xi]\), \(B\)]] + Cos[\[Theta]]\), \(Cosh[
\*SubscriptBox[\(\[Xi]\), \(A\)]] + Cos[\[Theta]]\)]])\)\),
\*SubscriptBox[\(\[Xi]\), \(A\)] -> \[Infinity]\), \
\!\(TraditionalForm\`Assumptions -> {
\*SubscriptBox[\(\[Xi]\), \(B\)] > 0, \[Theta] \[Element] Reals}\)]

Obviously I'm going about it incorrectly.  Could someone point me to 
instructions on how to do it right?  Thanks.

- Dushan
   [ reverse the middle word of address to reply ]





  • Prev by Date: Re: Getting 3d printable models out of 3d graphics in Mathematica
  • Next by Date: decoding inbuilt function
  • Previous by thread: copying Inline math to create StandardForm in Input cell
  • Next by thread: time polarized em wave interferometer