summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cellspace/cellspace.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/cellspace/cellspace.sty')
-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}}