summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/xltabular
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/xltabular
Initial commit
Diffstat (limited to 'macros/latex/contrib/xltabular')
-rw-r--r--macros/latex/contrib/xltabular/Changes8
-rw-r--r--macros/latex/contrib/xltabular/README.md11
-rw-r--r--macros/latex/contrib/xltabular/xltabular-doc.bib24
-rw-r--r--macros/latex/contrib/xltabular/xltabular-doc.pdfbin0 -> 70975 bytes
-rw-r--r--macros/latex/contrib/xltabular/xltabular-doc.tex326
-rw-r--r--macros/latex/contrib/xltabular/xltabular-example-hyp.tex10
-rw-r--r--macros/latex/contrib/xltabular/xltabular-example.inp80
-rw-r--r--macros/latex/contrib/xltabular/xltabular-example.tex9
-rw-r--r--macros/latex/contrib/xltabular/xltabular.sty109
9 files changed, 577 insertions, 0 deletions
diff --git a/macros/latex/contrib/xltabular/Changes b/macros/latex/contrib/xltabular/Changes
new file mode 100644
index 0000000000..05b615fc27
--- /dev/null
+++ b/macros/latex/contrib/xltabular/Changes
@@ -0,0 +1,8 @@
+2.0a 2018/12/16 - better hyperref support; example files
+1.0a 2018/05/23 - restore original tabularx must not be statically
+0.05 2017-10-26 - set \keepXColumns
+0.04 2017-10-23 - wrong references (RN)
+0.03 2017-10-01 - fix for \caption* in longtable
+0.02 2017-09-28 - added optional argument for horizontal alignment
+ - extended documentation
+0.01 2017-09-27 - first CTAN version
diff --git a/macros/latex/contrib/xltabular/README.md b/macros/latex/contrib/xltabular/README.md
new file mode 100644
index 0000000000..88ea7aa3f8
--- /dev/null
+++ b/macros/latex/contrib/xltabular/README.md
@@ -0,0 +1,11 @@
+# README #
+Package xltabular loads package ltablex but keeps the current
+tabularx environment. The environment xltabular is a combination
+between longtable and tabularx.
+
+This file is distributed under the terms of the LaTeX Project Public
+License from CTAN archives in directory macros/latex/base/lppl.txt.
+Either version 1.3 or, at your option, any later version.
+
+H.V./R.N.
+
diff --git a/macros/latex/contrib/xltabular/xltabular-doc.bib b/macros/latex/contrib/xltabular/xltabular-doc.bib
new file mode 100644
index 0000000000..61a0505f8f
--- /dev/null
+++ b/macros/latex/contrib/xltabular/xltabular-doc.bib
@@ -0,0 +1,24 @@
+@ctan{ltablex,
+ Title = {The \texttt{ltablex} package},
+ Author = {Anil Goel},
+ url = {/macros/latex/contrib/ltablex/},
+ version = {1.1},
+ date = {2014-08-13},
+}
+
+@ctan{tabularx,
+ Title = {The \texttt{tabularx} package},
+ Author = {David Carlisle},
+ url = {/macros/latex/contrib/carlisle/},
+ version = {2.11},
+ date = {2016-02-03},
+}
+
+@ctan{Pak-longtable,
+ Title = {The \texttt{longtable} package},
+ Author = {David Carlisle},
+ url = {/macros/latex/required/tools/longtable.pdf},
+ date = {2014-10-28},
+ version = {4.11},
+}
+
diff --git a/macros/latex/contrib/xltabular/xltabular-doc.pdf b/macros/latex/contrib/xltabular/xltabular-doc.pdf
new file mode 100644
index 0000000000..882a93aa45
--- /dev/null
+++ b/macros/latex/contrib/xltabular/xltabular-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/xltabular/xltabular-doc.tex b/macros/latex/contrib/xltabular/xltabular-doc.tex
new file mode 100644
index 0000000000..2ad9695797
--- /dev/null
+++ b/macros/latex/contrib/xltabular/xltabular-doc.tex
@@ -0,0 +1,326 @@
+%% $Id: xltabular-doc.tex 598 2017-09-30 19:52:25Z herbert $
+%
+\listfiles\setcounter{errorcontextlines}{100}
+\documentclass[paper=a4,fontsize=11pt,DIV=13,parskip=half-,
+ captions=tableabove,twoside=on]{scrartcl}
+\usepackage{fontspec}
+%\usepackage[%usefilenames,
+% TT={Scale=0.88,FakeStretch=0.9},
+% SS={Scale=0.9},
+% RM={Scale=0.9},
+% DefaultFeatures={Ligatures=TeX}]{lucida-otf} % support opentype math fonts
+\setmainfont{AccanthisADFStdNo3}[
+ UprightFont =*-Regular,
+ BoldFont =*-Bold,
+ ItalicFont =*-Italic,
+ BoldItalicFont=*-BoldItalic,
+ RawFeature = -rlig,
+]
+\setsansfont{GilliusADF}[
+ UprightFont =*-Regular,
+ BoldFont =*-Bold,
+ ItalicFont =*-Italic,
+ BoldItalicFont=*-BoldItalic,
+ RawFeature = -rlig,
+]
+\setmonofont{Anonymous Pro}[Scale=MatchLowercase,FakeStretch=0.9]
+
+\usepackage[english]{babel}
+\usepackage{scrlayer-scrpage}
+\automark[section]{section}
+\automark*[subsection]{}
+\pagestyle{scrheadings}
+
+%\usepackage{selnolig}
+%\nolig{oe}{o|e}
+
+\usepackage{xltabular}
+\usepackage{fancyvrb}
+\usepackage{blindtext}
+\usepackage{dtk-logos} % for Wikipedia W
+\usepackage{ragged2e}
+
+\usepackage[bibstyle=dtk]{biblatex}
+\addbibresource{\jobname.bib}
+
+\raggedbottom
+\usepackage[colorlinks,linktocpage]{hyperref}
+\newcommand*\cs[1]{\texttt{\textbackslash#1}}
+
+\makeatletter% from: doc.sty
+\newcommand*\GetFileInfo[1]{%
+ \def\filename{#1}%
+ \def\@tempb##1 ##2 ##3\relax##4\relax{%
+ \def\filedate{##1}%
+ \def\fileversion{##2}%
+ \def\fileinfo{##3}}%
+ \edef\@tempa{\csname ver@#1\endcsname}%
+ \expandafter\@tempb\@tempa\relax? ? \relax\relax}
+\makeatother
+
+\GetFileInfo{xltabular.sty}
+
+\title{Package \texttt{xltabular} \\--\\ \normalsize \fileversion\ (\filedate)}
+\author{Rolf Niepraschk\thanks{Rolf.Niepraschk@gmx.de} \and Herbert Voß\thanks{hvoss@tug.org}}
+\begin{document}
+\maketitle
+\tableofcontents
+
+\section{Introduction}
+
+The package \texttt{ltablex} supports an environment \texttt{tabularx} with
+the possiblity of pagebreaks and the same header/footer definitions as in
+the package \texttt{longtable}. But the old bevaviour of the \texttt{tabularx}
+environment is no more possible.
+
+The package \texttt{xltabular} defines an environment of the same name
+which behaves like a \texttt{tabularx} as a \texttt{longtable}. In short:
+it is a \texttt{longtable} with the column specifier \texttt{X}. But it leaves the
+\texttt{tabularx} environment with its original behaviour.
+
+The syntax of the environment is similiar to the one of \texttt{tabularx}:
+
+\begin{verbatim}
+\begin{xltabular}[hPos]{width}{ l X ...}
+\caption{...\label{...}}\\
+tabular body
+\end{xltabular}
+\end{verbatim}
+
+For the optional argument \texttt{hPos} (horizontal position) the values \texttt{l},
+\texttt{r} and \texttt{c} (default)
+are possible. The environment \texttt{xltabular} uses \texttt{longtable} for
+typesetting the tabular. The original \texttt{longtable} increases the counter
+\texttt{table} in any case, with or without a caption. This is not the case
+with \texttt{xltabular}: no \cs{caption}, no counter change.
+
+
+
+
+\section{Examples}
+
+\newcommand\B{Some nonsense text which fills at least one line
+ of a tabular called nonsense tabular with text.\\}
+\newcommand\BB{\B\B\B\B\B\B\B\B\B\B\B\B\B\B\B}
+\newcommand\BBB{\BB\BB\BB\BB}
+
+\listoftables
+
+\markboth{Examples}{}
+\vspace{1cm}
+
+
+\subsection{The standard \texttt{tabularx} environment}
+
+\begin{Verbatim}[frame=lines]
+\captionaboveof{table}{Using the original \texttt{tabularx} environment:
+ a pagebreak not possible! This is the reason why the tabular moves
+ to the next page.}
+\begin{tabularx}{0.75\linewidth}{@{} lX @{}}
+left column & \blindtext\\
+l & \blindtext\\
+left column & \blindtext\\
+l & \blindtext\\
+\end{tabularx}
+\end{Verbatim}
+
+\bigskip
+\captionaboveof{table}{Using the original \texttt{tabularx} environment:
+ a pagebreak not possible! This is the reason why the tabular moves
+ to the next page.}
+\begin{tabularx}{0.75\linewidth}{@{} lX @{}}
+ left column & \blindtext\\
+ l & \blindtext\\
+ left column & \blindtext\\
+ l & \blindtext\\
+\end{tabularx}
+
+
+%\begin{tabularx}{\linewidth}{@{}X@{}}
+%\captionaboveof{table}{Another example for the original \texttt{tabularx} environment:
+%%%pagebreak not possible!}\\
+%\BBB
+%\end{tabularx}
+
+\clearpage
+
+\subsection{The new environment \texttt{xltabular}}
+For the demonstration we use a tabular with only one X column. There is no difference
+to an example with more or other column specifiers. However, there should be at least
+one \texttt{X} column specifier; it makes no real sense otherwise.
+
+\begin{Verbatim}[frame=lines]
+\begin{xltabular}{\linewidth}{@{} X @{}}
+\caption{the \texttt{xltabular} environment with \texttt{longtable}
+ property}\\[\belowcaptionskip]
+\BB\\
+Now a manuel \cs{pagebreak} is used and on the
+following page an automatic pagebreak is done by \texttt{longtable}.\\
+
+\pagebreak
+
+\BBB
+\end{xltabular}
+\end{Verbatim}
+
+\begin{xltabular}{\linewidth}{@{} X @{}}
+\caption{the \texttt{xltabular} environment with \texttt{longtable}
+ property}\\[\belowcaptionskip]
+\BB\\
+Now a manuel \cs{pagebreak} is used and on the
+following page an automatik pagebreak is done by \texttt{longtable}.\\
+
+\pagebreak
+
+\BBB
+\end{xltabular}
+
+The command \cs{BBB} does nothing else then printing a lot of lines
+with nonsense.
+
+
+\setcapwidth{0.75\linewidth}
+
+\begin{Verbatim}[frame=lines]
+\begin{xltabular}[l]{0.75\linewidth}{@{} lX @{}}
+\caption{The \texttt{xltabular} environment with \texttt{longtable} property
+ and left aligned by setting the optional argument.}\\[\belowcaptionskip]\hline
+Left column & At first a line with some nonsense text to show how long this line is.
+ The caption has the same width as the text.\\
+left column & \blindtext\\
+left column & \blindtext\\
+left column & \blindtext\\
+left column & \blindtext\\\hline
+\end{xltabular}
+\end{Verbatim}
+
+
+
+\begin{xltabular}[l]{0.75\linewidth}{@{} lX @{}}
+ \caption{The \texttt{xltabular} environment with \texttt{longtable} property
+ and left aligned by setting the optional argument.}\\[\belowcaptionskip]\hline
+ Left column & At first a line with some nonsense text to show how long this line is.
+ The caption has the same width as the text.\\
+ left column & \blindtext\\
+ left column & \blindtext\\
+ left column & \blindtext\\
+ left column & \blindtext\\\hline
+\end{xltabular}
+
+
+
+
+\subsection{\texttt{tabularx} without a caption}
+
+Here comes another \texttt{tabularx} but without a caption. It should
+\emph{not} increase the \texttt{table} counter. The following tabular
+in the last section should have the correct number!
+
+\begin{tabularx}{\linewidth}{@{} >{\ttfamily}l>{\RaggedRight}X @{}}\hline
+.ext & Beschreibung\\\hline
+ aux & (auxiliary) Hilfsdatei, enthält Querverweise usw. \\
+ bbl & (bibliography) Hilfsdatei, enthält die Einträge für die Literatur\\
+ bib & (bibtex) enthält die Literaturdaten\\
+ blg & (bibliography log) enthält die Ausgaben eines Bib\TeX-Laufs\\
+ cfg & (config) Konfigurationsdatei\\
+ clo & (class options) Definitionen für die Dokumentenklasse und die entsprechenden
+ Klassen-Optionen\\\hline
+\end{tabularx}
+
+
+\subsection{\texttt{xltabular} with the star version of caption}
+
+Here comes another \texttt{xltabular} with \cs{caption*}. It should
+\emph{not} increase the \texttt{table} counter. The following tabular
+in the next section should have the correct number!
+
+\begin{xltabular}{\linewidth}{@{} >{\ttfamily}l>{\RaggedRight}X @{}}
+\caption*{A caption as star version: no number no entry in the List of Tables}\\\hline
+.ext & Beschreibung\\\hline
+ aux & (auxiliary) Hilfsdatei, enthält Querverweise usw. \\
+ bbl & (bibliography) Hilfsdatei, enthält die Einträge für die Literatur\\
+ bib & (bibtex) enthält die Literaturdaten\\
+ blg & (bibliography log) enthält die Ausgaben eines Bib\TeX-Laufs\\
+ cfg & (config) Konfigurationsdatei\\
+ clo & (class options) Definitionen für die Dokumentenklasse und die entsprechenden
+ Klassen-Optionen\\\hline
+\end{xltabular}
+
+
+
+\subsection{\texttt{xltabular} with header/footer definitions}
+
+\begin{Verbatim}[frame=lines]
+\begin{xltabular}{\linewidth}{@{} >{\ttfamily}l >{\RaggedRight}X @{}}
+\caption{File endings (only for a demonstration \ldots)}\\\hline
+.ext & Beschreibung\\\hline
+\endfirsthead
+\multicolumn{2}{@{}l}{\ldots\ \small Fortsetzung}\\\hline
+.ext & Beschreibung\\\hline
+\endhead
+\hline
+\multicolumn{2}{r@{}}{\small Fortsetzung\ldots}\\
+\endfoot
+\hline
+\endlastfoot
+aux & (auxiliary) Hilfsdatei, enthält Querverweise usw. \\
+bbl & (bibliography) Hilfsdatei, enthält die Einträge für die Literatur\\
+bib & (bibtex) enthält die Literaturdaten\\
+blg & (bibliography log) enthält die Ausgaben eines Bib\TeX-Laufs\\
+cfg & (config) Konfigurationsdatei\\
+clo & (class options) Definitionen für die Dokumentenklasse und die entsprechenden
+[...]
+Klassen-Optionen\\
+\end{xltabular}
+\end{Verbatim}
+
+\begin{xltabular}{\linewidth}{@{} >{\ttfamily}l >{\RaggedRight}X @{}}
+\caption{File endings (only for a demonstration \ldots)}\\\hline
+.ext & Beschreibung\\\hline
+\endfirsthead
+\multicolumn{2}{@{}l}{\ldots\ \small Fortsetzung}\\\hline
+.ext & Beschreibung\\\hline
+\endhead
+\hline
+\multicolumn{2}{r@{}}{\small Fortsetzung\ldots}\\
+\endfoot
+\hline
+\endlastfoot
+ aux & (auxiliary) Hilfsdatei, enthält Querverweise usw. \\
+ bbl & (bibliography) Hilfsdatei, enthält die Einträge für die Literatur\\
+ bib & (bibtex) enthält die Literaturdaten\\
+ blg & (bibliography log) enthält die Ausgaben eines Bib\TeX-Laufs\\
+ cfg & (config) Konfigurationsdatei\\
+ clo & (class options) Definitionen für die Dokumentenklasse und die entsprechenden
+ Klassen-Optionen\\
+ aux & (auxiliary) Hilfsdatei, enthält Querverweise usw. \\
+ bbl & (bibliography) Hilfsdatei, enthält die Einträge für die Literatur\\
+ bib & (bibtex) enthält die Literaturdaten\\
+ blg & (bibliography log) enthält die Ausgaben eines Bib\TeX-Laufs\\
+ cfg & (config) Konfigurationsdatei\\
+ clo & (class options) Definitionen für die Dokumentenklasse und die entsprechenden
+ Klassen-Optionen\\
+ aux & (auxiliary) Hilfsdatei, enthält Querverweise usw. \\
+ bbl & (bibliography) Hilfsdatei, enthält die Einträge für die Literatur\\
+ bib & (bibtex) enthält die Literaturdaten\\
+ blg & (bibliography log) enthält die Ausgaben eines Bib\TeX-Laufs\\
+ cfg & (config) Konfigurationsdatei\\
+ clo & (class options) Definitionen für die Dokumentenklasse und die entsprechenden
+ Klassen-Optionen\\
+ aux & (auxiliary) Hilfsdatei, enthält Querverweise usw. \\
+ bbl & (bibliography) Hilfsdatei, enthält die Einträge für die Literatur\\
+ bib & (bibtex) enthält die Literaturdaten\\
+ blg & (bibliography log) enthält die Ausgaben eines Bib\TeX-Laufs\\
+ cfg & (config) Konfigurationsdatei\\
+ clo & (class options) Definitionen für die Dokumentenklasse und die entsprechenden
+ Klassen-Optionen\\
+\end{xltabular}
+
+
+
+\nocite{*}
+\printbibliography
+
+
+\end{document}
+
diff --git a/macros/latex/contrib/xltabular/xltabular-example-hyp.tex b/macros/latex/contrib/xltabular/xltabular-example-hyp.tex
new file mode 100644
index 0000000000..2d477d1365
--- /dev/null
+++ b/macros/latex/contrib/xltabular/xltabular-example-hyp.tex
@@ -0,0 +1,10 @@
+
+%---------------------------
+\setcounter{errorcontextlines}{100}
+\listfiles
+\documentclass{scrbook}
+\usepackage{caption}
+\usepackage{xltabular}
+\usepackage{hyperref}
+\input{xltabular-example.inp}
+%---------------------------
diff --git a/macros/latex/contrib/xltabular/xltabular-example.inp b/macros/latex/contrib/xltabular/xltabular-example.inp
new file mode 100644
index 0000000000..f61cc62065
--- /dev/null
+++ b/macros/latex/contrib/xltabular/xltabular-example.inp
@@ -0,0 +1,80 @@
+
+\newcommand*\showCounterTable{%
+ \noindent The Counter \textbf{table:~\arabic{table}}%
+}
+
+\begin{document}
+
+\chapter{Chapter 1}
+\section{Section 1 of Chapter 1}
+
+\showCounterTable
+\begin{xltabular}[l]{.7\linewidth}{|c|X|X|}
+\caption{A table with a caption\label{tab:A}} \\
+\hline
+1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
+4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
+\hline
+\end{xltabular}
+\showCounterTable
+
+\section{Section 2 of Chapter 1}
+
+\showCounterTable
+\begin{xltabular}[r]{.7\linewidth}{|c|X|X|}
+\hline
+1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
+4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
+\hline
+\end{xltabular}
+\showCounterTable
+
+\section{Section 3 of Chapter 1}
+
+\showCounterTable
+\begin{xltabular}[r]{.7\linewidth}{|c|X|X|}
+\caption{A table with a caption\label{tab:B}} \\
+\hline
+1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
+4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
+\hline
+\end{xltabular}
+\showCounterTable
+
+\chapter{Chapter 2}
+\section{Section 1 of Chapter 2}
+
+\showCounterTable
+\begin{xltabular}[c]{.7\linewidth}{|c|X|X|}
+\caption{A table with a caption\label{tab:C}} \\
+\hline
+1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
+4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
+\hline
+\end{xltabular}
+\showCounterTable
+
+\section{Section 2 of Chapter 2}
+
+\showCounterTable
+\begin{xltabular}[c]{.7\linewidth}{|c|X|X|}
+\caption{A table with a caption\label{tab:D}} \\
+\hline
+1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
+4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
+\hline
+\end{xltabular}
+\showCounterTable
+
+\section{Section 3 of Chapter 2 -- some references}
+
+\begin{itemize}
+ \item Table~\ref{tab:A} is on page~\pageref{tab:A}
+ \item Table~\ref{tab:B} is on page~\pageref{tab:B}
+ \item Table~\ref{tab:C} is on page~\pageref{tab:C}
+ \item Table~\ref{tab:D} is on page~\pageref{tab:D}
+\end{itemize}
+
+\end{document}
+
+\endinput
diff --git a/macros/latex/contrib/xltabular/xltabular-example.tex b/macros/latex/contrib/xltabular/xltabular-example.tex
new file mode 100644
index 0000000000..fbeb87ae01
--- /dev/null
+++ b/macros/latex/contrib/xltabular/xltabular-example.tex
@@ -0,0 +1,9 @@
+
+%---------------------------
+\setcounter{errorcontextlines}{100}
+\listfiles
+\documentclass{scrbook}
+\usepackage{caption}
+\usepackage{xltabular}
+\input{xltabular-example.inp}
+%---------------------------
diff --git a/macros/latex/contrib/xltabular/xltabular.sty b/macros/latex/contrib/xltabular/xltabular.sty
new file mode 100644
index 0000000000..4684191127
--- /dev/null
+++ b/macros/latex/contrib/xltabular/xltabular.sty
@@ -0,0 +1,109 @@
+%%
+%% This file is distributed under the terms of the LaTeX Project Public
+%% 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@tug.org>
+% Rolf Niepraschk <Rolf.Niepraschk@gmx.de>
+%%
+\ProvidesPackage{xltabular}[2019/01/30 v0.2b `xltabular' package (hv,RN)]
+\RequirePackage{tabularx}
+\let\XLT@i@tabularx=\tabularx
+\let\XLT@i@endtabularx=\endtabularx
+\let\XLT@i@TX@endtabularx=\TX@endtabularx
+%
+\RequirePackage{ltablex}
+\keepXColumns% xltabular behaves like tabularx
+%
+\let\XLT@ii@tabularx=\tabularx
+\let\XLT@ii@TX@endtabularx=\TX@endtabularx
+\let\XLT@longtable=\longtable
+\let\XLT@LT@start=\LT@start
+\let\XLT@LT@array=\LT@array
+\@ifundefined{scr@LT@array}{%
+ \AtBeginDocument{%
+ \@ifundefined{adl@LT@array}{}{\let\XLT@adl@LT@array=\adl@LT@array}
+ }
+}{\let\XLT@scr@LT@array=\scr@LT@array}%
+
+%
+% restore original tabularx
+\renewenvironment{tabularx}%
+{\let\TX@endtabularx=\XLT@i@TX@endtabularx\XLT@i@tabularx}
+{\XLT@i@endtabularx}
+%
+% define a new tabularx like the one from "ltablex"
+%
+\newenvironment{xltabular}[1][x]%
+{\if l#1%
+ \LTleft\z@ \LTright\fill
+ \else\if r#1%
+ \LTleft\fill \LTright\z@
+ \else\if c#1%
+ \LTleft\fill \LTright\fill
+ \fi\fi\fi
+ \let\TX@endtabularx=\XLT@ii@TX@endtabularx
+ \let\endtabularx\endxltabular
+ \XLT@ii@tabularx}
+{\def\@currenvir{tabularx}}
+
+\def\LT@caption{%
+ \noalign\bgroup\XLT@refstepcounter{\LTcaptype}%
+ % because we are inside a group
+ \global\let\@currentlabel=\@currentlabel
+ \@ifundefined{cref@currentlabel}{}{% from package "cleveref"
+ \global\let\cref@currentlabel=\cref@currentlabel
+ }
+ \ifXLT@HypRef
+ % revert to the patched version
+ \global\let\LT@start=\XLT@Hy@LT@start
+ \hyper@makecurrent{\LTcaptype}%
+ \global\let\Hy@LT@currentHref\@currentHref
+ \fi
+ \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n
+}%
+%
+\providecommand*\LTcaptype{table}% support of package "caption"
+\def\longtable{%
+ \ifXLT@HypRef
+ % revert to the unpatched version when \caption is not used
+ \global\let\LT@start=\XLT@LT@start
+ \fi
+ \XLT@longtable
+}
+
+\newif\ifXLT@HypRef
+\AtBeginDocument{%
+ \let\XLT@refstepcounter=\refstepcounter
+ \@ifpackageloaded{hyperref}{\XLT@HypReftrue}{\XLT@HypReffalse}%
+ \ifXLT@HypRef
+ % save the patched version
+ \let\XLT@Hy@LT@start=\LT@start
+ % revert to the unpatched versions
+ \@ifundefined{scr@LT@array}{%
+ \@ifundefined{adl@LT@array}{%
+ % hyperref has \LT@array patched directly
+ \let\LT@array=\XLT@LT@array
+ }{%
+ % hyperref has \adl@LT@array patched, not \LT@array
+ \let\adl@LT@array=\XLT@adl@LT@array
+ }%
+ }{%
+ % hyperref has \scr@LT@array patched, not \LT@array
+ \let\scr@LT@array=\XLT@scr@LT@array
+ }%
+ \fi
+ \def\LT@array{%
+ % make the call of \refstepcounter inside of \XLT@LT@array ineffective
+ \renewcommand*\refstepcounter[2][]{%
+ % make next calls effective again
+ \let\refstepcounter=\XLT@refstepcounter
+ }%
+ \XLT@LT@array
+ }%
+}
+%
+\endinput
+%%
+%% End of file `xltabular.sty'.
+