| 1 |
%% |
| 2 |
%% This is file `longtable.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% longtable.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% The source is maintained by the LaTeX Project team and bug |
| 12 |
%% reports for it can be opened at https://latex-project.org/bugs/ |
| 13 |
%% (but please observe conditions on bug reports sent to that address!) |
| 14 |
%% |
| 15 |
%% Copyright (C) 1993-2026 |
| 16 |
%% The LaTeX Project and any individual authors listed elsewhere |
| 17 |
%% in this file. |
| 18 |
%% |
| 19 |
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. |
| 20 |
%% -------------------------------------------------------------------------- |
| 21 |
%% |
| 22 |
%% It may be distributed and/or modified under the |
| 23 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 24 |
%% of this license or (at your option) any later version. |
| 25 |
%% The latest version of this license is in |
| 26 |
%% https://www.latex-project.org/lppl.txt |
| 27 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 28 |
%% version 2005/12/01 or later. |
| 29 |
%% |
| 30 |
%% This file may only be distributed together with a copy of the LaTeX |
| 31 |
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' |
| 32 |
%% without such generated files. |
| 33 |
%% |
| 34 |
%% The list of all files belonging to the LaTeX `Tools Bundle' is |
| 35 |
%% given in the file `manifest.txt'. |
| 36 |
%% |
| 37 |
%% File: longtable.dtx Copyright (C) 1990-2020 David Carlisle |
| 38 |
\NeedsTeXFormat{LaTeX2e}[1995/06/01] |
| 39 |
|
| 40 |
\DeclareRelease{}{1994-06-01}{longtable-2020-01-07.sty} |
| 41 |
|
| 42 |
\DeclareRelease{v4.13}{2020-01-02}{longtable-2020-01-07.sty} |
| 43 |
\DeclareCurrentRelease{}{2020-02-07} |
| 44 |
|
| 45 |
\ProvidesPackage{longtable} |
| 46 |
[2026-01-28 v4.27 Multi-page Table package (DPC)] |
| 47 |
\def\LT@err{\PackageError{longtable}} |
| 48 |
\def\LT@warn{\PackageWarning{longtable}} |
| 49 |
\def\LT@final@warn{% |
| 50 |
\AtEndDocument{% |
| 51 |
\LT@warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}% |
| 52 |
\global\let\LT@final@warn\relax} |
| 53 |
\DeclareOption{errorshow}{% |
| 54 |
\def\LT@warn{\PackageInfo{longtable}}} |
| 55 |
\DeclareOption{pausing}{% |
| 56 |
\def\LT@warn#1{% |
| 57 |
\LT@err{#1}{This is not really an error}}} |
| 58 |
\DeclareOption{set}{} |
| 59 |
\DeclareOption{final}{} |
| 60 |
\ProcessOptions |
| 61 |
\newskip\LTleft \LTleft=\fill |
| 62 |
\newskip\LTright \LTright=\fill |
| 63 |
\newskip\LTpre \LTpre=\bigskipamount |
| 64 |
\newskip\LTpost \LTpost=\bigskipamount |
| 65 |
\newcount\LTchunksize \LTchunksize=200 |
| 66 |
\let\c@LTchunksize\LTchunksize |
| 67 |
\newdimen\LTcapwidth \LTcapwidth=4in |
| 68 |
\providecommand\LTcaptype{table} |
| 69 |
\newbox\LT@head |
| 70 |
\newbox\LT@firsthead |
| 71 |
\newbox\LT@foot |
| 72 |
\newbox\LT@lastfoot |
| 73 |
\newbox\LT@gbox |
| 74 |
\newcount\LT@cols |
| 75 |
\newcount\LT@rows |
| 76 |
\newcounter{LT@tables} |
| 77 |
\providecommand\theHLT@tables{\theLT@tables} |
| 78 |
\newcounter{LT@chunks}[LT@tables] |
| 79 |
\ifx\c@table\undefined |
| 80 |
\newcounter{table} |
| 81 |
\def\fnum@table{\tablename~\thetable} |
| 82 |
\fi |
| 83 |
\ifx\tablename\undefined |
| 84 |
\def\tablename{Table} |
| 85 |
\fi |
| 86 |
\ifx\ext@table\undefined |
| 87 |
\def\ext@table{lot} |
| 88 |
\fi |
| 89 |
\newtoks\LT@p@ftn |
| 90 |
\mathchardef\LT@end@pen=30000 |
| 91 |
\def\longtable{% |
| 92 |
\par |
| 93 |
\if@noskipsec\mbox{}\par\fi |
| 94 |
\@nobreakfalse |
| 95 |
\ifx\multicols\@undefined |
| 96 |
\else |
| 97 |
\ifnum\col@number>\@ne |
| 98 |
\@twocolumntrue |
| 99 |
\fi |
| 100 |
\fi |
| 101 |
\if@twocolumn |
| 102 |
\LT@err{longtable not in 1-column mode}\@ehc |
| 103 |
\fi |
| 104 |
\UseTaggingSocket{tbl/vmode/begin}% |
| 105 |
\begingroup |
| 106 |
\@ifnextchar[\LT@array{\LT@array[x]}} |
| 107 |
\ExplSyntaxOn |
| 108 |
\def\LT@array[#1]#2{% |
| 109 |
\UseTaggingSocket{tbl/init} |
| 110 |
\tl_if_empty:eTF { \LTcaptype } |
| 111 |
{ |
| 112 |
\tl_gset:Ne \@currentHref {LT@tables.\theHLT@tables} |
| 113 |
} |
| 114 |
{ |
| 115 |
\@kernel@refstepcounter{\LTcaptype}\stepcounter{LT@tables} |
| 116 |
\tl_gset:Ne \@currentHref {\LTcaptype.\cs_if_exist_use:c {theH\LTcaptype}} |
| 117 |
} |
| 118 |
\tbl_gzero_row_count: |
| 119 |
\UseTaggingSocket{tbl/longtable/init} |
| 120 |
\if l#1% |
| 121 |
\LTleft\z@ \LTright\fill |
| 122 |
\else\if r#1% |
| 123 |
\LTleft\fill \LTright\z@ |
| 124 |
\else\if c#1% |
| 125 |
\LTleft\fill \LTright\fill |
| 126 |
\fi\fi\fi |
| 127 |
\let\LT@mcol\multicolumn |
| 128 |
\let\LT@@tabarray\@tabarray |
| 129 |
\let\LT@@hl\hline |
| 130 |
\def\@tabarray{% |
| 131 |
\let\hline\LT@@hl |
| 132 |
\LT@@tabarray}% |
| 133 |
\let\\\LT@tabularcr |
| 134 |
\let\tabularnewline\\% |
| 135 |
\def\newpage{\noalign{\break}}% |
| 136 |
\def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}% |
| 137 |
\def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}% |
| 138 |
\let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption |
| 139 |
\@tempdima\ht\strutbox |
| 140 |
\let\@endpbox\LT@endpbox |
| 141 |
\ifx\extrarowheight\@undefined |
| 142 |
\let\@acol\@tabacol |
| 143 |
\let\@classz\@tabclassz \let\@classiv\@tabclassiv |
| 144 |
\def\@startpbox{\vtop\LT@startpbox}% |
| 145 |
\let\@@startpbox\@startpbox |
| 146 |
\let\@@endpbox\@endpbox |
| 147 |
\let\LT@LL@FM@cr\@tabularcr |
| 148 |
\else |
| 149 |
\advance\@tempdima\extrarowheight |
| 150 |
\col@sep\tabcolsep |
| 151 |
\let\@startpbox@action\LT@startpbox |
| 152 |
\let\LT@LL@FM@cr\@arraycr |
| 153 |
\fi |
| 154 |
\setbox\@arstrutbox\hbox{\vrule |
| 155 |
\@height \arraystretch \@tempdima |
| 156 |
\@depth \arraystretch \dp \strutbox |
| 157 |
\@width \z@}% |
| 158 |
\let\@sharp##\let\protect\relax |
| 159 |
\begingroup |
| 160 |
\@mkpream{#2}% |
| 161 |
\tbl_count_table_cols: |
| 162 |
\xdef\LT@bchunk{% |
| 163 |
\tbl_inbetween_rows: |
| 164 |
\global\advance\c@LT@chunks\@ne |
| 165 |
\global\LT@rows\z@\setbox\z@\vbox\bgroup |
| 166 |
\LT@setprevdepth |
| 167 |
\tabskip\LTleft \noexpand\halign to\hsize\bgroup |
| 168 |
\tabskip\z@ \@arstrut |
| 169 |
\UseTaggingSocket{tbl/row/begin}% |
| 170 |
\ArrayLoadedT { \__tbl_hook_use_protected:nV {tbl/row/begin} \g__tbl_row_int } |
| 171 |
\tbl_init_cell_data_for_row: |
| 172 |
\@preamble \tabskip\LTright \cr}% |
| 173 |
\endgroup |
| 174 |
\expandafter\LT@nofcols\LT@bchunk&\LT@nofcols |
| 175 |
\ArrayLoadedT { |
| 176 |
\exp_args:Nnno \hook_use:nnw {tbl/init} {2} |
| 177 |
\g__tbl_table_cols_tl {#2} |
| 178 |
} |
| 179 |
\LT@make@row |
| 180 |
\mathsurround \z@\let\par\@empty |
| 181 |
\everycr{% |
| 182 |
\noalign{% |
| 183 |
\__tbl_trace:n {--longtable-->~chunk~row:~ \the\LT@rows \space |
| 184 |
row:~ \the\g__tbl_row_int \space |
| 185 |
column:~ \the\g__tbl_col_int |
| 186 |
} |
| 187 |
\tbl_if_row_was_started:T |
| 188 |
{ |
| 189 |
\ArrayLoadedT |
| 190 |
{ \__tbl_hook_use_protected:nV {tbl/row/end} |
| 191 |
\g__tbl_row_int } |
| 192 |
\UseTaggingSocket{tbl/row/end} |
| 193 |
\tbl_inbetween_rows: |
| 194 |
} |
| 195 |
\int_compare:nNnT \LT@rows < \LTchunksize |
| 196 |
{ \tbl_gincr_row_count: % next is row about to start |
| 197 |
\ArrayLoadedT |
| 198 |
{ |
| 199 |
\cs_set_eq:NN \noalign \prg_do_nothing: |
| 200 |
\__tbl_hook_use_protected:nV {tbl/row/init} \g__tbl_row_int |
| 201 |
} |
| 202 |
} |
| 203 |
}% |
| 204 |
}% |
| 205 |
\lineskip\z@\baselineskip\z@ |
| 206 |
\LT@bchunk} |
| 207 |
\ExplSyntaxOff |
| 208 |
\def\LT@no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}} |
| 209 |
\ExplSyntaxOn |
| 210 |
\def\LT@start{% |
| 211 |
\let\LT@start\endgraf |
| 212 |
\endgraf\penalty\z@\vskip\LTpre\endgraf |
| 213 |
\ifdim \pagetotal<\pagegoal \else |
| 214 |
\dimen@=\pageshrink |
| 215 |
\advance \dimen@ 1sp % |
| 216 |
\kern\dimen@\penalty 9999\endgraf \kern-\dimen@ |
| 217 |
\fi |
| 218 |
\dimen@\pagetotal |
| 219 |
\advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi |
| 220 |
\advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi |
| 221 |
\advance\dimen@ \ht\LT@foot |
| 222 |
\edef\LT@reset@vfuzz{\vfuzz\the\vfuzz\vbadness\the\vbadness\relax}% |
| 223 |
\vfuzz\maxdimen |
| 224 |
\vbadness\@M |
| 225 |
\setbox\tw@\copy\z@ |
| 226 |
\setbox\tw@\vsplit\tw@ to \ht\@arstrutbox |
| 227 |
\setbox\tw@\vbox{\unvbox\tw@}% |
| 228 |
\LT@reset@vfuzz |
| 229 |
\advance\dimen@ \ht |
| 230 |
\ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi |
| 231 |
\advance\dimen@\dp |
| 232 |
\ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi |
| 233 |
\advance\dimen@ -\pagegoal |
| 234 |
\ifdim \dimen@>\z@ |
| 235 |
\vfil\break |
| 236 |
\else |
| 237 |
\ifdim\pageshrink>\z@\pageshrink\z@\fi |
| 238 |
\fi |
| 239 |
\global\@colroom\@colht |
| 240 |
\ifvoid\LT@foot\else |
| 241 |
\global\advance\vsize-\ht\LT@foot |
| 242 |
\global\advance\@colroom-\ht\LT@foot |
| 243 |
\dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@ |
| 244 |
\maxdepth\z@ |
| 245 |
\fi |
| 246 |
\tl_if_empty:eTF{\LTcaptype} |
| 247 |
{ |
| 248 |
\MakeLinkTarget{LT@tables} |
| 249 |
} |
| 250 |
{ |
| 251 |
\MakeLinkTarget{\LTcaptype} |
| 252 |
} |
| 253 |
\ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak |
| 254 |
\UseTaggingSocket{tbl/longtable/head} |
| 255 |
\output{\LT@output}} |
| 256 |
\ExplSyntaxOff |
| 257 |
\ExplSyntaxOn |
| 258 |
\def\endlongtable{% |
| 259 |
\tbl_crcr:n {endlongtable} |
| 260 |
\noalign{% |
| 261 |
\UseTaggingSocket{tbl/longtable/finalize} |
| 262 |
\let\LT@entry\LT@entry@chop |
| 263 |
\xdef\LT@save@row{\LT@save@row}}% |
| 264 |
\LT@echunk |
| 265 |
\LT@start |
| 266 |
\unvbox\z@ |
| 267 |
\LT@get@widths |
| 268 |
\if@filesw |
| 269 |
{\let\LT@entry\LT@entry@write\immediate\write\@auxout{% |
| 270 |
\gdef\expandafter\noexpand |
| 271 |
\csname LT@\romannumeral\c@LT@tables\endcsname |
| 272 |
{\LT@save@row}}}% |
| 273 |
\fi |
| 274 |
\ifx\LT@save@row\LT@@save@row |
| 275 |
\else |
| 276 |
\LT@warn{Column~ widths~ have~ changed\MessageBreak |
| 277 |
in~ |
| 278 |
\tl_if_empty:eTF{\LTcaptype} |
| 279 |
{longtable~ \theLT@tables} |
| 280 |
{\LTcaptype\c_space_tl\use:c{the\LTcaptype}} |
| 281 |
} |
| 282 |
\LT@final@warn |
| 283 |
\fi |
| 284 |
\endgraf\penalty -\LT@end@pen |
| 285 |
\ifvoid\LT@foot\else |
| 286 |
\global\advance\vsize\ht\LT@foot |
| 287 |
\global\advance\@colroom\ht\LT@foot |
| 288 |
\ifdim\pagegoal<\maxdimen |
| 289 |
\dimen@\pagegoal\advance\dimen@\ht\LT@foot\pagegoal\dimen@ |
| 290 |
\fi |
| 291 |
\fi |
| 292 |
\endgroup |
| 293 |
\global\@mparbottom\z@ |
| 294 |
\endgraf\penalty\z@\addvspace\LTpost |
| 295 |
\ifvoid\footins\else\insert\footins{}\fi |
| 296 |
\UseTaggingSocket{tbl/vmode/end}% |
| 297 |
} |
| 298 |
\ExplSyntaxOff |
| 299 |
\def\LT@nofcols#1&{% |
| 300 |
\futurelet\@let@token\LT@n@fcols} |
| 301 |
\def\LT@n@fcols{% |
| 302 |
\advance\LT@cols\@ne |
| 303 |
\ifx\@let@token\LT@nofcols |
| 304 |
\expandafter\@gobble |
| 305 |
\else |
| 306 |
\expandafter\LT@nofcols |
| 307 |
\fi} |
| 308 |
\protected\def\LT@tabularcr{% |
| 309 |
\relax\iffalse{\fi\ifnum0=`}\fi |
| 310 |
\@ifstar |
| 311 |
{\def\crcr{\LT@crcr\noalign{\nobreak}}\let\cr\crcr |
| 312 |
\LT@t@bularcr}% |
| 313 |
{\LT@t@bularcr}} |
| 314 |
\let\LT@crcr\crcr |
| 315 |
\let\LT@setprevdepth\relax |
| 316 |
\ExplSyntaxOn |
| 317 |
\def\LT@t@bularcr{% |
| 318 |
\global\advance\LT@rows\@ne |
| 319 |
\ifnum\LT@rows=\LTchunksize |
| 320 |
\tbl_count_missing_cells:n {echunk} |
| 321 |
\gdef\LT@setprevdepth{% |
| 322 |
\prevdepth\z@ |
| 323 |
\global\let\LT@setprevdepth\relax}% |
| 324 |
\expandafter\LT@xtabularcr |
| 325 |
\else |
| 326 |
\ifnum0=`{}\fi |
| 327 |
\expandafter\LT@LL@FM@cr |
| 328 |
\fi} |
| 329 |
\ExplSyntaxOff |
| 330 |
\def\LT@xtabularcr{% |
| 331 |
\@ifnextchar[\LT@argtabularcr\LT@ntabularcr} |
| 332 |
\def\LT@ntabularcr{% |
| 333 |
\ifnum0=`{}\fi |
| 334 |
\LT@echunk |
| 335 |
\LT@start |
| 336 |
\unvbox\z@ |
| 337 |
\LT@get@widths |
| 338 |
\LT@bchunk} |
| 339 |
\def\LT@argtabularcr[#1]{% |
| 340 |
\ifnum0=`{}\fi |
| 341 |
\ifdim #1>\z@ |
| 342 |
\unskip\@xargarraycr{#1}% |
| 343 |
\else |
| 344 |
\@yargarraycr{#1}% |
| 345 |
\fi |
| 346 |
\LT@echunk |
| 347 |
\LT@start |
| 348 |
\unvbox\z@ |
| 349 |
\LT@get@widths |
| 350 |
\LT@bchunk} |
| 351 |
\def\LT@echunk{% |
| 352 |
\crcr\LT@save@row\cr\egroup |
| 353 |
\global\setbox\LT@gbox\lastbox |
| 354 |
\unskip |
| 355 |
\egroup} |
| 356 |
\def\LT@entry#1#2{% |
| 357 |
\ifhmode\@firstofone{&}\fi\omit |
| 358 |
\ifnum#1=\c@LT@chunks |
| 359 |
\else |
| 360 |
\kern#2\relax |
| 361 |
\fi} |
| 362 |
\def\LT@entry@chop#1#2{% |
| 363 |
\noexpand\LT@entry |
| 364 |
{\ifnum#1>\c@LT@chunks |
| 365 |
1}{0pt% |
| 366 |
\else |
| 367 |
#1}{#2% |
| 368 |
\fi}} |
| 369 |
\def\LT@entry@write{% |
| 370 |
\noexpand\LT@entry^^J% |
| 371 |
\@spaces} |
| 372 |
\def\LT@kill{% |
| 373 |
\LT@echunk |
| 374 |
\LT@get@widths |
| 375 |
\expandafter\LT@rebox\LT@bchunk} |
| 376 |
\def\LT@rebox#1\bgroup{% |
| 377 |
#1\bgroup |
| 378 |
\unvbox\z@ |
| 379 |
\unskip |
| 380 |
\setbox\z@\lastbox} |
| 381 |
\def\LT@blank@row{% |
| 382 |
\xdef\LT@save@row{\expandafter\LT@build@blank |
| 383 |
\romannumeral\number\LT@cols 001 }} |
| 384 |
\def\LT@build@blank#1{% |
| 385 |
\if#1m% |
| 386 |
\noexpand\LT@entry{1}{0pt}% |
| 387 |
\expandafter\LT@build@blank |
| 388 |
\fi} |
| 389 |
\def\LT@make@row{% |
| 390 |
\global\expandafter\let\expandafter\LT@save@row |
| 391 |
\csname LT@\romannumeral\c@LT@tables\endcsname |
| 392 |
\ifx\LT@save@row\relax |
| 393 |
\LT@blank@row |
| 394 |
\else |
| 395 |
{\let\LT@entry\or |
| 396 |
\if!% |
| 397 |
\ifcase\expandafter\expandafter\expandafter\LT@cols |
| 398 |
\expandafter\@gobble\LT@save@row |
| 399 |
\or |
| 400 |
\else |
| 401 |
\relax |
| 402 |
\fi |
| 403 |
!% |
| 404 |
\else |
| 405 |
\aftergroup\LT@blank@row |
| 406 |
\fi}% |
| 407 |
\fi} |
| 408 |
\let\setlongtables\relax |
| 409 |
\def\LT@get@widths{% |
| 410 |
\setbox\tw@\hbox{% |
| 411 |
\unhbox\LT@gbox |
| 412 |
\let\LT@old@row\LT@save@row |
| 413 |
\global\let\LT@save@row\@empty |
| 414 |
\count@\LT@cols |
| 415 |
\loop |
| 416 |
\unskip |
| 417 |
\setbox\tw@\lastbox |
| 418 |
\ifhbox\tw@ |
| 419 |
\LT@def@row |
| 420 |
\advance\count@\m@ne |
| 421 |
\repeat}% |
| 422 |
\ifx\LT@@save@row\@undefined |
| 423 |
\let\LT@@save@row\LT@save@row |
| 424 |
\fi} |
| 425 |
\def\LT@def@row{% |
| 426 |
\let\LT@entry\or |
| 427 |
\edef\@tempa{% |
| 428 |
\ifcase\expandafter\count@\LT@old@row |
| 429 |
\else |
| 430 |
{1}{0pt}% |
| 431 |
\fi}% |
| 432 |
\let\LT@entry\relax |
| 433 |
\xdef\LT@save@row{% |
| 434 |
\LT@entry |
| 435 |
\expandafter\LT@max@sel\@tempa |
| 436 |
\LT@save@row}} |
| 437 |
\def\LT@max@sel#1#2{% |
| 438 |
{\ifdim#2=\wd\tw@ |
| 439 |
#1% |
| 440 |
\else |
| 441 |
\number\c@LT@chunks |
| 442 |
\fi}% |
| 443 |
{\the\wd\tw@}} |
| 444 |
\def\LT@hline{% |
| 445 |
\noalign{\ifnum0=`}\fi |
| 446 |
\penalty\@M |
| 447 |
\futurelet\@let@token\LT@@hline} |
| 448 |
\ExplSyntaxOn |
| 449 |
\def\LT@@hline{% |
| 450 |
\ifx\@let@token\hline |
| 451 |
\global\let\@gtempa\@gobble |
| 452 |
\gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}% |
| 453 |
\else |
| 454 |
\global\let\@gtempa\@empty |
| 455 |
\gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}% |
| 456 |
\fi |
| 457 |
\ifnum0=`{\fi}% |
| 458 |
\multispan\LT@cols |
| 459 |
\unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr |
| 460 |
\noalign{ |
| 461 |
\tbl_gdecr_row_count: |
| 462 |
\LT@sep} |
| 463 |
\multispan\LT@cols |
| 464 |
\unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr |
| 465 |
\noalign{ |
| 466 |
\tbl_gdecr_row_count: |
| 467 |
\penalty\@M} |
| 468 |
\@gtempa} |
| 469 |
\def\LT@caption{% |
| 470 |
\noalign\bgroup |
| 471 |
\@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n} |
| 472 |
\def\LT@c@ption#1[#2]#3{ |
| 473 |
\tl_if_empty:eTF{\LTcaptype} |
| 474 |
{\LT@makecaption\@gobble{}{#3}} |
| 475 |
{\LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3} |
| 476 |
\def\@tempa{#2} |
| 477 |
\ifx\@tempa\@empty\else |
| 478 |
{\let\\\space |
| 479 |
\addcontentsline |
| 480 |
{\@nameuse{ext@\LTcaptype}} |
| 481 |
{\LTcaptype} |
| 482 |
{\protect\numberline{\@nameuse{the\LTcaptype}}{#2}}} |
| 483 |
\fi}} |
| 484 |
\ExplSyntaxOff |
| 485 |
\def\LT@capti@n{% |
| 486 |
\@ifstar |
| 487 |
{\egroup\LT@c@ption\@gobble[]}% |
| 488 |
{\egroup\@xdblarg{\LT@c@ption\@firstofone}}} |
| 489 |
\def\LT@makecaption#1#2#3{% |
| 490 |
\LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% |
| 491 |
\reset@font |
| 492 |
\sbox\@tempboxa{#1{#2: }#3}% |
| 493 |
\ifdim\wd\@tempboxa>\hsize |
| 494 |
#1{#2: }#3% |
| 495 |
\else |
| 496 |
\hbox to\hsize{\hfil\box\@tempboxa\hfil}% |
| 497 |
\fi |
| 498 |
\endgraf\vskip\baselineskip}% |
| 499 |
\hss}}} |
| 500 |
\ExplSyntaxOn |
| 501 |
\def\LT@output{% |
| 502 |
\ifnum\outputpenalty <-\@Mi |
| 503 |
\ifnum\outputpenalty > -\LT@end@pen |
| 504 |
\LT@err{floats~ and~ marginpars~ not~ allowed~ in~ a~ longtable}\@ehc |
| 505 |
\else |
| 506 |
\setbox\z@\vbox{\unvbox\@cclv}% |
| 507 |
\ifdim \ht\LT@lastfoot>\ht\LT@foot |
| 508 |
\dimen@\pagegoal |
| 509 |
\advance\dimen@\ht\LT@foot |
| 510 |
\advance\dimen@-\ht\LT@lastfoot |
| 511 |
\ifdim\dimen@<\ht\z@ |
| 512 |
\setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vskip\z@\@plus1fil\@minus\normalbaselineskip}% |
| 513 |
\@makecol |
| 514 |
\@expl@@@mark@update@singlecol@structures@@ |
| 515 |
\@outputpage |
| 516 |
\global\vsize\@colroom |
| 517 |
\setbox\z@\vbox{\box\LT@head}% |
| 518 |
\fi |
| 519 |
\fi |
| 520 |
\unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi |
| 521 |
\UseTaggingSocket{tbl/longtable/foot} |
| 522 |
\fi |
| 523 |
\else |
| 524 |
\setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vskip\z@\@plus1fil\@minus\normalbaselineskip}% |
| 525 |
\UseTaggingSocket{tbl/longtable/foot} |
| 526 |
\@makecol |
| 527 |
\@expl@@@mark@update@singlecol@structures@@ |
| 528 |
\@outputpage |
| 529 |
\global\vsize\@colroom |
| 530 |
\copy\LT@head\nobreak |
| 531 |
\fi} |
| 532 |
\ExplSyntaxOff |
| 533 |
\ExplSyntaxOn |
| 534 |
\def\LT@end@hd@ft#1{% |
| 535 |
\tbl_if_row_was_started:TF |
| 536 |
{ |
| 537 |
\tbl_count_missing_cells:n {head/foot} |
| 538 |
\int_step_inline:nn |
| 539 |
{ \LT@rows + 1 } |
| 540 |
{ |
| 541 |
\seq_gput_left:ce |
| 542 |
{g__tbl_\cs_to_str:N #1 _rows_seq } |
| 543 |
{ \int_eval:n {\g__tbl_row_int + 1 - ##1 } } |
| 544 |
} |
| 545 |
\int_gset:Nn \LT@rows { \LTchunksize } |
| 546 |
} |
| 547 |
|
| 548 |
{ |
| 549 |
\crcr |
| 550 |
\noalign{ |
| 551 |
\int_step_inline:nn |
| 552 |
{ \LT@rows } |
| 553 |
{ |
| 554 |
\seq_gput_left:ce |
| 555 |
{g__tbl_\cs_to_str:N #1 _rows_seq } |
| 556 |
{ \int_eval:n {\g__tbl_row_int - ##1 } } |
| 557 |
} |
| 558 |
\tbl_gdecr_row_count: % undo the increment |
| 559 |
\int_gset:Nn \LT@rows { \LTchunksize } |
| 560 |
} |
| 561 |
} |
| 562 |
\LT@echunk |
| 563 |
\ifx\LT@start\endgraf |
| 564 |
\LT@err |
| 565 |
{Longtable~ head~ or~ foot~ not~ at~ start~ of~ table}% |
| 566 |
{Increase~ LTchunksize}% |
| 567 |
\fi |
| 568 |
\setbox#1\box\z@ |
| 569 |
\__tbl_trace:n {-->>~ Saving~\noexpand#1} |
| 570 |
\LT@get@widths |
| 571 |
\LT@bchunk} |
| 572 |
\ExplSyntaxOff |
| 573 |
\def\endfirsthead{\LT@end@hd@ft\LT@firsthead} |
| 574 |
\def\endhead{\LT@end@hd@ft\LT@head} |
| 575 |
\def\endfoot{\LT@end@hd@ft\LT@foot} |
| 576 |
\def\endlastfoot{\LT@end@hd@ft\LT@lastfoot} |
| 577 |
\def\LT@startpbox#1{% |
| 578 |
\bgroup |
| 579 |
\color@begingroup |
| 580 |
\let\@footnotetext\LT@p@ftntext |
| 581 |
\setlength\hsize{#1}% |
| 582 |
\@arrayparboxrestore |
| 583 |
\everypar{% |
| 584 |
\vrule \@height \ht\@arstrutbox \@width \z@ |
| 585 |
\everypar{}}% |
| 586 |
} |
| 587 |
\def\LT@endpbox{% |
| 588 |
\@finalstrut\@arstrutbox |
| 589 |
\color@endgroup |
| 590 |
\egroup |
| 591 |
\the\LT@p@ftn |
| 592 |
\global\LT@p@ftn{}% |
| 593 |
\hfil} |
| 594 |
\long\def\LT@p@ftntext#1{% |
| 595 |
\edef\@tempa{\the\LT@p@ftn\noexpand\footnotetext[\the\c@footnote]}% |
| 596 |
\global\LT@p@ftn\expandafter{\@tempa{#1}}}% |
| 597 |
\let \ArrayLoadedT \@gobble |
| 598 |
\AddToHook{package/array/after}{\let \ArrayLoadedT \@firstofone} |
| 599 |
\ExplSyntaxOn |
| 600 |
\seq_new:N \g__tbl_LT@firsthead_rows_seq |
| 601 |
\seq_new:N \g__tbl_LT@head_rows_seq |
| 602 |
\seq_new:N \g__tbl_LT@lastfoot_rows_seq |
| 603 |
\seq_new:N \g__tbl_LT@foot_rows_seq |
| 604 |
\ExplSyntaxOff |
| 605 |
\endinput |
| 606 |
%% |
| 607 |
%% End of file `longtable.sty'. |