# Too much empty space underneath \sqrt

The following math command

$\sqrt{GM/a_p^3}$


produces excessive unnecessary empty space between the argument of the \sqrt and the horizontal line of the sqrt, which in turn makes the containing text line higher than others and the text look ugly.

Is there a way to avoid this typesetting fiasco?

• please show a small self contained example, and the output you get. The spacing depends on the fonts being used, about which we have no information – David Carlisle Oct 19 '19 at 19:52
• – barbara beeton Oct 19 '19 at 20:10

It is very important in these cases, as observed by @David Carlisle, to write a small and complete code that reproduces your problem. Maybe my answer can help you?

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\begin{document}
$\sqrt{\smash[b]{GM/a_p^3}}$
\end{document}


Here another code that can help you. Choose the one you like best, if all this matches the question you asked.

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\begin{document}
$\sqrt{GM/\smash[b]{a_p^3}}$
\end{document}

• That seems too much of a "couter-reaction". I believe $\sqrt{GM/\smash[b]{a_p^3}}$ would be better. – campa Oct 19 '19 at 20:08
• @campa It's true. I accept your advice and change the answer. – Sebastiano Oct 19 '19 at 20:09
• I am sorry but what does \smash[b] mean? – Diaa Oct 22 '19 at 4:52
• @Diaa See this link for example: tex.stackexchange.com/questions/199815/… – Sebastiano Oct 22 '19 at 7:28
• I am so sorry, but what is the difference in this output of this document when using \smash[b]? – Diaa Oct 22 '19 at 13:36

I assume that that you are typesetting in-line maths rather than display maths. In which case the use of \sqrt introduces some extra interline spacing. In this case it is better to use \surd (which only sets the root sign with no horizontal bar) instead of \sqrt.

\documentclass{article}
\begin{document}
Just a bit of text to set the scene, hopefully longer than a line but
if not it probably doesn't matter
Some maths $\sqrt{2}$ and $\surd{2}$ and $\sqrt{GM/a_p^3}$ and
$\surd{(GM/a_p^3)}$ end in-line maths. But perhaps a little more text
is required to provide a line after the maths to provide some after
context.
\end{document}


My apologies, whenever I try to post a result it never works. Please compile the above yourself.

EDIT

With thanks to whoever posted the result above.

If you are going to use a surd instead of a square root then it is useful to have an extensible version.

\newcommand*{\absurd}{\delimiter"270370 }
\newcommand*{\Surd}[1]{\left\absurd{#1}\right.\kern-\nulldelimiterspace}


where \Surd is a vertically expansible version of \surd It can be used like this:

$\surd{(GM/a_p^3)} \Surd{\left(\frac{GM/a_p^3}{GM/a_p^3}\right)}$