In the specific Graphic setting, precisely

enter image description here

(somehow \ ( and \ ) are not shown properly below in Stackexchange window)

Graphics[Text[Style["\ !\ (1234_L\ )",LineSpacing->{0,12}],{0,3}]]

I am trying to make this looks like $$1234_{\text{L}}$$ with the L as the text font and the 1234 are in the math font. But it apppears as $$1234_{L}$$ with the $L$ as the math font. This outputs

enter image description here

Ironically, if I use

enter image description here

Graphics[Text[Style["\ !\ (1234_Line\ )",LineSpacing->{0,12}],{0,3}]]

it appears as $1234_{\text{Line}}.$ This outputs the desired textfont:

enter image description here

Question: How to get the text font: $1234_{\text{L}}$ in this specific Graphic setting?

  • 1
    $\begingroup$ I could not reproduce the issue with your code but the single character seems to be getting italicized as a variable under traditional formatting. In the use of Subscript(1234,"L") it will not get italicized because you are telling Mathematica that it is a string. But if you use Subscript[1234,L] then the L is italicized. $\endgroup$
    – Nicholas G
    Nov 5, 2021 at 14:05
  • $\begingroup$ thanks for the comment! $\endgroup$
    – wonderich
    Nov 5, 2021 at 16:43

1 Answer 1


Usually FormatType should be sufficient and you can uncomment the line to note the difference. I have used Subscript for finer control over the font.

  Style[Text[Subscript["1234", "L"], {2, 5}],
    Red, 20, FontFamily -> "Times"]},
 Frame -> True,
 PlotRange -> {{0, 3}, {4, 6}}]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.