Math & ScienceLength of column seperators in matrix environment

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
drgz
Posts: 44
Joined: Sat Apr 18, 2009 8:40 pm

Length of column seperators in matrix environment

Post by drgz »

Yesterday I found Stefan's article about column separators for the amsmath matrix environment; and they work great for my purpose.

However, I've noticed that the length of the vertical column separators is slightly longer than the size of the matrix brackets, thus making the solution a bit unattractive for my. This can also be seen in the pictures of the output at the url to Stefans' site.

So the question; is it possible to reduce the length of the vertical delimiters so that they are maybe slightly shorter than the matrix brackets (so it looks like they're on the "inside" of the matrix)?

I'll just use Stefan's short example here as a minimum example:

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  \hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \array{#1}}
\makeatother
\begin{document}
\[
\begin{pmatrix}[cc|c]
  1 & 2 & 3\\
  4 & 5 & 9
\end{pmatrix}
\]
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply