[Tex/LaTex] Superscripts before a letter in math

superscripts

I was writing this formula:

$$^gp = ^gR^l_l+^go_l$$

$g$ are superscripts, but they should be close to other letters. How can I solve this problem?

Best Answer

For a quick and dirty solution, try putting an empty group {} before the ^ symbol.

\documentclass{article}
\begin{document}
\[
^gp = {}^gR^l_l+{}^go_l
\]
\end{document}

For a better method, check out the mathtools package, which provides the \prescript command.

Related Question