I just came upon this. Say that I have \[a \, b \, c \, d\]
Is it possible to put one underbrace from a to c,
and another one from b to d?
The examples in the user's guide are only of nested,
non-overlapping multiple underbraces. Overlapping ones
seem impossible, because the ranges are determined by
the curly brackets. There is no way to say that the
correspondence has to be
\underbrace{ ... \underbrace{ ... } ... }
1 2 1 2
Is there any other way to do it?
Thank you very much,
Minko Markov
PS It seems a good to be able to give names, i.e.
kind of labels, to objects? Like \lab{x, y}, where x is
anything valid that can occur at this place of the source,
and y is some internal ID of x. Then,
\[ \lab{a, obj1} \, \lab{b, obj2} \, \lab{c, obj3} \, \lab{d, obj4} \]
and then
\underbraceObjects{obj1, obj3} \underbraceObjects{obj2, obj4}
> I just came upon this. Say that I have \[a \, b \, c \, d\]
> Is it possible to put one underbrace from a to c,
> and another one from b to d?
How about an underbrace across one range and an overbrace over
the other? I put oubraces.sty on ctan many years ago.
Someone else came up with a neat solution using \rlap/\llap and
\phantom, shich you should probably search for using google/groups.
You could get two underbraces, if you insist, by putting \strut in
one sub-formula.
Donald Arseneau as...@triumf.ca
> Minko Markov <mma...@shaw.ca> writes:
>
> > I just came upon this. Say that I have \[a \, b \, c \, d\]
> > Is it possible to put one underbrace from a to c,
> > and another one from b to d?
>
> How about an underbrace across one range and an overbrace over
> the other? I put oubraces.sty on ctan many years ago.
Thanks! Actually, it is better than my idea of overlapping
underbraces, that would be messy.
Regards,
Minko Markov
> How about an underbrace across one range and an overbrace over
> the other? I put oubraces.sty on ctan many years ago.
Thanks you. It solves my problem too. I then can turn my [recent] stupid
hack:
$\overbrace{y + x}^{c_j}
\negthickspace \negthickspace \negmedspace
\underbrace{
\thickspace \thickspace \medspace
+ v}_{b_i}$
into something a lot nicer:
$\overunderbraces{&\br{2}{c_j}&}{&y +&x&+ v&}{& &\br{2}{b_i}}$
However, I've a trivial question. How can I turn my c_j and b_i into the
usual superscript/subscript font size. I could have forced them in my
formula, but I think it is neater to do within the .sty file. My problem
is that I've zero experience in hacking a .sty file. Could you please shed
some light?
Cheers
陳大文
Chan Tai Man
Take a look at the package "oubraces" - it may give you some good ideas how
to accomplish what you need.
Regards,
Pavlin
"Minko Markov" <mma...@shaw.ca> wrote in message
news:2zo1v6...@shaw.ca...
> Hello,
>
> Take a look at the package "oubraces" - it may give you some good ideas how
> to accomplish what you need.
Hey,
Indeed, works well. Two porblems with it: the math font *of the index*
of the under/overbrace is too large. I'm not sure I am using the
correct terms: the letters are visibly larger than the ones that
\underbrace{..}_{<index>}
produces. This may have a trivial solution, I dunno. Second, since
oubraces uses ampersands for delimiters, it seems that you cannot
do vertical aignment of those equations, because "align" and "alignat"
also use ampersands.
Regards,
Minko
> Donald Arseneau <as...@triumf.ca> wrote:
>
> > How about an underbrace across one range and an overbrace over
> > the other? I put oubraces.sty on ctan many years ago.
>
> Thanks you. It solves my problem too. I then can turn my [recent] stupid
> hack:
>
> $\overbrace{y + x}^{c_j}
> \negthickspace \negthickspace \negmedspace
> \underbrace{
> \thickspace \thickspace \medspace
> + v}_{b_i}$
I checked on Google, and it was Heiko Oberdeik who suggested
using \rlap and \phantom:
$\rlap{\overbrace{\phantom{y + x}}^{c_j}}
y + \underbrace{x + v}_{b_i}$
> $\overunderbraces{&\br{2}{c_j}&}{&y +&x&+ v&}{& &\br{2}{b_i}}$
>
> However, I've a trivial question. How can I turn my c_j and b_i into the
> usual superscript/subscript font size.
I guess that is a bug in oubraces.sty. You can use
\br{2}{\scriptstyle b_i}
or fix the line in oubraces.sty:
\def\br@label#1#2{\multispan{#1}\hidewidth $\scriptstyle {#2}$\hidewidth}
Donald Arseneau as...@triumf.ca
You've a great help to me. Thanks.
Donald Arseneau <as...@triumf.ca> wrote:
> I checked on Google, and it was Heiko Oberdeik who suggested
> using \rlap and \phantom:
> $\rlap{\overbrace{\phantom{y + x}}^{c_j}}
> y + \underbrace{x + v}_{b_i}$
On my LaTeX installation, it was happy until this:
$\overbrace{\phantom{y + x}}^{c_j}
y + \underbrace{x + v}_{b_i}$
Once \rlap{...} is added, it says
! Missing $ inserted.
which I do not comprehends. I tried more $ in two groups and/or \rlap{...}
to embrace different thingy, but yet to get the same result as from
overunderbraces.
> I guess that is a bug in oubraces.sty. You can use
> \br{2}{\scriptstyle b_i}
> or fix the line in oubraces.sty:
> \def\br@label#1#2{\multispan{#1}\hidewidth $\scriptstyle {#2}$\hidewidth}
Both of these works great. Thank you.
\rlap creates an \hbox, and that starts back in text mode; so the
contents of the \rlap need to be surrounded in braces.
--
Robin Fairbairns, Cambridge -- rf10 at cam dot ac dot uk
> > $\rlap{\overbrace{\phantom{y + x}}^{c_j}}
Oops. I meant \rlap{$...$}.
Robin answered too, but with his country's and continent's
currency debates, he is obviously confused, and thinks
"$" is a "brace" -- an ancient monetary unit, enough to
purchase enough pheasant for a banquet.
Donald Arseneau as...@triumf.ca
> Oops. I meant \rlap{$...$}.
Thanks a lot. It took me some head scratching to comprehend the idea that
a formula which contains a hbox which contains a formula. The nice thing
is that the result is very pleasing and has the same vertical spacing
(between the braces and the main expression) as simple overbrace/
underbrace. I've left an ugly looking formula in my paper draft for two
months, and glad that it was now over. Hurray!