summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-06-10 17:41:37 +0000
committerKarl Berry <karl@freefriends.org>2024-06-10 17:41:37 +0000
commit56446abf1d64d05c9dd84bd41e62ab58749c0e6a (patch)
treeeb35cf0446fb435ba3ace771a2bc213e3dc18fb3
parentae8543e2885b0e940fe2ecf998fd54be7337c5d5 (diff)
tabulary
git-svn-id: svn://tug.org/texlive/trunk@71463 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/tabulary/README.txt (renamed from Master/texmf-dist/doc/latex/tabulary/README)0
-rw-r--r--Master/texmf-dist/doc/latex/tabulary/tabulary.pdfbin256360 -> 327251 bytes
-rw-r--r--Master/texmf-dist/source/latex/tabulary/tabulary.dtx127
-rw-r--r--Master/texmf-dist/tex/latex/tabulary/tabulary-v010.sty455
-rw-r--r--Master/texmf-dist/tex/latex/tabulary/tabulary.sty91
5 files changed, 620 insertions, 53 deletions
diff --git a/Master/texmf-dist/doc/latex/tabulary/README b/Master/texmf-dist/doc/latex/tabulary/README.txt
index ed7423902f3..ed7423902f3 100644
--- a/Master/texmf-dist/doc/latex/tabulary/README
+++ b/Master/texmf-dist/doc/latex/tabulary/README.txt
diff --git a/Master/texmf-dist/doc/latex/tabulary/tabulary.pdf b/Master/texmf-dist/doc/latex/tabulary/tabulary.pdf
index c5a8ed2e616..74dedf72a57 100644
--- a/Master/texmf-dist/doc/latex/tabulary/tabulary.pdf
+++ b/Master/texmf-dist/doc/latex/tabulary/tabulary.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/tabulary/tabulary.dtx b/Master/texmf-dist/source/latex/tabulary/tabulary.dtx
index b455cf03820..21dc80b4190 100644
--- a/Master/texmf-dist/source/latex/tabulary/tabulary.dtx
+++ b/Master/texmf-dist/source/latex/tabulary/tabulary.dtx
@@ -1,9 +1,9 @@
% \iffalse
%%
%% 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.
%%
%
%<*dtx>
@@ -13,7 +13,7 @@
%<package>\ProvidesPackage{tabulary}
% \fi
% \ProvidesFile{tabulary.dtx}
- [2014/06/11 v0.10 tabulary package (DPC)]
+ [2024/06/04 v0.11 tabulary package (DPC)]
%
% \iffalse
%<*driver>
@@ -35,7 +35,6 @@
\end{document}
%</driver>
% \fi
-% \CheckSum{1346}
%
% \changes{v0.1}{1995/10/08}
% {Initial version}
@@ -51,6 +50,14 @@
% {Rename S to J and `hide' s (until it works)}
% \changes{v0.10}{2014/06/21}
% {support \cs{cellcolor} see http://tex.stackexchange.com/a/185851/1090}
+% \changes{v0.11}{2024/06/04}
+% {Update to match latest array package (rollback to v0.10 for older releases)}
+% \changes{v0.11}{2024/06/04}
+% {Restore LaTeX counters after trial typesetting gh/12}
+% \changes{v0.11}{2024/06/04}
+% {Handle p and b columns like m gh/38}
+% \changes{v0.11}{2024/06/04}
+% {use \cs{hskip}1sp to match array 2.3i from 1996}
%
% \section{User Documentation}
%
@@ -218,8 +225,15 @@
%<*package>
% \end{macrocode}
%
+% Rollback.
% \begin{macrocode}
-\RequirePackage{array}
+\DeclareRelease{v0.10}{1995/10/08}{tabulary-v010.sty}
+\DeclareCurrentRelease{}{2024-06-01}
+% \end{macrocode}
+%
+% This version needs a current array package
+% \begin{macrocode}
+\RequirePackage{array}[2024/05/23]
% \end{macrocode}
%
% \begin{macrocode}
@@ -349,11 +363,12 @@ Z \string\tymax: \the\tymax^^J}%
% \begin{macro}{\TY@mkpream}
% TY version.
% \begin{macrocode}
+\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}}%
% \end{macrocode}
%
@@ -373,7 +388,7 @@ Z \string\tymax: \the\tymax^^J}%
%
% \begin{macrocode}
\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}%
@@ -386,6 +401,7 @@ Z \string\tymax: \the\tymax^^J}%
%
% \begin{macrocode}
\TY@@mkpream}
+\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
%
@@ -478,7 +494,17 @@ Z \string\tymax: \the\tymax^^J}%
% row is hidden by an hline or something.
% \begin{macrocode}
\def\endtabulary{%
+ \SuspendTagging {tabulary}%
\gdef\@halignto{}%
+% \end{macrocode}
+%
+% Save values of counters, to reset after the trial
+% \begin{macrocode}
+ \def\@elt##1{\global\value{##1}\the\value{##1}\relax}%
+ \edef\TY@ckpt{\cl@@ckpt}%
+% \end{macrocode}
+%
+% \begin{macrocode}
\expandafter\TY@tab\the\toks@
\crcr\omit
{\xdef\TY@save@row{}%
@@ -489,6 +515,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}%
% \end{macrocode}
% Check that |\tymin| is not too large.
% \begin{macrocode}
@@ -563,6 +590,11 @@ Z \message{> tymin}%
\let\TY@box\TY@box@v
% \end{macrocode}
%
+% Restore counter values.
+% \begin{macrocode}
+ \TY@ckpt
+% \end{macrocode}
+%
% Run a second tabular, and for the star form, unbox it.
% \begin{macrocode}
{\expandafter\TY@final\the\toks@\endTY@final}%
@@ -744,7 +776,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
@@ -752,14 +784,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
@@ -777,14 +814,16 @@ Z \message{^^JTotal:\the\@tempdima^^J}%
% \begin{macrocode}
\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}
% \end{macrocode}
% \end{macro}
@@ -796,7 +835,7 @@ Z \message{^^JTotal:\the\@tempdima^^J}%
\def\TY@box@v#1{%
\vtop \@startpbox{\csname TY@F\the\TY@count\endcsname}%
#1\arraybackslash\tyformat
- \insert@column\@endpbox}
+ \insert@pcolumn\@endpbox}
% \end{macrocode}
% \end{macro}
%
@@ -896,7 +935,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
@@ -910,10 +949,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
@@ -999,9 +1041,40 @@ Z \message{^^JTotal:\the\@tempdima^^J}%
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\tblcrcrn}^^A L3 name
+% Patch to ensure |\tbl_crcr:n| ends with |\crcr|.
+% (Will be fixed in later \LaTeX\ releases.
+% \begin{macrocode}
+%<package>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\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
+% \end{macrocode}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
+% \end{macro}
+%
% \PrintIndex
% \Finale
%
diff --git a/Master/texmf-dist/tex/latex/tabulary/tabulary-v010.sty b/Master/texmf-dist/tex/latex/tabulary/tabulary-v010.sty
new file mode 100644
index 00000000000..0a092d7d67b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tabulary/tabulary-v010.sty
@@ -0,0 +1,455 @@
+%%
+%% This is an old release of `tabulary.sty' used during rollback operations.
+%% Do not use this file directly.
+%% ==============================
+%%
+%% This is file `tabulary.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% tabulary.dtx (with options: `package')
+%% DRAFT VERSION
+%%
+%% File `tabulary.dtx'.
+%% Copyright (C) 1995 1996 2003 2008 David Carlisle
+%% This file may be distributed under the terms of the LPPL.
+%% See 00readme.txt for details.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{tabulary}
+ [2014/06/11 v0.10 tabulary package (DPC)]
+\RequirePackage{array}[=v2.5]
+\catcode`\Z=14
+\DeclareOption{debugshow}{\catcode`\Z=9\relax}
+\ProcessOptions
+\def\arraybackslash{\let\\=\@arraycr}
+\def\@finalstrut#1{%
+ \unskip\ifhmode\nobreak\fi\vrule\@width\z@\@height\z@\@depth\dp#1}
+\newcount\TY@count
+\def\tabulary{%
+ \let\TY@final\tabular
+ \let\endTY@final\endtabular
+ \TY@tabular}
+\def\TY@tabular#1{%
+ \edef\TY@{\@currenvir}%
+ {\ifnum0=`}\fi
+ \@ovxx\TY@linewidth
+ \@ovyy\TY@tablewidth
+ \count@\z@
+ \@tempswatrue
+ \@whilesw\if@tempswa\fi{%
+ \advance\count@\@ne
+ \expandafter\ifx\csname TY@F\the\count@\endcsname\relax
+ \@tempswafalse
+ \else
+ \expandafter\let\csname TY@SF\the\count@\expandafter\endcsname
+ \csname TY@F\the\count@\endcsname
+ \global\expandafter\let\csname TY@F\the\count@\endcsname\relax
+ \expandafter\let\csname TY@S\the\count@\expandafter\endcsname
+ \csname TY@\the\count@\endcsname
+ \fi}%
+ \global\TY@count\@ne
+ \TY@width\xdef{0pt}%
+ \global\TY@tablewidth\z@
+ \global\TY@linewidth#1\relax
+Z\message{^^J^^JTable^^J%
+Z Target Width: \the\TY@linewidth^^J%
+Z \string\tabcolsep: \the\tabcolsep\space
+Z \string\arrayrulewidth: \the\arrayrulewidth\space
+Z \string\doublerulesep: \the\doublerulesep^^J%
+Z \string\tymin: \the\tymin\space
+Z \string\tymax: \the\tymax^^J}%
+ \let\@classz\TY@classz
+ \let\verb\TX@verb
+ \toks@{}\TY@get@body}
+\let\TY@@mkpream\@mkpream
+\def\TY@mkpream{%
+ \def\@addamp{%
+ \if@firstamp \@firstampfalse \else
+ \global\advance\TY@count\@ne
+ \edef\@preamble{\@preamble &}\fi
+ \TY@width\xdef{0pt}}%
+ \def\@acol{%
+ \TY@subwidth\col@sep
+ \@addtopreamble{\hskip\col@sep}}%
+ \let\@arrayrule\TY@arrayrule
+ \let\@classvi\TY@classvi
+ \def\@classv{\save@decl
+ \expandafter\NC@ecs\@nextchar\extracolsep{}\extracolsep\@@@
+ \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}
+\def\TY@arrayrule{%
+ \TY@subwidth\arrayrulewidth
+ \@addtopreamble \vline}
+\def\TY@classvi{\ifcase \@lastchclass
+ \@acol \or
+ \TY@subwidth\doublerulesep
+ \@addtopreamble{\hskip \doublerulesep}\or
+ \@acol \or
+ \@classvii
+ \fi}
+\def\TY@tab{%
+ \setbox\z@\hbox\bgroup
+ \let\[$\let\]$%
+ \let\equation$\let\endequation$%
+ \col@sep\tabcolsep
+ \let\d@llarbegin\begingroup\let\d@llarend\endgroup
+ \let\@mkpream\TY@mkpream
+ \def\multicolumn##1##2##3{\multispan##1\relax}%
+ \CT@start\TY@tabarray}
+\def\TY@tabarray{\@ifnextchar[{\TY@array}{\@array[t]}}
+\def\TY@array[#1]{\@array[t]}
+\def\TY@width#1{%
+ \expandafter#1\csname TY@\the\TY@count\endcsname}
+\def\TY@subwidth#1{%
+ \TY@width\dimen@
+ \advance\dimen@-#1\relax
+ \TY@width\xdef{\the\dimen@}%
+ \global\advance\TY@linewidth-#1\relax}
+\def\endtabulary{%
+ \gdef\@halignto{}%
+ \expandafter\TY@tab\the\toks@
+ \crcr\omit
+ {\xdef\TY@save@row{}%
+ \loop
+ \advance\TY@count\m@ne
+ \ifnum\TY@count>\z@
+ \xdef\TY@save@row{\TY@save@row&\omit}%
+ \repeat}\TY@save@row
+ \endarray\global\setbox1=\lastbox\setbox0=\vbox{\unvbox1
+ \unskip\global\setbox1=\lastbox}\egroup
+ \dimen@\TY@linewidth
+ \divide\dimen@\TY@count
+ \ifdim\dimen@<\tymin
+ \TY@warn{tymin too large (\the\tymin), resetting to \the\dimen@}%
+ \tymin\dimen@
+ \fi
+ \setbox\tw@=\hbox{\unhbox\@ne
+ \loop
+\@tempdima=\lastskip
+\ifdim\@tempdima>\z@
+Z \message{ecs=\the\@tempdima^^J}%
+ \global\advance\TY@linewidth-\@tempdima
+\fi
+ \unskip
+ \setbox\tw@=\lastbox
+ \ifhbox\tw@
+Z \message{Col \the\TY@count: Initial=\the\wd\tw@\space}%
+ \ifdim\wd\tw@>\tymax
+ \wd\tw@\tymax
+Z \message{> max\space}%
+Z \else
+Z \message{ \@spaces\space}%
+ \fi
+ \TY@width\dimen@
+Z \message{\the\dimen@\space}%
+ \advance\dimen@\wd\tw@
+Z \message{Final=\the\dimen@\space}%
+ \TY@width\xdef{\the\dimen@}%
+ \ifdim\dimen@<\tymin
+Z \message{< tymin}%
+ \global\advance\TY@linewidth-\dimen@
+ \expandafter\xdef\csname TY@F\the\TY@count\endcsname
+ {\the\dimen@}%
+ \else
+ \expandafter\ifx\csname TY@F\the\TY@count\endcsname\z@
+Z \message{***}%
+ \global\advance\TY@linewidth-\dimen@
+ \expandafter\xdef\csname TY@F\the\TY@count\endcsname
+ {\the\dimen@}%
+ \else
+Z \message{> tymin}%
+ \global\advance\TY@tablewidth\dimen@
+ \global\expandafter\let\csname TY@F\the\TY@count\endcsname
+ \maxdimen
+ \fi\fi
+ \advance\TY@count\m@ne
+ \repeat}%
+ \TY@checkmin
+ \TY@checkmin
+ \TY@checkmin
+ \TY@checkmin
+ \TY@count\z@
+ \let\TY@box\TY@box@v
+ {\expandafter\TY@final\the\toks@\endTY@final}%
+ \count@\z@
+ \@tempswatrue
+ \@whilesw\if@tempswa\fi{%
+ \advance\count@\@ne
+ \expandafter\ifx\csname TY@SF\the\count@\endcsname\relax
+ \@tempswafalse
+ \else
+ \global\expandafter\let\csname TY@F\the\count@\expandafter\endcsname
+ \csname TY@SF\the\count@\endcsname
+ \global\expandafter\let\csname TY@\the\count@\expandafter\endcsname
+ \csname TY@S\the\count@\endcsname
+ \fi}%
+ \TY@linewidth\@ovxx
+ \TY@tablewidth\@ovyy
+ \ifnum0=`{\fi}}
+\def\TY@checkmin{%
+ \let\TY@checkmin\relax
+\ifdim\TY@tablewidth>\z@
+ \Gscale@div\TY@ratio\TY@linewidth\TY@tablewidth
+ \ifdim\TY@tablewidth <\TY@linewidth
+ \def\TY@ratio{1}%
+ \fi
+\else
+ \TY@warn{No suitable columns!}%
+ \def\TY@ratio{1}%
+\fi
+\count@\z@
+Z \message{^^JLine Width: \the\TY@linewidth,
+Z Natural Width: \the\TY@tablewidth,
+Z Ratio: \TY@ratio^^J}%
+\@tempdima\z@
+\loop
+\ifnum\count@<\TY@count
+\advance\count@\@ne
+ \ifdim\csname TY@F\the\count@\endcsname>\tymin
+ \dimen@\csname TY@\the\count@\endcsname
+ \dimen@\TY@ratio\dimen@
+ \ifdim\dimen@<\tymin
+Z \message{Column \the\count@\space ->}%
+ \global\expandafter\let\csname TY@F\the\count@\endcsname\tymin
+ \global\advance\TY@linewidth-\tymin
+ \global\advance\TY@tablewidth-\csname TY@\the\count@\endcsname
+ \let\TY@checkmin\TY@@checkmin
+ \else
+ \expandafter\xdef\csname TY@F\the\count@\endcsname{\the\dimen@}%
+ \advance\@tempdima\csname TY@F\the\count@\endcsname
+ \fi
+ \fi
+Z \dimen@\csname TY@F\the\count@\endcsname\message{\the\dimen@, }%
+\repeat
+Z \message{^^JTotal:\the\@tempdima^^J}%
+}
+\let\TY@@checkmin\TY@checkmin
+\newdimen\TY@linewidth
+\def\tyformat{\everypar{{\nobreak\hskip\z@skip}}}
+\newdimen\tymin
+\tymin=10pt
+\newdimen\tymax
+\tymax=2\textwidth
+\def\@testpach{\@chclass
+ \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
+ \ifnum \@lastchclass=7 5 \else
+ \ifnum \@lastchclass=8 \tw@ \else
+ \ifnum \@lastchclass=9 \thr@@
+ \else \z@
+ \ifnum \@lastchclass = 10 \else
+ \edef\@nextchar{\expandafter\string\@nextchar}%
+ \@chnum
+ \if \@nextchar c\z@ \else
+ \if \@nextchar l\@ne \else
+ \if \@nextchar r\tw@ \else
+ \if \@nextchar C7 \else
+ \if \@nextchar L8 \else
+ \if \@nextchar R9 \else
+ \if \@nextchar J10 \else
+ \z@ \@chclass
+ \if\@nextchar |\@ne \else
+ \if \@nextchar !6 \else
+ \if \@nextchar @7 \else
+ \if \@nextchar <8 \else
+ \if \@nextchar >9 \else
+ 10
+ \@chnum
+ \if \@nextchar m\thr@@\else
+ \if \@nextchar p4 \else
+ \if \@nextchar b5 \else
+ \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi\fi \fi \fi\fi \fi
+ \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi}
+\def\TY@classz{%
+ \@classx
+ \@tempcnta\count@
+ \ifx\TY@box\TY@box@v
+ \global\advance\TY@count\@ne
+ \fi
+ \let\centering c%
+ \let\raggedright\noindent
+ \let\raggedleft\indent
+ \let\arraybackslash\relax
+ \prepnext@tok
+ \ifnum\@chnum<4
+ \global\expandafter\let\csname TY@F\the\TY@count\endcsname\z@
+ \fi
+ \ifnum\@chnum=6
+ \global\expandafter\let\csname TY@F\the\TY@count\endcsname\z@
+ \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
+ \TY@box\centering\or
+ \TY@box\raggedright\or
+ \TY@box\raggedleft\or
+ \TY@box\relax
+ \fi}\prepnext@tok}
+\def\TY@box#1{%
+ \ifx\centering#1%
+ \hfil \d@llarbegin\insert@column\d@llarend \hfil \else
+ \ifx\raggedright#1%
+ \kern\z@%<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ \d@llarbegin \insert@column \d@llarend \hfil \else
+ \ifx\raggedleft#1%
+ \hfil\kern\z@ \d@llarbegin \insert@column \d@llarend \else
+ \ifx\relax#1%
+ \d@llarbegin \insert@column \d@llarend
+ \fi \fi \fi \fi}
+\def\TY@box@v#1{%
+ \vtop \@startpbox{\csname TY@F\the\TY@count\endcsname}%
+ #1\arraybackslash\tyformat
+ \insert@column\@endpbox}
+\newdimen\TY@tablewidth
+\def\Gscale@div#1#2#3{%
+ \setlength\dimen@{#3}%
+ \ifdim\dimen@=\z@
+ \PackageError{graphics}{Division by 0}\@eha
+ \dimen@#2%
+ \fi
+ \edef\@tempd{\the\dimen@}%
+ \setlength\dimen@{#2}%
+ \count@65536\relax
+ \ifdim\dimen@<\z@
+ \dimen@-\dimen@
+ \count@-\count@
+ \fi
+ \loop
+ \ifdim\dimen@<8192\p@
+ \dimen@\tw@\dimen@
+ \divide\count@\tw@
+ \repeat
+ \dimen@ii=\@tempd\relax
+ \divide\dimen@ii\count@
+ \divide\dimen@\dimen@ii
+ \edef#1{\strip@pt\dimen@}}
+\long\def\TY@get@body#1\end
+ {\toks@\expandafter{\the\toks@#1}\TY@find@end}
+\def\TY@find@end#1{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\TY@\def\@tempa{\end{#1}}\expandafter\@tempa
+ \else\toks@\expandafter
+ {\the\toks@\end{#1}}\expandafter\TY@get@body\fi}
+\def\TY@warn{%
+ \PackageWarning{tabulary}}
+\catcode`\Z=11
+\AtBeginDocument{
+\@ifpackageloaded{colortbl}{%
+\expandafter\def\expandafter\@mkpream\expandafter#\expandafter1%
+ \expandafter{%
+ \expandafter\let\expandafter\CT@setup\expandafter\relax
+ \expandafter\let\expandafter\CT@color\expandafter\relax
+ \expandafter\let\expandafter\CT@do@color\expandafter\relax
+ \expandafter\let\expandafter\color\expandafter\relax
+ \expandafter\let\expandafter\CT@column@color\expandafter\relax
+ \expandafter\let\expandafter\CT@row@color\expandafter\relax
+ \expandafter\let\expandafter\CT@cell@color\expandafter\relax
+ \@mkpream{#1}}
+\let\TY@@mkpream\@mkpream
+\def\TY@classz{%
+ \@classx
+ \@tempcnta\count@
+ \ifx\TY@box\TY@box@v
+ \global\advance\TY@count\@ne
+ \fi
+ \let\centering c%
+ \let\raggedright\noindent
+ \let\raggedleft\indent
+ \let\arraybackslash\relax
+ \prepnext@tok
+\expandafter\CT@extract\the\toks\@tempcnta\columncolor!\@nil
+ \ifnum\@chnum<4
+ \global\expandafter\let\csname TY@F\the\TY@count\endcsname\z@
+ \fi
+ \ifnum\@chnum=6
+ \global\expandafter\let\csname TY@F\the\TY@count\endcsname\z@
+ \fi
+ \@addtopreamble{%
+ \setbox\z@\hbox\bgroup\bgroup
+ \ifcase\@chnum
+ \hskip\stretch{.5}\kern\z@
+ \d@llarbegin\insert@column\d@llarend\hskip\stretch{.5}\or
+ \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
+ \TY@box\centering\or
+ \TY@box\raggedright\or
+ \TY@box\raggedleft\or
+ \TY@box\relax
+ \fi
+ \egroup\egroup
+\begingroup
+ \CT@setup
+ \CT@column@color
+ \CT@row@color
+ \CT@cell@color
+ \CT@do@color
+\endgroup
+ \@tempdima\ht\z@
+ \advance\@tempdima\minrowclearance
+ \vrule\@height\@tempdima\@width\z@
+\unhbox\z@
+}\prepnext@tok}%
+ \def\TY@arrayrule{%
+ \TY@subwidth\arrayrulewidth
+ \@addtopreamble{{\CT@arc@\vline}}}%
+ \def\TY@classvi{\ifcase \@lastchclass
+ \@acol \or
+ \TY@subwidth\doublerulesep
+ \ifx\CT@drsc@\relax
+ \@addtopreamble{\hskip\doublerulesep}%
+ \else
+ \@addtopreamble{{\CT@drsc@\vrule\@width\doublerulesep}}%
+ \fi\or
+ \@acol \or
+ \@classvii
+ \fi}%
+}{%
+\let\CT@start\relax
+}
+}
+{\uccode`\*=`\ %
+\uppercase{\gdef\TX@verb{%
+ \leavevmode\null\TX@vwarn
+ {\ifnum0=`}\fi\ttfamily\let\\\ignorespaces
+ \@ifstar{\let~*\TX@vb}{\TX@vb}}}}
+\def\TX@vb#1{\def\@tempa##1#1{\toks@{##1}\edef\@tempa{\the\toks@}%
+ \expandafter\TX@v\meaning\@tempa\\ \\\ifnum0=`{\fi}}\@tempa!}
+\def\TX@v#1!{\afterassignment\TX@vfirst\let\@tempa= }
+\begingroup
+\catcode`\*=\catcode`\#
+\catcode`\#=12
+\gdef\TX@vfirst{%
+ \if\@tempa#%
+ \def\@tempb{\TX@v@#}%
+ \else
+ \let\@tempb\TX@v@
+ \if\@tempa\space~\else\@tempa\fi
+ \fi
+ \@tempb}
+\gdef\TX@v@*1 *2{%
+ \TX@v@hash*1##\relax\if*2\\\else~\expandafter\TX@v@\fi*2}
+\gdef\TX@v@hash*1##*2{*1\ifx*2\relax\else#\expandafter\TX@v@hash\fi*2}
+\endgroup
+\def\TX@vwarn{%
+ \@warning{\noexpand\verb may be unreliable inside tabularx/y}%
+ \global\let\TX@vwarn\@empty}
+\endinput
+%%
+%% End of file `tabulary.sty'.
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'.