# \overbrace split accross multiple lines

Is there a way to split the overbrace so that it appears in two halves over a multi-line equation. Something like

/-----------Overbrace Label----
Equation over which to place
----------------------\
the overbrace.

-

One approach would be to use the adjustbox package from Martin Scharrer. It provides a \clipbox{<llx> <lly> <urx> <ury>}{<text>} macro for trimming and clipping output. Both \overbraces in each line is clipped - the top from the right by specifying a value for <urx> and bottom from the left by specifying a value for <llx>. The following minimal example highlights this proof of concept:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{multline*}
f(x)=a_0+a_1x+a_2x^2+\clipbox{-2 0 5 0}{$\overbrace{a_3x^3+a_4x^4+\cdots+a_{i-1}x^{i-1}+\hspace{1em}}^{\text{some text}}$} \$\jot] \clipbox{100 0 -2 0}{\overbrace{\phantom{\hspace{10em}}a_ix^i+a_{i+1}x^{i+1}}}+\cdots+a_{n-1}x^{n-1} \end{multline*} \end{document}  Specifying a value of -2 for either <llx> or <urx> in the above code makes sure that the brace end left in view is not potentially trimmed ever so slightly. The other thing to make sure is that the braces are adjusted for the correct clipping. Otherwise, for example, the bottom brace will still show a cusp. I'm sure some manual tweaking will provide you with the flavour of multi-line overbrace that you want. For completeness, here is a description on how to achieve overlapping under-/overbraces if you have an equation on a single line. Reprinting parts of the equation using \phantom can be used so that the horizontal placement is accurate. Here is a minimal working example demonstrating the principle: \documentclass{article} \usepackage{mathtools}% For \mathclap, \mathllap, \mathrlap \begin{document} \[ f(x)=\mathrlap{\underbrace{\vphantom{a_{n-1}}\phantom{a_0+a_1x+a_2x^2}}_{\text{some text}}} \mathrlap{\phantom{a_0+a_1x+}\overbrace{\phantom{\:a_2x^2+a_3x^3+\cdots}}^{\text{some other text}}} a_0+a_1x+a_2x^2+a_3x^3+\underbrace{\cdots+a_{n-1}x^{n-1}}_{\text{some more text}}+a_nx^n$
\end{document}


The mathtools package provides similar math mode overlapping macros to the textual \rlap, \clap and \llap counterparts. Respectively, these macros allow right r, center c and left l overlap within math mode. The use of \phantom{...} allows for correct horizontal placement, while \vphantom{...} ensures correct vertical placement across \underbraces.

-
@Caramdir: You're right. I've updated my answer with an attempt at obtaining the OP's request. – Werner Aug 11 '11 at 22:07
I think the question is about splitting the brace over two line and not about meshing over- and underbraces. – Caramdir Aug 12 '11 at 2:49
How did you manage to post that comment 6 hours ago? Time-traveling? :) – Caramdir Aug 12 '11 at 4:13
True. I saw that. I deleted the older "Oooo..." comment and immediately reposted with the update. Don't know what happened. The StackLords must have been at work. – Werner Aug 12 '11 at 4:16
Actually, the comment is older than the question. :) (good answer, btw). – Caramdir Aug 12 '11 at 4:18