summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-30 01:08:01 +0000
committerKarl Berry <karl@freefriends.org>2010-12-30 01:08:01 +0000
commit23e7dcd67bf998e35a72c812629bb8bb5c26d2b5 (patch)
tree595ded633d6557102bc51bac576ccb5978f6bc2c /Master/texmf-dist/tex
parent7ddba07a080f5b9d0b7e69f1b0118693fa8d9e9c (diff)
tabu (29dec10)
git-svn-id: svn://tug.org/texlive/trunk@20877 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/tabu/tabu.sty229
1 files changed, 148 insertions, 81 deletions
diff --git a/Master/texmf-dist/tex/latex/tabu/tabu.sty b/Master/texmf-dist/tex/latex/tabu/tabu.sty
index 76b129c0a6d..b123d51ce9b 100644
--- a/Master/texmf-dist/tex/latex/tabu/tabu.sty
+++ b/Master/texmf-dist/tex/latex/tabu/tabu.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% tabu : 2010/12/18 v1.7 - tabu : Flexible LaTeX tabulars
+%% tabu : 2010/12/28 v1.8 - tabu : Flexible LaTeX tabulars
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -25,10 +25,9 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{tabu}[2010/12/18 v1.7 - flexible LaTeX tabulars (FC)]
+\ProvidesPackage{tabu}[2010/12/28 v1.8 - flexible LaTeX tabulars (FC)]
\RequirePackage{array}[2008/09/09]
\RequirePackage{varwidth}[2009/03/30]
-\let\DEBUG\@gobble%\message
\AtEndOfPackage{\tabu@AtEnd\let\tabu@AtEnd\@undefined}
\let\tabu@AtEnd\@empty
\def\TMP@EnsureCode#1#2{%
@@ -45,14 +44,18 @@
\let\tabu@message \@gobble
\let\tabu@message@save \@gobble
\let\tabu@debug \@gobble
+\let\tabu@timerstart \relax
\def\tracingtabu{%
\let\tabu@message \message
\let\tabu@message@save \tabu@tracing@save
+ \ifdefined \pdfelapsedtime
+ \def\tabu@timerstart{\edef\tabu@starttime{\the\pdfelapsedtime}}%
+ \let\tabu@elapsedtime \tabu@message@etime\fi
\@ifnextchar={\tabu@tracing}{}}
\def\tabu@tracing{\begingroup\afterassignment\tabu@tr@cing\count@}
\def\tabu@tr@cing{\expandafter\endgroup\ifnum\count@>\@ne
\let\tabu@debug\message\else\let\tabu@debug\@gobble\fi}
-\DeclareOption{debugshow}{\AtEndOfPackage\tracingtabu}
+\DeclareOption{debugshow}{\AtEndOfPackage{\tracingtabu\relax}}
\let\tabudefaulttarget \linewidth
\DeclareOption{linegoal}{%
\AtEndOfPackage{%
@@ -76,7 +79,6 @@
{\string\tabucline\space is not available with option `light'}\@ehd}
\ProcessOptions
\AtBeginDocument{%
- \@ifundefined{NC@rewrite@X}{\newcolumntype{X}{}}{}% new column X if not exists
\expandafter\in@ \expandafter\@arrayright\expandafter{\endarray}%
\ifin@ \let\tabu@endarray \endarray
\else \tabu@fix@arrayright \fi % <fix for colortbl & arydshln (delarray)>
@@ -88,9 +90,9 @@
\newcount \tabu@cnt
\newcount \tabu@nbcols
\newcount \tabu@X@cols
+\newcount \tabu@nested
\newcount \tabu@start
\newcount \tabu@stop
-\newcount \tabu@nested
\newdimen \tabu@target
\newdimen \tabu@spreadtarget
\newdimen \tabu@naturalX
@@ -108,16 +110,35 @@
\def\tabu@gobbleopt#1{\@ifnextchar [{\tabu@gobble@pt{#1}}{#1}}%]
\def\tabu@gobble@pt#1[#2]{#1}
\def\tabu@save@decl{%
- \toks\count@ = \expandafter{\the\toks\expandafter\count@\@nextchar}%
+ \toks\count@ =\expandafter{\the\toks\expandafter\count@ \@nextchar}%
}% \tabu@save@decl
-\newcommand\tabu@NC@rewrite@X[1][]{\tabu@rewrite@X{#1}%
- \let\@halignto \relax
- \expandafter \NC@find \tabucolX@rw}
\def\tabu@newcolumntype #1{%
- \expandafter\def\csname NC@find@\string#1\endcsname##1#1{\NC@{##1}}%
- \expandafter\def\csname NC@rewrite@\string#1\endcsname%
+ \expandafter\tabu@new@columntype
+ \csname NC@find@\string#1\expandafter\endcsname
+ \csname NC@rewrite@\string#1\endcsname
+ {#1}%
}% \tabu@newcolumntype
-\tabu@newcolumntype \usetabu #1{%
+\def\tabu@new@columntype #1#2#3{%
+ \def#1##1#3{\NC@{##1}}%
+ \let#2\relax \newcommand*#2%
+}% \tabu@new@columntype
+\def\tabu@privatecolumntype #1{%
+ \expandafter\tabu@private@columntype
+ \csname NC@find@\string#1\expandafter\endcsname
+ \csname NC@rewrite@\string#1\expandafter\endcsname
+ \csname tabu@NC@find@\string#1\expandafter\endcsname
+ \csname tabu@NC@rewrite@\string#1\endcsname
+ {#1}%
+}% \tabu@privatecolumntype
+\def\tabu@private@columntype#1#2#3#4{%
+ \g@addto@macro\tabu@privatecolumns{\let#1#3\let#2#4}%
+ \tabu@new@columntype#3#4%
+}% \tabu@private@columntype
+\let\tabu@privatecolumns \@empty
+\tabu@privatecolumntype X[1][]{\tabu@rewrite@X{#1}%
+ \let\@halignto \relax
+ \expandafter \NC@find \tabucolX@rw}
+\tabu@privatecolumntype \usetabu [1]{%
\ifx\\#1\\\tabu@saveerr{}\else
\@ifundefined{tabu@saved@\string#1}
{\tabu@saveerr{#1}}
@@ -125,7 +146,7 @@
\csname tabu@saved@\string#1\expandafter\endcsname\expandafter\z@}%
\fi
}% \NC@rewrite@\usetabu
-\tabu@newcolumntype \preamble #1{%
+\tabu@privatecolumntype \preamble [1]{%
\ifx\\#1\\\tabu@saveerr{}\else
\@ifundefined{tabu@saved@\string#1}
{\tabu@saveerr{#1}}
@@ -133,25 +154,46 @@
\fi
}% \NC@rewrite@\preamble
\tabu@newcolumntype \tabu@rewritefirst{%
- \tabu@X@cols \z@ \let\NC@rewrite@X \tabu@NC@rewrite@X
- \let\tabu@dimexpr \relax \aftergroup \tabu@global@temp
- \aftergroup \tabu@restore@NC@list
+ \tabu@X@cols \z@
+ \let\tabu@dimexpr \relax
+ \let\tabu@savepreamble \relax
+ \let\NC@rewrite@X \tabu@NC@rewrite@X
+ \gdef\tabu@global@temp {\tabu@savepreamble}%
+ \aftergroup \tabu@global@temp
+ \let\tabu@islast \relax
+ \tabu@privatecolumns
\NC@list{\NC@do\usetabu \NC@do\preamble \NC@do *}%
\tabu@lines % defines NC@rewrite@| for tabu only (inside @mkpream group)
- %\NC@list\expandafter{\the\NC@list \NC@do X\NC@do\tabu@rewritelast}%
-%% \message{NC@list est: \the\NC@list^^J}%
\NC@list\expandafter{\the\expandafter\NC@list \expandafter\NC@do \expandafter X%
- \tabu@NC@list \NC@do\tabu@rewritelast}%
-%% \message{NC@list est: \the\NC@list^^J}%
+ \tabu@NC@list \NC@do X\NC@do\tabu@rewritemiddle}%
\ifcat$\d@llarend\else
\let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode
- \NC@find \tabu@rewritelast
+ \NC@find \tabu@rewritemiddle
}% NC@rewrite@\tabu@rewritefirst
-\def\tabu@restore@NC@list{\NC@list\expandafter{\tabu@NC@list}}
-\tabu@newcolumntype \tabu@rewritelast{%
+\def\tabu@savepreamble{%
+ \gdef\tabu@global@temp{}%
\NC@list\expandafter{\tabu@NC@list}%
+ \let\tabu@savedpreamble \@preamble
+}% \tabu@savepreamble
+\tabu@newcolumntype \tabu@rewritemiddle{%
+ \NC@list\expandafter{\tabu@NC@list \NC@do\tabu@endrewrite \NC@do\tabu@rewritelast}%
+ \tabu@checklast
+}% \NC@rewrite@\tabu@rewritemiddle
+\def\tabu@checklast#1\relax{%
+ \def\tabu@temp{#1}%
+ \ifx \tabu@temp\tabu@islast
+ \expandafter\tabu@lastrewrite
+ \else \let\tabu@islast \tabu@temp
+ \expandafter\NC@find \expandafter\tabu@rewritelast
+ \fi
+ #1\relax
+}% \tabu@checklast
+\tabu@newcolumntype \tabu@rewritelast{\NC@find \tabu@endrewrite}
+\tabu@newcolumntype \tabu@endrewrite{\tabu@checklast}
+\def\tabu@lastrewrite{%
\let\tabu@next \NC@find
\ifx \@halignto\relax % found a X column
+ \edef\tabu@global@X{\tabu@global@X \tabu@X@cols\the\tabu@X@cols\relax}%
\ifx \tabu@halignto\relax % X column measure
\tabu@global@Xnested
\iftabu@negcoef \aftergroup\tabu@negcoeftrue \fi
@@ -161,15 +203,15 @@
\else
\aftergroup \tabu@setup@everycr
\ifdim \tabu@target=\z@ \else
- \let\tabu@next \tabu@rewritelast \fi % <need \extracolsep ?>
+ \let\tabu@next \tabu@extracolsep \fi % <need \extracolsep ?>
\fi
\let\@halignto \tabu@halignto
\tabu@next
-}% \NC@rewrite@\tabu@rewritelast
-\def\tabu@rewritelast{\futurelet\tabu@temp \tabu@rewrite@last}
-\def\tabu@rewrite@last{%
+}% \tabu@lastrewrite
+\def\tabu@extracolsep{\futurelet\tabu@temp \tabu@extracol@sep}
+\def\tabu@extracol@sep{%
\ifx \tabu@temp\@sptoken
- \expandafter\tabu@gobblespace \expandafter\tabu@rewritelast
+ \expandafter\tabu@gobblespace \expandafter\tabu@extracol@sep
\else
{\endlinechar\m@ne\scantokens{\let\x |}%
\expandafter}\ifx \x\tabu@temp
@@ -180,11 +222,12 @@
\def\tabu@next {\NC@find !{\extracolsep\@flushglue}}\fi\fi
\expandafter\tabu@next
\fi
-}% \tabu@rewritelast
-\def\tabu@global@Xnested{\global\expandafter\let
- \csname tabu@global@X\the\tabu@nested\endcsname\tabu@global@X
- \aftergroup\let \aftergroup\tabu@global@X
- \expandafter\aftergroup \csname tabu@global@X\the\tabu@nested\endcsname
+}% \tabu@extracol@sep
+\def\tabu@global@Xnested{\expandafter\tabu@global@X@nested
+ \csname tabu@global@X\the\tabu@nested\endcsname}
+\def\tabu@global@X@nested#1{%
+ \global\let#1\tabu@global@X
+ \aftergroup\let \aftergroup\tabu@global@X \aftergroup#1%
}% \tabu@global@Xnested
\newif\iftabu@colortbl
\def\tabu@nowrite#1#{{\afterassignment}\toks@}
@@ -213,12 +256,12 @@
{longtabu requires the longtable package}\@ehd}
\def\tabu@setup{%
\tabu@adl@fix \let\endarray \tabu@endarray % <fix> colortbl & arydshln (delarray)
- \let\tabu@global@temp \@empty \let\tabu@global@X \@empty
+ \let\tabu@global@X \@empty
\ifx \verbatim\tabu@sanitizetext % <nested tabu>
\tabu@setup@saveglobal
\advance\tabu@nested \@ne
\def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth
- \else
+ \else \tabu@timerstart
\def\tabu@aligndefault{c}\edef\tabu@hfuzz {\the\hfuzz}%
\global\tabu@footnotes{}\aftergroup\the\aftergroup\tabu@footnotes
\ifdim\parindent>\z@ \ifx\linewidth\tabudefaulttarget
@@ -233,13 +276,14 @@
\let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext
\let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering
\let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft
- \tabu@trivlist %<restore \\=\@centercr inside lists>
+ \tabu@trivlist %<restore \\=\@normalcr inside lists>
\def\tabudecimal {\tabu@tabudecimal}\let\verbatim \tabu@sanitizetext
- \let\fbox \tabu@fbox \let\rowfont \tabu@rowfont
+ \let\fbox \tabu@fbox \let\color@b@x \tabu@color@b@x
+ \let\rowfont \tabu@rowfont
\let\prepnext@tok \tabu@prepnext@tok %<for \rowfont and \tabucline>
\everycr{}\let\tabu@everycr \everycr
\tabu@spreadfalse \tabu@measuringfalse \tabu@negcoeffalse
- \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do\tabu@rewritefirst \NC@do *}%
+ \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}%
}% \tabu@setup
\def\tabu@setup@saveglobal{%
\expandafter\xdef\csname tabu@global@\the\tabu@nested\endcsname{%
@@ -264,8 +308,8 @@
\else \expandafter\tabu@begin
\fi
}% \tabu@sett@rget
-\def\tabu@to to{\def\@halignto{to}\tabu@gettarget}
-\def\tabu@spread spread{\tabu@spreadtrue\def\@halignto{spread}\tabu@gettarget}
+\def\tabu@to to{\def\tabu@halignto{to}\tabu@gettarget}
+\def\tabu@spread spread{\tabu@spreadtrue\def\tabu@halignto{spread}\tabu@gettarget}
\def\tabu@gettarget {\afterassignment\tabu@linegoaltarget \tabu@target}
\def\tabu@linegoaltarget {\futurelet\tabu@temp \tabu@linegoal@target}
\def\tabu@linegoal@target {%
@@ -274,16 +318,19 @@
\tabu@begin
}% \tabu@linegoal@target
\def\tabu@begin #1#{%
- \edef\@halignto {\ifdim\tabu@target>\z@ \@halignto\the\tabu@target\fi}%
- \let\tabu@halignto \@halignto
+ \edef\tabu@halignto{\ifdim\tabu@target>\z@ \tabu@halignto\the\tabu@target\fi}%
\@testopt \tabu@@begin \tabu@aligndefault #1\@nil
}% \tabu@begin
\def\tabu@@begin [#1]#2\@nil#3{%
\tabu@preparesave{#3}% <for \savetabu>
\def\tabu@align {#1}%
- \tabu@ [{\tabu@align}]#2{\tabu@rewritefirst #3}%
+ \tabu@ [\tabu@align]#2{\tabu@rewritefirst #3}%
}% \tabu@@begin
\def\tabu@preparesave #1{%
+ \iftabu@colortbl \@temptokena{}%
+ \tabu@prepare@save\CT@arc@
+ \tabu@prepare@save\CT@drsc@
+ \fi
\edef\tabu@savedparam{%
\ifmmode \col@sep \the\arraycolsep
\else \col@sep \the\tabcolsep \fi\relax
@@ -292,9 +339,16 @@
\extrarowheight \the\extrarowheight\relax
\extratabsurround \the\extratabsurround\relax
\def\noexpand\arraystretch {\arraystretch}%
- \iftabu@colortbl \minrowclearance\the\minrowclearance\relax \fi}%
+ \iftabu@colortbl \minrowclearance\the\minrowclearance\relax
+ \the\@temptokena
+ \fi}%
\def\tabu@savedpream {\edef\tabu@halignto{to\the\tabu@target}\NC@find #1}%
}% \tabu@preparesave
+\def\tabu@prepare@save #1{%
+ \ifx\relax#1\else
+ \@temptokena\expandafter{\the\expandafter\@temptokena
+ \expandafter\def\expandafter#1\expandafter{#1}}\fi
+}% \tabu@prepare@save
\newtoks\tabu@footnotes
\long\def\tabu@footnotetext #1{%
\edef\@tempa{\the\tabu@footnotes
@@ -354,7 +408,6 @@
\expandafter\let\csname tabu@X\the\tabu@X@cols\endcsname \relax
\iftabu@measuring % not the first X column found in preamble
\edef\tabu@global@X {\tabu@global@X
- \advance\tabu@X@cols \@ne
\def\csname tabu@X\the\tabu@X@cols\endcsname {\strip@pt\tabu@X@sum}%
\advance\tabu@X@sum \the\tabu@X@sum\relax}%
\else % first X column found in preamble
@@ -369,7 +422,6 @@
\fi\fi=\the\tabu@target \on@line, page \the\c@page}\fi
\tabu@message{\tabu@titles}%
\edef\tabu@global@X {\tabu@global@X
- \tabu@X@cols \@ne
\def\csname tabu@X1\endcsname{\strip@pt\tabu@X@sum}%
\tabu@X@sum \the\tabu@X@sum\relax
\tabu@target \the\tabu@target\relax
@@ -392,15 +444,14 @@
\else
\tabu@X@sum \z@
\let\tabucolX@align \@empty \let\tabucolX@rw \@empty
- \let\tabu@Xmath \@empty \let\tabu@temp \@empty
- \tabu@Xparse {}#1\relax\@nnil
+ \let\tabu@Xmath \@empty \let\tabu@temp \@empty
+ \tabu@Xparse {}#1,\@nnil
\fi
}% \tabu@Xarg
\def\tabu@Xparse #1{\futurelet\@let@token \tabu@Xtest}
\expandafter\def\expandafter\tabu@Xparsespace\space{\tabu@Xparse{}}
\def\tabu@Xtest{%
\ifcase \ifx \@nnil\@let@token \z@ \else
- \ifx \relax\@let@token \m@ne\else
\if ,\@let@token \m@ne\else
\if p\@let@token 1\else
\if m\@let@token 2\else
@@ -415,7 +466,7 @@
\if .\@let@token 11\else
\if -\@let@token 11\else
\ifcat $\@let@token 12\else
- 13\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
+ 13\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
\tabucolX@do \expandafter \remove@to@nnil
\or \tabu@Xtype {p}%
\or \tabu@Xtype {m}%
@@ -462,7 +513,7 @@
\edef\tabu@temp {\strip@pt\tabu@X@sum \tabucolX}%
\edef\tabucolX@rw##1{%
\ifx$\tabu@Xmath>{\noexpand\the\toks@ $}\else
- \ifx \tabucolXalign\@empty \else
+ \ifx \tabucolX@align\@empty \else
>{\noexpand\the\toks@}\fi\fi
\tabucolX@rw{##1}%
\ifx$\tabu@Xmath<{$}\fi}%
@@ -477,7 +528,6 @@
\ifdim \tabu@wd{#1}<#2 \tabu@wd{#1}\else#2\fi\else #2\fi
}% \tabu@dimexpr
\def\tabu@prep@TRIAL{%
- \let\tabu@savedpreamble \@preamble
\begingroup \iffalse{\fi \ifnum0=`}\fi
\tabu@setup@TRIAL
\tabucolX \tabu@target
@@ -596,8 +646,8 @@
\the\tabu@target\space+ \tabu@hfuzz}%
\or
\ifdim \tabu@X@sum=\z@ \tabu@measuringtrue \tabucolX=\@tempdima
- \else \tabu@message{\tabu@message@arith}%
- \advance\tabucolX-\dimexpr(\wd\tabu@box-\tabu@target-\tabu@X@sum/\p@)
+ \else
+ \advance\tabucolX-\dimexpr(\wd\tabu@box-\tabu@target-.5\tabu@X@sum/\p@)
*\p@/\tabu@X@sum\relax
\ifdim \tabucolX<\z@
\tabu@warn{X Columns too narrow (table too wide)}%
@@ -671,7 +721,7 @@
\ifx\@startpbox\tabu@measure@startpbox\tabu@spaces (coefs<0)\else
\ifdim\tabu@X@sum>\z@
\expandafter\tabu@msg@align \the\dimexpr(\tabu@target-\wd\tabu@box)
- *\p@/\tabu@X@sum\relax {}{}{}{}{}\@@\fi\fi}%
+ *\p@/\tabu@X@sum\relax {}{}{}{}{}\@@\fi\fi^^J}%
\def\tabu@message@spread{\tabu@spreadheader
\expandafter\tabu@msg@align \the\tabu@spreadtarget {}{}{}{}{}\@@
\expandafter\tabu@msg@align \the\wd\tabu@box {}{}{}{}{}\@@
@@ -683,8 +733,14 @@
<\expandafter\tabu@msg@align \the\tabu@target { }{ }{ }{ }{}\@@
+ \tabu@hfuzz\space= hfuzz *****^^J%
(tabu)\tabu@spaces******* Reached Target:
- hfuzz = \tabu@hfuzz\on@line\space *******^^J
- \ifnum\tabu@nested=\z@^^J\fi}%
+ hfuzz = \tabu@hfuzz\on@line\space *******^^J%
+ \ifnum\tabu@nested=\z@ \tabu@elapsedtime ^^J\fi}%
+\def\tabu@message@etime{(tabu)\tabu@spaces
+ Time elapsed for trials:
+ \the\numexpr(\pdfelapsedtime-\tabu@starttime-32767)/65536\relax sec
+ \the\numexpr\numexpr(\pdfelapsedtime-\tabu@starttime)
+ -\numexpr(\pdfelapsedtime-\tabu@starttime-32767)/65536\relax*65536\relax
+ *1000/65536\relax ms}%
\def\tabu@message@negcoef #1{\tabu@spaces\tabu@spaces
* #1. X[-\csname tabu@X#1\endcsname]: natural width
= \tabu@wd{#1}
@@ -714,6 +770,11 @@
\def\extratabsurround ####1\relax{(tabu) extratabsurround = ####1^^J}%
\def\minrowclearance ####1\relax {(tabu) minrowclearance#1 = ####1^^J}%
\def\arraystretch ####1{(tabu) arraystretch #1 #1 = ####1^^J}%
+ \iftabu@colortbl
+ \def\CT@arc@####1{(tabu) arrayrulecolor #1 = ####1^^J}%
+ \def\CT@drsc@####1{(tabu) doublerulesepcolor=####1^^J}%
+ \let\color \relax
+ \fi
\def\NC@find ####1\@nil{(tabu) tabu preamble#1 #1 = \detokenize{####1}^^J}%
\def\tabu@wddef####1####2{(tabu) Natural width ####1 = ####2^^J}%
\let\edef \@gobbletwo \let\def \@empty
@@ -905,10 +966,10 @@
\def\tabu@start@stop #1-#2\@nnil{%
\@defaultunits \tabu@start \number0#1\relax\@nnil
\@defaultunits \tabu@stop \number0#2\relax\@nnil
- \ifnum\tabu@start>\tabu@nbcols\tabu@start=\tabu@nbcols\else
- \ifnum\tabu@start>\z@\else \tabu@start=\@ne \fi\fi
- \ifnum\tabu@stop>\tabu@nbcols \tabu@stop\tabu@nbcols \else
- \ifnum\tabu@stop>\z@\else \tabu@stop=\tabu@nbcols \fi\fi
+ \ifnum\tabu@start>\tabu@nbcols\tabu@start \tabu@nbcols\else
+ \ifnum\tabu@start<\@ne \tabu@start \@ne \fi\fi
+ \ifnum\tabu@stop>\tabu@nbcols \tabu@stop \tabu@nbcols \else
+ \ifnum\tabu@stop<\@ne \tabu@stop \tabu@nbcols\fi\fi
}% \tabu@start@stop
\def\tabu@getlinespec#1{\let\tabu@xleaders \relax
\@defaultunits \let\@tempa=#1 \relax\@nnil
@@ -1088,19 +1149,13 @@
\ifx\\#1\\\tabu@savewarn{}{The tabu will not be saved}\else
\@ifundefined{tabu@saved@\string#1}{}{\tabu@savewarn{#1}{Overwritting}}%
{%
- \toks0\expandafter{\@preamble}%
+ \toks0\expandafter{\tabu@savedpreamble}%
\toks1\expandafter{\tabu@savedparam}%
\toks2\expandafter{\tabu@savedpream}%
- \iftabu@colortbl
- \toks3\expandafter{\expandafter\gdef\expandafter\CT@arc@
- \expandafter{\CT@arc@}}%
- \toks3\expandafter{\the\toks\expandafter3
- \expandafter\gdef\expandafter\CT@drsc@\expandafter{\CT@drsc@}}%
- \else \toks3{}%
- \fi
+ \toks3{}%
\iftabu@negcoef
\edef\tabu@savewd{\tabu@savewd{\number\numexpr1}}%
- \toks3\expandafter{\the\toks\expandafter3\tabu@savewd}\fi
+ \toks3\expandafter{\tabu@savewd}\fi
\expandafter\xdef\csname tabu@saved@\string#1\endcsname##1{%
\noexpand\ifcase##1\relax
\noexpand\ifdim\tabu@target>\z@
@@ -1190,7 +1245,7 @@
\ifnum \count@<\z@ % <first initialisation>
\@tempcnta \@M % <not initialized by array.sty>
\tabu@nbcols\z@
- \gdef\tabu@global@temp{\tabu@nbcols\z@}%
+ \xdef\tabu@global@temp{\tabu@global@temp \tabu@nbcols\z@}%
\expandafter\let\csname tabu@tok@1L\endcsname \relax
\tabu@cellrightfalse
\else
@@ -1374,18 +1429,30 @@
\let\color@bgroup\bgroup
\def\color@egroup{\endgraf\egroup}%
\afterassignment\tabu@begin@fbox
- \setbox\@tempboxa \hbox
+ \setbox\@tempboxa \hbox
}% \tabu@fbox
\def\tabu@begin@fbox{\color@bgroup\kern\fboxsep\aftergroup\tabu@end@fbox}
-\def\tabu@end@fbox{\kern\fboxsep\color@egroup\@frameb@x\relax}
-\expandafter\def\expandafter\tabu@centering\expandafter{%
- \centering\arraybackslash}
-\expandafter\def\expandafter\tabu@raggedleft\expandafter{%
- \raggedleft\arraybackslash}
-\expandafter\def\expandafter\tabu@raggedright\expandafter{%
- \raggedright\arraybackslash}
+\def\tabu@end@fbox{\kern\fboxsep \color@egroup \@frameb@x\relax}
+\def\tabu@color@b@x#1#2{\leavevmode
+ \def\tabu@do@color@b@x{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}%
+ \afterassignment\tabu@begin@color@b@x
+ \setbox\z@ \hbox
+}% \tabu@color@b@x
+\def\tabu@begin@color@b@x{%
+ \bgroup \kern\fboxsep \set@color
+ \aftergroup\tabu@end@color@b@x
+}% \tabu@begin@color@b@x
+\def\tabu@end@color@b@x{\kern\fboxsep \egroup
+ \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@
+ \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@
+ \tabu@do@color@b@x
+}% \tabu@end@color@b@x
+\def\tabu@temp#1#2{{\toks@\expandafter{#2\arraybackslash}\xdef#1{\the\toks@}}}
+\tabu@temp \tabu@centering \centering
+\tabu@temp \tabu@raggedleft \raggedleft
+\tabu@temp \tabu@raggedright \raggedright
\def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{%
- \expandafter\let\expandafter\\\expandafter\@centercr\@trivlist}}%
+ \expandafter\let\expandafter\\\expandafter\@normalcr\@trivlist}}%
\def\tabu@fix@arrayright{%
\@ifpackageloaded{arydshln}
{%