texlive[55561] Master/texmf-dist: xltabular (15jun20)

commits+karl at tug.org commits+karl at tug.org
Mon Jun 15 22:43:08 CEST 2020


Revision: 55561
          http://tug.org/svn/texlive?view=revision&revision=55561
Author:   karl
Date:     2020-06-15 22:43:07 +0200 (Mon, 15 Jun 2020)
Log Message:
-----------
xltabular (15jun20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-doc.pdf
    trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty

Modified: trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty	2020-06-15 20:42:53 UTC (rev 55560)
+++ trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty	2020-06-15 20:43:07 UTC (rev 55561)
@@ -3,18 +3,21 @@
 %% License from CTAN archives in directory  macros/latex/base/lppl.txt.
 %% Either version 1.3 or, at your option, any later version.
 %%
-% Copyright 2018,... Herbert Voss <hvoss at tug.org>
-%                    Rolf Niepraschk <Rolf.Niepraschk at gmx.de>
+% Copyright 2018-2020 Herbert Voss    <hvoss at tug.org>
+%                     Rolf Niepraschk <Rolf.Niepraschk at gmx.de>
 %%
-\ProvidesPackage{xltabular}[2020/03/20 v0.2c `xltabular' package (hv,RN)]
+\ProvidesPackage{xltabular}[2020/06/14 v0.2d `xltabular' package (hv,RN)]
 \RequirePackage{tabularx}
 \let\XLT at i@tabularx=\tabularx
 \let\XLT at i@endtabularx=\endtabularx
 \let\XLT at i@TX at endtabularx=\TX at endtabularx
 %
-\RequirePackage{longtable}
+\RequirePackage{ltablex}
+\keepXColumns% xltabular behaves like tabularx
+%
+\let\XLT at ii@tabularx=\tabularx
+\let\XLT at ii@TX at endtabularx=\TX at endtabularx
 \let\XLT at longtable=\longtable
-\let\XLT at LT@caption=\LT at caption
 \let\XLT at LT@start=\LT at start
 \let\XLT at LT@array=\LT at array
 \@ifundefined{scr at LT@array}{%
@@ -22,13 +25,8 @@
     \@ifundefined{adl at LT@array}{}{\let\XLT at adl@LT at array=\adl at LT@array}
   }
 }{\let\XLT at scr@LT at array=\scr at LT@array}%
+
 %
-\RequirePackage{ltablex}
-\keepXColumns% xltabular behaves like tabularx
-%
-\let\XLT at ii@tabularx=\tabularx
-\let\XLT at ii@TX at endtabularx=\TX at endtabularx
-%
 % restore original tabularx
 \renewenvironment{tabularx}%
 {\let\TX at endtabularx=\XLT at i@TX at endtabularx\XLT at i@tabularx}
@@ -50,8 +48,22 @@
 {\def\@currenvir{tabularx}}
 
 \def\LT at caption{%
-  \noalign\bgroup\XLT at refstepcounter{\LTcaptype}%
-  % because we are inside a group
+  \noalign\bgroup
+  \@ifnextchar[{\XLT at LT@caption}{\XLT@@LT at caption}
+}
+\def\XLT at LT@caption[#1]{%
+  % increasing the counter only if opt. parameter is not empty
+  \ifx\relax#1\relax\@tempswafalse\else\@tempswatrue\fi
+  \XLT@@@LT at caption[#1]
+}
+\def\XLT@@LT at caption{% allways increasing the counter
+  \@tempswatrue
+  \XLT@@@LT at caption
+}
+\def\XLT@@@LT at caption{%
+  % Eventually increasing the counter
+  \if at tempswa\refstepcounter{\LTcaptype}\fi
+  % global assignments because we are inside a group
   \global\let\@currentlabel=\@currentlabel
   \@ifundefined{cref at currentlabel}{}{% from package "cleveref"
     \global\let\cref at currentlabel=\cref at currentlabel
@@ -61,19 +73,18 @@
     \global\let\LT at start=\XLT at Hy@LT at start
     \hyper at makecurrent{\LTcaptype}%
     \global\let\Hy at LT@currentHref\@currentHref
-  \fi      
+  \fi
+  % continue with the original definition of \LT at caption 
   \@ifnextchar[{\egroup\LT at c@ption\@firstofone}\LT at capti@n
-}%
+}
+
 %
 \providecommand*\LTcaptype{table}% support of package "caption"
-% restore original longtable
 \def\longtable{%
   \ifXLT at HypRef
-    % revert to the unpatched version when \caption is not used
-    \global\let\LT at start=\XLT at LT@start% 
+    % revert to the unpatched version if \caption is not used
+    \global\let\LT at start=\XLT at LT@start
   \fi
-  \let\LT at array=\XLT at LT@array
-  \let\LT at caption=\XLT at LT@caption
   \XLT at longtable
 }
 



More information about the tex-live-commits mailing list.