%%
%% This is file `caption.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% caption.dtx  (with options: `package')
%% 
%% Copyright (C) 1994-2009 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{caption}[2009/10/09 v3.1k Customizing captions (AR)]
\newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}}
\@onlypreamble\caption@Info
\RequirePackage{caption3}[2008/08/24] % needs v3.1j or newer
\caption@ifbool{documentclass}{}{%
  \caption@WarningNoLine{%
    Unsupported document class (or package) detected,\MessageBreak
    usage of the caption package is not recommended}%
  \caption@Info{\string\@makecaption\space=\space\meaning\@makecaption}%
}
\@ifpackageloaded{caption2}{%
  \caption@Error{%
    You can't use both, the (obsolete) caption2 *and*\MessageBreak
    the (current) caption package}%
  \endinput
}{}
\caption@AtBeginDocument{%
  \@ifpackageloaded{ftcap}{\caption@DisablePositionOption{ftcap}}{}%
  \@ifpackageloaded{nonfloat}{\caption@DisablePositionOption{nonfloat}}{}%
  \@ifpackageloaded{topcapt}{\caption@DisablePositionOption{topcapt}}{}}
\newcommand*\caption@DisablePositionOption[1]{%
  \caption@Info{%
    `#1' package detected; setting `position=b' for compatibility reasons}%
  \caption@setposition b%
  \DeclareCaptionOption{position}{%
    \caption@Error{Usage of the `position' option is incompatible\MessageBreak
      to the `#1' package}}}
\@onlypreamble\caption@DisablePositionOption
\DeclareCaptionOption{figureposition}{%
  \captionsetup*[figure]{position=#1}}
\@onlypreamble@key{caption}{figureposition}
\DeclareCaptionOption{tableposition}{%
  \captionsetup*[table]{position=#1}}
\@onlypreamble@key{caption}{tableposition}
\DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}}
\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}}
\DeclareCaptionOption{name}{\caption@setname\@captype{#1}}
\DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}}
\DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}}
\newcommand*\caption@SetName[2]{%
  \caption@setname{#1}{#2}%
  \begingroup
    \@ifundefined{languagename}{}{%
      \@ifundefined{captions\languagename}{}{%
        \expandafter\g@addto@macro\csname captions\languagename\endcsname
          {\caption@setname{#1}{#2}}}}%
  \endgroup}
\newcommand*\caption@setname[2]{\@namedef{#1name}{#2}}
\caption@AtBeginDocument{\let\caption@SetName\caption@setname}
\DeclareCaptionOption{figurewithin}{\caption@Within{figure}{#1}}
\@onlypreamble@key{caption}{figurewithin}
\DeclareCaptionOption{figurewithout}{\KV@caption@figurewithin{none}}
\@onlypreamble@key{caption}{figurewithout}
\DeclareCaptionOption{tablewithin}{\caption@Within{table}{#1}}
\@onlypreamble@key{caption}{tablewithin}
\DeclareCaptionOption{tablewithout}{\KV@caption@tablewithin{none}}
\@onlypreamble@key{caption}{tablewithout}
\DeclareCaptionOption{within}{%
  \@ifundefined{c@figure}{}{\caption@Within{figure}{#1}}%
  \@ifundefined{c@table}{}{\caption@Within{table}{#1}}%
  \def\caption@within@default{#1}}
\@onlypreamble@key{caption}{within}
\DeclareCaptionOption{without}{\KV@caption@within{none}}
\@onlypreamble@key{caption}{without}
\newcommand*\caption@Within[1]{\def\caption@type{#1}\KV@caption@DCT@within}
\@onlypreamble\caption@Within
\DeclareCaptionOption*{config}[caption]{%
   \InputIfFileExists{#1.cfg}%
     {\typeout{*** Local configuration file #1.cfg used ***}}%
     {\caption@Warning{Configuration file #1.cfg not found}}}
\DeclareCaptionOption{@minipage}{%
  \caption@ifinlist{#1}{auto,default}%
    {\let\caption@if@minipage\@gobbletwo}%
    {\caption@set@bool\caption@if@minipage{#1}}}
\captionsetup{@minipage=default}
\DeclareCaptionOption{compatibility}[1]{\caption@setbool{compatibility}{#1}}
\@onlypreamble@key{caption}{compatibility}
\DeclareCaptionOptionNoValue*{normal}{%
  \caption@setformat{plain}%
  \caption@setjustification{justified}}
\DeclareCaptionOptionNoValue*{isu}{%
  \caption@setformat{hang}%
  \caption@setjustification{justified}}
\DeclareCaptionOptionNoValue*{hang}{%
  \caption@setformat{hang}%
  \caption@setjustification{justified}}
\DeclareCaptionOptionNoValue*{center}{%
  \caption@setformat{plain}%
  \caption@setjustification{centering}}
\DeclareCaptionOptionNoValue*{anne}{%
  \caption@setformat{plain}%
  \caption@setjustification{centerlast}}
\DeclareCaptionOptionNoValue*{centerlast}{%
  \caption@setformat{plain}%
  \caption@setjustification{centerlast}}
\DeclareCaptionOptionNoValue*{scriptsize}{\def\captionfont{\scriptsize}}
\DeclareCaptionOptionNoValue*{footnotesize}{\def\captionfont{\footnotesize}}
\DeclareCaptionOptionNoValue*{small}{\def\captionfont{\small}}
\DeclareCaptionOptionNoValue*{normalsize}{\def\captionfont{\normalsize}}
\DeclareCaptionOptionNoValue*{large}{\def\captionfont{\large}}
\DeclareCaptionOptionNoValue*{Large}{\def\captionfont{\Large}}
\DeclareCaptionOptionNoValue*{up}{\l@addto@macro\captionlabelfont\upshape}
\DeclareCaptionOptionNoValue*{it}{\l@addto@macro\captionlabelfont\itshape}
\DeclareCaptionOptionNoValue*{sl}{\l@addto@macro\captionlabelfont\slshape}
\DeclareCaptionOptionNoValue*{sc}{\l@addto@macro\captionlabelfont\scshape}
\DeclareCaptionOptionNoValue*{md}{\l@addto@macro\captionlabelfont\mdseries}
\DeclareCaptionOptionNoValue*{bf}{\l@addto@macro\captionlabelfont\bfseries}
\DeclareCaptionOptionNoValue*{rm}{\l@addto@macro\captionlabelfont\rmfamily}
\DeclareCaptionOptionNoValue*{sf}{\l@addto@macro\captionlabelfont\sffamily}
\DeclareCaptionOptionNoValue*{tt}{\l@addto@macro\captionlabelfont\ttfamily}
\DeclareCaptionOptionNoValue*{nooneline}{\caption@setbool{slc}{0}}
\caption@setbool{ruled}{0}
\DeclareCaptionOptionNoValue*{ruled}{\caption@setbool{ruled}{1}}
\DeclareCaptionOptionNoValue*{flushleft}{%
  \caption@setformat{plain}%
  \caption@setjustification{raggedright}}
\DeclareCaptionOptionNoValue*{flushright}{%
  \caption@setformat{plain}%
  \caption@setjustification{raggedleft}}
\DeclareCaptionOptionNoValue*{oneline}{\caption@setbool{slc}{1}}
\DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{%
  \caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}}
\DeclareCaptionOption*{caption}{%
  \caption@setbool{temp}{#1}%
  \caption@ifbool{temp}{}{%
    \caption@Error{%
      The package option `caption=#1' is obsolete.\MessageBreak
      Please pass this option to the subfig package instead\MessageBreak
      and do *not* load the caption package anymore}}}
\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}}
\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}}
\@onlypreamble@key{caption}{FPlist}
\@onlypreamble@key{caption}{FPref}
\newcommand*\caption@setFPoption[2]{%
  \edef\caption@tempa{\@car#2\@nil}%
  \caption@setbool{FP#1cap}{\if c\caption@tempa 1\else 0\fi}}
\@onlypreamble\caption@setFPoption
\captionsetup{FPlist=caption,FPref=figure}
\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}}
\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}}
\captionsetup{hypcap=1,hypcapspace=.5\baselineskip}
\@ifundefined{@captionheadfont}{}{%
  \caption@Info{AMS or SMF document class}%
  \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class
}
\@ifundefined{scr@caption}{}{%
  \caption@Info{KOMA-Script document class}%
  \g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}
  \g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}
  \if@tablecaptionabove
    \@tablecaptionabovetrue
  \else
    \@tablecaptionabovefalse
  \fi
  \g@addto@macro\onelinecaptionstrue{\let\caption@ifslc\@firstoftwo}
  \g@addto@macro\onelinecaptionsfalse{\let\caption@ifslc\@secondoftwo}
  \ifonelinecaptions
    \onelinecaptionstrue
  \else
    \onelinecaptionsfalse
  \fi
  \g@addto@macro\@captionabovetrue{\let\caption@position\@firstoftwo}
  \g@addto@macro\@captionabovefalse{\let\caption@position\@secondoftwo}
  \DeclareCaptionOption{figureposition}{%
    \caption@WarningNoLine{Option `figureposition=#1' has no effect\MessageBreak
    when used with a KOMA script document class}}
  \DeclareCaptionOption{tableposition}{%
    \caption@WarningNoLine{Option `tableposition=#1' has no effect\MessageBreak
    when used with a KOMA script document class}}
  \let\caption@KOMA@setcapindent\@setcapindent
  \renewcommand*\@setcapindent[1]{%
    \caption@KOMA@setcapindent{#1}\caption@setcapindent}
  \let\caption@KOMA@@setcapindent\@@setcapindent
  \renewcommand*\@@setcapindent[1]{%
    \caption@KOMA@@setcapindent{#1}\caption@setcapindent}
  \newcommand*\caption@setcapindent{%
    \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}}
  \@ifundefined{cap@indent}{}{\caption@setcapindent}
  \expandafter\let\expandafter\caption@KOMA@setcapwidth
                  \csname\string\setcapwidth\endcsname
  \@namedef{\string\setcapwidth}[#1]#2{%
    \caption@KOMA@setcapwidth[#1]{#2}\caption@setcapwidth{#1}}
  \newcommand*\caption@setcapwidth[1]{%
    \ifx\\#1\\\else
      \@ifundefined{cap@margin}{}{%
        \def\@tempa{captionbeside}%
        \ifx\@tempa\@currenvir\else\caption@Warning{%
          Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}%
        \fi}%
    \fi
    \captionsetup{width=\cap@width}}
  \def\caption@tempa{\hsize}%
  \ifx\caption@tempa\cap@width \else
    \caption@setcapwidth{?}
  \fi
  \expandafter\let\expandafter\caption@KOMA@setcapmargin
                  \csname\string\@setcapmargin\endcsname
  \@namedef{\string\@setcapmargin}[#1]#2{%
    \caption@KOMA@setcapmargin[#1]{#2}\caption@setcapmargin}
  \expandafter\let\expandafter\caption@KOMA@@setcapmargin
                  \csname\string\@@setcapmargin\endcsname
  \@namedef{\string\@@setcapmargin}[#1]#2{%
    \caption@KOMA@@setcapmargin[#1]{#2}\caption@setcapmargin}
  \newcommand*\caption@setcapmargin{%
    \begingroup
      \let\onelinecaptionsfalse\relax
      \def\@twoside{0}%
      \def\if@twoside{\def\@twoside{1}\iffalse}%
      \cap@margin
      \def\@tempa{\endgroup}%
      \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else
        \def\hspace##1##{\@firstofone}%
        \edef\@tempa{\endgroup
          \noexpand\captionsetup{%
            twoside=\@twoside,slc=0,%
            margin={\cap@left,\cap@right}}}%
      \fi\fi
      \@tempa}
  \ifx\cap@margin\relax \else
    \caption@setcapmargin
  \fi
}
\caption@ProcessOptions*{caption}
\caption@AtBeginDocument{%
  \DeclareCaptionOption{type}{\caption@settype{#1}}%
  \DeclareCaptionOption{type*}{\caption@settype*{#1}}%
  \DeclareCaptionOption{subtype}[sub\@captype]{\caption@setsubtype{#1}}%
  \DeclareCaptionOption{subtype*}[sub\@captype]{\caption@setsubtype*{#1}}%
}
\newcommand*\caption@settype{%
  \caption@@settype{}}
\newcommand*\caption@setsubtype{%
  \caption@iftype
    {\caption@@settype{sub}}%
    {\caption@Error{Option `subtype=' outside float}}}%
\newcommand*\caption@@settype[1]{%
  \caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo}
\newcommand*\caption@@@settype[3]{%
  \@ifundefined{c@#3}%
    {\caption@Error{No float type '#3' defined}}%
    {\caption@Debug{#1type=#3}%
     \caption@checkgrouplevel{#1}{%
       \captionsetup{#1type#2*\@empty=...}#2{ or
                     \@backslashchar#1captionof}{}}%
     \edef\caption@tempa{#3}%
     \expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else
       \ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi
     \fi
     \expandafter\let\csname @#1captype\endcsname\caption@tempa
     \@nameuse{caption@#1typehook}%
     \caption@setoptions{#3}%
     \ifx\caption@opt\relax
       \@nameundef{caption@#1type@warning}%
     \else
       \@namedef{caption@#1type@warning}{\caption@Warning{%
         The #1caption type was already set to
         `\csname @#1captype\endcsname'\MessageBreak}}%
     \fi
     \let\caption@ifrefstepcounter\@secondoftwo
     #2{}{%
       \let\@currentlabel\caption@undefinedlabel
       \ifx\caption@ORI@label\@undefined
         \let\caption@ORI@label\label
         \let\label\caption@xlabel
       \fi
       \caption@start}}}
\newcommand*\caption@typehook{}
\newcommand*\caption@iftype{%
  \@ifundefined{@captype}{\let\@captype\@undefined\@secondoftwo}\@firstoftwo}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname currentgrouplevel\endcsname\relax
  \caption@Debug{TeX engine: TeX}
  \let\caption@checkgrouplevel\@gobbletwo
\else
  \caption@Debug{TeX engine: e-TeX}
  \newcommand*\caption@checkgrouplevel[2]{%
    \@ifundefined{#1caption@grouplevel}{%
       \@ifundefined{caption@grouplevel}{\let\caption@grouplevel\z@}{}%
       \ifnum\currentgrouplevel>\caption@grouplevel\relax
         \expandafter\edef\csname #1caption@grouplevel\endcsname{%
           \the\currentgrouplevel}%
       \else
         \caption@Warning{\string#2\MessageBreak outside box or environment}%
       \fi
    }{}}
\fi
\newcommand*\caption@undefinedlabel{%
  \protect\caption@xref{\caption@labelname}{\on@line}}
\DeclareRobustCommand*\caption@xref[2]{%
  \caption@WarningNoLine{\noexpand\label before \string\caption#2}%
  \@setref\relax\@undefined{#1}}
\newcommand*\caption@labelname{??}
\newcommand*\caption@xlabel[1]{%
  \caption@@xlabel
  \def\caption@labelname{#1}%
  \caption@ORI@label{#1}}
\newcommand*\caption@@xlabel{%
  \global\let\caption@@xlabel\@empty
  \@bsphack
    \protected@write\@auxout{}%
      {\string\providecommand*\string\caption@xref[2]{%
        \string\@setref\string\relax\string\@undefined{\string##1}}}%
  \@esphack}
\caption@AtBeginDocument{%
  \def\captionof{\caption@teststar\caption@of{\caption*}\caption}}
\newcommand*\caption@of[2]{\caption@settype*{#2}#1}
\newcommand*\captionlistentry{%
  \caption@teststar\@captionlistentry\@firstoftwo\@secondoftwo}
\newcommand*\@captionlistentry[1]{%
  \@testopt{\caption@listentry{#1}}\@captype}
\def\caption@listentry#1[#2]#3{%
  \@bsphack
    #1{\def\@currentlabelname{#3}}%
      {\caption@refstepcounter{#2}%
       \caption@makecurrent{#2}{#3}}%
    \caption@addcontentsline{#2}{#3}%
  \@esphack}
\def\ContinuedFloat{%
  \@ifnextchar[\@Continued@Float\@ContinuedFloat}
\def\@Continued@Float[#1]{\addtocounter{#1}\m@ne}
\def\@ContinuedFloat{%
  \caption@iftype
    {\addtocounter\@captype\m@ne
     \caption@ContinuedFloat\@captype}%
    {\caption@Error{\noexpand\ContinuedFloat outside float}}}
\def\caption@ContinuedFloat#1{%
  \@ifstar{\caption@Continued@Float@{#1}}{\caption@Continued@Float{#1}}}
\def\caption@Continued@Float@{%
  \addtocounter\@captype\@ne
  \@stpelt{ContinuedFloat}\stepcounter{ContinuedFloat}%
  \def\caption@resetContinuedFloat##1{\xdef\caption@CFtype{##1}}%
  \caption@@ContinuedFloat}
\def\caption@Continued@Float#1{%
  \edef\caption@tempa{#1}%
  \ifx\caption@tempa\caption@CFtype
    \stepcounter{ContinuedFloat}%
    \let\caption@resetContinuedFloat\@gobble
    \caption@@ContinuedFloat{#1}%
    \sf@ContinuedFloat{#1}%
  \else
    \caption@Error{Continued `#1' after `\caption@CFtype'}%
  \fi}
\def\caption@@ContinuedFloat#1{%
  \expandafter\l@addto@macro\csname the#1\endcsname\theContinuedFloat
  \@ifundefined{theH#1}{}{%
    \expandafter\l@addto@macro\csname theH#1\endcsname{%
      \@alph\c@ContinuedFloat}}%
  \caption@setoptions{ContinuedFloat}%
  \caption@setoptions{continued#1}}
\providecommand*\sf@ContinuedFloat[1]{}
\newcommand*\caption@CFtype{??}
\newcounter{ContinuedFloat}
\let\theContinuedFloat\@empty
\newcommand*\caption@resetContinuedFloat[1]{%
  \@stpelt{ContinuedFloat}\xdef\caption@CFtype{#1}}
\newcommand*\caption@refstepcounter[1]{%
  \caption@resetContinuedFloat{#1}%
  \caption@@refstepcounter{#1}%
  \let\caption@ifrefstepcounter\@firstoftwo}
\newcommand*\caption@@refstepcounter{\refstepcounter}
\let\caption@ifrefstepcounter\@secondoftwo
\@ifundefined{kernel@ifnextchar}%
  {\newcommand\caption@dblarg[1]{\@ifnextchar[{#1}{\caption@xdblarg{#1}}}}%
  {\newcommand\caption@dblarg[1]{\kernel@ifnextchar[{#1}{\caption@xdblarg{#1}}}}%
\newcommand\caption@xdblarg[2]{#1[{#2\relax}]{#2}}%
\newcommand*\caption@begin[1]{%
  \begingroup
    \caption@setfnum{#1}%
    \caption@fixposition
    \global\let\caption@fixedposition\caption@position}
\newcommand\caption@beginex[3]{%
  \caption@begin{#1}%
  \caption@addcontentsline{#1}{#2}%
  \caption@ifempty{#3}{}}
\newcommand*\caption@end{%
  \endgroup
  \let\caption@position\caption@fixedposition}
\newcommand*\caption@setfnum[1]{%
  \@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}%
    \@namedef{fnum@#1}{\caption@fnum{#1}}%
  \fi}
\newcommand*\caption@boxrestore{%
  \let\if@nobreak\iffalse
  \let\if@noskipsec\iffalse
  \let\par\@@par
  \parindent\z@ \parskip\z@skip
  \everypar{}%
  \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
  \parfillskip\@flushglue \lineskip\normallineskip
  \baselineskip\normalbaselineskip
  \sloppy
  \let\\\@normalcr
}
\newcommand*\caption@normalsize{%
  \caption@font*{\KV@caption@fnt@normal\@unused}}
\let\caption@setfloatcapt\@firstofone
\newcommand*\caption@makecurrent[2]{}
\let\caption@makeanchor\@firstofone
\let\caption@start\relax
\let\caption@@start\relax
\let\caption@freezeHref\relax
\let\caption@defrostHref\relax
\def\caption@caption{%
  \caption@iftype
    {\caption@checkgrouplevel\@empty\caption
     \caption@star
       {\caption@refstepcounter\@captype}%
       {\caption@dblarg{\@caption\@captype}}}%
    {\caption@Error{\noexpand\caption outside float}}}%
\newcommand*\caption@star[2]{%
  \@ifstar{\global\caption@startrue#2[]}{#1#2}}%
\long\def\caption@@caption#1[#2]#3{%
  \ifcaption@star \else
    \caption@prepareanchor{#1}{#2}%
  \fi
  \par
  \caption@beginex{#1}{#2}{#3}%
    \caption@setfloatcapt{%
      \caption@boxrestore
      \if@minipage
        \@setminipage
      \fi
      \caption@normalsize
      \ifcaption@star
        \let\caption@makeanchor\@firstofone
      \fi
      \@makecaption{\csname fnum@#1\endcsname}%
                   {\ignorespaces\caption@makeanchor{#3}}\par
      \caption@if@minipage\@minipagetrue\@minipagefalse}%
  \caption@end}%
\newcommand*\caption@prepareanchor[2]{%
  \caption@makecurrent{#1}{#2}%
  \caption@ifhypcap\caption@@start{}}
\long\def\caption@makecaption#1#2{%
  \caption@iftop
    {\vskip\belowcaptionskip}%
    {\caption@rule\vskip\abovecaptionskip}%
  \caption@@make{#1}{#2}%
  \caption@iftop
    {\vskip\abovecaptionskip\caption@rule}%
    {\vskip\belowcaptionskip}}
\newcommand*\caption@redefine{}
\g@addto@macro\caption@redefine{%
  \caption@setbool{incompatible}{0}%
  \caption@CheckCommand\caption{%
    % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
    \def\caption{%
       \ifx\@captype\@undefined
         \@latex@error{\noexpand\caption outside float}\@ehd
         \expandafter\@gobble
       \else
         \refstepcounter\@captype
         \expandafter\@firstofone
       \fi
       {\@dblarg{\@caption\@captype}}%
    }}%
  \caption@CheckCommand\caption{%
    % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
    \def\caption{
      \ifx\@captype\@undefined
        \@latex@error{\noexpand\caption outside figure or table}\@ehd
        \expandafter\@gobble
      \else
        \refstepcounter\@captype
        \expandafter\@firstofone
      \fi
      {\@dblarg{\@caption\@captype}}%
    }}%
  \caption@CheckCommand\caption{%
    % float.sty [2001/11/08 v1.3d Float enhancements (AL)]
    \renewcommand\caption{%
      \ifx\@captype\@undefined
        \@latex@error{\noexpand\caption outside float}\@ehd
        \expandafter\@gobble
      \else
        \refstepcounter\@captype
        \let\@tempf\@caption
        \expandafter\ifx\csname @float@c@\@captype\endcsname\relax\else
          \expandafter\expandafter\let
            \expandafter\@tempf\csname @float@c@\@captype\endcsname
        \fi
      \fi
      \@dblarg{\@tempf\@captype}}}%
  \caption@CheckCommand\caption{%
    % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
    % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX]
    % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX]
    \def\caption{%
      \ifx\@captype\@undefined
        \@latex@error{\noexpand\caption outside float}\@ehd
        \expandafter\@gobble
      \else
        \H@refstepcounter\@captype
        \@ifundefined{fst@\@captype}{%
          \let\Hy@tempa\@caption
        }{%
          \let\Hy@tempa\Hy@float@caption
        }%
        \expandafter\@firstofone
      \fi
      {\@dblarg{\Hy@tempa\@captype}}%
    }}%
  \caption@CheckCommand\caption{%
    % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
    \def\caption{%
      \ifx\@captype\@undefined
        \@latex@error{\noexpand\caption outside float}\@ehd
        \expandafter\@gobble
      \else
        \H@refstepcounter\@captype
        \let\Hy@tempa\@caption
        \@ifundefined{float@caption}{%
        }{%
          \expandafter\ifx\csname @float@c@\@captype\endcsname\float@caption
            \let\Hy@tempa\Hy@float@caption
          \fi
        }%
        \expandafter\@firstofone
      \fi
      {\@dblarg{\Hy@tempa\@captype}}%
    }}%
  \caption@IfCheckCommand{}{%
    \caption@Info{%
      Incompatible package detected (regarding \string\caption).\MessageBreak
      \string\caption\space=\space\meaning\caption}%
    \caption@setbool{incompatible}{1}}%
  \caption@CheckCommand\@caption{%
    % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)]
    \long\def\@caption#1[#2]#3{%
      \par
      \addcontentsline{\csname ext@#1\endcsname}{#1}%
        {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
      \begingroup
        \@parboxrestore
        \if@minipage
          \@setminipage
        \fi
        \normalsize
        \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
      \endgroup}}%
  \caption@CheckCommand\@caption{%
    % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau
    \long\def\@caption#1[#2]#3{% second argument ignored
      \par\nobreak
      \begingroup
        \@parboxrestore
        \if@minipage
          \@setminipage
        \fi
        \beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak
        \endgroup}}%
  \caption@CheckCommand\@caption{%
    % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX]
    \long\def\@caption#1[#2]#3{%
      \hyper@makecurrent{\@captype}%
      \def\@currentlabelname{#2}%
      \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
      }%
      \begingroup
        \@parboxrestore
        \if@minipage
          \@setminipage
        \fi
        \normalsize
        \@makecaption{\csname fnum@#1\endcsname}{%
          \ignorespaces
          \ifHy@nesting
            \hyper@@anchor{\@currentHref}{#3}%
          \else
            \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
          \fi
        }%
        \par
      \endgroup
    }}%
  \caption@CheckCommand\@caption{%
    % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX]
    % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX]
    % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX]
    \long\def\@caption#1[#2]#3{%
      \expandafter\ifx\csname if@capstart\expandafter\endcsname
                      \csname iftrue\endcsname
        \global\let\@currentHref\hc@currentHref
      \else
        \hyper@makecurrent{\@captype}%
      \fi
      \def\@currentlabelname{#2}%
      \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
      }%
      \begingroup
        \@parboxrestore
        \if@minipage
          \@setminipage
        \fi
        \normalsize
        \expandafter\ifx\csname if@capstart\expandafter\endcsname
                        \csname iftrue\endcsname
          \global\@capstartfalse
          \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
        \else
          \@makecaption{\csname fnum@#1\endcsname}{%
            \ignorespaces
            \ifHy@nesting
              \hyper@@anchor{\@currentHref}{#3}%
            \else
              \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
            \fi
          }%
        \fi
        \par
      \endgroup
    }}%
  \caption@CheckCommand\@caption{%
    % nameref.sty [2006/12/27 v2.28 Cross-referencing by name of section]
    \long\def\@caption#1[#2]{%
      \def\@currentlabelname{#2}%
      \NR@@caption{#1}[{#2}]%
    }}%
  \caption@CheckCommand\@caption{%
    % subfigure.sty [2002/07/30 v2.1.4 subfigure package]
    \long\def\@caption#1[#2]#3{%
      \@ifundefined{if#1topcap}%
        {\subfig@oldcaption{#1}[{#2}]{#3}}%
        {\@nameuse{if#1topcap}%
           \@listsubcaptions{#1}%
           \subfig@oldcaption{#1}[{#2}]{#3}%
         \else
           \subfig@oldcaption{#1}[{#2}]{#3}%
           \@listsubcaptions{#1}%
         \fi}}}%
  \caption@CheckCommand\@caption{%
    % subfig.sty [2005/06/28 ver: 1.3 subfig package]
    \def\@caption{\caption@}%
    }%
  \caption@IfCheckCommand{}{%
    \caption@Info{%
      Incompatible package detected (regarding \string\@caption).\MessageBreak
      \string\@caption\space=\space\meaning\@caption}%
    \caption@setbool{incompatible}{1}}%
  \@ifundefined{caption@ifcompatibility}%
    {\let\caption@ifcompatibility\caption@ifincompatible
     \let\caption@tempa\caption@WarningNoLine}%
    {\let\caption@tempa\@gobble}% suppress warning
  \caption@ifcompatibility{%
    \caption@tempa{%
      \noexpand\caption will not be redefined since it's already\MessageBreak
      redefined by a document class or package which is\MessageBreak
      unknown to the caption package}%
    \renewcommand*\caption@redefine{}%
    \renewcommand*\caption@ContinuedFloat[1]{%
      \caption@Error{Not available in compatibility mode}}%
    \caption@AtBeginDocument*{%
      \let\caption@start\relax
      \@ifundefined{caption@ORI@capstart}{}{%
        \caption@Debug{%
          Restore hypcap definition of \string\capstart\@gobble}%
        \let\capstart\caption@ORI@capstart}%
      \@ifundefined{caption@ORI@float@makebox}{}{%
        \caption@Debug{%
          Restore hyperref redefinition of \string\float@makebox\@gobble}%
        \let\float@makebox\caption@ORI@float@makebox}%
    }%
    \renewcommand*\caption@star[2]{#1#2}%
  }{%
    \caption@ifincompatible{%
      \caption@WarningNoLine{%
        Forced redefinition of \noexpand\caption since the\MessageBreak
        unsupported(!) package option `compatibility=false'\MessageBreak
        was given}%
    }{}%
    \renewcommand*\caption@redefine{%
      \let\caption\caption@caption
      \let\@caption\caption@@caption}%
    \caption@redefine
  }%
  \caption@AtBeginDocument*{%
    \let\caption@ORI@capstart\@undefined
    \let\caption@ORI@float@makebox\@undefined}%
  \let\caption@ORI@xfloat\@xfloat
  \def\@xfloat#1[#2]{%
    \caption@ORI@xfloat{#1}[#2]%
    \caption@settype{#1}}%
}
\caption@AtBeginDocument{\caption@redefine}
\let\@makecaption\caption@makecaption
\def\caption@DeclareSubType sub#1\@nil{%
  \caption@Debug{Initializing subtype for `#1'\@gobble}%
  \@namedef{caption@c@#1}{0}%
  \@namedef{caption@beginsub#1}{\caption@beginsubfloat{#1}}}
\@onlypreamble\caption@DeclareSubType
\caption@For*{subtypelist}{\caption@DeclareSubType sub#1\@nil}
\caption@AtBeginDocument*{%
  \@ifundefined{sf@counterlist}{}{%
    \@for\sf@temp:=\sf@counterlist\do{%
      \expandafter\caption@DeclareSubType\sf@temp\@nil}}}
\newcommand*\caption@subtypehook{%
  \ifx\caption\caption@subcaption \else
    \caption@ifrefstepcounter{}{%
      % no \caption or \subcaption in this (floating) environment yet
      \caption@Debug{Increment \@captype\ counter =\the\value\@captype}%
      \caption@l@stepcounter\@captype
      \let\addcontentsline\caption@addsubcontentsline}%
    \ifnum\csname caption@c@\@captype\endcsname=\value\@captype \else
      \caption@Debug{Reset sub\@captype\ counter}%
      \expandafter\xdef\csname caption@c@\@captype\endcsname{%
        \the\value\@captype}%
      \@stpelt\@subcaptype
    \fi
    \c@ContinuedFloat=0\relax
    \let\caption@resetContinuedFloat\@gobble
    \let\caption@addcontentsline\caption@kernel@addcontentsline
    \let\caption@setfloatcapt\@firstofone
    \caption@clearmargin
    \caption@iflist{}{\let\caption@setlist\@gobble}%
    \caption@setoptions{sub}%
    \caption@setoptions{subfloat}% for subfig-package compatibility
    \let\caption\caption@subcaption
    \let\@makecaption\caption@makecaption
  \fi}%
\newcommand*\caption@subcaption{%
  \caption@iftype
    {\caption@checkgrouplevel{sub}\subcaption
     \caption@star
       {\caption@refstepcounter\@subcaptype}%
       {\caption@dblarg{\@caption\@subcaptype}}}%
    {\caption@Error{\noexpand\subcaption outside float}}}
\let\caption@kernel@addcontentsline\caption@addcontentsline
\renewcommand*\caption@addcontentsline[2]{%
  \sf@ifpositiontop{\@listsubcaptions{#1}}{}%
  \caption@kernel@addcontentsline{#1}{#2}%
  \sf@ifpositiontop{}{\@listsubcaptions{#1}}%
  \caption@addsubcontentslines{#1}}
\newcommand*\caption@addsubcontentslines[1]{%
  \begingroup
    \caption@subcontentslines
  \endgroup
  \caption@clearsubcontentslines}%
\caption@AtBeginDocument*{%
  \@ifundefined{sf@ifpositiontop}{\let\sf@ifpositiontop\@gobbletwo}{}%
  \caption@clearsubcontentslines
  \g@addto@macro\caption@typehook{\caption@checksubcontentslines}%
  \AtEndDocument{\caption@checksubcontentslines}}%
\newcommand*\caption@addsubcontentsline[3]{%
  \begingroup
  \let\label\@gobble \let\index\@gobble \let\glossary\@gobble
  \protected@edef\@tempa{\endgroup
    \noexpand\g@addto@macro\noexpand\caption@subcontentslines{%
      \noexpand\@namedef{the#2}{\csname the#2\endcsname}%
      \ifx\@currentHref\@undefined \else
        \noexpand\def\noexpand\@currentHref{\@currentHref}%
      \fi
      \protect\addcontentsline{#1}{#2}{#3}}}%
  \@tempa}
\newcommand*\caption@checksubcontentslines{%
  \ifx\caption@subcontentslines\@empty \else
    \caption@Error{%
      Something's wrong--perhaps a missing \protect\caption\MessageBreak
      in the last figure or table}%
    \caption@clearsubcontentslines
  \fi}
\newcommand*\caption@clearsubcontentslines{%
  \global\let\caption@subcontentslines\@empty}
\@ifundefined{smf@makecaption}{}{\let\smf@makecaption\@makecaption}
\@ifclassloaded{beamer}{%
  \caption@Info{beamer document class}%
  \captionsetup{list=false}
  \DeclareCaptionOption{list}[1]{}
  \DeclareCaptionOption{listof}[1]{}
  \expandafter\let\expandafter\caption@ORI@figure
    \csname\string\figure\endcsname
  \@namedef{\string\figure}[#1]{%
    \caption@ORI@figure[#1]%
    \caption@settype{figure}}
  \expandafter\let\expandafter\caption@ORI@table
    \csname\string\table\endcsname
  \@namedef{\string\table}[#1]{%
    \caption@ORI@table[#1]%
    \caption@settype{table}}
}{}
\@ifundefined{scr@caption}{}{%
  \caption@AtBeginDocument{\let\scr@caption\caption}}
\@nameuse{caption@frenchb}\@nameundef{caption@frenchb}
\caption@AtBeginDocument{\@ifundefined{frenchTeXmods}{}{%
  \caption@Info{frenchle/pro package is loaded}%
  \let\captionfont@ORI\captionfont
  \let\captionlabelfont@ORI\captionlabelfont
  \let\@makecaption@ORI\@makecaption

  \@ifundefined{GOfrench}%
    {\let\caption@tempa\@firstofone}%
    {\def\caption@tempa{\g@addto@macro\GOfrench}}%
  \caption@tempa{%
    \let\captionfont\captionfont@ORI
    \let\captionfont@ORI\@undefined
    \let\captionlabelfont\captionlabelfont@ORI
    \let\captionlabelfont@ORI\@undefined
    \let\@makecaption\@makecaption@ORI
    \let\@makecaption@ORI\@undefined
    \let\@cnORI\caption
    \let\caption@tcORI\@tablescaption
    \def\@tablescaption{\caption@star\relax\caption@tcORI}%
    \let\@eatDP\@undefined
    \let\caption@tempa\@empty
    \ifx\f@ffrench\fnum@figure
      \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}%
    \fi
    \ifx\f@tfrench\fnum@table
      \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}%
    \fi
    \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}%
    \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}%
    \caption@tempa
  }%
}}
\newcommand\caption@IfPackageLoaded[1]{%
  \@testopt{\caption@@IfPackageLoaded{#1}}{}}
\@onlypreamble\caption@IfPackageLoaded
\long\def\caption@@IfPackageLoaded#1[#2]#3#4{%
  \@ifpackageloaded{#1}\@firstofone{%
    \caption@Debug{#1 package is not loaded (yet)\@gobble}%
    \caption@AtBeginDocument}{%
      \caption@@ifpackageloaded{#1}[#2]{#3}{#4}}}
\@onlypreamble\caption@@IfPackageLoaded
\newcommand\caption@ifpackageloaded[1]{%
  \@testopt{\caption@@ifpackageloaded{#1}}{}}
\@onlypreamble\caption@ifpackageloaded
\long\def\caption@@ifpackageloaded#1[#2]{%
  \@ifpackageloaded{#1}{%
    \caption@Info{#1 package is loaded}%
    \@ifpackagelater{#1}{#2}\@firstoftwo{%
      \caption@Error{%
        For a successful cooperation we need at least version\MessageBreak
          `#2' of package #1,\MessageBreak
        but only version\MessageBreak
          `\csname ver@#1.\@pkgextension\endcsname'\MessageBreak
        is available}%
      \@secondoftwo}%
  }{\@secondoftwo}}
\@onlypreamble\caption@@ifpackageloaded
\newcommand*\caption@clearmargin{%
  \setcaptionmargin\z@
  \let\caption@minmargin\@undefined}
\caption@setbool{needfreeze}{0}
\caption@AtBeginDocument*{%
  \caption@ifneedfreeze{%
  \newcommand*\caption@freeze{%
    \caption@teststar\caption@@freeze\@gobble\@firstofone}%
  \newcommand*\caption@@freeze[1]{%
    \global\let\caption@SCcontinued\relax
    \global\let\caption@SCsetup\@undefined
    \global\let\caption@SClentry\@undefined
    \global\let\caption@SCtext\@undefined
    \global\let\caption@SClabel\@undefined
    \let\caption@ORI@ContinuedFloat\ContinuedFloat
    \def\ContinuedFloat{%
      \caption@withoptargs\caption@SC@ContinuedFloat}%
    \def\caption@SC@ContinuedFloat##1{%
      \let\caption@ORI@setcounter\setcounter
      \let\caption@ORI@addtocounter\addtocounter
      \def\setcounter####1####2{\csname c@####1\endcsname####2\relax}%
      \def\addtocounter####1####2{\advance\csname c@####1\endcsname ####2\relax}%
      \caption@ORI@ContinuedFloat##1%
      \global\let\caption@SCcontinued\caption@ORI@ContinuedFloat
      \let\setcounter\caption@ORI@setcounter
      \let\addtocounter\caption@ORI@addtocounter}%
    \let\caption@ORI@setup\captionsetup
    \def\captionsetup{%
      \caption@withoptargs\caption@SC@setup}%
    \def\caption@SC@setup##1##2{%
      \caption@g@addto@list\caption@SCsetup{##2}%
      \caption@ORI@setup##1{##2}}%
    \let\caption@ORI\caption
    \def\caption{%
      \def\caption{\caption@Error{%
        Only one \noexpand\caption can be placed in this environment}}%
      \let\captionsetup\caption@setup
      \let\caption@@refstepcounter\caption@l@stepcounter
      \caption@ORI}%
    \long\def\@caption##1[##2]##3{%
      \@bsphack
        \gdef\caption@SClentry{##2}%
        \gdef\caption@SCtext{##3}%
      \@esphack}%
    #1{% is \@gobble in star form, and \@firstofone otherwise
      \def\label##1{\@bsphack\gdef\caption@SClabel{##1}\@esphack}}%
  }%
  \newcommand*\caption@defrost{%
    \ifx\caption@ORI@ContinuedFloat\@undefined
      \caption@defrost@setup
      \ifx\caption@SCtext\@undefined \else
        \expandafter\expandafter\expandafter\caption
          \expandafter\expandafter\expandafter[%
          \expandafter\expandafter\expandafter{%
          \expandafter\caption@SClentry\expandafter}\expandafter]%
          \expandafter{\caption@SCtext}%
      \fi
      \ifx\caption@SClabel\@undefined \else
        \expandafter\label\expandafter{\caption@SClabel}%
      \fi
    \else
      \caption@Error{Internal Error:\MessageBreak
        \noexpand\caption@defrost in same group as \string\caption@freeze}%
    \fi}%
  \newcommand*\caption@defrost@setup{%
    \caption@SCcontinued
    \ifx\caption@SCsetup\@undefined \else
      \expandafter\captionsetup\expandafter{\caption@SCsetup}%
    \fi}%
  }{}%
  \caption@undefbool{needfreeze}}
\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{%
 \@ifpackageloaded{floatrow}{%
  \caption@ifpackageloaded{floatrow}[2007/08/24 v0.2a]{}{}%
 }{%
  \let\caption@ORI@float@setevery\@float@setevery
  \def\@float@setevery#1{%
    \float@ifcaption{#1}{%
      \caption@setposition{\@fs@iftopcapt t\else b\fi}%
      \renewcommand\caption@setfloatcapt[1]{%
        \let\@makecaption\caption@@make
        \global\setbox\@floatcapt\vbox{%
          \color@begingroup ##1\color@endgroup}}%
      \float@getstyle\float@style{#1}%
      \caption@setstyle*\float@style
      \caption@setoptions\float@style
    }{}%
    \caption@freezeHref % will be defrosted in \float@makebox
    \caption@ORI@float@setevery{#1}}%
  \g@addto@macro\caption@typehook{%
    \expandafter\ifx\csname #1name\endcsname\relax
      \expandafter\let\csname #1name\expandafter\endcsname
                      \csname fname@#1\endcsname
    \fi}%
  \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}%
  \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}%
  \providecommand*\float@ifstyle[1]{%
    \expandafter\ifx\csname fst@#1\endcsname\relax
      \expandafter\@secondoftwo
    \else
      \expandafter\@firstoftwo
    \fi}%
  \providecommand*\float@getstyle[2]{%
    \edef#1{%
      \noexpand\expandafter\noexpand\@gobblefour\noexpand\string
        \expandafter\expandafter\expandafter\noexpand
          \csname fst@#2\endcsname}%
    \edef#1{#1}%
    \caption@Debug{floatstyle{#2} = `#1'}}%
  \providecommand*\float@setstyle[2]{%
    \expandafter\edef\csname fst@#1\endcsname{%
      \expandafter\noexpand\csname fs@#2\endcsname}}%
  \providecommand*\float@dostyle[1]{%
    \@nameuse{fst@#1}\@float@setevery{#1}}%
  \providecommand*\float@ifcaption[1]{%
    \expandafter\ifx\csname @float@c@#1\endcsname\float@caption
      \expandafter\@firstoftwo
    \else
      \expandafter\@secondoftwo
    \fi}%
}}{%
  \providecommand*\float@ifstyle[1]{\@secondoftwo}%
  \providecommand*\float@ifcaption[1]{\@secondoftwo}%
}
\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used
\caption@ifbool{ruled}{%
  \captionsetup[ruled]{margin=0pt,minmargin=0,slc=0}%
}{%
  \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}%
}
\caption@undefbool{ruled}
\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{%
  \let\caption@ORI@floatingfigure\floatingfigure
  \def\floatingfigure{%
    \caption@floatflt{figure}%
    \caption@ORI@floatingfigure}%
  \let\caption@ORI@floatingtable\floatingtable
  \def\floatingtable{%
    \caption@floatflt{table}%
    \caption@ORI@floatingtable}%
  \newcommand*\caption@floatflt[1]{%
    \caption@settype{#1}%
    \caption@clearmargin
    \caption@setoptions{floating#1}%
    \let\caption@boxrestore\@parboxrestore}%
}{}
\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{%
  \caption@setbool{needfreeze}{1}%
  \renewcommand\FP@helpNote[2]{%
    \begingroup % save \caption@thepage
      \caption@pageref{#2}%
      \typeout{FP#1 is inserted on page \caption@thepage!}%
    \endgroup}%
  \renewcommand*\FP@floatBegin[1]{%
    \def\@captype{#1}%
    \let\FP@LabelText\@empty
    \begin{lrbox}{\FP@floatCorpusBOX}%
    \caption@ifFPrefcap
      {\caption@freeze\relax}%
      {\def\label##1{\@bsphack\gdef\FP@LabelText{##1}\@esphack}%
       \caption@freeze*}%
    \ignorespaces}%
  \renewcommand*\FP@floatEnd{%
    \end{lrbox}%
    \stepcounter{FP@\@captype C}%
    \caption@label\FP@positionLabel
    \FP@helpNote\@captype\FP@positionLabel
    \edef\FP@RestoreCounter{%
      \noexpand\setcounter{\@captype}{\the\value\@captype}%
      \noexpand\setcounter{ContinuedFloat}{\the\value{ContinuedFloat}}}%
    \FP@float
      {\FP@positionLabel}% location label test
      {\begin\@captype[p!]%
         \usebox\FP@floatCorpusBOX
         \caption@defrost@setup
         \caption@ifFPlistcap
           {\caption@refstepcounter\@captype
            \expandafter\caption@makecurrent\expandafter\@captype
                                         \expandafter{\caption@SClentry}}%
           {\expandafter\captionlistentry\expandafter{\caption@SClentry}}%
         \caption@makeanchor\relax
         \ifx\FP@LabelText\@empty \else
           \expandafter\label\expandafter{\FP@LabelText}%
         \fi
       \end\@captype}%
      {\FP@RestoreCounter
       \@ifundefined{theH\@captype}{}{%
         \expandafter\l@addto@macro\csname theH\@captype\endcsname{.FP}}}%
      {\begin\@captype[b!]%
         \let\FP@savedSetfnumCommand\caption@setfnum
         \def\caption@setfnum##1{%
           \FP@savedSetfnumCommand{##1}%
           \ifx\FP@guide\@empty \else
             \expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}%
           \fi}%
         \setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption
         \setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption
         \caption@setoptions{FP\@captype}%
         \FP@separatorCaption
         \caption@ifFPlistcap{}{\let\caption@addcontentsline\@gobbletwo}%
         \caption@defrost
       \end\@captype}%
  }%
  \caption@For{typelist}{%
    \newcounter{FP@#1C}%
    \newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}}%
}{%
  \let\caption@ifFPlistcap\@undefined
  \let\caption@ifFPrefcap\@undefined
}
\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{%
  \@ifundefined{hyper@makecurrent}{% hyperref has stopped early
    \caption@WarningNoLine{%
      Hyperref support is turned off\MessageBreak
      because hyperref has stopped early}%
  }{%
    \g@addto@macro\caption@prepareslc{\measuring@true}%
    \renewcommand*\caption@@refstepcounter{\H@refstepcounter}%
    \renewcommand*\caption@makecurrent[2]{%
      \caption@makecurrentHref{#1}%
      \caption@Debug{hyperref current=\@currentHref}%
      \def\@currentlabelname{#2}}%
    \newcommand*\caption@makecurrentHref{\hyper@makecurrent}%
    \renewcommand\caption@makeanchor[1]{%
      \caption@Debug{hyperref anchor: \@currentHref}%
      % If we cannot have nesting, the anchor is empty.
      \ifHy@nesting
        \hyper@@anchor{\@currentHref}{#1}%
      \else
        \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#1%
      \fi}%
    \g@addto@macro\caption@prepareslc{\let\caption@makeanchor\@firstofone}%
    \newif\if@capstart
    \def\caption@start{\caption@ifhypcap\caption@start@\relax}%
    \def\caption@start@{%
      \caption@makestart\@captype
      \caption@startanchor\@currentHref
      \global\@capstarttrue
      \let\hc@currentHref\@currentHref
      \def\caption@makecurrentHref##1{%
        \global\@capstartfalse
        \global\let\@currentHref\hc@currentHref}%
      \let\caption@makeanchor\@firstofone
    }%
    \newcommand*\caption@makestart[1]{%
      \begingroup
        \Hy@hypertexnamesfalse
        \hyper@makecurrent{#1.caption}%
      \endgroup
      \caption@Debug{hypcap start=\@currentHref}}%
    \newcommand*\caption@startanchor[1]{%
      \ifvmode\begingroup
        \caption@Debug{hypcap anchor: #1 (vertical mode)}%
        \@tempdima\prevdepth
        \nointerlineskip
        \vspace*{-\caption@hypcapspace}%
        \caption@anchor{#1}%
        \vspace*{\caption@hypcapspace}%
        \prevdepth\@tempdima
      \endgroup\else
        \caption@Debug{hypcap anchor: #1 (horizontal mode)}%
        \caption@anchor{#1}%
      \fi}%
    \newcommand*\caption@anchor[1]{%
      \ifmeasuring@ \else
        \caption@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}%
      \fi}%
    \ifx\HyperRaiseLinkLength\@tempdima
      \def\caption@raisedlink#1{\ifvmode#1\else\Hy@raisedlink{#1}\fi}%
    \else
      \let\caption@raisedlink\Hy@raisedlink
    \fi
    \def\caption@@start{%
      \@ifundefined{hc@currentHref}{%
        \caption@Warning{%
          The option `hypcap=true' will be ignored for this\MessageBreak
          particular \string\caption}}{}}%
    \def\caption@freezeHref{%
      \let\caption@ORI@start\caption@start
      \def\caption@start{\let\caption@start\caption@ORI@start}%
      \global\let\caption@currentHref\@undefined
      \def\caption@@start{\global\let\caption@currentHref\@currentHref}%
      \let\caption@ORI@setfloatcapt\caption@setfloatcapt
      \renewcommand*\caption@setfloatcapt{%
        \ifx\caption@currentHref\@undefined \else
          \let\caption@makeanchor\@firstofone
        \fi
        \caption@ORI@setfloatcapt}}%
    \def\caption@defrostHref{%
      \ifx\caption@currentHref\@undefined \else
        \caption@startanchor\caption@currentHref
        \global\let\caption@currentHref\@undefined
      \fi}%
    \@ifundefined{HyOrg@float@makebox}{}{%
      \caption@Debug{%
        Redefining \noexpand\float@makebox (again)\@gobble}%
      \let\caption@ORI@float@makebox\float@makebox % save for compatibility mode
      \renewcommand\float@makebox[1]{%
        \HyOrg@float@makebox{#1\relax \caption@defrostHref}}%
    }%
}}{}
\caption@IfPackageLoaded{hypcap}{% v1.0
  \ifx\caption@start\relax \else % hyperref hasn't stopped early
    \let\caption@ORI@capstart\capstart % save for compatibility mode
    \@ifundefined{capstarttrue}% check for v1.10 of hypcap package
      {\def\capstart{\caption@start@}}%
      {\def\capstart{\ifcapstart\caption@start@\fi}}%
    \let\caption@start\relax
    \let\caption@@start\relax
    \caption@set@bool\caption@ifhypcap 1%
    \renewcommand*\caption@hypcapspace{\hypcapspace}%
  \fi}{}
\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{%
  \let\caption@ORI@lst@MakeCaption\lst@MakeCaption
  \def\lst@MakeCaption#1{% #1 is `t' or `b'
    \begingroup
      \caption@setposition{#1}%
      \caption@iftop{%
        \@tempdima\belowcaptionskip
        \belowcaptionskip\abovecaptionskip
        \abovecaptionskip\@tempdima}{}%
      \caption@setup{rule=0}%
      \caption@setoptions{lstlisting}%
      \caption@setautoposition{#1}%
      \caption@begin{lstlisting}%
        \caption@ORI@lst@MakeCaption{#1}%
      \caption@end
    \endgroup}%
  \def\lst@makecaption{\caption@starfalse\@makecaption}%
  \def\lst@maketitle{\caption@startrue\@makecaption\@empty}%
  \providecommand*\ext@lstlisting{lol}%
}{}
\providecommand*\LTcaptype{table}
\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{%
  \RequirePackage{ltcaption}[2007/09/01]%
  \let\LT@@makecaption\@undefined
  \caption@AtBeginDocument{%
    \let\caption@ORI@LT@array\LT@array
    \renewcommand*\LT@array{%
      \global\let\caption@opt@@longtable\@undefined
      \def\captionsetup{%
        \noalign\bgroup
        \@ifstar\@captionsetup\@captionsetup}% gobble *
      \def\@captionsetup##1{\LT@captionsetup{##1}\egroup}%
      \def\LT@captionsetup##1{%
        \captionsetup@startrue\caption@setup@options[@longtable]{##1}%
        \global\let\caption@opt@@longtable\caption@opt@@longtable}%
      \def\@captionabovetrue{\LT@captionsetup{position=t}}%
      \def\@captionabovefalse{\LT@captionsetup{position=b}}%
      \def\captionlistentry{%
        \noalign\bgroup
        \@ifstar{\egroup\LT@captionlistentry}% gobble *
                {\egroup\LT@captionlistentry}}%
      \def\LT@captionlistentry##1{%
        \caption@listentry\@firstoftwo[\LTcaptype]{##1}}%
%%        \let\Hy@LT@currentHlabel\@currentHlabel
%%          \let\@currentHlabel\Hy@LT@currentHlabel
      \def\ContinuedFloat{\noalign{%
        \caption@Error{\noexpand\ContinuedFloat outside float}}}%
      \caption@ORI@LT@array}}%
  \long\def\LT@c@ption#1[#2]#3{%
    \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}%
    \LT@captionlistentry{#2}}%
  \renewcommand\LT@makecaption[3]{%
    \caption@LT@make{%
      \caption@settype*\LTcaptype
      \ifdim\LTcapwidth=4in \else
        \setcaptionwidth\LTcapwidth
      \fi
      \caption@setoptions{longtable}%
      \caption@setoptions{@longtable}%
      \caption@setautoposition{\ifcase\LT@rows t\else b\fi}%
      \caption@startrue#1\caption@starfalse
      \caption@resetContinuedFloat\LTcaptype
      \caption@begin\LTcaptype
        \caption@normalsize
        \vskip-\ht\strutbox
        \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}%
        \caption@@make{#2}{#3}\endgraf
        \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}%
      \caption@end}}%
}{}
\caption@IfPackageLoaded{picinpar}{%
  \long\def\figwindow[#1,#2,#3,#4] {%
    \caption@window{figure}%
    \caption@setoptions{figwindow}%
    \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }%
  \long\def\tabwindow[#1,#2,#3,#4] {%
    \caption@window{table}%
    \caption@setoptions{tabwindow}%
    \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }%
  \newcommand*\caption@window[1]{%
    \let\caption@boxrestore\@parboxrestore
    \let\@makecaption\caption@@make
    \caption@setautoposition b%
    \caption@settype{#1}%
    \caption@clearmargin}%
  \newcommand\caption@wincaption[1]{%
    \ifdim\picwd=\z@
      \let\caption@makecurrent\@gobbletwo
      \let\caption@@start\relax
      \caption@prepareslc
    \fi
    \edef\@tempa{\expandafter\noexpand\@car#1\@nil}%
    \if\@tempa*%
      \let\@tempa\@firstofone
    \else\if\@tempa[%]
      \let\@tempa\@firstofone
    \else
      \let\@tempa\@empty
    \fi\fi
    \expandafter\caption\@tempa{#1}}%
}{}
\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}}
\caption@IfPackageLoaded{picins}{%
  \@ifundefined{@piccaptype}{%
    \caption@iftype{%
      \let\@piccaptype\@captype
    }{%
      \def\@piccaptype{figure}%
    }%
  }{}%
  \let\@captype\@undefined
  \def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}%
  \let\caption@ORI@make@piccaption\make@piccaption
  \def\make@piccaption{%
    \let\caption@ORI\caption
    \long\def\caption[##1]##2{%
      \caption@freezeHref % will be defrosted in \ivparpic
      \caption@settype\@piccaptype
        \caption@clearmargin
      \caption@setoptions{parpic}%
      \let\caption@boxrestore\@parboxrestore
      \caption@setautoposition b%
      \expandafter\expandafter\expandafter\caption@ORI
        \expandafter\expandafter\expandafter[%
        \expandafter\expandafter\expandafter{%
        \expandafter##1\expandafter}\expandafter]\expandafter{##2}}%
    \caption@ORI@make@piccaption
    \let\caption\caption@ORI}%

  \let\caption@ORI@ivparpic\ivparpic
  \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{%
    \let\caption@ORI@noindent\noindent
    \def\noindent{%
      \caption@defrostHref
      \let\noindent\caption@ORI@noindent
      \noindent}%
    \caption@ORI@ivparpic(#1,#2)(#3,#4)[#5][#6]{#7}%
    \let\noindent\caption@ORI@noindent}%
}{%
  \let\piccaptiontype\@undefined
}
\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{%
  \def\rotcaption{\let\@makecaption\@makerotcaption\caption}%
  \def\rotcaptionof{%
    \caption@teststar\caption@of{\rotcaption*}\rotcaption}%
  \long\def\@makerotcaption#1#2{%
    \ifdim\captionwidth=\z@
      \setcaptionwidth{.8\textheight}%
      \caption@slc{#1}{#2}{.8\vsize}{%
        \let\caption@makerot\caption@@make
        \caption@clearmargin
        \let\caption@parbox\@secondoftwo}%
      \caption@set@bool\caption@ifslc0% been there, done that
    \fi
    \rotatebox{90}{\caption@makerot{#1}{#2}}%
    \nobreak\hspace{12pt}}%
  \newcommand\caption@makerot[2]{%
    \begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}%
  \caption@For{typelist}{%
    \newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}%
    \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}}%
}{}
\caption@IfPackageLoaded{sidecap}[1999/05/11 v1.4d]{%
  \caption@setbool{needfreeze}{1}%
  \caption@AtBeginDocument{\let\SC@caption=\caption}%
  \let\caption@ORI@SC@zfloat\SC@zfloat
  \def\SC@zfloat#1#2#3[#4]{%
    \let\caption@ORI\caption
    \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]%
    \let\caption\caption@ORI
    \caption@settype*{#2}%
    \caption@freeze*}%
  \let\caption@ORI@endSC@FLOAT\endSC@FLOAT
  \def\endSC@FLOAT{%
    \let\caption@ORI@settype\caption@settype
    \def\caption@settype##1{% will be done in \@xfloat
      \caption@ORI@settype*{##1}% do not change \@currentlabel
      \caption@setSC@justify
%%%   \caption@setoptions{SCfloat}%
      \caption@setoptions{SC\@captype}%
      \caption@start}%
    \def\caption@setSC@justify{%
      \caption@clearmargin
      \@ifundefined{SC@justify}{}{%
        \ifx\SC@justify\@empty \else
          \let\caption@hj\SC@justify
          \let\SC@justify\@empty
        \fi}}%
    \let\caption\SC@orig@caption
    \def\SC@orig@caption[##1]##2{\caption@defrost}%
    \caption@setSC@justify % for compatibility mode
    \caption@ORI@endSC@FLOAT}%
  \newcommand*\caption@For@SC[2]{%
    \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6)
    \newenvironment{SC#2}%
      {\SC@float[#1]{#2}}{\endSC@float}%
    \newenvironment{SC#2*}%
      {\SC@dblfloat[#1]{#2}}{\endSC@dblfloat}}%
  \@onlypreamble\caption@For@SC
  \caption@For{typelist}{%
    \expandafter\caption@For@SC\csname SC@#1@vpos\endcsname{#1}}%
}{}
\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{%
  \def\sf@ifpositiontop{%
    \ifx\@captype\@undefined
      \expandafter\@gobbletwo
    \else\ifx\@captype\relax
      \expandafter\expandafter\expandafter\@gobbletwo
    \else
      \expandafter\expandafter\expandafter\sf@if@position@top
    \fi\fi}
  \def\sf@if@position@top{%
    \@ifundefined{if\@captype topcap}%
      {\@gobbletwo}%
      {\@nameuse{if\@captype topcap}%
         \expandafter\@firstoftwo
       \else
         \expandafter\@secondoftwo
       \fi}}
}{}
\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{%
  \renewcommand*\tablecaption{%
    \caption@star
      {\refstepcounter{table}}%
      {\caption@dblarg{\@xtablecaption}}}%
  \let\caption@ORI@xtablecaption\@xtablecaption
  \long\def\@xtablecaption[#1]#2{%
    \def\@currentlabelname{#2}%
    \caption@ORI@xtablecaption[#1]{#2}}%
  \long\def\ST@caption#1[#2]#3{\par%
    \caption@settype*{#1}%
    \caption@setoptions{supertabular}%
    \def\caption@fixposition{%
      \caption@setposition{\if@topcaption t\else b\fi}}%
    \caption@beginex{#1}{#2}{#3}%
      \caption@boxrestore
      \caption@normalsize
      \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
    \caption@end}%
}{}
\caption@IfPackageLoaded{xtab}[2000/04/09 v2.3]{%
  \renewcommand*\tablecaption{%
    \caption@star
      {\refstepcounter{table}}%
      {\caption@dblarg{\@xtablecaption}}}%
  \let\caption@ORI@xtablecaption\@xtablecaption
  \long\def\@xtablecaption[#1]#2{%
    \def\@currentlabelname{#2}%
    \caption@ORI@xtablecaption[#1]{#2}}%
  \long\def\ST@caption#1[#2]#3{\par%
    \caption@settype*{#1}%
    \caption@setoptions{xtabular}%
    \def\caption@fixposition{%
      \caption@setposition{\if@topcaption t\else b\fi}}%
    \@initisotab
    \caption@beginex{#1}{#2}{#3}%
      \caption@boxrestore
      \caption@normalsize
      \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
    \caption@end
    \global\advance\ST@pageleft -\PWSTcapht
    \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}}%
}{}
\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{%
  \let\caption@ORI@threeparttable\threeparttable
  \renewcommand*\threeparttable{%
    \caption@settype{table}%
      \caption@setposition a% ?
      \caption@clearmargin
    \caption@setoptions{threeparttable}%
    \caption@ORI@threeparttable}%
  \let\caption@ORI@measuredfigure\measuredfigure
  \renewcommand*\measuredfigure{%
    \caption@settype{figure}%
      \caption@setposition a% ?
      \caption@clearmargin
    \caption@setoptions{measuredfigure}%
    \caption@ORI@measuredfigure}%
  \def\TPT@caption#1[#2]#3{%
    \gdef\TPT@docapt{%
      \global\let\TPT@docapt\@undefined
      \caption@setautoposition\caption@TPT@position
      \TPT@LA@caption{#1}[{#2}]{#3}}%
    \ifx\TPT@hsize\@empty
      \let\label\TPT@gatherlabel % Bug: does not work for measuredfigures
      \gdef\caption@TPT@position{t}%
      \g@addto@macro\TPT@docapt\caption@TPT@eatvskip
    \else
      \def\caption@TPT@position{b}%
      \TPT@docapt
    \fi
    \ignorespaces}%
  %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}%
  \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}%
}{}
\caption@IfPackageLoaded{wrapfig}{% ver 3.3  (Oct 12, 1999)
  \providecommand*\float@ifstyle[1]{%
    \expandafter\ifx\csname fst@#1\endcsname\relax
      \expandafter\@secondoftwo
    \else
      \expandafter\@firstoftwo
    \fi}%
  \newcommand*\caption@restylewrapfloat[1]{%
    \expandafter\ifx\csname caption@OUR@wrap#1\expandafter\endcsname
                    \csname wrap#1\endcsname
      \caption@Error{%
        For a successful cooperation of the `wrapfig' package\MessageBreak
        with the `float' package you should load the `wrapfig'\MessageBreak
        package *after* the `float' package}%
    \else
      \expandafter\let\csname caption@ORI@wrap#1\expandafter\endcsname
                      \csname wrap#1\endcsname
      \@namedef{wrap#1}{\caption@wrapfloat{#1}}%
      \expandafter\let\csname caption@OUR@wrap#1\expandafter\endcsname
                      \csname wrap#1\endcsname
    \fi}%
  \newcommand*\caption@wrapfloat[1]{%
    \caption@settype*{#1}%
    \float@ifstyle{#1}{%
      \ifx\WF@floatstyhook\@undefined
        \caption@Error{%
          For a successful cooperation of the `wrapfig' package\MessageBreak
          with the `float' package you should use at least\MessageBreak
          `wrapfig' version 3.6}%
      \else
        \float@dostyle{#1}%
      \fi}{}%
    \caption@clearmargin
%%% \caption@setoptions{wrapfloat}%
    \caption@setoptions{wrap#1}%
    \@nameuse{caption@ORI@wrap#1}}%
  \caption@restylewrapfloat{figure}%
  \caption@restylewrapfloat{table}%
  \caption@For{typelist}{%
    \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}%
    \caption@restylewrapfloat{#1}}%
  \ifx\WF@floatstyhook\@undefined \else % wrapfig v3.6
    \@ifundefined{float@restyle}{}{%
      \toks@=\expandafter{\float@restyle{#1}% (env may or may not be defined)
        \caption@restylewrapfloat{#1}}%
      \edef\@tempa{\def\noexpand\float@restyle##1{\the\toks@}}%
      \@tempa}% perform redefinitions
    \let\caption@ORI@wrapfloat\wrapfloat
    \def\wrapfloat#1{%
      \float@ifstyle{#1}{%
        \caption@Error{%
          For a successful cooperation of the `wrapfig' package\MessageBreak
          with the `float' package you should load the `wrapfig'\MessageBreak
          package *right after* the `float' package}}{}%
      \caption@ORI@wrapfloat{#1}}%
  \fi                                   % wrapfig v3.6
  \def\WF@rapt[#1]#2{% final two args: #1 = overhang,  #2 = width,
    \gdef\WF@ovh{#1}% hold overhang for later, when \width is known
    \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}%
      \caption@start
    \ifdim\hsize>\z@ \@parboxrestore \else
    \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption
    \ignorespaces \fi}%
}{}
\endinput
%%
%% End of file `caption.sty'.
