summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-15 23:47:43 +0000
committerKarl Berry <karl@freefriends.org>2010-11-15 23:47:43 +0000
commita5a271360add796657bcd43f539e59decd26a060 (patch)
treeb150746b8e643b20b943089fa177a513111a3edc /Master
parent147b42500c5ad159da818792bf6b18e3f4b4e11c (diff)
tabu (15nov10)
git-svn-id: svn://tug.org/texlive/trunk@20451 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/tabu/tabu.pdfbin1327043 -> 926203 bytes
-rw-r--r--Master/texmf-dist/source/latex/tabu/tabu.drv8
-rw-r--r--Master/texmf-dist/source/latex/tabu/tabu.dtx248
-rw-r--r--Master/texmf-dist/source/latex/tabu/tabu.ins6
-rw-r--r--Master/texmf-dist/tex/latex/tabu/tabu.sty175
5 files changed, 232 insertions, 205 deletions
diff --git a/Master/texmf-dist/doc/latex/tabu/tabu.pdf b/Master/texmf-dist/doc/latex/tabu/tabu.pdf
index 79180f4bc06..4248c052a22 100644
--- a/Master/texmf-dist/doc/latex/tabu/tabu.pdf
+++ b/Master/texmf-dist/doc/latex/tabu/tabu.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/tabu/tabu.drv b/Master/texmf-dist/source/latex/tabu/tabu.drv
index 403bd0672c8..8b67146f46b 100644
--- a/Master/texmf-dist/source/latex/tabu/tabu.drv
+++ b/Master/texmf-dist/source/latex/tabu/tabu.drv
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% tabu : 2010/10/27 v1.1 - tabu : Flexible LaTeX tabulars
+%% tabu : 2010/11/15 v1.2 - tabu : Flexible LaTeX tabulars
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -25,8 +25,8 @@
%%
\edef\thisfile{\jobname}
\def\thisinfo{Flexible \LaTeX{} tabulars (\FC)}
-\def\thisdate{2010/10/28}
-\def\thisversion{1.1}
+\def\thisdate{2010/11/15}
+\def\thisversion{1.2}
\def\CTANbaseurl{http://www.ctan.org/tex-archive/macros/latex}
\def\CTANdisplay{CTAN:macros/latex}
\makeatletter\protected\def\CTANhref{\@ifstar\CTANhrefstar\CTANhrefnost}\makeatother
@@ -45,7 +45,7 @@
\usepackage{tocloft,titlesec,hypbmsec,fancyhdr,enumitem,multirow,makecell,tabularx,booktabs,delarray,ragged2e,colortbl,marginnote,shapepar}
\heavyrulewidth=.7pt
\usepackage{holtxdoc,bookmark}
-\usepackage{interfaces}[2010/10/31]
+\usepackage{interfaces}[2010/11/15]
\usetikz{basic,chains,positioning}
\usepackage{embedfile}
\RequirePackage{amsopn,amsmath}% \DeclareMathOperator
diff --git a/Master/texmf-dist/source/latex/tabu/tabu.dtx b/Master/texmf-dist/source/latex/tabu/tabu.dtx
index cb70b0226da..16717a66ac4 100644
--- a/Master/texmf-dist/source/latex/tabu/tabu.dtx
+++ b/Master/texmf-dist/source/latex/tabu/tabu.dtx
@@ -1,5 +1,5 @@
% \iffalse meta-comment
-% tabu : 2010/10/27 v1.1 - tabu: flexible LaTeX tabulars]
+% tabu : 2010/11/15 v1.2 - tabu: flexible LaTeX tabulars]
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -36,7 +36,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: 2010/10/27 v1.1 - tabu: Flexible LaTeX tabulars}
+\Msg{* Package: 2010/11/15 v1.2 - tabu: Flexible LaTeX tabulars}
\Msg{************************************************************************}
\keepsilent
@@ -47,7 +47,7 @@
This is a generated file.
-tabu : 2010/10/27 v1.1 - tabu : Flexible LaTeX tabulars
+tabu : 2010/11/15 v1.2 - tabu : Flexible LaTeX tabulars
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -98,8 +98,8 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%<*driver>
\edef\thisfile{\jobname}
\def\thisinfo{Flexible \LaTeX{} tabulars (\FC)}
-\def\thisdate{2010/10/28}
-\def\thisversion{1.1}
+\def\thisdate{2010/11/15}
+\def\thisversion{1.2}
\def\CTANbaseurl{http://www.ctan.org/tex-archive/macros/latex}
\def\CTANdisplay{CTAN:macros/latex}
\makeatletter\protected\def\CTANhref{\@ifstar\CTANhrefstar\CTANhrefnost}\makeatother
@@ -118,7 +118,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\usepackage{tocloft,titlesec,hypbmsec,fancyhdr,enumitem,multirow,makecell,tabularx,booktabs,delarray,ragged2e,colortbl,marginnote,shapepar}
\heavyrulewidth=.7pt
\usepackage{holtxdoc,bookmark}
-\usepackage{interfaces}[2010/10/31]
+\usepackage{interfaces}[2010/11/15]
\usetikz{basic,chains,positioning}
\usepackage{embedfile}
\RequirePackage{amsopn,amsmath}% \DeclareMathOperator
@@ -150,7 +150,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%</driver>
% \fi
%
-% \CheckSum{3457}
+% \CheckSum{3471}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -258,7 +258,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% }\expandafter\thisyear\thisdate\@nil
% }
% \renewrobustcmd\declcs[2][]{^^A
-% \par\addvspace\parskip^^A{.5ex plus 1ex}\noindent
+% \par\addvspace\parskip
% \goodbreak
% \noindent\larger\changefont{spread=1}^^A
% \hspace{-\leftmargini}^^A
@@ -379,9 +379,9 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% provided that they do not split across pages.
%
% \textt{tabu} is more flexible that \textt{tabular}, \textt{tabular*}, \textt{tabularx}
-% and \textt{array} and extend the possibilities. All tabulars in this document were made
+% and \textt{array} and extends the possibilities. All tabulars in this document were made
% with the \textt{tabu} environment. Last (but not least) \textt{tabu} is more than compatible
-% with any package that provide commands to format tabulars.
+% with any package that provides commands to format tabulars.
% Indeed, \thispackage{} \textbf{does not modify any of the macros of \xfile{array.sty}.} All
% functionalities are obtained with only two modifications\footnote{\cs{prepnext@tok} and \cs{save@decl}.
% See ``\nameref{sec:light package option}''.} which are loaded only inside
@@ -445,7 +445,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \textt{tabularx} or \textt{tabu} itself can be placed in any cell of a \textt{tabu}. Conversely,
% \textt{tabu} can be placed in a \textt{tabular}, \textt{tabularx} \etc.
% \item \textt{tabu} introduces optional parameters to columns specifications, providing facilities
-% for modifying columns of line widths, inserting verbatim text...
+% for modifying columns or line widths, inserting verbatim text...
% \item \textt{tabu} is more than compatible with \xpackage{arydshln} (for dashed and dotted lines)
% and \xpackage{colortbl}: actually some corrections of those packages are loaded as soon as you
% enter a \textt{tabu} environment. Compatibility with \xpackage{delarray}, \xpackage{hhline},
@@ -597,6 +597,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%
% This section should contain some examples but I've no time presently...
%
+%
% \subsection{Lines inside \textt{tabu}}
%
% \subsubsection{First important remarks}
@@ -620,7 +621,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% Example:
%
% {\tabcolsep=3pt
-% \begin{tabu}to\linewidth{@{}X[3mc]X[3m]X[6m]@{}} \toprule
+% \begin{tabu}{@{}X[3mc]X[3m]X[6m]@{}} \toprule
% \begin{tabu}{||[5pt]|c|c||[5pt]|}
% Hello & World
% \end{tabu}
@@ -711,12 +712,12 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% &
% \extrarowheight=8pt
% \begin{tabu}{|[1pt]X|X|[1pt]} \tabucline*-
-% Hello & world \\ \tabucline*[1pt on 2pt off 2pt blue]- ^^A\tabucline*[3pt on 3pt off 3pt]-
+% Hello & world \\ \tabucline*[1pt on 2pt off 2pt blue]-
% Hello & world \\ \tabucline*-
% \end{tabu}
% &
% \extrarowheight=8pt
-% \begin{tabu}{|[1pt]X|X|[1pt]} \firsthline
+% \begin{tabu}[c]{|[1pt]X|X|[1pt]} \firsthline
% Hello & world \\ \hline
% Hello & world \\ \lasthline
% \end{tabu} \\
@@ -990,7 +991,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%
% {\centering
% \extrarowheight=8pt
-% \begin{tabu}to .6\linewidth{X[m]} \toprule
+% \begin{tabu}to .6\linewidth{X[m]} \tabucline-
%
% \extrarowheight=0pt
% \begin{tabu}({X})
@@ -1360,7 +1361,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \subsection(arydshln @ columns){Correction for arydshln: \texttbf @ columns}
%
% A bug in \cs{adl@xarraydashrule}: \textt{!-arg} columns (class 1) and \textt{@-arg} columns (class 5) should be treated
-% the same wat as far as rules are concerned.
+% the same as far as rules are concerned.
%
% With this correction, the \textbf{known problem number 1} in \xpackage{arydshln} documentation is solved.
%
@@ -1396,7 +1397,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{tabu}[2010/10/28 v1.1 - flexible LaTeX tabulars (FC)]
+\ProvidesPackage{tabu}[2010/11/15 v1.2 - flexible LaTeX tabulars (FC)]
\RequirePackage{array}[2008/09/09]
% \end{macrocode}
%
@@ -1447,7 +1448,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\light (package option)}
+% \begin{macro}{light (package option)}
% \begin{macrocode}
\DeclareOption{light}{%
\AtEndOfPackage{%
@@ -1607,6 +1608,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%
% \begin{macrocode}
\newcommand\tabu@NC@rewrite@X[1][]{\tabu@rewrite@X{#1}%
+ \let\@halignto \relax
\expandafter \NC@find \tabucolX@spec}
% \end{macrocode}
% \end{macro}
@@ -1702,9 +1704,10 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\expandafter\def\csname NC@find@\string\tabu@rewritelast\endcsname
#1\tabu@rewritelast{\NC@{#1}}
\def\tabu@rewritelast{%
- \ifx \@halignto\relax \let\tabu@temp \@empty
+ \ifx \@halignto\relax % found a X column
+ \let\tabu@temp \@empty
+ \aftergroup \tabu@addphantomline
\else
- \let\@halignto \tabu@halignto
\ifdim \tabu@target=\z@ \let\tabu@temp \@empty
\else
\if |\noexpand\tabu@temp \def\tabu@temp{@{\extracolsep\@flushglue}}\else
@@ -1712,6 +1715,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\def\tabu@temp{!{\extracolsep\@flushglue}}\fi\fi
\fi
\fi
+ \let\@halignto \tabu@halignto
\expandafter\NC@find \tabu@temp
}% \tabu@rewritelast
% \end{macrocode}
@@ -1760,11 +1764,17 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\def\tabu@phantomline{\noalign{%
\global\everycr{}%
\global\setbox\tabu@box\box\@arstrutbox
+ \global\let\tabu@minrowclearance \minrowclearance
+ \global\let\minrowclearance \z@
+ \global\let\tabu@temp \vcenter
+ \global\let\vcenter \vbox
\toks@{}\count@\@ne
\@whilenum\count@<\tabu@nbcols\do{\advance\count@\@ne
\toks@\expandafter{\the\toks@&}}%
\toks@\expandafter{\the\toks@
- \cr\noalign{\global\setbox\@arstrutbox\box\tabu@box}}%
+ \cr\noalign{\global\setbox\@arstrutbox\box\tabu@box
+ \global\let\minrowclearance \tabu@minrowclearance
+ \global\let\vcenter \tabu@temp}}%
\expandafter}\the\toks@
}% \tabu@phantomline
% \end{macrocode}
@@ -1803,6 +1813,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\let\adl@xarraydashrule \tabu@adl@xarraydashrule % <fix> arydshln
\let\adl@act@endpbox \tabu@adl@act@endpbox % <fix> arydshln
\let\adl@act@@endpbox \tabu@adl@act@endpbox % <fix> arydshln
+ \let\@preamerror \@preamerr % <fix> arydshln
\let\endarray \tabu@endarray % <fix> colortbl & arydshln (delarray)
\let\tabu@global@temp \@empty \let\tabu@global@X \@empty
\ifx\verbatim \tabu@sanitizetext
@@ -2114,6 +2125,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\fi
}% \tabu@rewrite@X
% \end{macrocode}
+%
% \begin{macro}{\tabu@rewrite@Xnested}
%
% This macro replaces \cs{tabu@rewrite@X} when \textt{tabu} makes a trial for \textt X columns.
@@ -2124,11 +2136,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%
% \begin{macrocode}
\def\tabu@rewrite@Xnested#1{\def\tabucolX@spec{p{\tabucolX}}}
-\def\tabu@rewrite@Xrestore#1{\tabu@Xarg{#1}\let\tabucolX@spec\tabu@temp
- \iftabu@measuring \else \tabu@measuringtrue \aftergroup\tabu@usetabuX \fi}%
-\def\tabu@usetabuX{%
- \tabu@everycr\expandafter{\the\tabu@everycr\tabu@phantomline}%
-}% \tabu@usetabuX
+\def\tabu@rewrite@Xrestore#1{\tabu@Xarg{#1}\let\tabucolX@spec\tabu@temp}%
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2154,7 +2162,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\xdef\tabu@global@X{%
\tabu@X@sum \the\tabu@X@sum\relax
\tabu@target \the\tabu@target\relax}%
- \let \@halignto \relax
+ \let\tabu@halignto \relax
\aftergroup \tabu@prep@TRIAL
\fi
}% \tabu@rewrite@Xto
@@ -2185,7 +2193,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\tabu@target \the\tabu@target\relax
\tabu@spreadtarget \the\tabu@spreadtarget\relax
\def\csname tabu@X\the\tabu@X@cols\endcsname{\strip@pt\tabu@X@sum}}%
- \let\@halignto \relax
+ \let\tabu@halignto \relax
\aftergroup \tabu@prep@TRIAL
\fi
}% \tabu@rewrite@Xspread
@@ -2359,7 +2367,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \begin{macrocode}
\def\tabu@arrayleft@measure#1\bgroup{%
\def\tabu@Xfinish{\ifnum0=`{\fi}\tabu@global@X
- \let\@halignto\tabu@halignto \tabu@firstclinetrue #1\bgroup}%
+ \let\@halignto\tabu@halignto \tabu@firstcline #1\bgroup}%
\toks@{\let\@preamble\tabu@savedpreamble}% <required for multicolumn>
\tabu@collect
}% \tabu@arrayleft@measure
@@ -2574,78 +2582,6 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \end{macro}
% \end{macro}
%
-% \subsection{Numbers in \textt{tabu}}
-%
-% \subsubsection{\cs{tabudecimal}}
-%
-% \begin{macro}{\tabudecimal}
-% \begin{macrocode}
-\def\tabu@tabudecimal#1{%
- \def\tabu@decimal{#1}\@temptokena{}%
- \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces
- \tabu@scandecimal
-}% \tabudecimal
-\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@}
-\def\tabu@skipdecimal#1{#1\tabu@scandecimal}
-\def\tabu@getdecimal@ignorespaces{%
- \ifcase 0\ifx\tabu@temp\ignorespaces\else
- \ifx\tabu@temp\@sptoken1\else
- 2\fi\fi\relax
- \let\tabu@getdecimal@ \tabu@getdecimal
- \expandafter\tabu@skipdecimal
- \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal
- \else \expandafter\tabu@skipdecimal
- \fi
-}% \tabu@getdecimal@ignorespaces
-\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}%
- \tabu@scandecimal}
-\def\do#1{%
- \def\tabu@get@decimalspace#1{%
- \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}%
-}\do{ }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\tabu@getdecimal}
-% \begin{macrocode}
-\def\tabu@getdecimal{%
- \ifcase 0\ifx 0\tabu@temp\else
- \ifx 1\tabu@temp\else
- \ifx 2\tabu@temp\else
- \ifx 3\tabu@temp\else
- \ifx 4\tabu@temp\else
- \ifx 5\tabu@temp\else
- \ifx 6\tabu@temp\else
- \ifx 7\tabu@temp\else
- \ifx 8\tabu@temp\else
- \ifx 9\tabu@temp\else
- \ifx .\tabu@temp\else
- \ifx ,\tabu@temp\else
- \ifx -\tabu@temp\else
- \ifx +\tabu@temp\else
- \ifx e\tabu@temp\else
- \ifx E\tabu@temp\else
- \ifx\tabu@cellleft\tabu@temp1\else
- \ifx\ignorespaces\tabu@temp1\else
- \ifx\@sptoken\tabu@temp2\else
- 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
- \expandafter\tabu@get@decimal
- \or \expandafter\tabu@skipdecimal
- \or \expandafter\tabu@get@decimalspace
- \else\expandafter\tabu@printdecimal
- \fi
-}% \tabu@getdecimal
-\def\tabu@printdecimal{%
- \edef\tabu@temp{\the\@temptokena}%
- \ifx\tabu@temp\@empty\else
- \ifx\tabu@temp\space\else
- \expandafter\tabu@decimal\expandafter{\the\@temptokena}%
- \fi\fi
-}% \tabu@printdecimal
-% \end{macrocode}
-% \end{macro}
-%
-%
% \subsection(Lines inside tabu){Lines inside \textt{tabu}}
%
% \subsubsection{Vertical lines}
@@ -2710,20 +2646,23 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \end{macrocode}
% \end{macro}
%
+%
% \subsubsection{Horizontal lines: \cs{tabucline}}
%
% \begin{macro}{\tabu@firstcline}
% \begin{macrocode}
\def\tabu@firstcline{%
\tabu@firstclinetrue
- \let\tabu@everycr\everycr
- \def\tabu@restoreeverycr{\let\everycr\tabu@everycr}%
+ \let\tabu@everycr \everycr
+ \def\tabu@restoreeverycr {\let\everycr\tabu@everycr}%
\def\everycr{\afterassignment\tabu@restoreeverycr\@temptokena}% <for ialign>
\tabu@everycr{\noalign{%
\global\tabu@everycr{\noalign{%
\global\tabu@everycr{}\global\tabu@firstclinefalse}}%
\global\let\everycr\tabu@everycr}}%
}% \tabu@firstcline
+\def\tabu@addphantomline{\tabu@everycr\expandafter{\the\tabu@everycr
+ \tabu@phantomline}}
% \end{macrocode}
% \end{macro}
%
@@ -2753,7 +2692,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\toks@\expandafter{\the\toks@ &}}%
\loop
\toks@\expandafter{\the\toks@ \omit }%
- \ifcase 0\if@tempswa\else\ifnum \@multicnt>\tabu@start 1\fi\fi\relax
+ \ifnum \@multicnt=\@ne
\expandafter \tabu@add \csname tabu@tok@\the\@multicnt L\endcsname \@nil
\fi
\ifcase 0\if@tempswa\else\ifnum \@multicnt<\tabu@stop 1\fi\fi\relax
@@ -2812,8 +2751,8 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\ifx\@tempa\hbox \tabu@defleaders{#1}\else
\ifx\@tempa\box \tabu@defleaders{#1}\else
\ifx\@tempa\copy \tabu@defleaders{#1}\else
- \ifcsname tabu@line@style@\string#1\endcsname
- \csname tabu@line@style@\string#1\endcsname
+ \ifcsname tabu@line@style@\detokenize{#1}\endcsname
+ \csname tabu@line@style@\detokenize{#1}\endcsname
\else \tabu@getline{#1\p@ on0pt off0pt}\fi\fi\fi\fi\fi
}% \tabu@getlinespec
\def\tabu@defleaders#1{%
@@ -2865,11 +2804,11 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\ifdim\@tempdimc>\z@
\hbox\bgroup \kern\the\dimexpr\@tempdimc/2\relax\fi
\noexpand\iftabu@firstcline
- \vrule depth\the\@tempdima
+ \vrule depth\dimexpr\the\@tempdima
\ifdim\@tempdimb>\z@ width\the\@tempdimb\fi
\noexpand\else
\vrule height\dimexpr-\extrarowheight+\the\@tempdima
- depth\extrarowheight
+ depth\dimexpr\extrarowheight
\ifdim\@tempdimb>\z@ width\the\@tempdimb\fi
\noexpand\fi
\ifdim\@tempdimc>\z@
@@ -2915,7 +2854,7 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\def\tabulinestyle#1{\@for\@tempa:=#1\do{\expandafter\tabu@linestyle\@tempa==\@nil}}
\def\tabu@linestyle#1=#2=#3\@nil{%
\begingroup \tabu@getlinespec {#2}\expandafter\gdef
- \csname tabu@line@style@\string#1\expandafter\endcsname
+ \csname tabu@line@style@\detokenize{#1}\expandafter\endcsname
\expandafter{\expandafter\def\expandafter\tabu@xleaders
\expandafter{\tabu@xleaders}}%
\endgroup
@@ -2950,6 +2889,77 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
% \end{macrocode}
% \end{macro}
%
+% \subsection{Numbers in \textt{tabu}}
+%
+% \subsubsection{\cs{tabudecimal}}
+%
+% \begin{macro}{\tabudecimal}
+% \begin{macrocode}
+\def\tabu@tabudecimal#1{%
+ \def\tabu@decimal{#1}\@temptokena{}%
+ \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces
+ \tabu@scandecimal
+}% \tabudecimal
+\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@}
+\def\tabu@skipdecimal#1{#1\tabu@scandecimal}
+\def\tabu@getdecimal@ignorespaces{%
+ \ifcase 0\ifx\tabu@temp\ignorespaces\else
+ \ifx\tabu@temp\@sptoken1\else
+ 2\fi\fi\relax
+ \let\tabu@getdecimal@ \tabu@getdecimal
+ \expandafter\tabu@skipdecimal
+ \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal
+ \else \expandafter\tabu@skipdecimal
+ \fi
+}% \tabu@getdecimal@ignorespaces
+\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}%
+ \tabu@scandecimal}
+\def\do#1{%
+ \def\tabu@get@decimalspace#1{%
+ \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}%
+}\do{ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tabu@getdecimal}
+% \begin{macrocode}
+\def\tabu@getdecimal{%
+ \ifcase 0\ifx 0\tabu@temp\else
+ \ifx 1\tabu@temp\else
+ \ifx 2\tabu@temp\else
+ \ifx 3\tabu@temp\else
+ \ifx 4\tabu@temp\else
+ \ifx 5\tabu@temp\else
+ \ifx 6\tabu@temp\else
+ \ifx 7\tabu@temp\else
+ \ifx 8\tabu@temp\else
+ \ifx 9\tabu@temp\else
+ \ifx .\tabu@temp\else
+ \ifx ,\tabu@temp\else
+ \ifx -\tabu@temp\else
+ \ifx +\tabu@temp\else
+ \ifx e\tabu@temp\else
+ \ifx E\tabu@temp\else
+ \ifx\tabu@cellleft\tabu@temp1\else
+ \ifx\ignorespaces\tabu@temp1\else
+ \ifx\@sptoken\tabu@temp2\else
+ 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
+ \expandafter\tabu@get@decimal
+ \or \expandafter\tabu@skipdecimal
+ \or \expandafter\tabu@get@decimalspace
+ \else\expandafter\tabu@printdecimal
+ \fi
+}% \tabu@getdecimal
+\def\tabu@printdecimal{%
+ \edef\tabu@temp{\the\@temptokena}%
+ \ifx\tabu@temp\@empty\else
+ \ifx\tabu@temp\space\else
+ \expandafter\tabu@decimal\expandafter{\the\@temptokena}%
+ \fi\fi
+}% \tabu@printdecimal
+% \end{macrocode}
+% \end{macro}
+%
%
% \subsection{\cs{savetabu}}
%
@@ -3133,9 +3143,6 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\else
\ifcase \numexpr \count@-\@tempcnta \relax % (case 0): prev. token is left
\advance \tabu@nbcols\@ne
- \ifnum \tabu@nbcols>\@ne
- \expandafter\let\csname tabu@tok@\the\tabu@nbcols L\endcsname \relax
- \fi
\expandafter\let\csname tabu@tok@\the\tabu@nbcols R\endcsname \relax
\expandafter\gdef\expandafter\tabu@global@temp\expandafter{%
\tabu@global@temp \advance\tabu@nbcols\@ne}%
@@ -3143,17 +3150,21 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
\tabu@cellrightfalse % <only once>
\tabu@savetok R\tabu@preptokenright
\fi
- \tabu@savetok L\tabu@preptokenleft
+ \ifnum \tabu@nbcols=\@ne
+ \tabu@savetok L% LEFT token is always empty unless >{...}
+ \fi
+ \tabu@preptokenleft
\or % (case 1) previous token is right
\tabu@savetok R\tabu@cellrighttrue
\else % special column: do not change the token
\ifnum \tabu@nbcols>\z@ %special column: always on the right of normal one
+ \tabu@savetok R%
\else % unless this is the very first column (\tabu@nbcols=0)
\advance\tabu@nbcols\@ne \tabu@savetok L\advance\tabu@nbcols\m@ne
\fi
\iftabu@cellright % before-previous token is right
\tabu@cellrightfalse
- \tabu@savetok R\tabu@preptokenright
+ \tabu@preptokenright
\fi
\fi % \ifcase
\fi
@@ -3507,8 +3518,15 @@ Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%
% \begin{History}
%
+% \begin{Version}{2010/11/15 v1.2}
+% \item Improvement in parameters parsing for optional parameters (\textt\textbar\ and \cs{tabucline}).
+% \item Modification / optimization in \cs{tabu@prepnext@tok}.
+% \item Modification of \cs{tabucline} to get better results with \textt m columns (\textt{X[m]})
+% and also when \cs{minrowclearance} $>0$ (package \xpackage{colortbl}).
+% \end{Version}
+%
%
-% \begin{Version}{2010/10/28 v1.0}
+% \begin{Version}{2010/10/28 v1.1}
% \item First version.
% \end{Version}
%
diff --git a/Master/texmf-dist/source/latex/tabu/tabu.ins b/Master/texmf-dist/source/latex/tabu/tabu.ins
index 73047d8b35b..b4ea2ecff02 100644
--- a/Master/texmf-dist/source/latex/tabu/tabu.ins
+++ b/Master/texmf-dist/source/latex/tabu/tabu.ins
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% tabu : 2010/10/27 v1.1 - tabu : Flexible LaTeX tabulars
+%% tabu : 2010/11/15 v1.2 - tabu : Flexible LaTeX tabulars
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -26,7 +26,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: 2010/10/27 v1.1 - tabu: Flexible LaTeX tabulars}
+\Msg{* Package: 2010/11/15 v1.2 - tabu: Flexible LaTeX tabulars}
\Msg{************************************************************************}
\keepsilent
@@ -37,7 +37,7 @@
This is a generated file.
-tabu : 2010/10/27 v1.1 - tabu : Flexible LaTeX tabulars
+tabu : 2010/11/15 v1.2 - tabu : Flexible LaTeX tabulars
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
diff --git a/Master/texmf-dist/tex/latex/tabu/tabu.sty b/Master/texmf-dist/tex/latex/tabu/tabu.sty
index 750a4286675..ff5e802d2a8 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/10/27 v1.1 - tabu : Flexible LaTeX tabulars
+%% tabu : 2010/11/15 v1.2 - tabu : Flexible LaTeX tabulars
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -25,7 +25,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{tabu}[2010/10/28 v1.1 - flexible LaTeX tabulars (FC)]
+\ProvidesPackage{tabu}[2010/11/15 v1.2 - flexible LaTeX tabulars (FC)]
\RequirePackage{array}[2008/09/09]
\AtEndOfPackage{\tabu@AtEnd\let\tabu@AtEnd\@undefined}
\let\tabu@AtEnd\@empty
@@ -88,6 +88,7 @@
\newsavebox\tabu@box
\def\tabu@gobblespace#1 {#1}
\newcommand\tabu@NC@rewrite@X[1][]{\tabu@rewrite@X{#1}%
+ \let\@halignto \relax
\expandafter \NC@find \tabucolX@spec}
\expandafter\def\csname NC@rewrite@\string\usetabu\endcsname#1{%
\ifx\\#1\\\tabu@saveerr{}\else
@@ -137,9 +138,10 @@
\expandafter\def\csname NC@find@\string\tabu@rewritelast\endcsname
#1\tabu@rewritelast{\NC@{#1}}
\def\tabu@rewritelast{%
- \ifx \@halignto\relax \let\tabu@temp \@empty
+ \ifx \@halignto\relax % found a X column
+ \let\tabu@temp \@empty
+ \aftergroup \tabu@addphantomline
\else
- \let\@halignto \tabu@halignto
\ifdim \tabu@target=\z@ \let\tabu@temp \@empty
\else
\if |\noexpand\tabu@temp \def\tabu@temp{@{\extracolsep\@flushglue}}\else
@@ -147,6 +149,7 @@
\def\tabu@temp{!{\extracolsep\@flushglue}}\fi\fi
\fi
\fi
+ \let\@halignto \tabu@halignto
\expandafter\NC@find \tabu@temp
}% \tabu@rewritelast
\newtoks\tabu@everycr@tok
@@ -160,11 +163,17 @@
\def\tabu@phantomline{\noalign{%
\global\everycr{}%
\global\setbox\tabu@box\box\@arstrutbox
+ \global\let\tabu@minrowclearance \minrowclearance
+ \global\let\minrowclearance \z@
+ \global\let\tabu@temp \vcenter
+ \global\let\vcenter \vbox
\toks@{}\count@\@ne
\@whilenum\count@<\tabu@nbcols\do{\advance\count@\@ne
\toks@\expandafter{\the\toks@&}}%
\toks@\expandafter{\the\toks@
- \cr\noalign{\global\setbox\@arstrutbox\box\tabu@box}}%
+ \cr\noalign{\global\setbox\@arstrutbox\box\tabu@box
+ \global\let\minrowclearance \tabu@minrowclearance
+ \global\let\vcenter \tabu@temp}}%
\expandafter}\the\toks@
}% \tabu@phantomline
\def\tabu{%
@@ -176,6 +185,7 @@
\let\adl@xarraydashrule \tabu@adl@xarraydashrule % <fix> arydshln
\let\adl@act@endpbox \tabu@adl@act@endpbox % <fix> arydshln
\let\adl@act@@endpbox \tabu@adl@act@endpbox % <fix> arydshln
+ \let\@preamerror \@preamerr % <fix> arydshln
\let\endarray \tabu@endarray % <fix> colortbl & arydshln (delarray)
\let\tabu@global@temp \@empty \let\tabu@global@X \@empty
\ifx\verbatim \tabu@sanitizetext
@@ -272,11 +282,7 @@
\fi
}% \tabu@rewrite@X
\def\tabu@rewrite@Xnested#1{\def\tabucolX@spec{p{\tabucolX}}}
-\def\tabu@rewrite@Xrestore#1{\tabu@Xarg{#1}\let\tabucolX@spec\tabu@temp
- \iftabu@measuring \else \tabu@measuringtrue \aftergroup\tabu@usetabuX \fi}%
-\def\tabu@usetabuX{%
- \tabu@everycr\expandafter{\the\tabu@everycr\tabu@phantomline}%
-}% \tabu@usetabuX
+\def\tabu@rewrite@Xrestore#1{\tabu@Xarg{#1}\let\tabucolX@spec\tabu@temp}%
\def\tabu@rewrite@Xto{%
\iftabu@measuring % not the first X column found in preamble
\xdef\tabu@global@X {\tabu@global@X
@@ -289,7 +295,7 @@
\xdef\tabu@global@X{%
\tabu@X@sum \the\tabu@X@sum\relax
\tabu@target \the\tabu@target\relax}%
- \let \@halignto \relax
+ \let\tabu@halignto \relax
\aftergroup \tabu@prep@TRIAL
\fi
}% \tabu@rewrite@Xto
@@ -312,7 +318,7 @@
\tabu@target \the\tabu@target\relax
\tabu@spreadtarget \the\tabu@spreadtarget\relax
\def\csname tabu@X\the\tabu@X@cols\endcsname{\strip@pt\tabu@X@sum}}%
- \let\@halignto \relax
+ \let\tabu@halignto \relax
\aftergroup \tabu@prep@TRIAL
\fi
}% \tabu@rewrite@Xspread
@@ -435,7 +441,7 @@
\newcommand\tabuDisableCommands[1]{\g@addto@macro\tabu@TRIAL@hook{#1}}
\def\tabu@arrayleft@measure#1\bgroup{%
\def\tabu@Xfinish{\ifnum0=`{\fi}\tabu@global@X
- \let\@halignto\tabu@halignto \tabu@firstclinetrue #1\bgroup}%
+ \let\@halignto\tabu@halignto \tabu@firstcline #1\bgroup}%
\toks@{\let\@preamble\tabu@savedpreamble}% <required for multicolumn>
\tabu@collect
}% \tabu@arrayleft@measure
@@ -577,63 +583,6 @@
\box\tabu@box
\egroup % end of \vtop (measure)
}% \tabu@spread@endhbox
-\def\tabu@tabudecimal#1{%
- \def\tabu@decimal{#1}\@temptokena{}%
- \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces
- \tabu@scandecimal
-}% \tabudecimal
-\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@}
-\def\tabu@skipdecimal#1{#1\tabu@scandecimal}
-\def\tabu@getdecimal@ignorespaces{%
- \ifcase 0\ifx\tabu@temp\ignorespaces\else
- \ifx\tabu@temp\@sptoken1\else
- 2\fi\fi\relax
- \let\tabu@getdecimal@ \tabu@getdecimal
- \expandafter\tabu@skipdecimal
- \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal
- \else \expandafter\tabu@skipdecimal
- \fi
-}% \tabu@getdecimal@ignorespaces
-\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}%
- \tabu@scandecimal}
-\def\do#1{%
- \def\tabu@get@decimalspace#1{%
- \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}%
-}\do{ }
-\def\tabu@getdecimal{%
- \ifcase 0\ifx 0\tabu@temp\else
- \ifx 1\tabu@temp\else
- \ifx 2\tabu@temp\else
- \ifx 3\tabu@temp\else
- \ifx 4\tabu@temp\else
- \ifx 5\tabu@temp\else
- \ifx 6\tabu@temp\else
- \ifx 7\tabu@temp\else
- \ifx 8\tabu@temp\else
- \ifx 9\tabu@temp\else
- \ifx .\tabu@temp\else
- \ifx ,\tabu@temp\else
- \ifx -\tabu@temp\else
- \ifx +\tabu@temp\else
- \ifx e\tabu@temp\else
- \ifx E\tabu@temp\else
- \ifx\tabu@cellleft\tabu@temp1\else
- \ifx\ignorespaces\tabu@temp1\else
- \ifx\@sptoken\tabu@temp2\else
- 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
- \expandafter\tabu@get@decimal
- \or \expandafter\tabu@skipdecimal
- \or \expandafter\tabu@get@decimalspace
- \else\expandafter\tabu@printdecimal
- \fi
-}% \tabu@getdecimal
-\def\tabu@printdecimal{%
- \edef\tabu@temp{\the\@temptokena}%
- \ifx\tabu@temp\@empty\else
- \ifx\tabu@temp\space\else
- \expandafter\tabu@decimal\expandafter{\the\@temptokena}%
- \fi\fi
-}% \tabu@printdecimal
\newcommand*\tabuvline@rewrite[1][]{\tabuvline@arg{#1}%
\expandafter \NC@find \tabu@temp}
\def\tabu@vline#1{\vrule width#1}
@@ -670,14 +619,16 @@
\def\tabuvlines@find#1|{\NC@{#1}}
\def\tabu@firstcline{%
\tabu@firstclinetrue
- \let\tabu@everycr\everycr
- \def\tabu@restoreeverycr{\let\everycr\tabu@everycr}%
+ \let\tabu@everycr \everycr
+ \def\tabu@restoreeverycr {\let\everycr\tabu@everycr}%
\def\everycr{\afterassignment\tabu@restoreeverycr\@temptokena}% <for ialign>
\tabu@everycr{\noalign{%
\global\tabu@everycr{\noalign{%
\global\tabu@everycr{}\global\tabu@firstclinefalse}}%
\global\let\everycr\tabu@everycr}}%
}% \tabu@firstcline
+\def\tabu@addphantomline{\tabu@everycr\expandafter{\the\tabu@everycr
+ \tabu@phantomline}}
\def\tabu@linedash{4pt}% <default value>
\def\tabu@dashgap{4pt}% <default value>
\def\tabucline{\noalign{\ifnum0=`}\fi\@ifstar
@@ -694,7 +645,7 @@
\toks@\expandafter{\the\toks@ &}}%
\loop
\toks@\expandafter{\the\toks@ \omit }%
- \ifcase 0\if@tempswa\else\ifnum \@multicnt>\tabu@start 1\fi\fi\relax
+ \ifnum \@multicnt=\@ne
\expandafter \tabu@add \csname tabu@tok@\the\@multicnt L\endcsname \@nil
\fi
\ifcase 0\if@tempswa\else\ifnum \@multicnt<\tabu@stop 1\fi\fi\relax
@@ -734,8 +685,8 @@
\ifx\@tempa\hbox \tabu@defleaders{#1}\else
\ifx\@tempa\box \tabu@defleaders{#1}\else
\ifx\@tempa\copy \tabu@defleaders{#1}\else
- \ifcsname tabu@line@style@\string#1\endcsname
- \csname tabu@line@style@\string#1\endcsname
+ \ifcsname tabu@line@style@\detokenize{#1}\endcsname
+ \csname tabu@line@style@\detokenize{#1}\endcsname
\else \tabu@getline{#1\p@ on0pt off0pt}\fi\fi\fi\fi\fi
}% \tabu@getlinespec
\def\tabu@defleaders#1{%
@@ -778,11 +729,11 @@
\ifdim\@tempdimc>\z@
\hbox\bgroup \kern\the\dimexpr\@tempdimc/2\relax\fi
\noexpand\iftabu@firstcline
- \vrule depth\the\@tempdima
+ \vrule depth\dimexpr\the\@tempdima
\ifdim\@tempdimb>\z@ width\the\@tempdimb\fi
\noexpand\else
\vrule height\dimexpr-\extrarowheight+\the\@tempdima
- depth\extrarowheight
+ depth\dimexpr\extrarowheight
\ifdim\@tempdimb>\z@ width\the\@tempdimb\fi
\noexpand\fi
\ifdim\@tempdimc>\z@
@@ -812,7 +763,7 @@
\def\tabulinestyle#1{\@for\@tempa:=#1\do{\expandafter\tabu@linestyle\@tempa==\@nil}}
\def\tabu@linestyle#1=#2=#3\@nil{%
\begingroup \tabu@getlinespec {#2}\expandafter\gdef
- \csname tabu@line@style@\string#1\expandafter\endcsname
+ \csname tabu@line@style@\detokenize{#1}\expandafter\endcsname
\expandafter{\expandafter\def\expandafter\tabu@xleaders
\expandafter{\tabu@xleaders}}%
\endgroup
@@ -836,6 +787,63 @@
\tabu@verb #1\tabu@s@nitizetext}
\long\def\tabu@s@nitizetext#1{\@makeother\{\@makeother\}%
\everyeof{\noexpand}\scantokens{#1}\endgroup}
+\def\tabu@tabudecimal#1{%
+ \def\tabu@decimal{#1}\@temptokena{}%
+ \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces
+ \tabu@scandecimal
+}% \tabudecimal
+\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@}
+\def\tabu@skipdecimal#1{#1\tabu@scandecimal}
+\def\tabu@getdecimal@ignorespaces{%
+ \ifcase 0\ifx\tabu@temp\ignorespaces\else
+ \ifx\tabu@temp\@sptoken1\else
+ 2\fi\fi\relax
+ \let\tabu@getdecimal@ \tabu@getdecimal
+ \expandafter\tabu@skipdecimal
+ \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal
+ \else \expandafter\tabu@skipdecimal
+ \fi
+}% \tabu@getdecimal@ignorespaces
+\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}%
+ \tabu@scandecimal}
+\def\do#1{%
+ \def\tabu@get@decimalspace#1{%
+ \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}%
+}\do{ }
+\def\tabu@getdecimal{%
+ \ifcase 0\ifx 0\tabu@temp\else
+ \ifx 1\tabu@temp\else
+ \ifx 2\tabu@temp\else
+ \ifx 3\tabu@temp\else
+ \ifx 4\tabu@temp\else
+ \ifx 5\tabu@temp\else
+ \ifx 6\tabu@temp\else
+ \ifx 7\tabu@temp\else
+ \ifx 8\tabu@temp\else
+ \ifx 9\tabu@temp\else
+ \ifx .\tabu@temp\else
+ \ifx ,\tabu@temp\else
+ \ifx -\tabu@temp\else
+ \ifx +\tabu@temp\else
+ \ifx e\tabu@temp\else
+ \ifx E\tabu@temp\else
+ \ifx\tabu@cellleft\tabu@temp1\else
+ \ifx\ignorespaces\tabu@temp1\else
+ \ifx\@sptoken\tabu@temp2\else
+ 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
+ \expandafter\tabu@get@decimal
+ \or \expandafter\tabu@skipdecimal
+ \or \expandafter\tabu@get@decimalspace
+ \else\expandafter\tabu@printdecimal
+ \fi
+}% \tabu@getdecimal
+\def\tabu@printdecimal{%
+ \edef\tabu@temp{\the\@temptokena}%
+ \ifx\tabu@temp\@empty\else
+ \ifx\tabu@temp\space\else
+ \expandafter\tabu@decimal\expandafter{\the\@temptokena}%
+ \fi\fi
+}% \tabu@printdecimal
\newcommand*\savetabu[1]{\noalign{%
\ifx\\#1\\\tabu@savewarn{}{The tabu will not be saved}\else
\@ifundefined{tabu@save@\string#1}{}{\tabu@savewarn{#1}{Overwritting}}%
@@ -897,9 +905,6 @@
\else
\ifcase \numexpr \count@-\@tempcnta \relax % (case 0): prev. token is left
\advance \tabu@nbcols\@ne
- \ifnum \tabu@nbcols>\@ne
- \expandafter\let\csname tabu@tok@\the\tabu@nbcols L\endcsname \relax
- \fi
\expandafter\let\csname tabu@tok@\the\tabu@nbcols R\endcsname \relax
\expandafter\gdef\expandafter\tabu@global@temp\expandafter{%
\tabu@global@temp \advance\tabu@nbcols\@ne}%
@@ -907,17 +912,21 @@
\tabu@cellrightfalse % <only once>
\tabu@savetok R\tabu@preptokenright
\fi
- \tabu@savetok L\tabu@preptokenleft
+ \ifnum \tabu@nbcols=\@ne
+ \tabu@savetok L% LEFT token is always empty unless >{...}
+ \fi
+ \tabu@preptokenleft
\or % (case 1) previous token is right
\tabu@savetok R\tabu@cellrighttrue
\else % special column: do not change the token
\ifnum \tabu@nbcols>\z@ %special column: always on the right of normal one
+ \tabu@savetok R%
\else % unless this is the very first column (\tabu@nbcols=0)
\advance\tabu@nbcols\@ne \tabu@savetok L\advance\tabu@nbcols\m@ne
\fi
\iftabu@cellright % before-previous token is right
\tabu@cellrightfalse
- \tabu@savetok R\tabu@preptokenright
+ \tabu@preptokenright
\fi
\fi % \ifcase
\fi