summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tabulary/tabulary.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tabulary/tabulary.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tabulary/tabulary.sty91
1 files changed, 65 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/tabulary/tabulary.sty b/Master/texmf-dist/tex/latex/tabulary/tabulary.sty
index 5660cdfbbeb..4dc80f50142 100644
--- a/Master/texmf-dist/tex/latex/tabulary/tabulary.sty
+++ b/Master/texmf-dist/tex/latex/tabulary/tabulary.sty
@@ -8,14 +8,16 @@
%% DRAFT VERSION
%%
%% File `tabulary.dtx'.
-%% Copyright (C) 1995 1996 2003 2008 David Carlisle
+%% Copyright (C) 1995 1996 2003 2008 2024 David Carlisle
%% This file may be distributed under the terms of the LPPL.
-%% See 00readme.txt for details.
+%% See README.txt for details.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tabulary}
- [2014/06/11 v0.10 tabulary package (DPC)]
-\RequirePackage{array}
+ [2024/06/04 v0.11 tabulary package (DPC)]
+\DeclareRelease{v0.10}{1995/10/08}{tabulary-v010.sty}
+\DeclareCurrentRelease{}{2024-06-01}
+\RequirePackage{array}[2024/05/23]
\catcode`\Z=14
\DeclareOption{debugshow}{\catcode`\Z=9\relax}
\ProcessOptions
@@ -60,11 +62,12 @@ Z \string\tymax: \the\tymax^^J}%
\let\verb\TX@verb
\toks@{}\TY@get@body}
\let\TY@@mkpream\@mkpream
+\ExplSyntaxOn
\def\TY@mkpream{%
\def\@addamp{%
\if@firstamp \@firstampfalse \else
\global\advance\TY@count\@ne
- \edef\@preamble{\@preamble &}\fi
+ \edef\@preamble{\@preamble & \noexpand\tbl_update_cell_data:}\fi
\TY@width\xdef{0pt}}%
\def\@acol{%
\TY@subwidth\col@sep
@@ -72,13 +75,14 @@ Z \string\tymax: \the\tymax^^J}%
\let\@arrayrule\TY@arrayrule
\let\@classvi\TY@classvi
\def\@classv{\save@decl
- \expandafter\NC@ecs\@nextchar\extracolsep{}\extracolsep\@@@
+ \expandafter\NC@ecs\@nextchar\extracolsep{}\extracolsep\@@__tbl
\sbox\z@{\d@llarbegin\@nextchar\d@llarend}%
\TY@subwidth{\wd\z@}%
\@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}%
\prepnext@tok}%
\global\let\@mkpream\TY@@mkpream
\TY@@mkpream}
+\ExplSyntaxOff
\def\TY@arrayrule{%
\TY@subwidth\arrayrulewidth
\@addtopreamble \vline}
@@ -108,7 +112,10 @@ Z \string\tymax: \the\tymax^^J}%
\TY@width\xdef{\the\dimen@}%
\global\advance\TY@linewidth-#1\relax}
\def\endtabulary{%
+ \SuspendTagging {tabulary}%
\gdef\@halignto{}%
+ \def\@elt##1{\global\value{##1}\the\value{##1}\relax}%
+ \edef\TY@ckpt{\cl@@ckpt}%
\expandafter\TY@tab\the\toks@
\crcr\omit
{\xdef\TY@save@row{}%
@@ -119,6 +126,7 @@ Z \string\tymax: \the\tymax^^J}%
\repeat}\TY@save@row
\endarray\global\setbox1=\lastbox\setbox0=\vbox{\unvbox1
\unskip\global\setbox1=\lastbox}\egroup
+ \ResumeTagging {tabulary}%
\dimen@\TY@linewidth
\divide\dimen@\TY@count
\ifdim\dimen@<\tymin
@@ -172,6 +180,7 @@ Z \message{> tymin}%
\TY@checkmin
\TY@count\z@
\let\TY@box\TY@box@v
+ \TY@ckpt
{\expandafter\TY@final\the\toks@\endTY@final}%
\count@\z@
\@tempswatrue
@@ -272,7 +281,7 @@ Z \message{^^JTotal:\the\@tempdima^^J}%
\let\raggedleft\indent
\let\arraybackslash\relax
\prepnext@tok
- \ifnum\@chnum<4
+ \ifnum\@chnum<6
\global\expandafter\let\csname TY@F\the\TY@count\endcsname\z@
\fi
\ifnum\@chnum=6
@@ -280,14 +289,19 @@ Z \message{^^JTotal:\the\@tempdima^^J}%
\fi
\@addtopreamble{%
\ifcase\@chnum
- \hfil \d@llarbegin\insert@column\d@llarend \hfil \or
- \kern\z@
- \d@llarbegin \insert@column \d@llarend \hfil \or
- \hfil\kern\z@ \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 \or
- \d@llarbegin \insert@column \d@llarend \or% dubious "s" case
+ \hfil\hskip1sp%
+ \d@llarbegin\insert@column\d@llarend\do@row@strut\hfil \or
+ \hskip1sp%
+ \d@llarbegin \insert@column \d@llarend\do@row@strut\hfil \or
+ \hfil\hskip1sp%
+ \d@llarbegin \insert@column \d@llarend\do@row@strut \or
+ \setbox\ar@mcellbox\vbox
+ \@startpbox{\@nextchar}\insert@pcolumn \@endpbox
+ \ar@align@mcell
+ \do@row@strut\or
+ \vtop \@startpbox{\@nextchar}\insert@pcolumn \@endpbox \or
+ \vbox \@startpbox{\@nextchar}\insert@pcolumn \@endpbox \or
+ \d@llarbegin \insert@column \d@llarend \do@row@strut \or% dubious "s" case
\TY@box\centering\or
\TY@box\raggedright\or
\TY@box\raggedleft\or
@@ -295,19 +309,21 @@ Z \message{^^JTotal:\the\@tempdima^^J}%
\fi}\prepnext@tok}
\def\TY@box#1{%
\ifx\centering#1%
- \hfil \d@llarbegin\insert@column\d@llarend \hfil \else
+ \hfil\hskip1sp%
+ \d@llarbegin\insert@column\d@llarend\do@row@strut \hfil \else
\ifx\raggedright#1%
- \kern\z@%<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- \d@llarbegin \insert@column \d@llarend \hfil \else
+ \hskip1sp%
+ \d@llarbegin \insert@column \d@llarend\do@row@strut \hfil \else
\ifx\raggedleft#1%
- \hfil\kern\z@ \d@llarbegin \insert@column \d@llarend \else
+ \hfil\hskip1sp%
+ \kern\z@ \d@llarbegin \insert@column \d@llarend\do@row@strut \else
\ifx\relax#1%
- \d@llarbegin \insert@column \d@llarend
+ \d@llarbegin \insert@column \d@llarend\do@row@strut
\fi \fi \fi \fi}
\def\TY@box@v#1{%
\vtop \@startpbox{\csname TY@F\the\TY@count\endcsname}%
#1\arraybackslash\tyformat
- \insert@column\@endpbox}
+ \insert@pcolumn\@endpbox}
\newdimen\TY@tablewidth
\def\Gscale@div#1#2#3{%
\setlength\dimen@{#3}%
@@ -366,7 +382,7 @@ Z \message{^^JTotal:\the\@tempdima^^J}%
\let\arraybackslash\relax
\prepnext@tok
\expandafter\CT@extract\the\toks\@tempcnta\columncolor!\@nil
- \ifnum\@chnum<4
+ \ifnum\@chnum<6
\global\expandafter\let\csname TY@F\the\TY@count\endcsname\z@
\fi
\ifnum\@chnum=6
@@ -380,10 +396,13 @@ Z \message{^^JTotal:\the\@tempdima^^J}%
\kern\z@%<<<<<<<<<<<<<<<<<<<<<<<<<<<
\d@llarbegin \insert@column \d@llarend \hfill \or
\hfill\kern\z@ \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 \or
- \d@llarbegin \insert@column \d@llarend \or% dubious s case
+ \setbox\ar@mcellbox\vbox
+ \@startpbox{\@nextchar}\insert@pcolumn \@endpbox
+ \ar@align@mcell
+ \do@row@strut \or
+ \vtop \@startpbox{\@nextchar}\insert@pcolumn \@endpbox \or
+ \vbox \@startpbox{\@nextchar}\insert@pcolumn \@endpbox \or
+ \d@llarbegin \insert@pcolumn \d@llarend \or% dubious s case
\TY@box\centering\or
\TY@box\raggedright\or
\TY@box\raggedleft\or
@@ -446,6 +465,26 @@ Z \message{^^JTotal:\the\@tempdima^^J}%
\def\TX@vwarn{%
\@warning{\noexpand\verb may be unreliable inside tabularx/y}%
\global\let\TX@vwarn\@empty}
+
+\ExplSyntaxOn
+\cs_set:Npn \@tempa #1 {
+ \int_compare:nNnT \g__tbl_col_int > 0
+ {
+ \tbl_count_missing_cells:n {#1}
+ \cr
+ }
+ }
+\ifx\@tempa\tbl_crcr:n
+\cs_set:Npn \tbl_crcr:n #1 {
+ \int_compare:nNnT \g__tbl_col_int > 0
+ {
+ \tbl_count_missing_cells:n {#1}
+ }
+ \crcr
+ }
+\fi
+\let\@tempa\@undefined
+\ExplSyntaxOff
\endinput
%%
%% End of file `tabulary.sty'.