# A Symbol with Subscript and Superscript as an Axis Label

I am trying to have the symbol $\epsilon_{9/2,4}^-$ as the axis label in a graph in Mathematica. First problem is that: when I use Subscript[$\epsilon$,9/2,4], 9/2 changes to $\frac{9}{2}$ (which I don't want, because it doesn't look good). Second problem is that Subscript[$\epsilon$,9/2,4]^- does not work. Can anyone please let me know how to do this? Thanks!

• OK, I found the answer. This works Subscript[ϵ,"9/2",4]^"-". So, please ignore this question. – Farokh May 15 '13 at 19:04
• maybe you want to look at Subsuperscript[\[Epsilon], "9/2,4", "-"] – Pinguin Dirk May 15 '13 at 19:47
• "OK, I found the answer." - please write an answer to your own question. – J. M. will be back soon May 16 '13 at 1:58

One very robust way to do such things is using the BoxLanguage of Mma. Your task for example is solved by the construct:

SubsuperscriptBox["\[Epsilon]", "2.4", "-"] // DisplayForm


placed just where you enter the desired AxesLabel. It can be, however, styled in addition, for example, as follows:

    StyleBox[SubsuperscriptBox["\[Epsilon]", "2.4", "-"],
FontColor -> Red, FontSize -> 18, FontWeight -> Bold] // DisplayForm


I will give below the example of its use for formatting the axes labels, by fromatting them differently (e.g. different colors, fonts and fixing FontWeight):

    Plot[Sin[eps], {eps, 0, 3},
AxesLabel -> {StyleBox[SubsuperscriptBox["\[Epsilon]", "2.4", "-"],
FontColor -> Red, FontSize -> 18, FontWeight -> Bold] //
DisplayForm,
StyleBox[SuperscriptBox["x", "y/z"], FontFamily -> "Mathematica6",
FontSize -> 18, FontColor -> Blue, FontWeight -> Bold] //
DisplayForm}]


This returns the following plot:

I organized these constructs in such a way that one may use them without knowing anything else about the BoxLanguage. Have fun!

I just wanted to provide this with a complete answer, since I had this very same question. There are two ways to enter both a sub and a superscript, one using the Subsuperscript command (as noted by @Pinguin Dirk), and one using shortcut keys, which is described in the help:

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.

Using the shortcut keys enables one to actually have the subsuperscript style while typing, rather than just as an output.