From ee03b9da50173f49e8224ca79e2e6a99db620923 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 5 Aug 2009 13:28:35 +0000 Subject: cellspace update (3aug09) git-svn-id: svn://tug.org/texlive/trunk@14534 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/cellspace/cellspace.sty | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex/latex/cellspace') 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}} -- cgit v1.2.3