summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tabu
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-13 00:24:40 +0000
committerKarl Berry <karl@freefriends.org>2010-11-13 00:24:40 +0000
commit63f449cec5129e9c1b8024681cc6b8ca3e3a35de (patch)
treee594d5da8376254c5e49240da524afa453c262c0 /Master/texmf-dist/tex/latex/tabu
parentb2520c4eee7eb7032ace566b4514f2ff2215f242 (diff)
new latex package tabu (12nov10)
git-svn-id: svn://tug.org/texlive/trunk@20421 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tabu')
-rw-r--r--Master/texmf-dist/tex/latex/tabu/tabu.sty1147
1 files changed, 1147 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tabu/tabu.sty b/Master/texmf-dist/tex/latex/tabu/tabu.sty
new file mode 100644
index 00000000000..750a4286675
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tabu/tabu.sty
@@ -0,0 +1,1147 @@
+%%
+%% This is file `tabu.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% tabu.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% tabu : 2010/10/27 v1.1 - tabu : Flexible LaTeX tabulars
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work consists of the main source file tabu.dtx
+%% and the derived files
+%% tabu.sty, tabu.pdf, tabu.ins
+%%
+%% tabu : Flexible LaTeX tabulars
+%% Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
+%%
+
+\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+\ProvidesPackage{tabu}[2010/10/28 v1.1 - flexible LaTeX tabulars (FC)]
+\RequirePackage{array}[2008/09/09]
+\AtEndOfPackage{\tabu@AtEnd\let\tabu@AtEnd\@undefined}
+\let\tabu@AtEnd\@empty
+\def\TMP@EnsureCode#1#2{%
+ \edef\tabu@AtEnd{%
+ \tabu@AtEnd
+ \catcode#1 \the\catcode#1\relax
+ }%
+ \catcode#1 #2\relax
+}% \TMP@EnsureCode
+\TMP@EnsureCode{33}{12} % !
+\TMP@EnsureCode{124}{12}% |
+\TMP@EnsureCode{0}{12}% ^^@
+\TMP@EnsureCode{36}{3}% $ = math shift
+\let\tabu@message\@gobble
+\def\tracingtabu{\let\tabu@message\message}
+\let\tabudefaulttarget\linewidth
+\DeclareOption{debugshow}{\tracingtabu}
+\DeclareOption{linegoal}{%
+ \AtEndOfPackage{\RequirePackage{linegoal}[2010/10/31]}%
+ \def\tabudefaulttarget{\linegoal}% \linegoal is \linewidth if not pdfTeX
+}% linegoal option
+\DeclareOption{delarray}{%
+ \AtEndOfPackage{\RequirePackage{delarray}}%
+}% delarray option
+\DeclareOption{light}{%
+ \AtEndOfPackage{%
+ \let\tabu@prepnext@tok \prepnext@tok
+ \let\tabu@save@decl \save@decl
+ \let\tabu@rowfont \tabu@norowfont
+ \let\tabucline \tabu@nocline
+ \let\tabu@firstcline \relax
+ \let\tabu@lines \relax
+ }
+}% light option
+\def\tabu@norowfont{\PackageError{tabu}
+ {\string\rowfont\space is not available with option `light'}\@ehd}
+\def\tabu@nocline{\PackageError{tabu}
+ {\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)>
+ \@ifpackageloaded{colortbl} \tabu@colortbltrue \tabu@colortblfalse
+}
+\newcount\tabu@cnt
+\newcount\tabu@nbcols
+\newcount\tabu@X@cols
+\newdimen\tabu@target
+\newdimen\tabu@spreadtarget
+\newdimen\tabu@naturalX
+\newdimen\tabucolX
+\newdimen\tabu@X@sum
+\newif\iftabu@measuring
+\newif\iftabu@spread
+\newif\iftabu@nested
+\newif\iftabu@firstcline
+\newsavebox\tabu@box
+\def\tabu@gobblespace#1 {#1}
+\newcommand\tabu@NC@rewrite@X[1][]{\tabu@rewrite@X{#1}%
+ \expandafter \NC@find \tabucolX@spec}
+\expandafter\def\csname NC@rewrite@\string\usetabu\endcsname#1{%
+ \ifx\\#1\\\tabu@saveerr{}\else
+ \@ifundefined{tabu@saved@\string#1}
+ {\tabu@saveerr{#1}}
+ {\let\tabu@rewrite@X \tabu@rewrite@Xrestore
+ \def\tabu@temp{\xdef\tabu@usetabu{%
+ \col@sep \the\col@sep\relax
+ \arrayrulewidth \the\arrayrulewidth\relax
+ \@tempdima \ht\@arstrutbox \advance\@tempdima -\extrarowheight
+ \extrarowheight \the\extrarowheight\relax
+ \advance\@tempdima \extrarowheight
+ \ht\@arstrutbox \@tempdima
+ \extratabsurround \the\extratabsurround\relax
+ \doublerulesep \the\doublerulesep\relax}}%
+ \aftergroup \tabu@usetabu
+ \csname tabu@saved@\string#1\expandafter\endcsname}%
+ \fi
+}% \NC@rewrite@\usetabu
+\expandafter\def\csname NC@find@\string\usetabu\endcsname#1\usetabu{\NC@{#1}}
+\expandafter\def\csname NC@rewrite@\string\tabu@rewritefirst\endcsname{%
+ \ifx\tabu@lines\relax
+ \NC@list\expandafter{\expandafter\NC@do \expandafter\usetabu
+ \NC@do X\NC@do\tabu@rewritelast}%
+ \else
+ \NC@list\expandafter{\expandafter\NC@do \expandafter\usetabu
+ \expandafter\NC@do \expandafter|\tabu@NC@list
+ \NC@do X\NC@do\tabu@rewritelast}%
+ \tabu@lines % defines NC@rewrite@| for tabu only (inside @mkpream group)
+ \fi
+ \let\save@decl \tabu@save@decl % inversion of tokens in text mode
+ \let\NC@rewrite@X \tabu@NC@rewrite@X
+ \aftergroup \tabu@global@temp
+ \aftergroup \tabu@firstcline
+ \NC@find \tabu@rewritelast
+}% NC@rewrite@\tabu@rewritefirst
+\expandafter\def\csname NC@find@\string\tabu@rewritefirst\endcsname
+ #1\tabu@rewritefirst{\NC@{#1}}
+\def\tabu@rewritefirst{%
+ \edef\tabu@NC@list{\the\NC@list}%
+ \NC@list{\NC@do \tabu@rewritefirst \NC@do *}%
+}% \tabu@rewritefirst
+\expandafter\def\csname NC@rewrite@\string\tabu@rewritelast\endcsname{%
+ \global\NC@list\expandafter{\tabu@NC@list}%
+ \futurelet \tabu@temp \tabu@rewritelast
+}% \NC@rewrite@\tabu@rewritelast
+\expandafter\def\csname NC@find@\string\tabu@rewritelast\endcsname
+ #1\tabu@rewritelast{\NC@{#1}}
+\def\tabu@rewritelast{%
+ \ifx \@halignto\relax \let\tabu@temp \@empty
+ \else
+ \let\@halignto \tabu@halignto
+ \ifdim \tabu@target=\z@ \let\tabu@temp \@empty
+ \else
+ \if |\noexpand\tabu@temp \def\tabu@temp{@{\extracolsep\@flushglue}}\else
+ \if !\noexpand\tabu@temp \def\tabu@temp{@{\extracolsep\@flushglue}}\else
+ \def\tabu@temp{!{\extracolsep\@flushglue}}\fi\fi
+ \fi
+ \fi
+ \expandafter\NC@find \tabu@temp
+}% \tabu@rewritelast
+\newtoks\tabu@everycr@tok
+\newif\iftabu@colortbl
+\def\tabu@nowrite{% cancels a \write command (tabularx method)
+ \begingroup
+ \def\let{\afterassignment\endgroup\toks@}%
+ \afterassignment\let\count@
+}% \tabu@nowrite
+\let\tabu@write\write
+\def\tabu@phantomline{\noalign{%
+ \global\everycr{}%
+ \global\setbox\tabu@box\box\@arstrutbox
+ \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}}%
+ \expandafter}\the\toks@
+}% \tabu@phantomline
+\def\tabu{%
+ \ifmmode \def\endtabu{\endarray}%
+ \else \def\endtabu{\endtabular}\fi
+ \tabu@setup \tabu@settarget
+}% \tabu
+\def\tabu@setup{%
+ \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\endarray \tabu@endarray % <fix> colortbl & arydshln (delarray)
+ \let\tabu@global@temp \@empty \let\tabu@global@X \@empty
+ \ifx\verbatim \tabu@sanitizetext
+ \tabu@nestedtrue
+ \def\tabu@aligndefault{t}\def\tabudefaulttarget{\linewidth}%
+ \else \tabu@nestedfalse
+ \def\tabu@aligndefault{c}%
+ \ifdim\parindent>\z@ \ifx\linewidth\tabudefaulttarget
+ \everypar\expandafter{% % correction for indentation
+ \the\everypar\everypar\expandafter{\the\everypar}%
+ \setbox\z@=\lastbox
+ \ifdim\wd\z@>\z@ \advance\linewidth -\wd\z@\fi
+ \box\z@
+ }%
+ \fi\fi
+ \fi
+ \let\@footnotetext \tabu@footnotetext
+ \let\@xfootnotenext\tabu@xfootnotetext
+ \iftabu@nested\else
+ \global\tabu@footnotes{}%
+ \aftergroup\the\aftergroup\tabu@footnotes
+ \fi
+ \let\centering \tabu@centering
+ \let\raggedright \tabu@raggedright
+ \let\raggedleft \tabu@raggedleft
+ \let\@trivlist \tabu@trivlist %<restore \\=\@centercr inside lists>
+ \let\tabudecimal \tabu@tabudecimal
+ \let\verbatim \tabu@sanitizetext
+ \let\fbox \tabu@fbox
+ \let\prepnext@tok \tabu@prepnext@tok % <for rowfont and tabucline>
+ \let\rowfont \tabu@rowfont
+ \tabu@spreadfalse \tabu@measuringfalse
+ \edef\tabu@hfuzz{\ifdim\hfuzz<.1\p@ .1\p@\else\the\hfuzz\fi}%
+ \tabu@rewritefirst
+}% \tabu@setup
+\def\tabu@save@decl{% no inversion on tokens when not in math mode
+ \ifcat$\d@llarend
+ \toks\count@\expandafter\expandafter\expandafter{%
+ \expandafter\@nextchar \the\toks\count@}%
+ \else
+ \toks\count@\expandafter\expandafter\expandafter{%
+ \expandafter\the\expandafter\toks\expandafter\count@\@nextchar}%
+ \fi
+}% \tabu@save@decl
+\def\tabu@settarget{\futurelet\@let@token \tabu@sett@rget}
+\def\tabu@sett@rget{\tabu@target\z@
+ \ifcase \ifx \bgroup\@let@token 0\else
+ \ifx [\@let@token 0\else
+ \ifx \@sptoken\@let@token 1\else
+ \if t\@let@token 2\else
+ \if s\@let@token 3\else
+ \m@ne\fi\fi\fi\fi\fi\relax
+ \expandafter\tabu@begin
+ \or \expandafter\tabu@gobblespace\expandafter\tabu@settarget
+ \or \expandafter\tabu@to
+ \or \expandafter\tabu@spread
+ \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@gettarget{\afterassignment\tabu@begin\tabu@target}
+\def\tabu@begin#1#{%
+ \edef\@halignto{\ifdim\tabu@target>\z@ \@halignto\the\tabu@target\fi}%
+ \let\tabu@halignto \@halignto
+ \expandafter\@testopt\expandafter\tabu@@begin \tabu@aligndefault #1\@nil
+}% \tabu@begin
+\def\tabu@@begin[#1]#2\@nil#3{%
+ \edef\tabu@align{#1}%
+ \edef\tabu@saved{%
+ \ifmmode \col@sep \the\arraycolsep
+ \else \col@sep \the\tabcolsep \fi\relax
+ \arrayrulewidth \the\arrayrulewidth\relax
+ \extrarowheight \the\extrarowheight\relax
+ \extratabsurround \the\extratabsurround\relax
+ \doublerulesep \the\doublerulesep\relax}%
+ \expandafter\def\expandafter\tabu@saved\expandafter{\tabu@saved
+ \tabu@temp \edef\tabu@halignto{to\the\tabu@target}\NC@find #3}%
+ \ifmmode \expandafter\array
+ \else \expandafter\tabular
+ \fi [{#1}]#2{\tabu@rewritefirst #3}%
+}% \tabu@@begin
+\newtoks\tabu@footnotes
+\long\def\tabu@footnotetext#1{%
+ \edef\@tempa{\the\tabu@footnotes
+ \noexpand\footnotetext [\the\csname c@\@mpfn\endcsname]}%
+ \global\tabu@footnotes\expandafter{\@tempa{#1}}}%
+\long\def\tabu@xfootnotetext[#1]#2{%
+ \global\tabu@footnotes\expandafter{\the\tabu@footnotes
+ \footnotetext[{#1}]{#2}}}
+\def\tabu@rewrite@X#1{\tabu@Xarg{#1}%
+ \iftabu@spread \tabu@rewrite@Xspread
+ \else \tabu@rewrite@Xto
+ \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@Xto{%
+ \iftabu@measuring % not the first X column found in preamble
+ \xdef\tabu@global@X {\tabu@global@X
+ \advance\tabu@X@sum \the\tabu@X@sum\relax}%
+ \else % first X column found in preamble
+ \tabu@measuringtrue
+ \ifdim\tabu@target=\z@
+ \setlength \tabu@target \tabudefaulttarget
+ \fi
+ \xdef\tabu@global@X{%
+ \tabu@X@sum \the\tabu@X@sum\relax
+ \tabu@target \the\tabu@target\relax}%
+ \let \@halignto \relax
+ \aftergroup \tabu@prep@TRIAL
+ \fi
+}% \tabu@rewrite@Xto
+\def\tabu@rewrite@Xspread{% tabu spread with X columns: we need to store each coef
+ \iftabu@measuring % not the first X column found in preamble
+ \advance\tabu@X@cols \@ne
+ \expandafter\let\csname tabu@X\the\tabu@X@cols\endcsname \relax
+ \xdef\tabu@global@X {\tabu@global@X
+ \advance\tabu@X@cols\@ne
+ \advance\tabu@X@sum \the\tabu@X@sum\relax
+ \def\csname tabu@X\the\tabu@X@cols\endcsname{\strip@pt\tabu@X@sum}}%
+ \else % first X column found in preamble
+ \tabu@measuringtrue
+ \tabu@X@cols \@ne \tabu@spreadtarget=\tabu@target
+ \setlength \tabu@target \tabudefaulttarget
+ \expandafter\let\csname tabu@X\the\tabu@X@cols\endcsname \relax
+ \xdef\tabu@global@X {%
+ \tabu@X@cols \@ne
+ \tabu@X@sum \the\tabu@X@sum\relax
+ \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
+ \aftergroup \tabu@prep@TRIAL
+ \fi
+}% \tabu@rewrite@Xspread
+\def\tabu@Xarg#1{%
+ \ifx\\#1\\% <shortcut when no option>
+ \tabu@X@sum \p@
+ \def\tabucolX@spec{p{\tabucolX}}%
+ \edef\tabu@temp{p{\the\tabucolX}}% <required for \usetabu>
+ \else
+ \tabu@X@sum \z@
+ \let\tabucolX@align \@empty
+ \let\tabucolX@spec \@empty
+ \let\tabu@Xmath \relax
+ \tabu@Xparse {}#1\relax\@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
+ \if b\@let@token 3\else
+ \if l\@let@token 4\else
+ \if c\@let@token 5\else
+ \if r\@let@token 6\else
+ \if .\@let@token 7\else
+ \ifx \@sptoken\@let@token 8\else
+ \if L\@let@token 9\else
+ \if C\@let@token 10\else
+ \if R\@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\relax
+ \tabucolX@do \expandafter\remove@to@nnil
+ \or \tabu@Xcolspec{p}%
+ \or \tabu@Xcolspec{m}%
+ \or \tabu@Xcolspec{b}%
+ \or \tabu@Xalign{>{\raggedright}}%
+ \or \tabu@Xalign{>{\centering}}%
+ \or \tabu@Xalign{>{\raggedleft}}%
+ \or \expandafter\tabu@Xcoef
+ \or \expandafter\tabu@Xparsespace
+ \or \tabu@Xalign{>{\RaggedRight}}%
+ \or \tabu@Xalign{>{\Centering}}%
+ \or \tabu@Xalign{>{\RaggedLeft}}%
+ \or \let\tabu@Xmath=$\expandafter\tabu@Xparse
+ \or \tabu@Xcoef{}%
+ \else \expandafter\tabu@Xparse
+ \fi
+}% \tabu@Xtest
+\def\tabu@Xalign#1{%
+ \ifx \tabucolX@align\@empty \else \PackageWarning{tabu}
+ {Duplicate horizontal alignment specification}\fi
+ \def\tabucolX@align{#1}\expandafter\tabu@Xparse
+}% \tabu@Xalign
+\def\tabu@Xcolspec#1{%
+ \ifx\tabucolX@spec\@empty\else \PackageWarning{tabu}
+ {Duplicate vertical alignment specification}\fi
+ \def\tabucolX@spec{#1}\expandafter\tabu@Xparse
+}% \tabu@Xcolspec
+\def\tabu@Xcoef#1{\def\@tempa{#1}%
+ \afterassignment\tabu@Xc@ef \tabu@cnt
+}% \tabu@Xcoef
+\def\tabu@Xc@ef{%
+ \advance\tabu@X@sum \@tempa\the\tabu@cnt\p@
+ \tabu@Xparse{}%
+}% \tabu@Xc@ef
+\def\tabucolX@do{%
+ \ifx\tabucolX@spec\@empty \def\tabucolX@spec{p}\fi
+ \ifdim \tabu@X@sum=\z@ \tabu@X@sum \p@\fi
+ \begingroup
+ \ifx \tabu@Xmath\relax
+ \edef\tabucolX@spec##1{\tabucolX@spec{##1}}%
+ \else
+ \edef\tabucolX@spec##1{>{$}\tabucolX@spec{##1}<{$}}%
+ \fi
+ \edef\tabu@temp{\dimexpr\strip@pt\tabu@X@sum \tabucolX \relax}%
+ \toks@\expandafter{\tabucolX@align}%
+ \edef\x{%
+ \def\noexpand\tabu@temp{\the\toks@ \tabucolX@spec{\the\tabu@temp}}%
+ \def\noexpand\tabucolX@spec{\the\toks@ \tabucolX@spec{\tabu@temp}}%
+ }\expandafter\endgroup\x
+}% \tabucolX@do
+\def\tabu@prep@TRIAL{%
+ \let\tabu@savedpreamble \@preamble
+ \def\savetabu {\tabu@saveX}%
+ {\ifnum0=`}\fi
+ \tabu@setup@TRIAL
+ \iftabu@spread % first trial only
+ \advance\tabu@X@cols \@ne
+ \expandafter\let\csname tabu@X\the\tabu@X@cols\endcsname \@undefined
+ \tabu@X@cols \z@ \tabu@naturalX \z@ \tabucolX \z@
+ \let\tabu@naturalX@max \z@
+ \let\tabu@naturalX@min \z@
+ \let\tabu@startpboxORI \@startpbox
+ \let\@startpbox \tabu@spread@startpbox
+ \else
+ \tabucolX = \tabu@target
+ \fi
+ \tabu@cnt \z@ % number of trials
+ \def\tabu@lasttry{\m@ne\p@}%
+ \tabu@arrayleft@measure
+}% \tabu@prep@TRIAL
+\def\tabu@setup@TRIAL{\tabu@global@X
+ \let\tabu@rewrite@X \tabu@rewrite@Xnested
+ \def\tabudefaulttarget{\linewidth}%
+ \def\@elt##1{\global\value{##1}\the\value{##1}\relax}%
+ \xdef\tabu@global@X {\cl@@ckpt}\let\@elt \relax
+ \hbadness\@M \hfuzz\maxdimen
+ \let\hbadness \@tempcnta
+ \let\hfuzz \@tempdima
+ \let\write \tabu@nowrite
+ \let\@footnotetext\@gobble
+ \let\tabu@saveX \@gobble
+ \tabu@TRIAL@hook
+}% \tabu@setup@TRIAL
+\let\tabu@TRIAL@hook\@empty
+\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}%
+ \toks@{\let\@preamble\tabu@savedpreamble}% <required for multicolumn>
+ \tabu@collect
+}% \tabu@arrayleft@measure
+\def\tabu@collect{\catcode`\^^@=13\def\tabu@stack{b}\tabu@collectbody}
+\long\def\tabu@collectbody#1\end#2{%
+ \edef\tabu@stack{\tabu@pushbegins #1\begin\end\expandafter\@gobble\tabu@stack}%
+ \ifx\tabu@stack\@empty
+ \toks@\expandafter{\the\toks@#1}\def\tabu@endenvir{\end{#2}}%
+ \expandafter\tabu@TRIAL
+ \else
+ \toks@\expandafter{\the\toks@#1\end{#2}}%
+ \expandafter\tabu@collectbody
+ \fi
+}% \tabu@collectbody
+\long\def\tabu@pushbegins#1\begin#2{\ifx\end#2\else b\expandafter\tabu@pushbegins\fi}
+\def\tabu@TRIAL{\setbox\tabu@box \hbox\bgroup $\@arrayleft\vbox\bgroup \the\toks@
+ \tabu@endTRIAL}% constant
+\def\tabu@endTRIAL{\endarray$\egroup
+ \iftabu@spread \tabu@spreadfalse
+ \let\@startpbox \tabu@startpboxORI
+ \tabu@spreadarith % <only once>
+ \else \tabu@arith
+ \fi
+ \iftabu@measuring \tabu@measuringfalse
+ \expandafter \tabu@TRIAL % <continue trials>
+ \else
+ \toks@\expandafter\expandafter\expandafter{%
+ \the\expandafter\toks@ \tabu@endenvir}%
+ \expandafter \tabu@Xfinish \the\toks@ % <we are then!>
+ \fi
+}% \tabu@endTRIAL
+\def\tabu@arith{%
+ \advance\tabu@cnt \@ne
+ \ifdim \tabu@lasttry=\wd\tabu@box
+ \tabu@message{\tabu@header Reached minimum width. Backing up}%
+ \else
+ \edef\tabu@lasttry{\the\wd\tabu@box}%
+ \tabu@message{\tabu@message@arith}%
+ \ifdim \dimexpr \wd \tabu@box - \tabu@target <\tabu@hfuzz
+ \tabu@message{\tabu@message@reached}%
+ \xdef\tabu@global@X {\tabu@target\the\tabu@target\relax \tabu@global@X
+ \tabucolX \the\tabucolX\relax}%
+ \else
+ \advance\tabucolX -\dimexpr(\wd\tabu@box-\tabu@target-\tabu@X@sum/65536)
+ *65536/\tabu@X@sum\relax
+ \ifdim \tabucolX<\z@
+ {\let\write\tabu@write\PackageWarning{tabu}
+ {X Columns too narrow (table too wide)\MessageBreak}}%
+ \tabucolX=1em%
+ \else \tabu@measuringtrue
+ \fi
+ \fi
+ \fi
+}% \tabu@arith
+\def\tabu@spreadarith{%
+ \tabu@naturalX \tabu@naturalX@max\relax
+ \tabucolX \tabu@naturalX@min\relax
+ \tabu@message{\tabu@message@spread}%
+ \ifdim \dimexpr \wd\tabu@box + \tabu@spreadtarget <\tabu@target
+ \advance\tabu@spreadtarget \dimexpr\wd\tabu@box-\tabu@naturalX+\tabucolX\relax
+ \ifdim \tabu@spreadtarget <\tabu@target
+ \tabu@target = \tabu@spreadtarget
+ \fi
+ \tabu@message{\expandafter\tabu@msg@align \the\tabu@target {}{}{}{}{}\@@}%
+ \tabu@message{\ifdim \tabu@spreadtarget>\tabu@target
+ (tabu) default target used.\fi}%
+ \else
+ \tabu@message{\expandafter\tabu@msg@align \the\tabu@target { }{}{}{}{}\@@}
+ \tabu@message{(tabu)\ifdim\wd\tabu@box<\tabu@target spread too large\else
+ tabu spread is useless here\fi,
+ default target used.}%
+ \fi
+ \xdef\tabu@halignto {to\the\tabu@target}%
+ \tabucolX \tabu@target
+ \tabu@measuringtrue
+}% \tabu@spreadarith
+\def\tabu@message@arith{\tabu@header
+ \expandafter\tabu@msg@align \the\tabucolX { }{ }{ }{ }{}\@@
+ \expandafter\tabu@msg@align \the\wd\tabu@box { }{ }{ }{ }{}\@@
+ \expandafter\tabu@msg@align \the\tabu@target { }{ }{ }{ }{}\@@
+ \expandafter\tabu@msg@align \the\tabu@X@sum {}{}{}{}{}\@@
+ \expandafter\tabu@msg@align \the\dimexpr(\tabu@target-\wd\tabu@box)
+ *65536/\tabu@X@sum\relax {}{}{}{}{}\@@}
+\def\tabu@message@spread{\tabu@spreadheader
+ \expandafter\tabu@msg@align \the\tabu@spreadtarget {}{}{}{}{}\@@
+ \expandafter\tabu@msg@align \the\wd\tabu@box {}{}{}{}{}\@@
+ \expandafter\tabu@msg@align \the\tabucolX {}{}{}{}{}\@@
+ \expandafter\tabu@msg@align \expandafter-\the\tabu@naturalX {}{}{}{}{}\@@}
+\def\tabu@message@reached{\tabu@header
+ \expandafter\tabu@msg@align \the\tabucolX { }{ }{ }{ }{}\@@
+ ******** Reached Target : hfuzz=\tabu@hfuzz\space ********^^J}
+\def\do#1{%
+ \def\tabu@msg@align##1.##2##3##4##5##6##7##8##9\@@{%
+ \ifnum##1<10 #1#1#1\else
+ \ifnum##1<100 #1#1\else
+ \ifnum##1<\@m #1\fi\fi\fi
+ ##1.##2##3##4##5##6##7##8#1}%
+ \def\tabu@header{%
+ \ifnum\tabu@cnt=\@ne (tabu)
+ Try#1#1#1#1tabu X#1#1#1#1#1#1tabu Width#1#1#1#1#1Target%
+ #1#1#1#1#1#1#1#1#1Coefs#1#1#1#1#1#1#1Update^^J\fi
+ (tabu) \ifnum\tabu@cnt<10 #1\fi\the\tabu@cnt)#1#1}%
+ \def\tabu@spreadheader{%
+ (tabu) Try#1#1#1#1Spread#1#1#1tabu Width#1#1#1#1#1Min Nat.#1#1#1#1Nat.X%
+ #1#1#1#1#1#1#1#1#1New Target^^J%
+ (tabu)spread}%
+}\do{ }
+\def\tabu@spread@startpbox#1{\bgroup
+ \in@{\tabucolX}{#1}%
+ \ifin@
+ \let\vss\relax\let\vfil\vss\let\vfill\vss\let\vskip\@tempskipa
+ \hbox to\tabu@target\bgroup\aftergroup\tabu@spread@endhbox\hfil
+ \else
+ \expandafter\@gobble\tabu@startpboxORI{#1}% \@gobble \bgroup
+ \fi
+}% \tabu@spread@startpbox
+\def\tabu@spread@endhbox{%
+ \ifnum\badness>\@M %<text does not fit>
+ \global\tabu@naturalX \tabu@target
+ \else
+ \setbox\tabu@box\lastbox
+ \setbox\tabu@box\hbox{\unhbox\tabu@box}%
+ \global\advance\tabu@X@cols \@ne
+ \ifcsname tabu@X\the\tabu@X@cols\endcsname
+ \global\advance\tabu@naturalX \wd\tabu@box
+ \else
+ \global\tabu@X@cols \@ne
+ \global\tabu@naturalX \wd\tabu@box
+ \fi
+ \ifdim \tabu@naturalX@max<\tabu@naturalX
+ \xdef\tabu@naturalX@max{\the\tabu@naturalX}%
+ \fi
+ \ifdim \tabu@naturalX@min<\dimexpr \wd\tabu@box * \tabu@X@sum /
+ (65536*\csname tabu@X\the\tabu@X@cols\endcsname)\relax
+ \xdef\tabu@naturalX@min{\the\dimexpr \wd\tabu@box * \tabu@X@sum /
+ (65536*\csname tabu@X\the\tabu@X@cols\endcsname)\relax}%
+ \fi
+ \fi
+ \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}
+
+\def\tabuvline@arg#1{%
+ \ifx\\#1\\% <shortcut when no option>
+ \def\tabu@temp{!{\tabu@vline\arrayrulewidth}}%
+ \else \futurelet \tabu@temp \tabuvline@argi #1\p@\p@\@nnil \tabuvline@argiii
+ \fi
+}% \tabuvline@arg
+\def\tabuvline@argi{%
+ \let\tabu@color \@empty
+ \ifcat A\noexpand\tabu@temp
+ \@tempdima\arrayrulewidth
+ \expandafter\tabu@getlinecolor
+ \else \expandafter\tabuvline@argii
+ \fi
+}% \tabuvline@argi
+\def\tabuvline@argii#1\@nnil{%
+ \tabu@maybecolor \@tempdima #1 \@nnil
+}% \tabuvline@argii
+\def\tabuvline@argiii{%
+ \edef\tabu@temp{!{\color@begingroup\tabu@color
+ \noexpand\tabu@vline{\the\@tempdima}\color@endgroup}}%
+}% \tabuvline@argiii
+{
+\expandafter\let\csname NC@find@|\endcsname\relax
+\expandafter\let\csname NC@rewrite@|\endcsname\relax
+\xdef\tabu@lines{%
+ \let\csname NC@find@|\endcsname \noexpand\tabuvlines@find
+ \let\csname NC@rewrite@|\endcsname \noexpand\tabuvline@rewrite
+}% \tabu@vline
+}
+\def\tabuvlines@find#1|{\NC@{#1}}
+\def\tabu@firstcline{%
+ \tabu@firstclinetrue
+ \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@linedash{4pt}% <default value>
+\def\tabu@dashgap{4pt}% <default value>
+\def\tabucline{\noalign{\ifnum0=`}\fi\@ifstar
+ {\@tempswatrue\tabu@cline}
+ {\@tempswafalse\tabu@cline}}%
+\newcommand*\tabu@cline[2][]{%
+ \tabu@startstop{#2}\tabu@getlinespec{#1}\@multicnt\@ne
+ \ifnum\tabu@start>\tabu@stop \the\toks@
+ \else\ifx\tabu@xleaders\relax\the\toks@
+ \else
+ \toks@{\ifnum0=`{\fi}\noalign{\global\setbox\tabu@box \box\@arstrutbox}}%
+ \iftabu@firstcline\if\tabu@align t\vskip-\ht\@arstrutbox\fi\fi
+ \@whilenum\@multicnt<\tabu@start\do{\advance\@multicnt\@ne
+ \toks@\expandafter{\the\toks@ &}}%
+ \loop
+ \toks@\expandafter{\the\toks@ \omit }%
+ \ifcase 0\if@tempswa\else\ifnum \@multicnt>\tabu@start 1\fi\fi\relax
+ \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
+ \toks@\expandafter{\the\toks@ \color@begingroup}%
+ \toks@\expandafter\expandafter\expandafter{\expandafter\the
+ \expandafter\toks@ \tabu@xleaders \color@endgroup}%
+ \fi
+ \ifcase 0\if@tempswa\else\ifnum \@multicnt<\tabu@stop 1\fi\fi %
+ \expandafter \tabu@add \csname tabu@tok@\the\@multicnt R\endcsname \@nil
+ \fi
+ \ifnum\@multicnt<\tabu@stop
+ \advance\@multicnt\@ne
+ \if@tempswa \toks@\expandafter{\the\toks@ &}%
+ \else \toks@\expandafter{\the\toks@ \span}\fi
+ \repeat
+ \@whilenum\@multicnt<\tabu@nbcols\do{\advance\@multicnt\@ne
+ \toks@\expandafter{\the\toks@ &}}%
+ \toks@\expandafter{\the\toks@ \cr \noalign{%
+ \global\tabu@firstclinefalse \global\setbox\@arstrutbox \box\tabu@box}}%
+ \the\toks@
+ \fi\fi
+}% \tabucline
+\def\tabu@add #1\@nil{\toks@\expandafter{\the\toks@ #1\ifmmode$\fi}}
+\def\tabu@startstop#1{\tabu@start@stop #1\relax 1-\tabu@nbcols\@nnil}
+\def\tabu@start@stop #1-#2\@nnil{%
+ \countdef\tabu@start100\countdef\tabu@stop101 % <inside noalign group>
+ \@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
+}% \tabu@start@stop
+\def\tabu@getlinespec#1{\let\tabu@xleaders \relax
+ \@defaultunits \let\@tempa=#1 \relax\@nnil
+ \ifx\@tempa\relax \let\tabu@xleaders \tabu@defaultleaders\else
+ \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
+ \else \tabu@getline{#1\p@ on0pt off0pt}\fi\fi\fi\fi\fi
+}% \tabu@getlinespec
+\def\tabu@defleaders#1{%
+ \def\tabu@xleaders{\xleaders\hbox{\lower.5\extrarowheight#1}\tabu@leaderfill}}
+\def\tabucline@warn#1{\PackageWarning{tabu}
+ {Undefined line syle: #1
+ \MessageBreak Using default line style instead}%
+ \let\tabu@xleaders \tabu@defaultleaders
+}% \tabucline@warn
+\def\tabu@getline#1{\tabu@lineon #1 \@nil on\tabu@linedash \p@ \@nil\@nnil{#1}}
+\def\tabu@maybecolor{\ifx\tabu@color\@empty \afterassignment\tabu@colortest
+ \else \@defaultunits\fi}
+\def\tabu@lineon #1on#2\@nil#3\@nnil#4{%
+ \let\tabu@color \@empty
+ \@defaultunits \let\@tempa=#1 \relax\@nnil
+ \ifcase 0\ifx o\@tempa 1\else\ifcat A\noexpand\@tempa 2\fi\fi\relax
+ \tabu@maybecolor \@tempdima #1\arrayrulewidth \p@\@nnil
+ \tabu@maybecolor \@tempdimb #2\p@ \@nnil
+ \tabu@lineoff #1 on#2 off\tabu@dashgap \p@ \@nnil
+ \or\@tempdima \arrayrulewidth
+ \tabu@maybecolor \@tempdimb #2\p@ \@nnil
+ \tabu@lineoff #1 on#2 off\tabu@dashgap \p@ \@nnil
+ \else
+ \tabu@maybecolor \@tempdima \arrayrulewidth #1\p@\@nnil
+ \ifx\tabu@color\@empty \tabucline@warn{#4}\else
+ \@tempdimb \z@
+ \tabu@lineoff off0pt \p@\@nnil \fi
+ \fi
+}% \tabu@lineon
+\def\tabu@lineoff #1off#2\@nnil{%
+ \tabu@maybecolor \@tempdimc #2\p@ \@nnil
+ \ifdim \@tempdimb=\z@
+ \ifdim \@tempdimc>\z@ \@tempdimb \tabu@dashgap\relax\fi\fi
+ \ifdim \@tempdimc=\z@
+ \ifdim \@tempdimb>\z@ \@tempdimc \tabu@linedash\relax\fi\fi
+ \ifdim \@tempdima<\z@ \else
+ \ifdim \@tempdimb<\z@ \else
+ \ifdim \@tempdimc<\z@ \else
+ \edef \tabu@xleaders{\tabu@color\xleaders
+ \ifdim\@tempdimc>\z@
+ \hbox\bgroup \kern\the\dimexpr\@tempdimc/2\relax\fi
+ \noexpand\iftabu@firstcline
+ \vrule depth\the\@tempdima
+ \ifdim\@tempdimb>\z@ width\the\@tempdimb\fi
+ \noexpand\else
+ \vrule height\dimexpr-\extrarowheight+\the\@tempdima
+ depth\extrarowheight
+ \ifdim\@tempdimb>\z@ width\the\@tempdimb\fi
+ \noexpand\fi
+ \ifdim\@tempdimc>\z@
+ \kern\the\dimexpr\@tempdimc/2\egroup\fi
+ \tabu@leaderfill}%
+ \fi\fi\fi
+}% \tabu@lineoff
+\def\tabu@colortest{\futurelet\tabu@temp\tabu@linecolor}
+\def\tabu@linecolor{%
+ \ifcase 0\if ,\noexpand\tabu@temp\else
+ \ifx\relax\tabu@temp\else
+ \ifx \@sptoken\tabu@temp1\else
+ \ifcat A\noexpand\tabu@temp2\else
+ 3\fi\fi\fi\fi\relax
+ \def\tabu@next##1{\futurelet\tabu@temp\tabu@linecolor}%
+ \or\def\tabu@next{\tabu@gobblespace{\futurelet\tabu@temp\tabu@linecolor}}%
+ \or\let\tabu@next\tabu@getlinecolor
+ \else\expandafter\remove@to@nnil
+ \fi \tabu@next
+}% \tabu@linecolor
+\def\tabu@getlinecolor#1\p@{%
+ \edef\@tempa{\zap@space #1 \@empty}%
+ \ifcsname\string\color@\@tempa\endcsname
+ \edef\tabu@color{\noexpand\noexpand\noexpand\color{\@tempa}}% \set@color
+ \fi\remove@to@nnil
+}% \tabu@getlinecolor
+\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
+ \expandafter{\expandafter\def\expandafter\tabu@xleaders
+ \expandafter{\tabu@xleaders}}%
+ \endgroup
+}% \tabu@linestyle
+\expandafter\def \csname tabu@line@style@\endcsname {%
+ \let\tabu@xleaders \tabu@defaultleaders}%
+\def\tabu@defaultleaders{\leaders
+ \iftabu@firstcline
+ \vrule depth \arrayrulewidth
+ \else
+ \vrule height\dimexpr-\extrarowheight+\arrayrulewidth
+ depth \extrarowheight
+ \fi
+ \tabu@leaderfill}
+\let\tabu@leaderfill \hfil
+{\catcode32=13\relax\catcode`\^^@=13\relax
+\gdef\tabu@verb{\@sanitize\makeatletter\catcode`\^=7\edef\^{\string^}%
+\catcode32=13\let =\ \catcode`\^^@=13\def^^@{\par}\endlinechar\m@ne}%
+}
+\newcommand\tabu@sanitizetext[1][\ttfamily]{\begingroup
+ \tabu@verb #1\tabu@s@nitizetext}
+\long\def\tabu@s@nitizetext#1{\@makeother\{\@makeother\}%
+ \everyeof{\noexpand}\scantokens{#1}\endgroup}
+\newcommand*\savetabu[1]{\noalign{%
+ \ifx\\#1\\\tabu@savewarn{}{The tabu will not be saved}\else
+ \@ifundefined{tabu@save@\string#1}{}{\tabu@savewarn{#1}{Overwritting}}%
+ {\toks@\expandafter{\tabu@saved}%
+ \expandafter\xdef\csname tabu@saved@\string#1\endcsname{%
+ \tabu@target\the\tabu@target\relax
+ \the\toks@}}%
+ \fi}%
+}% \savetabu
+\def\tabu@saveX#1{\noalign{%
+ \ifx\\#1\\\tabu@savewarn{}{The tabu will not be saved}\else
+ \@ifundefined{tabu@saved@\string#1}{}{\tabu@savewarn{#1}{Overwritting}}%
+ {\toks@\expandafter{\tabu@saved}%
+ \expandafter\xdef\csname tabu@saved@\string#1\endcsname{%
+ \tabucolX\the\tabucolX\relax
+ \tabu@target\the\tabu@target\relax
+ \the\toks@}}%
+ \fi}%
+}% \tabu@saveX
+\def\tabu@savewarn#1#2{\PackageInfo{tabu}
+ {User-name `#1' already used for \string\savetabu
+ \MessageBreak #2}}%
+\def\tabu@saveerr#1{\PackageError{tabu}
+ {User-name `#1' is unknown for \string\usetabu
+ \MessageBreak I cannot restore an unknown preamble!}\@ehd}
+\def\tabu@rowfont{\noalign{\ifnum0=`}\fi\tabu@row@font}
+\newcommand*\tabu@row@font[2][]{%
+ \global\tabu@everycr@tok=\everycr
+ \global\let\tabu@@cellleft \tabu@cellleft
+ \global\let\tabu@@cellright \tabu@cellright
+ \gdef\tabu@cellfont{#2}%
+ \ifcsname tabu@cell@#1\endcsname % row alignment
+ \csname tabu@cell@#1\endcsname \fi
+ \toks@\expandafter {\tabu@cellleft\tabu@cellfont}% inside \noalign group ok
+ \xdef\tabu@cellleft {\the\toks@}%
+ \global\everycr\expandafter {\the\everycr\tabu@rowfont@reset}%
+ \ifnum0=`{\fi}% end of noalign group
+}% \rowfont
+\def\tabu@rowfont@reset{%
+ \noalign{%
+ \global\let\tabu@cellleft \tabu@@cellleft
+ \global\let\tabu@cellright \tabu@@cellright
+ \global\let\tabu@cellfont \@empty
+ \global\let\tabu@celllalign \@empty
+ \global\let\tabu@cellralign \@empty
+ \global\everycr=\tabu@everycr@tok
+ \global\tabu@everycr@tok{}%
+ }%
+}% \tabu@rowfont@reset
+\newif\iftabu@cellright
+\AtBeginDocument{\let\array@prepnext@tok \prepnext@tok }% original definition
+\def\tabu@prepnext@tok{%
+ \ifnum \count@<\z@ % <first initialisation>
+ \@tempcnta \@M % <not initialized by array.sty>
+ \tabu@nbcols\z@
+ \gdef\tabu@global@temp{\tabu@nbcols\z@}%
+ \expandafter\let\csname tabu@tok@1L\endcsname \relax
+ \tabu@cellrightfalse
+ \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}%
+ \iftabu@cellright % before-previous token is right and is finished
+ \tabu@cellrightfalse % <only once>
+ \tabu@savetok R\tabu@preptokenright
+ \fi
+ \tabu@savetok L\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
+ \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
+ \fi
+ \fi % \ifcase
+ \fi
+ \array@prepnext@tok
+}% \tabu@prepnext@tok
+\def\tabu@preptokenright{%
+ \advance \count@ \m@ne
+ \toks\count@\expandafter {\the\toks\count@ \tabu@cellright \tabu@cellralign}%
+ \advance \count@ \@ne
+}% \tabu@preptokenright
+\def\tabu@preptokenleft{\toks\count@\expandafter {\expandafter\tabu@celllalign
+ \the\toks\count@ \tabu@cellleft}%
+}% \tabu@preptokenleft
+\def\tabu@savetok#1{\begingroup
+ \expandafter\tabu@savet@k\csname tabu@tok@\the\tabu@nbcols #1\endcsname
+}% \tabu@savetok
+\def\tabu@savet@k#1{%
+ \@temptokena\toks\count@
+ \ifx#1\relax\else \@temptokena\expandafter\expandafter
+ \expandafter{\expandafter#1\the\@temptokena}%
+ \fi
+ \@temptokena\expandafter{\expandafter\def\expandafter#1\expandafter{%
+ \the\@temptokena}}%
+ \toks@\expandafter\expandafter\expandafter{\expandafter\tabu@global@temp
+ \the\@temptokena}%
+ \xdef\tabu@global@temp{\the\toks@}%
+ \expandafter\endgroup \the\@temptokena
+}% \tabu@savetok
+\let\tabu@cellleft\@empty
+\let\tabu@cellright\@empty
+\def\tabu@celllalign{\tabu@cellleft}% row font spec. applies to pre-column material
+\let\tabu@cellralign\@empty
+\let\tabu@cellfont\@empty
+\def\tabu@cell@l{% force alignment to left
+ \gdef\tabu@celllalign{\tabu@removehfil
+ \raggedright\arraybackslash
+ \tabu@cellleft}%
+ \gdef\tabu@cellralign{\tabu@flush1\tabu@ignorehfil}%
+ \toks@\expandafter{\tabu@cellleft\raggedright\arraybackslash}% local
+ \xdef\tabu@cellleft{\the\toks@}%
+}% \tabu@cell@l
+\def\tabu@cell@c{% force alignment to center
+ \gdef\tabu@celllalign{\tabu@removehfil
+ \centering\arraybackslash
+ \tabu@flush{.5}\tabu@cellleft}%
+ \gdef\tabu@cellralign{\tabu@flush{.5}\tabu@ignorehfil}%
+ \toks@\expandafter{\tabu@cellleft\centering\arraybackslash}% local
+ \xdef\tabu@cellleft{\the\toks@}%
+}% \tabu@cell@c
+\def\tabu@cell@r{% force alignment to right
+ \gdef\tabu@celllalign{\tabu@removehfil
+ \raggedleft\arraybackslash
+ \tabu@flush1\tabu@cellleft}%
+ \gdef\tabu@cellralign{\tabu@ignorehfil}%
+ \toks@\expandafter{\tabu@cellleft\raggedleft\arraybackslash}% local
+ \xdef\tabu@cellleft{\the\toks@}%
+}% \tabu@cell@r
+\def\tabu@cell@j{% force justification (for p, m, b columns)
+ \gdef\tabu@celllalign{\tabu@justify\tabu@cellleft}%
+ \global\let\tabu@cellralign\@empty
+ \toks@\expandafter{\tabu@cellleft\tabu@justify}% local (noalign grp)
+ \xdef\tabu@cellleft{\the\toks@}%
+}% \tabu@cell@j
+\def\tabu@justify{%
+ \leftskip\z@skip \@rightskip\leftskip \rightskip\@rightskip
+ \parfillskip\@flushglue
+}% \tabu@justify
+%% ragged2e settings
+\def\tabu@cell@L{% force alignment to left (ragged2e)
+ \gdef\tabu@celllalign{\tabu@removehfil
+ \RaggedRight\arraybackslash
+ \tabu@cellleft}%
+ \gdef\tabu@cellralign{\tabu@flush1\tabu@ignorehfil}%
+ \toks@\expandafter{\tabu@cellleft\RaggedRight\arraybackslash}%
+ \xdef\tabu@cellleft{\the\toks@}%
+}% \tabu@cell@L
+\def\tabu@cell@C{% force alignment to center (ragged2e)
+ \gdef\tabu@celllalign{\tabu@removehfil
+ \Centering\arraybackslash
+ \tabu@flush{.5}\tabu@cellleft}%
+ \gdef\tabu@cellralign{\tabu@flush{.5}\tabu@ignorehfil}%
+ \toks@\expandafter{\tabu@cellleft\Centering\arraybackslash}%
+ \xdef\tabu@cellleft{\the\toks@}%
+}% \tabu@cell@C
+\def\tabu@cell@R{% force alignment to right (ragged2e)
+ \gdef\tabu@celllalign{\tabu@removehfil
+ \RaggedLeft\arraybackslash
+ \tabu@flush1\tabu@cellleft}%
+ \gdef\tabu@cellralign{\tabu@ignorehfil}%
+ \toks@\expandafter{\tabu@cellleft\RaggedLeft\arraybackslash}%
+ \xdef\tabu@cellleft{\the\toks@}%
+}% \tabu@cell@R
+\def\tabu@cell@J{% force justification (ragged2e)
+ \gdef\tabu@celllallign{\justifying\arraybackslash\tabu@cellleft}%
+ \global\let\tabu@cellralign\@empty
+ \toks@\expandafter{\tabu@cellleft\justifying\arraybackslash}%
+ \xdef\tabu@cellleft{\the\toks@}%
+}% \tabu@cell@J
+\def\tabu@flush#1{%
+ \iftabu@colortbl % colortbl uses \hfill rather than \hfil
+ \hskip \ifnum\currentgrouptype>13 \stretch{#1}%
+ \else\ifdim#1pt<1pt \tabu@cellskip
+ \else \stretch{#1}
+ \fi\fi \relax
+ \else % array.sty
+ \ifnum \currentgrouptype>13\relax
+ \hfil \hskip1sp
+ \fi
+ \fi
+}% \tabu@flush
+\AtBeginDocument{%
+ \@ifpackageloaded{ragged2e}
+ {}
+ {\let\tabu@cell@L \tabu@cell@l
+ \let\tabu@cell@R \tabu@cell@r
+ \let\tabu@cell@C \tabu@cell@c
+ \let\tabu@cell@J \tabu@cell@j
+ }%
+}% AtBeginDocument
+\newskip\tabu@cellskip
+\let\tabu@hfil\hfil
+\let\tabu@hfill\hfill
+\let\tabu@hskip\hskip
+\def\tabu@removehfil{%
+ \iftabu@colortbl
+ \unkern \tabu@cellskip = \lastskip
+ \ifnum\gluestretchorder\tabu@cellskip = \tw@ \hskip-\tabu@cellskip
+ \else \tabu@cellskip = \z@skip
+ \fi
+ \else
+ \ifdim\lastskip=1sp\unskip\fi
+ \ifnum\gluestretchorder\lastskip = \@ne
+ \hfilneg % \hfilneg for array.sty but not for colortbl...
+ \fi
+ \fi
+}% \tabu@removehfil
+\def\tabu@ignorehfil{%
+ \aftergroup\tabu@nohfil
+}% \tabu@ignorehfil
+\def\tabu@nohfil{% \hfil -> do nothing + restore original \hfil
+ \def\hfil{\let\hfil\tabu@hfil}% local to (alignment template) group
+}% \tabu@nohfil
+\AtBeginDocument{%
+ \@ifpackageloaded{colortbl}
+ {%
+ \def\tabu@nohfil{%
+ \def\hfil{\let\hfil\tabu@hfil}% local to (alignment template) group
+ \def\hfill{\let\hfill\tabu@hfill}% (colortbl uses \hfill) pfff...
+ \def\hskip##1\relax{\let\hskip\tabu@hskip}}% local
+ }% @ifpackageloaded colortbl
+ {}%
+}% AtBeginDocument
+\def\tabu@fbox{%
+ \leavevmode
+ \let\color@bgroup\bgroup
+ \def\color@egroup{\endgraf\egroup}%
+ \afterassignment\tabu@begin@fbox
+ \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}
+\AtBeginDocument{%
+\expandafter\def\expandafter\tabu@trivlist\expandafter{%
+ \expandafter\let\expandafter\\\expandafter\@centercr\@trivlist}%
+}%
+\def\tabu@fix@arrayright{%
+ \@ifpackageloaded{arydshln}
+ {%
+ \@ifpackageloaded{colortbl}
+ {%% colortbl + arydshln
+ \def\tabu@endarray{%
+ \adl@endarray \egroup \adl@arrayrestore \CT@end \egroup %<original>
+ \@arrayright % <FC>
+ \gdef\@preamble{}% <FC>
+ }}% \endarray
+ {%% arydshln / no colortbl
+ \def\tabu@endarray{%
+ \adl@endarray \egroup \adl@arrayrestore \egroup %<original>
+ \@arrayright % <FC>
+ \gdef\@preamble{}% <FC>
+ }}% \endarray
+ }%
+ {%
+ \@ifpackageloaded{colortbl}
+ {%% colortbl / no arydshln
+ \def\tabu@endarray{%
+ \crcr \egroup \egroup
+ \@arrayright % <FC>
+ \gdef\@preamble{}\CT@end
+ }}%
+ {\PackageWarning{tabu}
+ {\string\@arrayright\space is missing from the
+ \MessageBreak definition of \string\endarray.
+ \MessageBreak Comptability with delarray.sty is broken.}}%
+ }%
+}% \tabu@fix@arrayright
+\def\tabu@adl@xarraydashrule#1#2#3{%
+ \ifnum\@lastchclass=\adl@class@start\else
+ \ifnum\@lastchclass=\@ne\else
+ \ifnum\@lastchclass=5 \else % <FC> @-arg (class 5) and !-arg (class 1)
+ \adl@leftrulefalse \fi\fi % must be treated the same
+ \fi
+ \ifadl@zwvrule\else \ifadl@inactive\else
+ \@addtopreamble{\vrule\@width\arrayrulewidth
+ \@height\z@ \@depth\z@}\fi \fi
+ \ifadl@leftrule
+ \@addtopreamble{\adl@vlineL{\CT@arc@}{\adl@dashgapcolor}%
+ {\number#1}#3}%
+ \else \@addtopreamble{\adl@vlineR{\CT@arc@}{\adl@dashgapcolor}%
+ {\number#2}#3}
+ \fi
+}% \tabu@adl@xarraydashrule
+\def\tabu@adl@act@endpbox{%
+ \unskip \ifhmode \nobreak \fi \@finalstrut \@arstrutbox
+ \egroup
+ \adl@colhtdp \box\adl@box \hfil
+}% \tabu@adl@act@endpbox
+
+\endinput
+%%
+%% End of file `tabu.sty'.