# Square root in fraction space problem

I'm having some troubles with the square root symbol within a fraction. This code

\documentclass{book}

\begin{document}
$$h_4 = \frac{\sqrt{1.5 \gamma_4 -3.5}-1}{18}$$
$$h_3 = \frac{\gamma_3}{4+ \sqrt{6\gamma_4-14}}$$
\end{document}


returns this

Now, is it just me, or the horizontal line of the square root is really close both to the numbers below it and to the fraction line above it?

I find this a little clumsy.

Is there a solution? Or this is just my paranoia? :P

Thank you very much

• Since you said I have to agree: it is your paranoia. lol Commented Jun 24, 2014 at 21:24

If it is not too large, \strut may be a solution (an original one left for comparision). According Mico's sugestion, \mathstrut gives a value between them. You can also adjust vertical spacing exactly to expected values, using e.g. \rule.

\documentclass{book}
\newcommand\uprule{\rule{0mm}{1.9ex}} %shortcut macro
\begin{document}
$$h_4 = \frac{\sqrt{1.5 \gamma_4 -3.5}-1}{18}$$
$$h_3 = \frac{\gamma_3}{4+ \sqrt{6\gamma_4-14}}$$

strut

$$h_4 = \frac{\sqrt{\strut1.5 \gamma_4 -3.5}-1}{18}$$
$$h_3 = \frac{\gamma_3}{4+ \sqrt{\strut6\gamma_4-14}}$$

mathstrut

$$h_4 = \frac{\sqrt{\mathstrut1.5 \gamma_4 -3.5}-1}{18}$$
$$h_3 = \frac{\gamma_3}{4+ \sqrt{\mathstrut6\gamma_4-14}}$$

rule

$$h_4 = \frac{\sqrt{\uprule1.5 \gamma_4 -3.5}-1}{18}$$
$$h_3 = \frac{\gamma_3}{4+ \sqrt{\uprule 6\gamma_4-14}}$$
\end{document}


• I just learned what struts and rules are. Thank you very much, this indeed is the solution to my "problem" (or paranoia hihi :P).
– Luca
Commented Jun 25, 2014 at 7:49

With \mathstrut the size of the square root sign would increase. In these cases, masking the descender is probably the best way around:

\documentclass{book}
\usepackage{amsmath}

\begin{document}
\begin{align}
h_4 &= \frac{\sqrt{1.5 \smash[b]{\gamma^{}_4} -3.5}-1}{18}
\\[1ex]
h_3 &= \frac{\gamma_3}{4+ \sqrt{6\smash[b]{\gamma^{}_4}-14}}
\end{align}
\end{document}


Here is the same with \mathstrut:

\begin{align}
h_4 &= \frac{\sqrt{\mathstrut 1.5 \gamma^{}_4 -3.5}-1}{18}
\\[1ex]
h_3 &= \frac{\gamma_3}{4+ \sqrt{\mathstrut 6 \gamma^{}_4-14}}
\end{align}


• The extra vertical space between the radicand and the square root sign's horizontal bar afforded by \mathstrut may just be what the OP is hoping to achieve.
– Mico
Commented Jun 24, 2014 at 22:28