SubscriptBox question

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?

Brute force with AdjustmentBox?

RowBox[{SubscriptBox["E", "n"],
   AdjustmentBox[
    RowBox[{"(", "x", ")"}], BoxMargins -> {{-.5, 0}, {0, 0}}]
   }] // RawBoxes

Craig

RowBox adds in spacing automatically, but adding an invisible space will give the desired spacing:

RowBox[{SubscriptBox["E", "n"], "\[InvisibleSpace]", RowBox[{"(", "x", ")"}]}] // RawBoxes

An alternative is to use:

RowBox[{SubscriptBox["E", "n"], "(", "x", ")"}]

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)

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.