I can find nothing in the Mathjax tutorial about left superscripts, which are used for the set of functions with a given domain and codomain.
1 Answer
As pointed out in the comments (by lulu and Xander), it is possible to put the superscript on a blank space. And an alternative is to put it on a vertical (=zero width) phantom box created by TeX's \vphantom
-command, or empty braces ${}$
. I experiment with the differences in what follows.
This is what it looks like if you simply put the superscript on a blank space: $$\,^2\Gamma^i_{jk},\qquad \,^2\bigcup_{n=1}^{17}U_i,\qquad\,^2\alpha_i$$ You see that the superscript is always at the same height irrespective of the height of the following character. This makes sense because the elevation of a superscript depends on the height of the box it is a superscript of. Here the box contains that blank space.
Next I test what changes, if instead of a blank space we place the superscript on a vertical phantom box that gets its height calculated from the character immediately following the superscript:
$$\vphantom{\Gamma}^2\Gamma^i_{jk},\qquad \vphantom{\bigcup}^2\bigcup_{n=1}^{17}U_i,\qquad\vphantom{\alpha}^2\alpha_i$$
You see that this time the left superscript on a tall character is placed higher. MathJax-Source for the above displayed line:
$$\vphantom{\Gamma}^2\Gamma^i_{jk},\qquad \vphantom{\bigcup}^2\bigcup_{n=1}^{17}U_i,\qquad\vphantom{\alpha}^2\alpha_i$$
. You see that you need to write the superscripted character twice – once as a phantom and then for real.
Using empty braces it looks like $${}^2\Gamma^i_{jk},\qquad {}^2\bigcup_{n=1}^{17}U_i,\qquad{}^2\alpha_i.$$ As expected, the elevation of the left superscript is then determined only by the height of the box created by the empty braces.
Having the superscript on a blank space may also affect horizontal spacing. After all, the vertical phantom box should have zero width, whereas the box containing any amount of blank space has a strictly positive width. So the output may look different. Let's test.
Here are $\,^j\Gamma_{ik}$ symbols $\,^i\alpha_j$ where the left superscript is on a blank space.
Here are $\vphantom{\Gamma}^j\Gamma_{ik}$ symbols $\vphantom{\alpha}^i\alpha_j$ where the left superscript is on a vertical phantom.
Here are ${}^j\Gamma_{ik}$ symbols ${}^i\alpha_j$ where the left superscript is on a box created by empty braces.
As expected, there is a bit less white space in front of the symbol, when we use either a phantom or empty braces.
Your pick!
However, neither of these suggestions logically ties the superscript to the character on its right. Therefore something strange or undesirable may happen. The phantoms are just a hack (as is, of course, the use of a blank space). Anyway, my recommendation is to use \vphantom
because it creates a box of the appropriate height and zero width. If, instead, you need a box of zero height and the width of a known character, there is the analogous command \hphantom
, 'h' for horizontal.
-
2$\begingroup$ I will add that if you use something like this in some post, you might consider using a macro. E.g., if you use
$\newcommand{\Map}[2]{{\vphantom{{#2}}}^{#1}{#2}}$
$\newcommand{\Map}[2]{{\vphantom{{#2}}}^{#1}{#2}}$, then in the whole post you can use$\Map AB$
to get $\Map AB$. And if you later want to change the way it looks, you can simply change the macro and it will change all occurrences. (If there are many of them, it is a lot of work to change each one of them.) And to some extent this resolves also the problem that "logically ties the superscript to the character on its right." $\endgroup$ Sep 2, 2021 at 8:59 -
$\begingroup$ @Xander Henderson: From an 8 April 2002 sci.math post of mine where tetrated numbers occur: "It is standard practice to denote x^^y as x with a left superscript y. [A left superscript is sometimes called a "prescript".] Of course, that option is not available in ASCII format. In fact, as far as I know, that option (i.e. a left superscript) is not available in LaTeX either, at least as an explicit command in the same way that \$x^{y}\$ and \$x_{y}\$ represent "x superscript y" and "x subscript y", respectively. (continued) $\endgroup$ Sep 2, 2021 at 20:23
-
$\begingroup$ However, I've discovered that \${}^{y}x\$ represents x^^y fairly well. [That is, use 'y' as a superscript to an empty space and then follow this "exponentiated pair" with 'x'.]" $\endgroup$ Sep 2, 2021 at 20:23
-
2
${}^2x$
renders as ${}^2x$. An alternative is something like$\phantom{t}^2t^2$
: $\phantom{t}^2t^2$. $\endgroup$5\,{}_2F_1
not5{}_2F_1
to yield $5\,{}_2F_1$ not $5{}_2F_1$ $\endgroup$