5
\[
\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

4
  • See also Enforcing baseline alignment for multiple overbraces in math mode (possible duplicate?) Mar 14, 2013 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, 2013 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".
    – jub0bs
    Mar 14, 2013 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, 2013 at 14:14

2 Answers 2

6

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?)

4
  • @Thanks +1. Is there another solution than vphantom?
    – user7064
    Mar 14, 2013 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, 2013 at 14:37
  • Thx, I will try and probably accept thereafter
    – user7064
    Mar 14, 2013 at 15:45
  • @daleif using [b] with delimiters is where delarray comes in:-) Mar 14, 2013 at 17:29
1

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}
2
  • 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, 2013 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 Mar 14, 2013 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .