# Default sqrt index to scriptstyle instead of scriptscriptstyle

In my document, I am using a font and size which just makes scriptscriptstyle too small, and it looks weird to me:

If instead of \sqrt[3]{...} I write \sqrt[\scriptstyle 3]{...} it looks better:

And I want to apply this to all the square roots in my document, without typing \scriptstyle every single time.

\let\oldsqrt\sqrt
\renewcommand{\sqrt}[2][\phantom{1}]{\oldsqrt[\scriptstyle#1]{#2}}


but then I can't use \uproot{} in \sqrt to adjust some fractions. (I'm not sure why, but it throws an error)

So, my next solution attempt was to look into the definition of \sqrt (using \show in a console)

> \sqrt =\long macro:
->\@ifnextchar [\@sqrt \sqrtsign .
<argument> \sqrt


then I looked into the \@sqrt definition:

> \@sqrt=macro:
[#1]->\root #1\of .
<argument> \@sqrt


finally I had a look at the \root definition and I found what I wanted:

> \root=macro:
#1\of ->\setbox \rootbox \hbox {$\m@th \scriptscriptstyle {#1}$}\mathpalette \r
@@t .
<argument> \root


so I just had to redefine \root to the exact same but changing \scriptscriptstyle to \scriptstyle. I tried the following:

\makeatletter
\renewcommand{\root}[1]{\setbox\rootbox\hbox{$\m@th\scriptstyle{#1}$}\mathpalette\r@@t}
\makeatother


but it just throws a ton of illegible errors and breaks the whole document. I don't think I understood correctly the definition of \root, so my code isn't okay. How would you do this?

I do not recommend hacking these macros but I think you are looking for

\documentclass{article}
\makeatletter
\def\root#1\of{\setbox\rootbox\hbox{$\m@th\scriptstyle{#1}$}\mathpalette\r@@t}
\makeatother
\begin{document}
$\sqrt[3]{4}$
\end{document}


This is because from the definition you post

> \root=macro:
#1\of ->\setbox \rootbox \hbox {$\m@th \scriptscriptstyle {#1}$}\mathpalette \r
@@t .
<argument> \root


an \of is part of the \root definition.

• Thank you! The -> was confusing me. – Blaz Korecic May 29 '20 at 6:32