texlive[49939] Master/texmf-dist: xltabular (4feb19)
commits+karl at tug.org
commits+karl at tug.org
Mon Feb 4 22:37:28 CET 2019
Revision: 49939
http://tug.org/svn/texlive?view=revision&revision=49939
Author: karl
Date: 2019-02-04 22:37:28 +0100 (Mon, 04 Feb 2019)
Log Message:
-----------
xltabular (4feb19)
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 2019-02-04 21:37:10 UTC (rev 49938)
+++ trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty 2019-02-04 21:37:28 UTC (rev 49939)
@@ -6,7 +6,7 @@
% Copyright 2018 Herbert Voss <hvoss at tug.org>
% Rolf Niepraschk <Rolf.Niepraschk at gmx.de>
%%
-\ProvidesPackage{xltabular}[2018/12/16 v0.2a `xltabular' package (hv,RN)]
+\ProvidesPackage{xltabular}[2019/01/30 v0.2b `xltabular' package (hv,RN)]
\RequirePackage{tabularx}
\let\XLT at i@tabularx=\tabularx
\let\XLT at i@endtabularx=\endtabularx
@@ -47,24 +47,21 @@
\XLT at ii@tabularx}
{\def\@currenvir{tabularx}}
-% in "longtable" increase the counter "table" only if "\caption" is used
-\AtBeginDocument{%
- \let\XLT at LT@capti at n=\LT at capti@n
- \def\LT at capti@n{%
- \@ifstar{\XLT at LT@capti at n*}{%
- \XLT at refstepcounter{\LTcaptype}%
- % because we are inside a group
- \global\let\@currentlabel=\@currentlabel
- \ifXLT at HypRef
- % revert to the patched version
- \global\let\LT at start=\XLT at Hy@LT at start
- \hyper at makecurrent{\LTcaptype}%
- \global\let\Hy at LT@currentHref\@currentHref
- \fi
- \XLT at LT@capti at n
- }%
- }%
-}
+\def\LT at caption{%
+ \noalign\bgroup\XLT at refstepcounter{\LTcaptype}%
+ % 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
+ }
+ \ifXLT at HypRef
+ % revert to the patched version
+ \global\let\LT at start=\XLT at Hy@LT at start
+ \hyper at makecurrent{\LTcaptype}%
+ \global\let\Hy at LT@currentHref\@currentHref
+ \fi
+ \@ifnextchar[{\egroup\LT at c@ption\@firstofone}\LT at capti@n
+}%
%
\providecommand*\LTcaptype{table}% support of package "caption"
\def\longtable{%
@@ -75,12 +72,9 @@
\XLT at longtable
}
-% is not the hyperref version if hyperref is loaded after this package
-\AtEndOfPackage{\let\XLT at refstepcounter=\refstepcounter}
\newif\ifXLT at HypRef
\AtBeginDocument{%
- % is the hyperref version if hyperref is loaded
- \let\XLT@@refstepcounter=\refstepcounter
+ \let\XLT at refstepcounter=\refstepcounter
\@ifpackageloaded{hyperref}{\XLT at HypReftrue}{\XLT at HypReffalse}%
\ifXLT at HypRef
% save the patched version
@@ -88,7 +82,7 @@
% revert to the unpatched versions
\@ifundefined{scr at LT@array}{%
\@ifundefined{adl at LT@array}{%
- % hyperref has \LT at array patched
+ % hyperref has \LT at array patched directly
\let\LT at array=\XLT at LT@array
}{%
% hyperref has \adl at LT@array patched, not \LT at array
@@ -99,13 +93,13 @@
\let\scr at LT@array=\XLT at scr@LT at array
}%
\fi
- \let\XLT@@LT at array=\LT at array
\def\LT at array{%
- % make the call of \refstepcounter in \XLT@@LT at array ineffective
- \def\refstepcounter##1{%
- \let\refstepcounter=\XLT@@refstepcounter
+ % make the call of \refstepcounter inside of \XLT at LT@array ineffective
+ \renewcommand*\refstepcounter[2][]{%
+ % make next calls effective again
+ \let\refstepcounter=\XLT at refstepcounter
}%
- \XLT@@LT at array
+ \XLT at LT@array
}%
}
%
More information about the tex-live-commits
mailing list