I want to write math:


but this is the result:

enter image description here

I want this :

enter image description here

  • ignoring the font or size, you might consider i^{w^{anterior}} as in 2^{2^{3}} = 256 – Henry Feb 20 '19 at 11:29

Embrace the {w^{\mathrm{anterior}}} rather than the {i^{w}}. Also, \mathrm for math-sized text (by "text", I mean phonetic language, not a collection of math symbols).


enter image description here

  • I would add the admonition: if you don't use \mathrm but simply write anterior without any special control sequence, it is typeset as a product of variables term: a times n times t times e ... not what you want. – Kaz Feb 20 '19 at 7:13
  • @Kaz That is what I implied with the word "text", but have clarified, since it caused you some confusion. – Steven B. Segletes Feb 20 '19 at 12:11
  • I am obviously not confused in any way myself. – Kaz Feb 20 '19 at 16:02
  • @Kaz I am sorry to have implied that. You are trying to help the reader, I understand. – Steven B. Segletes Feb 20 '19 at 16:37
  • 1
    @ThomasAhle In this case, nothing, except that \text requires the amsmath package. If the operated-upon text had, for example, punctuation, \mathrm would apply the \mathpunct, whereas \text would not. – Steven B. Segletes Feb 21 '19 at 10:51

If I understood you correctly, you want the superscripts have normalsize plus an sf shape, you can use \mbox.




enter image description here


Another good approach is \operatorname{anterior} from amsmath, especially if you want two of these variables to appear consecutively.

Personally, I would prefer to define \newcommand\anterior{\operatorname{anterior}}, analogously to \sin or \log.


In your version {i^{w}}^{anterior}, the i is effectively raised to two separate exponents, causing them to appear side-by-side, which is not what you intend: enter image description here

If you nest the braces as {i^{w^{anterior}}} then the stack of exponents is preserved, resulting in what appears to be your desired form: enter image description here

(This is assuming it's stacked exponents that you're concerned with, not plain text formatting for superscripts as your example image might suggest. In that case, use AboAmmar's version.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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