Math & ScienceAlignment question about \overbrace{}^{}

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
haha8888
Posts: 3
Joined: Fri May 20, 2011 3:08 am

Alignment question about \overbrace{}^{}

Post by haha8888 »

Hi guys,

I have a question about how to make the overbrace line up on the same horizental. See the attached example. You can see because of the exponent, the overbrace over these components cannot be aligned. Can anyone have some good idea to sort it out? Many thanks

BTW, why can't I post the sample image like jpg (I can't use upload attachment privillage?)

Donald
Last edited by haha8888 on Sun May 22, 2011 2:25 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

Re: Alignment question about \overbrace{}^{}

Post by Stefan Kottwitz »

Hi Donald,

you could post the code which produces the undesired alignment, so we could help to fix it.

Stefan
LaTeX.org admin
haha8888
Posts: 3
Joined: Fri May 20, 2011 3:08 am

Alignment question about \overbrace{}^{}

Post by haha8888 »

Hi Stefan,

Thanks for the suggestion. My code is as follows:

Code: Select all

\[
\begin{array}{l}
\overbrace{\fbox{\raisebox{0ex}[2\height]{$\alpha^{(1)}\overrightarrow{e}_1^{(1)}$,}}}^{n_{1}}
        \overbrace{~~\fbox{\raisebox{0ex}[2\height]{$0^{n_{1}}$,}}~~}^{n_{1}}
\end{array}
\]
You see the result is not so good. I want make the overbrace line up horizentally ( on the same level). I set the same height "2" in the raisebox. The height should be the same for two boxes, why did I get different height in the result? Thanks!

Donald
User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

Alignment question about \overbrace{}^{}

Post by Stefan Kottwitz »

Hi Donald,

you could use an invisible vertical line in the argument of \overbrace, such as:

Code: Select all

\[
\begin{array}{l}
\overbrace{\rule{0pt}{6ex}\fbox{\raisebox{0ex}[2\height]{$\alpha^{(1)}\overrightarrow{e}_1^{(1)}$,}}}^{n_{1}}
\overbrace{\rule{0pt}{6ex}~~\fbox{\raisebox{0ex}[2\height]{$0^{n_{1}}$,}}~~}^{n_{1}}
\end{array}
\]
Stefan
LaTeX.org admin
haha8888
Posts: 3
Joined: Fri May 20, 2011 3:08 am

Re: Alignment question about \overbrace{}^{}

Post by haha8888 »

Thanks so much. It's just what I want!
Post Reply