Sometimes I want to describe portions of an equation using
\overbrace in such a way that the portions are not completely distinct, for example:
/-------\ x = A + B + C + D + E \-------/ \---/
What is the best way to do this?
One can use commands
More complicated example:
P.S. The recipe is taken from the excellent book by S.Lvovski (http://www.mccme.ru/free-books/llang/newllang.pdf, in Russian).
|show 2 more comments|
This may not be the best solution, due to the overhead, but this is quite simple using TikZ. You insert invisible nodes at the points where you want the under and over braces to anchor to and then draw the braces between them. In my preamble, I have:
(Obviously, the name can be shortened if this is to be used a lot. I'm not sure off the top of my head which of the decorations library is needed; the calc one is optional but extremely useful.) Then, I would typeset your example using:
Reversing the order of the nodes flips the brace, so if that's the wrong way up then simply swap them. The stuff with the dollars is from the
I use this a lot in lectures: for adding strike-outs to things, for better-looking brackets on huge matrices, for all sorts of things where you want to add a little graphical decoration afterwards.
For more details, search for 'remember picture' in the TikZ manual, and browse the examples at http://texample.net.
Skip down to section 63.2 "Overlapping braces". He also gives examples of other tricks you may want to pull using braces.