Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\[
\underbracket[0.5pt]{\left(
\begin{array}{c}
a \\
b
\end{array}
\right)}_{v_1} \qquad
\underbracket[0.5pt]{\left(
\begin{array}{c}
a \\
b \\
c
\end{array}
\right)}_{v_2}
\]

gives

enter image description here

I would like both brackets to lie on the same line, i.e., sthg like enter image description here

share|improve this question
    
See also Enforcing baseline alignment for multiple overbraces in math mode (possible duplicate?) –  Hendrik Vogt Mar 14 '13 at 13:41
    
@HendrikVogt: Thanks for the link. I thought about vphantom. However, I am looking for another solution that works in more complicated examples? –  user7064 Mar 14 '13 at 13:43
    
@user7064 It may be possible to produce a more general solution to the baseline-alignment problem, but you need to explain what you mean by more "complicated examples". –  Jubobs Mar 14 '13 at 14:10
    
@Jubobs: I have an equation that combines several vectors and matrices (of different lengths/dimensions). Using \vphantom might be possible, but will result in awfull code... –  user7064 Mar 14 '13 at 14:14

2 Answers 2

up vote 6 down vote accepted

use

\underbracket[0.5pt]{\left(
  \begin{array}{c}
  a \\
  b
 \end{array}
 \right)
 \vphantom{\left(\begin{array}{c}a \\b \\c\end{array}\right)}
}_{v_1} 

EDIT: This might work

\begin{equation*}
  \begin{matrix}
    \begin{pmatrix}
      a \\ b
    \end{pmatrix}
    &
    \begin{pmatrix}
      a \\ b \\c 
    \end{pmatrix}
    \\[-1em]
    \underbracket[0.5pt]\qquad_{v1} 
    &
   \underbracket[0.5pt]\qquad_{v2} 
  \end{matrix}
\end{equation*}

enter image description here

(anyone know how to get dvipng to not to cut off so tightly?)

share|improve this answer
    
@Thanks +1. Is there another solution than vphantom? –  user7064 Mar 14 '13 at 13:45
    
Not really. The problem is that the fences (the ()'s) are symetric about the math centerline, thus we cannot just use the [b] option for array –  daleif Mar 14 '13 at 14:37
    
Thx, I will try and probably accept thereafter –  user7064 Mar 14 '13 at 15:45
    
@daleif using [b] with delimiters is where delarray comes in:-) –  David Carlisle Mar 14 '13 at 17:29

Please always post complete documents showing all packages used. (I only got mathtools due to other answers)

enter image description here

\documentclass{article}
\usepackage{delarray,mathtools}

\begin{document}

\[
\underbracket[0.5pt]{
\begin{array}[b]({c})
a \\
b
\end{array}
}_{v_1} \qquad
\underbracket[0.5pt]{
\begin{array}[b]({c})
a \\
b \\
c
\end{array}
}_{v_2}
\]

\end{document}
share|improve this answer
    
That was the package I had forgotten. I was messing with blockarray. Is delarray compatible with the array package and this memoir? –  daleif Mar 14 '13 at 18:22
1  
@daleif delarray uses array (actually delarray is a bit of array we decided not to put into the latex2e version of array) no reason why it shouldn't work with memoir –  David Carlisle Mar 14 '13 at 18:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.