diff options
author | Karl Berry <karl@freefriends.org> | 2019-01-14 22:10:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-01-14 22:10:48 +0000 |
commit | af7cbe0e07505a3c93324c6008f280474dd8396f (patch) | |
tree | 7c8239726e5dabdd90dbd659417182020ecbdb7c /Master/texmf-dist/tex/latex/tabu | |
parent | 8af9a4793946fecf843c500b86aff321a0f5f47d (diff) |
tabu (14jan19)
git-svn-id: svn://tug.org/texlive/trunk@49707 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tabu')
-rw-r--r-- | Master/texmf-dist/tex/latex/tabu/tabu.sty | 97 |
1 files changed, 71 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/tabu/tabu.sty b/Master/texmf-dist/tex/latex/tabu/tabu.sty index 3c18755daf2..e62cacff5fc 100644 --- a/Master/texmf-dist/tex/latex/tabu/tabu.sty +++ b/Master/texmf-dist/tex/latex/tabu/tabu.sty @@ -1,15 +1,6 @@ +%%TABU-FIXED %% -%% 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. -%% Copyright (FC) 2010-2011 - lppl -%% -%% tabu : 2011/02/26 v2.8 - tabu : Flexible LaTeX tabulars +%% tabu : 2019-01-11 - tabu : Flexible LaTeX tabulars %% %% ********************************************************************************************** %% \begin{tabu} { preamble } => default target: \linewidth or \linegoal @@ -55,16 +46,18 @@ %% 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-FIXED %% tabu : Flexible LaTeX tabulars %% lppl copyright 2010-2011 by FC <florent.chervet@free.fr> +%% +%% Updated 2019-01-11 +%% Copyright 2019 tabu-fixed github group (LaTeX3 Project members) +%% Please report any issues at https://github.com/tabu-fixed/tabu %% -\NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{tabu}[2011/02/26 v2.8 - flexible LaTeX tabulars (FC)] +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{tabu}[2019/01/11 v2.9 - flexible LaTeX tabulars (FC+tabu-fixed)] \RequirePackage{array}[2008/09/09] \RequirePackage{varwidth}[2009/03/30] \AtEndOfPackage{\tabu@AtEnd \let\tabu@AtEnd \@undefined} @@ -163,8 +156,18 @@ \edef#2{#1}\tabu@strtrim#2\@onelevel@sanitize#2% \expandafter}\expandafter\def\expandafter#2\expandafter{#2}% }% \tabu@sanitizearg -\def\tabu@textbar #1{\begingroup \endlinechar\m@ne \scantokens{\def\:{|}}% - \expandafter\endgroup \expandafter#1\:% !!! semi simple group !!! + +%%TABU-FIXED +\def\tabu@textbar#1{% + \begingroup + \newlinechar \m@ne% + \endlinechar \m@ne + \everyeof{\noexpand}% + \edef\:{\expandafter\noexpand\scantokens{|}}% + \expandafter + \endgroup + \expandafter #1% + \:% }% \tabu@textbar \def\tabu@everyrow@bgroup{\iftabu@everyrow \begingroup \else \noalign{\ifnum0=`}\fi \fi} \def\tabu@everyrow@egroup{% @@ -715,6 +718,14 @@ \let\tabu@tabarray \@tabarray % idem " " " " " " " \tabu@adl@fix \let\endarray \tabu@endarray % <fix> colortbl & arydshln (delarray) \iftabu@colortbl\CT@everycr\expandafter{\expandafter\iftabu@everyrow \the\CT@everycr \fi}\fi +%%TABU-FIXED set up old version of array package \@classz to avoid recoding m (and X) here. (Partial fix only: may not cover all cases) + \let\tabu@classzORI\@classz \let\@classz \tabu@classz +%%TABU-FIXED set up \tabu@currentgrouptype +\def\tabu@currentgrouptype{\currentgrouptype}% +\ifx\color@begingroup\begingroup +\def\color@begingroup{\expandafter\begingroup\expandafter\def\expandafter + \tabu@currentgrouptype\expandafter{\the\currentgrouptype}}% +\fi }% \tabu@init \def\tabu@indent{% correction for indentation \ifdim \parindent>\z@\ifx \linewidth\tabudefaulttarget @@ -840,6 +851,30 @@ }% \tabu@reset \def\tabu@setsave #1{\expandafter\tabu@sets@ve #1\@nil{#1}} \long\def\tabu@sets@ve #1\@nil #2{\@temptokena\expandafter{\the\@temptokena \def#2{#1}}} +%%TABU-FIXED define classz to use vcenter, reverting a change in array package +\let\tabu@classzORI\@classz +\def\tabu@classz{% +\ifx\tabu@prepnext@tok\prepnext@tok% in tabu +\expandafter\tabu@classz@oldarray +\else +\tabu@classzORI +\fi}% +\def\tabu@classz@oldarray{% + \@classx + \@tempcnta \count@ + \prepnext@tok + \@addtopreamble{\ifcase \@chnum + \hfil + \d@llarbegin + \insert@column + \d@llarend \hfil \or + \hskip1sp\d@llarbegin \insert@column \d@llarend \hfil \or + \hfil\hskip1sp\d@llarbegin \insert@column \d@llarend \or + $\vcenter + \@startpbox{\@nextchar}\insert@column \@endpbox $\or + \vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or + \vbox \@startpbox{\@nextchar}\insert@column \@endpbox + \fi}\prepnext@tok}% %% The Rewritting Process ------------------------------------------- \def\tabu@newcolumntype #1{% \expandafter\tabu@new@columntype @@ -1632,7 +1667,10 @@ \let\FV@ListProcessLine \tabu@FV@ListProcessLine % \hbox to natural width... \narrowragged \arraybackslash \parfillskip \@flushglue \ifdefined\pdfadjustspacing \pdfadjustspacing\z@ \fi - \bgroup \aftergroup\tabu@endpboxmeasure + \bgroup + \aftergroup\tabu@endpboxmeasure +%%TABU-FIXED add \color@begingroup + \color@begingroup \ifdefined \cellspacetoplimit \tabu@cellspacepatch \fi \else \expandafter\@gobble \tabu@startpboxquick{#1}% \@gobble \bgroup @@ -1642,7 +1680,10 @@ \bgroup\color@begingroup} \def\tabu@endpboxmeasure {% \@finalstrut \@arstrutbox - \end{varwidth}\egroup % <got my \tabu@box> + \end{varwidth}% +%TABU-FIXED add \color@begingroup +\color@endgroup +\egroup % <got my \tabu@box> \ifdim \tabu@temp\p@ <\z@ % neg coef \ifdim \tabu@wd\tabu@Xcol <\wd\tabu@box \tabu@wddef\tabu@Xcol {\the\wd\tabu@box}% @@ -1686,14 +1727,15 @@ \def\tabu@endtabu {\end{tabu}} \def\tabu@endtabus {\end{tabu*}} %% Measuring the heights and depths - store the results ------------- +%%TABU-FIXED use \tabu@currentgrouptype \def\tabu@verticalmeasure{\everypar{}% - \ifnum \currentgrouptype>12 % 14=semi-simple, 15=math shift group + \ifnum \tabu@currentgrouptype>12 % 14=semi-simple, 15=math shift group \setbox\tabu@box =\hbox\bgroup \let\tabu@verticalspacing \tabu@verticalsp@lcr \d@llarbegin % after \hbox ... \else - \edef\tabu@temp{\ifnum\currentgrouptype=5\vtop - \else\ifnum\currentgrouptype=12\vcenter + \edef\tabu@temp{\ifnum\tabu@currentgrouptype=5\vtop + \else\ifnum\tabu@currentgrouptype=12\vcenter \else\vbox\fi\fi}% \setbox\tabu@box \hbox\bgroup$\tabu@temp \bgroup \let\tabu@verticalspacing \tabu@verticalsp@pmb @@ -2409,7 +2451,9 @@ }% \tabu@adl@xarraydashrule \def\tabu@adl@act@endpbox {% \unskip \ifhmode \nobreak \fi \@finalstrut \@arstrutbox - \egroup \egroup +%%TABU-FIXED +\color@endgroup + \egroup \egroup \adl@colhtdp \box\adl@box \hfil }% \tabu@adl@act@endpbox \def\tabu@adl@fix {% @@ -2421,7 +2465,8 @@ %% Correction for longtable' \@startbox definition ------------------ %% => \everypar is ``missing'' : TeX should be in vertical mode \def\tabu@LT@startpbox #1{% - \bgroup +%%TABU-FIXED add \color@begingroup + \bgroup\color@begingroup \let\@footnotetext\LT@p@ftntext \setlength\hsize{#1}% \@arrayparboxrestore |