summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-25 01:41:09 +0000
committerKarl Berry <karl@freefriends.org>2010-11-25 01:41:09 +0000
commit758bc16c67cd2f74d2101fab34d81b1ccffd8a26 (patch)
treeef299e485bc7f764bc1d617f58f61abd25eb8eab /Master/texmf-dist/tex
parent70be14e9ec1c5bc101114cdd33ea23c8ec080f84 (diff)
tabu (24nov10)
git-svn-id: svn://tug.org/texlive/trunk@20554 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/tabu/tabu.sty117
1 files changed, 95 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/tabu/tabu.sty b/Master/texmf-dist/tex/latex/tabu/tabu.sty
index 4da593ac290..4b09df52b1b 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/11/18 v1.3 - tabu : Flexible LaTeX tabulars
+%% tabu : 2010/11/22 v1.4 - 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/11/18 v1.3 - flexible LaTeX tabulars (FC)]
+\ProvidesPackage{tabu}[2010/11/22 v1.4 - flexible LaTeX tabulars (FC)]
\RequirePackage{array}[2008/09/09]
\AtEndOfPackage{\tabu@AtEnd\let\tabu@AtEnd\@undefined}
\let\tabu@AtEnd\@empty
@@ -143,7 +143,6 @@
\def\tabu@rewritelast{%
\ifx \@halignto\relax % found a X column
\let\tabu@temp \@empty
- %\aftergroup \tabu@addphantomline
\ifx \tabu@halignto\relax % X column measure
\aftergroup \tabu@prep@TRIAL
\else \aftergroup \tabu@setup@everycr
@@ -151,16 +150,15 @@
\else
\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
+ \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
\aftergroup\tabu@setup@everycr
\fi
\let\@halignto \tabu@halignto
\expandafter\NC@find \tabu@temp
}% \tabu@rewritelast
-%%\newtoks\tabu@everycr@tok
\newif\iftabu@colortbl
\def\tabu@nowrite{% cancels a \write command (tabularx method)
\begingroup
@@ -197,7 +195,8 @@
\fi\fi
\fi
\let\@footnotetext \tabu@footnotetext
- \let\@xfootnotenext\tabu@xfootnotetext
+ \let\@xfootnotetext\tabu@xfootnotetext
+ \let\@xfootnote \tabu@xfootnote
\let\centering \tabu@centering
\let\raggedright \tabu@raggedright
\let\raggedleft \tabu@raggedleft
@@ -238,11 +237,19 @@
}% \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@gettarget{\afterassignment\tabu@linegoaltarget\tabu@target}
+\def\tabu@linegoaltarget{\futurelet\tabu@temp\tabu@linegoal@target}
+\def\tabu@linegoal@target{\ifx\tabu@temp\LNGL@setlinegoal
+ \LNGL@setlinegoal
+ \expandafter\expandafter\expandafter \tabu@begin
+ \expandafter\@gobble
+ \else \expandafter\tabu@begin
+ \fi
+}% \tabu@linegoal@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
+ \expandafter\@testopt \expandafter\tabu@@begin \tabu@aligndefault #1\@nil
}% \tabu@begin
\def\tabu@@begin[#1]#2\@nil#3{%
\edef\tabu@align{#1}%
@@ -267,6 +274,54 @@
\long\def\tabu@xfootnotetext[#1]#2{%
\global\tabu@footnotes\expandafter{\the\tabu@footnotes
\footnotetext[{#1}]{#2}}}
+\let\tabu@xfootnote \@xfootnote
+\long\def\tabu@Hy@ftntext{\tabu@Hy@ftntxt {\the \c@footnote }}
+\long\def\tabu@Hy@xfootnote[#1]{%
+ \begingroup
+ \value\@mpfn #1\relax
+ \protected@xdef \@thefnmark {\thempfn}%
+ \endgroup
+ \@footnotemark \tabu@Hy@ftntxt {#1}%
+}% \tabu@Hy@xfootnote
+\long\def\tabu@Hy@ftntxt#1#2{%
+ \edef\@tempa{%
+ \the\tabu@footnotes
+ \begingroup
+ \value\@mpfn #1\relax
+ \noexpand\protected@xdef
+ \noexpand\@thefnmark{\noexpand\thempfn}%
+ \expandafter\noexpand\expandafter\tabu@Hy@footnotetext
+ \expandafter{%
+ \Hy@footnote@currentHref
+ }%
+ }%
+ \global\tabu@footnotes\expandafter{%
+ \@tempa{#2}%
+ \endgroup
+ }%
+}% \tabu@Hy@ftntxt
+\long\def\tabu@Hy@footnotetext#1#2{%
+ \H@@footnotetext{%
+ \ifHy@nesting
+ \hyper@@anchor{#1}{#2}%
+ \else
+ \Hy@raisedlink{%
+ \hyper@@anchor{#1}{\relax}%
+ }%
+ \def\@currentHref{#1}%
+ \let\@currentlabelname\@empty
+ #2%
+ \fi
+ }%
+}% \tabu@Hy@footnotetext
+\AtBeginDocument{%
+ \@ifpackageloaded{hyperref}
+ {\ifHy@hyperfootnotes
+ \let\tabu@footnotetext \tabu@Hy@ftntext
+ \let\tabu@xfootnote \tabu@Hy@xfootnote
+ \fi}
+ {}%
+}%
\def\tabu@rewrite@X#1{\tabu@Xarg{#1}%
\iftabu@spread \tabu@rewrite@Xspread
\else \tabu@rewrite@Xto
@@ -291,7 +346,7 @@
\let\tabu@halignto \relax
\fi
}% \tabu@rewrite@Xto
-\def\tabu@rewrite@Xspread{% tabu spread with X columns: we need to store each coef
+\def\tabu@rewrite@Xspread{% tabu spread with X columns: 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
@@ -427,6 +482,7 @@
\let\hfuzz \@tempdima
\let\write \tabu@nowrite
\let\@footnotetext\@gobble
+ \long\def\@xfootnote[##1]##2{}%
\let\tabu@saveX \@gobble
\tabu@TRIAL@hook
}% \tabu@setup@TRIAL
@@ -450,11 +506,16 @@
\expandafter\tabu@collectbody
\fi
}% \tabu@collectbody
-\long\def\tabu@pushbegins#1\begin#2{\ifx\end#2\else b\expandafter\tabu@pushbegins\fi}
+\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
\if c\tabu@align\vcenter\else\vbox\fi\bgroup \the\toks@
\tabu@endTRIAL}% constant
-\def\tabu@endTRIAL{\endarray$\egroup
+\def\tabu@endTRIAL{%
+ \ifdefined\adl@ncol % <arydshln in trials>
+ \csname crcr\endcsname
+ \noalign{\global\adl@ncol\tabu@nbcols}\fi
+ \endarray$\egroup
\iftabu@spread \tabu@spreadfalse
\let\@startpbox \tabu@startpboxORI
\tabu@spreadarith % <only once>
@@ -481,7 +542,7 @@
\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)
+ \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}
@@ -548,12 +609,17 @@
\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
+ \hbox to\tabu@target\bgroup\aftergroup\tabu@spread@endhbox
+ \tabu@spread@startpbox@setup \hfil
\else
\expandafter\@gobble\tabu@startpboxORI{#1}% \@gobble \bgroup
\fi
}% \tabu@spread@startpbox
+\def\tabu@spread@startpbox@setup{%
+ \let\tabu@vskipORI\vskip \let\tabu@adl@draw\adl@draw
+ \def\adl@draw{\let\vskip\tabu@vskipORI\tabu@adl@draw}%
+ \let\vss\relax\let\vfil\vss\let\vfill\vss\let\vskip\@tempskipa
+}% \tabu@spread@startpbox@setup
\def\tabu@spread@endhbox{%
\ifnum\badness>\@M %<text does not fit>
\global\tabu@naturalX \tabu@target
@@ -585,7 +651,10 @@
\def\tabuvline@arg#1{%
\ifx\\#1\\% <shortcut when no option>
- \def\tabu@temp{!{\tabu@vline\arrayrulewidth}}%
+ \edef\tabu@temp{!{%
+ \iftabu@colortbl\begingroup\noexpand\CT@arc@\fi
+ \noexpand\tabu@vline\arrayrulewidth
+ \iftabu@colortbl\endgroup\fi}}%
\else \futurelet \tabu@temp \tabuvline@argi #1\p@\p@\@nnil \tabuvline@argiii
\fi
}% \tabuvline@arg
@@ -601,8 +670,11 @@
\tabu@maybecolor \@tempdima #1 \@nnil
}% \tabuvline@argii
\def\tabuvline@argiii{%
- \edef\tabu@temp{!{\color@begingroup\tabu@color
- \noexpand\tabu@vline{\the\@tempdima}\color@endgroup}}%
+ \edef\tabu@temp{!{\begingroup
+ \ifx\tabu@color\@empty
+ \iftabu@colortbl \noexpand\CT@arc@ \fi
+ \else \tabu@color\fi
+ \noexpand\tabu@vline{\the\@tempdima}\endgroup}}%
}% \tabuvline@argiii
{
\expandafter\let\csname NC@find@|\endcsname\relax
@@ -770,7 +842,7 @@
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
+ \or\let\tabu@next \tabu@getlinecolor
\else\expandafter\remove@to@nnil
\fi \tabu@next
}% \tabu@linecolor
@@ -780,7 +852,8 @@
\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\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@\detokenize{#1}\expandafter\endcsname
@@ -801,7 +874,7 @@
\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}%
+\catcode32=13\let =\ \catcode`\^^@=13\def^^@{\linebreak}\endlinechar\m@ne}%
}
\newcommand\tabu@sanitizetext[1][\ttfamily]{\begingroup
\tabu@verb #1\tabu@s@nitizetext}