summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty
blob: 5f3f529c53a10ea351be179ca97afaa13b0c07de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
%%
%% This is file `lwarp-longtable.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lwarp.dtx  (with options: `longtable')
%% This is a generated file.
%% Copyright 2016-2022 Brian Dunn
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.



\LWR@ProvidesPackageDrop{longtable}[2014/10/28]
\newbool{LWR@longtable@havehead}
\boolfalse{LWR@longtable@havehead}
\newenvironment{longtable*}[2][]{%
    \LWR@floatbegin{table}%
    \ifdef{\setcaptiontype}{% caption package:
        \setcaptiontype{\LTcaptype}%
        \caption@setoptions{longtable}%
        \caption@setoptions{@longtable}%
        \caption@LT@setup%
    }{% w/o caption package:
        \renewcommand*{\@captype}{\LTcaptype}%
    }%
    \booltrue{LWR@starredlongtable}%
    \boolfalse{LWR@longtable@havehead}%
    \let\captionlistentry\LWR@LTcaptionlistentry%
    \tabular{#2}%
}
{\endtabular\LWR@floatend}

\newenvironment{longtable}[2][]{%
    \LWR@floatbegin{table}%
    \ifdef{\setcaptiontype}{% caption package:
        \setcaptiontype{\LTcaptype}%
        \caption@setoptions{longtable}%
        \caption@setoptions{@longtable}%
        \caption@LT@setup%
    }{% w/o caption package:
        \renewcommand*{\@captype}{\LTcaptype}%
    }%
    \refstepcounter{\LTcaptype}%
    \boolfalse{LWR@longtable@havehead}%
    \let\captionlistentry\LWR@LTcaptionlistentry%
    \tabular{#2}%
}
{\endtabular\LWR@floatend}

\newcounter{LTchunksize}
\newcommand*{\LWR@longtable@headerror}{%
    \PackageError{lwarp-longtable}
    {For longtable:\MessageBreak
    1: Keep either one of an \protect\endhead\space or\MessageBreak
        \space\protect\endfirsthead\space phrase as-is,\MessageBreak
        \space to be used by both print and HTML.\MessageBreak
    2: Place any other \protect\end... phrases inside a\MessageBreak
        \space\protect\warpprintonly\space macro,
            to be ignored by HTML.\MessageBreak
    3: At the end of the table,\MessageBreak
        \space add a final footer for HTML\MessageBreak
        \space inside a \protect\warpHTMLonly\space macro.
            This can be\MessageBreak
        \space a copy of an \protect\endfoot\space or
            \protect\endfirstfoot\MessageBreak
        \space phrase, but without the actual \protect\endfoot\MessageBreak
        \space or \protect\endfirstfoot\space macros.\MessageBreak
        \space If using threeparttablex, add\MessageBreak
        \space \protect\insertTableNotes\space here,
            optionally with\MessageBreak
        \space \protect\UseMinipageWidths\space in front.\MessageBreak
    See the Lwarp documentation regarding\MessageBreak
    longtables and threeparttablex}
    {See the Lwarp documentation regading longtables and threeparttablex.}
}
\newcommand*{\LWR@longtable@maybeheaderror}{%
\ifbool{LWR@longtable@havehead}%
    {\LWR@longtable@headerror}%
    {%
        \booltrue{LWR@longtable@havehead}
        \LWR@tabularendofline% throws away options //[dim] and //*
    }%
}
\def\endhead{\LWR@longtable@maybeheaderror}
\def\endfirsthead{\LWR@longtable@maybeheaderror}
\def\endfoot{\LWR@longtable@headerror}
\def\endlastfoot{\LWR@longtable@headerror}
\let\tabularnewline\\
\providecommand*{\LWR@HTML@tabularnewline}{\LWR@tabularendofline}
\LWR@formatted{tabularnewline}
\newcommand{\setlongtables}{}% Obsolete command, does nothing.
\newlength{\LTleft}
\newlength{\LTright}
\newlength{\LTpre}
\newlength{\LTpost}
\newlength{\LTcapwidth}
\LetLtxMacro\LWR@origkill\kill
\renewcommand*{\kill}{\LWR@tabularendofline}
\appto\LWR@restoreorigformatting{%
\LetLtxMacro\kill\LWR@origkill%
}


\endinput
%%
%% End of file `lwarp-longtable.sty'.