summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/floatrow/fr-longtable.sty
blob: 0c82c2f359d10271909674f6c88dae2431a0611a (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
%%
%% This is file `fr-longtable.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% floatrow.dtx  (with options: `forlongtable')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from fr-longtable.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file floatrow.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{fr-longtable}
       [2007/11/28 v0.1b (beta) floatrow: additions for longtable]
\RequirePackage{longtable}[2004/02/01]
\@ifdefinable\flrow@oriLT@array{\let\flrow@oriLT@array\LT@array}
\renewcommand\LT@array{%
   \flrow@setlist{{table}{longtable}}\flrow@useLTcapwidth\normalfont\floatfont
   \belowcaptionskip\captionskip
   \FBifLTcapwidth
     {\let\flrow@LT@make@row\LT@make@row
     \def\LT@make@row{%
       \let\LT@make@row\flrow@LT@make@row
       \LT@make@row
       \ifx\LT@save@row\relax\else\begingroup
         \LTcapwidth\z@
         \def\LT@entry####1####2{\advance\LTcapwidth####2}\LT@save@row\relax
         \ifdim\LTcapwidth=\z@\else\global\LTcapwidth\LTcapwidth\fi
       \endgroup\fi}}%
   \def\floatfoot@{\vskip\floatfootskip
       \def\@captype{table}\floatfoot@box}%
   \flrow@oriLT@array}
\providecommand\floatfont{}
\providecommand\floatfootskip{\skip\@mpfootins}
\providecommand\captionskip{10\p@}
\providecommand\floatfoot@box[1]{%
    \@parboxrestore\reset@font\color@begingroup
  \caption@setoptions{\@captype}%
  \caption@setoptions{floatfoot}%
    \captionsetup{labelformat=empty,labelsep=none}%
     \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
  \color@endgroup}
\let\FBifLTcapwidth\@gobble
\providecommand\caption@ifinlist[2]{%
  \let\next\@secondoftwo
  \edef\caption@tempa{#1}%
  \@for\caption@tempb:={#2}\do{%
    \ifx\caption@tempa\caption@tempb
      \let\next\@firstoftwo
    \fi}%
  \next}
\newcommand*\flrow@useLTcapwidth{}
\newcommand*\setLTcapwidth[1]{%
  \caption@ifinlist{#1}{table,contents,LTcapwidthtotable}{\def\flrow@useLTcapwidth
    {\let\FBifLTcapwidth\@firstofone}}{\def\flrow@useLTcapwidth
    {\let\FBifLTcapwidth\@gobble\setlength\LTcapwidth{#1}}}}
\@ifpackageloaded{floatrow}
    {\DeclareFROpt{LTcapwidth}{\setLTcapwidth{#1}}
     \DeclareOption{table}{\setLTcapwidth{table}}
     \ProcessOptions
      }
    {\DeclareOption{LTcapwidthtotable}{\setLTcapwidth{table}}
     \DeclareOption{table}{\setLTcapwidth{table}}
     \ProcessOptions
     \let\flrow@setlist\@gobble}
\newbox\flrow@LT@lasthead
\newbox\flrow@LT@prelastfoot
\newcounter{FBLTpage}
\@ifdefinable\FB@ori@longtable{\let\FB@ori@longtable\longtable}
\def\longtable{%
  \setcounter{FBLTpage}\@ne
  \FB@ori@longtable}
\@ifdefinable\FB@ori@LT@output{\let\FB@ori@LT@output\LT@output}
\def\LT@output{%
  \@ifundefined{FBLTpage@\romannumeral\c@LT@tables}%
    {\gdef\flrow@LTlastpage{2}}{\@nameuse{FBLTpage@\romannumeral\c@LT@tables}}%
  \addtocounter{FBLTpage}\@ne
  \ifvoid\flrow@LT@lasthead\else
     \ifnum\value{FBLTpage}=\flrow@LTlastpage
        \let\LT@head\flrow@LT@lasthead
     \fi
  \fi
  \ifvoid\flrow@LT@prelastfoot\else
     \count@\flrow@LTlastpage\relax
     \ifnum\value{FBLTpage}=\count@
        \let\LT@foot\flrow@LT@prelastfoot
     \fi
  \fi
  \FB@ori@LT@output}
\@tempswafalse
\ifx\endlasthead\undefined\@tempswatrue\else
   \ifx\endlasthead\relax\@tempswatrue
\fi\fi
\if@tempswa
    \def\endlasthead{\LT@end@hd@ft\flrow@LT@lasthead}
\else
\PackageError{fr-longtable}{The command \string\endlasthead\MessageBreak
            already defined by longtable package}
\fi
\@tempswafalse
\ifx\endprelastfoot\undefined\@tempswatrue\else
   \ifx\endprelastfoot\relax\@tempswatrue
\fi\fi
\if@tempswa
    \def\endprelastfoot{\LT@end@hd@ft\flrow@LT@prelastfoot}
\else
\PackageError{fr-longtable}{The command \string\endprelastfoot\MessageBreak
            already defined by longtable package}
\fi
\@ifdefinable\FB@ori@endlongtable{\let\FB@ori@endlongtable\endlongtable}
\def\endlongtable{%
  \FB@ori@endlongtable
  \if@filesw
    {\advance\c@FBLTpage\m@ne
    \immediate\write\@auxout{%
      \gdef\expandafter\noexpand
        \csname FBLTpage@\romannumeral\c@LT@tables\endcsname
          {\string\gdef\string\flrow@LTlastpage{\the\c@FBLTpage}}%
      }}%
  \fi
  }
\endinput
%%
%% End of file `fr-longtable.sty'.