I don't like how the wide mn
index of the roots is being displayed and am looking to see how others have handled this problem. I am using the closed square root from the references listed below which allows me to tweak the locations slightly and hence am able to get the m
and n
aligned on the left hand side, and tried moving the indices on the right, but am not pleased with the result:
References:
Code:
\documentclass{article}
\usepackage{amsmath}
\usepackage{xparse}
\usepackage{letltxmacro}
\LetLtxMacro{\oldsqrt}{\sqrt}
\def\DHLhksqrt#1#2{%
\setbox0=\hbox{$#1\oldsqrt{#2\,}$}\dimen0=\ht0\relax%
\advance\dimen0-0.25\ht0\relax%
\setbox2=\hbox{\kern-0.375pt\vrule height\ht0 depth -\dimen0}%
{%
\hbox{$#1\expandafter\oldsqrt\expandafter[\DHLindex]{#2\,}$}%
\lower\ifx\math@version\bold@name0.60pt\else0.4pt\fi\box2%
}%
}
\newcommand{\ClosedSqrt}[1][]{\def\DHLindex{#1}\mathpalette\DHLhksqrt}%
\RenewDocumentCommand{\sqrt}{O{\hphantom{3}} O{0} O{0} m}{\ClosedSqrt[\leftroot{#2}\uproot{#3}#1]{#4}}%
\begin{document}
\begin{alignat*}{3}
\oldsqrt[m]{\oldsqrt[n]{x}} &= \oldsqrt[mn]{x} &\quad\text{original sqrt}\\
\sqrt[m][-3]{\sqrt[n][-1][2]{x}} &= \sqrt[mn]{x} = \sqrt[mn][-3][2]{x} &\quad\text{closed sqrt}
\end{alignat*}
\end{document}
$x^{1/(mn)}$
. :)\sqrt
accepts two additional parameters which make use of the up and left movement.