2
$\begingroup$

When writing out a variable with both a subscript and a superscript, such as:

Subscript[Superscript[f, a], b]

one has that the "b" letter is "pushed" to the right compared to the letter "a". I would like instead both scripts to be on the same vertical axis. This seems easy to accomplish, but I do not know how it is done?

$\endgroup$
4
$\begingroup$

Use Subsuperscript:

Subsuperscript[f, a, b] // Style[#, 20] &

enter image description here

Keyboard shortcut (thanks: BobHanlon):

enter image description here

$\endgroup$
  • $\begingroup$ Great! I knew it was simple. Is there a keyboard shortcut for this? Similar to using Ctrl+_ (or ^)? $\endgroup$ – Patrick.B Feb 21 '19 at 14:42
  • $\begingroup$ @Patrick.B, i don't know of any keyboard shortcut for Subsuperscript. $\endgroup$ – kglr Feb 21 '19 at 14:44
  • 2
    $\begingroup$ From the Details section in the documentation for Subsuperscript: "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." $\endgroup$ – Bob Hanlon Feb 21 '19 at 15:15
  • 1
    $\begingroup$ Feel free to add it to your answer. $\endgroup$ – Bob Hanlon Feb 21 '19 at 15:40
  • 1
    $\begingroup$ You can use a standard palette to input sub, super and subsuperscripts $\endgroup$ – magma Feb 22 '19 at 0:10

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