TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We may notice that the numerator and denominator in the following fraction are not aligned. And, to me it does not look good.

How to align the numerator and denominator?



\let\xoverline\overline % supply your definition



The above yields:

enter image description here

share|improve this question
Not a real improvement, but here it is: \frac{1-k^{m+n+d}}{1-k^{\hphantom{m+n+d}}} – egreg Sep 25 '12 at 8:52
@student What is the easiest way to do that? – User 17670 Sep 25 '12 at 9:25
In my opinion, aligning them is not a good idea, since the terms are importantly different. As well, as @egreg points out, the "aligned" result is not much good nicer. You can maybe shift the denominator just slightly: \dfrac{1-k^{m+n+d}}{1-k\quad} But I'm not sure it looks nicer than the default one. – yo' Sep 25 '12 at 9:42
@tohecz I'd definitely use the default centering. – egreg Sep 25 '12 at 9:43

Here's a comparison of the proposed solutions; the name next to the fraction doesn't necessarily denote the suggestion author's preference.

\makebox[2in][l]{1. Original}$\dfrac{1-k^{m+n+d}}{1-k}$


\makebox[2in][l]{2. egreg}$\dfrac{1-k^{m+n+d}}{1-k^{\hphantom{m+n+d}}}$


\makebox[2in][l]{3. projetmbc}$\dfrac{1-k^S}{1-k}, \text{ with $S=m+n+d$}$


\makebox[2in][l]{4. Peter Grill}$\dfrac{1-k^{\mathrlap{m+n+d}}}{1-k}$


Take your pick.

enter image description here

Everybody can add here their personal preference.

  • egreg: version 1 (with an eye to 3)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.