%%
%% 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'.
