texlive[72712] Master/texmf-dist: xltabular (30oct24)
commits+karl at tug.org
commits+karl at tug.org
Wed Oct 30 21:03:00 CET 2024
Revision: 72712
https://tug.org/svn/texlive?view=revision&revision=72712
Author: karl
Date: 2024-10-30 21:03:00 +0100 (Wed, 30 Oct 2024)
Log Message:
-----------
xltabular (30oct24)
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-doc.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-10-30 20:02:51 UTC (rev 72711)
+++ trunk/Master/texmf-dist/doc/latex/xltabular/Changes 2024-10-30 20:03:00 UTC (rev 72712)
@@ -1,3 +1,4 @@
+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
2.0a 2018/12/16 - better hyperref support; example files
Modified: trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-doc.tex 2024-10-30 20:02:51 UTC (rev 72711)
+++ trunk/Master/texmf-dist/doc/latex/xltabular/xltabular-doc.tex 2024-10-30 20:03:00 UTC (rev 72712)
@@ -1,4 +1,4 @@
-%% $Id: xltabular-doc.tex 598 2017-09-30 19:52:25Z herbert $
+%% $Id: xltabular-doc.tex 635 2017-10-24 18:22:59Z herbert $
%
\listfiles\setcounter{errorcontextlines}{100}
\documentclass[paper=a4,fontsize=11pt,DIV=13,parskip=half-,
@@ -35,6 +35,9 @@
%\nolig{oe}{o|e}
\usepackage{xltabular}
+
+%\specialLTpagebreak
+
\usepackage{fancyvrb}
\usepackage{blindtext}
\usepackage{dtk-logos} % for Wikipedia W
@@ -317,10 +320,122 @@
\end{xltabular}
+\section{Pagebreaks}
+\texttt{xltabular} is based on \texttt{longtable} which itself has sometimes a problem with the pagebreak.
+It may be possible, that you'll get a break between a section header and the following \texttt{longtable}/\texttt{xltabular}.
+Here is an example with \texttt{xltabular}:
+
+\section{Title above the tabular}
+
+\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\\
+ 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}
+
+
+Package \texttt{xltabular} defines two macros which can be used to modify the behaviour of
+\texttt{longtable}/ \texttt{xltabular} for pagebreaks.
+
+\begin{verbatim}
+\newcommand*\normalLTpagebreak{...}
+\newcommand*\specialLTpagebreak{...}
+\end{verbatim}
+
+With \verb|\specialLTpagebreak| one can get another beaviour which prevents such unwanted pagebreak.
+With \verb|\normalLTpagebreak| you can set it back to the default behaviour. Here comes an example
+with the special behaviour by using \verb|\specialLTpagebreak|: \specialLTpagebreak
+
+
+
+\section{Title above the tabular}
+
+\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}
+
+
+
+\pagebreak
+
\nocite{*}
\printbibliography
\end{document}
-
Modified: trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty 2024-10-30 20:02:51 UTC (rev 72711)
+++ trunk/Master/texmf-dist/tex/latex/xltabular/xltabular.sty 2024-10-30 20:03:00 UTC (rev 72712)
@@ -3,11 +3,12 @@
%% License from CTAN archives in directory macros/latex/base/lppl.txt.
%% Either version 1.3 or, at your option, any later version.
%%
-% Copyright 2018-2020 Herbert Voss <hvoss at tug.org>
+% Copyright 2018-2024 Herbert Voss <hvoss at tug.org>
% Rolf Niepraschk <Rolf.Niepraschk at gmx.de>
%%
-\ProvidesPackage{xltabular}[2020/11/04 v0.2e `xltabular' package (hv,RN)]
+\ProvidesPackage{xltabular}[2024/10/28 v2.0g `xltabular' package (hv,RN)]
\RequirePackage{tabularx}
+\RequirePackage{etoolbox}
\let\XLT at i@tabularx=\tabularx
\let\XLT at i@endtabularx=\endtabularx
\let\XLT at i@TX at endtabularx=\TX at endtabularx
@@ -15,9 +16,16 @@
\RequirePackage{ltablex}
\keepXColumns% xltabular behaves like tabularx
%
+\newif\ifXLT at normalPB \XLT at normalPBtrue
+\newcommand*\normalLTpagebreak{\global\XLT at normalPBtrue}
+\newcommand*\specialLTpagebreak{\global\XLT at normalPBfalse}
+%
\let\XLT at ii@tabularx=\tabularx
\let\XLT at ii@TX at endtabularx=\TX at endtabularx
\let\XLT at longtable=\longtable
+% prevents problematic behavior of longtable at page breaks (\XLT at normalPBfalse)
+\patchcmd{\LT at start}{\vfil \break}{\ifXLT at normalPB \vfil \break \fi}{}{}
+\patchcmd{\LT at start}{\penalty \z@}{\ifXLT at normalPB \penalty \z@ \fi}{}{}
\let\XLT at LT@start=\LT at start
\let\XLT at LT@array=\LT at array
\@ifundefined{scr at LT@array}{%
@@ -32,7 +40,7 @@
{\let\TX at endtabularx=\XLT at i@TX at endtabularx\XLT at i@tabularx}
{\XLT at i@endtabularx}
%
-% define a new tabularx like the one from "ltablex"
+% define a new tabularx like the one from "ltablex"
%
\newenvironment{xltabular}[1][x]%
{%
@@ -76,7 +84,7 @@
\hyper at makecurrent{\LTcaptype}%
\global\let\Hy at LT@currentHref\@currentHref
\fi
- % continue with the original definition of \LT at caption
+ % continue with the original definition of \LT at caption
\@ifnextchar[{\egroup\LT at c@ption\@firstofone}\LT at capti@n
}
@@ -113,10 +121,10 @@
\fi
\def\LT at array{%
% make the call of \refstepcounter inside of \XLT at LT@array ineffective
- \renewcommand*\refstepcounter[2][]{%
+% \renewcommand*\refstepcounter[2][]{%
% make next calls effective again
- \let\refstepcounter=\XLT at refstepcounter
- }%
+% \let\refstepcounter=\XLT at refstepcounter
+% }%
\XLT at LT@array
}%
}
More information about the tex-live-commits
mailing list.