# "prime" symbol too low if within square root

I have a formula using "E-prime-squared", i.e., E'². Unfortunately, the prime descendes if this is written within a formula:

\documentclass{article}  \begin{document}  This looks nice: $E'$, and while this is okay: $E'^2$, this is probably better: ${E'}^2$, but this is ugly: $\sqrt{E'^2}$, and this as well: $\sqrt{{E'}^2}$.  \end{document} 


This results in:
Is there any way to prevent LaTeX from lowering the prime symbol?

Replay

This is the so called cramped style, in luatex you can escape it but in classic tex you need to re-start a nested math list to avoid it.

\documentclass{article}

\begin{document}

This looks nice: $E'$,
and while this is okay: $E'^2$,
this is probably better: ${E'}^2$,
but this is ugly: $\sqrt{E'^2}$,
and this as well: $\sqrt{{E'}^2}$.
But $\sqrt{\hbox{$E'^2$}}$.

\end{document}



Or you could adjust the font parameters so cramped setting is not so cramped....

Following egreg's lead at how to raise superscript inside overline?

\documentclass{article}

\newcommand\rsqrt[2][]{\def\tmp{#1}\mathpalette\dorsqrt{#2}}
\newcommand{\dorsqrt}[2]{%
\if\relax\tmp\relax%
\sqrt{#1#2}%
\else
\sqrt[\tmp]{#1#2}%
\fi
}
\begin{document}
This is ugly: $\sqrt{E'^2}$ versus $\rsqrt{E'^2}$ or $\rsqrt[3]{E'^2}$.
\end{document}



Category: math mode Time: 2016-07-28 Views: 0
Tags: math mode