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.

Here's a minimal example of what I'm doing presently:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{arydshln}
\makeatletter
    \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
      \hskip -\arraycolsep
      \let\@ifnextchar\new@ifnextchar
  \array{#1}}
\makeatother

\begin{document}
$\begin{pmatrix}[ccc:c]
  1&2&3&0 \\
  4&5&6&0 \\
  7&8&9&0 \\
\end{pmatrix}$
\end{document}

Here's what the output looks like:

Present output (parens)

I'd prefer if the left and right brackets on the matrix were square brackets instead of parentheses.

Is there an easy way to make such a change?

share|improve this question
3  
A excellent summary of matricies is in this answer: where is the matrix command –  Peter Grill Nov 21 '11 at 17:46
    
Nice. That is a good summary. –  Harold Nov 21 '11 at 17:59
add comment

1 Answer

up vote 8 down vote accepted

Easy. Change pmatrix to bmatrix:

enter image description here

See amsmath documentation for other kinds of matrices, like vmatrix, Vmatrix, etc

share|improve this answer
    
Thanks @Boris! That works great! I really appreciate the help. –  Harold Nov 21 '11 at 17:42
1  
or look at mathmode.pdf (26.6 Matrix environments) with texdoc mathmode.pdf –  Alain Matthes Nov 21 '11 at 17:42
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.