The document for Subsuperscript says that:
To enter a subsuperscript in a notebook, use either Ctrl+_ to begin a regular subscript or Ctrl+^ to begin a regular superscript. After typing the first script, use Ctrl+% to move to the opposite script position. Ctrl+Space moves out of the subscript or superscript position.
This just create a expresion that looks like a symbol with subsuperscript! Specifically, I typed Ctrl+- / Ctrl+6 and a regular subscript / superscript appeared, Ctrl+5 and the opposite script appeared, and after I moved the cursor out of the symbol by pressing → and checked its InputForm
, what I saw is not something like
Subsuperscript[a, x, y]
but
Subscript[a, x]^y
Snapshot:
What's wrong with it, I misunderstood the document? I use Mathematica 8.0.4 and Windows Vista Home Basic 32bit.
Answer
It appears that when you use Control-% to create something that looks like $x_a^b$, the underlying box representation will be a SubsuperscriptBox
. However, the interpretation of a SubsuperscriptBox["x", "a", "b"]
box is the expression Subscript[x, a]^b
. The expression Subsuperscript[x, a, b]
is formatted as TemplateBox[{"x","a","b"}, "Subsuperscript"]]
in StandardForm.
As you noticed, as of version 9, the documentation doesn't match the actual behaviour.
Can you contact WRI about this so they can sort it out (either on the documentation side or the software side)?
Comments
Post a Comment