1 %% This is file `longtable-patched.sty'.
3 %% It is the file `longtable.sty' (from the Standard LaTeX `Tools Bundle')
6 %% http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=tools/3512
8 %% to fix a serious layout issue with floats. This is a legal modification
9 %% based on the LPPL license since the file name has been changed.
11 %% The original source code file `longtable.dtx' can be found at
13 %% http://ctan.org/pkg/longtable
16 %% For reference, here the original copyright notice.
18 %% This is file `longtable.sty',
19 %% generated with the docstrip utility.
22 %% The original source files were:
24 %% longtable.dtx (with options: `package')
26 %% This is a generated file.
28 %% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005
30 %% The LaTeX3 Project and any individual authors listed elsewhere
33 %% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
34 %% --------------------------------------------------------------------------
36 %% It may be distributed and/or modified under the
37 %% conditions of the LaTeX Project Public License, either version 1.3c
38 %% of this license or (at your option) any later version.
39 %% The latest version of this license is in
40 %% http://www.latex-project.org/lppl.txt
41 %% and version 1.3c or later is part of all distributions of LaTeX
42 %% version 2005/12/01 or later.
44 %% This file may only be distributed together with a copy of the LaTeX
45 %% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
46 %% without such generated files.
48 %% The list of all files belonging to the LaTeX `Tools Bundle' is
49 %% given in the file `manifest.txt'.
51 %% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle
52 \NeedsTeXFormat{LaTeX2e
}[1995/
06/
01]
53 \ProvidesPackage{longtable-patched
}
54 [2014/
01/
29 v4.11-patched Multi-page Table package (DPC)
]
55 \def\LT@err
{\PackageError{longtable-patched
}}
56 \def\LT@warn
{\PackageWarning{longtable-patched
}}
59 \LT@warn
{Table \@width s have changed. Rerun LaTeX.\@gobbletwo
}}%
60 \global\let\LT@final@warn
\relax}
61 \DeclareOption{errorshow
}{%
62 \def\LT@warn
{\PackageInfo{longtable-patched
}}}
63 \DeclareOption{pausing
}{%
65 \LT@err
{#1}{This is not really an error
}}}
67 \DeclareOption{final
}{}
69 \newskip\LTleft \LTleft=
\fill
70 \newskip\LTright \LTright=
\fill
71 \newskip\LTpre \LTpre=
\bigskipamount
72 \newskip\LTpost \LTpost=
\bigskipamount
73 \newcount\LTchunksize \LTchunksize=
20
74 \let\c@LTchunksize
\LTchunksize
75 \newdimen\LTcapwidth \LTcapwidth=
4in
82 \newcounter{LT@tables
}
83 \newcounter{LT@chunks
}[LT@tables
]
84 \ifx\c@table
\undefined
86 \def\fnum@table
{\tablename~
\thetable}
88 \ifx\tablename\undefined
92 \mathchardef\LT@end@pen=
30000
95 \ifx\multicols\@undefined
97 \ifnum\col@number>\@ne
102 \LT@err
{longtable not in
1-column mode
}\@ehc
105 \@ifnextchar
[\LT@array
{\LT@array
[x
]}}
106 \def\LT@array
[#1]#2{%
107 \refstepcounter{table
}\stepcounter{LT@tables
}%
109 \LTleft\z@
\LTright\fill
111 \LTleft\fill \LTright\z@
113 \LTleft\fill \LTright\fill
115 \let\LT@mcol
\multicolumn
116 \let\LT@@tabarray\@tabarray
121 \let\\
\LT@tabularcr
\let\tabularnewline\\%
122 \def\newpage{\noalign{\break}}%
123 \def\pagebreak{\noalign{\ifnum`
}=
0\fi\@testopt
{\LT@no@pgbk-
}4}%
124 \def\nopagebreak{\noalign{\ifnum`
}=
0\fi\@testopt
\LT@no@pgbk4
}%
125 \let\hline\LT@hline
\let\kill\LT@kill
\let\caption\LT@caption
126 \@tempdima
\ht\strutbox
127 \let\@endpbox
\LT@endpbox
128 \ifx\extrarowheight\@undefined
130 \let\@classz\@tabclassz
\let\@classiv\@tabclassiv
131 \def\@startpbox
{\vtop\LT@startpbox
}%
132 \let\@@startpbox\@startpbox
133 \let\@@endpbox\@endpbox
134 \let\LT@LL@FM@cr\@tabularcr
136 \advance\@tempdima
\extrarowheight
138 \let\@startpbox
\LT@startpbox
\let\LT@LL@FM@cr\@arraycr
140 \setbox\@arstrutbox
\hbox{\vrule
141 \@height
\arraystretch \@tempdima
142 \@depth
\arraystretch \dp \strutbox
144 \let\@sharp##
\let\protect\relax
148 \global\advance\c@LT@chunks\@ne
149 \global\LT@rows
\z@
\setbox\z@
\vbox\bgroup
151 \tabskip\LTleft \noexpand\halign to
\hsize\bgroup
152 \tabskip\z@ \@arstrut \@preamble
\tabskip\LTright \cr}%
154 \expandafter\LT@nofcols
\LT@bchunk&
\LT@nofcols
157 \everycr{}\lineskip\z@
\baselineskip\z@
159 \def\LT@no@pgbk
#1[#2]{\penalty #1\@getpen
{#2}\ifnum`
{=
0\fi}}
161 \let\LT@start
\endgraf
162 \endgraf\penalty\z@
\vskip\LTpre
164 \advance\dimen@
\ht\ifvoid\LT@firsthead
\LT@head
\else\LT@firsthead
\fi
165 \advance\dimen@
\dp\ifvoid\LT@firsthead
\LT@head
\else\LT@firsthead
\fi
166 \advance\dimen@
\ht\LT@foot
170 \setbox\tw@
\vsplit\tw@ to
\ht\@arstrutbox
171 \setbox\tw@
\vbox{\unvbox\tw@
}%
174 \ifdim\ht\@arstrutbox>
\ht\tw@\@arstrutbox
\else\tw@
\fi
176 \ifdim\dp\@arstrutbox>
\dp\tw@\@arstrutbox
\else\tw@
\fi
177 \advance\dimen@ -
\pagegoal
178 \ifdim \dimen@>
\z@
\vfil\break\fi
179 \global\@colroom\@colht
181 \global\advance\vsize-
\ht\LT@foot
182 \global\advance\@colroom-
\ht\LT@foot
183 \dimen@
\pagegoal\advance\dimen@-
\ht\LT@foot
\pagegoal\dimen@
186 \ifvoid\LT@firsthead
\copy\LT@head
\else\box\LT@firsthead
\fi\nobreak
191 \let\LT@entry
\LT@entry@chop
192 \xdef\LT@save@row
{\LT@save@row
}}%
198 {\let\LT@entry
\LT@entry@write
\immediate\write\@auxout
{%
199 \gdef\expandafter\noexpand
200 \csname LT@
\romannumeral\c@LT@tables
\endcsname
203 \ifx\LT@save@row
\LT@@save@row
205 \LT@warn
{Column \@width s have changed
\MessageBreak
209 \endgraf\penalty -
\LT@end@pen
211 \global\advance\vsize\ht\LT@foot
212 \global\advance\@colroom
\ht\LT@foot
213 \dimen@
\pagegoal\advance\dimen@
\ht\LT@foot
\pagegoal\dimen@
216 \global\@mparbottom
\z@
217 \endgraf\penalty\z@
\addvspace\LTpost
218 \ifvoid\footins\else\insert\footins{}\fi}
220 \futurelet\@let@token
\LT@n@fcols
}
223 \ifx\@let@token
\LT@nofcols
226 \expandafter\LT@nofcols
229 \relax\iffalse{\fi\ifnum0=`
}\fi
231 {\def\crcr{\LT@crcr
\noalign{\nobreak}}\let\cr\crcr
235 \let\LT@setprevdepth
\relax
237 \global\advance\LT@rows\@ne
238 \ifnum\LT@rows=
\LTchunksize
239 \gdef\LT@setprevdepth
{%
241 \global\let\LT@setprevdepth
\relax}%
242 \expandafter\LT@xtabularcr
245 \expandafter\LT@LL@FM@cr
248 \@ifnextchar
[\LT@argtabularcr
\LT@ntabularcr
}
256 \def\LT@argtabularcr
[#1]{%
259 \unskip\@xargarraycr
{#1}%
269 \crcr\LT@save@row
\cr\egroup
270 \global\setbox\@ne
\lastbox
274 \ifhmode\@firstofone
{&
}\fi\omit
275 \ifnum#1=
\c@LT@chunks
279 \def\LT@entry@chop
#1#2{%
281 {\ifnum#1>
\c@LT@chunks
286 \def\LT@entry@write
{%
287 \noexpand\LT@entry^^J
%
292 \expandafter\LT@rebox
\LT@bchunk
}
293 \def\LT@rebox
#1\bgroup{%
299 \xdef\LT@save@row
{\expandafter\LT@build@blank
300 \romannumeral\number\LT@cols
001 }}
301 \def\LT@build@blank
#1{%
303 \noexpand\LT@entry
{1}{0pt
}%
304 \expandafter\LT@build@blank
307 \global\expandafter\let\expandafter\LT@save@row
308 \csname LT@
\romannumeral\c@LT@tables
\endcsname
309 \ifx\LT@save@row
\relax
314 \ifcase\expandafter\expandafter\expandafter\LT@cols
315 \expandafter\@gobble
\LT@save@row
322 \aftergroup\LT@blank@row
325 \let\setlongtables\relax
329 \let\LT@old@row
\LT@save@row
330 \global\let\LT@save@row\@empty
339 \ifx\LT@@save@row\@undefined
340 \let\LT@@save@row
\LT@save@row
345 \ifcase\expandafter\count@
\LT@old@row
352 \expandafter\LT@max@sel\@tempa
354 \def\LT@max@sel
#1#2{%
362 \noalign{\ifnum0=`
}\fi
364 \futurelet\@let@token
\LT@@hline
}
366 \ifx\@let@token
\hline
367 \global\let\@gtempa\@gobble
368 \gdef\LT@sep
{\penalty-\@medpenalty
\vskip\doublerulesep}%
370 \global\let\@gtempa\@empty
371 \gdef\LT@sep
{\penalty-\@lowpenalty
\vskip-
\arrayrulewidth}%
375 \unskip\leaders\hrule\@height
\arrayrulewidth\hfill\cr
378 \unskip\leaders\hrule\@height
\arrayrulewidth\hfill\cr
379 \noalign{\penalty\@M
}%
383 \@ifnextchar
[{\egroup\LT@c@ption\@firstofone
}\LT@capti@n
}
384 \def\LT@c@ption
#1[#2]#3{%
385 \LT@makecaption
#1\fnum@table
{#3}%
387 \ifx\@tempa\@empty
\else
389 \addcontentsline{lot
}{table
}{\protect\numberline{\thetable}{#2}}}%
393 {\egroup\LT@c@ption\@gobble
[]}%
394 {\egroup\@xdblarg
{\LT@c@ption\@firstofone
}}}
395 \def\LT@makecaption
#1#2#3{%
396 \LT@mcol
\LT@cols c
{\hbox to
\z@
{\hss\parbox[t
]\LTcapwidth{%
397 \sbox\@tempboxa
{#1{#2:
}#3}%
398 \ifdim\wd\@tempboxa>
\hsize
401 \hbox to
\hsize{\hfil\box\@tempboxa
\hfil}%
403 \endgraf\vskip\baselineskip}%
406 \ifnum\outputpenalty <-\@Mi
407 \ifnum\outputpenalty > -
\LT@end@pen
408 \LT@err
{floats and marginpars not allowed in a longtable
}\@ehc
410 \setbox\z@
\vbox{\unvbox\@cclv
}%
411 \ifdim \ht\LT@lastfoot>
\ht\LT@foot
413 \advance\dimen@
\ht\LT@foot
414 \advance\dimen@-
\ht\LT@lastfoot
416 \setbox\@cclv
\vbox{\unvbox\z@
\copy\LT@foot
\vss}%
419 \global\vsize\@colroom
420 \setbox\z@
\vbox{\box\LT@head
}%
423 \unvbox\z@
\ifvoid\LT@lastfoot
\copy\LT@foot
\else\box\LT@lastfoot
\fi
426 \setbox\@cclv
\vbox{\unvbox\@cclv
\copy\LT@foot
\vss}%
429 \global\vsize\@colroom
430 \copy\LT@head
\nobreak
432 \def\LT@end@hd@ft
#1{%
434 \ifx\LT@start
\endgraf
436 {Longtable head or foot not at start of table
}%
437 {Increase LTchunksize
}%
442 \def\endfirsthead{\LT@end@hd@ft
\LT@firsthead
}
443 \def\endhead{\LT@end@hd@ft
\LT@head
}
444 \def\endfoot{\LT@end@hd@ft
\LT@foot
}
445 \def\endlastfoot{\LT@end@hd@ft
\LT@lastfoot
}
446 \def\LT@startpbox
#1{%
448 \let\@footnotetext
\LT@p@ftntext
449 \setlength\hsize{#1}%
451 \vrule \@height
\ht\@arstrutbox \@width
\z@
}
453 \@finalstrut\@arstrutbox
458 \def\LT@p@ftntext
#1{%
459 \edef\@tempa
{\the\LT@p@ftn
\noexpand\footnotetext[\the\c@footnote
]}%
460 \global\LT@p@ftn
\expandafter{\@tempa
{#1}}}%
463 %% End of file `longtable-patched.sty'.