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.

I would like to get 1:n matrix with \left, \right size parentheses. Default size looks not so good. Now I have

$\begin{pmatrix}
f_0 & \ldots & f_L
\end{pmatrix}^T$

The view I get

enter image description here

I can get the view that I want like this

$\left(f_0 \quad \ldots \quad f_L\right)^T$

enter image description here

but maybe there is a better solution?

share|improve this question
2  
Why do you think it doesn't look good enough? Try compiling \documentclass{standalone}\usepackage{amsmath,tikz} \begin{document}\begin{tikzpicture}\node[red] (a) {$\begin{pmatrix}f_0 & \ldots & f_L\end{pmatrix}^T$};\node[blue] (b) {$\left(f_0 \quad \ldots \quad f_L\right)^T$}; \end{tikzpicture}\end{document} I think pmatrix solution is pretty OK. –  percusse May 24 '12 at 8:41
    
@percusse: Yes, in your sample document I can really see what I want, however, in my doc the view is not the same (see example in edited message). Is that because of other packages I use? –  Pavasaris May 24 '12 at 9:00
    
@Pavasaris Quite possibly! It is best to compose a fully working (ie so that someone can cut-and-paste it and compile it without adding anything) example (preferably also minimal) so that others can see exactly what you're seeing. –  Andrew Stacey May 24 '12 at 9:12
1  
You're probably using \setspace or another method for widening the interline space. So no: a one line "matrix" is out of the question, use the simple parentheses. –  egreg May 24 '12 at 9:13
    
@egreg: OK. Thank you. –  Pavasaris May 24 '12 at 9:21
show 1 more comment

1 Answer

up vote 9 down vote accepted

If you are using a package such as setspace or a similar method in order to widen the interline spacing, then you're out of luck.

The array environment uses the current baseline skip (distance between consecutive lines of text) to set itself up and the matrix environments provided by amsmath rely on array and this is probably why the parentheses grow in your example.

You can circumvent the problem by defining your own command:

\newcommand{\rowvector}[1]{%
  \begingroup\def\arraystretch{0}\begin{pmatrix}
  #1
  \end{pmatrix}\endgroup}

Then the input

$\rowvector{f_0 & \ldots & f_L}^T$

will work as you want.

share|improve this answer
add comment

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.