[Tugindia] Matrix Column alignments

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Sat Jul 26 09:26:03 CEST 2003


Ashis Kumar Mal schrieb:

> |-0.32  0.32|
> | 0.32 -0.32|
> 
> Could someone please help me to align the columns 
> so that elements will be right aligned.
> [I don't want to use arrays here.]

redefine the matrix environment

Herbert

\documentclass{article}
\usepackage{amsmath}
\makeatletter
\def\env at matrix{\hskip -\arraycolsep
   \let\@ifnextchar\new at ifnextchar
   \array{*\c at MaxMatrixCols r}}
\makeatother
\begin{document}

\[
\begin{vmatrix}
  -0.32 & 0.32\\
   0.32 & -0.32
\end{vmatrix}
\]

\end{document}



More information about the tugindia mailing list