%%
%% This is file `ltcaption.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ltcaption.dtx  (with options: `package')
%% 
%% Copyright (C) 1994-2010 Axel Sommerfeldt (caption@sommerfee.de)
%% 
%% --------------------------------------------------------------------------
%% 
%% 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 2003/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% This Current Maintainer of this work is Axel Sommerfeldt.
%% 
%% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
%% ltcaption.dtx, and subcaption.dtx, the derived files caption.sty,
%% caption2.sty, caption3.sty, ltcaption.sty, and subcaption.sty, and the
%% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%% 
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{ltcaption}[2008/03/28 v1.2 longtable captions (AR)]
\providecommand*\LTcaptype{table}
\providecommand*\ext@table{lot}
\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{%
  \@ifpackageloaded{listings}{%
    \providecommand*\ext@lstlisting{lol}}{}}
\@ifpackageloaded{caption}{}{%
  \newskip\LTcapskip \LTcapskip=\abovecaptionskip
  \newskip\LTcapleft \LTcapleft=\fill
  \newskip\LTcapright \LTcapright=\fill
  \newif\ifLTcapmargins \LTcapmarginstrue
  \providecommand*\CaptionLabelFont{}
  \providecommand*\CaptionTextFont{}
}
\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{%
  \let\ltcaption@ORI@LT@array\LT@array
  \renewcommand*\LT@array{%
    \let\caption@LT@refstepcounter\refstepcounter
    \def\refstepcounter{%
      \caption@LTtype\caption@LT@refstepcounter}%
    \let\caption@LT@Hrefstepcounter\H@refstepcounter
    \def\H@refstepcounter{%
      \caption@LTtype\caption@LT@Hrefstepcounter}%
    \let\caption@LT@makecurrent\hyper@makecurrent
    \def\hyper@makecurrent{%
      \caption@LTtype\caption@LT@makecurrent}%
    \def\lst@@caption{\relax}%
    \ltcaption@ORI@LT@array}}
\newcommand*\caption@LTtype[2]{%
  \edef\caption@LT@tempa{#2}%
  \ifx\caption@LT@tempa\caption@LT@table
    \caption@LT@type#1%
  \else
    #1{#2}%
  \fi}%
\newcommand*\caption@LT@type[1]{%
  \expandafter#1\expandafter{\LTcaptype}}
\newcommand*\caption@LT@table{table}%
\long\def\LT@c@ption#1[#2]#3{%
  \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}%
  \def\@tempa{#2}%
  \ifx\@tempa\@empty\else
     {\let\\\space
     \addcontentsline{\csname ext@\LTcaptype\endcsname}{\LTcaptype}%
       {\protect\numberline{\csname the\LTcaptype\endcsname}{#2}}}%
  \fi}
\renewcommand\LT@makecaption[3]{%
  \LT@@makecaption{%
    \sbox\@tempboxa{#1{{\CaptionLabelFont#2:} }\CaptionTextFont#3}%
    \ifdim\wd\@tempboxa>\hsize
      #1{\CaptionLabelFont{#2:} }\CaptionTextFont#3%
    \else
      \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
    \fi
    \endgraf\vskip\LTcapskip}}
\newcommand\LT@@makecaption[1]{%
  \caption@LT@make{\hb@xt@\hsize{%
    \ifLTcapmargins
      \hspace\LTcapleft
      \FBifLTcapwidth{\advance\LTcapwidth-\LTcapleft}%
    \else
      \hspace\LTleft
      \FBifLTcapwidth{\advance\LTcapwidth-\LTleft}%
    \fi
    \FBifLTcapwidth{\advance\LTcapwidth-%
       \ifLTcapmargins\LTcapright\else\LTright\fi}%
    \parbox[t]\LTcapwidth{#1}%
    \ifLTcapmargins
      \hskip\LTcapright
    \else
      \hskip\LTright
    \fi}}}
\AtBeginDocument{\providecommand*\FBifLTcapwidth[1]{}}
\newcommand\caption@LT@make[1]{%
  \noalign{\caption@LT@config}%
  \expandafter\LT@mcol\expandafter\LT@cols\expandafter{\caption@LTfmt}{%
    \hb@xt@\z@{%
      \hspace\caption@LTleft
      \parbox[t]\linewidth{#1}%
      \hspace\caption@LTright}}}%
\newcommand*\caption@LT@config{%
  \caption@LT@parse\LTleft\caption@LTleft\caption@ifLTleft
  \caption@LT@parse\LTright\caption@LTright\caption@ifLTright
  \xdef\caption@LTfmt{%
    @{}\caption@ifLTleft{\caption@ifLTright{c}{r}}{l}@{}}}
\newcommand*\caption@LT@parse[3]{%
  \let\@pluspart\@undefined
  \let\@minuspart\@undefined
  \expandafter\caption@LT@parse@\expandafter\@fixpart\the#1 x %
  \xdef#2{-\@fixpart
    \ifx\@minuspart\@undefined\else
      \space\@plus\space\@minuspart
    \fi
    \ifx\@pluspart\@undefined\else
      \space\@minus\space\@pluspart
    \fi}%
  \let#3\@firstoftwo
  \ifx\@pluspart\@undefined
    \ifx\@minuspart\@undefined
      \let#3\@secondoftwo
    \fi
  \fi}
\def\caption@LT@parse@#1#2 {%
  \edef\@tempa{\@car#2\@nil}%
  \if p\@tempa
    \def\next{\caption@LT@parse@\@pluspart}%
  \else\if m\@tempa
    \def\next{\caption@LT@parse@\@minuspart}%
  \else\if x\@tempa
    \let\next\relax
  \else
    \def#1{#2}%
    \def\next{\caption@LT@parse@ @}%
  \fi\fi\fi
  \next}
\newenvironment{longtable*}{%
  \let\caption@LT@type\@gobble
   \let\caption@LT@raisedlink\Hy@raisedlink
   \def\Hy@raisedlink{%
     \let\Hy@raisedlink\caption@LT@raisedlink
     \@gobble}%
   \let\ltcaption@ORI@LT@c@ption\LT@c@ption
   \def\LT@c@ption##1[##2]##3{%
     \ifx##1\@firstofone
       \PackageError{ltcaption}%
         {Not allowed in longtable* environment}%
         {If you do not understand this error, please take a closer
          look\MessageBreak at the documentation of the `ltcaption'
          package.\MessageBreak \@ehc}%
     \else
       \ltcaption@ORI@LT@c@ption{##1}[{##2}]{##3}%
     \fi}%
  \longtable}%
 {\endlongtable}
\@ifundefined{@komalongtablefalse}{}{%
  \if@komalongtable
    \renewcommand{\LT@makecaption}[3]{%
      \noalign{%
        \if@captionabove
          \vskip\belowcaptionskip
        \else
          \vskip\abovecaptionskip
        \fi
      }%
      \caption@LT@make{%
        \@@makecaption{#1}{#2}{#3}%
        \endgraf
        \if@captionabove
          \vskip\abovecaptionskip
        \else
          \vskip\belowcaptionskip
        \fi
      }%
    }%
    \let\LT@@makecaption\@undefined
  \fi}
\endinput
%%
%% End of file `ltcaption.sty'.
