TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

I have a fraction with further fractions in both the numerator and denominator. I wish to label the fractions in the numerator and denominator with braces to the right. I would like these braces to span the full height of the fractions but I would not like them to extend the fraction line any further.

I have tried \frac{a}{\left.\frac{b}{c}\right}} which achieves the former but not the latter and I have tried \frac{a}{\frac{b}{c}\mathrlap{\}}} which achieves the latter but not the former, since I can't put one half of the \left \right pair inside \mathrlap and the other half outside.

share|improve this question
How often do you need this construction? If it's a one time thing you could simply use \big,\Big,... e.g. \frac{a}{\frac{b}{c}\mathrlap{\big\}}} – Jesper Ipsen Mar 16 '13 at 16:17
While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. – Peter Grill Mar 16 '13 at 16:24
up vote 4 down vote accepted

Perhaps what you are looking for is a combination of \mathrlap and \smash which is what is incorporated in the \BraceRight and \BraceLeft macros.

enter image description here

However, as HendrikVogt pointed out, this requires that there be manual spacing added afterwards if there is text that follows it. To alleviate this issue I have defined two more macros \FracBraceBottomRight and \FracBraceBottomLeft which also add the approriate \hptantom after or before the fraction.

enter image description here

One downside of this this is that you need a different macro in case you desire further options (such as optional braces around either side of the numerator. This can be fixed with a better interface to enable/disable the appropriate brace, but I think that that is more of a question of coming up with the better UI.





% http://tex.stackexchange.com/questions/54023/how-to-compute-exact-width-added-by-left-right

Requires manual spacing:


Auto spacing with \verb|\hphantom|:

share|improve this answer
Note that the brace will produce an overlap with material after the fraction. – Hendrik Vogt Mar 16 '13 at 16:33
@HendrikVogt: Yep just noticed that when doing the macro verion. Best fix I can think of is to have a macro that accepts the numerator and denominator of the fraction as paramaters and then adds the brace with an appropriate \hphantom following. But, for the general case, this would require numerous different macros depending on if you perhaps wanted the brace on the top/bottom, left/right or any combinations of these. Of course there is always the tikz way. :-) – Peter Grill Mar 16 '13 at 16:41
Yep, you'll need an appropriate \hphantom after the fraction. – Hendrik Vogt Mar 16 '13 at 16:44

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.