MHB Putting a superscript before a variable or expression ....

AI Thread Summary
To place a superscript before a variable or expression in LaTeX, use the format $^{A}B$, ensuring to include empty braces like this: {}^{A}B to prevent the superscript from attaching to the previous element. This is illustrated by comparing $f\in ^I\left( \bigcup \{A_i:i\in I\}\right)$ with $f\in {}^I \left( \bigcup \{A_i:i\in I\}\right)$. The latter keeps the superscript separate from the $\in$ symbol. Additionally, to improve visual spacing, a negative space can be added after the superscript using \!. Proper formatting ensures clarity in mathematical expressions.
Math Amateur
Gold Member
MHB
Messages
3,920
Reaction score
48
Can someone help with the issue/problem of placing a superscript before a variable or expression ... as Just and Weese do in their book on Set Theory ... in the expression for a Cartesian Product as follows:

View attachment 7536Hope that someone can help ...

Peter
 
Physics news on Phys.org
There are various packages that can do this and more sophisticated things, but I think in this case the easiest is: $^{A}B$. (Right-click on formula to see $\LaTeX$ source.)
 
You may need to add an empty pair of braces before the superscript, like this: {}^{A}B. Otherwise, the superscript will attach itself to the previous element in the formula. Compare

$f\in ^I\left( \bigcup \{A_i:i\in I\}\right)$ with $f\in {}^I \left( \bigcup \{A_i:i\in I\}\right)$.

In the first case, the superscript $I$ has attached itself to the $\in$ symbol. Even when the braces are inserted, the superscript looks as though it is suspended halfway between the symbols on either side. You can eliminate that by inserting a negative space (given in TeX by \!) after the superscript, to get

$f\in {}^I \!\left( \bigcup \{A_i:i\in I\}\right)$.
 
Opalg said:
You may need to add an empty pair of braces before the superscript, like this: {}^{A}B. Otherwise, the superscript will attach itself to the previous element in the formula. Compare

$f\in ^I\left( \bigcup \{A_i:i\in I\}\right)$ with $f\in {}^I \left( \bigcup \{A_i:i\in I\}\right)$.

In the first case, the superscript $I$ has attached itself to the $\in$ symbol. Even when the braces are inserted, the superscript looks as though it is suspended halfway between the symbols on either side. You can eliminate that by inserting a negative space (given in TeX by \!) after the superscript, to get

$f\in {}^I \!\left( \bigcup \{A_i:i\in I\}\right)$.
Thanks to Krylov and Opalg for the help ...

Much appreciated ..

Peter
 
Back
Top