2

I have this code

\[
[-0.5 0 -1.5]
\]

but I get this result:

enter image description here

I want to respect the spaces, how do I fix it?

5

With array or a TABstack. With the latter, the intercolumn gap is specified by way of \setstacktabbedgap{6pt}.

You could also use a \bracketMatrixstack{} in lieu of [\Matrixstack{}], which would invoke the \left[...\right] mechanism, in case the matrix grew to several rows in height.

\documentclass{article}
\usepackage{tabstackengine}
\TABstackMath
\setstacktabbedgap{6pt}
\begin{document}
\[
[\begin{array}{@{}ccc@{}}
-0.5 & 0 &-1.5
\end{array}]
\]
\[
[\Matrixstack{-0.5 & 0 &-1.5}]
\]
\[
\bracketMatrixstack[r]{-0.5 & .0 &-1.5\\ 11.0 & 2.0 & 3.0}
\]
\end{document}

enter image description here

|improve this answer|||||
4

Or you can simply use \[[0.5\,0\,0.5]\]. That will provide space between numbers.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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