summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xltabular
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-10-25 21:53:22 +0000
committerKarl Berry <karl@freefriends.org>2017-10-25 21:53:22 +0000
commitae2472e6fe43a6d260a5a175d118bc131fea926b (patch)
tree75180a8e0bde5af10981ef9c1a34650e41147495 /Master/texmf-dist/tex/latex/xltabular
parentd82ebe296fa506626d900ce47291abe5a812ba21 (diff)
xltabular (25oct17)
git-svn-id: svn://tug.org/texlive/trunk@45600 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xltabular')
-rw-r--r--Master/texmf-dist/tex/latex/xltabular/xltabular.sty50
1 files changed, 26 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/xltabular/xltabular.sty b/Master/texmf-dist/tex/latex/xltabular/xltabular.sty
index 2667a2c7a6a..e374f695440 100644
--- a/Master/texmf-dist/tex/latex/xltabular/xltabular.sty
+++ b/Master/texmf-dist/tex/latex/xltabular/xltabular.sty
@@ -1,4 +1,4 @@
-%% $Id: xltabular.sty 602 2017-10-01 13:47:08Z herbert $
+%% $Id: xltabular.sty 635 2017-10-24 18:22:59Z herbert $
%%
%% This file is distributed under the terms of the LaTeX Project Public
%% License from CTAN archives in directory macros/latex/base/lppl.txt.
@@ -7,10 +7,7 @@
% Copyright 2017 Herbert Voss <hvoss@tug.org>
% Rolf Niepraschk <Rolf.Niepraschk@gmx.de>
%%
-\def\xltabular@version{0.03 }
-\ProvidesPackage{xltabular}
- [2017/10/01 v\xltabular@version `xltabular' package (hv,rn)]
-
+\ProvidesPackage{xltabular}[2017/10/24 v0.04 `xltabular' package (hv,RN)]
\RequirePackage{tabularx}
\let\ORIGi@tabularx=\tabularx
\let\ORIGi@endtabularx=\endtabularx
@@ -21,7 +18,6 @@
\let\ORIGii@TX@endtabularx=\TX@endtabularx
%
\let\ORIG@longtable=\longtable
-\let\ORIG@LT@c@ption=\LT@c@ption
%
% restore original tabularx
\let\tabularx=\ORIGi@tabularx
@@ -31,30 +27,36 @@
% define a new tabularx like the one from "ltablex"
%
\newenvironment{xltabular}[1][x]
- {\if l#1%
- \LTleft\z@ \LTright\fill
- \else\if r#1%
+{\if l#1%
+ \LTleft\z@ \LTright\fill
+ \else\if r#1%
\LTleft\fill \LTright\z@
- \else\if c#1%
+ \else\if c#1%
\LTleft\fill \LTright\fill
- \fi\fi\fi
- \let\TX@endtabularx=\ORIGii@TX@endtabularx
- \let\endtabularx\endxltabular
- \ORIGii@tabularx}
- {\def\@currenvir{tabularx}}
-%
-% In "longtable" increase the counter "table" only if "\caption" is used
+ \fi\fi\fi
+ \let\TX@endtabularx=\ORIGii@TX@endtabularx
+ \let\endtabularx\endxltabular
+ \ORIGii@tabularx}
+{\def\@currenvir{tabularx}}
-\def\LT@c@ption#1{%
- \noalign{%
- \ifx#1\@firstofone
- \refstepcounter{table}%
- \fi}%
- \ORIG@LT@c@ption{#1}%
+% In "longtable" increase the counter "table" only if "\caption" is used
+\AtBeginDocument{%
+ \let\ORIG@LT@capti@n=\LT@capti@n
+ \def\LT@capti@n{%
+ \@ifstar{\ORIG@LT@capti@n*}{%
+ % We use the following instead of "\refstepcounter"
+ \stepcounter{\LTcaptype}%
+ % We are inside a group: edef -> xdef
+ \protected@xdef\@currentlabel
+ {\csname p@\LTcaptype\endcsname\csname the\LTcaptype\endcsname}%
+ \ORIG@LT@capti@n
+ }%
+ }%
}
%
+\providecommand*\LTcaptype{table}% support of package "caption"
\def\longtable{%
- \addtocounter{table}\m@ne
+ \addtocounter{\LTcaptype}\m@ne
\ORIG@longtable
}
%