summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cellspace
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-08-05 13:28:35 +0000
committerKarl Berry <karl@freefriends.org>2009-08-05 13:28:35 +0000
commitee03b9da50173f49e8224ca79e2e6a99db620923 (patch)
tree7669887f57b62cb9c3777886864f05b844e7c611 /Master/texmf-dist/tex/latex/cellspace
parent57492ca80acec7230b5a56b6cea74388c7b8f6f6 (diff)
cellspace update (3aug09)
git-svn-id: svn://tug.org/texlive/trunk@14534 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cellspace')
-rw-r--r--Master/texmf-dist/tex/latex/cellspace/cellspace.sty25
1 files changed, 23 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/cellspace/cellspace.sty b/Master/texmf-dist/tex/latex/cellspace/cellspace.sty
index 0da49c33eca..387025e669d 100644
--- a/Master/texmf-dist/tex/latex/cellspace/cellspace.sty
+++ b/Master/texmf-dist/tex/latex/cellspace/cellspace.sty
@@ -1,4 +1,4 @@
-% (C) 2006 Josselin Noirel
+% (C) 2006-2009 Josselin Noirel
%
% Package cellspace: Ensuring a minimal spacing of table cells.
%
@@ -9,7 +9,7 @@
\def \filedate {#4}%
\def \fileversion {v#3}%
}
-\@tempa $Id: cellspace.sty,v 1.5 2006/03/13 19:28:10 noirel Exp $
+\@tempa $Id: cellspace.sty,v 1.6 2009/07/31 09:00:00 noirel Exp $
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cellspace}%
@@ -39,6 +39,7 @@
\newboolean{cellspace@lr} % Is it a LR column type ?
\newboolean{cellspace@} % Is it a paragraph column that needs to be
% spaced out?
+\newboolean{cellspace@m} % [math] option: matrices
\@ifdefinable \cellspacetoplimit {\newdimen \cellspacetoplimit}
\@ifdefinable \cellspacebottomlimit {\newdimen \cellspacebottomlimit}
@@ -48,6 +49,14 @@
\setlength{\cellspacetoplimit}{1pt}
\setlength{\cellspacebottomlimit}{1pt}
+% Options
+
+\DeclareOption{math}{\setboolean{cellspace@m}{true}}
+\DeclareOption{nomath}{\setboolean{cellspace@m}{false}}
+
+\ExecuteOptions{nomath}
+\ProcessOptions
+
% 4. Redefinitions
\renewcommand*{\@startpbox}[1]{%
@@ -111,6 +120,18 @@
\let \@@startpbox = \@startpbox
\let \@@endpbox = \@endpbox
+% Make it work with matrices
+% 31 Jul 2009: suggested by Bastien Roucaries (for a long time)
+
+\ifcellspace@m
+ \RequirePackage{amsmath}%
+ \def \env@matrix {%
+ \hskip -\arraycolsep
+ \let \@ifnextchar \new@ifnextchar
+ \array{*{\c@MaxMatrixCols}{>{$}Sc<{$}}@{}}%
+ }
+\fi
+
% 5. Defining a prefix
\newcolumntype{S}[1]{>{\bcolumn #1\@nil}#1<{\ecolumn}}