Message Boards Message Boards

5 Replies
9 Total Likes
View groups...
Share this post:

SubscriptBox question

Posted 12 years ago
RowBox[{SubscriptBox["E", "n"], RowBox[{"(", "x", ")"}]}] // RawBoxes

Note how far apart the "E_n" and the "(x)" are. Is there a way to get them a bit closer together?
POSTED BY: Arnoud Buzing
5 Replies
If you are interested in modifying RowBox[{SubscriptBox["E","n"],RowBox[{"(","x",")"}]}], then the posts

above are best; however, if the output from RowBox[{SubscriptBox["E","n"],RowBox[{"(","x",")"}]}] is

in an Input-cell or Text-cell, select "(x)", hold-down the Alt key and then use the left-arrow key to adjust

the spacing. Also, if you manually enter E subscript-n (x) into a text cell, you can adjust the spacing as

you enter it using no spacing, various spaces (such as SpaceKey, Esc SpaceKey Esc,

Esc SpaceKey SpaceKey Esc, etcetera), or apply the Alt and arrow keys to a selection in an Inline-cell.
POSTED BY: William Schwartz
Posted 12 years ago
Carl's solution is better than Nick's, assuming what you want is a TraditionalForm-like function application. Only the multivariate case uses a nested RowBox.
In[10]:= RowBox[{SubscriptBox["E","n"],"(",RowBox[{"x",",","y"}],")"}]//RawBoxes
Out[10]= Subscript[E, n](x,y)
POSTED BY: Itai Seggev
An alternative is to use:
RowBox[{SubscriptBox["E", "n"], "(", "x", ")"}]
POSTED BY: Carl Woll
RowBox adds in spacing automatically, but adding an invisible space will give the desired spacing:
RowBox[{SubscriptBox["E", "n"], "\[InvisibleSpace]", RowBox[{"(", "x", ")"}]}] // RawBoxes
POSTED BY: Nick Lariviere
Brute force with AdjustmentBox?
RowBox[{SubscriptBox["E", "n"],
    RowBox[{"(", "x", ")"}], BoxMargins -> {{-.5, 0}, {0, 0}}]
   }] // RawBoxes
POSTED BY: W. Craig Carter
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract