I'm currently writing my dissertation in civil engineering using LaTeX. I think LaTeX is really good. I have been slowly distancing myself now from Microsoft Word. LaTeX is good for me since my paper (nonlinear structural dynamics) may eventually contain more than a thousand equations.

I just have one problem now.

Consider the following fraction with delimiter.

\left( \frac{a}{b} \right)

So far, there is really no problem with that fraction. The delimiters automatically resize.

Now, consider the following "complex" fraction with delimiters:

\left( \frac{\dfrac{a}{b}}{\dfrac{c}{d}} \right)

Again, there is no problem with this "complex" fraction, since the delimiters automatically resize.

Now, here's the problem. Consider the following "complex" fraction with delimiters:

\left( \frac{a}{\dfrac{c}{d}} \right)

The result of this is that the delimiters resize, but there is extra "vertical white space" within the region of the numerator. This is because the numerator is just a "variable" while the denominator is another fraction in "displaystyle" font size. Thus, they have different "sizes". I intentionally wanted the font size in the denominator to be bigger since I'm trying to show equations in display mode. (If the denominator was in textstyle fontsize, then there would be less "vertical white space" in the numerator, but the problem is still there. I really want the denominator to be in displaystyle font size.)

What I would want, if possible, is that the delimiter would resize but only up to the "actual size" of the complex fraction. In MathType, this problem is solved using the "fence alignment" command in the "Format" menu, where the delimiters resize exactly up to the size of the complex fraction.

Sometimes, the manual sizing commands \big, ... \Bigg commands can help, but when I have a "complex-complex-complex" fraction, even the biggest \Bigg command doesn't help anymore.

Output of the code samples:


I have been seeking help from the Internet, but I haven't found a solution yet.


4 Answers 4


You can use \vcenter to center the complex fraction:

\left( \vcenter{\hbox{$\displaystyle\frac{a}{\dfrac{c}{d}}$}} \right)

but then your fraction bar will not be aligned with the rest of your expression. TeX tries to center both the fraction bar and the delimiters on the central horizontal axis of the expression, which means that if your numerator and denominator have different vertical sizes, you will end up with some empty space. \vcenter "fixes" that by forcing the fraction to be centered according to its actual height, rather than at the fraction bar.


You need some kind of visual cue with your fraction example, to indicate what mathematical expression is meant: since / is not associative, a/(b/c) and (a/b)/c mean different things, having normal form (ac)/b and a/(bc) respectively.

Using the manual sizing you describe would be my preference: the smallest expression is then the innermost. The behaviour you observe also provides a visual cue: the horizontal rule that is best aligned with the surrounding expression is the outermost division operator. And most explicit is to add additional parentheses. Jan solves your typesetting problem, but I think at the cost of making the expression completely ambiguous.


Knuth's answer to the problem, given in the TeXbook, is that sometimes, complex fractions are a bad idea and you should use the inline form a/b instead. This appears to be one of those situations, though I appreciate that your real equation might not be amenable to this alteration. One possibility is that you can introduce new notation for the denominator (say, d) and instead of writing


you can instead write

\[\frac{x}{d}, \text{ where } d = \frac{a}{b}.\]

In short, this is not a typesetting issue so much as it is a composition issue.


Ran into this question via search, and wanted to point out another adaptation from The TeXbook:

  \left(\displaystyle{\mathstrut a\over\mathstrut  b}
    \above1pt\displaystyle{\mathstrut c\over\mathstrut d}\right)
  \left(a\over c/d\right)


The \above1pt makes the middle rule thicker than the other two rules.

You must log in to answer this question.