RE: RE: Why do parentheses spuriously appear when I type in a formula?
- To: mathgroup at smc.vnet.net
- Subject: [mg34515] RE: [mg34458] RE: [mg34410] Why do parentheses spuriously appear when I type in a formula?
- From: "DrBob" <majort at cox-internet.com>
- Date: Fri, 24 May 2002 02:42:27 -0400 (EDT)
- Reply-to: <drbob at bigfoot.com>
- Sender: owner-wri-mathgroup at wolfram.com
>>My exact key strokes are T Ctrl-^ a Ctrl-space Ctrl-_ b. Omit "Ctrl-space" and you get what you want. Bobby Treat -----Original Message----- From: Wolf, Hartmut [mailto:Hartmut.Wolf at t-systems.com] To: mathgroup at smc.vnet.net Subject: [mg34515] [mg34458] RE: [mg34410] Why do parentheses spuriously appear when I type in a formula? > -----Original Message----- > From: Carl K. Woll [mailto:carlw at u.washington.edu] To: mathgroup at smc.vnet.net > Sent: Saturday, May 18, 2002 9:52 AM > Subject: [mg34515] [mg34458] [mg34410] Why do parentheses spuriously appear when > I type in a > formula? > > > Hi all, > > For some strange reason, I want to type into Mathematica an > expression that > should look like T^a_b, that is, the b subscript of T raised > to the a power. > My exact key strokes are T Ctrl-^ a Ctrl-space Ctrl-_ b. > However, when I > enter this expression into mathematica, it adds (spuriously > in my mind) some > parentheses, so that I get (T^a)_b. I would like to know what > causes these > parentheses to be added, and if there is anything I can do to > prevent them > from appearing. What I have to do now is go back into the > expression and > edit out the parentheses. > > Carl Woll > Physics Dept > U of Washington > > > Dear Carl, of course as to the why, I could at most speculate. I wouldn't do that, instead just add an observation: If we input "T Ctrl-^ a Ctrl-space Ctrl-_ b" as you described, we get Cell[BoxData[ SubscriptBox[ RowBox[{"(", SuperscriptBox["T", "a"], ")"}], "b"]], "Input"] What you desired however is this: Cell[BoxData[ SubscriptBox[ SuperscriptBox["T", "a"], "b"]], "Input"] If I try one-dimensional input, to reach that I must add a bracket \( ... \) In[13]:= \(\(T\^a\)\_b\) Out[13]= SubscriptBox[SuperscriptBox[T,a],b] otherwise I'd get something different and unwanted In[2]:= \(T\^a\_b\) Out[2]= SuperscriptBox[T,SubscriptBox[a,b]] Parenthesis as from your undesired behaviour are reproduced with In[3]:= \((T\^a)\_b\) Out[3]= SubscriptBox[RowBox[{(,SuperscriptBox[T,a],)}],b] (without the backslashes!) In contrast the complementary T can be reached by "T ctrl-_ a ctrl-blank ctrl-^ b" Cell[BoxData[ SuperscriptBox[ SubscriptBox["T", "a"], "b"]], "Input"] or simply as In[5]:= \(T\_a\^b\) Out[5]= SuperscriptBox[SubscriptBox[T,a],b] Related forms are produced as they should: In[23]:= \(T\_\(a\^b\)\) Out[23]= SubscriptBox[T,SuperscriptBox[a,b]] In[25]:= \(T\^\(a\_b\)\) Out[25]= SuperscriptBox[T,SubscriptBox[a,b]] If you want to input fluently, perhaps it helps to first enter the subscription: "T ctl-_ b arrowleft arrowleft ctrl-^ a end" Perhaps you can use the form In[29]:= \(T\^a\%b\)//DisplayForm Out[29]//DisplayForm= \!\(\* TagBox[\(T\_b\%a\), DisplayForm]\) which inputs straight foreword as "T ctrl-^ a ctrl-% b" Cell[BoxData[ SubsuperscriptBox["T", "b", "a"]], "Input"] -- Hartmut