\overbrace and \underbrace with square bracket
Try \mathtools
's \underbracket
and \overbracket
:
\documentclass{article}
\usepackage{mathtools}% http://ctan.org/pkg/mathtools
\begin{document}
\[
\overbrace{a+b+c}^{d} \quad \overbracket{a+b+c}^{d} \quad
\underbrace{a+b+c}_{d} \quad \underbracket{a+b+c}_{d}
\]
\end{document}
You can adjust the rule width and bracket height/depth via optional arguments. From the mathtools
documentation (section 3.3.2 Braces and brackets, p. 14):
\underbracket[<rule thickness>][<bracket height>]{<arg>}
\overbracket[<rule thickness>][<bracket height>]{<arg>}
Or, a more subtle approach with abraces
:
\documentclass{article}
\usepackage{abraces}% http://ctan.org/pkg/abraces
\begin{document}
\[
\overbrace{a+b+c}^{d} \quad \aoverbrace[L1R]{a+b+c}^{d} \quad
\underbrace{a+b+c}_{d} \quad \aunderbrace[l1r]{a+b+c}_{d}
\]
\end{document}
The usage requires a brace specification <spec>
as an optional argument to \aoverbrace
and \aunderbrace
(see the abraces
documentation):
The "standard LaTeX" underbraces and overbraces quickly become straight lines with only minor bumps as soon as the material being embraced (pun intended) is of more than minimal length. To add some visual interest and pizzazz, one may want to consider using the \undercbrace
and \overcbrace
macros of the MathTime Professional 2 package. Note that the full mtpro2 package isn't free of charge; however, its "lite" subset, which is all that's required to generate the curly braces shown below, is indeed available free of charge.
\documentclass{article}
\usepackage[lite]{mtpro2}%
\begin{document}
Curly over- and underbraces of the \texttt{mtpro2} package:
\[
\overcbrace{a+b+c+d+e+f}^{ghi} \quad
\undercbrace{a+b+c+d+e+f}_{ghi}
\]
``Standard \LaTeX'' over- and underbraces:
\[
\overbrace{a+b+c+d+e+f}^{ghi} \quad
\underbrace{a+b+c+d+e+f}_{ghi}
\]
\end{document}