diff options
author | Karl Berry <karl@freefriends.org> | 2011-01-23 01:07:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-01-23 01:07:22 +0000 |
commit | af624ba34d468559f5a8706a36716a56fc8a512d (patch) | |
tree | 13af1388693fbf1c28fd77acd0431d17056d7ce0 | |
parent | 15703ccdfc4e8e60c48c88a46bd19990f7f97264 (diff) |
tabu 2.1 (20jan11)
git-svn-id: svn://tug.org/texlive/trunk@21146 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/tabu/tabu.pdf | bin | 1764458 -> 1777486 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/tabu/tabu.drv | 12 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/tabu/tabu.dtx | 344 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/tabu/tabu.ins | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tabu/tabu.sty | 149 |
5 files changed, 333 insertions, 178 deletions
diff --git a/Master/texmf-dist/doc/latex/tabu/tabu.pdf b/Master/texmf-dist/doc/latex/tabu/tabu.pdf Binary files differindex 8072f3f2474..95b5c8f289e 100644 --- a/Master/texmf-dist/doc/latex/tabu/tabu.pdf +++ b/Master/texmf-dist/doc/latex/tabu/tabu.pdf diff --git a/Master/texmf-dist/source/latex/tabu/tabu.drv b/Master/texmf-dist/source/latex/tabu/tabu.drv index e81c0550a20..40ae06907fe 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 : 2011/01/25 v2.0 - tabu : Flexible LaTeX tabulars +%% tabu : 2011/01/19 v2.1 - tabu : Flexible LaTeX tabulars %% %% ******************************************************* %% \begin{tabu} to <dimen>{ preamble } @@ -40,8 +40,8 @@ %% \edef\thisfile{\jobname} \def\thisinfo{Flexible \LaTeX{} tabulars (\FC)} -\def\thisdate{2011/01/25} -\def\thisversion{2.0} +\def\thisdate{2011/01/19} +\def\thisversion{2.1} \def\CTANbaseurl{http://www.ctan.org/tex-archive/macros/latex} \def\CTANdisplay{CTAN:macros/latex} \makeatletter\protected\def\CTANhref{\@ifstar\CTANhrefstar\CTANhrefnost}\makeatother @@ -54,10 +54,10 @@ \documentclass[a4paper,oneside]{ltxdoc} \AtBeginDocument{ \DeleteShortVerb{\|} - \csname @ifpackagelater\endcsname{interfaces}{2011/01/17}{} + \csname @ifpackagelater\endcsname{interfaces}{2011/01/19}{} {\PackageError{tabu-pdf-documentation} {interfaces must be later\MessageBreak - than 2011/01/17 to compile this\MessageBreak + than 2011/01/19 to compile this\MessageBreak documentation. Please update your packages}\@ehd}} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} @@ -71,7 +71,7 @@ \usepackage{tabularx}\tracingtabularx \usepackage{enumitem-zref} \usepackage[verbose]{linegoal}[2010/12/07] -\usepackage{interfaces}[2011/01/17] +\usepackage{interfaces}[2011/01/19] \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 1c5641bc56b..511851da3dc 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 : 2011/01/25 v2.0 - tabu: flexible LaTeX tabulars] +% tabu : 2011/01/19 v2.1 - 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: 2011/01/25 v2.0 - tabu: Flexible LaTeX tabulars} +\Msg{* Package: 2011/01/26 v2.1 - tabu: Flexible LaTeX tabulars} \Msg{************************************************************************} \keepsilent @@ -47,7 +47,7 @@ This is a generated file. -tabu : 2011/01/25 v2.0 - tabu : Flexible LaTeX tabulars +tabu : 2011/01/19 v2.1 - tabu : Flexible LaTeX tabulars ******************************************************* \string\begin{tabu} to <dimen>{ preamble } @@ -114,8 +114,8 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> %<*driver> \edef\thisfile{\jobname} \def\thisinfo{Flexible \LaTeX{} tabulars (\FC)} -\def\thisdate{2011/01/25} -\def\thisversion{2.0} +\def\thisdate{2011/01/19} +\def\thisversion{2.1} \def\CTANbaseurl{http://www.ctan.org/tex-archive/macros/latex} \def\CTANdisplay{CTAN:macros/latex} \makeatletter\protected\def\CTANhref{\@ifstar\CTANhrefstar\CTANhrefnost}\makeatother @@ -128,10 +128,10 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \documentclass[a4paper,oneside]{ltxdoc} \AtBeginDocument{ \DeleteShortVerb{\|} - \csname @ifpackagelater\endcsname{interfaces}{2011/01/17}{} + \csname @ifpackagelater\endcsname{interfaces}{2011/01/19}{} {\PackageError{tabu-pdf-documentation} {interfaces must be later\MessageBreak - than 2011/01/17 to compile this\MessageBreak + than 2011/01/19 to compile this\MessageBreak documentation. Please update your packages}\@ehd}} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} @@ -145,7 +145,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \usepackage{tabularx}\tracingtabularx \usepackage{enumitem-zref} \usepackage[verbose]{linegoal}[2010/12/07] -\usepackage{interfaces}[2011/01/17] +\usepackage{interfaces}[2011/01/19] \usetikz{basic,chains,positioning} \usepackage{embedfile} \RequirePackage{amsopn,amsmath}% \DeclareMathOperator @@ -178,7 +178,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> %</driver> % \fi % -% \CheckSum{5117} +% \CheckSum{5239} % % \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 @@ -303,7 +303,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \renewrobustcmd\declcs[2][]{^^A % \if@nobreak \par\nobreak % \else \par\addvspace\parskip -% \needspace{.08\textheight}\fi +% \Needspace{.08\textheight}\fi % \noindent\changefont{size+=2.5pt,spread=1,fam=\ttdefault}^^A % \newcommand*\csanchor[2][]{\raisedhyperdef[14pt]{declcs}{##2}{\cs[{##1}]{##2}}}^^A % \hspace{-\leftmargini}^^A @@ -377,6 +377,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % head/left=\moveleft1cm\vbox to\z@{\vss\setbox0=\null\ht0=\z@\wd0=\paperwidth\dp0=\headheight\rlap{\colorbox{GhostWhite}{\box0}}}\vskip-\headheight t\,a\,b\,u\,\ \ i\,m\,p\,l\,e\,m\,e\,n\,t\,a\,t\,i\,o\,n, % }% % \clearpage +% \tocsetup{depth-=1} % \sectionformat\section{bookmark/color=black}\sectionformat\subsection{bookmark/color=black} % \bookmarksetup{bold*,openlevel=3} \hfuzz=3mm % \section(Implementation)[\mdseries\scshape\pmb{Implementation}]{Implementation} \label{sec:implementation}} @@ -387,7 +388,9 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \global\everypar\expandafter{\@tempa}^^A % \else\hbox to\z@{\hss#1}\fi % \setbox\z@\box\voidb@x} -% \pretocmd\macro{\needspace{2\baselineskip}\MacrocodeTopsep=\z@skip\MacroTopsep\z@skip\let\llap\macro@llap\parsep=\z@\topsep=\z@\itemsep=\z@\partopsep\z@}{}{} +% \pretocmd\macro{\if@nobreak\else\Needspace{2\baselineskip}\fi +% \MacrocodeTopsep\z@skip \MacroTopsep\z@skip \parsep\z@ \topsep\z@ \itemsep\z@ \partopsep\z@ +% \let\llap\macro@llap}{}{} % \apptocmd\endmacro{\goodbreak\vskip.3\parskip}{}{} % % \colorlet{reflink}{DarkSlateBlue} @@ -466,21 +469,22 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % % \makeatletter \enlargethispage\baselineskip % \tocsetup{ -% dot=$\scriptscriptstyle\ldotp$, -% dotsep=1mu, -% title/top=8pt plus2pt minus4pt, -% title/bottom=6pt, -% title=Contents\quad\leaders\vrule height3.1pt depth-3pt\hfill\null, -% bookmark={text=Contents,bold}, -% after=\leavevmode\hrule height3.1pt depth-3pt, -% twocolumns=false, -% section/skip=4pt plus2pt minus2pt, -% section/leaders=\leaders\hbox{$\m@th\mkern1mu\hbox{$\mathbf\ldotp$}\mkern1mu$}\hfill, -% section/dotsep, -% subsection/skip=0pt plus2pt minus 2pt, -% subsubsection/font=\slshape, -% subsubsection/pagenumbers=off, -% subsubsection/skip-=1pt,subsubsection/numwidth-=4pt, +% depth=3, +% dot=$\scriptscriptstyle\ldotp$, +% dotsep=1mu, +% title/top=8pt plus2pt minus4pt, +% title/bottom=6pt, +% title=Contents\quad\leaders\vrule height3.1pt depth-3pt\hfill\null, +% bookmark={text=Contents,bold}, +% after=\leavevmode\hrule height3.1pt depth-3pt, +% twocolumns=false, +% section/skip=4pt plus2pt minus2pt, +% section/leaders=\leaders\hbox{$\m@th\mkern1mu\hbox{$\mathbf\ldotp$}\mkern1mu$}\hfill, +% section/dotsep, +% subsection/skip=0pt plus2pt minus 2pt, +% subsubsection/font=\slshape, +% subsubsection/pagenumbers=off, +% subsubsection/skip-=1pt,subsubsection/numwidth-=4pt, % }\makeatother % % {% @@ -498,6 +502,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \phantomsection \label{Summary} % \addcontentsline{toc}{section}{Summary of the features provided by \textt{\pkgcolor t\,a\,b\,u}} % \def\arraystretch{1}\enlargethispage{2\baselineskip}\vspace*{-9mm} +% \tabcolsep=3pt % \begin{tabu}{>{\ttfamily\bfseries}X[-1]X} \toprule % \rowfont{\larger\bfseries\lsstyle} % \multicolumn2c{Summary of the features provided by \,{\sffamily\pkgcolor t\,a\,b\,u}} \\ \tabucline[dash]- @@ -545,6 +550,9 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \end{itempunct} % In this case, \textt{tabu} behaves as if it was said:\, \textt{\M*{tabu} spread 0pt}. % \\ \tabucline[dash]- +% \csref{everyrow}\M*{code} & Allows to add horizontal lines automatically for every row.\par +% The settings can be changed inside the \textt{tabu} +% \\ \tabucline[dash]- % \csref{rowfont}\M*[align]\M*{font spec} & % Modify the font and optionally the alignment of each cell in one row. % \\ \tabucline[dash]- @@ -847,7 +855,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % This is a tabu with negativ width coefficients for \textt X columns % \\ \tabucline[3pt ForestGreen]- % \end{tabu} -% +% % \tabulinesep=2pt % \begin{tabu}{\usetabu{FirstNegativTest}}\tabucline[3pt ForestGreen]- % $\begin{tabu}({X[-1$]X[-1$c]}) @@ -865,7 +873,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \begin{declcs}{tabuphantomline} % \end{declcs} % -% The process of \cs{multicolumn} implies the \TeX{} primitive \cs{omit} which discard the tabular preamble +% The process of \cs{multicolumn} implies the \TeX{} primitive \cs{omit} which discards the tabular preamble % for the spanned columns. Discarding the preamble means discarding the information about the widths of the % columns. This explains why the following example does not work properly: % @@ -1018,14 +1026,14 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \AtBeginShipoutNext{\AtBeginShipoutUpperLeft{\tikz[remember picture,overlay]{ % \node at (tabucline*) [xshift=-2cm,yshift=0cm,font=\ttfamily\smaller,text width=3cm] % { \dbend \\[1.5ex] -% Starting from +% Starting from % \hyperref[2.0]{version 2.0} use -% preferably the vertical -% spacing adjustment -% parameters provided by -% \csref{tabulinesep} and +% preferably the vertical +% spacing adjustment +% parameters provided by +% \csref{tabulinesep} and % \csref{extrarowsep}. };}}} -% +% % \begin{tabu}{*3{X[mc]}} % \extrarowheight=8pt % \begin{tabu}[c]{|[1pt]X|X|[1pt]} \tabucline- \tikzlabel{tabucline*} @@ -1160,7 +1168,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \end{tabu} % % \bigskip -% {\raggedleft\footnotesize\lk This was an example of \cs{savetabu}...\cs{usetabu} to keep the alignment.\par} +% {\raggedleft\footnotesize\lk This was an example of \csref{savetabu}...\csref{usetabu} to keep the alignment.\par} % % % \subsection{Verbatim inside \textt{tabu} with \textt X columns} @@ -1307,7 +1315,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % scans blank spaces and because \cs{numprint} does not allow blank spaces in its mandatory argument, % quite strangely... % -% +% % \subsection{Paragraph indentation} % \label{Paragraph indentation.subsec} % @@ -1334,7 +1342,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % This is \textt{tabularx} with target: \cs{linewidth}, preceded by \cs{noindent} \\ \hline % \end{tabularx}} % -% +% % \subsection{\texorpdf\xpackage{delarray} shortcuts} % \label{delarray shortcuts tabularx.subsec} % @@ -1346,12 +1354,12 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \extrarowsep=8pt % % \AtBeginShipoutNext{\AtBeginShipoutUpperLeft{\tikz[remember picture,overlay] -% \node at (tabularx overfull) [xshift=-3cm,yshift=-1.5cm,rotate=40,font=\ttfamily\smaller] -% {\begin{tabu}{c} -% with overfull hboxes\\ +% \node at (tabularx overfull) [xshift=-3cm,yshift=-1.5cm,align=center,text width=5cm,rotate=40,font=\ttfamily\smaller] +% {{with overfull hboxes\\ % (17.5pt and 17.8pt two wide)\\ % for \xpackage{tabularx} -% \end{tabu}};}} +% }}; }} +% % \renewcommand\text[1]{This is % {\ttfamily \ifcurrentenvir{tabu}{\pkgcolor\lsstyle}{}\currentenvirname} % with \xpackage{delarray} shortcuts for #1 around.} @@ -1375,6 +1383,33 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % % } % +% \section{Automatic horizontal lines: \cs{everyrow}} +% +% \begin{declcs}{everyrow} +% \end{declcs} +% +% \cs{everyrow} can be used to insert horizontal lines automatically: +% +% { +% \begin{Verb*} +% \begin{tabu}.5\linewidth{cX[2c]X} \tabucline[1pt]- ($db(\everyrow)){\tabucline[on 2pt]-} +% This is &a small example &of a \textt{tabu} \\ +% which &automatically &inserts \\ +% a horizontal &line after &each of its row ($db(\everyrow)){} \\ \tabucline[1pt]- +% \end{tabu} +% \end{Verb*} +% +% \centering +% \tabulinesep=3pt +% \begin{tabu}to .5\linewidth{cX[2c]X} \tabucline[1pt]- \everyrow{\tabucline[on 2pt]-} +% This is & a small example & of a \textt{tabu} \\ +% which & automatically & inserts \\ +% a horizontal & line after & each of its row \everyrow{} \\ \tabucline[1pt]- +% \end{tabu}\par} +% +% \cs{everyrow} can be used in \textt{longtabu} as well. +% +% % % % \section(row font and alignment){Modifying the font and the alignment in one row: \cs{rowfont}} @@ -1417,7 +1452,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % for &\textt{tabu} and \textt{longtabu} \\\tabucline- % \end{tabu} % -% \ClearPage* +% \ClearPage % \section(Vertical spacing of lines){Controlling vertical spacing of lines: \cs{extrarowsep} \,and\, \cs{tabulinesep}} % \label{vertical spacing.sec} % @@ -1426,7 +1461,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \label{extrarowsep.subsec} % % \begin{declcs}{extrarowheight}$=$\meta{dimen} \\ -% \csanchor{extrarowdepth}$=$\meta{dimen} +% \csanchor{extrarowdepth}$=$\meta{dimen} % \end{declcs} % % \cs{extrarowheight} is a dimension defined in \xfile{array.sty} whose purpose is to add -- inconditionally -- @@ -1443,7 +1478,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % The macro can be prefixed by \cs{global}\footnote{However \cs{extrarowsep} is not a dimension ! % You can't test, for example, \cs{ifdim}\cs{extrarowsep}$>0pt$ ! Test \cs{extrarowheight} and \cs{extrarowdepth} instead, if needed.}. % -% Examples (with \csref{tabustrutrule}$=2pt$ to see the struts):\enlargethispage\baselineskip +% Examples \textcolor{gray}{(with \cs{tabustrutrule}$=2pt$ to see the struts)}:\enlargethispage\baselineskip % % \tabulinestyle{test=1pt blue,testdash=.7pt on1.2pt off 2pt blue} % @@ -1471,17 +1506,17 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % }} % % \tikz{ -% \papergraduate (0,0) - (158mm,46mm); +% \papergraduate [xcolor=ForestGreen,ycolor=Maroon,opacity=.3] (0,0) (158mm,46mm); % \node at (5mm,5mm) [anchor=south west,inner sep=0pt] {\test{3mm}}; % } % ^^A\pagebreak % % \tikz{ -% \papergraduate (0,0) - (158mm,40mm); +% \papergraduate[xcolor=ForestGreen,ycolor=Maroon,opacity=.3] (0,0) (158mm,40mm); % \node at (5mm,5mm) [anchor=south west,inner sep=0pt] {\test{0mm}}; % } % } -% +% % % \subsection{\cs{abovetabulinesep}\, \cs{belowtabulinesep}\, and\, \cs{tabulinesep}} % \label{tabulinesep.subsec} @@ -1493,7 +1528,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \cs{abovetabulinesep} is the \emph{minimal} vertical space allowed between the cell content % and the cell top border. Setting this dimension to a positive value will insert -- conditionally, % depending on the cell content -- a vertical space above the cell content. -% +% % \cs{belowtabulinesep} is conversely the minimal vertical space allowed to the bottom border of the cell. % When \cs{belowtabulinesep}$>0pt$ a vertical space is inserted -- conditionnally, depending on the cell % content -- below the cell content. @@ -1509,12 +1544,12 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % This parameter can be used in text and math modes to give more vertical space between lines, % especially when using math formulae. % -% Examples (with \csref{tabustrutrule}$=2pt$ to see the struts): -% +% Examples \textcolor{gray}{(with \cs{tabustrutrule}$=2pt$ to see the struts)}: +% % %\begin{tikzpicture} % -% \papergraduate (0,0) - (158mm,32mm); +% \papergraduate (0,0) (158mm,32mm); % % \node at (5mm,5mm) [anchor=south west,inner sep=0pt] % {{\tabulinesep=4pt\tabustrutrule=0pt\extrarowsep0pt @@ -1540,7 +1575,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % % \begin{tikzpicture} % -% \papergraduate (0,0) - (158mm,29mm); +% \papergraduate (0,0) (158mm,29mm); % % \node at (5mm,5mm) [anchor=south west,inner sep=0pt] % {{\tabulinesep=4pt\tabustrutrule=0pt\extrarowsep0pt @@ -1564,11 +1599,11 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % % % -% % -% Presently (version 2.0), non zero value for \cs{tabulinesep} does not work properly with \cs{firsthline} and \cs{lasthline}, +% +% Presently (version 2.1), non zero value for \cs{tabulinesep} does not work properly with \cs{firsthline} and \cs{lasthline}, % but you may use \cs{hline}, \csref{tabucline} and \Xpackage{booktabs} \cs{toprule}, \cs{midrule} and \cs{bottomrule}. -% +% % % % @@ -1714,7 +1749,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \subsection{Paragraph indentation} % % See \nameref{Paragraph indentation.subsec} -% +% % \subsection{Custom environments} % \label{Custom environments} % @@ -1734,7 +1769,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \textt{tabu} environment, even when \textt X columns are used, may appear % in the definition of your custom tabular environment. % & -% You can also use the commands \cs{savetabu} and \cs{usetabu} for this purpose. +% You can also use the commands \csref{savetabu}\, \csref{preamble}\, (or\, \csref{usetabu}) for this purpose. % \end{footabu} % % @@ -1974,8 +2009,9 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % % If for some reason you prefer the original macros of \xfile{array.sty}, then you can load \thispackage with % the ``\textt{light}'' option. -% As a consequence: \cs{rowfont} and \cs{tabucline} will not be available, and vertical lines \texttt\textbar\ -% will not have an optional argument for their widths and color. However, \textt{tabu X} columns will work normally. +% As a consequence: \cs{rowfont},\, \cs{tabucline}\, and\, \cs{everyrow} will not be available, +% and vertical lines \texttt\textbar\ will not have an optional argument for their widths and color. +% However, \textt{tabu X} columns will work normally. % % ^^A\medskip % ^^A As the author of \thispackage, I often use the \textt{light} option when implementing \textt{tabu}, for the @@ -2042,7 +2078,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \begin{macrocode} %<*package> \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{tabu}[2011/01/25 v2.0 - flexible LaTeX tabulars (FC)] +\ProvidesPackage{tabu}[2011/01/19 v2.1 - flexible LaTeX tabulars (FC)] \RequirePackage{array}[2008/09/09] \RequirePackage{varwidth}[2009/03/30] % \end{macrocode} @@ -2296,8 +2332,11 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \begin{macrocode} \newif \iftabu@measuring \newif \iftabu@spread -\newif \iftabu@firstcline \newif \iftabu@negcoef +\newif \iftabu@firstcline +\newif \iftabu@everyrow +\def\tabu@everyrowtrue{\global\let\iftabu@everyrow \iftrue} +\def\tabu@everyrowfalse{\global\let\iftabu@everyrow \iffalse} % \end{macrocode} % \end{macro} % \end{macro} @@ -2326,13 +2365,23 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % % A macro that gobbles an optional argument. % +% \begin{macro}{\tabu@ifenvir} +% +% Check if the current environment is \textt{tabu} or \textt{longtabu} (for \cs{multicolumn}). +% % \begin{macrocode} \def\tabu@gobblespace#1 {#1} \def\tabu@gobbleopt#1{\@ifnextchar [{\tabu@gobble@pt{#1}}{#1}}%] \def\tabu@gobble@pt#1[#2]{#1} +\def\tabu@ifenvir {% + \csname @\expandafter\ifx\csname\@currenvir\endcsname\tabu + first\else\expandafter\ifx\csname\@currenvir\endcsname\longtabu + first\else second\fi\fi oftwo\endcsname +}% \tabu@ifenvir % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\tabu@save@decl} % @@ -2563,23 +2612,19 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \begin{macro}{\tabu@rewrite@multicolumn} % % A special rewrite to allow \texttbf\textbar\M*[...] in \cs{multicolumn} preamble inside \textt{tabu} environment. -% +% % \begin{macrocode} \tabu@newcolumntype \tabu@rewrite@multicolumn{% \aftergroup\endgroup % after \@mkpream group (restores \multispan) - \tabu@lines + \tabu@lines \NC@list\expandafter{\the\expandafter\NC@list \tabu@NC@list}% \ifcat$\d@llarend\else \let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode \NC@find -}% \tabu@rewrite@multicolumn -\def\tabu@multicolumn{% - \expandafter\ifx\csname\@currenvir\endcsname\tabu - \expandafter\tabu@multic@lumn - \else \expandafter\tabu@multicolumnORI - \fi -}% \tabu@multicolumn +}% \tabu@rewrite@multicolumn +\def\tabu@multicolumn{\tabu@ifenvir \tabu@multic@lumn \tabu@multicolumnORI} \def\tabu@multic@lumn#1#2{\multispan{#1}\begingroup - \NC@list{\NC@do \tabu@rewrite@multicolumn}\let\multispan \@gobble + \NC@list{\NC@do \tabu@rewrite@multicolumn}% + \expandafter\@gobbletwo % gobbles \multispan{#1} \tabu@multicolumnORI{#1}{\tabu@rewrite@multicolumn #2}% }% \tabu@multic@lumn % \end{macrocode} @@ -2637,6 +2682,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \ifmmode\PackageError{tabu}{longtabu not allowed in math mode}\fi \def\tabu@{\longtable}\def\endlongtabu{\endlongtable}% \let\tabu@arrayleft@measure \tabu@long@arrayleft@measure + \let\LT@startpbox \tabu@LT@startpbox % \everypar{ array strut } instead of { array strut } \tabu@setup \tabu@settarget }% \longtabu \def\tabu@nolongtabu{\PackageError{tabu} @@ -2654,21 +2700,19 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \tabu@adl@fix \let\endarray \tabu@endarray % <fix> colortbl & arydshln (delarray) \let\tabu@global@X \@empty \ifx \verbatim\tabu@sanitizetext % <nested tabu> - \tabu@setup@saveglobal \advance\tabu@nested \@ne \def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth - \else \tabu@timerstart - \let\tabu@multicolumnORI \multicolumn - \let\multicolumn \tabu@multicolumn + \else + \tabu@timerstart \global\tabu@footnotes{}\tabu@nested \z@ + \let\tabu@multicolumnORI \multicolumn \let\multicolumn \tabu@multicolumn \def\tabu@aligndefault{c}\edef\tabu@hfuzz {\the\hfuzz}% - \global\tabu@footnotes{}\aftergroup\the\aftergroup\tabu@footnotes \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 \ifcase 0\ifdim\abovetabulinesep>\z@ 1\else\ifdim\belowtabulinesep>\z@ 1\fi\fi @@ -2676,6 +2720,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \else \def\tabu@celllalign{\tabu@verticalmeasure}% \def\tabu@cellralign{\tabu@verticalspacing}% \fi + \tabu@setup@saveglobal \let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext \let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering \let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft @@ -2688,12 +2733,19 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \tabu@spreadfalse \tabu@measuringfalse \tabu@negcoeffalse \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}% }% \tabu@setup -\def\tabu@setup@saveglobal{% +\def\tabu@setup@saveglobal{{% + \toks@\expandafter{\tabu@everyrow@hook}% \expandafter\xdef\csname tabu@global@\the\tabu@nested\endcsname{% - \global\tabu@X@cols \the\tabu@X@cols\relax - \global\tabu@naturalX \the\tabu@naturalX\relax - \gdef\noexpand\tabu@naturalX@min {\tabu@naturalX@min}% - \gdef\noexpand\tabu@naturalX@max {\tabu@naturalX@max}}% + \gdef\noexpand\tabu@everyrow@hook {\the\toks@}% + \noexpand\tabu@everyrowtrue + \ifcase \tabu@nested + \noexpand\the \tabu@footnotes + \else + \global\tabu@X@cols \the\tabu@X@cols\relax + \global\tabu@naturalX \the\tabu@naturalX\relax + \gdef\noexpand\tabu@naturalX@min {\tabu@naturalX@min}% + \gdef\noexpand\tabu@naturalX@max {\tabu@naturalX@max}% + \fi}}% \expandafter\aftergroup\csname tabu@global@\the\tabu@nested\endcsname }% \tabu@setup@saveglobal % \end{macrocode} @@ -3261,7 +3313,8 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \hbadness \@M \let\hbadness \@tempcnta \hfuzz \maxdimen \let\hfuzz \@tempdima \let\tabu@rewrite@X \tabu@rewrite@Xnested - \let\savetabu \@gobble \let\tabudefaulttarget \linewidth + \let\savetabu \@gobble \let\everyrow \@gobble + \let\tabudefaulttarget \linewidth \let\write \tabu@nowrite \let\GenericError \tabu@GenericError \long\def\@xfootnote[##1]##2{}\let\@footnotetext \@gobble \ifx\@arrayright\relax \let\@arrayright \@empty\fi @@ -3362,7 +3415,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \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 + \ifx \tabu@stack\@empty \toks@\expandafter{\the\toks@#1}\def\tabu@endenvir{\end{#2}}% \expandafter \tabu@TRIAL \else @@ -3694,21 +3747,26 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % % \begin{macrocode} \def\tabu@setup@everycr{% - \tabu@firstclinetrue + \tabu@firstclinetrue \tabu@everyrowtrue \let\tabu@first@cline \z@ \def\tabu@restoreeverycr {\let\everycr \tabu@everycr}% \def\everycr{\afterassignment\tabu@restoreeverycr \@temptokena}% <for ialign> - \tabu@everycr\expandafter{\the\tabu@everycr - \noalign{% - \ifcase\tabu@first@cline - \global\let\tabu@first@cline \tw@ - \or\global\let\tabu@first@cline \tw@ - \or\global\tabu@firstclinefalse - \global\let\tabu@first@cline \m@ne - \fi}% - \tabu@rowfontreset - }% + \tabu@everycr\expandafter{\the\tabu@everycr \tabu@everyrow}% }% \tabu@setup@everycr +\def\tabu@everyrow{% + \noalign{% + \ifcase\tabu@first@cline + \global\let\tabu@first@cline \tw@ + \or\global\let\tabu@first@cline \tw@ + \or\global\tabu@firstclinefalse + \global\let\tabu@first@cline \m@ne + \fi}% + \tabu@rowfontreset + \iftabu@everyrow + \noalign{\tabu@everyrowfalse}\expandafter\tabu@everyrow@hook + \fi +}% \tabu@everyrow +\let\tabu@everyrow@hook \@empty % \end{macrocode} % \end{macro} % @@ -3831,9 +3889,9 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % \begin{macrocode} \def\tabu@linedash{4pt}% <default value> \def\tabu@dashgap{4pt}% <default value> -\def\tabucline{\noalign{\ifnum0=`}\fi \@ifstar - {\@tempswatrue\tabu@cline} - {\@tempswafalse\tabu@cline}}% +\def\tabucline{\crcr\noalign{\ifnum0=`}\fi \@ifstar + {\@tempswatrue \tabu@cline} + {\@tempswafalse \tabu@cline}}% \newcommand*\tabu@cline[2][]{\toks@{}% \tabu@startstop{#2}\tabu@getlinespec{#1}\@multicnt\@ne \ifnum\tabu@start>\tabu@stop @@ -4138,7 +4196,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> }% \tabu@printdecimal % \end{macrocode} % \end{macro} -% +% % \sectionformat\subsection{bookmark={color*=DarkRed}} % \subsection{\cs{extrarowsep} and \cs{tabulinesep}} % @@ -4401,15 +4459,22 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \global\let\tabu@@cellright \tabu@cellright \global\let\tabu@@celllalign \tabu@celllalign \global\let\tabu@@cellralign \tabu@cellralign - \gdef\tabu@cellfont{\let\color \tabu@colorleavevmode#2\let\color \tabu@colorORI}% + \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@}% \ifnum0=`{\fi}% end of noalign group }% \rowfont -\def\tabu@colorleavevmode{\leavevmode\tabu@colorORI} -\AtBeginDocument{\let\tabu@colorORI \color} +\def\tabu@ifcolorleavevmode#1{\let\color \tabu@leavevmodecolor #1\let\color\tabu@color}% +\AtBeginDocument{% + \ifdefined\color + \let\tabu@color \color + {\toks@\expandafter\expandafter\expandafter{\csname color \endcsname} + \xdef\tabu@leavevmodecolor{\leavevmode\the\toks@}} + \else \let\tabu@ifcolorleavevmode \@firstofone + \fi +}% % \end{macrocode} % \end{macro} % @@ -4425,17 +4490,28 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \def\tabu@rowfont@reset{% \noalign{% \global\let\tabu@rowfontreset \@empty - \global\let\tabu@cellleft \tabu@@cellleft - \global\let\tabu@cellright \tabu@@cellright - \global\let\tabu@cellfont \@empty - \global\let\tabu@celllalign \tabu@@celllalign - \global\let\tabu@cellralign \tabu@@cellralign + \global\let\tabu@cellleft \tabu@@cellleft + \global\let\tabu@cellright \tabu@@cellright + \global\let\tabu@cellfont \@empty + \global\let\tabu@celllalign \tabu@@celllalign + \global\let\tabu@cellralign \tabu@@cellralign }% }% \tabu@rowfont@reset \let\tabu@rowfontreset \@empty % \end{macrocode} % \end{macro} % +% +% \begin{macro}{\everyrow} +% +% \begin{macrocode} +\def\everyrow #1{% + \ifdim\baselineskip=\z@\noalign\fi + {\gdef\tabu@everyrow@hook{#1}}% +}% \everyrow +% \end{macrocode} +% \end{macro} +% % \subsubsection(Tokens preparation){Preparing stuff to be able to use \cs{rowfont}} % % \begin{macro}{\tabu@prepnext@tok} @@ -4463,7 +4539,7 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % If the column is special (\ie \texttbf @ or \texttbf !) \cs{@tempcnta} is not updated. % % Thus, when a new token is ``prepared'' by \cs{prepnext@tok}: -% \begin{description}[leftmargin=1cm] +% \begin{description}[leftmargin=1cm,beginpenalty=10000] % \item[either: $\mathbf{i=}$\cs{count@}$\,=$\cs{@tempcnta}]: the token to prepare (\ie \cs{toks}$<i+1>$) % is the right one of a ``normal'' column. The switch \cs{iftabu@cellright} is set to \textt{true}. \\ % The \emph{previous} token (\cs{toks}$<i>=$\cs{toks}\cs{count@}) is necessarily the left one of this ``normal'' column: @@ -4530,14 +4606,19 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> \tabu@prepnext@tokORI }% \tabu@prepnext@tok \long\def\tabu@lastnoop#1\@@#2#3{\in@\@nextchar{#2}% - \ifin@ \let\@fornoop \tabu@fornoopORI \expandafter\prepnext@tok \fi} + \ifin@ + \let\@fornoop \tabu@fornoopORI + \toks0\expandafter{\expandafter\tabu@everyrowtrue \the\toks0}% + \expandafter\prepnext@tok + \fi +}% \tabu@lastnoop \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}% + \the\toks\count@ \tabu@cellleft}% after because of $ }% \tabu@preptokenleft \def\tabu@savetok#1{\begingroup \expandafter\tabu@savet@k\csname tabu@tok@\the\tabu@nbcols #1\endcsname @@ -4789,12 +4870,13 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % Inside \textt{tabu} environment, no need to add \cs{arraybackslash} after these commands. % % \begin{macrocode} -\def\tabu@temp#1#2{{\toks@\expandafter{#2\arraybackslash}\xdef#1{\the\toks@}}} -\tabu@temp \tabu@centering \centering -\tabu@temp \tabu@raggedleft \raggedleft -\tabu@temp \tabu@raggedright \raggedright +\def\tabu@temp#1#2#3{{\toks@\expandafter{#2#3}\xdef#1{\the\toks@}}} +\tabu@temp \tabu@centering \centering \arraybackslash +\tabu@temp \tabu@raggedleft \raggedleft \arraybackslash +\tabu@temp \tabu@raggedright \raggedright \arraybackslash +\def\tabu@normalcrbackslash{\let\\\@normalcr} \def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{% - \expandafter\let\expandafter\\\expandafter\@normalcr\@trivlist}}% + \expandafter\tabu@normalcrbackslash \@trivlist}}% % \end{macrocode} % % @@ -4902,6 +4984,26 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> }% \tabu@adl@fix % \end{macrocode} % +% \subsubsection{\xpackage{longtable} \cs{@startpbox}: \cs{everypar} needed} +% +% \begin{macro}{\tabu@LT@startpbox} +% +% The leading strut should be inserted at \cs{everypar} in order for \cs{tabulinesep} to work +% (otherwise, \TeX{} is in horizontal mode and \cs{nointerlineskip} breaks). +% +% \begin{macrocode} +\def\tabu@LT@startpbox #1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \everypar{% + \vrule \@height \ht\@arstrutbox \@width \z@ + \everypar{}}% +}% \tabu@LT@startpbox +% \end{macrocode} +% \end{macro} +% % % \begin{macrocode} %</package> @@ -4943,7 +5045,17 @@ lppl copyright 2010-2011 by FC <florent.chervet@free.fr> % % \sectionformat\subsection[hang]{font=\large\bfseries\macrocodecolor} % -% \begin{Version}{2011/01/25 v2.0}\HistLabel{2.0} +% \begin{Version}{2011/01/19 v2.1}\HistLabel{2.1} +% \item \hyperref[vertical spacing.sec]{Vertical spacing} had a bug with \textt{longtabu} and paragraph columns.\\ +% Fixed. +% \item New: \csref{everyrow}. +% \item Fix a bug of \csref{rowfont} when using \Xpackage{siunitx} \textt S columns. +% \item Some code optimisation. +% \item To do (if possible): a syntax \textt{X[6mc]{S[...]}} to ``embed'' \Xpackage{siunitx} \textt S column +% inside \textt{tabu} and \textt{longtabu} \textt X columns... +% \end{Version} +% +% \begin{Version}{2011/01/18 v2.0}\HistLabel{2.0} % \item \hyperref[vertical spacing.sec]{Vertical spacing} of lines implemented ! See \csref{tabulinesep} and \csref{extrarowsep}. % \item \csref{tabulinestyle}: user defined line style can now be used inside the optional argument of the \texttbf\textbar\M*[...] % preamble token. diff --git a/Master/texmf-dist/source/latex/tabu/tabu.ins b/Master/texmf-dist/source/latex/tabu/tabu.ins index e789445f372..76ccd90c8d8 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 : 2011/01/25 v2.0 - tabu : Flexible LaTeX tabulars +%% tabu : 2011/01/19 v2.1 - tabu : Flexible LaTeX tabulars %% %% ******************************************************* %% \begin{tabu} to <dimen>{ preamble } @@ -41,7 +41,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: 2011/01/25 v2.0 - tabu: Flexible LaTeX tabulars} +\Msg{* Package: 2011/01/26 v2.1 - tabu: Flexible LaTeX tabulars} \Msg{************************************************************************} \keepsilent @@ -52,7 +52,7 @@ This is a generated file. -tabu : 2011/01/25 v2.0 - tabu : Flexible LaTeX tabulars +tabu : 2011/01/19 v2.1 - tabu : Flexible LaTeX tabulars ******************************************************* \string\begin{tabu} to <dimen>{ preamble } diff --git a/Master/texmf-dist/tex/latex/tabu/tabu.sty b/Master/texmf-dist/tex/latex/tabu/tabu.sty index dbeb1e7a15c..1c278d8312f 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 : 2011/01/25 v2.0 - tabu : Flexible LaTeX tabulars +%% tabu : 2011/01/19 v2.1 - tabu : Flexible LaTeX tabulars %% %% ******************************************************* %% \begin{tabu} to <dimen>{ preamble } @@ -39,7 +39,7 @@ %% lppl copyright 2010-2011 by FC <florent.chervet@free.fr> %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{tabu}[2011/01/25 v2.0 - flexible LaTeX tabulars (FC)] +\ProvidesPackage{tabu}[2011/01/19 v2.1 - flexible LaTeX tabulars (FC)] \RequirePackage{array}[2008/09/09] \RequirePackage{varwidth}[2009/03/30] \AtEndOfPackage{\tabu@AtEnd\let\tabu@AtEnd\@undefined} @@ -135,14 +135,22 @@ \newdimen \tabustrutrule \tabustrutrule \z@ \newif \iftabu@measuring \newif \iftabu@spread -\newif \iftabu@firstcline \newif \iftabu@negcoef +\newif \iftabu@firstcline +\newif \iftabu@everyrow +\def\tabu@everyrowtrue{\global\let\iftabu@everyrow \iftrue} +\def\tabu@everyrowfalse{\global\let\iftabu@everyrow \iffalse} \newsavebox \tabu@box \chardef \tabu@arstrutbox=\@arstrutbox \let\tabu@vcenter \vcenter \def\tabu@gobblespace#1 {#1} \def\tabu@gobbleopt#1{\@ifnextchar [{\tabu@gobble@pt{#1}}{#1}}%] \def\tabu@gobble@pt#1[#2]{#1} +\def\tabu@ifenvir {% + \csname @\expandafter\ifx\csname\@currenvir\endcsname\tabu + first\else\expandafter\ifx\csname\@currenvir\endcsname\longtabu + first\else second\fi\fi oftwo\endcsname +}% \tabu@ifenvir \def\tabu@save@decl{% \toks\count@ =\expandafter{\the\toks\expandafter\count@ \@nextchar}% }% \tabu@save@decl @@ -276,19 +284,15 @@ }% \tabu@global@Xnested \tabu@newcolumntype \tabu@rewrite@multicolumn{% \aftergroup\endgroup % after \@mkpream group (restores \multispan) - \tabu@lines + \tabu@lines \NC@list\expandafter{\the\expandafter\NC@list \tabu@NC@list}% \ifcat$\d@llarend\else \let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode \NC@find }% \tabu@rewrite@multicolumn -\def\tabu@multicolumn{% - \expandafter\ifx\csname\@currenvir\endcsname\tabu - \expandafter\tabu@multic@lumn - \else \expandafter\tabu@multicolumnORI - \fi -}% \tabu@multicolumn +\def\tabu@multicolumn{\tabu@ifenvir \tabu@multic@lumn \tabu@multicolumnORI} \def\tabu@multic@lumn#1#2{\multispan{#1}\begingroup - \NC@list{\NC@do \tabu@rewrite@multicolumn}\let\multispan \@gobble + \NC@list{\NC@do \tabu@rewrite@multicolumn}% + \expandafter\@gobbletwo % gobbles \multispan{#1} \tabu@multicolumnORI{#1}{\tabu@rewrite@multicolumn #2}% }% \tabu@multic@lumn \newif\iftabu@colortbl @@ -312,6 +316,7 @@ \ifmmode\PackageError{tabu}{longtabu not allowed in math mode}\fi \def\tabu@{\longtable}\def\endlongtabu{\endlongtable}% \let\tabu@arrayleft@measure \tabu@long@arrayleft@measure + \let\LT@startpbox \tabu@LT@startpbox % \everypar{ array strut } instead of { array strut } \tabu@setup \tabu@settarget }% \longtabu \def\tabu@nolongtabu{\PackageError{tabu} @@ -320,21 +325,19 @@ \tabu@adl@fix \let\endarray \tabu@endarray % <fix> colortbl & arydshln (delarray) \let\tabu@global@X \@empty \ifx \verbatim\tabu@sanitizetext % <nested tabu> - \tabu@setup@saveglobal \advance\tabu@nested \@ne \def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth - \else \tabu@timerstart - \let\tabu@multicolumnORI \multicolumn - \let\multicolumn \tabu@multicolumn + \else + \tabu@timerstart \global\tabu@footnotes{}\tabu@nested \z@ + \let\tabu@multicolumnORI \multicolumn \let\multicolumn \tabu@multicolumn \def\tabu@aligndefault{c}\edef\tabu@hfuzz {\the\hfuzz}% - \global\tabu@footnotes{}\aftergroup\the\aftergroup\tabu@footnotes \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 \ifcase 0\ifdim\abovetabulinesep>\z@ 1\else\ifdim\belowtabulinesep>\z@ 1\fi\fi @@ -342,6 +345,7 @@ \else \def\tabu@celllalign{\tabu@verticalmeasure}% \def\tabu@cellralign{\tabu@verticalspacing}% \fi + \tabu@setup@saveglobal \let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext \let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering \let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft @@ -354,12 +358,19 @@ \tabu@spreadfalse \tabu@measuringfalse \tabu@negcoeffalse \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}% }% \tabu@setup -\def\tabu@setup@saveglobal{% +\def\tabu@setup@saveglobal{{% + \toks@\expandafter{\tabu@everyrow@hook}% \expandafter\xdef\csname tabu@global@\the\tabu@nested\endcsname{% - \global\tabu@X@cols \the\tabu@X@cols\relax - \global\tabu@naturalX \the\tabu@naturalX\relax - \gdef\noexpand\tabu@naturalX@min {\tabu@naturalX@min}% - \gdef\noexpand\tabu@naturalX@max {\tabu@naturalX@max}}% + \gdef\noexpand\tabu@everyrow@hook {\the\toks@}% + \noexpand\tabu@everyrowtrue + \ifcase \tabu@nested + \noexpand\the \tabu@footnotes + \else + \global\tabu@X@cols \the\tabu@X@cols\relax + \global\tabu@naturalX \the\tabu@naturalX\relax + \gdef\noexpand\tabu@naturalX@min {\tabu@naturalX@min}% + \gdef\noexpand\tabu@naturalX@max {\tabu@naturalX@max}% + \fi}}% \expandafter\aftergroup\csname tabu@global@\the\tabu@nested\endcsname }% \tabu@setup@saveglobal \def\tabu@settarget{\futurelet\@let@token \tabu@sett@rget} @@ -625,7 +636,8 @@ \hbadness \@M \let\hbadness \@tempcnta \hfuzz \maxdimen \let\hfuzz \@tempdima \let\tabu@rewrite@X \tabu@rewrite@Xnested - \let\savetabu \@gobble \let\tabudefaulttarget \linewidth + \let\savetabu \@gobble \let\everyrow \@gobble + \let\tabudefaulttarget \linewidth \let\write \tabu@nowrite \let\GenericError \tabu@GenericError \long\def\@xfootnote[##1]##2{}\let\@footnotetext \@gobble \ifx\@arrayright\relax \let\@arrayright \@empty\fi @@ -683,7 +695,7 @@ \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 + \ifx \tabu@stack\@empty \toks@\expandafter{\the\toks@#1}\def\tabu@endenvir{\end{#2}}% \expandafter \tabu@TRIAL \else @@ -932,21 +944,26 @@ \def\tabu@naturalX@min{\z@} \def\tabu@naturalX@max{\z@} \def\tabu@setup@everycr{% - \tabu@firstclinetrue + \tabu@firstclinetrue \tabu@everyrowtrue \let\tabu@first@cline \z@ \def\tabu@restoreeverycr {\let\everycr \tabu@everycr}% \def\everycr{\afterassignment\tabu@restoreeverycr \@temptokena}% <for ialign> - \tabu@everycr\expandafter{\the\tabu@everycr - \noalign{% - \ifcase\tabu@first@cline - \global\let\tabu@first@cline \tw@ - \or\global\let\tabu@first@cline \tw@ - \or\global\tabu@firstclinefalse - \global\let\tabu@first@cline \m@ne - \fi}% - \tabu@rowfontreset - }% + \tabu@everycr\expandafter{\the\tabu@everycr \tabu@everyrow}% }% \tabu@setup@everycr +\def\tabu@everyrow{% + \noalign{% + \ifcase\tabu@first@cline + \global\let\tabu@first@cline \tw@ + \or\global\let\tabu@first@cline \tw@ + \or\global\tabu@firstclinefalse + \global\let\tabu@first@cline \m@ne + \fi}% + \tabu@rowfontreset + \iftabu@everyrow + \noalign{\tabu@everyrowfalse}\expandafter\tabu@everyrow@hook + \fi +}% \tabu@everyrow +\let\tabu@everyrow@hook \@empty \def\tabuphantomline{\crcr\noalign{% \global\let\@arstrutbox \voidb@x \iftabu@colortbl @@ -1014,9 +1031,9 @@ }% \tabuvline@argiii \def\tabu@linedash{4pt}% <default value> \def\tabu@dashgap{4pt}% <default value> -\def\tabucline{\noalign{\ifnum0=`}\fi \@ifstar - {\@tempswatrue\tabu@cline} - {\@tempswafalse\tabu@cline}}% +\def\tabucline{\crcr\noalign{\ifnum0=`}\fi \@ifstar + {\@tempswatrue \tabu@cline} + {\@tempswafalse \tabu@cline}}% \newcommand*\tabu@cline[2][]{\toks@{}% \tabu@startstop{#2}\tabu@getlinespec{#1}\@multicnt\@ne \ifnum\tabu@start>\tabu@stop @@ -1395,26 +1412,37 @@ \global\let\tabu@@cellright \tabu@cellright \global\let\tabu@@celllalign \tabu@celllalign \global\let\tabu@@cellralign \tabu@cellralign - \gdef\tabu@cellfont{\let\color \tabu@colorleavevmode#2\let\color \tabu@colorORI}% + \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@}% \ifnum0=`{\fi}% end of noalign group }% \rowfont -\def\tabu@colorleavevmode{\leavevmode\tabu@colorORI} -\AtBeginDocument{\let\tabu@colorORI \color} +\def\tabu@ifcolorleavevmode#1{\let\color \tabu@leavevmodecolor #1\let\color\tabu@color}% +\AtBeginDocument{% + \ifdefined\color + \let\tabu@color \color + {\toks@\expandafter\expandafter\expandafter{\csname color \endcsname} + \xdef\tabu@leavevmodecolor{\leavevmode\the\toks@}} + \else \let\tabu@ifcolorleavevmode \@firstofone + \fi +}% \def\tabu@rowfont@reset{% \noalign{% \global\let\tabu@rowfontreset \@empty - \global\let\tabu@cellleft \tabu@@cellleft - \global\let\tabu@cellright \tabu@@cellright - \global\let\tabu@cellfont \@empty - \global\let\tabu@celllalign \tabu@@celllalign - \global\let\tabu@cellralign \tabu@@cellralign + \global\let\tabu@cellleft \tabu@@cellleft + \global\let\tabu@cellright \tabu@@cellright + \global\let\tabu@cellfont \@empty + \global\let\tabu@celllalign \tabu@@celllalign + \global\let\tabu@cellralign \tabu@@cellralign }% }% \tabu@rowfont@reset \let\tabu@rowfontreset \@empty +\def\everyrow #1{% + \ifdim\baselineskip=\z@\noalign\fi + {\gdef\tabu@everyrow@hook{#1}}% +}% \everyrow \newif\iftabu@cellright \AtBeginDocument{\let\tabu@prepnext@tokORI \prepnext@tok }% original definition \def\tabu@prepnext@tok{% @@ -1456,14 +1484,19 @@ \tabu@prepnext@tokORI }% \tabu@prepnext@tok \long\def\tabu@lastnoop#1\@@#2#3{\in@\@nextchar{#2}% - \ifin@ \let\@fornoop \tabu@fornoopORI \expandafter\prepnext@tok \fi} + \ifin@ + \let\@fornoop \tabu@fornoopORI + \toks0\expandafter{\expandafter\tabu@everyrowtrue \the\toks0}% + \expandafter\prepnext@tok + \fi +}% \tabu@lastnoop \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}% + \the\toks\count@ \tabu@cellleft}% after because of $ }% \tabu@preptokenleft \def\tabu@savetok#1{\begingroup \expandafter\tabu@savet@k\csname tabu@tok@\the\tabu@nbcols #1\endcsname @@ -1627,12 +1660,13 @@ \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@ \tabu@do@color@b@x }% \tabu@end@color@b@x -\def\tabu@temp#1#2{{\toks@\expandafter{#2\arraybackslash}\xdef#1{\the\toks@}}} -\tabu@temp \tabu@centering \centering -\tabu@temp \tabu@raggedleft \raggedleft -\tabu@temp \tabu@raggedright \raggedright +\def\tabu@temp#1#2#3{{\toks@\expandafter{#2#3}\xdef#1{\the\toks@}}} +\tabu@temp \tabu@centering \centering \arraybackslash +\tabu@temp \tabu@raggedleft \raggedleft \arraybackslash +\tabu@temp \tabu@raggedright \raggedright \arraybackslash +\def\tabu@normalcrbackslash{\let\\\@normalcr} \def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{% - \expandafter\let\expandafter\\\expandafter\@normalcr\@trivlist}}% + \expandafter\tabu@normalcrbackslash \@trivlist}}% \def\tabu@fix@arrayright{% \@ifpackageloaded{arydshln} {% @@ -1691,6 +1725,15 @@ \let\adl@act@@endpbox \tabu@adl@act@endpbox % <fix> arydshln \let\@preamerror \@preamerr % <fix> arydshln }% \tabu@adl@fix +\def\tabu@LT@startpbox #1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \everypar{% + \vrule \@height \ht\@arstrutbox \@width \z@ + \everypar{}}% +}% \tabu@LT@startpbox \endinput %% %% End of file `tabu.sty'. |