texlive[72846] Master/texmf-dist: xltabular (13nov24)
commits+karl at tug.org
commits+karl at tug.org
Wed Nov 13 22:12:54 CET 2024
Revision: 72846
https://tug.org/svn/texlive?view=revision&revision=72846
Author: karl
Date: 2024-11-13 22:12:54 +0100 (Wed, 13 Nov 2024)
Log Message:
-----------
xltabular (13nov24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/xltabular/Changes
trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-doc.pdf
trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-example.inp
trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-example.tex
trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty
Modified: trunk/Master/texmf-dist/doc/latex/xltabular/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xltabular/Changes 2024-11-13 21:12:42 UTC (rev 72845)
+++ trunk/Master/texmf-dist/doc/latex/xltabular/Changes 2024-11-13 21:12:54 UTC (rev 72846)
@@ -1,3 +1,4 @@
+2.0h 2024/11/13 - Simplifying the code, taking into account the current longtable version
2.0g 2024/10/28 - prevent problematic behavior of longtable at page breaks
2.0e 2020/11/04 - insert a \par at the beginning of xltabular
2.0c 2020/03/20 - restore of original longtable more robust
Modified: trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-example.inp
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-example.inp 2024-11-13 21:12:42 UTC (rev 72845)
+++ trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-example.inp 2024-11-13 21:12:54 UTC (rev 72846)
@@ -1,6 +1,6 @@
\newcommand*\showCounterTable{%
- \noindent The Counter \textbf{table:~\arabic{table}}%
+ \noindent The Counter \textbf{table:~\arabic{table}}\par
}
\begin{document}
@@ -41,6 +41,28 @@
\end{xltabular}
\showCounterTable
+\section{Section 4 of Chapter 1}
+
+\showCounterTable
+\begin{xltabular}[r]{.7\linewidth}{|c|X|X|}
+\caption*{A table with a star caption\label{tab:BB}} \\
+\hline
+1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
+4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
+\hline
+\end{xltabular}
+\showCounterTable
+
+\showCounterTable
+\begin{xltabular}[r]{.7\linewidth}{|c|X|X|}
+\caption{A table with a normal caption\label{tab:BBB}} \\
+\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}
@@ -66,8 +88,23 @@
\end{xltabular}
\showCounterTable
-\section{Section 3 of Chapter 2 -- some references}
+\section{Section 3 of Chapter 2}
+
+\showCounterTable
+\begin{xltabular}[c]{.7\linewidth}{|c|X|X|}
+\caption{A table with a caption\label{tab:DD}} \\
+\hline
+ & \begin{enumerate}\item foo \item bar \end{enumerate} & \\
+1 & \hrulefill 2 \hrulefill & \hrulefill 3 \hrulefill \\
+4 & \hrulefill 5 \hrulefill & \hrulefill 6 \hrulefill \\
+\hline
+\end{xltabular}
+\showCounterTable
+
+
+\section{Section 4 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}
@@ -75,6 +112,16 @@
\item Table~\ref{tab:D} is on page~\pageref{tab:D}
\end{itemize}
+
+\begin{longtable}{c}
+\caption{caption}
+\endfirsthead
+xxx\\xxx
+xxx\\xxx
+\end{longtable}
+
+\listoftables
+
\end{document}
\endinput
Modified: trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-example.tex 2024-11-13 21:12:42 UTC (rev 72845)
+++ trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-example.tex 2024-11-13 21:12:54 UTC (rev 72846)
@@ -5,5 +5,6 @@
\documentclass{scrbook}
\usepackage{caption}
\usepackage{xltabular}
+\usepackage[colorlinks]{hyperref}
\input{xltabular-example.inp}
-%---------------------------
+%---------------------------
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty 2024-11-13 21:12:42 UTC (rev 72845)
+++ trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty 2024-11-13 21:12:54 UTC (rev 72846)
@@ -6,7 +6,7 @@
% Copyright 2018-2024 Herbert Voss <hvoss at tug.org>
% Rolf Niepraschk <Rolf.Niepraschk at gmx.de>
%%
-\ProvidesPackage{xltabular}[2024/10/28 v2.0g `xltabular' package (hv,RN)]
+\ProvidesPackage{xltabular}[2024/11/13 v0.2h `xltabular' package (hv,RN)]
\RequirePackage{tabularx}
\RequirePackage{etoolbox}
\let\XLT at i@tabularx=\tabularx
@@ -57,78 +57,15 @@
\XLT at ii@tabularx}
{\def\@currenvir{tabularx}}
-\def\LT at caption{%
- \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
- }
- \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
- % 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"
-\def\longtable{%
- \ifXLT at HypRef
- % revert to the unpatched version if \caption is not used
- \global\let\LT at start=\XLT at LT@start
- \fi
- \XLT at longtable
-}
+%\def\longtable{%
+% \ifXLT at HypRef
+% % revert to the unpatched version if \caption is not used
+% \global\let\LT at start=\XLT at LT@start
+% \fi
+% \XLT at longtable
+%}
-\newif\ifXLT at HypRef
-\AtBeginDocument{%
- \let\XLT at refstepcounter=\refstepcounter
- \@ifpackageloaded{hyperref}{\XLT at HypReftrue}{\XLT at HypReffalse}%
- \ifXLT at HypRef
- % save the patched version
- \let\XLT at Hy@LT at start=\LT at start
- % revert to the unpatched versions
- \@ifundefined{scr at LT@array}{%
- \@ifundefined{adl at LT@array}{%
- % 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
- \let\adl at LT@array=\XLT at adl@LT at array
- }%
- }{%
- % hyperref has \scr at LT@array patched, not \LT at array
- \let\scr at LT@array=\XLT at scr@LT at array
- }%
- \fi
- \def\LT at array{%
- % 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 at LT@array
- }%
-}
-%
\endinput
%%
%% End of file `xltabular.sty'.
More information about the tex-live-commits
mailing list.