I have (another) question on typesetting inline row vectors.
I'm using amsmath and mathtools. I'm aware of the smallmatrix environment. Unfortunately, the elements of the vector get scaled. This seems completely unnecessary to me. Also the bmatrix environment is not a solution for me, since the delimiters are larger than "normal" text brackets.
I'd like to have something more like
\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\begin{document}
Text $[\,x^* \quad y^*\,]^*$
instead of
$
\begin{bmatrix}
x^* & y^*
\end{bmatrix}^*
or
\begin{bsmallmatrix}
x^* & y^*
\end{bsmallmatrix}^*
$
\end{document}
Is there a package that can handle this special case for an arbitrary number of elements in the row vector?
Best Answer
I recommend a general solution so that you can change the behaviour later, apart from using a more clean input code. Here's one with expl3.
And you can input
\vect{x,y,z,t,u,v}
, or\vect*{\int,\sum,\prod}
or\vect[\Big]{a,b,\frac{n}{z}}
, etc. like any other delimiter from\DeclarePairedDelimiter
. Substitute\enspace
for any space you want.Addition
In case what you want is to input
\vect{x,y,z}
and get [x^* y^* z^*]^* just change one command