# Fracs in clip with amsmath-package

I have this frac

$\cfrac{\cfrac{a}{b}}{c}$


Now i want to make clip around the upper frac (for a and b). Like this:

• Is the numerator the Jacobi symbol? – egreg Jun 12 '17 at 15:44
• It's just the letter a, as an example. – idontknowwhoiamgodhelpme Jun 12 '17 at 16:09

## 1 Answer

You can either use \left(...\right) to have brackets with a size automatically adjusted to the content, or use one of the macros \big, \Big, \bigg, \Bigg to manually choose the size of the brackets. Closest to your sketch comes, in my opinion, the use of \Big(...\Big):

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$\cfrac{\Big(\cfrac{a}{b}\Big)}{c}$

\end{document}


Edit: If you want to center this expression with respect to other math symbols (e.g. =), you can use the \raisebox macro to do that (see e.g. here). The easiest way is to try to adjust the raising by hand, for example:

$\raisebox{-5pt}{$\cfrac{\Big(\cfrac{a}{b}\Big)}{c}$}=0$


Note that you need to insert dollar signs again inside the second argument of \raisebox. If you want to do that a lot of times for different expressions, you can define a macro that does the raising for you. I tried to do that in a general way - the result is a good approximation, but not perfect. Using a boxes dimension as described here and length calculus as described here, I raise it by the symbols depth (to get the full symbol on the baseline), then lower it by half the symbols totalheight (to have the baseline at the symbol's center), and finally add half the height of a = (to have the = centered on the symbol, not the baseline). The result looks like this:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}

\setbox100=\hbox{$=$}
\newcommand{\Raise}[1]{\mathord{\raisebox{\dimexpr0.5\depth-0.5\height+0.5\ht0\relax}{$\displaystyle#1$}}}

\begin{document}

$\Raise{\cfrac{\Big(\cfrac{a}{b}\Big)}{c}}=0$

\end{document}


• Works perfect! I want to make an equal symbol next to it. So (a / b) / c = d. But my equal is next to the last frac (so between b und c). I want the equal in the middle of this 'formula' – idontknowwhoiamgodhelpme Jun 12 '17 at 15:46
• @ipo: See my updated answer. – Tiuri Jun 12 '17 at 18:01
• @Tiuri: In this case it isn’t really important, but the recommended idiom is \Bigl( ... \Bigr), not \Big( ... \Big). – GuM Jun 12 '17 at 18:35
• @ipo: Note that, in mathematics, there’s a meaning atteched to the vertical position of symbols, so you are not free to set it as you please. In this case, the equal sign must be aligned with the line of the main fraction. – GuM Jun 12 '17 at 18:38