# Denominator too close to horizontal line - alignat & align environment

What do I want?:

I want bigger spacing between my denominator and the horisontal line from the fraction.

I saw this question which talks about it, but not within the align or alignat environment. too little space between the bar on the denominator and the horizontal line

Others:

I use this command to make my fractions bigger and thereby more visible: \newcommand\ddfrac[2]{\frac{\displaystyle #1}{\displaystyle #2}}

That is a solution from this question: Fractions with large elements

But now I got this with RZ_L very close to the main fraction line:

Code:

\begin{alignat}{1}
= \ddfrac{Z_C}{Z_C+\frac{RZ_L}{R+Z_L}}
\end{alignat}


The code is just a portion of my whole alignat environment, but this is the important part.

NOTE:

The solution including the usage of /mathstrut is more general than just within the alignat environment, it also works within /[ code /].

The usage of /ddfrac is in this case not essential, instead it is possible to use /frac on the main fraction and /dfrac on the fraction that is too close to the horizontal line.

• That's a good reason for avoiding these big fractions. And, please, don't use that \ddfrac command, which is completely useless; there is already \dfrac. Add \mathstrut to the numerator. – egreg Oct 25 '16 at 23:23
• @egreg I don't get \mathstrut to work here. I might interpret it wrong into the code. – Robin Hellmers Oct 25 '16 at 23:55
• See the difference between \ddfrac{\frac{a}{b}}{\frac{c}{d}} and \ddfrac{\frac{\mathstrut a}{\mathstrut b}}{\frac{\mathstrut c}{\mathstrut d}}. Edit: And, yes, you are right, \ddfrac is not the same as \dfrac. :-) – GuM Oct 25 '16 at 23:56
• It is difficult to state a general rule about where \mathstrut is actually needed, because the answer might depend on the circumstances. In your case, you should use it in the “numerator of the denominator”; in other cases you might needed in the “denominator of the numerator”; in still other cases you might need it in both; and so on. – GuM Oct 26 '16 at 0:02
• @GustavoMezzetti I will problably face similar problems later, then I test it around. Thank you. – Robin Hellmers Oct 26 '16 at 0:04

Solved by putting in \mathstrut into the code:
\begin{alignat}{1}

• Why alignat? Just use equation. – GuM Oct 26 '16 at 0:07
• @GustavoMezzetti The idea of a MWE is to post minimal code to demonstrate the problem. In this case the alignat may well be a significant part of the question and so should be included. Personally, I find it very frustrating when some one asks a simplified version of their question and then complains that the solution does not work in their real application. +1 to Robin for including alignat in the question!! Personally, I'd reinstate the alignat as this is what the OP wanted:) – Andrew Oct 26 '16 at 0:30
• @Andrew: As I said, I was just expressing my opinion. Which is, to restate it more clearly, that I cannot see how the circumstance of being, or being not, inside an alignat environment influences the way in which the fraction is typeset. What actually differentiates the OP’s situation from the context of the other question being quoted is the fact of being in display math mode, as opposed to in-line; this is why I thought that using $...$ instead of the alignat environment in the answer was more to the point. – GuM Oct 26 '16 at 16:52