summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/source/latex/floatrow/floatrow.dtx7104
-rw-r--r--Master/texmf-dist/source/latex/floatrow/floatrow.ins39
2 files changed, 7143 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/floatrow/floatrow.dtx b/Master/texmf-dist/source/latex/floatrow/floatrow.dtx
new file mode 100644
index 00000000000..01ccd3d3174
--- /dev/null
+++ b/Master/texmf-dist/source/latex/floatrow/floatrow.dtx
@@ -0,0 +1,7104 @@
+% \iffalse
+% floatrow.dtx - The float row package (extension of float package)
+% (c) 2004-2005 Olga Lapko (Lapko.O@g23.relcom.ru)
+%
+% This package borrowed code (core parts) from:
+% float package 2001/11/08 v1.3d,
+% Copyright (C) 1991-2000 Anselm Lingnau
+% rotfloat package, 2002/02/02 v1.1,
+% Copyright (c) 1995-2002 Axel Sommerfeldt
+%
+% During creation of floatsetup stuff there was borrowed code structure
+% from caption package v3.x ((c) 1994-2005 by Axel Sommerfeldt)
+%
+% This program is provided under the terms of the
+% LaTeX Project Public License distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt.
+%
+%<*dtx>
+ \ProvidesFile{floatrow.dtx}
+%</dtx>
+%<floatrow,frfancy,floatpagestyle>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+%<floatrow>\ProvidesPackage{floatrow}
+%<frfancy>\ProvidesPackage{fr-fancy}
+%<floatpagestyle>\ProvidesPackage{floatpagestyle}
+%
+% \ProvidesFile{floatrow.dtx}
+%<floatrow> [2005/07/15 v0.1g floatrow package: the float package extension]
+%<frfancy> [2005/07/15 v0.1g floatrow: fancy boxes]
+%<floatpagestyle> [2005/07/15 v0.1g floating page style]
+%
+%<*driver>
+\input pictures
+\listfiles
+\documentclass[twoside]{ltxdoc}
+
+\usepackage{calc}
+\usepackage{tabularx,array}
+
+\IfFileExists{titlesec.sty}{\usepackage[raggedright]{titlesec}}{}
+
+\IfFileExists{footmisc.sty}{\usepackage[perpage]{footmisc}}{}
+
+\usepackage{floatpagestyle}
+
+\usepackage[font=small,labelfont=bf,labelsep=period,justification=centerlast]%
+ {caption}[2004/11/28]
+\usepackage[format=default,justification=centerlast,labelfont=up]{subfig}[2005/06/28]
+
+\IfFileExists{rotating.sty}{\usepackage[figuresright]{rotating}}{}
+
+\usepackage{wrapfig}
+\usepackage[vflt]{floatflt}
+\usepackage{picins}
+%^^A\RequirePackage[writefile]{listings}[2004/09/07]
+
+\usepackage[style=plain,font=small,footskip=.5\skip\footins,
+ footnoterule=fullsize,margins=centering,objectset=centering,floatrowsep=qquad,
+ captionskip=5pt,capbesidesep=quad,facing=yes,capbesideposition=inside]{floatrow}
+
+\usepackage{fr-fancy}
+
+\IfFileExists{hyperref.sty}{\usepackage{hyperref}
+ \IfFileExists{hypcap.sty}{\usepackage{hypcap}}{}
+}{}
+\ifx\pdftexversion\undefined
+ \IfFileExists{pstricks.sty}{\usepackage{pstricks}}{}
+\fi
+\IfFileExists{makecell.sty}{\usepackage{makecell}}{}
+\makeatletter
+\@ifundefined{thead}%
+ {\newcommand\thead[1]{\footnotesize
+ \raisebox{0pt}[\height+\jot][\depth+\jot]{\begin{tabular}{@{}c@{}} #1\end{tabular}}}
+%^^A For this documentation only
+ \def\multirowthead#1[#2]#3{\raisebox{-1.5ex}{\thead{#3}}}}{}
+\makeatother
+
+\IfFileExists{multirow.sty}{\usepackage{multirow}}{}
+\IfFileExists{lscape.sty}{\usepackage{lscape}}{}
+
+\floatsetup[table]{style=Plaintop,footnoterule=none}
+
+\floatstyle{ruled}
+\newfloat{Program}{tbp}{lop}[section]
+
+\DeclareFloatStyle{MyBoxed}{style=Boxed,captionskip=5pt,frameset={\fboxrule1pt\fboxsep12pt}}
+\DeclareFloatVCode{lowthickrule}{\kern2pt\hrule height.8ptdepth0pt}
+
+\DeclareNewFloatType{Example}%
+ {placement=tb,within=section,fileext=lox}
+
+%^^A for Appendix-----------
+\DeclareFloatSeparators{none}{}
+\DeclareFloatSeparators{cicero}{\hskip1cc}
+\DeclareFloatSeparators{enskip}{\hskip.5em}
+\DeclareFloatSeparators{mcapwidth}{\hskip-\FCwidth}
+
+\newfloatcommand{fcapsideleft}{figure}[{\capbeside
+ \captionsetup[capbesidefigure]{format=break,labelsep=none,
+ justification=raggedleft}\thisfloatsetup{capbesideposition=left}}][\FBwidth]
+\newfloatcommand{fcapsideright}{figure}[{\capbeside
+ \captionsetup[capbesidefigure]{format=break,labelsep=none,
+ justification=raggedright}\thisfloatsetup{capbesideposition=right}}][\FBwidth]
+%^^A -----------------------
+
+\def\rightlast{\leftskip0ptplus1fil
+ \rightskip0ptplus-1fil\parfillskip0ptplus1fil}
+\def\leftlast{\leftskip0pt\rightskip0pt\parfillskip0ptplus1fil}
+%^^A for all versions of caption 3.x?
+\DeclareCaptionFormat{flushrightlabel}{\leavevmode\rightline{#1}#2\par#3\par}
+\DeclareCaptionJustification{togglelast}
+ {\floatfacing*\rightlast\leftlast}
+\DeclareCaptionStyle{capbesidefigure}{justification=togglelast}
+\captionsetup[table]%
+ {format=flushrightlabel,textfont=bf,labelsep=none,labelfont=sl,captionskip=5pt}
+\captionsetup[capbesidefigure]{justification=togglelast}
+\captionsetup[floatfoot]{format=default}
+
+%^^A for Appendix-----------
+\DeclareCaptionFormat{break}{#1#2\par#3\par}
+%^^A -----------------------
+
+\makeatletter
+\evensidemargin\oddsidemargin
+\@mparswitchfalse
+\widowpenalty10000
+\clubpenalty10000
+\@beginparpenalty10000
+\@itempenalty1000
+\@endparpenalty0
+\tolerance2000
+\hbadness8000
+\vbadness5000
+\def\l@subsection{\@dottedtocline {2}{1.5em}{2.7em}}
+\def\l@subsubsection{\@dottedtocline {3}{4.2em}{3.6em}}
+
+\newcommand\Resizebox[5]{\setbox0\hbox{\setlength\unitlength{#1/#3}%^^A
+ \ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi{#5}}%^^A
+ \@tempdima\ht0\advance\@tempdima\dp0%^^A
+ \ifdim\@tempdima>#2\setlength\unitlength{#2/#4}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+ {#5}\else\box0\fi}
+
+\providecommand*{\file}[1]{\texttt{#1}}
+\providecommand*{\pkg}[1]{\textsf{#1}}
+\providecommand*{\cls}[1]{\textsf{#1}}
+\providecommand*{\env}[1]{\texttt{#1}}
+\providecommand*{\meta}[1]{$\langle$\textit{#1}$\rangle$}
+
+\newenvironment{Options}[1]%
+ {\list{}{\renewcommand{\makelabel}[1]{\texttt{##1}\hfil}%
+ \settowidth{\labelwidth}{\texttt{#1\space}}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{0pt}%
+ \setlength{\parsep}{0pt}%
+ }}%
+ {\endlist}
+\def\OptionLabel{RaggedRight}
+
+\DeclareRobustCommand\La{L\kern-.36em%
+ {\sbox\z@ T%
+ \vbox to\ht\z@{\hbox{\check@mathfonts
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ }
+\makeatother
+
+\OnlyDescription
+\let\PrintChanges\relax
+\EnableCrossrefs
+\RecordChanges
+\begin{document}
+ \DocInput{floatrow.dtx}
+ \PrintChanges
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{4182}
+%
+%
+% \changes{v0.1e}{2005/03/22}{The user documentation loaded inside \file{floatrow.dtx}.}
+%
+% \GetFileInfo{floatrow.dtx}
+%
+% \ifx\pspicture\undefined\else\psset{unit=1pt}\fi
+%
+% \def\fileversion{v0.1g}
+% \def\filedate{2005/07/15}
+% \title{The \pkg{floatrow} package\thanks{This
+% file has version number \fileversion, last revised
+% \filedate.}}
+%
+% \author{%
+% Olga Lapko\\
+% {\tt Lapko.O@g23.relcom.ru} }
+% \date{\filedate}
+% \maketitle
+%
+% \begin{abstract}
+% This package was created like extension or addition of \pkg{float}
+% package. The \pkg{floatrow} borrows core code from \pkg{float}\footnote{\pkg{float}
+% package, version v1.3d dated 2001/11/08, \copyright{} 1991-2000
+% Anselm Lingnau.} and \pkg{rotfloat}\footnote{\pkg{rotfloat} package,
+% version v1.2 dated 2004/01/04, \copyright{} 1995--2004 Axel
+% Sommerfeldt.} packages, so you must not load these packages.
+%
+% The \pkg{float} package has good mechanism for creation (and easy
+% modification) of common layout for all floats without
+% adding any repeated code in document; unfortunately it deals only
+% with alone (plain) object---caption combinations.
+%
+% Current package extends this mechanism and allows:
+% \begin{itemize}\itemsep0pt\parskip0pt
+% \item%
+% to change width of float box;
+% \item%
+% to set width for float box, which equals to the width of object;
+% \item%
+% to put caption beside object;
+% \item%
+% to put a few floats side by side on the row;
+% \item%
+% to put footnotes inside float box (using \env{minipage}-like mode);
+% and also put legend-like text;
+% \item%
+% to create or modify special layout for each type of float and for different
+% positioning of float and its components (two-column or rotated float).
+% \end{itemize}
+%
+% The \pkg{floatrow} package is cooperated with \pkg{caption} package
+% (version 3.0 and later). Also the \pkg{floatrow} package (like
+% \pkg{caption} one) uses \pkg{keyval} package mechanism for layout settings.
+% \medskip
+%
+% \begingroup
+% \slshape
+% I think I did my best to follow this idea and I hope that someone likes this idea:
+% helps to maintain this idea anyway, or finds bugs and absurdities in this package
+% or documentation.
+% \endgroup
+% \medskip
+%
+% {Document terminology}:
+% \begin{description}\itemsep0pt\parskip0pt
+% \item[float] could include \emph{object}, \emph{caption}, and \emph{foot material};
+% \emph{float} is created by \env{figure} or \env{table} environments (\emph{plain float}),
+% or in |\floatbox| command;
+%
+% \item[object]\env{tabular} or graphics, as contents
+% of table (\env{figure}) or figure (\env{table}) or other type of float;
+%
+% \item[caption]text in |\caption|;
+%
+% \item[foot material]explications, legends and/or footnotes inside \emph{float} box (|\footnote|/|\mpfootnotemark|/|\footnotetext|, and |\floatfoot| macros).
+% \end{description}
+% \end{abstract}
+%
+% \clearpage
+% \begingroup
+% \small
+% \tableofcontents
+% \listoffigures
+% \listoftables
+% \endgroup
+% \clearpage
+% \suppressfloats[t]
+%
+% \section{Introduction}
+%
+% One of the first macros of package, created for float contents, is a macro which
+% builds contents of table environment with caption above. The width of
+% caption equals to the width of contents, e.g. of tabular (see table~\ref{intro:table}).
+%\begin{verbatim}
+%\begin{table}
+%\ttabbox
+% {\caption{A table ...}\label{...}}
+% {\begin{tabular}...\end{tabular}}
+%\end{table}
+%\end{verbatim}
+% \begin{table}[h]
+% \ttabbox
+% {\caption{A table with caption above}\label{intro:table}}
+% {\begin{tabular}{|c|c|c|}
+% \hline
+% \thead{First data} & \thead{Second data} & \thead{Third data} \\
+% \hline
+% A & B & C \\
+% D & E & F \\
+% \hline
+% \end{tabular}}
+% \end{table}%^^A
+%
+% The pair of this command, which creates figures---|\ffigbox|---puts
+% caption below contents and default width of caption equals
+% to the width of main text. The default
+% layout of |\ffigbox| is similar to plain \env{figure} environment;
+% this macro will be useful for creation of beside floats (see
+% example with figures~\ref{intro:leftfig} and~\ref{intro:rightfig})
+%
+% The third macro---|\fcapside| (figure~\ref{intro:beside})---puts
+% caption beside:
+%
+%\begin{verbatim}
+%\begin{figure}
+%\fcapside
+% {\caption[Beside caption]{Beside caption ...}\label{...}}
+% {...}
+%\end{figure}
+%\end{verbatim}
+% \begin{figure}[h]
+% \fcapside
+% {\caption[Beside caption (`one-column' width)]{Beside caption
+% (width of caption equals to the width of object) and more text
+% and some more text and a bit more text and
+% a little more text and a little peace of text to fill
+% space}\label{intro:beside}}
+% {{\setlength\unitlength{4cm/58}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{Mouse.picture}}}
+% \end{figure}
+%
+% These three commands abbreviate |\floatbox| command, which creates
+% float boxes (see section~\ref{sec:floatbox}).
+%
+% The \env{floatrow} environment allows to put floats side by side, like
+% figures~\ref{intro:leftfig} and~\ref{intro:rightfig}. By default \env{floatrow}
+% creates necessary number of ``columns'' (usually two) where floats are placed:
+%\begin{verbatim}
+%\begin{figure}
+% \begin{floatrow}
+% \ffigbox
+% {...}{\caption{...}\label{...}}
+%
+% \ffigbox
+% {...}{\caption{...}\label{...}}
+% \end{floatrow}
+%\end{figure}
+%\end{verbatim}
+% \begin{figure}[h]
+% \begin{floatrow}
+% \ffigbox
+% {\input{BlackDog.picture}}
+% {\caption{Left beside figure of simple row}%
+% \label{intro:leftfig}}%
+%
+% \ffigbox
+% {\caption{Beside figure at the right side of simple figure row}\label{fig:rotrow:FcatI}}
+% {\input{TheCat.picture}\label{intro:rightfig}}
+% \end{floatrow}
+% \end{figure}%^^A
+% Please note that inside \env{floatrow} you must use |\ffigbox| or |\ttabbox| macros for
+% each float box. (See also sections~\ref{sec:floatbox} for
+% more information about commands used in introduction and |\floatbox| command;
+% and \ref{sec:floatrow} about \env{floatrow} environment.)
+%
+% \subsection{Do not write that with \pkg{floatrow} package}
+%
+% The \pkg{floatrow} package creates some features or limitations
+% of float layout building. If you'll write something like
+%\begin{verbatim}
+%\begin{figure}
+%\caption{A figure caption}
+%\centering \input{Mouse.picture}
+%\end{figure}
+%\end{verbatim}
+% please do not expect that caption appears at the top of figure.
+% If you want, e.g. to put figure captions above its contents, you must write in preamble
+% |\floatsetup[figure]{style=plaintop}| (see also section~\ref{sec:floatsetup}
+% about |\floatsetup| mechanism).
+%
+%^^A \begin{figure}
+%^^A \caption{A figure caption}\label{Wrong:expect}
+%^^A \centering \input{Mouse.picture}
+%^^A \end{figure}
+%
+% Another example. If you put beside floats by following way:
+%\begin{verbatim}
+%\begin{figure}
+%\begin{minipage}{0.5\textwidth}
+%\centering \input{Mouse.picture}
+%\caption{A figure caption}
+%\end{minipage}
+%\begin{minipage}{0.5\textwidth}
+%\captionof{table}{A table caption}
+%\centering \begin{tabular}{cc} A & B \\ C & D \end{tabular}
+%\end{minipage}
+%\end{figure}
+%\end{verbatim}
+% you also won't get expected result. Use \env{floatrow}, like in example with
+% figures~\ref{intro:leftfig} and~\ref{intro:rightfig} to get correct result\footnote{See also
+% the page~\pageref{mixrow} about mixed float rows}.
+%
+% \section{Float Layout Settings}\label{sec:floatsetup}
+%
+% The idea of \pkg{floatrow} package is to avoid a lot of repeated code
+% inside document for creation of desired layout for floats (which also
+% lowers readability of document), and make layout modification easier
+% if you ought to change book layout. In this case you could think only
+% about \emph{markup} of floats and their contents.
+%
+% The easy modification of common layout of all float of for one type of
+% float is possible because of the borrowed code from the \pkg{float}
+% package, which allows to modify layout of float boxes as a whole.
+%
+% The common layout and its modification for captions and special settings for each type
+% of float supported by \pkg{caption} package, version~3.x.
+%
+% The layout settings of \pkg{floatrow} package are built similarly
+% to \pkg{caption} ones and use |\floatsetup|\footnote{Some key and
+% option names were changed from version 0.1d, the reason was
+% to arrange and make names more memorable, and, sometimes, reduction
+% of their names (see section~\ref{sec:changed}).} mechanism which is
+% analog to |\captionsetup| one\footnote{Look also at \pkg{caption}
+% documentation (version 3.0 and later)}.
+%
+% \DescribeMacro{\floatsetup}
+% You may use layout settings stuff as \pkg{floatrow} option in |\usepackage|
+% line.
+% \begin{quote}
+% |\usepackage[|\meta{options}|]{floatrow}|
+% \end{quote}
+% You may write
+% \begin{quote}
+% |\usepackage[style=boxed,font=small]{floatrow}|
+% \end{quote}
+% The same result you get with
+% \begin{quote}
+% |\floatsetup{style=boxed,font=small}|
+% \end{quote}
+% The lines above declare \texttt{boxed} style and |\small| font for float
+% contents. These settings were loaded for \emph{all} float types.
+%
+% The |\floatsetup| command has following form:
+% \begin{quote}
+% |\floatsetup|\oarg{float type}\marg{options}
+% \end{quote}
+%
+% For defining of a special style for float of one type use optional
+% argument with name of necessary float type. The following command
+% \begin{quote}
+% |\floatsetup[table]{style=Plaintop}|
+% \end{quote}
+% sets a special float style for tables (captions are placed above
+% float objects; in the case of beside floats inside \env{floatrow} environment
+% captions aligned by top line)\footnote{The keys, used in special settings for float
+% of one type, are always ``stronger'' than synonym keys in common setting. In other
+% words, if you want after example above to redefine float style for all floats with
+% \cmd{\floatsetup\{style={\normalfont \meta{option}}\}} you won't change tables---use
+% \cmd{\floatsetup[table]}\allowbreak\texttt{\{style={\normalfont \meta{option}}\}}
+% again.}.
+%
+% There are also special options of |\floatsetup| for settings for floats
+% in different positioning: two-column floats (starred environment, like \env{figure*}, you may also use,
+% for example, for wide floats) rotated floats etc.
+% The ``strength'' of options in the lists below decreases from
+% previous item to next one (examples based on \env{figure} environment):
+% \begin{itemize}\label{stsetorder}\itemsep0pt\parskip0pt
+% \item Wide or two-column floats (e.g. \env{figure*}, you may load special settings
+% for starred environments even in one-column document):
+% \begin{itemize}
+% \item |\floatsetup[widefigure]|---the ``strongest'' settings; if they absent,
+% package uses settings from next item;
+% \item |\floatsetup[widefloat]|---these settings ``stronger'' than settings
+% from next item (|\floatsetup[figure]|); if they absent, package uses
+% settings from next item;
+% \item |\floatsetup[figure]|; if they absent, package uses settings from
+% optional argument in |\usepackage| line or |\floatsetup{...}| command;
+% if they absent---default package settings (see page~\pageref{sec:default});
+% \end{itemize}
+% \item Wrapped floats (\env{wrapfigure}):
+% \begin{itemize}\itemsep0pt\parskip.5\parskip
+% \item |\floatsetup[wrapfigure]|;
+% \item |\floatsetup[wrapfloat]|;
+% \item |\floatsetup[figure]|;
+% \end{itemize}
+% \item Rotated floats (in environments, like \env{sidewaysfigure}):
+% \begin{itemize}\itemsep0pt\parskip.5\parskip
+% \item |\floatsetup[rotfigure]|;
+% \item |\floatsetup[rotfloat]|;
+% \item |\floatsetup[figure]|;
+% \end{itemize}
+% \item Wide rotated floats (\env{sidewaysfigure*})\footnote{The settings for wide float
+% (\texttt{widefloat}, \texttt{widefigure}) removed---use settings
+% for \texttt{widerotfloat} and---here---\texttt{widerotfigure}}:
+% \begin{itemize}\itemsep0pt\parskip.5\parskip
+% \item |\floatsetup[widerotfigure]|;
+% \item |\floatsetup[widerotfloat]|;
+% \item |\floatsetup[rotfigure]|;
+% \item |\floatsetup[rotfloat]|;
+% \item |\floatsetup[figure]|;
+% \end{itemize}
+% \item Floats with beside captions:
+% \begin{itemize}\itemsep0pt
+% \item |\floatsetup[capbesidefigure]|;
+% \item |\floatsetup[capbesidefloat]|;
+% \item setting of outer environments from previous items:
+% \env{sidewaysfigure*}, \env{sidewaysfigure}, and \env{figure*}.
+% \end{itemize}
+% Please note, that usage if \texttt{style=} key (see beginning of next section)
+% cancels settings for beside position of caption.
+% \end{itemize}
+% You can also create and change special settings for captions, using the
+% same \meta{float~type} options in |\captionsetup| stuff.
+%
+% The next few sections describe keys of |\floatsetup| macro.
+%
+% \subsection{Floatsetup Keys}\label{sec:floatsetup}
+%
+% \subsubsection{Float Style}
+%
+% \DescribeMacro{style=}
+% The \emph{float style} is specified by
+% following way:
+% \begin{quote}
+% |style=|\meta{float style name}\quad ,
+% \end{quote}
+% the \meta{float style name} you may take from
+% table~\ref{tab:floatlayouts}.
+%
+%
+% The caption's \texttt{ruled} style is the only one from \pkg{float}
+% package, which was predefined in \pkg{caption} package. To use it,
+% write
+% \begin{quote}
+% |\captionsetup[figure]{style=ruled}|\quad .
+% \end{quote}
+%
+% \begin{sidewaystable}%[p]%
+% \extrarowheight1pt\tabcolsep.5\tabcolsep
+% \newcommand\leftcell[2][16.5mm]{\extrarowheight0pt\def\arraystretch{.75}
+% \hspace*{-\tabcolsep}\begin{tabular}[t]{>{\footnotesize
+% \ttfamily\noindent\vphantom{\small()\mpfootnotemark[1]}}p{#1}}#2\end{tabular}%
+% \hspace*{-\tabcolsep}\ignorespaces}
+% \emptyfloatpage
+% \begin{tabularx}\hsize{|@{}l@{}|@{}l@{}|X|}
+% \hline
+% \hfil\thead{Style} &
+% \hfil\thead{\cmd{\floatsetup} keys} &
+% \hfil\thead{Description} \\
+% \hline
+% \multicolumn{3}{|c|}{Offered by \pkg{floatrow} package}\\
+% \hline \leftcell{\texttt{plain}{\mpfootnotemark[1]}}
+% & \leftcell{\meta{none}}
+% &Standard \LaTeX's layout
+% \\\hline
+% \leftcell{\texttt{plaintop}{\mpfootnotemark[1]}
+% \\\hline\texttt{Plaintop}{\mpfootnotemark[2]}}
+% & \leftcell[50mm]{capposition=top\\\hline
+% capposition=TOP}
+% &The same as \texttt{plain} but puts caption at the top---analog of
+% \pkg{float} package style. Capitalized form aligns captions above
+% object by top line in \env{floatrow} environment
+% \\\hline
+% \leftcell{\texttt{ruled}{\mpfootnotemark[1]}
+% \\ \\ \\\hline\texttt{Ruled}}
+% & \leftcell[50mm]{capposition=top,precode=thickrule,\\
+% midcode=rule,postcode=lowrule,\\
+% heightadjust=all\\\hline
+% style=ruled,capposition=TOP}
+% &The first one emulates \pkg{float} package's co-named style.
+% Capitalized form aligns captions above object by top line in
+% \env{floatrow} environment
+% \\\hline
+% \leftcell{\texttt{boxed}\smash{\mpfootnotemark[1]\mpfootnotemark[2]}
+% \\ \\ \\\hline\texttt{Boxed}
+% \\\hline\texttt{BOXED}}
+% & \leftcell[50mm]{captionskip=2pt,framestyle=fbox,\\
+% heightadjust=object,\\framearound=object\\\hline
+% style=boxed,framefit=yes\\\hline
+% framestyle=fbox,framefit=yes,\\
+% heightadjust=all,framearound=all}
+% &The first one emulates \pkg{float} package's style:
+% object's width equals to \cmd{\hsize} or
+% predefined width of float box; frame climbs out to the right and
+% left sides. In capitalized form frame fits the
+% \cmd{\hsize} or predefined width; width of
+% object reduced to fit inside frame. Uppercase form
+% draws frame which fits to current \cmd{\hsize} or predefined width,
+% but around full float: caption, object and foot material.
+% \\\hline
+% \multicolumn{3}{|c|}{Offered by \pkg{fr-fancy} package.
+% They also need \pkg{fancybox} package.}\\
+% \hline \leftcell{\texttt{shadowbox}\smash{\mpfootnotemark[2]}
+% \\\hline\texttt{Shadowbox}
+% \\\hline\texttt{SHADOWBOX}}
+% & \leftcell[50mm]{style=boxed,framestyle=shadowbox\\ \hline
+% style=Boxed,framestyle=shadowbox\\ \hline
+% style=BOXED,framestyle=shadowbox}
+% &The same as \texttt{boxed}, \texttt{Boxed} and \texttt{BOXED}
+% consequently. The \cmd{\fbox} frame changed to \cmd{\shadowbox}
+% from \pkg{fancybox} package.
+% \\\hline
+% \leftcell{\texttt{doublebox}\smash{\mpfootnotemark[2]}
+% \\\hline\texttt{Doublebox}\\\hline\texttt{DOUBLEBOX}}
+% & \leftcell[50mm]{style=boxed,framestyle=doublebox\\\hline
+% style=Boxed,framestyle=doublebox\\\hline
+% style=BOXED,framestyle=doublebox}
+% &The same as \texttt{boxed}, \texttt{Boxed} and \texttt{BOXED}
+% consequently. The \cmd{\fbox} frame changed to \cmd{\doublebox}
+% from \pkg{fancybox} package.
+% \\\hline
+% \multicolumn{3}{|c|}{Additional float style. It also needs
+% \pkg{fancybox} package.}\\\hline
+% \leftcell{\texttt{wshadowbox}\smash{\mpfootnotemark[2]}
+% \\\hline\texttt{Wshadowbox}
+% \\\hline\texttt{WSHADOWBOX}}
+% & \leftcell[50mm]{style=boxed,framestyle=wshadowbox\\\hline
+% style=Boxed,framestyle=wshadowbox\\\hline
+% style=BOXED,framestyle=wshadowbox}
+% &The same as \texttt{boxed}, \texttt{Boxed} and \texttt{BOXED}
+% consequently. The \cmd{\fbox} frame changed to \cmd{\wshadowbox},
+% based on \cmd{\shadowbox} (but drops white shade from frame, or
+% draws edges of ``second copy'') from \pkg{fancybox} package.
+% \\\hline
+% \end{tabularx}
+%
+% \caption{Float layout styles}\label{tab:floatlayouts}%
+%
+% \floatfoot{When there is set float style with frame around object of
+% fitted to the text width (like \texttt{Boxed}, etc.), and \cmd{\floatbox}
+% macro uses \cmd{\FBwidth} command as \meta{width} option, which sets box
+% width equal to float object's width (see page~\pageref{sec:floatbox}),
+% the width of all float other elements in this case enlarged to get width
+% of framed object.}
+%
+% \footnotetext[1]{The styles analogous to \pkg{float} package style.}
+% \footnotetext[2]{During usage of these styles in \env{floatrow} environment
+% you ought to enlarge space between floats, using key \texttt{floatrowsep}).}
+% \end{sidewaystable}
+% \label{setup:start}
+%
+%^^A\pagebreak[4]
+%
+% \subsubsection{Font settings}
+%
+% \DescribeMacro{font=}
+% Defines font for float object contents. Option
+% analogous to |font| key in |\captionsetup| stuff.\nopagebreak
+%
+% Available font setting options:
+%
+% \begin{Options}{\OptionLabel}
+% \item[scriptsize] {\scriptsize Very small size}
+% \item[footnotesize] {\footnotesize The size usually used for footnotes}
+% \item[small] {\small Small size}
+% \item[normalsize] {\normalsize Normal size}
+% \item[large] {\large Large size}
+% \item[Large] {\Large Even larger size}
+%
+% \item[up] {\upshape Upright shape}
+% \item[it] {\itshape Italic shape}
+% \item[sl] {\slshape Slanted shape}
+% \item[sc] {\scshape Small Caps shape}
+%
+% \item[md] {\mdseries Medium series}
+% \item[bf] {\bfseries Bold series}
+%
+% \item[rm] {\rmfamily Roman family}
+% \item[sf] {\sffamily Sans Serif family}
+% \item[tt] {\ttfamily Typewriter family}
+% \end{Options}
+%
+% You may set font for float object like
+% \begin{quote}
+% |font=small|
+% \end{quote}
+% or
+% \begin{quote}
+% |font={small,sf}|\quad .
+% \end{quote}
+%
+% \DescribeMacro{footfont=}\label{sec:setfloatfoot}%^^A
+% Defines font for legends or
+% explications. This macro uses |\captionsetup| mechanism (because
+% |\floatfoot| macro uses \pkg{caption} mechanism). By default the font size of float
+% foot text equals to footnote text: |footfont=footnotesize|.
+%
+% \subsubsection{Position of Caption and of Other Elements}
+%
+% \DescribeMacro{capposition=}
+% Defines position of captions. It is
+% similar to \texttt{position=} key in \pkg{caption} package, but it
+% has two additional options\footnote{The option \texttt{auto} isn't used by
+% \texttt{capposition=}.}: \texttt{TOP}, if you prefer to align
+% captions above objects, in the case of beside floats (in \env{floatrow} environment),
+% by the top line; and \texttt{beside} to put caption beside object (this option could
+% be more preferable in settings for one environment, see about
+% |\thisfloatsetup| on the page~\pageref{thisfloatsetup}):
+% \begin{Options}{\OptionLabel}
+% \item[top] caption above object (equals to |\captop| command);
+% \item[TOP] caption above object and also aligned by top line in float
+% row (equals to |\CAPTOP| command).
+% For example the \texttt{Plaintop} style is the variant of \texttt{plaintop}
+% where used |capposition=TOP| settings,
+% see tables~\ref{tab:row:tabIII}--\ref{tab:row:tabIV};
+% \item[bottom] caption below object (equals to |\capbot| command);
+% \item[beside] caption beside object (equals to |\capbeside| command).
+% \end{Options}
+%
+% \DeleteShortVerb{\|}%
+% \begin{table}[h]
+% \begin{floatrow}
+% \extrarowheight1pt
+% \ttabbox
+% {\caption[Beside table~I long header]%^^A
+% {Beside table~I with long long long top aligned caption}\label{tab:row:tabIII}}%^^A
+% {\begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|}
+% \hline
+% \multirowthead{2}[-1ex]{Left Column Head}
+% & \multicolumn{2}{c|}{\thead{Data}} \\
+% \cline{2-3}
+% & \multicolumn{1}{c|}{\thead{I}}
+% & \multicolumn{1}{c|}{\thead{II}}
+% \\\hline
+% First row & 1 & 2 \\
+% Second row & 3 & 4 \\
+% Third row & 6 & 8 \\
+% Fourth row & \llap{1}0 & \llap{1}6 \\
+% \hline
+% \end{tabular}}
+%
+% \ttabbox
+% {\caption{Beside table~II with top aligned
+% caption}\label{tab:row:tabIV}}%^^A
+% {\begin{tabular}{|l|c|c|c|}
+% \hline
+% \multirowthead{2}[-1ex]{Column Head}
+% & \multicolumn{3}{c|}{\thead{Data}} \\
+% \cline{2-4}
+% & \thead{I} & \thead{II} & \thead{III} \\
+% \hline
+% First row & 1 & 2 & \phantom01 \\
+% Second row & 3 & 4 & \phantom06 \\
+% Third row & 6 & 8 & 28 \\
+% \hline
+% \end{tabular}}
+% \end{floatrow}
+% \end{table}
+% \MakeShortVerb{\|}%
+%
+% \emph{Note}. The option \texttt{TOP} uses |\label|---|\ref|
+% mechanism, so to get necessary result with it you must run \LaTeX{}
+% twice (when you make changes in contents which could change number
+% of lines you get correct result also on the second run).
+%
+% \DescribeMacro{capbesideposition=}
+% Defines position of beside captions: vertical and horizontal.
+% For horizontal position there are defined four options:
+% \begin{Options}{\OptionLabel}
+% \item[left]
+% caption is printed to the left side of object;
+% \item[right]
+% caption is printed to the right side of object;
+% \item[inside]
+% caption is printed in binding side of page if |twoside| option switched on
+% in document class;
+% \item[outside]
+% least popular option: caption printed in
+% outer side of page if |twoside| option switched on
+% in document class.
+% \end{Options}
+%
+% For vertical position there are defined three options
+% \begin{Options}{\OptionLabel}\samepage
+% \item[top]
+% caption aligned to the top of object;
+% \item[bottom]
+% caption aligned to the bottom of object;
+% \item[center]
+% caption aligned to the center of float contents.
+% \end{Options}
+% You may define position of beside caption by following:
+% \begin{quote}
+% |capbesideposition={top,outside}|\quad.
+% \end{quote}
+%
+% \noindent
+% \DescribeMacro{capbesidewidth=}
+% Defines width of beside caption (this option could be more preferable in settings
+% for one environment, see about |\thisfloatsetup| on the
+% page~\pageref{thisfloatsetup}). You may set:
+% \begin{quote}
+% |capbesidewidth=4cm|\quad.
+% \end{quote}
+% If you'll write \texttt{capbesidewidth=none} or \texttt{capbesidewidth=sidefill}
+% (this is default key setting), the width of caption will be counted by usual way,
+% accordingly to float width (i.e. occupies the rest width of float
+% box, see figure~\ref{fig:beside:mouse} on the
+% page~\pageref{fig:beside:mouse}).
+%
+% \noindent
+% \DescribeMacro{capbesideframe=}
+% This boolean key declares whether beside caption stays
+% near framed object (\texttt{capbesideframe=yes}) in this case caption lines
+% aligned by top or bottom of frame; otherwise caption lines will be aligned with
+% top or bottom of framed object's \emph{contents} (\texttt{capbesideframe=no}).
+%
+% \penalty-5000
+% \subsubsection{Defining Float Foot Position (Legends and Footnotes)}\label{sec:footposition}
+%
+% \DescribeMacro{footposition=}\label{foot:pos}%^^A
+% Defines position of |\footnote|'s and |\floatfoot|'s in float box
+% with above/below captions.
+% \begin{Options}{\OptionLabel}
+% \item[default]
+% if caption above float object foot material is placed below float object
+% otherwise---below caption;
+% \item[caption]
+% always placed below caption;
+% \item[bottom]
+% always placed at the bottom of float box.
+% \end{Options}
+% See examples in file \file{frsample01.tex}. In the case of caption
+% beside float object, footnotes and foot text always placed below
+% caption.
+%
+% \subsubsection{Defining Vertical Alignment}\label{sec:heightadjust}
+%
+% \DescribeMacro{heightadjust=}
+% Defines whether the common maximum height of objects
+% or/and captions in \env{floatrow} will be used. It has
+% following options
+% \begin{Options}{\OptionLabel}\samepage
+% \item[all]
+% adjust both caption and object heights (e.g. for styles \texttt{Ruled} and \texttt{BOXED});
+% \item[caption]
+% adjust caption heights (e.g. for styles \texttt{Plaintop});
+% \item[object]
+% adjust object heights (e.g. for styles \texttt{Boxed});
+% \item[none]
+% nothing to be adjusted;
+% \item[nocaption]
+% no adjusting for captions;
+% \item[noobject]
+% no adjusting for objects;
+% \end{Options}
+% You may define height adjustment even as followed:
+% \begin{quote}
+% |heightadjust={caption,noobject}|\quad.
+% \end{quote}
+%
+% \noindent
+% \DescribeMacro{valign=}
+% Defines vertical alignment of
+% float objects in \env{floatrow} if |heightadjust=all| or
+% |heightadjust=object|, or |\floatbox| stuff uses \meta{height} argument with
+% value, larger than height of object. The options of this key analogous to
+% vertical alignment option in \env{minipage} environment and |\parbox| command. Default option is |c|
+% (centered vertical alignment).
+% \begin{Options}{\OptionLabel}\samepage
+% \item[t]
+% aligns objects by top line;
+% \item[c]
+% aligns objects by center line;
+% \item[b]
+% aligns objects by bottom line;
+% \item[s]
+% stretches objects by full height (if it is possible).
+% \end{Options}
+%
+% \subsubsection{Facing Layout}
+%
+% \DescribeMacro{facing=} This key defines whether facing layout used
+% for floats. This key works if |twoside| option switched on in
+% document class.
+%
+% \subsubsection{Defining Float Margins and Object Settings}\label{sec:set:box}
+%
+% \DescribeMacro{margins=}
+% Defines margins of alone float boxes with
+% captions above/below, of float boxes with beside captions, and of
+% \env{floatrow} environments. It has following three predefined
+% options:
+% \begin{Options}{\OptionLabel}
+% \item[centering]
+% float box centered;
+% \item[raggedright]
+% float flushed to the left;
+% \item[raggedleft]
+% float flushed to the right.
+% \end{Options}
+% You may create your own alignment settings, see
+% page~\pageref{ssec:decl:marg}.
+%
+% \noindent
+% \DescribeMacro{objectset=}\DescribeMacro{justification=}
+% Defines justification of float object
+% (float contents). Predefined options are similar to
+% \texttt{justification=} key in |\captionsetup|.
+% \begin{Options}{\OptionLabel}
+% \item[justified]
+% Typesets the object text as a normal paragraph. (This is the default.)
+%
+% \item[centering]
+% Each line of the object text will be centered.
+%
+% \item[raggedright]
+% Each line of the object text will be moved to the left margin.
+%
+% \item[RaggedRight]
+% Each line of the object text will be moved to the left margin, too.
+% But this time the command |\RaggedRight| of the \pkg{ragged2e} package
+% will be used to achieve this. This difference is that this time the word
+% breaking algorithm of \TeX\ will work inside the object text.
+%
+% \item[raggedleft]
+% Each line of the object text will be moved to the right margin.
+%
+% \item[RaggedLeft]
+% Analogous to |RaggedRight|.
+%
+% \end{Options}
+% You may also create your own settings (see
+% page~\pageref{ssec:decl:rule})
+%
+% \noindent
+% \DescribeMacro{floatwidth=}
+% You may use this key for redefinition of width of floats below. You may use
+% \begin{quote}
+% |floatwidth=.6\hsize|
+% \end{quote}
+% or
+% \begin{quote}
+% |floatwidth=7cm|
+% \end{quote}
+% This key could be useful in settings
+% for one float environment (see about |\thisfloatsetup| on the page
+% \pageref{thisfloatsetup}).
+%
+% If you use option \texttt{floatwidth=sidefill} for objects with beside captions
+% (in the case of key \texttt{capbesidewidth=} uses absolute value, like \texttt{4cm}) the
+% object (instead of caption) occupies the rest space of float box
+% (see appendix, figure~\ref{fig:capbeside:trick} on the
+% page~\pageref{fig:capbeside:trick})
+%
+% \subsubsection{Defining Float Separators}\label{sec:set:sep}
+%
+% \noindent
+% \DescribeMacro{floatrowsep=}
+% Sets separation material between beside float boxes (defined
+% by |\floatbox| macro etc., see page~\pageref{sec:floatbox}) inside \env{floatrow}
+% environment (see page~\pageref{sec:floatrow}).
+%
+% \noindent
+% \DescribeMacro{capbesidesep=}
+% Sets separation material between object and beside caption.
+%
+% Both key settings work similarly to |labelsep=| key
+% from |\captionsetup|.
+%
+% They use following predefined options:
+% \begin{Options}{\OptionLabel}
+% \item[columnsep]
+% horizontal skip${}={}$|\columnsep|;
+% \item[quad]
+% horizontal skip${}={}1$\,em;
+% \item[qquad]
+% horizontal skip${}={}2$\,em;
+% \item[hfil]
+% horizontal skip${}={}1$\,fil (like |\hfil|);
+% \item[hfill]
+% horizontal skip${}={}1$\,fill (like |\hfill|);
+% \item[none]
+% empty separator.
+% \end{Options}
+%
+% \subsubsection{Defining Float Rules/Skips}\label{sec:set:rule}
+%
+% \DescribeMacro{precode=}
+% Defines skip, rule or other analogous code above float box.
+%
+% \noindent
+% \DescribeMacro{rowprecode=}
+% Defines skip, rule or other analogous code above alone float box, or, in the case of beside floats
+% inside \env{floatrow} environment, above float row (see page~\pageref{fig:rotrow:WcatI}).
+%
+% \noindent
+% \DescribeMacro{midcode=}
+% Defines skip, rule or other analogous code between
+% caption above/below and float object.
+%
+% \noindent
+% \DescribeMacro{postcode=}
+% Defines skip, rule or other analogous code below float box.
+%
+% \noindent
+% \DescribeMacro{rowpostcode=}
+% Defines skip, rule or other analogous code below alone float box, or, in the case of beside floats
+% inside \env{floatrow} environment, below float row (see page~\pageref{fig:rotrow:WcatI}).
+%
+% For all these keys there are predefined following options (settings
+% were taken from styles created in \pkg{float} package):
+% \begin{Options}{\OptionLabel}\makeatletter\@itempenalty10000\makeatother
+% \item[none]
+% absent code;
+% \item[thickrule]
+% thick rule (.8pt) with 2pt vertical skip below---rule above float box in \texttt{ruled} style;
+% \item[rule]
+% rule of default thickness (.4pt), with 2pt vertical skips above and below---middle rule in \texttt{ruled} style;
+% \item[lowrule]
+% rule of default thickness (.4pt), with 2pt vertical skip above---rule below float box in \texttt{ruled} style;
+% \item[captionskip]
+% vertical skip equal to value, defined in |captionskip=| key.
+% \end{Options}
+% You may create your own options, see page~\pageref{ssec:decl:rule}.
+%
+% \subsubsection{Defining Float Frames}
+%
+% \DescribeMacro{framestyle=}
+% Defines type of frame; the
+% \pkg{floatrow} package offers only one type of frame:
+% \begin{Options}{\OptionLabel}
+% \item[fbox]
+% Standard frame.
+% \end{Options}
+% There are options for additional frames, offered by \pkg{fr-fancy}
+% package, installed with \env{floatrow}:
+% \begin{Options}{\OptionLabel}
+% \item[colorbox]
+% colored frame, needs also \pkg{color} package;
+% if not defined, there is used |\fbox|;
+% \item[doublebox]
+% double frame, needs also \pkg{fancybox} package;
+% \item[shadowbox]
+% frame with shadow, needs also \pkg{fancybox} package;
+% \item[wshadowbox]
+% modified \texttt{shadowbox} frame (frame with ``white shadow''), needs also \pkg{fancybox} package;
+% \end{Options}
+%
+% \noindent
+% \DescribeMacro{framearound=}
+% Declares element of float box to be framed:
+% \begin{Options}{\OptionLabel}
+% \item[object]
+% float object contents;
+% \item[all]
+% full float box including object, caption, and any foot text.
+% \end{Options}
+%
+% \noindent
+% \DescribeMacro{framefit=}
+% Boolean which sets whether the \textit{frame width} will
+% be equal to current |\hsize| or predefined width of
+% float box (\texttt{framefit=yes}), in this case object size reduced;
+% or the frame climbs out in the left and
+% right sides, and \textit{width of object} has current
+% |\hsize| or predefined width of float box (\texttt{framefit=no}).
+%
+% \noindent
+% \DescribeMacro{frameset=}
+% The parameters for chosen frame; there are no options
+% for this key, just write something like:
+% \begin{quote}
+% |frameset={\fboxrule1pt\fboxsep12pt}|\quad.
+% \end{quote}
+%
+% \noindent
+% \DescribeMacro{colorframeset=}
+% Offered by \pkg{fr-fancy} package: defines
+% concrete color box (default is standard |\fbox|).
+% In current version you may use only |\fcolorbox| as color box. You
+% may define your color box like
+% \begin{quote}
+% |colorframeset={\fcolorbox{white}{yellow}}|\quad.
+% \end{quote}
+%
+% \subsubsection{Defining Float Skips}
+%
+% \DescribeMacro{captionskip=}
+% Defines vertical space between caption
+% and float object in case of |midcode| key defined as
+% |midcode=captionskip|; or in case of usage of float styles (\texttt{style=} key)
+% \texttt{plain}, \texttt{plaintop} or \texttt{Plaintop}:
+% \begin{quote}
+% |captionskip=10pt|\quad.
+% \end{quote}
+%
+% \noindent
+% \DescribeMacro{footskip=}
+% Defines vertical space before foot material and footnotes.
+% \begin{quote}
+% |footskip=4pt|\quad,
+% \end{quote}
+% or
+% \begin{quote}
+% |footskip=\skip\footins|\quad.
+% \end{quote}
+%
+% \subsubsection{Defining Float Footnote Rule's Style}\label{sec:footnotestyle}
+%
+% \DescribeMacro{footnoterule=}
+% Defines type of footnote rule for footnotes inside float environment.
+% \begin{Options}{\OptionLabel}
+% \item[normal]
+% standard \LaTeX{} definition, used in \env{minipage} environments, the width of it equals
+% to 0.4 of current with of text (|\columnwidth|);
+% \item[limited]
+% like previous one but max width of footnote rule equals to the value
+% defined by |\frulemax| command, like:
+% \begin{quote}
+% |\newcommand\frulemax{1in}|
+% \end{quote}
+% \item[fullsize]
+% rule to full current text width.
+% \item[none]
+% Absent rule.
+% \end{Options}
+%
+% \label{setup:end}
+%
+% %^^A ???needed?
+% \subsubsection{Loading Style for Fancy Boxes}
+%
+% \DescribeMacro{fancyboxes=}
+% This boolean key loads \pkg{fr-fancy} package. This key you may use
+% only in optional argument in |\usepackage| line.
+%
+% \subsection{Settings for One Float}
+%
+% \DescribeMacro{\thisfloatsetup}\label{thisfloatsetup}%^^A
+% You may define some settings only for one float just
+% before necessary environment. Command |\thisfloatsetup| could
+% contain the same keys and options as in |\floatsetup|. It has
+% only mandatory argument\footnote{The \cmd{\thisfloatsetup} defined
+% as abbreviation of \cmd{\floatsetup[tmpset]} command.}.\par\strut\par\kern-\baselineskip
+%
+%^^A Please note that |\thisfloatsetup| doesn't overwrite co-named key
+%^^A declarations from settings like |\floatsetup[|\meta{options}|]|---this command
+%^^A created e.g for temporary change of float or caption widths: keys \texttt{captionwidth=}
+%^^A \texttt{floatwidth} do not used usually in |\floatsetup| stuff.
+%
+%
+% \subsection{Clearing of Previous Float Type Settings}
+%
+% \DescribeMacro{\clearfloatsetup}
+% If you want to get rid of parameters marked
+% for an automatic use within a particular environment
+% you can use the command\footnote{See also documentation
+% of \pkg{caption} package about \cmd{\clearcaptionsetup} command}:
+% \begin{quote}
+% |\clearfloatsetup|\marg{Typ}\quad.
+% \end{quote}
+%
+% %^^A !!!for footnotes!
+% %^^A \newpage
+%
+% \subsection{The Default Float Type Settings}\label{sec:default}
+%
+% The following keys and options are switched on when \pkg{floatrow}
+% package loaded. They equal to \texttt{plain} style:
+% \begin{Options}{\OptionLabel}
+% \item[font=normalsize]
+% \item[footfont=footnotesize]
+% \item[capposition=bottom]
+% \item[capbesideposition=inside]
+% \item[capbesideframe=no]
+% \item[footposition=default]
+% \item[heightadjust=none]
+% \item[facing=no]
+% \item[margins=centering]
+% \item[objectset=centering] ($\equiv$\texttt{justification=centering})
+% \item[floatrowsep=columnsep]
+% \item[capbesidesep=columnsep]
+% \item[precode=none]
+% \item[rawprecode=none]
+% \item[postcode=none]
+% \item[rawpostcode=none]
+% \item[midcode=captionskip]
+% \item[captionskip=10pt]
+% \end{Options}
+%
+%
+% \subsection{Defining new options}
+%
+% In the next few sections goes a small list of commands, which define key
+% options for |\floatsetup|. The examples of option definitions were taken
+% mainly from \pkg{floatrow} definitions.
+%
+% \subsubsection{Float Style}
+%
+% \DescribeMacro{\DeclareFloatStyle}
+% Defines new float style. Example shows definition of new float
+% style \texttt{MyBoxed}. The figures~\ref{fig:plain:MyBoxed}, and
+% some others in current documentation show result.
+%\begin{verbatim}
+%\DeclareFloatStyle{MyBoxed}{style=Boxed,captionskip=5pt,
+% frameset={\fboxrule1pt\fboxsep12pt}}
+%\floatsetup[figure]{style=MyBoxed}
+%\end{verbatim}
+%
+% \begingroup
+%
+% \floatsetup[figure]{style=MyBoxed}
+% \begin{figure}[!t]
+% {\input{BlackCat.picture}}%
+% \caption{%^^A
+% Plain figure in \texttt{MyBoxed} style}%
+% \label{fig:plain:MyBoxed}%
+% \floatfoot{Much more, more and more and more and more and more and more and
+% more and more text inside macro \cmd{\floatfoot}}%
+% \end{figure}
+%
+% The same result you get with:
+%\begin{verbatim}
+%\floatsetup[figure]{style=Boxed,captionskip=5pt,
+% frameset={\fboxsep12pt\fboxrule1pt}}
+%\end{verbatim}
+% \endgroup
+%
+% \subsubsection{Defining Float Rules/Skips}\label{ssec:decl:rule}
+%
+% \DescribeMacro{\DeclareFloatVCode}
+% This command defines the skip, rule or other analogous code above and below full float
+% box and between caption above/below and
+% object. The defined option you may use in \texttt{rowprecode},
+% \texttt{precode}, \texttt{midcode}, \texttt{postcode}, and
+% \texttt{rowpostcode} keys.
+% \begin{quote}
+% |\DeclareFloatVCode{thickrule}{\hrule height.8ptdepth0pt%|\\
+% \strut\qquad|\kern2pt}|
+% \end{quote}
+%
+% \subsubsection{Float Object Justification}\label{ssec:decl:marg}
+%
+% \DescribeMacro{\DeclareObjectSet}
+% You may define justification for \texttt{objectset=} key like\nopagebreak:
+% \begin{quote}
+% |\DeclareObjectSet{centering}{\centering}|
+% \end{quote}
+% In option's definition you may try to include any regular commands
+% which you need to put before each object contents in float
+% environment\footnote{You may also use key options declared by
+% \cmd{\DeclareCaptionJustification} command of \pkg{caption} package
+% as options for \texttt{objectset=} key.}.\par\strut\par\kern-\baselineskip
+%
+% \subsubsection{Float Box Alignment (and Some Other Settings)}\label{ssec:decl:marg}
+%
+% \DescribeMacro{\DeclareMarginSet}\label{fsetup:besmarg}%^^A
+% You may define box alignment for float box (\texttt{margins=} key) like:
+% \begin{quote}
+% |\DeclareMarginSet{center}{%|\\
+% | \setfloatmargins{\hfil}{\hfil}}|
+% \end{quote}
+% or like (see also sample files)
+% \begin{quote}
+% |\DeclareMarginSet{outside}{%|\\
+% | \setfloatmargins*{\hfil}{}}|
+% \end{quote}
+%
+% Non-starred form of |\setfloatmargins| defines left and right
+% margin.
+% \begin{quote}
+% |\setfloatmargins{|\meta{left margin}|}{|\meta{right margin}|}|
+% \end{quote}
+%
+% Starred form, |\setfloatmargins*|, defines facing layout: inside and
+% outside margin.
+% \begin{quote}
+% |\setfloatmargins*{|\meta{inside margin}|}{|\meta{outside margin}|}|
+% \end{quote}
+%
+% You may set even much more complex definition:
+% \begin{quote}\leftmargin0pt
+% |\DeclareObjectSet{facingrule}{%|
+% |\setfloatmargins*{%|\\
+% | \floatfacing{\hskip-12pt\vrule width4pt\hskip8pt\hfill}%|\\
+% | {\hfill\hskip8pt\vrule width4pt\hskip-12pt}}{}}|
+% \end{quote}
+% the |\floatfacing| defines following
+% \begin{quote}
+% |\floatfacing{|\meta{odd page definition}|}{|\meta{even page definition}|}|
+% \end{quote}
+% This macro has also starred form |\floatfacing*|,
+% which you can use in key options for |\captionsetup| stuff.
+%
+% The |\setfloatmargins| consists of three macros which set margins
+% for three main variants of float positions:
+% \begin{Options}{\OptionLabel}
+% \item[\cmd{\floatboxmargins}]sets left/right margins around alone float box;
+% \item[\cmd{\floatrowmargins}]sets left/right margins around \env{floatrow} environment;
+% \item[\cmd{\floatcapbesidemargins}]sets left/right margins around
+% alone float box with beside caption.
+% \end{Options}
+% The grammar for using three mentioned commands is similar to
+% |\setfloatmargins|. The settings which use |\floatfacing| command
+% work only in the case when key \texttt{facing=yes} used.
+%
+% \emph{Note}. The \pkg{floatrow} expands some settings of table layout to the \env{longtable}
+% environment, so you may set |\LTleft| and |\LTright| parameters inside |\setfloatmargins|
+% command. For example, \texttt{centering} option was defined like:
+% \begin{quote}
+% |\DeclareMarginSet{centering}{\setfloatmargins{\hfill}{\hfill}%|\\
+% | \LTleft=\fill \LTright=\fill}|
+% \end{quote}
+%
+% \subsubsection{Defining Float Separators}
+%
+% \DescribeMacro{\DeclareFloatSeparators}\label{decl:sep}%^^A
+% You may to define separator
+% between float boxes, or float object and beside caption, for example:
+% \begin{quote}
+% |\DeclareFloatSeparators{columnsep}{\hskip\columnsep}|
+% \end{quote}
+% or more complex, using \pkg{color} package, and |\floatfacing| macro
+% (do not forget the \texttt{facing=yes} key):
+% \begin{quote}
+% |\DeclareFloatSeparators{colorsep}%|\\
+% | {\begingroup\color{blue}%|\\
+% | \floatfacing{\hskip14pt\vrule width1.8pt\hskip2pt}%|\\
+% | {\hskip2pt\vrule width1.8pt\hskip14pt}%|\\
+% | \endgroup}|
+% \end{quote}
+%
+% You may use defined option by both \texttt{floatrowsep=} and \texttt{capbesidesep=}
+% keys\footnote{You may use key options declared by
+% \cmd{\DeclareCaptionLabelSeparator} command.}.\par\strut\par\kern-\baselineskip
+%
+% \subsubsection{Float font}
+%
+% \DescribeMacro{\DeclareFloatFont}
+% With this macro you may define new
+% option for font (\texttt{font=} key) of float contents. This macro works like
+% |\DeclareCaptionFont| in \pkg{caption} package. (You may also use
+% key options declared by |\DeclareCaptionFont| command.)\par\strut\par\kern-\baselineskip
+%
+% \subsubsection{Defining Float Footnote Rule's Style}
+%
+% \DescribeMacro{\DeclareFloatFootnoterule}
+% You may define new footnoterule (\texttt{footnoterule=} key) like:
+% \begin{quote}
+% |\DeclareFloatFootnoterule{fullsize}{%|\\
+% | \kern-3\p@|\\
+% | \hrule \@width\hsize\kern 2.6\p@}|
+% \end{quote}
+% Remember, that summary vertical height for footnote rule must be
+% equal to~0pt.
+%\newpage
+% \section{Creation of New Float Type}
+%
+% \DescribeMacro{\DeclareNewFloatType}
+% For creation of new float type there was created
+% |\DeclareNewFloatType| command which also uses
+% \meta{key}${}=\nobreak {}$\meta{value} mechanism:
+% \begin{quote}
+% |\DeclareNewFloatType{|\meta{type}|}{|\meta{options}|}|
+% \end{quote}
+% The \meta{type} argument includes the new float environment name.\\
+% The \meta{options} could include following keys:
+%
+% \noindent
+% \DescribeMacro{placement=}
+% The option of this key could have any combination of letters
+% \texttt{t}, \texttt{b}, \texttt{h}, and \texttt{p}, which
+% define placement of current float type on the page in
+% the case float environment has no any option argument.
+% (As default is declared \texttt{placement=tbp}.)
+%
+% \noindent
+% \DescribeMacro{name=}
+% Defines the name of environment in the caption
+% label. (As default for caption label is declared the
+% name of environment.)
+%
+% \noindent
+% \DescribeMacro{fileext=}
+% Defines the file extension from which
+% gathered list of floats. (As default, captions
+% are gathered in \texttt{lox}-file).
+%
+% \noindent
+% \DescribeMacro{within=}
+% Declares the section head of document, by which
+% current float resets its numbering to zero. If this key absent, float
+% increases during whole documentation.
+%
+% \noindent
+% \DescribeMacro{relatedcapstyle=}
+% In \pkg{float} package the non-starred
+% \cmd{\newfloat}/\cmd{\restylefloat} macros attach
+% related caption style for float styles (see section
+% \ref{sec:floatst}). If you use |\DeclareNewFloatType| mechanism and exists (you created
+% it by |\captionsetup|) co-named, i.e. related, caption style you may attach this
+% style with key \texttt{relatedcapstyle=yes}.
+% %^^A \begin{quote}
+% %^^A |\captionsetup[figure]{style=ruled}|
+% %^^A \end{quote}
+%
+% The |\DeclareNewFloatType| was used for defining of \env{Example}
+% environment (see page \pageref{exa1.1}). It consists of following
+% code:
+% \begin{quote}
+% |\DeclareNewFloatType{Example}%|\\
+% | {placement=t,within=section,fileext=lox}|
+% \end{quote}
+%
+% \section{Borrowed code}
+%
+% \subsection{\pkg{float} Package: Compatibility}\label{sec:floatst}
+%
+% The \pkg{floatrow} package includes some macros of \pkg{float} (version
+% v1.3d, dated 2001/11/08)
+% with necessary modifications. In the case of loaded \pkg{float}
+% package before \pkg{floatrow} you'll get error message.
+%
+% \emph{Note}.
+% In the case of some packages
+% could call \pkg{float} package\footnote{I'm aware about \pkg{algorithm}
+% package.} the \pkg{floatrow} package loads code which emulates
+% already loaded \pkg{float} package v1.3, so next requests for \pkg{float} are ignored.
+% This will help to avoid strange error messages
+% in the case of these packages loaded \emph{after} \pkg{floatrow}.
+% Please note that packages, which load \pkg{float} must be loaded
+% \emph{after} \pkg{floatrow}.
+%
+% I hope that old documents could work with \pkg{floatrow}. The first
+% limitation or feature is---if you didn't use any |\restylefloat|
+% command---all figures and tables appear in \texttt{plain} float style with
+% bottomed captions. Another limitation---you ought to put all
+% |\newfloat| and |\floatstyle| and |\restylefloat| commands in
+% preamble, before |\begin{document}|. The commands |\restylefloat|,
+% |\newfloat| and |\floatstyle| are obsolete but supported\footnote{The better way is to use
+% \cmd{\floatsetup} macros. The \pkg{floatrow} package supports obsolete macros but there
+% is no guarantee.}. See also
+% section~\ref{float-obs} about translation of these commands
+% into |\floatsetup| command.
+%
+% Sections, signed with ``[\pkg{float}]'' were borrowed from
+% \pkg{float}'s documentation.
+%
+% \subsubsection{The User Interface---New Floats [\pkg{float}]}\label{sec:floatborrowI}
+%
+% \DescribeMacro{\newfloat}
+% The most important command in \pkg{float}
+% is the |\newfloat| command\footnote{It doubles the \cmd{\DeclareNewFloatType}
+% command.}. It is patterned on
+% |\newtheorem|. The |\newfloat| command takes three required and one
+% optional argument; it is of the form
+% \begin{quote}
+% \hspace*{\MacroIndent}|\newfloat{|\meta{type}|}{|^^A
+% \meta{placement}|}{|\meta{ext}|}[|\meta{within}{\tt]}
+% \end{quote}
+% \begin{itemize}
+% \item \marg{type} is the `type' of the new class of floats, like
+% \texttt{program} or \texttt{algorithm}. After the appropriate
+% |\newfloat|, commands like |\begin{program}| or |\end{algorithm*}|
+% will be available.
+% \item \marg{placement} gives the default placement
+% parameters for this class of floats. The placement parameters are
+% the same as in standard \LaTeX, i.e., \texttt{t}, \texttt{b},
+% \texttt{p} and \texttt{h} for `top', `bottom', `page' and `here',
+% respectively.
+% \item \marg{ext} When \LaTeX\ writes the captions to an auxiliary file
+% for the list of figures (or whatever), it'll use the job name
+% followed by \marg{ext} as a file name.
+% \item \oarg{within} Finally, the optional
+% argument \meta{within} determines whether floats of this class will
+% be numbered within some sectional unit of the document. For example,
+% if \oarg{within}${}={}$\texttt{chapter}, the floats will be numbered
+% within chapters. (In standard \LaTeX, this happens with figures and
+% tables in the \cls{report} and \cls{book} document styles.) As an
+% example, Program~\ref{prog1.1} was created by a command sequence
+% similar to that shown in the following
+% Example\footnote{Settings for Example float
+% environment were created by \cmd{\DeclareNewFloatType} macro stuff.}.
+% \end{itemize}
+% \emph{Floatrow note.}
+% There is also created a |\newfloat*| pair, which works similar to
+% |\restylefloat*| command (see below).
+% \begin{Program}
+%\begin{verbatim}
+%#include <stdio.h>
+%
+%int main(int argc, char **argv) {
+% int i;
+% for (i = 0; i < argc; ++i)
+% printf("argv[%d] = %s\n", i, argv[i]);
+% return 0;
+%}
+%\end{verbatim}
+% \caption{The first program. This hasn't got anything to do with the
+% package but is included as an example.
+% Note the \texttt{ruled} float style.%
+% \label{prog1.1}}
+% \end{Program}
+% \begin{Example}[H]
+% \begin{verse}
+% |\floatstyle{ruled}|\\
+% |\newfloat{Program}{tbp}{lop}[section]|\\
+% \dots\ loads o' stuff \dots\\
+% |\begin{Program}|\\
+% |\begin{verbatim}|\\
+% \dots\ program text \dots\\
+% |\end{verbatim}|\\
+% |\caption{|\dots\ caption \dots|}|\\
+% |\end{Program}|
+% \end{verse}
+% \caption{This is another silly floating Example. Except
+% that this one doesn't actually float
+% because it uses the {\tt[H]} optional parameter
+% to appear \textbf{Here}. (Gotcha.)}\label{exa1.1}
+% \end{Example}
+%
+% \DescribeMacro{\floatstyle}
+% The |\floatstyle| command sets a default
+% float style. This float style will be used for all the floats that
+% are subsequently defined using |\newfloat|, until another
+% |\floatstyle| command appears. The |\floatstyle| command takes one
+% argument, the name of a float style. For instance,
+% |\floatstyle{ruled}|. Specifying a string that does not name a valid
+% float style is an error.
+%
+% \DescribeMacro{\floatname}
+% The |\floatname| command lets you define
+% the \emph{float name} that \LaTeX\ uses in the caption of a float,
+% i.e., `Figure' for a figure and so on. For example,
+% |\floatname{program}{Program}|. The |\newfloat| command sets the
+% float name to its argument \meta{type} if no other name has been
+% specified before.
+%
+% \DescribeMacro{\floatplacement}
+% The |\floatplacement| command resets
+% the default placement specifier of a class of floats. E.g.,
+% |\floatplacement{figure}{tp}|.
+%
+% \DescribeMacro{\restylefloat}\nopagebreak
+% The |\restylefloat| command is necessary
+% to change styles for the standard float types
+% \texttt{figure} and \texttt{table}. Since these aren't usually
+% defined via |\newfloat|, they don't have a style associated with
+% them. Thus you have to say, for example,
+% \begin{quote}
+% \hspace*{\MacroIndent}|\floatstyle{ruled}|\\
+% \hspace*{\MacroIndent}|\restylefloat{table}|
+% \end{quote}
+% to have tables come out \texttt{ruled}. The command also lets you
+% change style for floats that you define via |\newfloat|, although
+% this is, typographically speaking, not a good idea. See
+% table~\ref{table1} for an example\footnote{The \pkg{float} package
+% created special caption style with bold label for \texttt{boxed}
+% style. Please note that \texttt{plain} and \texttt{boxed} float
+% styles have not any special settings in \pkg{caption} 3.x package.
+% To emulate \texttt{boxed} style from \pkg{float} documentation there
+% were: cleared all special caption settings for tables, and restored default
+% colon separator after label.}. There is a |\restylefloat*| command
+% which will restyle an existing float type but will keep the new
+% float style from taking over the |\caption| command. In this case
+% the user is responsible for handling their own captions.
+% \DeleteShortVerb{\|}
+% %^^AEmulation of float's documentation settings
+% %^^A\floatstyle{boxed}
+% %^^A\restylefloat{table}
+% \begingroup
+% \clearcaptionsetup{table}
+% \captionsetup{labelsep=default,labelfont=bf}
+% \floatsetup[table]{style=boxed}
+% \begin{table} \def\B#1{$\displaystyle{n\choose#1}$}
+% \begin{center} \begin{tabular}{c|cccccccc}
+% $n$&\B0&\B1&\B2&\B3&\B4&\B5&\B6&\B7\\ \hline
+% 0 & 1\\
+% 1 & 1&1\\
+% 2 & 1&2&1\\
+% 3 & 1&3&3&1\\
+% 4 & 1&4&6&4&1\\
+% 5 & 1&5&10&10&5&1\\
+% 6 & 1&6&15&20&15&6&1\\
+% 7 & 1&7&21&35&35&21&7&1
+% \end{tabular} \end{center}
+% \caption{Pascal's triangle. This is a re-styled \LaTeX\ \texttt{table}.%
+% \label{table1}}
+% \end{table}
+% \endgroup
+% \MakeShortVerb{\|}
+%
+% \subsubsection{How macros from \pkg{float} package
+% work in \pkg{floatrow}}\label{float-obs}
+%
+% The combination of |\floatstyle|\marg{style} and any of
+% \cmd{\newfloat}\marg{float} or
+% \cmd{\restylefloat}\marg{float} commands in \pkg{floatrow} package
+% set float layout in the way:
+% \begin{quote}
+% |\floatsetup|\oarg{float}|{style=|\meta{style}|}|
+% \end{quote}
+% Please note that co-named keys from |\floatsetup|\oarg{float}|{...}|
+% will overwrite the |\floatsetup{...}| settings. That means that if you
+% set float layout with these obsolete commands, the next layout tuning you
+% ought to do with |\floatsetup|\oarg{float}|{...}| stuff only.
+%
+% \subsubsection{Printing of Float List [\pkg{float}]}\label{sec:floatborrowIa}
+%
+% \nobreak\DescribeMacro{\listof}
+% \nopagebreak
+% The |\listof| command produces a list of all the floats
+% of a given class. Its syntax~is\\[2pt]
+% \hspace*{\MacroIndent}|\listof{|\meta{type}|}{|\meta{title}^^A
+% |}|\\[2pt]
+% \meta{type} is the float type given in the |\newfloat| command.
+% \meta{title} is used for the title of the list as well as the
+% headings if the current page style includes them. Otherwise, the
+% |\listof| command is analogous to the built-in \LaTeX\ commands
+% |\listoffigures| and |\listoftables|.
+%
+% \subsubsection{The User Interface---\texttt{[H]}
+% Placement Specifier [\pkg{float}]}\label{sec:floatborrowII}
+%
+% Many people find \LaTeX's float placement specifiers too
+% restrictive. A Commonly Uttered Complaint (CUC) calls for a way to
+% place a float exactly at the spot where it occurs in the input file,
+% i.e., to \emph{not} have it float at all. It seems that the
+% \texttt{[h]} specifier should do that, but in fact it only suggests
+% to \LaTeX\ something along the lines of ``put the float here if it's
+% OK with you''. As it turns out, \LaTeX\ hardly ever feels inclined
+% to actually do that. This situation can be improved by judicious
+% manipulation of float style parameters.
+%
+% The same effect can be achieved by changing the actual method of
+% placing floats. David Carlisle's \pkg{here} option introduces a new
+% float placement specifier, namely \texttt{[H]}, which, when added to
+% a float, tells \LaTeX\ to ``put it HERE, period''. If there isn't
+% enough space left on the page, the float is carried over to the next
+% page together with whatever follows, even though there might still
+% be room left for some of that. This style option provides the
+% \texttt{[H]} specifier for newly defined classes of floats as well
+% as the predefined \texttt{figure}s and \texttt{table}s, thereby
+% superseding \pkg{here}. David suggests that the \pkg{here} option be
+% withdrawn from the archives in due course.
+%
+% The {\tt[H]} specifier may simply be added to the float as an
+% optional argument, like all the other specifiers. It may \emph{not}
+% be used in conjunction with any other placement specifiers, so
+% {\tt[Hhtbp]} is illegal. Neither may it be used as the default
+% placement specifier for a whole class of floats. The following table
+% is defined like this:
+% \begin{verse}
+% |\begin{table}[H]| \\*
+% |\begin{tabular}{cl}|\\
+% |\tt t & Top of the page\\|\\*
+% \dots\ more stuff \dots\\
+% |\end{tabular}|
+% \end{verse}
+% (It seems that I have to add some extraneous chatter here just so
+% that the float actually comes out right in the middle of a printed
+% page. When I \LaTeX ed the documentation\footnote{For \pkg{float}
+% package.} just now it turned out that there was a page break that
+% fell exactly between the ``So now'' line and the float. This
+% wouldn't Prove Anything. Bother.) So now we have the following float
+% placement specifiers:
+% \begin{table}[H]
+% \begin{tabular}{cl}
+% \tt t & Top of the page\\
+% \tt b & Bottom of the page\\
+% \tt p & Page of floats\\
+% \tt h & Here, if possible\\
+% \tt H & Here, definitely
+% \end{tabular}
+% ^^A\caption{Could it be that this just needs a caption?}
+% \end{table}
+%
+% \subsection{\pkg{rotfloat} Package}
+%
+% Code of \pkg{rotfloat} package was also borrowed by \pkg{floatrow}
+% package. In the case of loaded \pkg{rotfloat} package before \pkg{floatrow} you will get
+% error message.
+%
+% The \pkg{floatrow} package loads code which pretends that
+% \pkg{rotfloat} already loaded, so next loads are ignored.
+% The \pkg{rotfloat} allowed in the |\usepackage|
+% line with \pkg{rotating} package, which could have options. It is necessary
+% to delete \pkg{rotfloat} package from |\usepackage| line
+% where also \pkg{rotating} package loaded with options: otherwise
+% you may get `option clash' error message.
+%
+% \section{Macros for Building Floats}
+%
+% \subsection{The Floatbox Macro}\label{sec:floatbox}
+%
+% This package offers macro, which creates necessary layout of float
+% object contents and caption (see also the introduction).
+% The main macro looks like:
+% \begin{quote}
+% |\floatbox[|\meta{preamble}|]{|\meta{captype}|}[|^^A
+% \meta{width}|][|\meta{height}|][|\meta{vert pos}|]|\\
+% | {|\meta{caption}|}{|\meta{object}|}|\footnote{The
+% order of mandatory arguments and their contents makes not
+% difference during building of float box. This macro
+% historically needs two mandatory arguments, but they could
+% be filled freely.}
+% \end{quote}
+% where\label{floatboxsets}:
+% \begin{description}\itemsep0pt
+% \item[\meta{preamble}]there could be |\capbeside| command which
+% places caption beside float contents; |\nocapbeside|
+% (to put caption above/below, accordingly
+% to float type's style); or another systematic command
+% (even with usage of |\captionsetup| and |\thisfloatsetup|---see
+% examples in documentation and appendix).
+% \item[\meta{captype}]the type of float this command created for;
+% \item[\meta{width}]the width of object---caption box
+% (in case of caption above or below object),
+% or width of object box (if caption stays beside object).
+% The command |\FBwidth| in the \meta{width} argument
+% allows usage of natural width of float contents.\par
+% \emph{Note}. If you use \verb|\FBwidth| in \meta{width}
+% argument be sure that object contents can be placed in |\hbox|
+% (you only allowed to use |\vspace| command at the very
+% beginning and very end of object contents for fine tuning
+% of vertical spaces);
+% \item[\meta{height}]the height of object---caption box
+% (in case of caption above or below object),
+% or height of object box (if caption stays beside object);
+% \item[\meta{vert pos}]vertical alignment of object contents in object's
+% box in case of \meta{height} argument has larger value than height of object contents,
+% float placed inside \env{floatrow}.
+% \item[\meta{caption}]text of caption and legends (you may use |\floatfoot|
+% command (see page~\pageref{subsec:floatfoot}); you may also use
+% |\footnote|/|\mpfootnotemark|/|\footnotetext| stuff for footnotes inside float, or |\floatfoot| command;
+% \item[\meta{object}]Contents of float; you may use
+% |\footnote|/|\mpfootnotemark|/|\footnotetext| stuff or |\floatfoot| command.
+% \end{description}
+%
+% \begingroup
+% First simplest example:
+%\begin{verbatim}
+%\begin{figure}
+%\floatbox{figure}[4cm]
+%{\caption{The simple example ...}%
+%\label{fig:WcatI}}
+%{\input{TheCat.picture}}
+%\end{figure}
+%\end{verbatim}
+% created the picture in the figure~\ref{fig:WcatI}.\pagebreak[3]
+% \begin{figure}
+% \floatbox{figure}[4cm]
+% {\caption{The simple example of \cmd{\floatbox}}%
+% \label{fig:WcatI}}
+% {\unitlength1.28\unitlength\input{TheCat.picture}}
+% \end{figure}%
+% \endgroup
+%
+% The more preferable way for usage of |\floatbox| is to put table caption \emph{above} table
+% contents and set caption width equal to table width. Caption
+% position was defined in document preamble by command
+% |\floatsetup[table]{style=Plaintop}|
+%\begin{verbatim}
+%\begin{table}
+%\floatbox{table}[\FBwidth] {\caption{Simple tabular in
+%\cmd{\floatbox}
+% with caption above}\label{tab:tabII}}
+%{\begin{tabular}{|l|c|c|}
+% \hline
+% Column head & Data I & Data II \\
+% \hline
+% First row & 1 & 2 \\
+%...
+% \hline
+%\end{tabular}}
+%\end{table}
+%\end{verbatim}
+% \DeleteShortVerb{\|}%
+% \begin{table}
+% \floatbox{table}[\FBwidth]
+% {\caption{Simple tabular with caption
+% above}\label{tab:tabII}}
+% {\begin{tabular}{|l|c|c|}
+% \hline
+% \thead{Column head} & \thead{Data I} & \thead{Data II} \\
+% \hline
+% First row & 1 & 2 \\
+% Second row & 3 & 4 \\
+% Third row & 6 & 8 \\
+% Fourth row & \llap{1}0 & \llap{1}6 \\
+% \hline
+% \end{tabular}}
+% \end{table}%
+% \MakeShortVerb{\|}%
+% as shown in table~\ref{tab:tabII}. To fit size of caption (i.e full
+% float box) to size of \env{tabular} environment there was used |\FBwidth|
+% command in \meta{width} argument.
+%
+% The next example shows \env{figure} environment with beside caption.
+% In this example only |\capbeside| command used in \meta{preamble}
+% argument, and |\FBwidth| in \meta{width} argument. The
+% caption occupies the rest space of float box's width, |\hsize| (in current
+% example the width float box equals to main text width---|\textwidth|).
+%
+%\begin{verbatim}
+%\begin{figure}
+%\floatbox[\capbeside]{figure}[\FBwidth]
+% {\caption[Beside caption]{Beside caption ...}\label{...}}
+% {...}
+%\end{figure}
+%\end{verbatim}
+% \begin{figure}[h]
+% \floatbox[\capbeside]{figure}[\FBwidth]
+% {\caption[Beside caption]{Beside caption and more text
+% and some more text and a bit more text and
+% a little more text and a little peace of text to fill
+% space}\label{fig:beside:mouse}}
+% {{\setlength\unitlength{4cm/58}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{Mouse.picture}}}
+% \end{figure}
+%
+% The default width of beside object and caption are equal to one
+% ``column'' width, i.e. half of current |\hsize| (figure~\ref{intro:beside}) width excluding float
+% margins and separation material between float and caption. (See more
+% examples with float and beside captions in appendix,
+% page~\pageref{fig:Idog:w}.)
+%
+%
+% \subsubsection{User Commands for Float Boxes}
+%
+% The usage of plain |\floatbox| command sometimes is rather complex.
+% You may define commands-abbreviations for your own purposes and
+% define there some additional style settings.
+%
+% The definition of new float abbreviation looks like:
+% \begin{quote}
+% |\newfloatcommand|\marg{command}%^^A\\\strut\qquad
+% \marg{captype}\oarg{preamble}\oarg{default width}
+% \end{quote}
+% where:
+% \begin{description}
+% \item[\meta{command}]the user's command name (without backslash);
+% \item[\meta{captype}]the name of float environment
+% this command is created for;
+% \item[\meta{preamble}]
+% you may use commands, mentioned in page~\pageref{floatboxsets}
+% and other layout commands, like was shown in examples;
+% you may try to add any other regular command (e.g. |\captionsetup|
+% or |\thisfloatsetup| stuff);
+% \item[\meta{default width}]here you put any dimension like |6cm|
+% or |.75\textwidth|\footnote{There is also exists possibility to set
+% common width for current float type of float using \texttt{floatwidth}
+% key in \cmd{\floatsetup} stuff.}; if you put |\FBwidth|
+% command the width of object---caption box (in case of
+% caption above or below object---there could be defined
+% |\nocapbeside| in \meta{preamble}) or width of object box (if caption
+% stays beside object---|\capbeside| in \meta{preamble}) will be equal
+% to width of object.
+% \end{description}
+%
+% There are three already defined commands-abbreviations:\label{abbrcom}
+% \begin{quote}
+% |\newfloatcommand{ffigbox}{figure}[\nocapbeside]|\\*
+% |\newfloatcommand{fcapside}{figure}[\capbeside]|\\*
+% |\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]|
+% \end{quote}
+% First two defined for figures and last one---for table. You may
+% redefine existing macros using |\renewfloatcommand| command (it uses the same
+% arguments as |\newfloatcommand| one).
+%
+%
+% \subsection{Building Float Row}\label{sec:floatrow}
+%
+% If you need to put two or more floats of one type side by side, you
+% may use \env{floatrow} environment.
+%
+% This environment looks like:
+% \begin{quote}
+% |\begin{floatrow}[|\meta{number of beside floats}|]|\\
+% |\floatbox...|\\
+% |...|\\
+% |\floatbox...|\\
+% |...|\\
+% |\end{floatrow}|
+% \end{quote}
+%
+% And here is example. The first float (used |\ffigbox|) has default width equal to
+% ``column'' width, the next uses width of included graphic (uses command
+% |\FBwidth| in optional argument \meta{width}), third one occupies the rest
+% horizontal space of page which was counted with command |\Xhsize|.
+%
+% \emph{Note}. Usually the command |\Xhsize| is used for the last float box. But
+% if you use \pkg{calc} package you may try to use |\Xhsize| earlier,
+% if the \emph{absolute} value of the width of float boxes to the
+% right in float row is known, or set something in \meta{width}
+% argument like |\Xhsize/2| and then |\Xhsize| for two last
+% |\floatbox|'es, see sample files~\file{frsample10}--\file{frsample12},
+% and also sample file \file{fr-sample.tex}.
+%\begin{verbatim}
+%\begin{floatrow}[3]
+%\ffigbox
+%{\caption{Beside figure~I...}...}
+%{...}
+%
+%\ffigbox[\FBwidth]
+%{\caption{Beside figure~II...}...}
+%{...}
+%
+%\ffigbox[\Xhsize]
+%{\caption{Beside figure~III...}...}
+%{...}
+%\end{floatrow}
+%\end{figure}
+%\end{verbatim}
+% \begin{figure}
+% \begin{floatrow}[3]
+% \ffigbox
+% {\caption{Beside figure~I, ``column'' width}%
+% \label{fig:row:WcatI}}
+% {\unitlength1.25\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheCat.picture}}
+%
+% \ffigbox[\FBwidth]
+% {\caption{Beside figure~II in \env{floatrow}, float box has the width of graphic}%
+% \label{fig:row:BcatI}}
+% {\unitlength1.25\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheBlackCat.picture}}
+%
+% \ffigbox[\Xhsize]
+% {\caption{Beside figure~III in \env{floatrow},
+% occupies the rest of row}%
+% \label{fig:row:mouseI}}
+% {{\setlength\unitlength{\hsize/58}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{Mouse.picture}}}
+% \end{floatrow}
+% \end{figure}%
+% The result you see in the row of
+% figures~\ref{fig:row:WcatI}--\ref{fig:row:mouseI}. The vertical
+% alignment of floats lays on the bottom of upper part (here: objects) of float and
+% the top of lower part (captions).
+%
+% \subsection{Usage of Footnotes Inside Float Environment}\label{sec:floatfootnote}
+%
+% Sometimes table or figure contents have material, which authors mark
+% and then write some explanation like footnotes. Current package has mechanism
+% which allows to put footnotes inside float environment, in the same way as
+% is in \env{minipage} environment.
+%
+% In the case of few elements have the same footnote, we cannot
+% use standard |\footnotemark|---|\footnotetext| combination, because of
+% |\footnotemark| creates the sign of main text footnote.
+% For these cases current package offers |\mpfootnotemark| macro
+% instead of |\footnotemark|%
+% \footnote{The same macro also is defined in \pkg{footmisc} package,
+% version 4.10, dated 2003/01/20.}.
+%
+% The |\floatbox| macro uses special own definition of footnote rule
+% (the |\FBfootnoterule| command) and skip before footnotes and
+% explications or legends (|footskip=|). (See also
+% page~\pageref{sec:footnotestyle} for variants of footnote rule.)
+%
+% \subsubsection{The Legend-Like Macro}\label{subsec:floatfoot}
+%
+% In the case of table or figure have some additional explanations
+% which could not put in caption contents and they are definitely not
+% a footnote you may use |\floatfoot| command. The |\floatfoot| is
+% build by usage of |\caption| stuff and uses caption's justification,
+% but star form (|\floatfoot*|) prints its contents as plain unindented paragraph
+% (see table~\ref{tab:floatfoot}).
+%
+% For defining of explication font use \texttt{footfont=} key
+% (page~\pageref{sec:setfloatfoot}) in |\floatsetup|. You may try to
+% define special settings for float foot using
+% \cmd{\captionsetup[floatfoot]} setup.
+%\begin{verbatim}
+%\begin{table}
+%\ttabbox
+%{\caption{Table with additional foot material}%
+%\label{tab:floatfoot}}
+%{\extrarowheight1pt
+% \tabcolsep2\tabcolsep
+% \begin{tabular}{|l|c|c|}
+% \hline
+% ...
+% \end{tabular}%
+% \floatfoot*{`Data I' column ...}}
+%\end{table}
+%\end{verbatim}
+% \DeleteShortVerb{\|}%
+% \begin{table}
+% \ttabbox
+% {\caption{Table with additional foot material}%^^A
+% \label{tab:floatfoot}}%^^A
+% {\extrarowheight1pt\tabcolsep2\tabcolsep
+% \begin{tabular}{|l|c|c|}
+% \hline
+% \thead{Column head} & \thead{Data I} & \thead{Data II} \\
+% \hline
+% First row & \phantom01 & 2 \\
+% Second row & \phantom06 & 4 \\
+% Third row & 28 & 8 \\
+% \hline
+% \end{tabular}%^^A
+% \floatfoot*{`Data I' column---numbers which equal to sum of all
+% their divisors; `Data II' column---$2^n$ values}}
+% \end{table}%
+% \MakeShortVerb{\|}%
+%
+% \emph{Notes.} 1)\enskip The \pkg{float} package defines additional
+% optional argument after main caption text. Since this possibility
+% didn't declared in user part of documentation the current version of
+% \pkg{caption} (3.0 and later), and also \pkg{float\-row} package,
+% doesn't support this possibility. You may use |\floatfoot| and
+% |\footnotemark|/|\footnotetext| stuffs instead.
+%
+% 2)\enskip If you use both |\floatfoot| command and |\footnote|
+% inside one float box, the |\floatfoot| appears above |\footnote|
+% contents.
+%
+% 3)\enskip Foot material (footnotes and text in floatfoot) can be placed in
+% several variants: at the very bottom of float box, below caption
+% (even if caption is above float object). See page \pageref{foot:pos}
+% and sample file \file{frsample01.tex}. In case of caption beside
+% float object, footnotes and foot text always placed below caption.
+%
+%
+% \subsection{Fine Tuning of Vertical Spaces of Float}\label{sec:FBabskips}
+%
+% At the final variant of document you may need to correct vertical
+% spaces between float and main text, between float object and
+% caption.
+%
+% To change space between float box and main text there you may use
+% two simple commands |\FBaskip| and |\FBbskip|. For example define
+% \begin{verse}
+% |\renewcommand\FBaskip{-4pt}|
+% \end{verse}
+% to move up float box up (or reduce space above) by 4pt. In current document
+% the |\FBaskip| command was necessary for moving up some of wrapped figures.
+%
+% Use |\vspace| command for vertical space correction around float
+% object\footnote{The plain float environment allows usage of
+% \cmd{\vskip} command. But \cmd{\floatbox} stuff
+% (\cmd{\floatbox} itself, \cmd{\ffigbox} etc.) in case
+% of usage of the \cmd{\FBwidth} option, gets error message
+% when \cmd{\vskip} appears.}.
+%
+% \subsection{Running Raw \LaTeX\ Floats}
+%
+% The \pkg{floatrow} package redefines float environments for the case of creation of
+% common layout for all floats. This redefinition creates some limitations for source document file,
+% which were mentioned in introduction.
+% If you still need a raw behavior of float environment, you may input a
+% |\RawFloats| command \emph{inside} environment:
+%\begin{verbatim}
+%\begingroup
+%\captionsetup[table]{position=top}
+%\begin{figure}\RawFloats
+%\begin{minipage}{0.45\textwidth}
+%\centering ...
+%\caption{...}\label{...}
+%\end{minipage}
+%\begin{minipage}{0.45\textwidth}
+%\captionof{table}{...}\label{...}
+%\centering ...
+%\end{minipage}
+%\end{figure}
+%\endgroup
+%\end{verbatim}
+% And you'll get figure~\ref{Right:expect:fig}
+% and table~\ref{Right:expect:tab}\footnote{That could work correct if you do not use any
+% fancy float layout.}.
+% \begingroup
+% \captionsetup[table]{position=top}
+% \begin{figure}\RawFloats
+% \begin{minipage}{0.45\textwidth}
+% \centering \input{Mouse.picture}
+% \caption{A figure caption in raw \LaTeX}\label{Right:expect:fig}
+% \end{minipage}
+% \begin{minipage}{0.45\textwidth}
+% \captionof{table}{A table caption in raw \LaTeX}\label{Right:expect:tab}
+% \centering\tabcolsep3\tabcolsep \begin{tabular}{|c|c|} A & B \\ C & D \end{tabular}
+% \end{minipage}
+% \end{figure}
+% \endgroup
+%
+% You may see that \env{floatrow} environment and |\floatbox| commands still work
+% after |\RawFloats| (figure~\ref{intro:leftfig:raw} and table~\ref{intro:righttab:raw})
+%\begin{verbatim}
+%\begin{figure}\RawFloats\CenterFloatBoxes
+% \begin{floatrow}
+% \floatbox{figure}
+% {...}{\caption{...}\label{...}}
+%
+% \floatbox{table}[\FBwidth]
+% {...}{\caption{...}\label{...}}
+% \end{floatrow}
+%\end{figure}
+%\end{verbatim}
+% \begin{figure}\RawFloats\CenterFloatBoxes
+% \begin{floatrow}
+% \floatbox{figure}
+% {\input{Mouse.picture}}
+% {\caption{A figure caption in \cmd{\floatbox} in raw \LaTeX}%
+% \label{intro:leftfig:raw}}%
+%
+% \floatbox{table}[\FBwidth]
+% {\caption{A table caption in \cmd{\floatbox} in raw \LaTeX}\label{intro:righttab:raw}}
+% {\tabcolsep3\tabcolsep\begin{tabular}{|c|c|} A & B \\ C & D \end{tabular}}
+% \end{floatrow}
+% \end{figure}%^^A
+% See also page~\pageref{mixrow} about how to set and align different float types
+% like figure~\ref{intro:leftfig:raw} and table~\ref{intro:righttab:raw} in one row
+% (\env{floatrow} environment).
+%
+%
+% \section{Style Tandems}
+%
+% The next few sections show examples and explain some noticed
+% features with usage of \pkg{floatrow} and another package. There is not
+% the full list of style compatibilities. You may succeed with other
+% versions of mentioned packages, and maybe with not mentioned
+% packages too.
+%
+% \subsection{The \pkg{caption} Package}
+%
+% Tested with versions v3.0a--v3.0g.
+%
+% The \pkg{caption} package has strong mechanism of creating of
+% caption layout, so \pkg{floatrow} addresses the creation of new
+% caption styles to this package (see documentation for \pkg{caption}
+% package).
+%
+% The \pkg{floatrow} adds possibility to create a variations of captions
+% for floats in different positions or layouts (e.g. like wide or two-column
+% floats or rotated floats) using optional argument of
+% |\captionsetup|.
+%
+% For example you want to create special caption layout for wide or
+% two-column floats. In this case you may use
+% \begin{quote}
+% |\captionsetup[widefloat]|\marg{options}
+% \end{quote}
+% or for wide or two-column figures:
+% \begin{quote}
+% |\captionsetup[widefigure]|\marg{options}
+% \end{quote}
+% The priority of |\captionsetup| optional arguments is similar to
+% |\floatsetup| ones. In current examples |\captionsetup[widefigure]|
+% will be stronger than |\captionsetup[widefloat]|. The priority
+% and usage of ``\meta{float subtypes}'' in optional arguments
+% see on the page~\pageref{stsetorder}\label{cap:beside:order}).
+%
+%
+% \subsection{The \pkg{subfig} Package}
+%
+% Tested with version 1.2 dated 2004/01/28 and 1.3. dated 2005/06/28.\nopagebreak
+%
+% The example with \cmd{\subfloat}'s (table~\ref{tab:tabIII}). The
+% setting command in preamble |\floatsetup[table]{style=Plaintop}|
+% includes also settings for subcaption positions used with
+% \pkg{subfloat} package (like |\captionsetup[table]{position=top}| in
+% \pkg{caption} package):
+%\begin{verbatim}
+%\begin{table}\extrarowheight1pt
+% \floatbox{table}[\FBwidth]
+% {\caption{Two ...}\label{...}}
+% {\begin{subfloatrow}
+% \subfloat[First table]
+% {\begin{tabular}{|l|c|c|}
+% ...
+% \end{tabular}}
+% \subfloat[Second table]
+% {\begin{tabular}{|l|c|c|}
+% ...
+% \end{tabular}%
+% \end{subfloatrow}}}
+%\end{table}
+%\end{verbatim}
+% \DeleteShortVerb{\|}%
+% \captionsetup[subtable]{textfont=md}
+% \begin{table}[h]\extrarowheight1pt
+% \floatbox{table}[\FBwidth]
+% {\caption{Two \cmd{\subtable}'s
+% (created with \pkg{subfig} package)}\label{tab:tabIII}}
+% {\begin{subfloatrow}
+% \subfloat[First subtable]
+% {\begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|}
+% \hline
+% \multirowthead{2}[-1ex]{Column Head}
+% & \multicolumn{2}{c|}{\thead{Data}} \\
+% \cline{2-3}
+% & \multicolumn{1}{c|}{\thead{I}}
+% & \multicolumn{1}{c|}{\thead{II}}
+% \\\hline
+% First row & 1 & 2 \\
+% Second row & 3 & 4 \\
+% Third row & 6 & 8 \\
+% Fourth row & \llap{1}0 & \llap{1}6 \\
+% \hline
+% \end{tabular}}
+%
+% \subfloat[Second subtable with long long long subcaption]
+% {\begin{tabular}{|l|c|c|}
+% \hline
+% \multirowthead{2}[-1ex]{Column Head}
+% & \multicolumn{2}{c|}{\thead{Data}} \\
+% \cline{2-3}
+% & \multicolumn{1}{c|}{\thead{I}}
+% & \multicolumn{1}{c|}{\thead{II}}
+% \\\hline
+% First row & \phantom01 & \phantom02 \\
+% Second row & \phantom03 & \phantom04 \\
+% Third row & \phantom06 & \phantom08 \\
+% %^^A Fourth row & 10 & 16 \\
+% \hline
+% \end{tabular}}%
+% \end{subfloatrow}}
+% \end{table}%
+% \MakeShortVerb{\|}%
+%
+% \emph{Note.} There was used \env{subfloatrow} environment in current
+% example. This is simplified \env{floatrow} environment, which
+% expands vertical alignment of float contents to subfloats and
+% puts horizontal separator,
+% defined by \texttt{subfloatrowsep=} key. This key and uses the same options as
+% \texttt{floatrowsep=} and \texttt{capbesidesep=} keys (options of
+% these keys defined by |\DeclareFloatSeparators| command,
+% page~\pageref{decl:sep}).
+%
+%^^A To use \env{subfloatrow} environment load
+%^^A \pkg{fr-subfig}\footnote{This package could have only beta-status,
+%^^A because of it redefines two macros of \pkg{subfig} package for
+%^^A creation of subcaption and subfloat boxes.} package installed
+%^^A together with \pkg{floatrow}.\pagebreak[3]
+%
+% See examples with \env{subfloatrow} environment in sample files
+% \file{frsample03.tex}, \file{frsample05.tex}; and also
+% \file{frsample10.tex}--\file{frsample12.tex} where aligned contents
+% of beside subfloats are used in different layouts.)
+%
+% The next goes example with beside caption (see
+% figure~\ref{fig:subfig:catsI}).%^^A
+% \footnote{In version 1.2 the beside boxed and non-boxed subfloat contents (like in
+% figure~\ref{fig:subfig:catsI}) could not get aligned bottom (top)
+% subcaptions. In this example I ought to use following lines for
+% subfigure~\ref{subfig:b}, when \pkg{pstricks} package is loaded:\\[2ex]\ttfamily
+% \cmd{\raisebox}\{\cmd{\depth}\}\{\cmd{\input}\{\texttt{TheBlackCat.picture}\}\}}
+%\begin{verbatim}
+%\floatsetup{style=Shadowbox,capbesidesep=columnsep,
+% capbesideframe=yes,capbesideposition={top,inside}}
+%\fcapside[\FBwidth]
+%{\begin{subfloatrow}
+% \subfloat[White ...]{...}
+% \subfloat[Black ...]{...}
+%\end{subfloatrow}}
+%{\caption{...}}
+%\end{verbatim}
+% \floatsetup[figure]{style=Shadowbox,capbesidesep=columnsep,capbesideframe=yes,
+% capbesideposition={top,inside}}
+% \begin{figure}[h]
+% \fcapside[\FBwidth]
+% {\begin{subfloatrow}
+% \subfloat[White cat\label{subfig:w}]{%
+% {\input{TheCat.picture}}}
+%
+% \subfloat[Black cat\label{subfig:b}]{\input{TheBlackCat.picture}}%
+% \end{subfloatrow}}
+% {\caption{Beside caption vertically top aligned with fancy
+% \texttt{Shadowbox} layout}\label{fig:subfig:catsI}}
+% \end{figure}
+%
+% \newpage
+% \subsection{The \pkg{wrapfig} Package}
+%
+% \begingroup
+% \def\FBaskip{-12pt}
+% \floatsetup[figure]{style=ruled,relatedcapstyle=yes,footposition=caption}
+% \begin{wrapfigure}[10]{O}{40mm}
+%^^A \ffigbox[40mm]
+% {\caption{Wrapped plain figure (\pkg{wrapfig} package)}%
+% \floatfoot{Plain figure fails with package version
+% 3.3}\label{fig:wrapfig:WcatI}}
+% {\unitlength1.2\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheCat.picture}}
+% \end{wrapfigure}
+%
+% Tested with version 3.3 dated 1999/10/12 (style from \pkg{ltxmisc} bundle)
+% and 3.6 dated 2003/01/31 (the separate \LaTeX\ package).
+%
+% Options for environment (text borrowed from package comments):
+% \begin{quote}
+% |\begin{wrapfigure}%|\\*
+% \strut\quad\oarg{number}\marg{placement}|%|\\*
+% \strut\quad\oarg{overhang}\marg{width of figure}\\
+% |...|\\*
+% |\end{wrapfigure}|
+% \end{quote}
+% \meta{Placement} is one of \texttt{r}, \texttt{l}, \texttt{i},
+% \texttt{o}, \texttt{R}, \texttt{L}, \texttt{I}, \texttt{O}, for
+% right, left, inside, outside. Lowercase letters set unfloated
+% positioning, uppercase---floated variant. The figure sticks into
+% the margin by \meta{overhang}, if given, or by the length
+% |\wrapoverhang|, which is normally zero. The \meta{number} of
+% wrapped text lines is normally calculated from the height of the
+% figure, but may be specified manually, e.g.
+% \begin{quote}
+% |\begin{wrapfigure}[10]{r}[34pt]{5cm}|\\* \meta{figure}\\*
+% |\end{wrapfigure}|
+% \end{quote}
+% \endgroup
+%
+% \begingroup
+% \def\FBaskip{-12pt}
+% \floatsetup[figure]{style=BOXED,frameset={\fboxsep12pt}}
+% \begin{wrapfigure}[14]{O}{0mm}
+% \ffigbox[40mm]
+% {\par{\setlength\unitlength{\hsize/64}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheCat.picture}}}
+% {\caption{Wrapped figure in \cmd{\ffigbox} (\pkg{wrapfig} package)}%
+% \label{fig:wrapfig:WcatII}}
+% \end{wrapfigure}
+%
+% \emph{Floatrow note.}
+% For figure, placed in \env{wrap...} environment you must set width in
+% mandatory argument. If you'll write \texttt{0mm} as \marg{width of figure}
+% argument, \pkg{wrapfig} package will count natural width of float contents.
+%
+% Sometimes above (below) float box in \env{wrap...} environment
+% appears unwanted space. To correct vertical position, use |\FBaskip|
+% (|\FBbskip|) commands (see section~\ref{sec:FBabskips}).
+%
+% \emph{Special settings}.
+%
+% You may create settings for \env{wrap...} environment, there are
+% following priorities
+% (Please note that you can load also special caption settings with |\captionsetup| stuff.):
+% \begin{itemize}\itemsep0pt
+% \item %
+% if exists |\floatsetup[wrap|\meta{captype}|]{...}|
+% \pkg{floatrow} uses these settings---they are the ``strongest'' settings;
+% if they absent---uses settings of next item;
+%^^A \end{itemize}
+%
+%^^A \begin{itemize}
+% \item
+% if exists |\floatsetup[wrapfloat]{...}|
+% \pkg{floatrow} uses these settings---these settings ``stronger'' than next ones;
+% if they absent---settings of current float\\[\medskipamount]
+% |\floatsetup[|\meta{captype}|]{...}|\,;\\[\medskipamount]
+% if they absent---uses default settings
+% (|\floatsetup{...}| or package settings).
+% \end{itemize}
+%
+%
+% \emph{Founded limitations}.
+%
+% The usage of plain float environment in version 3.3 will
+% not succeed with current version of \pkg{floatrow}---use |\floatbox|
+% stuff. The version 3.6 allows usage of plain \env{wrap...} environment with \texttt{plain} (or
+% \texttt{ruled}) styles, but
+% the framed styles, like \texttt{Boxed} (where text inside frames changes its |\hsize| to fit
+% frames, fitted to defined |\hsize|)
+% could work only with |\floatbox| macro, otherwise you'll get incorrect widths and layout.
+% \endgroup
+%
+% \begingroup
+% \floatsetup[figure]{style=WSHADOWBOX,captionskip=8pt}
+% \subsection{The \pkg{floatflt} package}
+%
+% \begin{floatingfigure}[v]{40mm}\def\FBaskip{-2.5pt}
+% \ffigbox[42mm]
+% {\setlength\unitlength{.85\hsize/60}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{BlackDog.picture}}
+% {\caption{\hyphenpenalty-100\pretolerance-1%
+% Wrapped figure inside \env{floating\-figure} environment
+% (\pkg{floatflt})}\label{fig:floatflt:WcatI}}
+% \end{floatingfigure}%\FBbuildtrue
+%
+% \noindent Tested with version v\kern-1pt.1.3 dated
+% 1996/02/27\kern-1pt.
+%
+% \emph{Founded limitations} 1)\enskip There is not support for
+% creation of new \env{floating...} environment. Since \env{floatflt}
+% environments need usage of |\floatbox| in any case, you can use
+% either \env{floatingfigure} or \env{floatingtable} and put necessary
+% float type in |\floatbox| argument (or use necessary
+% macro-abbreviation).
+%
+%
+% The next limitations could not tied with \pkg{floatrow} package.
+%
+% 2)\enskip If you put \env{floatingfigure} environment just after
+% |\...section| command you need (if you do not indentation after
+% heads) to put |\noindent| for the first paragraph.
+%
+% 3)\enskip The \env{floatflt} environments could fail with list
+% environments.
+%
+% 4)\enskip To get correct space before next |\...section| head you
+% may need to put following commands
+% |\makeatletter\@nobreakfalse\makeatother| (as was made in just
+% before next section).
+%
+% \makeatletter\@nobreakfalse\makeatother
+%
+% %^^A \penalty-10000
+%
+% \subsection{The \pkg{picins} Package}
+%
+% \floatsetup[figure]{style=ruled}
+%
+% \parpic[l]{{%\def\floatrowsep{}\let\FBiffloatrow\iftrue
+% \def\FBbskip{14pt}
+% \ffigbox[42mm]
+% {{\setlength\unitlength{18mm/61}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{BlackCat.picture}}}
+% {\caption{Wrap\-ped figure (\cmd{\parpic});
+% \cmd{\floatbox}
+% with \cmd{\FBwidth} option}\label{fig:parpic:BcatI}}%
+% }}
+%
+% \noindent Tested with version v\,3.0 dated 1999/10/12.
+%
+% This package produces pictures inside paragraph. This package supports
+% usage of captions with command |\piccaption|. It also allows the \pkg{caption}
+% package settings.
+%
+% The \cmd{\parpic} macro usually allows usage of |\floatbox| macro inside of its
+% mandatory argument.
+%
+%^^A \emph{Founded limitations}.\nopagebreak
+%
+%^^A 1)\enskip In |\parpic| argument you ought to put before |\floatbox|
+%^^A following commands:\\[\medskipamount]
+%^^A |\def\floatrowsep{}|\allowbreak|\let\FBiffloatrow\iftrue|\\[\medskipamount]
+%^^A to get correct layout.
+%
+% The next limitations could not tied with \pkg{floatrow} package.
+%
+%^^A \floatsetup[figure]{style=DOUBLEBOX}
+%
+%^^A \parpic[r]{{%\def\floatrowsep{}\let\FBiffloatrow\iftrue
+%^^A \hsize36mm
+%^^A \ffigbox[\hsize]
+%^^A {{\setlength\unitlength{16mm/61}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+%^^A \input{BlackCat.picture}}}
+%^^A {\caption{Wrapped figure (\cmd{\parpic})}\label{fig:parpic:BcatII}}%
+%^^A }}
+%
+% 1)\enskip If you put \cmd{\parpic} just after |\...section| command
+% you need (if you do not indentation after heads) to put |\noindent|
+% for the first paragraph.
+%
+% 2)\enskip You may try to use \cmd{\parpic} inside list environment,
+% but in some cases usage of \cmd{\parpic} in
+% the list gets bad or wrong layout.
+%
+% 3)\enskip This package has not options \meta{outside} or
+% \meta{inside}, like previous two packages (the option |[o]| means
+% oval box around picture), so you ought to set horizontal position
+% manually.
+%
+% \endgroup
+%
+% \subsection{The \pkg{rotating} Package and \env{sideways\ldots} Environment}
+%
+% Tested with version v2.13 dated Sep. 1992.
+%
+% There is example (figure~\ref{fig:rot}) with rotated float, using
+% \env{sidewaysfigure}.
+%\begin{verbatim}
+%\floatsetup[figure]{style=WSHADOWBOX}
+%\begin{sidewaysfigure}\emptyfloatpage
+%\ffigbox[\FBwidth]
+%{\includegraphics[width=4in]{pslearn.eps}}
+%{\caption{Figure inside \env{sidewaysfigure} environment}%
+%\label{fig:rot}}
+%\end{sidewaysfigure}%
+%\end{verbatim}
+% \floatsetup[figure]{style=WSHADOWBOX}
+% \begin{sidewaysfigure}\emptyfloatpage
+% \ffigbox[\FBwidth] {\includegraphics[width=4in]{pslearn}}
+% {\caption{Figure inside \env{sidewaysfigure} environment}%
+% \label{fig:rot}}
+% \end{sidewaysfigure}%
+% %^^A For rotating floats on right side (like in
+% %^^A current documentation) put in preamble
+% %^^A \begin{quote}
+% %^^A |\usepackage[figuresright]{rotating}|
+% %^^A \end{quote}
+%
+%
+% \emph{Special settings}.\nopagebreak
+%
+% You may create special settings for all rotated floats, which use
+% \env{sideways...} environment (see page \pageref{stsetorder}).
+%
+% For one-column rotated float
+% \begin{itemize}
+% \item %
+% if exists |\floatsetup[rot|\meta{captype}|]{...}|
+% package uses these settings---the ``strongest'' settings; if they absent---uses settings from next item;
+% \item
+% if exists |\floatsetup[rotfloat]{...}|
+% package uses these settings---these settings ``stronger'' than next
+% ones; if they absent---settings for current float
+% (|\floatsetup[|\meta{captype}|]{...}|);
+% if they absent---uses default settings
+% (|\floatsetup{...}| or package settings).
+% \end{itemize}
+%
+% For two-column or wide rotated float (starred environment)
+% \begin{itemize}
+% \item %
+% if exists |\floatsetup[widerot|\meta{captype}|]{...}|
+% package uses these settings---the ``strongest'' settings;
+% if they absent---uses settings of next item;
+% \item %
+% if exists |\floatsetup[widerotfloat]{...}|
+% package uses these settings---these settings ``stronger'' than settings
+% in next item; if they absent---uses settings of next item;
+% \item %
+% if exists |\floatsetup[rot|\meta{captype}|]{...}|
+% package uses these settings---these settings ``stronger'' than settings
+% in next item; if they absent---uses settings of next item;
+% \item %
+% if exists |\floatsetup[rotfloat]{...}|
+% package uses these settings---these settings ``stronger'' than next
+% ones;
+% %^^A if they absent---settings of next item;
+% %^^A \item %
+% %^^A if exists |\floatsetup[wide|\meta{captype}|]{...}|
+% %^^A package uses these settings; if they absent---settings of next item;
+% %^^A \item %
+% %^^A if exists |\floatsetup[widefloat]{...}|
+% %^^A package uses these settings;
+% if they absent---uses settings for current float
+% (|\floatsetup|\marg{captype}|{...}|);
+% if they absent---uses default settings
+% (|\floatsetup{...}| or package settings).
+% \end{itemize}
+%
+% \emph{Notes}.\nopagebreak
+%
+% 1)\enskip If you place two continued rotated floats on facing pages, the
+% better way is to gather them to binder margin. For this reason you
+% may define\footnote{In case \pkg{rotating} package has |[figuresright]|
+% option, see also files \file{frsample10.tex}--\file{frsample12.tex}
+% and code in \file{fr-sample.tex}.} before first float
+% \begin{quote}
+% |\buildFBBOX{\vbox to\rottextwidth\bgroup\vss}{\egroup}|
+% \end{quote}
+% and before second one
+% \begin{quote}
+% |\buildFBBOX{\vbox to\rottextwidth\bgroup}{\vss\egroup}|
+% \end{quote}
+% \medskip
+% The |\rottextwidth| dimension---here is saved |\textwidth| of
+% document---the |\columnwidth| and |\textwidth| inside
+% \texttt{sideways...} environment are redefined and equal to
+% |\textheight|.
+%
+% 2)\enskip In current example you may see command |\emptyfloatpage|.
+% It is offered by \pkg{floatpagestyle} package, (installed with
+% \pkg{floatrow} package). Macro |\emptyfloatpage| is abbreviation of
+% |\floatpagestyle{empty}|. The last macro redefines page style for
+% the page where \emph{current} float environment appears.
+%
+% I suppose that \pkg{floatpagestyle} package could use not correct
+% and honest way for float page style redefinition (\emph{this package redefines
+% \LaTeX's core macro} |\@outputpage|).\footnote{If you know more
+% honest way to get the same result---the redefinition of float page
+% style---please let me know.} Since this package uses
+% |\label|---|\ref| mechanism, the |\floatpagestyle| command works
+% after \emph{second} \LaTeX{} run.
+%
+% \subsection{The \pkg{lscape} Package and \env{landscape} Environment}
+%
+% Tested with version v3.0a dated 1999/02/16.\nopagebreak
+%
+%\ifx\landscape\undefined\else
+% \ifx\landscape\relax\else
+% The example with usage of \env{landscape} environment from
+% \pkg{lscape} package on the page~\pageref{fig:rotrow:WcatI}, figures
+% \ref{fig:rotrow:WcatI}--\ref{fig:rotrow:FcatI}):
+%\begin{verbatim}
+%\DeclareFloatVCode{lowthickrule}{\kern2pt\hrule height.8ptdepth0pt}
+%\floatsetup[figure]{style=ruled,rowprecode=thickrule,
+% rowpostcode=lowthickrule,capposition=TOP}
+%\begin{landscape}
+%\begin{figure}\emptyfloatpage
+%...
+%\end{verbatim}
+% |\floatsetup| code sets \texttt{ruled} float style,
+% then settings for above and below material are redefined:
+% \texttt{rowprecode=} and \texttt{rowpostcode=} keys define thick
+% rules but for floatrow as whole (the `individual' |\hrule|'s above/below
+% float boxes absent).
+%\fi\fi
+%
+%
+% The \env{landscape} environment creates a new page. It would be
+% useful to start new section of document, e.g., appendix. (In current
+% document it was placed just before appendix)
+%
+%^^A \emph{Founded limitations}.\nopagebreak
+%^^A The tested version works incorrect (does not rotates contents)
+%^^A with \pkg{hypcap} package.
+%
+% \subsection{The \pkg{listings} Package}
+%
+% Tested with version v1.3 dated 2004/09/07.\nopagebreak
+%
+% This package has its strong layout mechanism also for creation for floating
+% algorithms. The usage of |\lstset| command and \pkg{caption} package settings
+% gives you necessary result\footnote{Please note and read \pkg{caption} documentation:
+% the co-operation of \pkg{caption}3.x and \pkg{listings} succeed
+% with version of last one not older than 1.2.} for algorithm type of float.
+%
+% For the cases of appearance of listings inside of other float environments
+% e.g. inside \env{figure} environments with boxed styles like \texttt{Boxed}
+% and \texttt{BOXED} and with predefined float width, you ought to set:
+% \begin{quote}
+% |\lstset{linewidth=\hsize}|
+% \end{quote}
+% in the preamble, or just before \env{lstlisting} environment. Or in optional argument
+% of \env{lstlisting} environment---here you must set width like:
+% \begin{quote}
+% |\begin{lstlisting}[linewidth=\hsize]|
+% \end{quote}
+%
+% Another limitation is that you can't put \env{lstlisting} inside
+% |\floatbox| contents.
+%
+% \subsection{The \pkg{longtable} Package}
+%
+% There was added a patch to the |\LT@array| macro (\pkg{longtable}
+% package)\footnote{Thanks to A. Sommerfeldt for help to make this code compact.}:
+% this patch adds the same font settings as for \env{table} environments, and
+% adds code which helps to get width of \env{longtable} caption equal to the
+% width of table. For settings of caption width there was created a key.
+%
+% \DescribeMacro{LTcapwidth=}
+% This key could have any value, like |5cm| or |\hsize|.
+% If you'll write \texttt{LTcapwidth=table} or \texttt{LTcapwidth=contents},
+% you will get caption width equal to the width of table. In this case settings
+% for width of caption use information from \texttt{aux}-file, so you'll get
+% correct caption width at the time when the width of full table become stable.
+%
+% The \env{longtable} environment uses layout settings from |\floatsetup[table]|
+% and |\floatsetup[longtable]| macros. The |\floatsetup[longtable]| will be ``strongest''
+% in this pair.
+%
+% \subsection{The \pkg{hyperref} and \pkg{hypcap} Packages}
+%
+% There were tested versions v6.74i (\pkg{hyperref}) and v1.3 (\pkg{hypcap}).
+%
+% The \pkg{floatrow} tries not to expand its code to |\caption| stuff.
+% I hope that environments supported by \pkg{floatrow} won't
+% make harm to \pkg{caption}---\pkg{hyperref}/\pkg{hypcap} tandem.
+%
+% \subsection{The Incompatibilities}
+%
+% The incompatibilities at first could follow the incompatibilities of
+% \pkg{caption} 3.x package:
+% \begin{quote}
+% \pkg{ccaption}, \pkg{hvfloat}, \pkg{nonfloat}
+% \end{quote}
+%
+% The known incompatibilities of \pkg{floatrow} package itself
+% is \pkg{sidecap} package\footnote{Despite that I'm trying
+% to follow offered layouts of this package. Great thanks for
+% Rolf Niepraschk and Hubert G\"{a}\ss{}lein for package with
+% rich implementation of such float
+% layouts.}: the \pkg{floatrow} package doesn't expands its
+% layouts to \env{SCfigure} and \env{SCtable} environments.
+%
+% \addtocontents{toc}{\string\pagebreak[3]}
+% \section{Limitations}
+%
+% There are known limitations, which were found during usage of
+% \pkg{floatrow}:
+% \begin{itemize}
+% %^^A \item %
+% %^^A Limitations for boxed and ruled styles in beside floats:
+% %^^A be careful with usage of \emph{alone} minipage environment in object or caption
+% %^^A in |\floatbox| macro. Since the object and caption are created in minipage
+% %^^A environment already, the added \texttt{minipage} could get wrong layout
+% %^^A (vertical alignment). But, as I found, you may use a few \texttt{minipage}s in
+% %^^A object without harm.
+% \item %
+% You cannot use |\floatbox| stuff for floats with \texttt{verbatim}
+% environment and/or |\verb|.
+% \item %
+% This limitation was mentioned above: the package uses
+% |\label|---|\ref| mechanism, thus, if you use float layout which
+% demands common height of objects and/or captions in float row,
+% you'll get correct result after second or more runs. If you change
+% contents of float which change its height you must run \LaTeX{}
+% twice or more times too.
+%
+% Beside captions and other facing layout will appears correctly only
+% after second \LaTeX's run (sometimes you need to run more times).
+% \item %
+% The version 3.0a (and newer) of \pkg{caption} package and
+% \pkg{floatrow} package do not support optional argument \emph{after}
+% caption ``title''. You may use |\floatfoot|
+% macro after main caption argument.
+% \item %
+% Do not use |\FBwidth| option for complex float contents (which you
+% could not put inside |\hbox|). (But you allowed to use |\vspace|
+% macro at the very end/very beginning of object contents for fine
+% vertical tuning.)
+% \item %
+% The \texttt{floatrow} environment allows spaces (and even empty
+% lines, which sometimes create better and correct result!) between
+% |\floatbox|'es, but if you add some code between them you
+% must put
+% |%| after this command.
+% \item %
+% This is common rule---be careful with spaces at the end of lines
+% inside float contents (see \texttt{CTAN:/info/epslatex.ps} for more
+% explanations).
+%
+% When you build plain float environment the better way is to separate
+% |\caption| and object contents (and also
+% |\floatfoot|/|\footnotetext| contents) each by empty lines or (if
+% not empty lines) end each part (and arguments of mentioned commands)
+% by percent sign. In this case you'll avoid unwanted spaces/lines at
+% the end of contents of each part, or wrong justification of float
+% components.
+% %^^A \item %
+% %^^A Usage of fancy boxes \texttt{shadowbox} and \texttt{wshadowbox} could get wrong
+% %^^A layout with beside captions.
+% \item If you use inside |\floatbox| stuff
+% \env{tabularx} or \env{tabular*} environments (or any other) with
+% |\hsize| command inside \meta{width} argument, you must repeat the
+% |\hsize| argument in \meta{width} argument of |\floatbox| macro.
+%
+% If you want to set width of \env{tabularx} or \env{tabular*}
+% environments (or any other) like |.8\hsize| (or |1.2\hsize|) and
+% these environments placed inside any |\floatbox| macro, load
+% |.8\hsize| in \meta{width} argument of |\floatbox| macro, and in
+% \meta{width} argument of \env{tabularx} or \env{tabular*} load only
+% |\hsize| macro (see also sample file \file{frsample03.tex}).
+%
+% In other cases (especially in fancy layout or settings) be careful
+% with usage of |\hsize| as \meta{width} option of |\floatbox|.
+% \end{itemize}
+%
+% \addtocontents{toc}{\string\nopagebreak}
+%
+% \section{Acknowledgements}
+%
+% Thanks for Steven Cochran and Axel Sommerfeldt for all their advices and spirit.
+% Special thanks for Axel for the patient answering, code, and
+% help in \emph{all} my questions and problems in \pkg{floatrow} package.
+%
+% \medskip\noindent
+% Thanks for \emph{all} involuntary (\La)\TeX{} teachers, who teaches
+% me with their program code all these years.
+%
+% \medskip\noindent
+% Thanks for Keith Reckdahl, author of \file{epslatex}, which
+% documentation, at last, encouraged me to create the CTAN version of
+% this package.
+%
+% \medskip\noindent
+% \emph{Thanks for \emph{all} authors of second edition of \LaTeX{}
+% Companion for this book.}
+%
+%\ifx\landscape\undefined\else
+% \ifx\landscape\relax\else
+% \clearfloatsetup{figure}
+% \floatsetup[figure]{style=ruled,rowprecode=thickrule,
+% rowpostcode=lowthickrule,capposition=TOP,
+% footposition=caption}
+% \newlength\Mylen\Mylen\textwidth
+%
+% \begin{landscape}
+%
+% \begin{figure}\emptyfloatpage
+%
+% \begin{floatrow}[4]
+% \ffigbox[][][t]
+% {{\input{TheCat.picture}}%^^A
+% \footnotetext[1]{The
+% picture was created with \cmd{\qbezier}
+% macro}}%
+% {\caption[Beside figure~I, top of object box]%
+% {Beside figure~I, top of object box\protect\mpfootnotemark}%
+% \label{fig:rotrow:WcatI}}%
+%
+% \floatbox{figure}[2\FBwidth][][b]
+% {\caption{Beside figure~II, bottom of object box}%
+% \label{fig:rotrow:BcatI}%
+% \floatfoot{There are all \cmd{\qbezier} macros and only two vertical lines}}%
+% {\input{BlackCat.picture}}%
+%
+% \ffigbox[\FBwidth]
+% {{\unitlength2.5\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{Mouse.picture}}\footnote[2]%
+% {Look at funny footnotemark!}}
+% {\caption{Beside figure~III, center of object box}%
+% \label{fig:rotrow:mouseI}\floatfoot{The Mouse-animal image}}%
+%
+% \floatbox{figure}[\Xhsize][\Mylen]
+% {\caption{Beside figure~IV}\label{fig:rotrow:FcatI}}
+% {\Resizebox\hsize\vsize{35}{136}{\input{BlackCat2.picture}}}
+% \end{floatrow}
+%
+% \end{figure}
+%
+% \end{landscape}
+%\fi\fi
+%
+% \clearpage
+% \suppressfloats[t]
+% \section{Appendix}
+%
+% \subsection{Miscellaneous}
+%
+% \subsubsection{Mixed Row}
+%
+% \floatsetup[figure]{style=Boxed,midcode=captionskip,
+% frameset={\fboxsep12pt\fboxrule1pt}}
+% Sometimes author (or designer) wants to put different types of floats, e.g., table and figure
+% beside in one row. This situation creates some problems.
+%
+% The first problem is that you must put different types of float in
+% one float environment, which sets its own layout for included float
+% box(es). For creation of right layouts write
+% |\killfloatstyle| command at the beginning of \env{floatrow}
+% environment or just before first ``foreign'' |\floatbox| macro (in
+% current example---before |\ttabbox|; the |\ffigbox| macro is
+% ``native'' for \env{figure} environment).
+%
+% The second problem is that figures usually have captions below
+% graphics, but tables could have caption \emph{above} their contents.
+% The alignment of all floats is similar: the bottom of upper part and
+% top of lower part. In this case if you want to put such beside figure
+% and table you'll get undesirable result. For such situations you may
+% use one of following commands:
+%\begin{verbatim}
+%\CenterFloatBoxes
+%\TopFloatBoxes
+%\BottomFloatBoxes
+%\end{verbatim}
+% which align \emph{full} float boxes by center, top or bottom lines.
+% These macros were created by |\buildFBBOX| macro.
+% There is also |\PlainFloatBoxes| which restores standard behavior of
+% |\floatbox|'es.
+%
+% The usage of |\CenterFloatBoxes| and |\killfloatstyle| you'll see in
+% mixed float row with figure~\ref{fig:rowmixspec:WcatI} and
+% table~\ref{tab:rowmixspec:tabI}\label{mixrow}:
+% \DeleteShortVerb{\|}%
+% \begin{figure}
+% \begin{floatrow}
+% \CenterFloatBoxes \killfloatstyle
+% \ffigbox[\FBwidth]
+% {{\unitlength1.15\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheCat.picture}}}
+% {\caption{Figure (\texttt{Boxed} style) beside table
+% (vertical centering)}\label{fig:rowmixspec:WcatI}}%
+% \extrarowheight1pt
+% \ttabbox
+% {\caption{Table beside \texttt{Boxed}-styled figure
+% (vertical centering)}\label{tab:rowmixspec:tabI}}
+% {\begin{tabular}{|l|c|c|c|}
+% \hline
+% \multirowthead{2}[-1ex]{Column Head}
+% & \multicolumn{3}{c|}{\thead{Data}} \\
+% \cline{2-4}
+% & \thead{I} & \thead{II} & \thead{III} \\
+% \hline
+% First row & 1 & 2 & \phantom01 \\
+% Second row & 3 & 4 & \phantom06 \\
+% Third row & 6 & 8 & 28 \\
+% \hline
+% \end{tabular}}
+% \end{floatrow}
+% \end{figure}
+% \MakeShortVerb{\|}%
+%\begin{verbatim}
+%\begin{figure}
+%\begin{floatrow}
+%\CenterFloatBoxes\killfloatstyle
+%\ffigbox[\FBwidth]
+% ...
+%\ttabbox
+% ...
+%\end{verbatim}
+%
+% \emph{Note.} Both figure and table boxes have got width equal to
+% contents of objects. The |\ffigbox| command has optional argument
+% |[\FBwidth]|, but |\ttabbox| have not any option---it uses
+% |[\FBwidth]| option as default (see definitions on page
+% \pageref{abbrcom}).
+%
+%
+% \subsubsection{Usage of Captionsetup and Thisfloatsetup
+% Inside Floatbox Stuff}
+%
+% Example of figures in row (figures~\ref{floatbox:FR:lfig} and
+% \ref{floatbox:FR:fig}). There were used predefined float commands
+% |\fcapsideleft| and |\fcapsideright| with added |\captionsetup| and
+% |\thisfloatsetup|:
+%\begin{verbatim}
+%\newfloatcommand{fcapsideleft}{figure}[{\capbeside
+% \captionsetup[capbesidefigure]{format=break,labelsep=none,
+% justification=raggedleft}%
+% \thisfloatsetup{capbesideposition=left}}]%
+% [\FBwidth]
+%\newfloatcommand{fcapsideright}{figure}[{\capbeside
+% \captionsetup[capbesidefigure]{format=break,labelsep=none,
+% justification=raggedright}%
+% \thisfloatsetup{capbesideposition=right}}]%
+% [\FBwidth]
+%\end{verbatim}
+%
+% \clearfloatsetup{figure}
+% \floatsetup[figure]
+% {style=Boxed,capposition=beside,objectset=centering,
+% floatwidth=\columnwidth,capbesidewidth=5.75cc,
+% capbesidesep=cicero,margins=centering,
+% capbesideframe=yes,floatwidth=sidefil}
+%
+% \begin{figure}[b!]
+% \begin{floatrow}
+% \fcapsideleft
+% {\unitlength1.44\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheCat.picture}}
+% {\caption{%^^A
+% Float box (\cmd{\fcapsideleft})
+% width of graphics}\label{floatbox:FR:lfig}}%
+% \hsize\Xhsize \fcapsideright[\hsize]
+% {\setlength\unitlength{\hsize/61}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{BlackCat.picture}}%
+% {\caption{%^^A
+% Float box (\cmd{\fcapsideright})
+% width of rest float row space}\label{floatbox:FR:fig}}%
+% \end{floatrow}%
+% \end{figure}%
+% The caption format \texttt{break} was defined by following way:
+%\begin{verbatim}
+%\DeclareCaptionFormat{break}{#1#2\par#3\par}
+%\end{verbatim}
+%
+% For these figures created following \verb|\floatsetup| settings:
+%\begin{verbatim}
+%\floatsetup[figure]
+% {style=Boxed,capposition=beside,
+% objectset=centering,floatwidth=\columnwidth,
+% capbesidewidth=5.75cc,capbesidesep=cicero,margins=centering,
+% capbesideframe=yes,floatwidth=sidefil}
+%\end{verbatim}
+% The key \texttt{floatwidth=sidefill} means that in the case of
+% caption has predefined width, object occupies the rest space of
+% \verb|\hsize| (in the case of no \meta{width} option used, or used
+% \verb|\hsize| option).
+%
+% Left figure uses width of graphics, left one occupies the rest of
+% float row---for this reason just before \verb|\fcapsideright|
+% command was written tricky setting:
+%\begin{verbatim}
+%\hsize\Xhsize
+%\end{verbatim}
+% which, in case of caption placed beside float object defines width
+% of full float box.
+%
+% The default \meta{width} option of \verb|\fcapsideleft| and
+% \verb|\fcapsideright| commands is \verb|\FBwidth|, so for
+% figure~\ref{floatbox:FR:fig} on the right (created by
+% \verb|\fcapsideright| command) in the \meta{width} option was set
+% \verb|\hsize| command to fill the rest space of float row.
+%
+% Since in float style the key \texttt{heightadjust=object} (included
+% in definition of \texttt{Boxed} style), both objects have the same
+% height.
+%
+% \subsubsection{Predefined Beside Caption Width}
+%
+% This example includes |\useFCwidth| command, which switches on usage
+% of previously defined caption width with \texttt{capbesidewidth=} key (in command
+% |\thisfloatsetup| before |\floatbox| macro) or, if you didn't set caption width (like
+% in current example), macro counts natural width of caption contents
+% (see figure~\ref{fig:Idog:w}\footnote{Inside \cmd{\floatbox} you may
+% not set predefined width of caption, but remember that you
+% \emph{must} define width of caption in case of usage of plain float
+% environment.}). The object---caption box in this case aligned using
+% alignment settings from |margins| key (its options defined by |\setfloatmargins|
+% or |\floatcapbesidemargins| macro). In this documentation they are
+% centered (see page~\pageref{fsetup:besmarg}).
+%\begin{verbatim}
+%\begin{figure}
+%\floatbox[\capbeside\useFCwidth]{figure}[\FBwidth]
+% ...
+%\end{figure}
+%\end{verbatim}
+% \clearfloatsetup{figure}
+% \floatsetup[figure]{style=plain}
+%
+% \begin{figure}[h]
+% \floatbox[\capbeside\useFCwidth]{figure}[\FBwidth]
+% {\caption[Beside
+% caption, width equals to caption's text]{Beside
+% caption}\label{fig:Idog:w}}
+% {{\setlength\unitlength{{4cm}/60}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{BlackDog.picture}}}
+% \end{figure}%
+%
+% The settings for current float:
+%\begin{verbatim}
+%\floatsetup[figure]{style=plain}
+%\end{verbatim}
+%
+% \subsubsection{Predefined Beside Caption Width with The Rest Space for Object}
+%
+% The figure \ref{fig:capbeside:trick} uses following float style:%^^A
+%^^A \footnote{There are also addition settings for captions:
+%^^A \cmd{\captionsetup[capbesidefigure]}\allowbreak
+%^^A \texttt{\{format=default,}\allowbreak\texttt{labelsep=none\}}
+%^^A which is necessary for current documentation: the \pkg{hyperref}
+%^^A creates unwanted result with empty argument of caption title. The same settings used
+%^^A for figures~\ref{floatrow:pre:figI} and \ref{floatrow:pre:figII}}
+%\begin{verbatim}
+%\floatsetup[figure]
+% {style=Boxed,capposition=beside,objectset=centering,
+% floatwidth=\columnwidth,capbesidewidth=\Mylen,
+% capbesideposition=left,capbesidesep=cicero,
+% margins=centering,capbesideframe=yes,
+% floatwidth=sidefil}
+%\end{verbatim}
+% The \verb|\Mylen| dimension was defined as width of caption label:
+%\begin{verbatim}
+%\newdimen\Mylen
+%\settowidth\Mylen{\captionfont\captionlabelfont
+% \figurename\ \thefigure}
+%\end{verbatim}
+%
+% \clearfloatsetup{figure}
+% \floatsetup[figure]
+% {style=Boxed,capposition=beside,objectset=centering,
+% floatwidth=\columnwidth,capbesidewidth=\Mylen,
+% capbesideposition=left,capbesidesep=cicero,
+% margins=centering,capbesideframe=yes,floatwidth=sidefil}
+% \newdimen\Mylen\settowidth\Mylen{\captionfont\captionlabelfont\figurename\ \thefigure}
+%
+% \begin{figure}
+%^^A \captionsetup[capbesidefigure]{format=default,labelsep=none}
+% \fcapside
+% {\unitlength1.1\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheCat.picture}}
+% {\caption{}\label{fig:capbeside:trick}}
+% \end{figure}%
+%
+%
+% \subsubsection{Caption Beside with Centered Object}
+%
+% The figure \ref{fig:plain:trick} uses tricky float style:
+%\begin{verbatim}
+%\floatsetup[figure]
+% {style=plain,capposition=beside,objectset=centering,
+% floatwidth=\columnwidth,capbesidewidth=6cc,
+% capbesideposition=left,capbesidesep=mcapwidth,
+% margins=centering,capbesideframe=yes,
+% floatwidth=sidefil}
+%\end{verbatim}
+% the \texttt{mcapwidth} option is a negative skip equal to caption
+% width:
+%\begin{verbatim}
+%\DeclareFloatSeparators{mcapwidth}{\hskip-\FCwidth}
+%\end{verbatim}
+% I this case all figures with beside captions centered accordingly to
+% text \verb|\hsize|. Usage of such float layout supposes that all
+% float objects are narrower than |\textwidth| by at least 2~caption
+% widths.
+%
+% \clearfloatsetup{figure} \floatsetup[figure]
+% {style=plain,capposition=beside,objectset=centering,
+% floatwidth=\columnwidth,capbesidewidth=6cc,
+% capbesideposition=left,capbesidesep=mcapwidth,
+% margins=centering,capbesideframe=yes,floatwidth=sidefil}
+% \begingroup
+% \captionsetup[capbesidefigure]{format=break,labelsep=none,
+% justification=raggedright}
+% \begin{figure}[!b]
+% \unitlength1.1\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheCat.picture}
+% \caption{%^^A
+% Plain figure}\label{fig:plain:trick}
+% \end{figure}%
+% \endgroup
+%
+% There were also temporarily, in group, changed settings for caption
+% in figure~\ref{fig:plain:trick}:
+%\begin{verbatim}
+%\captionsetup[capbesidefigure]{format=break,labelsep=none,
+% justification=raggedright}
+%\end{verbatim}
+%
+% \subsubsection{Width Definition for Beside Caption---Object Box in Float Row}
+%
+% The float row with predefined width of beside object---caption
+% boxes (figures~\ref{floatrow:pre:figI} and
+% \ref{floatrow:pre:figII}): just define before \verb|\fcapside|
+% command something like
+%\begin{verbatim}
+%\setlength\hsize{1.098\hsize}%
+%\end{verbatim}
+% as was defined for first figure, or
+%\begin{verbatim}
+%\setlength\hsize\Xhsize
+%\end{verbatim}
+% before second (here is clear that you can set |\setlength\hsize{.902\hsize}|).
+%
+% Since there were used \verb|\fcapside| commands at the beginning of
+% \env{floatrow} environment the \verb|\FCwidth| command was defined
+% as \verb|\relax|---in this case the width of caption equals to the
+% width of their contents.
+%
+% \clearfloatsetup{figure}
+% \floatsetup[figure]
+% {style=plain,capposition=beside,objectset=centering,
+% capbesideposition=left,capbesidesep=enskip,
+% margins=centering,capbesideframe=yes,floatwidth=sidefil}
+% \begin{figure}[h]\useFCwidth
+%^^A \captionsetup[capbesidefigure]{format=default,labelsep=none}
+% \begin{floatrow}
+% \setlength\hsize{1.098\hsize}%
+% \fcapside
+% {\setlength\unitlength{\hsize/64}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheCat.picture}}
+% {\caption{%^^A
+% }\label{floatrow:pre:figI}}
+% \setlength\hsize\Xhsize
+% \fcapside
+% {\setlength\unitlength{\hsize/58}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{Mouse.picture}}
+% {\caption{%^^A
+% }\label{floatrow:pre:figII}}
+% \end{floatrow}%
+% \end{figure}%
+% There was used following setup for figures:
+%\begin{verbatim}
+%\floatsetup[figure]
+% {style=plain,capposition=beside,objectset=centering,
+% capbesideposition=left,capbesidesep=enskip,
+% margins=centering,capbesideframe=yes,floatwidth=sidefil}
+%\end{verbatim}
+%
+% \subsubsection{Caption Above/Below Float and Caption Beside Float at The One Float Row}
+%
+% The float row with object and beside caption combined with object
+% and caption below (figures~\ref{flrow:mix:figI} and
+% \ref{flrow:mix:figII}). There we ought to use
+% \verb|\TopFloatBoxes|, \verb|\CenterFloatBoxes|, or
+% |\BottomFloatBoxes| commands to get correct layout---since the
+% \meta{height} argument in both float boxes defined as \texttt{4cm}
+% you may use each of these three commands. Unfortunately you must set
+% height of such beside floats by hand. The lines which create
+% described float row:
+%\begin{verbatim}
+%\begin{figure}\CenterFloatBoxes
+%\begin{floatrow}
+%\hsize1.098\hsize
+% \fcapside[\FBwidth][4cm]
+% ...
+%
+% \ffigbox[\Xhsize][4cm]
+% ...
+%\end{floatrow}%
+%\end{figure}
+%\end{verbatim}
+%
+% \clearfloatsetup{figure} \floatsetup[figure]
+% {style=Boxed,frameset={\fboxsep6pt},captionskip=5pt,capposition=bottom,
+% objectset=centering,capbesidewidth=none,capbesideposition=inside,
+% capbesidesep=enskip,margins=centering,capbesideframe=yes}
+%
+% \begin{figure}\CenterFloatBoxes
+% \begin{floatrow}
+% \hsize1.098\hsize \fcapside[\FBwidth][4cm]
+% {\unitlength1.44\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheCat.picture}}
+% {\caption{%^^A
+% Float box (\cmd{\fcapside}) with beside caption in float row
+% width float with caption below}\label{flrow:mix:figI}}%
+%
+% \ffigbox[\Xhsize][4cm]
+% {\unitlength1.44\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{BlackDog.picture}}
+% {\caption{%^^A
+% Float box (\cmd{\ffigbox}) width of rest float row
+% space} \label{flrow:mix:figII}}
+% \end{floatrow}%
+% \end{figure}
+%
+% The ``mirror layout'' (but not identical) looks like:
+%\begin{verbatim}
+%\begin{figure}\CenterFloatBoxes
+%\begin{floatrow}
+% \ffigbox[1.2\FBwidth][4cm]
+% ...
+%
+% \hsize\Xhsize
+% \fcapside[\FBwidth][4cm]
+% ...
+%\end{floatrow}%
+%\end{figure}
+%\end{verbatim}
+%
+% \begin{figure}[!b]\CenterFloatBoxes
+% \begin{floatrow}
+% \ffigbox[1.2\FBwidth][4cm]
+% {\unitlength1.44\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{BlackDog.picture}}
+% {\caption{%^^A
+% Float box (\cmd{\ffigbox}) width of rest float row
+% space}\label{floatrow:mirrmix:figII}}%
+% \hsize\Xhsize
+%
+% \fcapside[\FBwidth][4cm]
+% {\unitlength1.44\unitlength\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{TheCat.picture}}
+% {\caption{%^^A
+% Float box with beside caption (\cmd{\fcapside}) in mirror float row
+% width float with caption below}\label{floatrow:mirrmix:figI}}
+% \end{floatrow}%
+% \end{figure}
+%
+% The figures~\ref{floatrow:mirrmix:figII}--\ref{floatrow:mirrmix:figI} use
+% following float style settings:
+%\begin{verbatim}
+%\floatsetup[figure]
+% {style=Boxed,frameset={\fboxsep4pt},captionskip=5pt,
+% capposition=bottom,objectset=centering,capbesidewidth=none,
+% capbesideposition=inside,capbesidesep=enskip,margins=centering,
+% capbesideframe=yes}
+%\end{verbatim}
+%
+% \subsubsection{Photo-Album-like Layouts}
+%
+% Another example of miscellaneous float row
+% (figures~\ref{flrow:three:figIII}--\ref{floatrow:threemirr:figII},
+% and, ``mirror layout''---^^A
+% \ref{floatrow:threemirr:figI}--\ref{floatrow:threemirr:figIII}) were
+% created by following lines:
+%\begin{verbatim}
+%\begin{figure}[t]\BottomFloatBoxes
+%\begin{floatrow}
+%\hsize1.2\hsize \ffigbox[][6.7cm]
+% ...
+%
+%\vbox to6.7cm
+% {\floatsetup[figure]{floatrowsep=none}\killfloatstyle
+% \ffigbox[.8\hsize]
+% ...
+% \vss
+% \ffigbox[.8\hsize]
+% ...%
+% }%
+%\end{floatrow}%
+%\end{figure}
+%\end{verbatim}
+%
+% \floatsetup[figure]{heightadjust=none}
+% \begin{figure}[b!]\BottomFloatBoxes
+% \begin{floatrow}
+% \hsize1.2\hsize
+% \ffigbox[][6.7cm]
+% {\setlength\unitlength{\hsize/58}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{Mouse.picture}}%
+% {\caption{Float box in photo-album-like layout:
+% alone in left column}\label{flrow:three:figIII}}%
+%
+% \vbox to6.7cm {\floatsetup[figure]{floatrowsep=none}\killfloatstyle
+% \ffigbox[.8\hsize]
+% {\input{TheCat.picture}}
+% {\caption{%^^A
+% Float box in photo-album-like layout: upper float in right
+% column}\label{floatrow:three:figI}} \vss \ffigbox[.8\hsize]
+% {\input{BlackDog.picture}}%
+% {\caption{%^^A
+% Lower float in right column}%
+% \label{floatrow:threemirr:figII}}}%
+% \end{floatrow}%
+% \end{figure}
+%
+% The ``mirror'' layout created by following commands:
+%\begin{verbatim}
+%\begin{figure}[t]\TopFloatBoxes
+%\begin{floatrow}
+%\vtop to7cm
+% {\floatsetup[figure]{floatrowsep=none}\killfloatstyle
+% \ffigbox[.8\hsize]
+% ...
+% \vss
+% \ffigbox[.8\hsize]
+% ...%
+% \vskip0pt}\floatrowsep
+%
+%\ffigbox[\Xhsize][7cm-11pt]
+% ...
+%\end{floatrow}%
+%\end{figure}
+%\end{verbatim}
+% Note that in second example with ``mirror'' layout there was used
+% trick with \meta{height} definition---caption of float in the left
+% column is one line longer, so for the right column height of float
+% was reduced by 11pt---|\baselineskip| for |\small|
+% size\footnote{You get correct height with such calculations for
+% beside floats with \pkg{caption}'s version not older than 3.0d.}
+% (here were used \pkg{calc} package possibilities). The |\vtop| of
+% left column ends with |\vskip0pt|, otherwise you get fanny unwanted
+% layout.
+%
+%
+% \begin{figure}\TopFloatBoxes
+% \begin{floatrow}
+% \vtop to7cm {\floatsetup[figure]{floatrowsep=none}\killfloatstyle
+% \ffigbox[.8\hsize]
+% {\input{TheCat.picture}}
+% {\caption{%^^A
+% Float box in photo-album-like layout: upper float in left
+% column}\label{floatrow:threemirr:figI}} \vss \ffigbox[.8\hsize]
+% {\input{BlackDog.picture}}%
+% {\caption{%^^A
+% Float box in photo-album-like layout: lower float in left column}%
+% \label{floatrow:three:figII}}\vskip0pt}\floatrowsep
+%
+% \ffigbox[\Xhsize][7cm-11pt]
+% {\setlength\unitlength{\hsize/58}\ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi
+% \input{Mouse.picture}}%
+% {\caption{%^^A
+% Float box in photo-album-like layout: alone in right
+% column}\label{floatrow:threemirr:figIII}}
+% \end{floatrow}%
+% \end{figure}
+%
+% In both examples for two floats one above another was cancelled
+% |\floatrowsep| code inside |\vbox|/|\vtop|.
+%
+% Note that these examples are rather specific---you may try with
+% other combinations (e.g. more-``columned''), but maybe these layouts
+% need more care with usage of |\Xhsize| and/or |\floatrowsep|.
+%
+% I suppose that last two examples could conflict with ``motto'' of
+% this package---to reduce and remove layout code from document; but
+% photo-album-like layout is rather rare in technical literature (It
+% isn't?).
+%
+% \subsection{Sample files}
+%
+% The \env{floatrow} package distribution offers a few files with
+% examples, which show settings, not covered by current document (some
+% of them are bit exotic and unnatural). The samples have not aim to
+% create perfect layout, but to show easy modification for all float
+% types, and show goals and drawbacks in combinations of chosen layout
+% with different float types and their contents.
+%
+% \emph{Note}. All miscellaneous float styles (i.e. almost
+% all sample files) need at least two \LaTeX{} runs.
+%
+% The list of samples:
+%
+% \begin{Options}{\OptionLabel}
+% \item[frsample01.tex] all possible combinations of predefined \pkg{floatrow} styles
+% for captions above/below floats with foot material;
+% there were created plain float environments and \env{floatrow}s, also
+% there were created boxes with alone objects and alone captions;
+% \item[frsample02.tex] all possible combinations of predefined \pkg{floatrow} styles
+% for beside captions and all possible caption positions;
+% \item[frsample03.tex] different tests with tables;
+% \item[frsample04.tex] sample with fancy layout with usage of beside captions;
+% \item[frsample05.tex] one-column facing layout; miscellaneous caption settings.
+% \end{Options}
+%
+% The next bundle of samples is a few file-headers with different
+% preamble which run the same file with various float
+% layouts. For these examples there was created a new float type of
+% float \texttt{textbox}---which includes text in its object contents.
+% \begin{Options}{\OptionLabel}
+% \item[frsample10.tex] one column non-facing layout; figures printed in \texttt{plain} style;
+% text boxes use miscellaneous ruled style;
+% \item[frsample11.tex] one-column non-facing layout with elements hanged on left margin
+% (e.g. wide floats, in starred environments, like \env{figure*});
+% \item[frsample12.tex] two-column layout with attempts of colored float styles.
+% \end{Options}
+%\vfil
+%
+% \section{Obsolete Commands}\label{sec:changed}
+%
+% There are obsolete macros which were replaced by commands from
+% |\floatsetup|, renamed or deleted after version 0.1b.
+%
+% \begingroup\extrarowheight1.75pt\small\tabcolsep.5\tabcolsep
+% \medskip\parindent0pt
+% \begin{tabular*}\hsize{@{\extracolsep{-.3ptplus1fill}}|
+% >{\rightskip0ptplus1fil}p{.35\hsize}|
+% >{\rightskip0ptplus1fil}p{.6\hsize}|}
+% \multicolumn{2}{c}{Removed or changed commands}
+% \\\hline
+% \thead{Command}
+% &
+% \thead{Changed to}
+% \\\hline
+% \extrarowheight0pt\begin{tabular}[t]{@{}l}
+% \cmd{\renewfloatstyle},\\
+% \cmd{\newfloatstyle},\\
+% \cmd{\definefloatstyle}
+% \end{tabular}&
+% \cmd{\DeclareFloatStyle}---this command uses \cmd{\floatsetup}
+% mechanism
+% \\\hline
+% \cmd{\restorerestylefloat} & removed
+% \\\hline
+% \cmd{\captionskip} & command, not a skip
+% \\\hline
+% \cmd{\floatfootskip} & command, not a skip
+% \\\hline
+% \end{tabular*}\pagebreak
+%
+% \vskip1pt
+% \begin{tabular*}\hsize{@{\extracolsep{-.3ptplus1fill}}|
+% >{\rightskip0ptplus1fil}p{.35\hsize}|
+% >{\rightskip0ptplus1fil}p{.6\hsize}|}
+% \multicolumn{2}{c}{Commands, replaced by keys}
+% \\\hline
+% \thead{Deleted Command}
+% &
+% \thead{Key Analog}
+% \\\hline
+% \cmd{\floatobjectset} &
+% in current version \emph{do not used for definition of object
+% settings}, use key
+% \texttt{objectset=}
+% \\\hline
+% \cmd{\alignsidecaption}&
+% \texttt{capbesideframe=yes}
+% \\\hline
+% \extrarowheight0pt\begin{tabular}[t]{@{}l}
+% \smash{\cmd{\capbesidecenter}},\\ \smash{\cmd{\capbesidetop}},\\ \smash{\cmd{\capbesidebottom}},\\
+% \smash{\cmd{\capbesideinside}},\\ \smash{\cmd{\capbesideoutside}},\\
+% \smash{\cmd{\capbesideleft}},\\ \smash{\cmd{\capbesideright}}
+% \end{tabular}&
+% \extrarowheight0pt\begin{tabular}[t]{@{}l}
+% \texttt{capbesideposition=center}\\
+% \texttt{capbesideposition=top}\\
+% \texttt{capbesideposition=bottom}\\
+% \texttt{capbesideposition=inside}\\
+% \texttt{capbesideposition=outside}\\
+% \texttt{capbesideposition=left}\\
+% \texttt{capbesideposition=right}
+% \end{tabular}
+% \\\hline
+% \extrarowheight0pt\begin{tabular}[t]{@{}l}
+% \cmd{\floatrowsep},\\ \cmd{\floatcapbesidesep}
+% \end{tabular}&
+% in current version \emph{do not used for definition of separation
+% material}, use keys\par \extrarowheight0pt
+% \begin{tabular}[t]{@{}l}
+% \texttt{floatrowsep=}\\
+% \texttt{capbesidesep=}
+% \end{tabular}
+% \\\hline
+% \extrarowheight0pt\begin{tabular}[t]{@{}l}
+% \cmd{\FBcenter}\vphantom{g},\\ \cmd{\FBleft}\vphantom{g},\\ \cmd{\FBright},\\ \cmd{\FBnormal}
+% \end{tabular}&
+% \extrarowheight0pt\begin{tabular}[t]{@{}l}
+% \texttt{margins=center},\\
+% \texttt{margins=raggedright},\\
+% \texttt{margins=raggedleft}, \\
+% \texttt{margins=center},\\
+% \end{tabular}
+% \\\hline
+% \cmd{\setfloatstyle} & \texttt{style=}
+% \\\hline
+% \begin{tabular}[t]{@{}l}
+% \cmd{\Setframe}\\
+% \cmd{\setframe}
+% \end{tabular}
+% & use \texttt{framestyle=} and \texttt{frameset=} keys
+% \\\hline
+% \cmd{\setrules}
+% & use \texttt{precode=}, \texttt{postcode=}, \texttt{midcode=} (also
+% \texttt{rowpercode} and \texttt{rowpostcode}) keys
+% \\\hline
+% \end{tabular*}
+%
+% \vskip1pt
+%
+% \begin{tabular*}\hsize{@{\extracolsep{-.3ptplus1fill}}|
+% >{\rightskip0ptplus1fil}p{.35\hsize}|
+% >{\rightskip0ptplus1fil}p{.6\hsize}|}
+% \multicolumn{2}{c}{Renamed keys}
+% \\\hline
+% \thead{Key}
+% &
+% \thead{Changed to}
+% \\\hline
+% \texttt{attachedcapstyle=} & \texttt{relatedcapstyle=}
+% \\\hline
+% \texttt{floatstyle=} & \texttt{style=}
+% \\\hline
+% \texttt{floatfont=} & \texttt{font=}
+% \\\hline
+% \texttt{putcaptionbeside=} & {capposition=beside}
+% \\\hline
+% \texttt{besidecapposition=} & \texttt{capbesideposition=}
+% \\\hline
+% \texttt{besidecapwidth=} & \texttt{capbesidewidth=}
+% \\\hline
+% \texttt{besidecapframe=} & \texttt{capbesideframe=}
+% \\\hline
+% \texttt{floatmarginsset=} & \texttt{margins=}
+% \\\hline
+% \texttt{besidecapsep=} & \texttt{capbesidesep=}
+% \\\hline
+% \texttt{Precode=} & \texttt{rowprecode=}
+% \\\hline
+% \texttt{Postcode=} & \texttt{rowpostcode=}
+% \\\hline
+% \texttt{framereduce=} & \texttt{framefit=}
+% \\\hline
+% \extrarowheight0pt\begin{tabular}[t]{@{}l@{}}
+% \vphantom{(}options of \texttt{objectset=}\\\quad and \texttt{margins=}\\
+% \texttt{flushleft},\\ \texttt{flushright},\\\texttt{center}
+% \end{tabular} &
+% \extrarowheight0pt\begin{tabular}[t]{@{}l@{}}
+% \vphantom{(}options of \texttt{objectset=} and \texttt{margins=} (for unification\\\quad
+% with analogous key options in \pkg{caption} package)\\
+% \texttt{raggedright},\\ \texttt{raggedleft},\\ \texttt{centering}
+% \end{tabular}
+% \\\hline
+% \end{tabular*}
+% \endgroup
+% \MakeShortVerb{\|}%
+%
+% \StopEventually{}
+% \hfuzz7pt
+%
+% \section{The Code}
+%
+% \subsection{The Prelude}
+%
+% \changes{v0.1a}{2004/09/28}{Since the changes of version 0.1a touched
+% a lot of package all entries of changing messages deleted.}
+% \changes{v0.1d}{2005/02/07}{Removed info, error, command macros---used standard instead}
+% The first step is to check whether \pkg{float} and \pkg{rotfloat} are loaded or not.
+% If yes, there go error messages.
+% \changes{v0.1d}{2005/02/07}{Added test for \pkg{rotfloat} package}
+% \begin{macrocode}
+%<*floatrow>
+\@ifundefined{float@caption}{}%
+ {\PackageError{floatrow}{Do not use float package with floatrow}{}}
+\@ifundefined{rotfloat@float}{}%
+ {\PackageError{floatrow}{Do not use rotfloat package with floatrow}{}}
+% \end{macrocode}
+%
+% The next lines emulate already loaded \pkg{float} and \pkg{rotfloat} packages.
+%
+% If in preamble, after loading of \pkg{floatrow} package
+% is used |\usepackage| with \pkg{float} package
+% (the \pkg{float} package doesn't support any options), the defining
+% of command |\ver@float.sty|, which emulates loading of package will do not any harm.
+%
+% Unfortunately the \pkg{rotfloat} package allows to transfer options of \pkg{rotating}
+% package in the case of appearance of both packages in one |\usepackage| line. Thus,
+% if someone loads options in \pkg{rotating}---\pkg{rotfloat} line, he will get
+% `option clash' error. A followed help gives a simple solution of such problem---moving options
+% in |\documentclass| line and make them global. I hope, that moving \pkg{rotating}'s option as
+% global will do not harm to documents, but now you aware of ``nonnecessity'' of loading
+% of \pkg{rotfloat} package.
+% \changes{v0.1e}{2005/03/22}{Restoring code of emulation of loading for \pkg{float}
+% and \pkg{rotfloat} packages.}
+% \changes{v0.1f}{2005/06/14}{The version, date and description of \pkg{float} and
+% \pkg{floatrow} borrowed from originals (AS).}
+% \begin{macrocode}
+%\expandafter\let\csname ver@float.sty\expandafter\endcsname
+% \csname ver@floatrow.sty\endcsname
+%\expandafter\let\csname ver@rotfloat.sty\expandafter\endcsname
+% \csname ver@floatrow.sty\endcsname
+\@namedef{ver@float.sty}{2001/11/08 v1.3d (excerpt)
+ Float enhancements (AL)}
+\@namedef{ver@rotfloat.sty}{2004/01/04 v1.2 (excerpt)
+ Combining float+rotating package (AS)}
+% \end{macrocode}
+%
+% Here goes request for \pkg{keyval} package.
+% \changes{v0.1c}{2004/10/22}{Bug fix: added request for \pkg{keyval} package.}
+% \begin{macrocode}
+\RequirePackage{keyval}
+% \end{macrocode}
+%
+% Here goes request for \file{caption3} file, core part of \pkg{caption} package.
+% \changes{v0.1f}{2005/06/14}{Added request for \pkg{caption3} package.}
+% \begin{macrocode}
+\RequirePackage{caption3}
+% \end{macrocode}
+%
+% \subsection{Storing of \LaTeX's Internal Macros}
+%
+% \begin{macro}{\FR@flboxreset}
+% First goes storage of \LaTeX's macro |\@floatboxreset| from bundle of float definitions.
+% \begin{macrocode}
+\@ifdefinable\FR@flboxreset{\let\FR@flboxreset\@floatboxreset}
+\@ifdefinable\FR@makecaption{\let\FR@makecaption\@makecaption}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FB@caption}
+% Here is stored standard \LaTeX's |\caption| command (it is used for caption
+% width counting).
+% \changes{v0.1f}{2005/06/14}{Restores \LaTeX's \cmd{\caption} macro (for width count)}
+% \begin{macrocode}
+\newcommand\FB@caption{%
+ \ifx\@captype\@undefined
+ \@latex@error{\noexpand\caption outside float}\@ehd
+ \expandafter\@gobble
+ \else
+ \refstepcounter\@captype
+ \expandafter\@firstofone
+ \fi
+ {\@dblarg{\@caption\@captype}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\float@caption}
+% The |\float@caption| used as flag for caption package.
+% \changes{v0.1f}{2005/06/14}{Saves \cmd{\@caption}: used as flag
+% for \pkg{caption}, \pkg{hyperref}, (\pkg{pdfpages}) packages.}
+% \begin{macrocode}
+\@ifdefinable\float@caption{\let\float@caption\@caption}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Borrowed Code (with original comment) from \pkg{float} package}
+%
+% From this point starts \pkg{float} package's core code (version 1.3). The necessary
+% explanation of macro code also borrowed from \pkg{float} package and typed
+% with slanted font. Some macros
+% were skipped or edited (see \emph{floatrow notes}).
+%
+% \begin{sl}\medskip
+% In \LaTeX, floats are assigned `type numbers' that are powers of~$2$.
+% Since there are only two classes of floats, their type numbers are
+% hardwired into the document styles. We need to be somewhat more flexible,
+% and thus we initialize a counter to hold the next type number to be
+% assigned. This counter will be incremented appropriately later.
+% \begin{macrocode}
+\newcounter{float@type}
+\@ifundefined{c@figure}%
+ {\setcounter{float@type}{1}}%
+ {\setcounter{float@type}{4}}
+% \end{macrocode}
+%
+% \begin{macro}{\floatstyle}
+% The |\floatstyle| command puts its argument into the
+% |\float@style| macro as the name of the new float style.
+% But if the argument doesn't denote a float style, an error message
+% is output instead: Each float style \meta{style} has a corresponding command
+% |\fs@|\meta{style} that contains the appropriate declarations.
+% If the control sequence |\fs@|\meta{arg} (which goes with the
+% argument \meta{arg} to |\floatstyle|) is undefined, i.e.,
+% equals |\relax| under |\ifx|, then the float style \meta{arg}
+% is unknown, and we call |\float@error{|\meta{arg}|}| for the
+% error message.
+%
+% {\em \textit{Floatrow note.} \pkg{float}'s error message
+% (the command \cmd{\float@error}\meta{arg}) changed to
+% \pkg{floatrow}'s one (\cmd{\flrow@error}\meta{arg}).}
+%
+% \begin{macro}{\flrow@error}
+% Here's the error message. |\@eha| is the help message that says
+% `Your command was ignored.'
+% \begin{macrocode}
+\newcommand\flrow@error[1]{\PackageError{floatrow}{%
+ Unknown float style `#1'}{\@eha}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\newcommand\floatstyle[1]{\@ifundefined{flrow@sty@#1}%
+ {\flrow@error{#1}}{\edef\float@style{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\floatname}
+% \begin{macro}{\floatplacement}
+% The next two commands are even simpler. \LaTeX\ says that
+% |\fps@|\meta{float} contains the default placement specifier for
+% the class of floats \meta{float}. |\fname@|\meta{float} expands
+% to the name that appears in \meta{float} captions, e.g., `Figure'.
+% (This is our own definition.)
+% \begin{macrocode}
+\newcommand\floatname[2]{\@namedef{fname@#1}{#2}}
+\newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}}
+% \end{macrocode}
+% \emph{\textit{Floatrow note.} Here was stuff of undocumented command \cmd{\floatevery}
+% which, I suppose, allows to set special settings for current type of float.
+% In \pkg{floatrow} package it was deleted. Use \cmd{\floatsetup} stuff instead.}
+% \end{macro}
+% \end{macro}
+%
+% \begin{em}
+% \textit{Floatrow note.}
+% The definitions of |\restylefloat| stuff were changed.
+%
+% \begin{macro}{\if@@FS}
+% The first goes flag command which, if |true|, stops repetition of float
+% layout settings.
+% \begin{macrocode}
+\newif\if@@FS
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FR@redefs}
+% This macro makes temporary redefinitions of |\@makecaption|
+% and |\@floatboxreset| macros.
+% \changes{v0.1f}{2005/06/14}{The \cmd{\@makecaption} and \cmd{\@floatboxreset}
+% macros redefined locally.}
+% \begin{macrocode}
+\newcommand\FR@redefs{%
+% \@namedef{fst@\@captype}{}%
+% \@ifundefined{sf@end@float}{}{\let\end@float\sf@end@float}%
+% \@ifundefined{sf@end@dblfloat}{}{\let\end@dblfloat\sf@end@dblfloat}%
+ \@ifundefined{HyOrg@float@makebox}{}%
+ {\let\float@makebox\HyOrg@float@makebox}%
+ \ifx\flrow@makecaption\@makecaption\relax
+ \else
+ \let\FR@makecaption\@makecaption
+ \let\@makecaption\flrow@makecaption
+ \fi
+ \let\@floatboxreset\flrow@flboxreset}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\flrow@makecaption}
+% In this macro the |\FBc@wd| used as flag for wrapped floats (for the case
+% when natural width of float counted).
+% \changes{v0.1f}{2005/06/14}{The \cmd{\@caption} redefinitions
+% transformed to \cmd{\@makecaption} ones.}
+% \changes{v0.1f}{2005/06/14}{The \cmd{\FBc@wd}\cmd{\z@} works like
+% flag (for \pkg{wrapfig}'s floats).}
+% \begin{macrocode}
+\newcommand\flrow@makecaption[2]{\global\setbox\@floatcapt
+ \vbox\bgroup\@parboxrestore
+ \reset@font
+ \if@@FS
+ \ifdim\FBc@wd>\z@
+ \hsize\FBc@wd
+ \else
+ \adj@dim\hsize+\FBo@wadj=\hsize
+ \fi
+ \fi
+ \normalsize
+ \abovecaptionskip\z@\belowcaptionskip\z@
+ \FR@makecaption{#1}{#2}\egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\killfloatstyle}
+% The third one allows to define again float layout style: it could be
+% necessary in mixed float rows.
+% \changes{v0.1g}{2005/07/15}{The macro-flag \cmd{\FR@ifflenv} removed.}
+% \begin{macrocode}
+\newcommand\killfloatstyle{\FBbuildtrue
+ \if@@FS\hsize\FB@wd\fi\global\@@FSfalse}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RawFloats}
+% This macro restores core-\LaTeX-float-environment's behavior.
+% \changes{v0.1f}{2005/06/14}{Added Macro which restores raw float behavior.}
+% \changes{v0.1g}{2005/07/15}{Added \cmd{\@parboxrestore} macro.}
+% \begin{macrocode}
+\newcommand\RawFloats[1][\@captype]{\killfloatstyle
+ \@parboxrestore
+ \let\@makecaption\FR@makecaption
+ \@namedef{end#1}{\end@float}%
+ \@namedef{end#1*}{\end@dblfloat}%
+ \@namedef{endsideways#1}{\end@rotfloat}%
+ \@namedef{endsideways#1*}{\end@rotdblfloat}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FB@capsetup}
+% This only additional definition which is used with \pkg{caption} package
+% version 3.0. With this macro you may (re)define some layout settings
+% for captions.
+% \begin{macrocode}
+\newcommand\flrow@capsetup{}
+% \end{macrocode}
+% \end{macro}
+%
+% Definitions of default float style.
+% \changes{v0.1d}{2005/02/07}{The \cmd{\floatstyle\{plain\}} command removed}
+% \begin{macrocode}
+\edef\float@style{plain}
+% \end{macrocode}
+%
+% \begin{macro}{\FBB@wd}
+% This command stores absolute width for |\floatbox|'s |\hsize|.
+% The usage of |\FBB@wd| as command needs definitions like |\edef\FBB@wd{\the\textwidth}| to get
+% right layout in float rows with |BOXED|-like layouts.
+% \changes{v0.1f}{2005/06/14}{The command is \cmd{\let} to \cmd{\relax}.}
+% \changes{v0.1g}{2005/07/15}{The macro-flag \cmd{\FR@ifflenv} removed.}
+% \begin{macrocode}
+\@ifdefinable\FBB@wd{\let\FBB@wd\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\restylefloat}
+% The redefined \pkg{float} package macros to follow |\floatsetup| stuff.
+%
+% This macro starts to work at the beginning of document, so it has tests for
+% loaded packages.
+% \changes{v0.1f}{2005/06/14}{Redefined (AS).}
+% \begin{macrocode}
+\newcommand\restylefloat{%
+ \@ifstar{\flrow@restylefloat{no}\flrow@restyle}%
+ {\flrow@restylefloat{yes}\flrow@restyle}}
+\newcommand\flrow@restylefloat[3]{%
+ \edef\FR@tmp{\noexpand
+ \floatsetup[#3]{style=\float@style,relatedcapstyle=#1}}\FR@tmp
+ #2{#3}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\flrow@restyle}
+% (Just trick for other packages? Commented.)
+% \begin{macrocode}
+%\newcommand\float@restyle{}
+% \end{macrocode}
+% To avoid redefinition of this macro by other packages (e.g. \pkg{wrapfig}, which uses
+% |\float@restyle| as recognition of \pkg{float} v1.3 package) \pkg{floatrow} package
+% uses other name.
+% \changes{v0.1f}{2005/06/14}{Added \cmd{\FR@redefs} command for local
+% redefinitions.}
+% \changes{v0.1f}{2005/06/14}{The \cmd{\xdef}\cmd{\FBB@wd} changed to \cmd{\edef}\cmd{\FBB@wd}.}
+% \begin{macrocode}
+\newcommand\flrow@restyle[1]{%
+% \end{macrocode}
+% One-column float environment.
+% \changes{v0.1f}{2005/06/14}{Added \cmd{\@captype}: necessary for \cmd{\FR@redefs}.}
+% \begin{macrocode}
+ \@namedef{#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
+ \flrow@setlist{{#1}}%
+ \textwidth\columnwidth\edef\FBB@wd{\the\columnwidth}%
+ \FRifFBOX\@@setframe\fi\@@FStrue\@float{#1}}%
+% \end{macrocode}
+% Two-column (wide) float environment.
+% \begin{macrocode}
+ \@namedef{#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
+% \end{macrocode}
+% The |\@captype| definition needed here and in next definitions to get correct and non-doubled
+% |\captionsetup| contents.
+% \begin{macrocode}
+ \flrow@setlist{{#1}{widefloat}{wide#1}}%
+ \FRifFBOX\@@setframe\fi\@@FStrue\edef\FBB@wd{\the\textwidth}%
+% \end{macrocode}
+% {\sl The standard |\@xdblfloat| macro changes |\hsize| to |\textwidth|.
+% This way is not correct so use |\@xfloat| instead.}
+% \begin{macrocode}
+ \let\@xdblfloat\@xfloat\@dblfloat{#1}}%
+ \expandafter\let\csname end#1\endcsname\float@end
+ \expandafter\let\csname end#1*\endcsname\float@dblend
+% \end{macrocode}
+% One-column rotated float environment.
+% The code contents of |\rotfloat@float| macro (\pkg{rotfloat} package) moved here.
+% \begin{macrocode}
+ \@ifundefined{@rotfloat}{}{%
+ \@namedef{sideways#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
+ \flrow@setlist{{#1}{rotfloat}{rot#1}}%
+ \columnwidth\textheight\edef\FBB@wd{\the\textheight}%
+ \FRifFBOX\@@setframe\fi\@@FStrue
+ \let\rotfloat@@makebox\float@makebox
+ \let\float@makebox\rotfloat@makebox
+ \@float{#1}}%
+ \@namedef{endsideways#1}{\FBbuildtrue\float@end}
+% \end{macrocode}
+% Two-column rotated float environment without support.
+% (The style ``support'' for non-rotated two column or wide float
+% \texttt{widefloat} and \texttt{wide}\meta{captype} was removed.)
+% \changes{v0.1d}{2005/02/07}{Restored \pkg{rotfloat}'s definition form for wide rotated float}
+% \begin{macrocode}
+ \ifx\@rotdblfloat\undefined
+ \@namedef{sideways#1*}{%
+ \PackageError{floatrow}{%
+ You need rotating version 2.10 or newer to do this}{\@ehd}%
+ \@nameuse{sideways#1}}%
+ \else
+% \end{macrocode}
+% Two-column rotated float environment with support.
+% \changes{v0.1d}{2005/02/07}{The settings for non-rotated wide float removed}
+% \begin{macrocode}
+ \@namedef{sideways#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
+ \flrow@setlist{{#1}{rotfloat}{rot#1}{widerotfloat}{widerot#1}}%
+ \columnwidth\textheight\edef\FBB@wd{\the\textheight}%
+ \FRifFBOX\@@setframe\fi\@@FStrue
+% \end{macrocode}
+% {\sl The standard |\@xdblfloat| macro changes |\hsize| to |\textwidth|.
+% This way is not correct so use |\@xfloat| instead.}
+%
+% The code contents of |\rotfloat@dblfloat| macro (\pkg{rotfloat} package) moved here.
+% \begin{macrocode}
+ \let\@xdblfloat\@xfloat
+ \let\rotfloat@@makebox\float@makebox
+ \let\float@makebox\rotdblfloat@makebox
+ \@dblfloat{#1}}%
+ \fi
+ \@namedef{endsideways#1*}{\FBbuildtrue\float@dblend}}
+% \end{macrocode}
+% Wrapped float environment from \pkg{wrapfig} package.
+% \begin{macrocode}
+ \@ifundefined{wrapfloat}{}{%
+ \@ifundefined{flrow@WF@rapt}{\let\flrow@WF@rapt\WF@rapt
+ \def\WF@rapt[##1]##2{\FRifFBOX\@@setframe\fi\@@FStrue
+ \dimen@##2\relax
+ \ifdim\dimen@>\z@
+ \edef\FBB@wd{\the\dimen@}\FB@fs@wd\dimen@\FBo@wd
+ \fi
+ \flrow@WF@rapt[##1]{\dimen@}%
+ \@ifundefined{capstart}{}{\capstart}%
+ \the\FR@everyfloat\ignorespaces}%
+ }{}%
+ \@namedef{wrap#1}{\killfloatstyle\def\@captype{#1}%
+ \FR@redefs\FBc@wd\z@
+ \flrow@setlist{{#1}{wrapfloat}{wrap#1}{tmpset}}%
+ \global\let\flrow@typ@tmpset\undefined
+% \end{macrocode}
+% Here repeated code from |\float@end| and |\float@dblend|: check whether |\floatbox|
+% stuff appeared or not.
+% \changes{v0.1f}{2005/06/14}{The \cmd{\ifFBbuild} flag added: here is not used
+% \cmd{\float@end} command and so on. }
+% \begin{macrocode}
+ \def\WF@floatstyhook{\let\@currbox\WF@box
+ \ifFBbuild
+% \end{macrocode}
+% (|^^A|---The attempts to arrange the widths of Boxed wrapped floats.)
+% \begin{macrocode}
+%^^A \adj@dim\hsize+\FB@wadj=\hsize
+%^^A \adj@dim\hsize+\FBo@wadj=\hsize
+ \global\setbox\WF@box\flrow@FB{\wd\WF@box}%
+ \else
+ \global\let\WF@box\@currbox
+ \fi}%
+ \@ifnextchar[\WF@wr{\WF@wr[]}}%]
+ \expandafter\let\csname endwrap#1\endcsname\endwrapfloat}
+%^^A \@namedef{endwrap#1}{\ifdim\hsize>\z@
+%^^A \adj@dim\hsize+\FBo@wadj=\hsize\fi\endwrapfloat}}
+% \end{macrocode}
+% At last definitions for new subfloat numeration for \pkg{subfig} package.
+% The subfloats for figures and tables (|\c@subfigure| and |\c@subtable|)
+% already defined: so at first goes check, whether defined this command for
+% subfloat (suggestions of Steven Cochran ).
+% \changes{v0.1f}{2005/06/14}{Added check/filter for already created subfigures
+% and subtables (SC).}
+% \begin{macrocode}
+ \@ifundefined{subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}}
+% \end{macrocode}
+% \end{macro}
+% \end{em}
+%
+% \begin{macro}{\newfloat}
+% Now we can explain how to define a new class of floats. Recall that
+% the three required arguments to |\newfloat| are \meta{type},
+% \meta{placement} and \meta{ext}, respectively. First we save the
+% latter two; we also maintain a list of active \meta{ext}s so we can
+% later iterate over all currently-open lists of floats.
+% \begin{macrocode}
+\@ifdefinable\float@exts{\newtoks\float@exts}
+% \end{macrocode}
+% {\em \textit{Floatrow note.}
+% The |\newfloat| changed and uses |\floatsetup| stuff (redefined by suggestions of
+% Axel Sommerfeldt).}
+% \changes{v0.1f}{2005/06/14}{Redefinition (AS).}
+% \begin{macrocode}
+\newcommand\newfloat{\@ifstar{\flrow@restylefloat{no}\newfloat@}%
+ {\flrow@restylefloat{yes}\newfloat@}}
+\newcommand\newfloat@[3]{\@ifnextchar[{\@@newfloat{#1}{#2}{#3}}%
+ {\@newfloat{#1}{#2}{#3}}}
+\newcommand\@newfloat[3]{%
+ \DeclareNewFloatType{#1}{placement=#2,fileext=#3}}
+\@ifdefinable\@@newfloat{}
+\def\@@newfloat#1#2#3[#4]{%
+ \DeclareNewFloatType{#1}{placement=#2,fileext=#3,within=#4}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\float@newx}
+% {\em \textit{Floatrow note.} Macro |\float@newx|, which defines a new float counter, was removed.
+% It was replaced by |\DeclareNewFloatType| stuff.}
+% \end{macro}
+%
+% \subsubsection{The \pkg{float} Package: Adapting \LaTeX\ Internals}
+%
+% We have to adapt some of \LaTeX's internal macros to our needs.
+% There are several things that have to be changed around
+% in order to provide the functionality of David Carlisle's \pkg{here}.
+% The following is thus lifted from \pkg{here}, with changes and with
+% David's permission:
+%
+% \begin{macro}{\@float@Hx}
+% We save the original version of |\@xfloat|. (This macro is called from
+% |\@float|, which we used above to define the environment commands for a
+% new class of floats.)
+% \begin{macrocode}
+\let\@float@Hx\@xfloat
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@xfloat}
+% The new version of |\@xfloat| looks for a |[H]| argument.
+% If it is present |\@float@HH| is called, otherwise the original macro
+% (renamed to |\@float@Hx|) is called.
+% \begin{macrocode}
+\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}}
+% \end{macrocode}
+% \end{macro}
+% {\em\textit{Floatrow note}. Since \pkg{floatrow} always uses float style,
+% the stuff of flag \cmd{\@flstyle} (which sets whether use or not any predefined
+% float style) moved out.}
+%
+% Later on we'll need a box to save a |[H]| float.
+% \begin{macrocode}
+\newsavebox\float@box
+% \end{macrocode}
+%
+% \begin{macro}{\@float@HH}
+% First gobble the |[H]|. Note that \texttt{H} should not be used in
+% conjunction with the other placement options, nor as the value of the
+% default placement, as set in |\fps@|{\it type}.
+% \begin{macrocode}
+\def\@float@HH#1[H]{%
+% \end{macrocode}
+% Locally redefine the end of the environment.
+% \begin{macrocode}
+ \expandafter\let\csname end#1\endcsname\float@endH
+% \end{macrocode}
+% We don't get a |\@currbox| if we don't actually use the float mechanism.
+% Therefore we fake one using the |\float@box| defined above.
+% \begin{macrocode}
+ \let\@currbox\float@box
+% \end{macrocode}
+% Now we save the current float class name for use in constructing the
+% |\caption|. The caption box (defined below) is initialized to an empty
+% box to avoid trouble with floats not having a caption. Then we start the
+% box that'll hold the float itself.
+% |\parindent| is set to zero for compatibility with the standard \texttt{[h]}
+% option.
+%
+% \emph{Floatrow note.
+% Since \pkg{floatrow} always uses preloaded style
+% the stuff of flag \cmd{\@flstyle} moved out.}
+% \begin{macrocode}
+ \def\@captype{#1}\setbox\@floatcapt=\vbox{}%
+ \setbox\@currbox\color@vbox\normalcolor
+ \vbox\bgroup \hsize\columnwidth \@parboxrestore
+ \@floatboxreset \@setnobreak
+% \end{macrocode}
+% The final |\ignorespaces| is needed to gobble any spaces or new lines
+% after the {\tt[H]} tokens.
+% \begin{macrocode}
+ \ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{em}
+% \begin{macro}{\flrow@flboxreset}
+% \textit{Floatrow note.}
+% The stuff of |\@floatboxreset| changed.
+% At first goes original \LaTeX's macro |\@floatboxreset| saved as
+% |\FR@flboxreset| at the beginning of package.
+% Then goes flag for facing layout and command which inputs references from
+% \texttt{aux}-file and temporary settings. At last \pkg{floatrow} looks
+% whether caption stays above/below object, or beside and chooses necessary
+% macro of width counting.
+% \changes{v0.1d}{2005/02/07}{Added flag for float box layout building}
+% \changes{v0.1f}{2005/06/14}{This macro is redefined to
+% \cmd{\@floatboxreset} inside floats.}
+% \changes{v0.1f}{2005/06/14}{The \cmd{\capstart} stuff loaded here.}
+% \begin{macrocode}
+\newcommand\flrow@flboxreset{\FR@flboxreset
+ \@ifundefined{capstart}{}{\capstart}%
+ \FB@facing\@tempswafalse\FBiffacing\@tempswatrue\fi
+ \if@tempswa\FB@readaux{\relax}\fi
+ \flrow@settype{tmpset}\global\let\flrow@typ@tmpset\undefined
+ \global\let\FBcheight\relax\global\let\FBoheight\relax
+ \global\let\FBfheight\relax
+ \FBifcapbeside\FC@fs@wd\else\FB@fs@wd\fi
+ \the\FR@everyfloat}
+% \end{macrocode}
+% The definition of three height commands as |\relax|.
+% We define \emph{height} arguments of caption,
+% object, and foot boxes as |\relax| which (like in \env{minipage}
+% environment or in |\parbox|) mean usage of natural height of components.
+% \begin{macrocode}
+\@ifdefinable\FBcheight{\let\FBcheight\relax}
+\@ifdefinable\FBoheight{\let\FBoheight\relax}
+\@ifdefinable\FBfheight{\let\FBfheight\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FB@fs@wd}
+% The width settings for float box with caption above or below object.
+% \begin{macrocode}
+\newcommand\FB@fs@wd{\@tempdima\FBB@wd
+% \end{macrocode}
+% The |\flrow@setwd| could define the width for current float.
+% \begin{macrocode}
+ \flrow@setwd\textwidth\@tempdima
+ \adj@dim\@tempdima-\FB@wadj=\@tempdima
+ \settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
+ \advance\@tempdima-\@tempdimb
+ \global\FBc@wd\@tempdima\global\FB@wd\@tempdima
+ \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}\hsize\FBo@wd
+ \FBifcaptop
+ \ifnum\FPOScnt=0\columnwidth\hsize\else\columnwidth\FBc@wd\fi
+ \else
+ \columnwidth\FBc@wd
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FC@fs@wd}
+% The width settings for float box with caption beside object.
+% \changes{v0.1d}{2005/02/07}{Settings for beside float moved outside group}
+% \begin{macrocode}
+\newcommand\FC@fs@wd{\@tempdima\FBB@wd\flrow@FClist
+ \settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
+ \advance\@tempdima-\@tempdimb
+ \adj@dim\@tempdima-\FB@wadj=\@tempdima
+ \settowidth\@tempdimb{{\floatcapbesidesep}}%
+ \advance\@tempdima-\@tempdimb
+% \end{macrocode}
+% This flag controls predefined width of caption.
+% \begin{macrocode}
+ \FC@ifc@wd
+ \ifx\FCwidth\relax
+ \PackageError{You didn't define width of caption\MessageBreak
+ for plain float environment.}{\flrow@eh}%
+ \else
+ \global\FBc@wd=\FCwidth
+% \end{macrocode}
+% This flag controls whether to fill rest space of float box with object contents
+% when caption width was predefined.
+% \begin{macrocode}
+ \FC@ifo@fil\advance\@tempdima-\FBc@wd\fi
+ \fi
+ \else
+ \global\FBc@wd\@tempdima
+ \fi
+ \FC@ifo@fil\else\@tempdima.5\@tempdima
+% \end{macrocode}
+% The |\flrow@setwd| could define the width for followed float.
+% \begin{macrocode}
+ \flrow@setwd\FB@wd\@tempdima\fi
+ \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}%
+ \FC@ifc@wd\else\global\advance\FBc@wd-\FB@wd\fi
+ \hsize\FBo@wd\columnwidth\FBc@wd
+ \FCset@vpos}
+% \end{macrocode}
+% \end{macro}
+% \end{em}
+%
+% \begin{macro}{\float@makebox}
+% Basically, we must arrange for `style commands' to be executed
+% at certain points during the generation of the float.
+% \LaTeX\ puts a float into a vertical box |\@currbox| which it takes
+% off a list of empty boxes for insertions. When the |\float@makebox| macro
+% is called, |\@currbox| contains the complete float, minus the caption^^A
+% ---we'll see later that we use our own |\caption| command to
+% put the caption into a |\vbox| of its own. This is the only way
+% we can control the position of the caption by the float style,
+% regardless of where the caption appears in the float's input text itself.
+%
+% {\em [\ldots] \textit{Floatrow note.} Skipped explanation.}
+%
+% \begin{em}
+% \textit{Floatrow note.}
+% Macro |\float@makebox| was redefined to fit more float object---caption combinations.
+% There was created the |\float@makebox| stuff.
+% First goes changed \pkg{float} |\float@makebox| which loads necessary layout macro
+% for above/below or beside captions.
+%
+% The |\float@makebox| stuff includes |\FB@foot| macro
+% to allow usage of |\floatfoot| (any foot non-caption material)
+% and |\footnotetext| stuff inside float environment in minipage-like mode.
+%
+% \changes{v0.1d}{2005/02/07}{Bug fix: \cmd{\FBiffloatrow} deleted}
+% \begin{macrocode}
+\newcommand\float@makebox[1]{%
+ \FBifcapbeside\flrow@FC{#1}\else\flrow@FB{#1}\fi}
+% \end{macrocode}
+% The definitions of vertical fine tuning corrections.
+% \changes{v0.1d}{2005/02/07}{Added vert skips (\cmd{\FBaskip}, \cmd{\FBbskip})
+% for layout fine tuning}
+% \changes{v0.1d}{2005/02/07}{Added flag for float box layout building}
+% \changes{v0.1d}{2005/02/07}{\cmd{\begin@FBBOX}\dots\cmd{\end@FBBOX} moved to \cmd{\flrow@makebox}}
+% \begin{macrocode}
+\newcommand\FBaskip{\z@}\newcommand\FBbskip{\z@}
+\newif\ifFBbuild\FBbuildtrue
+% \end{macrocode}
+% \begin{macro}{\flrow@FB}
+% The macro of |\float@makebox| stuff which builds float box with above/below caption.
+% \changes{v0.1f}{2005/06/14}{The argument used for defining of dimension---%^^A
+% restored for (\pkg{float}) compatibility with \pkg{hyperref} package.}
+% \begin{macrocode}
+\newcommand\flrow@FB[1]{\vbox{\@tempdima=#1\vskip\FBaskip
+ \@parboxrestore\hbox to\@tempdima{\def\FB@zskip{\vskip\z@}%
+ \FBleftmargin\flrow@FB@\FBrightmargin}%
+ \FBiffacing\FB@writeaux{\string\global\string\c@FBcnt\thepage}\fi
+ \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}%
+ \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\flrow@FC}
+% Definition of float with beside caption.
+% \changes{v0.1f}{2005/06/14}{The argument used for defining of dimension---%^^A
+% restored for (\pkg{float}) compatibility with \pkg{hyperref} package.}
+% \begin{macrocode}
+\newcommand\flrow@FC[1]{\vbox{\@tempdima=#1\@parboxrestore
+ \flrow@FClist\vskip\FBaskip
+ \hbox to\@tempdima{\FCleftmargin\flrow@FC@\FCrightmargin}%
+ \FBiffacing\FB@writeaux{\string\global\string\c@FBcnt\thepage}\fi
+ \nocapbeside\global\let\FCwidth\relax
+ \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
+% \end{macrocode}
+% \end{macro}
+% These macros define box,
+% which is changed accordingly for creation of axis at the top, bottom, or center
+% of boxes.
+% \changes{v0.1d}{2005/02/07}{Added vertical skips (\cmd{\FBaskip}, \cmd{\FBbskip})
+% for layout fine tuning}
+% \changes{v0.1d}{2005/02/07}{Added flag for float box layout building}
+% \changes{v0.1d}{2005/02/07}{Settings for beside caption removed
+% (they were set outside group somewhere above)}
+% \begin{macrocode}
+\newcommand\FCc@box[1]{\def\@parboxto{}\FC@bbox#1\FC@ebox}
+\newcommand\FC@bbox{\vbox\@parboxto\bgroup}
+\newcommand\FC@ebox{\vskip\z@\egroup}
+\newcommand\FCo@box[1]{\def\@parboxto{}\ifx\FBoheight\relax\FC@bbox\else
+ \def\@parboxto{to\FBoheight}\FC@bbox\vsize\FBoheight\fi#1\FC@ebox}
+% \end{macrocode}
+% Definitions for fill material for vertical alignment and command with
+% width settings of boxes.
+% \begin{macrocode}
+\newcommand\FBafil{\vfill}\newcommand\FBbfil{\vfill}
+\newcommand\FBw@box[1]{\hsize#1\columnwidth#1\normalfont\normalcolor}
+\newcommand\FB@vbox[3]{\ifx#2\relax\vbox\bgroup\else
+ \vbox to#2\bgroup\vsize#2\fi\FBw@box#1#3\vskip\z@\egroup}
+\newcommand\FB@vtop[3]{\ifx#2\relax\vtop\bgroup\else
+ \vtop to#2\bgroup\vsize#2\fi\vskip\z@\FBw@box#1#3\egroup}
+% \end{macrocode}
+%
+% \begin{macro}{\flrow@FB@}
+% \begin{macro}{\flrow@FC@}
+% |\float@makebox|-like macros for usage inside float row
+% (they don't create any left/right fill material).
+%
+% First macro builds box with caption above/below.
+% \changes{v0.1d}{2005/02/07}{\cmd{\begin@FBBOX}\dots\cmd{\end@FBBOX} moved to \cmd{\flrow@makebox}}
+% \changes{v0.1f}{2005/06/14}{New design implementation for \cmd{\captionof}-like stuff?}
+% \begin{macrocode}
+\newcommand\flrow@FB@{\FB@frame{\begin@FBBOX
+ \adj@dim\FBo@wd+\FBo@wadj=\hsize
+ \@tempdima\ht\@currbox\advance\@tempdima\dp\@currbox
+ \ifdim\@tempdima=\z@
+ \def\@@FBskip{}\let\FBo@frame\@gobble
+ \fi
+ \@parboxrestore\@@FBabove
+ \FBifcaptop
+% \end{macrocode}
+% If needed and exists---caption box above float object.
+% If key \texttt{footposition=caption} under caption loaded
+% foot material.
+% \begin{macrocode}
+ \ifvoid\@floatcapt\else
+ \FB@vbox\FBc@wd\FBcheight{\FBifCAPTOP\else\vfill\fi
+ \unvbox\@floatcapt
+ \ifnum\FPOScnt=1\vbox{\FB@foot}\fi\vfil}%
+ \@@FBskip\hrule\@height\z@\@depth\z@
+ \fi
+% \end{macrocode}
+% Box of float object. If key \texttt{footposition=default}
+% foot material loaded in the bottom of float object box. In the case of
+% \texttt{footposition=fott} foot material loads after float object box.
+% \begin{macrocode}
+ \vtop{\vskip\z@\FBo@frame{\FB@vtop\FBo@wd\FBoheight
+ {\FBafil\unvbox\@currbox\FBbfil
+% \end{macrocode}
+% The zero vertical skip must be here in any case.
+% \begin{macrocode}
+ \vskip\z@
+ \ifnum\FPOScnt=0
+ \FB@vtop\FBo@wd\FBfheight{\FB@foot\vfil}\fi}}\par
+ \par\vskip\z@
+ \ifnum\FPOScnt=2\vskip\z@
+ \FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi}%
+% \end{macrocode}
+% If needed and exists---caption box below float object.
+% If key \texttt{footposition=default} or \texttt{footposition=caption}
+% foot material loaded under caption contents.
+% \begin{macrocode}
+ \else\ifnum\FPOScnt=0\FPOScnt=1\fi
+ \FBo@frame{\FB@vbox\FBo@wd\FBoheight{\FBafil
+ \unvbox\@currbox\FBbfil}}\par
+ \ifvoid\@floatcapt\else
+ \@@FBskip\hrule\@height\z@\@depth\z@
+ \FB@vtop\FBc@wd\FBcheight{\hsize\columnwidth\unvbox\@floatcapt
+ \ifnum\FPOScnt=1\vtop{\FB@foot}\fi\par
+% \end{macrocode}
+% The |\vss| glue appears here because the included box with foot material
+% sometimes creates a small overfull in float rows and crashes alignment of
+% \texttt{postcode=} material.
+% \begin{macrocode}
+ \vfill\vskip\z@\vss
+ \ifnum\FPOScnt=2\FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi
+ }\fi
+ \fi\@@FBbelow\FB@zskip\end@FBBOX}}
+% \end{macrocode}
+% Second internal macro for float row builds float box with beside caption.
+% \changes{v0.1e}{2005/03/22}{Sorting \cmd{\floatfacing} command to use separate parameters for
+% building of beside caption layout and float environment margins.}
+% \begin{macrocode}
+\newcommand\flrow@FC@{\FB@frame{\begin@FBBOX
+ \adj@dim\FBo@wd+\FBo@wadj=\hsize
+ \settowidth\@tempdimb{\floatcapbesidesep}\advance\hsize\@tempdimb
+ \advance\hsize\FBc@wd\@parboxrestore\@@FBabove
+ \hbox{\floatfacing*%
+ {\ifvoid\@floatcapt\else
+ \FCc@box{\FBw@box\FBc@wd\unvbox\@floatcapt\FB@foot}%
+ \floatcapbesidesep\fi
+% \end{macrocode}
+% |\FBf@raise| uses |\raisebox| correction to align top (bottom) of caption text with
+% top (bottom) of object frame.
+% \begin{macrocode}
+ \FBf@raise{\FBo@frame{\FCo@box{\FBw@box\FBc@wd\unvbox\@currbox}}}}%
+ {\FBf@raise{\FBo@frame{\FCo@box{\FBw@box\FBo@wd\unvbox\@currbox}}}%
+ \ifvoid\@floatcapt\else
+ \floatcapbesidesep\FCc@box{\FBw@box\FBc@wd
+ \unvbox\@floatcapt\FB@foot}\fi
+ }}\par\@@FBbelow\vskip\z@
+ \end@FBBOX}}
+% \end{macrocode}
+% Macro for foots and command for skip outside float row.
+% \begin{macrocode}
+\newcommand\FB@foot{\let\FR@ifFOOT\iftrue\FB@putfoots\@@par\FB@putfnotes}
+\newcommand\FB@zskip{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{em}
+% \end{macro}
+%
+% \begin{macro}{\float@end}
+% The internal macro |\end@float| appears here under the name of |\float@end|.
+% The main thing which is changed is that we call |\float@makebox| to
+% reconstruct the float according to the float style.
+% We want to do exactly what the \LaTeX\ kernel does without copying
+% actual kernel code if we can help it; therefore we finish off the
+% float using the kernel |\@endfloatbox|, then replace \LaTeX's
+% contents of the |\@currbox| with our own processed version, and then
+% hand the thing off to \LaTeX{} again. Of course we have already done
+% |\@endfloatbox|, which comes at the beginning of |\end@float|, ourselves;
+% therefore we neutralize it before calling |\end@float|. This doesn't
+% matter since we're in a group anyway (we wanted to keep the style
+% commands local), so everything is undone at the end of the environment.
+%
+% {\em \textit{Floatrow note.}
+% Added flag |\ifFBbuild| for float box layout building.
+% This flag stops repeated usage of |\float@makebox| after |\floatbox|
+% in |\float@end|, |\float@endH| and
+% |\float@dblend| macros and, if \pkg{rotating} used,
+% replaces usage of |\float@makebox| to \LaTeX's standard box |\@currbox| in
+% |\rotfloat@makebox| and |\rotfloat@dblmakebox| commands.}
+% \changes{v0.1d}{2005/02/07}{Added flag for float box layout building}
+% \begin{macrocode}
+\newcommand\float@end{\ifFBbuild\@endfloatbox
+ \global\setbox\@currbox\float@makebox\columnwidth
+ \let\@endfloatbox\relax\fi
+ \end@float}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\float@endH}
+% The |\float@endH| command is, again, derived from \pkg{here}. It'll
+% deal correctly with a non-floating float, inserting the proper amounts
+% of white space above and below.
+%
+% {\em \textit{Floatrow note.}
+% Added flag |\ifFBbuild| for float box layout building.
+% This flag stops repeated usage of |\float@makebox| after |\floatbox|.}
+% \changes{v0.1d}{2005/02/07}{Added flag for float box layout building}
+% \begin{macrocode}
+\newcommand\float@endH{\@endfloatbox\vskip\intextsep
+ \ifFBbuild\setbox\@currbox\float@makebox\columnwidth\fi
+ \box\@currbox\vskip\intextsep\relax}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\float@dblend}
+% The |\float@dblend| command finishes up double-column floats. This
+% uses the same approach as |\float@end| above. It seems to work.
+%
+% {\em \textit{Floatrow note.}
+% Added flag |\ifFBbuild| for float box layout building.
+% This flag stops repeated usage of |\float@makebox| after |\floatbox|.}
+% \changes{v0.1d}{2005/02/07}{Added flag for float box layout building}
+% \begin{macrocode}
+\newcommand\float@dblend{\ifFBbuild\@endfloatbox
+ \global\setbox\@currbox\float@makebox\textwidth
+ \let\@endfloatbox\relax\fi
+ \end@dblfloat}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{\pkg{float} package: Captions and lists of floats}
+%
+% Now for the caption routines.
+% We use a box, |\@floatcapt|, to hold the caption while the float
+% is assembled.
+% \begin{macrocode}
+\newsavebox\@floatcapt
+% \end{macrocode}
+%
+% \begin{macro}{\caption}
+% This is the only \LaTeX\ macro that this document style supersedes.
+% {\em[\dots]} the caption routines from \pkg{float} are used {\em[\dots]}.
+% {\em \textit{Floatrow note.} The \pkg{float}'s caption layout stuff replaced by
+% \pkg{caption}'s |\captionsetup|. In \pkg{floatrow} package redefined
+% |\@makecaption| command (|\caption|'s definition commented).}
+% \changes{v0.1f}{2005/06/14}{The definition of \cmd{\caption} commented.}
+% \begin{macrocode}
+%\renewcommand\caption{%
+% \ifx\@captype\@undefined
+% \@latex@error{\noexpand\caption outside float}\@ehd
+% \expandafter\@gobbletwo
+% \else
+% \refstepcounter\@captype
+% \fi
+% \@dblarg{\float@caption\@captype}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\float@caption}
+% The |\float@caption| macro takes care of entering the caption into
+% the appropriate listing. It also controls the typesetting of the caption
+% itself, although a style-dependent macro |\@fs@capt| is called
+% to handle the specifics. {\em \textit{Floatrow note}. The command |\@fs@capt|
+% removed---\pkg{floatrow} package uses \pkg{caption} 3.0 possibilities and
+% its own definitions.}
+%
+% Note that because the caption is saved in a box
+% instead of being output to the float right away, you cannot simply put
+% a legend after the caption proper; it has to follow the |\caption|
+% command in an optional argument.
+%
+% First of all, we call |\addcontentsline| to update the list of
+% floats of this class. Note that |\float@caption| is |\long|
+% to allow for paragraph breaks in its arguments.
+%
+% {\em \textit{Floatrow note.} The support of optional argument for legend after
+% mandatory caption argument didn't declared in user part of documentation.
+% Since caption version 3.0 didn't support this feature, it was removed. Use
+% |\floatfoot| macro for additional text.}
+%
+% \changes{v0.1f}{2005/06/14}{The definition of \cmd{\float@caption} commented:
+% this macro used as safe command for \cmd{\@caption}.}
+% {\em \textit{Floatrow note.} In version 0.1f this definition commented.}
+% \begin{macrocode}
+%\long\def\float@caption#1[#2]#3{%
+% \addcontentsline{\@nameuse{ext@#1}}{#1}%
+% {\protect\numberline{\@nameuse{the#1}}{\ignorespaces #2}}%
+% \end{macrocode}
+% Now we collect the caption proper. The caption name and number are
+% taken from |\fnum@|\meta{float}, where \meta{float} is the class
+% of float we're currently handling.
+% \begin{macrocode}
+% \global\setbox\@floatcapt
+% \end{macrocode}
+% {\em \textit{Floatrow note.}
+% In next line is added necessary width for caption for fancy float layout.
+% The flag |\if@@FS|, which checks whether float style predefined is stored---maybe
+% caption appears outside any float environment and |\floatbox| command in this case
+% it will use |\hsize| definitions.}
+% \begin{macrocode}
+% \vbox\bgroup\@parboxrestore\reset@font\if@@FS\hsize\FBc@wd\fi
+% \normalsize\abovecaptionskip\z@\belowcaptionskip\z@
+% \@makecaption{\@nameuse{fnum@#1}}{\ignorespaces #3}\egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\listof}
+% The |\listof| command reads the desired list of floats from the
+% appropriate auxiliary file. The file is then restarted.
+% First of all, we check whether the float style that's supposed to be
+% listed is actually defined. If not, we output a |\float@error|
+% {\em(\textit{Floatrow note.} the |\float@error| changed to |\flrow@error|)}.
+% \begin{macrocode}
+\newcommand*{\listof}[2]{%
+ \@ifundefined{ext@#1}{\flrow@error{#1}}{%
+% \end{macrocode}
+% All's well until now. We define the |\l@|\meta{float} command
+% that \LaTeX\ needs for formatting the list, and then typeset the
+% appropriate list header.
+% \begin{macrocode}
+ \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
+ \float@listhead{#2}%
+% \end{macrocode}
+% Next we call |\@starttoc| with the correct file extension
+% to do the actual work.
+% If |\parskip| is non-zero, vertical space would be added between
+% the individual list entries. To avoid this, we zero |\parskip|
+% locally. This should be done after the |\float@listhead| above since
+% |\parskip| also influences the spacing of headings, and the listings
+% would look different from other chapters otherwise. (Suggested by
+% Markus Kohm.)
+% \begin{macrocode}
+ \begingroup\setlength{\parskip}{\z@}%
+ \@starttoc{\@nameuse{ext@#1}}%
+ \endgroup}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\float@listhead}
+% This command generates the beginning of a list of floats.
+% Currently the list appears at the chapter or the section level, depending
+% on whether chapters are supported in the document class. According to
+% a suggestion from Markus Kohm, this is now in a separate command so it
+% can be overridden by other packages. We also use |\MakeUppercase| instead
+% of |\uppercase|; when this piece of code was first written |\MakeUppercase|
+% hadn't been invented yet, and for some reason this never got updated.
+% \begin{macrocode}
+\providecommand*{\float@listhead}[1]{%
+ \@ifundefined{chapter}{\def\@tempa{\section*}}%
+ {\def\@tempa{\chapter*}}%
+ \@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\float@addtolists}
+% This command allows \LaTeX\ programmers to add something to all
+% currently-defined lists of floats, such as some extra vertical
+% space at the beginning of a new chapter in the main text
+% (|\float@addtolists{\protect\addvspace{10pt}}|), without knowing
+% exactly which lists of floats are currently being constructed.
+% This command currently does \emph{not} operate on the |lot| and |lof|
+% lists.
+% \begin{macrocode}
+\newcommand\float@addtolists[1]{%
+ \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}
+% \end{macrocode}
+% \end{macro}
+%
+% {\em \textit{Floatrow note.} Here goes \pkg{floatrow} message about finishing of loading of
+% \pkg{float} package's corrected code.}
+% \begin{macrocode}
+\PackageInfo{floatrow}{Modified float package code loaded}
+% \end{macrocode}
+%
+% \subsection{Borrowed Code (with original comment) from \pkg{rotfloat} package}
+%
+% \begin{macrocode}
+\IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse}
+\if@tempswa
+% \end{macrocode}
+%
+% {\em \textit{Floatrow note.} Here goes code of revised and adapted package
+% to floatrow. With documentation.
+%
+% The main redefinitions for \pkg{rotfloat} (|\flrow@restyle| stuff) purposes
+% were made above (in \pkg{float} part).\\{}[\dots]
+%
+% Code contents of |\rotfloat@float| and |\rotfloat@dblfloat| moved up inside |\flrow@restyle| macro.}
+%
+% \begin{macro}{\@float@HH}
+% We have to extend |\@float@HH|\emph{[\dots]}.
+% {\em \textit{Floatrow note}. Since |\rotfloat@endH| was originally defined as
+% |\float@endH| in current macro used |\float@endH|}
+% \begin{macrocode}
+ \let\rotfloat@HH\@float@HH
+ \def\@float@HH#1{%
+ \expandafter\let\csname endsideways#1\endcsname\float@endH
+% \expandafter\let\csname endsideways#1*\endcsname\rotfloat@dblendH
+ \let\end@float\relax
+ \rotfloat@HH{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\rotfloat@endH}
+% This one hasn't to be changed. {\em \textit{Floatrow note}. Commented.}
+% \begin{macrocode}
+% \newcommand\rotfloat@endH{\float@endH}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\rotfloat@makebox}
+% \begin{macro}{\rotdblfloat@makebox}
+% |\float@makebox| has a parameter here which will be set to |\columnwidth| or
+% |\textwidth|. (In the \pkg{float} package $v1.2$ the |\columnwidth| was
+% hard wired into |\float@makebox|.) So we have to pass this parameter through
+% the original version of |\float@makebox| which we have saved to
+% |\rotfloat@@makebox| within |\rotfloat@float|.)
+% \begin{macrocode}
+ \newcommand*\rotfloat@makebox[1]{%
+ \vbox{\def\@float##1[##2]{}\let\end@float\relax
+ \@rotfloat{}[]%
+ \ifFBbuild\rotfloat@@makebox{#1}\else\box\@currbox\fi
+ \end@rotfloat}}
+ \newcommand*\rotdblfloat@makebox[1]{%
+ \vbox{\def\@float##1[##2]{}\let\end@dblfloat\relax
+ \@rotdblfloat{}[]%
+ \ifFBbuild\rotfloat@@makebox{#1}\else\box\@currbox\fi
+ \end@rotdblfloat}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% That's all folks\dots {\em \textit{Floatrow note:} of borrowed \pkg{rotfloat} package.
+% And here goes message about loading of \pkg{rotfloat} package's code.}
+% \begin{macrocode}
+\PackageInfo{floatrow}{Modified rotfloat package code loaded}
+\fi
+% \end{macrocode}
+%
+% \end{sl}
+%
+% \subsection{Stuff to Load Footnotes and Float Foot Material}
+%
+% \begin{macro}{\FR@everyfloat}
+% These token macros add redefinition of float stuff to arrange usage
+% of footnotes inside plain float contents.
+% \changes{v0.1f}{2005/06/14}{Deleted \cmd{\flrow@capsetup}: moved to
+% \cmd{\flrow@setlist} stuff (AS).}
+% \begin{macrocode}
+\@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat}
+\FR@everyfloat={\let\@footnotetext\@mpfootnotetext
+ \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
+ \floatobjectset\floatfont}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FR@ifFOOT}
+% Flag for placing foot material.
+% \begin{macrocode}
+\let\FR@ifFOOT\iffalse
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FB@putfnotes}
+% The excerpt from minipage macro (\LaTeX's core stuff) to put footnotes.
+% \begin{macrocode}
+\newcommand\FB@putfnotes{%
+ \ifvoid\@mpfootins\else\FR@ifFOOT
+% \end{macrocode}
+% A special skip (|\skip\@mpfootins|) dimension for footnotes in
+% float box changed to |\floatfootskip|.
+% \begin{macrocode}
+ \vskip\floatfootskip\normalcolor\FBfootnoterule
+ \unvbox\@mpfootins\@@par
+ \fi\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FB@putfoots}
+% Macro analogous to previous one, but for loading of |\floatfoot| stuff.
+% To load float foot material there is defined |\newinsert| for its stuff.
+% \begin{macrocode}
+\@ifdefinable\flrow@foot{\newinsert\flrow@foot}
+\newcommand\FB@putfoots{%
+ \ifvoid\flrow@foot\else\FR@ifFOOT
+% \end{macrocode}
+% The |\footnoterule| is not used for float foot.
+% \begin{macrocode}
+ \vskip\floatfootskip\normalcolor
+ \unvbox\flrow@foot\@@par
+ \fi\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{New Definitions for Footnotes}
+%
+% \begin{macro}{\mpfootnotemark}
+% There is the definition of |\footnotemark| which creates the same mark as
+% |\footnote| inside \texttt{minipage} environment. That could be useful in
+% multiple footnote marks in tables. Since the same definition was loaded in
+% \pkg{footmisc} v5.3, these macros are defined at the beginning of document
+% in the case only if \pkg{footmisc} was not loaded.
+% \begin{macrocode}
+\AtBeginDocument{\providecommand\mpfootnotemark{\@ifnextchar[%]
+ \@xmpfootnotemark{\stepcounter\@mpfn
+ \protected@xdef\@thefnmark{\thempfn}\@footnotemark}}%
+ \@ifundefined{@xmpfootnotemark}
+ {\def\@xmpfootnotemark[#1]{\begingroup\c@mpfootnote#1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}\endgroup
+ \@footnotemark}}{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Macro for Legends, Explications, etc.}
+%
+% \begin{macro}{\floatfoot}
+% This command made for the same reasons as \pkg{ccaption}'s |\legend| macro
+% and uses its style. It uses |\caption| mechanism.
+% \begin{macrocode}
+\newcommand\floatfoot{\@ifstar
+ {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}%
+ {\def\FR@tmp{\captionfootfont}\floatfoot@}}
+\newcommand\floatfoot@[1]{%
+ \global\setbox\flrow@foot\vbox{%
+% \end{macrocode}
+% The |\if@@FS| flag stored for \env{wrap...} enviroments.
+% \begin{macrocode}
+ \if@@FS\hsize\columnwidth\fi
+ \@parboxrestore\reset@font\color@begingroup
+% \end{macrocode}
+% Apply current float settings.
+% \begin{macrocode}
+ \caption@settype{\@captype}%
+% \end{macrocode}
+% Apply floatfoot settings.
+% \begin{macrocode}
+ \caption@settype{floatfoot}%
+% \end{macrocode}
+% No captionlabel.
+% \begin{macrocode}
+ \captionsetup{labelformat=empty,labelsep=none}%
+ \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The Usage of Command for Float Box}
+%
+% The usage of macro |\floatbox| is:
+% \\[\medskipamount]
+% |\floatbox[|\meta{preamble}|]{|\meta{captype}|}[|\meta{width}|]|^^A
+% |[|\meta{height}|][|\meta{inner vert pos}|]|^^A
+% \\\hspace*{5em}|{|\meta{caption}|}{|\meta{float object}|}|.
+% \\[\medskipamount]
+% where:
+% \begin{description}
+% \item[\meta{preamble}]there could be\\
+% \qquad\cmd{\capbeside} and \cmd{\nocapbeside},
+% or you may try to add any other regular command (e.g. |\captionsetup| or |\thisfloatsetup| stuff);
+% \item[\meta{captype}]the |\@captype| of float type this command created for;
+% \item[\meta{width}]the width of object---caption box
+% (in case of caption above or below object),
+% or width of object box (if caption stays beside object);
+% \item[\meta{height}]the height of object---caption box
+% (in case of caption above or below object),
+% or height of object box (if caption stays beside object);
+% \item[\meta{inner vert pos}]vertical alignment of object if its box larger than contents.
+% \end{description}
+%
+% \subsection{Defining New Float Box Commands}
+%
+% \begin{macro}{\newfloatcommand}
+% \begin{macro}{\renewfloatcommand}
+% The following macros allow to define user commands-abbreviations:
+% they have common unchanged preamble and setting for default width of float
+% box. Usage:\\[\medskipamount]
+% |\newfloatcommand{|\meta{command}|}{|\meta{captype}|}|^^A
+% |[|\meta{preamble}|][|\meta{default width}|]|\\[\medskipamount]
+% where:
+% \begin{description}
+% \item[\meta{command}]the new command name without backslash;
+% \item[\meta{captype}]see section above;
+% \item[\meta{preamble}]see section above;
+% \item[\meta{default width}]here you could put |\FBwidth| option: in this
+% case the width of object---caption box (in case of caption above or below
+% object) or width of object box (if caption stays beside object) will be
+% equal to width of object.
+% \end{description}
+% Examples:
+% \begin{verse}
+% |\newfloatcommand{ffigbox}{figure}|\\
+% |\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]|
+% \end{verse}
+%
+% The definition of command for new float command.
+% \changes{v0.1f}{2005/06/14}{Bug fix: corrected \cmd{\@latex@error} command code.}
+% \begin{macrocode}
+\newcommand\newfloatcommand[2]{%
+ \@ifundefined{#1}{}%
+ {\PackageError{floatrow}{\string#1 already defined}{\@ehd}}%
+ \@ifnextchar[{\FB@nc{#1}{#2}}{\FB@nc{#1}{#2}[]}}
+\newcommand\renewfloatcommand[2]{%
+ \@ifundefined{#1}{}%
+ {\PackageInfo{floatrow}{Redefining \string#1}}%
+ \@ifnextchar[{\FB@nc{#1}{#2}}{\FB@nc{#1}{#2}[]}}
+\@ifdefinable\FB@nc{}\@ifdefinable\FB@@nc{}
+\def\FB@nc#1#2[#3]{%
+ \@ifnextchar[{\FB@@nc{#1}{#2}[#3]}{\FB@@nc{#1}{#2}[#3][]}}
+\def\FB@@nc#1#2[#3][#4]{%
+ \@namedef{#1}{\begingroup
+ #3\def\@captype{#2}%
+ \@ifnextchar[{\@floatbox}{\@floatbox[#4]}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Predefined Abbreviations for Figures and Tables}
+%
+% \begin{macro}{\ffigbox}
+% \begin{macro}{\ttabbox}
+% \begin{macro}{\fcapside}
+% The abbreviations for object---caption combination in float
+% figures and tables and also for figures with beside captions
+% (there is not given \emph{abbreviation} command for beside
+% caption in tables---I can't imagine such book design).
+% \begin{macrocode}
+\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
+\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
+\newfloatcommand{fcapside}{figure}[\capbeside][]
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Building Float Box}
+%
+% \subsubsection{Dimensions Used in Float Box Building}
+%
+% \begin{macro}{\FB@wd}
+% \begin{macro}{\FBo@wd}
+% \begin{macro}{\FBc@wd}
+% These internal dimensions used for defining widths for
+% float boxes entirely and for object and caption separately
+% (they could differ in special style layouts).
+% \begin{macrocode}
+\@ifdefinable\FB@wd {\newdimen\FB@wd}
+\@ifdefinable\FBo@wd{\newdimen\FBo@wd}
+\@ifdefinable\FBc@wd{\newdimen\FBc@wd}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\FBo@ht}
+% \begin{macro}{\FBc@ht}
+% \begin{macro}{\FBf@ht}
+% The internal dimensions for heights of object and caption.
+% Third dimension defines height of footnote and float foot stuff.
+% \begin{macrocode}
+\newlength\FBo@ht
+\newlength\FBc@ht
+\newlength\FBf@ht
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\FBo@max}
+% \begin{macro}{\FBc@max}
+% \begin{macro}{\FBf@max}
+% These three internal dimensions determine maximum object, caption and foot boxes
+% in float row environments for special styles.
+% \begin{macrocode}
+\newlength\FBo@max
+\newlength\FBc@max
+\newlength\FBf@max
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Commands for Counting Width and Height}
+%
+% \begin{macro}{\FR@loc@addcnt}
+% \begin{macro}{\FR@loc@}
+% \begin{macro}{\FBtmp@cap}
+% Redefinition of \cmd{\addtocounter} macro---localization of counter change.
+% \begin{macrocode}
+\newcommand\FR@loc@addcnt[2]{%
+ \@ifundefined{c@#1}{\@nocounterr{#1}}%
+ {\advance\csname c@#1\endcsname #2\relax}}
+% \end{macrocode}
+% (The command for localization of |\refstepcounter| and |\refsteponlycounter| commented.
+% For a while.)
+% \begin{macrocode}
+%\newcommand\FR@loc@refcnt[1]{%
+% \@ifundefined{c@#1}{\@nocounterr{#1}}%
+% {\advance\csname c@#1\endcsname1\relax}}
+% \end{macrocode}
+% Gobbling of caption label and localization of counter change.
+% \begin{macrocode}
+\newcommand\FR@loc@{\let\label\@gobble
+% \let\refstepcounter\FR@loc@refcnt\let\refsteponlycounter\FR@loc@refcnt
+% \end{macrocode}
+% The |\cl@@ckpt| is macro which ``globalizes'' all counter. It is used by \env{tabularx}
+% environment. Here it is emptied during local creation of caption box.
+% \changes{v0.1d}{2005/02/07}{Advanced redefinition of global recount (for \env{tabularx} environment)}
+% \changes{v0.1f}{2005/06/14}{Added `gobbling' redefinition for \cmd{\sf@updatecaptionlist}
+% macro (\pkg{subfig}).}
+% \begin{macrocode}
+ \let\cl@@ckpt\empty\let\addtocounter\FR@loc@addcnt
+ \def\sf@updatecaptionlist##1##2##3##4{}}
+% \end{macrocode}
+% (The macro for temporary redefinition for counting of caption width. Commented.)
+% \begin{macrocode}
+\def\FBtmp@cap#1[#2]#3{\sbox\@tempboxa
+ {\caption@@@make{\csname fnum@\@captype \endcsname}{#3}}%
+ \global\@tempdimb\wd\@tempboxa}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\FBget@box}
+% This macro counts widths and heights of caption and
+% object boxes accordingly to \meta{width} and \meta{height}
+% arguments of |\floatbox| macro.
+% \label{FBwidth}
+% \begin{macrocode}
+\newcommand\FBget@box[3]{%
+% \end{macrocode}
+% At first macro defines |\hsize| (which could be used in width definition),
+% i.e. change it for fit contents in boxes.
+% The |\FBget@box| macro uses the |\FBB@wd| command. In the case of |\hsize=0pt|
+% the |\FBB@wd| still defined as |\relax|. It will be defined later.
+%
+% The |\hsize=0pt| can be defined in mandatory argument of \env{wrap...} environment
+% in the case of creation space equal to float contents. If |\floatbox| macro
+% has not any \oarg{width} argument, the |\hsize| of wrapped figure
+% equals to beside text (i.e. current text is `divided' into two columns).
+% \changes{v0.1f}{2005/06/14}{Added value for undefined \cmd{\FBB@wd} command.
+% (used as flag for wrapped floats.)}
+% \begin{macrocode}
+ \FBiffloatrow\else
+ \ifx\FBB@wd\relax
+ \ifdim\hsize=\z@
+% \end{macrocode}
+% The |\floatbox| stuff doesn't use special |\caption| definition inside \env{wrap...}
+% environment---|\caption| restores its behavior.
+% \begin{macrocode}
+ \@ifundefined{wf@@caption}{}{\let\caption\wf@@caption}%
+ \hsize.5\columnwidth\advance\hsize-.5\columnsep
+ \else
+ \edef\FBB@wd{\the\hsize}%
+ \fi
+ \else
+ \hsize\FBB@wd
+ \fi
+ \fi
+ \adj@dim\hsize-\FB@wadj=\@tempdima
+ \FBifcapbeside
+ \FCget@@wd{#1}{#3}%
+ \else
+ \nofilFCOhsize
+ \FBiffloatrow\else
+ \settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
+ \advance\@tempdima-\@tempdimb
+ \fi
+ \fi
+ \FC@ifo@fil\@tempdima\FB@wd\else\FB@wd\@tempdima\fi
+ \adj@dim\@tempdima-\FBo@wadj=\FBo@wd
+% \end{macrocode}
+% This line is doubled below but it is necessary here in case
+% you use |\hsize| in any width argument in current float contents.
+% \changes{v0.1d}{2005/02/07}{Bug fix: Restored \cmd{\hsize} setting.}
+% \begin{macrocode}
+ \FBiffloatrow\else\hsize\FBo@wd\fi
+% \end{macrocode}
+% \changes{v0.1b}{2004/10/22}{Bug fix: \cmd{\FB@wd} changed only
+% for beside captions.}
+% |\FB@wd| changed only for beside captions.
+% \begin{macrocode}
+ \FBifcapbeside\hsize\FB@wd\fi
+% \end{macrocode}
+% If there are defined the width and/or height arguments in |\floatbox|
+% macro (re)counts width of object and caption.
+% \begin{macrocode}
+ \def\reserved@a{#1}\ifx\reserved@a\empty
+ \else\FBget@@wd{#1}{#3}\fi
+ \hsize\FBo@wd
+ \FBifcapbeside
+ \FC@ifc@wd\else\advance\FBc@wd-\FB@wd\fi
+ \else
+ \FBc@wd\FB@wd
+ \fi
+% \end{macrocode}
+% From this point macro counts heights of caption and object if necessary.
+% \begin{macrocode}
+ \setbox0\vbox{\FR@loc@\hsize\FBo@wd
+ \FBifcaptop
+ \ifnum\FPOScnt=0\columnwidth\hsize\else\columnwidth\FBc@wd\fi
+ \else
+ \columnwidth\FBc@wd
+ \fi
+ #3}%
+ \FBc@ht\ht\@floatcapt\advance\FBc@ht\dp\@floatcapt
+ \FBo@ht\ht0\advance\FBo@ht\dp0\let\FBheight\FBo@ht
+ \setbox2\vbox{\null\par\FB@foot\par}%
+ \FBf@ht\ht2\advance\FBf@ht\dp2%
+ \FBiffloatrow
+ \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
+ \ifCADJ
+ \FBifcaptop
+ \ifnum\FPOScnt=1\global\advance\FBc@ht\FBf@ht\fi
+ \else
+ \ifnum\FPOScnt=2
+ \ifdim\FBf@ht>\FBf@max
+ \global\advance\FBc@ht\FBf@ht
+ \else
+ \global\advance\FBc@ht\FBf@max
+ \fi
+ \else
+ \global\advance\FBc@ht\FBf@ht
+ \fi
+ \fi
+ \ifdim\FBc@ht>\FBc@max\global\FBc@max\FBc@ht\fi
+ \gdef\FBcheight{\FBc@ht}\gdef\FBfheight{\FBf@ht}%
+ \fi
+ \fi
+ \def\reserved@a{#2}\ifx\reserved@a\empty
+ \FBiffloatrow\ifOADJ
+ \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
+ \FBifcaptop
+ \ifnum\FPOScnt=0
+ \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
+ \fi
+ \fi
+ \gdef\FBoheight{\FBo@ht}\gdef\FBfheight{\FBf@ht}%
+ \fi\fi
+ \else
+ \FBget@@ht{#2}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FCget@@wd}
+% Counts the width of caption if caption was placed beside float object.
+% \begin{macrocode}
+\newcommand\FCget@@wd[2]{\flrow@FClist
+ \FBiffloatrow\else
+ \settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
+ \advance\@tempdima-\@tempdimb\advance\hsize-\@tempdimb
+ \fi
+ \settowidth\@tempdimb{\floatcapbesidesep}\advance\@tempdima-\@tempdimb
+ \FC@ifo@fil\FB@wd\@tempdima\fi
+ \FC@ifc@wd
+% \end{macrocode}
+% If |\FCwidth| was not defined (|\relax|), macro counts
+% natural caption width (in this case |\caption| restores plain \LaTeX's behavior).
+% The contents of float hidden in |\box1|.
+% \changes{v0.1f}{2005/06/14}{Added temporal redefinition of \cmd{\refstepcounter}.}
+% \begin{macrocode}
+ \ifx\FCwidth\relax
+ \setbox1\vbox{\FR@loc@
+ \let\refstepcounter\stepcounter
+ \let\caption\FB@caption
+ \let\@caption\FBtmp@cap
+ #2}%
+ \FBc@wd=\@tempdimb
+% \FBc@wd=\wd\@floatcapt
+ \else
+ \FBc@wd=\FCwidth
+% \end{macrocode}
+% The |\FCwidth| is local dimension.
+% \begin{macrocode}
+ \fi\FC@ifo@fil\advance\FB@wd-\FBc@wd\fi
+ \else
+ \FBc@wd\@tempdima
+ \fi
+ \@tempdima.5\@tempdima}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FBget@@wd}
+% Counts the width of object if the width optional argument not empty.
+%
+% There is na\u\i{}ve check of existence of |\FBwidth| and/or |\FBheight| commands
+% in optional arguments.
+% I hope it could work unless you've enlarge the box by more than
+% 5 times of original size (in this case the absolute dimensions more preferable).
+% \changes{v0.1f}{2005/06/14}{The \texttt{4}\cmd{\textwidth} changed to absolute value.}
+% \begin{macrocode}
+\newcommand\FBget@@wd[2]{\@tempswafalse
+ \begingroup
+ \@tempdima-3000pt\let\FBwidth\@tempdima
+ \setlength\dimen@{#1}\ifdim\dimen@<\z@\global\@tempswatrue\fi
+ \endgroup
+ \if@tempswa
+ \setbox0\hbox{\FR@loc@#2}\FBo@wd\wd0%
+ \let\FBwidth\FBo@wd
+ \setlength\FBo@wd{#1}%
+ \advance\FBo@wd\leftskip\advance\FBo@wd\rightskip
+% \end{macrocode}
+% The width |\FB@wd| localized.
+% \changes{v0.1b}{2004/10/22}{Bug fix: \cmd{\FB@wd} localized.}
+% \begin{macrocode}
+ \adj@dim\FBo@wd+\FBo@wadj=\FB@wd
+% \end{macrocode}
+% Throw out floatfoot and float footnote contents (if exist).
+% \begin{macrocode}
+ \setbox\flrow@foot\box\voidb@x
+ \setbox\@mpfootins\box\voidb@x
+ \else
+ \setlength\FB@wd{#1}%
+% \end{macrocode}
+% The width |\FB@wd| localized.
+% \changes{v0.1b}{2004/10/22}{Bug fix: \cmd{\FB@wd} localized.}
+% \begin{macrocode}
+ \adj@dim\FB@wd-\FB@wadj=\FB@wd
+ \adj@dim\FB@wd-\FBo@wadj=\FBo@wd
+ \let\FBwidth\FBo@wd
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FBget@@ht}
+% Counts the height of object if the height optional argument not empty.
+% \changes{v0.1f}{2005/06/14}{The \texttt{4}\cmd{\textheight} changed to absolute value.}
+% \begin{macrocode}
+\newcommand\FBget@@ht[1]{\@tempswafalse
+ \begingroup
+ \@tempdimb-3000pt\let\FBheight\@tempdimb
+ \setlength\dimen@{#1}\ifdim\dimen@<\z@
+ \global\@tempswatrue\fi
+ \endgroup
+ \setlength\FBo@ht{#1}%
+ \if@tempswa
+ \adj@dim\FBo@ht+\FBo@hadj=\FBo@ht
+ \FBifcaptop\ifnum\FPOScnt=0\advance\FBo@ht\FBf@ht\fi\fi
+ \else
+ \adj@dim\FBo@ht-\FBo@hadj=\FBo@ht
+ \adj@dim\FBo@ht-\FB@hadj=\FBo@ht
+ \setbox0\vbox{\offinterlineskip\vbox{\@@FBabove}%
+ \FBifcapbeside\else\@@FBskip\hrule\@height\z@\@depth\z@\fi
+ \vtop{\@@FBbelow}}%
+ \global\advance\FBo@ht-\ht0\global\advance\FBo@ht-\dp0%
+ \FBifcapbeside\else\FBget@@@ht\fi
+ \FBiffloatrow\ifOADJ
+ \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
+% \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
+% \FBifcaptop\ifnum\FPOScnt=0\advance\FBo@ht\FBf@ht\fi\fi
+ \fi\fi
+ \fi
+ \def\FBoheight{\FBo@ht}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FBget@@@ht}
+% If there was set the height of float box this macro
+% counts height of additional vertical material (except of space
+% created by frames) in object---caption box plus height of
+% caption box. The result is used to get correct height of object box.
+% \begin{macrocode}
+\newcommand\FBget@@@ht{%
+% \end{macrocode}
+% The |\box0| settings moved up in |\FBget@@ht| macro.
+% \begin{macrocode}
+% \global\advance\FBo@ht-\ht0\global\advance\FBo@ht-\dp0%
+ \ifdim\FBc@ht>\FBc@max
+ \global\advance\FBo@ht-\FBc@ht
+ \else
+ \global\advance\FBo@ht-\FBc@max
+ \fi
+ \FBifcaptop\ifnum\FPOScnt=1\else
+ \ifdim\FBf@ht>\FBf@max
+ \global\advance\FBo@ht-\FBf@ht
+ \else
+ \global\advance\FBo@ht-\FBf@max
+ \fi
+ \fi\fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Storing Heights for Current Float Box}
+%
+% \begin{macro}{\FB@writeaux}
+% \begin{macro}{\FB@readaux}
+% Excerpt from \LaTeX's |\protected@write|. This command is used for printing
+% in \texttt{.aux}-file the necessary settings which will work in next
+% \LaTeX{} run.
+% \begin{macrocode}
+\newcommand\FB@writeaux[1]{%
+ \begingroup
+ \let\thepage\relax\let\protect\@unexpandable@protect
+ \edef\reserved@a{\write\@auxout{\string\gdef
+ \expandafter\string\csname @@FBset@\romannumeral
+ \the\c@FBl@b\endcsname{#1}}}\reserved@a
+ \endgroup
+ \addtocounter{FBl@b}{1}}
+\newcommand\FB@readaux[1]{%
+ \@ifundefined{@@FBset@\romannumeral\the\c@FBl@b}%
+ {#1}{\@nameuse{@@FBset@\romannumeral\the\c@FBl@b}}}
+% \end{macrocode}
+%
+% \begin{macro}{\c@FBl@b}
+% This counter helps to define unique
+% command for each float row environment or object---caption
+% beside box if necessary.
+% \begin{macrocode}
+\newcounter{FBl@b}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Building Caption and Object Boxes}\label{putFB}
+%
+% \begin{macro}{\FC@ifFBOX}
+% \begin{macro}{\FBs@raise}
+% \begin{macro}{\FBf@raise}
+% \begin{macro}{\FCset@vpos}
+% The |\FC@ifFBOX| flag if true aligns top or bottom
+% of object's frame with top or bottom of beside caption if fancy layout used.
+% \begin{macrocode}
+\let\FC@ifFBOX\iffalse
+\newcommand\FBs@raise{\raisebox{-\totalheight}}
+\newcommand\FBf@raise{}
+% \end{macrocode}
+% Setting of vertical position for beside caption and object.
+% Here is used \LaTeX's |\@parboxto| command, because of here is used
+% analogous mechanism of box building as in |\parbox| command and \env{minipage}
+% environment.
+% \begin{macrocode}
+\newcommand\FCset@vpos{\@FC@vpos
+ \ifcase\count@
+ \gdef\FC@bbox{$\vcenter\@parboxto\bgroup\vskip\z@}%
+ \gdef\FC@ebox{\vskip\z@\egroup$}%
+ \gdef\FBf@raise{}%
+ \gdef\FBs@raise{\raisebox{-.5\totalheight}}%
+ \or\gdef\FC@bbox{\vtop\@parboxto\bgroup\vskip\z@}%
+ \gdef\FC@ebox{\vskip\z@\egroup}%
+ \FC@ifFBOX\gdef\FBf@raise{\raisebox{-\height}}%
+ \else\gdef\FBf@raise{}\fi
+ \gdef\FBs@raise{\raisebox{-\totalheight}}%
+ \or\gdef\FC@bbox{\vbox\@parboxto\bgroup}\gdef\FC@ebox{\vskip\z@\egroup}%
+ \FC@ifFBOX\gdef\FBf@raise{\raisebox{\depth}}%
+ \else\gdef\FBf@raise{}\fi
+ \gdef\FBs@raise{}\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\adj@dim}
+% Dimension defines box widths and heights in special styles.
+% \begin{macrocode}
+\@ifdefinable\adj@dim{}
+\def\adj@dim#1#2#3=#4{\dimen@\z@#3\ifdim\dimen@=\z@#4#1\else
+ \adj@@dim#1#2#3{#4}\fi}
+\newcommand\adj@@dim[4]{\@tempdima#1\advance\@tempdima#2\dimen@
+ #4=\@tempdima}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Caption---Object Box Building Macro}
+%
+% \begin{macro}{\floatbox}
+% The start of main macro of object---caption box building.
+%
+% The preparation of optional arguments.
+% \begin{macrocode}
+\newcommand\floatbox[2][]{\begingroup
+ #1\def\@captype{#2}%
+ \@ifnextchar[{\@floatbox}{\@floatbox[]}}
+\@ifdefinable\@floatbox{}\@ifdefinable\@@floatbox{}
+\def\@floatbox[#1]{%
+ \@ifnextchar[{\@@floatbox[#1]}{\@@floatbox[#1][]}}
+\def\@@floatbox[#1][#2]{%
+ \@ifnextchar[{\@@@floatbox[#1][#2]}{\@@@floatbox[#1][#2][]}}%]
+% \end{macrocode}
+%
+% \begin{macro}{\@@@floatbox}
+% Building object---caption box.
+% \begin{macrocode}
+\@ifdefinable\@@@floatbox{}
+\long\def\@@@floatbox[#1][#2][#3]#4#5{%
+ \@FB@vpos{#3}%
+% \end{macrocode}
+% If object---caption stays alone here go
+% special style settings for current float type.
+% Then go the settings for caption layout.
+% \changes{v0.1f}{2005/06/14}{Added local redefining of \cmd{\@makecaption} and
+% \cmd{\@floatboxreset} (if outside float env).}
+% \changes{v0.1f}{2005/06/14}{The \cmd{\flrow@settype} changed to \cmd{\flrow@setlist}
+% (loads also caption settings).}
+% \changes{v0.1f}{2005/06/14}{The \cmd{\capstart} stuff loaded here.}
+% \begin{macrocode}
+ \if@@FS\else\FR@redefs
+ \flrow@setlist{{\@captype}}\FRifFBOX\@@setframe\fi\@@FStrue
+ \fi
+% \end{macrocode}
+% Then load settings for beside captions, in the case we use this layout---^^A
+% the beside caption could use a bit different layout.
+% \begin{macrocode}
+ \FBifcapbeside\flrow@FClist\fi
+ \flrow@settype{tmpset}\global\let\flrow@typ@tmpset\undefined
+% \end{macrocode}
+% Restoring standard justified paragraph settings${{}+{}}$|\parindent\z@|.
+% \begin{macrocode}
+ \@parboxrestore\floatobjectset\floatfont
+% \end{macrocode}
+% Here is called macro which counts widths and heights of caption
+% and object. Before it starts group to localize |\hsize| settings.
+% \changes{v0.1b}{2004/10/22}{Bug fix: grouping restored\ldots}
+% \changes{v0.1d}{2005/02/07}{\ldots for all cases.}
+% \changes{v0.1e}{2005/03/22}{The \cmd{\begingroup} moved up at the beginning of \cmd{\floatbox}
+% macro.}
+% \begin{macrocode}
+ \FBget@box{#1}{#2}{#4#5}%
+% \end{macrocode}
+% In this point defined macros for building of beside object---caption box.
+% \changes{v0.1f}{2005/06/14}{The \cmd{\capstart} added as a)~\cmd{\FR@floatbox} arg
+% (outside float row).}
+% \begin{macrocode}
+ \FBifcapbeside\FCset@vpos\fi
+ \FBiffloatrow\FR@floatbox{\@ifundefined{capstart}{}{\capstart}#4#5}\else
+% \end{macrocode}
+% The restoring of full |\hsize| of current float box.
+% For the case of counting of float width inside \env{wrap...} environment
+% here defined the |\FBB@wd| macro.
+% \changes{v0.1d}{2005/02/07}{Added flag for float box layout building}
+% \changes{v0.1d}{2005/02/07}{\cmd{\float@makebox} macro changed to its contents}
+% \changes{v0.1f}{2005/06/14}{If \cmd{\FBB@wd} still \cmd{\relax}, it defined here.}
+% \changes{v0.1f}{2005/06/14}{The \cmd{\capstart} added as b)~\cmd{\FBsetbox@obj} arg
+% (in float row).}
+% \begin{macrocode}
+ \adj@dim\FB@wd+\FB@wadj=\hsize
+ \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi
+ \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}#4#5}\FBbuildtrue
+ \FBifcapbeside\flrow@FC\FBB@wd\else\flrow@FB\FBB@wd\fi
+ \global\FBbuildfalse
+% \global\FB@wd\hsize
+ \fi
+% \end{macrocode}
+% \changes{v0.1b}{2004/10/22}{Bug fix: grouping restored\ldots}
+% \changes{v0.1d}{2005/02/07}{\ldots for all cases.}
+% End of the group.
+% \begin{macrocode}
+ \endgroup\ignorespaces}
+% \end{macrocode}
+%
+% Code for recounting parameters and building boxes inside |floatrow|
+% environment.
+% \begin{macrocode}
+\newcommand\FR@floatbox[1]{\@tempswafalse
+% \end{macrocode}
+% For beside floats in special layouts of float (e.g. \texttt{boxed}
+% or \texttt{ruled}) there is necessary the definition of maximum heights
+% of captions and objects to align boxes or rules. Here goes command
+% which loads the result of max dimensions from previous run.
+% \begin{macrocode}
+ \ifOADJ\@tempswatrue\fi\ifCADJ\@tempswatrue\fi
+ \if@tempswa\@ifundefined{FB@@boxmax}{}{\FB@@boxmax}\fi
+% \end{macrocode}
+% Here we create boxes of float contents.
+% \begin{macrocode}
+ \FBsetbox@obj{#1}\begin@FBBOX
+ \FBifcapbeside\flrow@FC@\else\flrow@FB@\fi
+ \end@FBBOX
+% \end{macrocode}
+% The each float box in float row reduces special counter \texttt{FRobj} by 1.
+% \begin{macrocode}
+ \addtocounter{FRobj}{-1}%
+ \@tempswafalse\FBiffacing\@tempswatrue\fi
+ \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
+% \end{macrocode}
+% At end of row it equals zero.
+% \begin{macrocode}
+ \ifnum\c@FRobj=0%
+% \end{macrocode}
+% Here goes macro which prints in \file{.aux}-file the final
+% countdown of maximum caption and object heights if necessary.
+% \changes{v0.1d}{2005/02/07}{Added flag for float box layout building}
+% \begin{macrocode}
+ \if@tempswa
+ \FB@writeaux{\string\c@FBcnt\thepage
+ \string\def\string\FB@@boxmax{%
+ \ifOADJ\string\FBo@ht\the\FBo@max
+ \string\FBf@ht\the\FBf@max\fi
+ \ifCADJ\string\FBc@ht\the\FBc@max\fi}}\fi
+ \global\FBbuildfalse
+ \else
+% \end{macrocode}
+% Between floats in float row macro puts separation material.
+% \begin{macrocode}
+ \advance\Xhsize-\FB@wd
+ \FBifcapbeside\advance\Xhsize-\FBc@wd
+ \settowidth\@tempdimb{\floatcapbesidesep}%
+ \advance\Xhsize-\@tempdimb\fi
+ \floatrowsep
+ \adj@dim\Xhsize-\FB@wadj={\global\Xhsize}%
+ \fi}
+% \end{macrocode}
+% The macro for storing float object in box in the same way as
+% in plain environment. There is added code for possible usage of \pkg{color} package
+% and color boxes.
+% \begin{macrocode}
+\newcommand\FBsetbox@obj[1]{%
+ \setbox\float@box\color@vbox\normalcolor
+ \FBifcaptop
+ \FB@vtop\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
+ \ifnum\FPOScnt=0\columnwidth\FBo@wd\else\columnwidth\FBc@wd\fi
+ \else
+ \FB@vbox\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
+ \columnwidth\FBc@wd
+ \fi
+ #1\FBbfil\egroup\color@endbox
+ \let\@currbox\float@box}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Building Float Row}
+%
+% \subsubsection{The Flag, Counter and Dimension for Float Row Environment}
+%
+% \begin{macro}{\FBiffloatrow}
+% Switch used in |\floatbox| to define whether it placed inside of
+% environment of beside floats (float row) or not.
+% \begin{macrocode}
+\let\FBiffloatrow\iffalse
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c@FRobj}
+% Counter of objects i a row, which helps to put correct spaces between float boxes
+% and also to define the rest width (|\Xhsize|) for boxes.
+% \begin{macrocode}
+\newcounter{FRobj}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Xhsize}
+% This dimension is used for defining of the rest width which float box
+% can occupy in current float row environment.
+% \begin{macrocode}
+\newlength\Xhsize
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Float Row Environment}
+%
+% \begin{environment}{floatrow}
+% \label{floatrow}
+% Environment for placing beside floats (of one type).
+% First go counter of floats in row, then the settings for float layout.
+% \changes{v0.1d}{2005/02/07}{Added vertical skips (\cmd{\FBaskip}, \cmd{\FBbskip})
+% for layout fine tuning}
+% \begin{macrocode}
+\newcommand\floatrow[1][2]{\setcounter{FRobj}{#1}\FB@facing
+ \@tempswafalse\FBiffacing\@tempswatrue\fi
+ \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
+ \if@tempswa\FB@readaux{\relax}\fi
+ \vbox\bgroup\vskip\FBaskip\hsize\FBB@wd\@@FRabove
+ \hb@xt@\hsize\bgroup\let\FBiffloatrow\iftrue\FRleftmargin\begingroup
+% \end{macrocode}
+% Here starts trick with redefinition of |\hsize| inside float row.
+% The |\hsize| will be equal to one ``column'' (the number of
+% ``columns''-floats gives optional argument---the default is \texttt{2}).
+% \begin{macrocode}
+ \Xhsize\hsize\count@#1\advance\count@-1%
+ \settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}%
+ \advance\Xhsize-\@tempdima
+ \settowidth\@tempdima{\floatrowsep}%
+ \advance\Xhsize-\count@\@tempdima
+ \@tempdimb\Xhsize\divide\@tempdimb#1%
+% \end{macrocode}
+% Here goes recounted |\hsize|.
+% \begin{macrocode}
+ \FB@wd\@tempdimb\hsize\@tempdimb\ignorespaces}
+% \end{macrocode}
+% Macro for float row end.
+% \begin{macrocode}
+\def\endfloatrow{\ifdim\lastskip>\z@\unskip\fi
+ \endgroup\FRrightmargin\egroup%h box
+ \global\let\FBiffloatrow\iffalse\@@FRbelow
+ \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}\egroup%v box
+ \global\FBf@max\z@\global\FBo@max\z@\global\FBc@max\z@
+ \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Aligning Float Boxes}
+%
+% \begin{macro}{\CenterFloatBoxes}
+% \begin{macro}{\TopFloatBoxes}
+% \begin{macro}{\BottomFloatBoxes}
+% \begin{macro}{\PlainFloatBoxes}
+% Aligning float boxes.
+% Firstly defined plain macros for float boxes.
+% \begin{macrocode}
+\newcommand\begin@FBBOX{\vbox\bgroup}
+\def\end@FBBOX{\egroup}
+% \end{macrocode}
+% Here these boxes are redefined to align floats in desired way.
+% First definition for centered.
+% \begin{macrocode}
+\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse
+ \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip\z@}%
+ {\vskip\z@\egroup$\egroup}}
+% \end{macrocode}
+% Definition for topped.
+% \begin{macrocode}
+\newcommand\TopFloatBoxes{\CADJfalse\OADJfalse
+ \buildFBBOX{\vtop\bgroup\vskip\z@}{\egroup}}
+% \end{macrocode}
+% Definition for aligned bottom.
+% \begin{macrocode}
+\newcommand\BottomFloatBoxes{\CADJfalse\OADJfalse
+ \buildFBBOX{\vbox\bgroup}{\vskip\z@\egroup}}
+% \end{macrocode}
+% Restoring of plain behavior of boxes in \env{floatrow}.
+% \changes{v0.1e}{2005/03/22}{Added \cmd{\PlainFloatBoxes} for restoring plain
+% behavior of boxes.}
+% \begin{macrocode}
+\newcommand\PlainFloatBoxes{%
+ \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
+% \end{macrocode}
+% Macro which defines |\begin@FBBOX| and |\end@FBBOX|.
+% \begin{macrocode}
+\newcommand\buildFBBOX[2]{\gdef\begin@FBBOX{#1}\gdef\end@FBBOX{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</floatrow>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*floatsetup>
+% \end{macrocode}
+%
+% \subsection{Float settings stuff}
+%
+% \subsubsection{Definitions analogous to \pkg{caption}'s ones}
+%
+% The next bundle of definitions follow \pkg{caption} package macros to organize
+% analogous mechanism of settings.
+%
+% \changes{v0.1f}{2005/06/14}{The macro \cmd{\flrow@ifinlist} deleted---it doubles
+% \cmd{\caption@ifinlist} work.}
+%
+% \begin{macro}{\flrow@setbool}
+% Macro analogous to |\caption@setbool|.
+% \begin{macrocode}
+\newcommand\flrow@setbool[2]{%
+ \caption@ifinlist{#2}{1,true,yes,on}{\let#1\iftrue
+ }{\caption@ifinlist{#2}{0,false,no,off}{\let#1\iffalse
+ }{\PackageError{floatrow}{Undefined boolean value `#2'}{\flrow@eh}%
+ }}}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.1f}{2005/06/14}{The macro \cmd{\l@addto@macro} deleted---it repeats
+% \pkg{caption} package's definition.}
+%
+% \subsubsection{Defining Stuff for Float Layout Settings}
+%
+% \begin{macro}{\floatsetup}
+% This macro analogous to |\captionsetup|.
+% \begin{macrocode}
+\def\floatsetup{\@ifnextchar[\flrow@setuptype\flrow@setup}
+\def\flrow@setuptype[#1]#2{%
+ \@ifundefined{flrow@typ@#1}{\@namedef{flrow@typ@#1}{#2}}%
+ {\expandafter\l@addto@macro\csname flrow@typ@#1\endcsname{,#2}}}
+% \end{macrocode}
+% Setup for only following float.
+% \begin{macrocode}
+\newcommand\thisfloatsetup{\floatsetup[tmpset]}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\flrow@setup}
+% \begin{macro}{\flrow@esetup}
+% \begin{macro}{\flrow@settype}
+% Macros analogous to |\caption@setup|, |\caption@esetup| and |\caption@settype|.
+% \begin{macrocode}
+\def\flrow@setup{\setkeys{floatrow}}
+\def\flrow@esetup#1{%
+ \edef\FR@tmp{\noexpand\flrow@setup{#1}}\FR@tmp}
+\def\flrow@settype#1{\@ifundefined{flrow@typ@#1}{}%
+ {\flrow@esetup{\csname flrow@typ@#1\endcsname}}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\flrow@setlist}
+% \begin{macro}{\flrow@FClist}
+% This macro declares list of float settings (like \texttt{widefloat}, {rotfloat} etc.)
+% \changes{v0.1f}{2005/06/14}{Added \cmd{\flrow@capsetup} (AS).}
+% \changes{v0.1f}{2005/06/14}{The \cmd{\caption@setposition} settings
+% moved here (AS).}
+% \begin{macrocode}
+\newcommand\flrow@setlist[1]{\@flrow@setlist#1;%
+ \FR@ifCST\flrow@capsetup\fi\@cap@setlist#1;%
+ \caption@setposition{\FBifcaptop t\else b\fi}}
+\newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble
+ \@flrow@setlist}
+% \end{macrocode}
+% \changes{v0.1f}{2005/06/14}{The \cmd{\@cap@setlist} redefined (AS).}
+% The code of \@cap@setlist|| co-operated with \pkg{caption} package
+% (code suggestions of Axel Sommerfeldt).
+% \begin{macrocode}
+\newcommand\@cap@setlist[1]{\caption@settype{#1}%
+ \@ifnextchar;{\let\caption@setfloattype\@gobble\@gobble}\@cap@setlist}
+% \end{macrocode}
+% This macro adds list of possible settings for beside captions.
+% \begin{macrocode}
+\newcommand\flrow@FClist{\flrow@setlist
+ {{floatbeside}{capbesidefloat}{\@captype beside}{capbeside\@captype}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@nameundef}
+% \begin{macro}{\clearfloatsetup}
+% \changes{v0.1f}{2005/06/14}{The macro \cmd{\@nameundef} deleted---it repeats
+% \pkg{caption} package's definition.}
+% Removes all settings for chosen type of float.
+% \begin{macrocode}
+\newcommand*\clearfloatsetup[1]{\@nameundef{flrow@typ@#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\flrow@eh}
+% The |\caption@eh|-analog.
+% \begin{macrocode}
+\newcommand\flrow@eh{%
+ If you do not understand this error, please take look\MessageBreak
+ at `floatrow' and `caption' package documentations.\MessageBreak
+ \@ehc}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareFROpt}
+% The |\DeclareCaptionOption|-analog.\\
+% Since this command has internal usage (before end of package) it has abbreviation-like name.
+% \begin{macrocode}
+\newcommand\DeclareFROpt{%
+ \@ifstar{\flrow@declopt\AtEndOfPackage}
+ {\flrow@declopt\@gobble}}
+\newcommand*\flrow@declopt[2]{%
+ #1{\undefine@key{floatrow}{#2}}\define@key{floatrow}{#2}}
+% \end{macrocode}
+% These macros allowed only in preamble.
+% \begin{macrocode}
+\@onlypreamble\DeclareFROpt
+\@onlypreamble\flrow@declopt
+% \end{macrocode}
+% (The default settings. Commented).
+% \begin{macrocode}
+%\DeclareFROpt{default}[]{%
+% \flrow@setup{%
+% style=plain,capposition=bottom,
+% margins=centering,objectset=centering,
+% font=default,footfont=default,
+% }}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Declaring of float styles}
+%
+% \begin{macro}{\DeclareFloatStyle}
+% Declares float style using |\floatsetup| mechanism.
+% \begin{macrocode}
+\newcommand*\DeclareFloatStyle[2]{%
+ \global\@namedef{flrow@sty@#1}{#2}}
+% \end{macrocode}
+% This macro is allowed only in preamble.
+% \begin{macrocode}
+\@onlypreamble\DeclareFloatStyle
+% \end{macrocode}
+% The definition of command which defines settings for new float style.
+% \changes{v0.1f}{2005/06/14}{Added \cmd{\caption@settype} in definition
+% of \cmd{\flrow@capsetup} (AS).}
+% \begin{macrocode}
+\newcommand*\flrow@setstyle[1]{%
+ \@ifundefined{flrow@sty@#1}%
+ {\PackageError{floatrow}{Undefined float style `#1'}{\flrow@eh}}%
+ {\FBstyle@reset
+ \def\flrow@capsetup{%
+ \@ifundefined{caption@sty@#1}{}{\caption@setstyle{#1}}%
+ \caption@settype {#1}}%
+ \flrow@esetup{\csname flrow@sty@#1\endcsname}}}
+% \end{macrocode}
+% Declarations of \pkg{float} package's emulating styles and new \pkg{floatrow} styles.
+% \changes{v0.1f}{2005/06/14}{The bottom caption position moved in \cmd{\FBstyle@reset}
+% as default.}
+% \begin{macrocode}
+\DeclareFloatStyle{plain}{}
+\DeclareFloatStyle{plaintop}{capposition=top}
+\DeclareFloatStyle{boxed}{captionskip=2pt,
+ framestyle=fbox,heightadjust=object,framearound=object}
+\DeclareFloatStyle{ruled}{precode=thickrule,midcode=rule,postcode=lowrule,
+ capposition=top,heightadjust=all}
+\DeclareFloatStyle{Ruled}{style=ruled,capposition=TOP}
+\DeclareFloatStyle{Plaintop}{capposition=TOP}
+\DeclareFloatStyle{Boxed}{style=boxed,framefit=yes}
+\DeclareFloatStyle{BOXED}{framestyle=fbox,
+ framefit=yes,heightadjust=all,framearound=all}
+% \end{macrocode}
+%
+% \begin{macro}{style=}
+% Declaring of key for float styles.
+% \begin{macrocode}
+\DeclareFROpt{style}{\flrow@setstyle{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% The flag, which loads related caption style (if exists), to chosen float style.
+% The \pkg{caption} 3.0 package defines only one related caption style to \pkg{float} package's
+% style---\texttt{ruled}.
+% \begin{macrocode}
+\let\FR@ifCST\iftrue
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{relatedcapstyle=}
+% The boolean key which defines, whether to use caption style, related to chosen float style.
+% \begin{macrocode}
+\DeclareFROpt{relatedcapstyle}[0]{\flrow@setbool{\FR@ifCST}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Defining Font}
+%
+% \begin{macro}{font=}
+% \begin{macro}{footfont=}
+% Fonts for object and |\floatfoot| contents. The settings of font for
+% |\floatfoot| use |\captionsetup| mechanism, so its name follows
+% \pkg{caption} package's rules (|\captionfootfont|).
+% \changes{v0.1f}{2005/06/14}{Removed \texttt{footfont} key.}
+% \changes{v0.1f}{2005/06/14}{Removed \cmd{\AtBeginDocument}'s check---the \cmd{\captionsetup}
+% is always known.}
+% \begin{macrocode}
+\DeclareFROpt{font}{\flrow@setfont{font}{#1}}
+\DeclareFROpt{footfont}{\captionsetup[floatfoot]{font={#1}}}
+\DeclareCaptionOption{footfont}{\caption@setfont{footfont}{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\floatfont}
+% This command sets the font for float objects (|\floatfont|)
+% it could be smaller than caption text.
+% \begin{macrocode}
+\newcommand*\floatfont{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\captionfootfont}
+% Font for |\legend|-like command |\floatfoot|. This font is used inside macro
+% which uses \pkg{caption} package mechanism, so the name of this font
+% follows rules of font naming in \pkg{caption} package.
+% \begin{macrocode}
+\newcommand*\captionfootfont{\normalfont\footnotesize}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareFloatFont}
+% The |\DeclareCaptionFont|-twin.\\
+% It's usage:\\
+% |\DeclareFloatFont{|\meta{name}|}{|\meta{code}|}|.
+% This macro is allowed only in preamble.
+% \changes{v0.1f}{2005/06/14}{The code of \cmd{\DeclareFloatFont} uses caption's key-val settings.}
+% \begin{macrocode}
+\let\DeclareFloatFont\DeclareCaptionFont
+\@onlypreamble\DeclareFloatFont
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\flrow@setfont}
+% The |\caption@setfont|-analog.\\
+% It's usage:\\
+% |\flrow@setfont{|\meta{command}|}{|\meta{keyval-list of names}|}|.
+% \changes{v0.1f}{2005/06/14}{The code of \cmd{\flrow@setfont} uses caption's key-val settings.}
+% \begin{macrocode}
+\newcommand*\flrow@setfont[2]{%
+ \let\caption@tempa\@empty
+ \begingroup\setkeys{caption@fnt}{#2}\endgroup
+ \expandafter\let\csname float#1\endcsname\caption@tempa}
+% \end{macrocode}
+% \end{macro}
+% \changes{v0.1f}{2005/06/14}{\cmd{\DeclareFloatFont} bundle removed---\pkg{floatrow} package
+% uses \file{caption3} settings.}
+%
+% \subsubsection{Declaring of Caption Position}
+%
+% \begin{macro}{capposition=}
+% Keys for defining caption position in float box.
+% \changes{v0.1f}{2005/06/14}{Added \texttt{position=} key as analog name to
+% the same key in \cmd{\captionsetup} stuff.}
+% \begin{macrocode}
+\DeclareFROpt{capposition}{\flrow@cappos{#1}}
+\DeclareFROpt{position}{\flrow@cappos{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\flrow@cappos}
+% Macro analogous to |\caption@setposition|. Instead of |auto| here is used
+% |beside| set. Here are also settings for key |position=| from |\captionsetup|.
+% \begin{macrocode}
+\newcommand*\flrow@cappos[1]{%
+ \caption@ifinlist{#1}{t,top,above}{\captop\nocapbeside
+ }{\caption@ifinlist{#1}{T,TOP,ABOVE}{\CAPTOP\nocapbeside
+ }{\caption@ifinlist{#1}{b,bottom,below,default}{\capbot\nocapbeside
+ }{\caption@ifinlist{#1}{beside,side}{\caption@setposition{a}\capbeside
+ }{\PackageError{floatrow}{Undefined caption position `#1'}{\flrow@eh}%
+ }}}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FBifcaptop}
+% \begin{macro}{\captop}
+% \begin{macro}{\capbot}
+% The positions for captions in float box.
+% There are defined traditional place of captions at the bottom of
+% object---caption box.
+% \changes{v0.1f}{2005/06/14}{\cmd{\caption@position} deleted.}
+% \begin{macrocode}
+\let\FBifcaptop\iffalse
+\newcommand\captop{\let\FBifcaptop\iftrue}
+\newcommand\capbot{\let\FBifcaptop\iffalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\FBifCAPTOP}
+% \begin{macro}{\CAPTOP}
+% Someone, using beside float boxes (see~\ref{floatrow}),
+% would prefer the captions, which placed at the top
+% of these boxes to align them by top line (the default
+% alignment is the bottom line of upper box and the top line of
+% lower box).
+% \begin{macrocode}
+\let\FBifCAPTOP\iffalse
+\newcommand\CAPTOP{\captop\let\FBifCAPTOP\iftrue\CADJtrue}
+% \end{macrocode}
+% In this case if you change contents of caption which could enlarge or
+% reduce the number of lines, you ought to run \LaTeX{} twice.
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\FBifcapbeside}
+% \begin{macro}{\capbeside}
+% \begin{macro}{\nocapbeside}
+% There is flag and commands for printing caption and object beside.
+% \begin{macrocode}
+\let\FBifcapbeside\iffalse
+\newcommand\capbeside{\global\let\FBifcapbeside\iftrue}
+\newcommand\nocapbeside{\global\let\FBifcapbeside\iffalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Defining for Beside Captions}
+%
+% \begin{macro}{capbesideframe=}
+% This boolean key declares whether near beside caption stays framed object.
+% \changes{v0.1f}{2005/06/14}{Removed \texttt{besidecapframe} key.}
+% \begin{macrocode}
+\DeclareFROpt{capbesideframe}[0]{\flrow@setbool{\FC@ifFBOX}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{capbesidewidth=}
+% This key defines width of beside caption.
+% \changes{v0.1f}{2005/06/14}{Removed \texttt{besidecapwidth} key.}
+% \changes{v0.1f}{2005/06/14}{Bug fix: the \cmd{\FCwidth} command defined here as \cmd{\relax}.}
+% \begin{macrocode}
+\DeclareFROpt{capbesidewidth}[1]{\flrow@FCc@wd{#1}}
+\let\FC@ifc@wd\iffalse
+\newcommand\useFCwidth{\let\FC@ifc@wd\iftrue\let\FCwidth\relax}
+\@ifdefinable\FCwidth{\let\FCwidth\relax}
+\newcommand\flrow@FCc@wd[1]{%
+ \caption@ifinlist{#1}{none,sidefill}{\let\FC@ifc@wd\iffalse
+ }{\useFCwidth\def\FCwidth{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{capbesideposition=}
+% Declares position of beside caption in document.
+% \changes{v0.1f}{2005/06/14}{Removed \texttt{besidecapposition} key.}
+% \begin{macrocode}
+\DeclareFROpt{capbesideposition}{\flrow@scpos{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareSCPos}
+% \begin{macro}{\flrow@scpos}
+% The key which defines position of beside captions: vertical and horizontal.
+% This macro is allowed only in preamble. This key is internal (usage till end of package)
+% so it has abbreviation-like name.
+% \begin{macrocode}
+\newcommand\DeclareSCPos[2]{%
+ \define@key{flrow@scpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@scpos[1]{%
+ \let\FR@tmp\@empty
+ \begingroup\setkeys{flrow@scpos}{#1}\endgroup
+ \FR@tmp}
+\@onlypreamble\DeclareSCPos
+% \end{macrocode}
+% Declaring options.
+% \begin{macrocode}
+\DeclareSCPos{left}{\def\@FC@hpos{\let\FBiffacing\iffalse\count@\@ne}}
+\DeclareSCPos{right}{\def\@FC@hpos{\let\FBiffacing\iffalse\count@\z@}}
+\DeclareSCPos{inside}{\def\@FC@hpos{\let\FBiffacing\iftrue
+ \count@\c@FBcnt}}
+\DeclareSCPos{outside}{\def\@FC@hpos{\let\FBiffacing\iftrue
+ \count@\c@FBcnt\advance\count@\@ne}}
+\DeclareSCPos{center}{\def\@FC@vpos{\count@\z@}}
+\DeclareSCPos{top}{\def\@FC@vpos{\count@\@ne}}
+\DeclareSCPos{bottom}{\def\@FC@vpos{\count@\tw@}}
+% \end{macrocode}
+% Command for |capbesideposition=bottom|
+% \begin{macrocode}
+\newcommand*\@FC@vpos{\count@\tw@}
+% \end{macrocode}
+% Command for |capbesideposition=inside|
+% \begin{macrocode}
+\newcommand*\@FC@hpos{\let\FBiffacing\iftrue\count@\c@FBcnt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\c@FBcnt}
+% Count used as flag for facing layouts.
+% \begin{macrocode}
+\newcounter{FBcnt}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{footposition=}
+% Keys for defining foot text position.
+% \begin{macrocode}
+\DeclareFROpt{footposition}{\flrow@ftpos{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareFtPos}
+% \begin{macro}{\flrow@ftpos}
+% Settings for positions of float foot material (footnotes and foot text).
+% This macro is allowed only in preamble.
+% \begin{macrocode}
+\newcommand\DeclareFtPos[2]{%
+ \define@key{flrow@ftpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@ftpos[1]{%
+ \let\FR@tmp\@empty
+ \begingroup\setkeys{flrow@ftpos}{#1}\endgroup
+ \FR@tmp}
+\@onlypreamble\DeclareFtPos
+% \end{macrocode}
+% Declaring options.
+% \begin{macrocode}
+\@ifdefinable\FPOScnt{\newcount\FPOScnt}
+\DeclareFtPos{caption}{\FPOScnt1\relax}
+\DeclareFtPos{bottom}{\FPOScnt2\relax}
+\DeclareFtPos{default}{\FPOScnt0\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{heightadjust=}
+% Keys for vertical adjustment and alignment.
+% \begin{macrocode}
+\DeclareFROpt{heightadjust}{\flrow@htadj{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareHtAdj}
+% \begin{macro}{\flrow@htadj}
+% This key defines adjustment of heights of objects or/and captions
+% in float row.
+% This macro is allowed only in preamble.
+% \begin{macrocode}
+\newcommand\DeclareHtAdj[2]{%
+ \define@key{flrow@htadj}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@htadj[1]{\let\FR@tmp\@empty
+ \begingroup\setkeys{flrow@htadj}{#1}\endgroup
+ \FR@tmp}
+\@onlypreamble\DeclareHtAdj
+% \end{macrocode}
+% Declaring options.
+% \begin{macrocode}
+\DeclareHtAdj{all}{\CADJtrue\OADJtrue}
+\DeclareHtAdj{caption}{\CADJtrue}
+\DeclareHtAdj{object}{\OADJtrue}
+\DeclareHtAdj{none}{\CADJfalse\OADJfalse}
+\DeclareHtAdj{nocaption}{\CADJfalse}
+\DeclareHtAdj{noobject}{\OADJfalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ifCADJ}
+% \begin{macro}{\ifOADJ}
+% These flags define whether common height is used of captions or/and objects in float row.
+% \begin{macrocode}
+\newif\ifCADJ
+\newif\ifOADJ
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{valign=}
+% Keys for vertical alignment.
+% \begin{macrocode}
+\DeclareFROpt{valign}{\@FB@vpos{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@FB@vpos}
+% The vertical alignment of float objects in float row.
+% \begin{macrocode}
+\newcommand\@FB@vpos[1]{%
+ \if#1t\def\FBafil{}\def\FBbfil{\vfill}\else
+ \if#1b\def\FBafil{\vfill}\def\FBbfil{}\else
+ \if#1c\def\FBafil{\vfill}\def\FBbfil{\vfill}\else
+ \if#1s\def\FBafil{}\def\FBbfil{}%
+ \fi\fi\fi\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Facing Pages}
+%
+% \begin{macro}{facing=}
+% Defines, if necessary, flag for facing pages.
+% \begin{macrocode}
+\DeclareFROpt{facing}[1]{\flrow@setbool{\FBiffacing}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FBiffacing}
+% \begin{macro}{\FB@facing}
+% Flag and command for \texttt{facing=}.
+% \begin{macrocode}
+\let\FBiffacing\iffalse
+\newcommand\FB@facing{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Float Box and Float Object Settings}
+%
+% \begin{macro}{margins=}
+% \begin{macro}{\flrow@FBAlign}
+% Declaring of option for |\floatbox| alignment and margins material.
+% \changes{v0.1f}{2005/06/14}{Removed \texttt{floatmarginsset} key.}
+% \begin{macrocode}
+\DeclareFROpt{margins}{\flrow@FBAlign{#1}}
+% \end{macrocode}
+% Macros analogous to |\caption@setjustification|.
+% \begin{macrocode}
+\newcommand*\flrow@FBAlign[1]{%
+ \@ifundefined{flrow@mj@#1}%
+ {\PackageError{floatrow}{Undefined float alignment `#1'}{\flrow@eh}}%
+ {\@nameuse{flrow@mj@#1}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DeclareMarginSet}
+% This macro defines margin filling material.
+% This macro is allowed only in preamble.
+% \begin{macrocode}
+\newcommand*\DeclareMarginSet[2]{%
+ \global\@namedef{flrow@mj@#1}{#2}}
+\@onlypreamble\DeclareMarginSet
+% \end{macrocode}
+% \end{macro}
+%
+% Declaring of float box alignment.
+% \changes{v0.1g}{2005/07/15}{Added settings for \cmd{\LTleft} and \cmd{\LTright} commands
+% from \pkg{longtable} package.}
+% \begin{macrocode}
+\newskip\LTleft\newskip\LTright
+\DeclareMarginSet{centering}{\setfloatmargins{\hfill}{\hfill}%
+ \LTleft=\fill \LTright=\fill}
+\DeclareMarginSet{raggedright}{\setfloatmargins{}{\hfil}%
+ \LTleft=\z@ \LTright=\fill}
+\DeclareMarginSet{raggedleft}{\setfloatmargins{\hfil}{}%
+ \LTleft=\fill \LTright=\z@}
+\newcommand\flrow@mj@default{\flrow@mj@centering}
+% \end{macrocode}
+%
+% \begin{macro}{\floatfacing}
+% Defines settings accordingly to left (even) or right (odd) pages.
+% \changes{v0.1f}{2005/06/14}{Creation starred form for \cmd{\floatfacing} to use separate settings for
+% building of beside caption layout and float environment margins.}
+% \begin{macrocode}
+\newcommand\floatfacing{\@ifstar
+ {\@FC@hpos\floatfacing@}{\FB@facing\floatfacing@}}
+\newcommand\floatfacing@[2]{\@tempswafalse
+ \FBiffacing\@tempswatrue\fi\if@twoside\@tempswatrue\fi
+ \if@tempswa
+ \ifodd\count@#1\else#2\fi
+ \else#2\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\floatboxmargins}
+% \begin{macro}{\floatrowmargins}
+% \begin{macro}{\floatcapbesidemargins}
+% First goes definition for margins around alone float box.
+% Second defines margins in float row.
+% Third---margins around float box with beside caption.
+%
+% You may define different settings for each of these layouts, or set
+% common margins, using macro |\setfloatmargins|.
+% \begin{macrocode}
+\newcommand\floatboxmargins{\def\FR@tmp{FB}\FB@mset}
+\newcommand\floatrowmargins{\def\FR@tmp{FR}\FB@mset}
+\newcommand\floatcapbesidemargins{\def\FR@tmp{FC}\FB@mset}
+% \end{macrocode}
+% To create facing and non-facing layout in macros |\FB@mset@| and |\FB@@mset| loaded
+% definition of |\FB@facing| command. The temporary |\count@| get value of |\c@FBcnt|,
+% which is usually equals to number of page where float appears.
+% \changes{v0.1f}{2005/06/14}{Removed \cmd{\FBiffacing} flag from
+% \cmd{\FB@@mset} macro.}
+% \begin{macrocode}
+\newcommand\FB@mset{\@ifstar{\FB@mset@}{\FB@@mset}}
+\newcommand\FB@mset@[2]{%
+ \def\FB@facing{\let\FBiffacing\iftrue\count@\c@FBcnt}%
+ \@namedef{\FR@tmp leftmargin}{\floatfacing{#1}{#2}}%
+ \@namedef{\FR@tmp rightmargin}{\floatfacing{#2}{#1}}}
+\newcommand\FB@@mset[2]{\def\FB@facing{}%
+ \@namedef{\FR@tmp leftmargin}{#1}\@namedef{\FR@tmp rightmargin}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\setfloatmargins}
+% Alignment settings for object---caption boxes and float rows.
+% \begin{macrocode}
+\newcommand\setfloatmargins{\@ifstar{\FB@allset@}{\FB@@allset}}
+\newcommand\FB@allset@[2]{%
+ \def\FR@tmp{FR}\FB@mset@{#1}{#2}%
+ \def\FR@tmp{FB}\FB@mset@{#1}{#2}%
+ \def\FR@tmp{FC}\FB@mset@{#1}{#2}}
+\newcommand\FB@@allset[2]{%
+ \def\FR@tmp{FR}\FB@@mset{#1}{#2}%
+ \def\FR@tmp{FB}\FB@@mset{#1}{#2}%
+ \def\FR@tmp{FC}\FB@@mset{#1}{#2}}
+% \end{macrocode}
+% Default setting: centering of floats.
+% \begin{macrocode}
+\setfloatmargins{\hfill}{\hfill}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{objectset=}
+% \begin{macro}{justification=}
+% Declaring of option for float object contents' alignment.
+% \changes{v0.1f}{2005/06/14}{Added key \texttt{justification} as analog to
+% \cmd{\captionsetup} stuff.}
+% \begin{macrocode}
+\DeclareFROpt{objectset}{\flrow@FBoAlign{#1}}
+\DeclareFROpt{justification}{\flrow@FBoAlign{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DeclareObjectSet}
+% The |\DeclareCaptionJustification|-twin.\\
+% Macros for float object's contents justification and |\floatbox| alignment.
+% This macro is allowed only in preamble.
+% \changes{v0.1f}{2005/06/14}{The code of \cmd{\DeclareObjectSet} uses caption's key-val settings.}
+% \begin{macrocode}
+\let\DeclareObjectSet\DeclareCaptionJustification
+\@onlypreamble\DeclareObjectSet
+% \end{macrocode}
+% \end{macro}
+% \changes{v0.1f}{2005/06/14}{\cmd{\DeclareObjectSet} bundle removed---\pkg{floatrow} package
+% uses \file{caption} settings.}
+%
+% \begin{macro}{\flrow@FBoAlign}
+% |\caption@setjustification|-analog.\\
+% Command for \texttt{objectset=}
+% \changes{v0.1f}{2005/06/14}{The code of \cmd{\flrow@FBoAlign} uses caption's key-val settings.}
+% \begin{macrocode}
+\newcommand*\flrow@FBoAlign[1]{%
+ \@ifundefined{caption@hj@#1}%
+ {\PackageError{floatrow}{Undefined object setting `#1'}{\flrow@eh}}%
+ {\expandafter\let\expandafter\floatobjectset
+ \csname caption@hj@#1\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\floatobjectset}
+% Definition of command for object alignment
+% \begin{macrocode}
+\newcommand*\floatobjectset{\centering}
+% \end{macrocode}
+% \end{macro}
+% \changes{v0.1f}{2005/06/14}{The \cmd{\centerlast} \cmd{\rightlast} commands
+% deleted.}
+%
+% \subsubsection{Defining Float Width}
+%
+% \begin{macro}{floatwidth=}
+% The float width settings mainly for plain float environments.
+% \changes{v0.1f}{2005/06/14}{Removed \texttt{besidecapsep} key.}
+% \begin{macrocode}
+\DeclareFROpt{floatwidth}{\flrow@FBo@wd{#1}}
+\let\FC@ifo@fil\iffalse
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\filFCOhsize}
+% \begin{macro}{\nofilFCOhsize}
+% Flags and commands for \texttt{floatwidth=}.
+% \begin{macrocode}
+\newcommand\filFCOhsize{\let\FC@ifo@fil\iftrue}
+\newcommand\nofilFCOhsize{\let\FC@ifo@fil\iffalse}
+\newcommand\flrow@setwd{\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\flrow@FBo@wd}
+% \changes{v0.1f}{2005/06/14}{Macro uses \pkg{caption} macros.}
+% \begin{macrocode}
+\newcommand\flrow@FBo@wd[1]{%
+ \caption@ifinlist{#1}{sidefil}{\filFCOhsize
+ }{\nofilFCOhsize\def\flrow@setwd{\@tempdima=#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Defining Float Separators}
+%
+% \begin{macro}{floatrowsep=}
+% \begin{macro}{capbesidesep=}
+% Option |floatrowsep| sets separations for beside float boxes in float row.
+% \changes{v0.1f}{2005/06/14}{Removed \texttt{besidecapsep} key.}
+% \begin{macrocode}
+\DeclareFROpt{floatrowsep}{\flrow@setFRsep\floatrowsep{#1}}
+% \end{macrocode}
+% Option |capbesidesep| sets separations for beside captions.
+% \begin{macrocode}
+\DeclareFROpt{capbesidesep}{\flrow@setFRsep\floatcapbesidesep{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DeclareFloatSeparators}
+% \begin{macro}{\flrow@setFRsep}
+% \begin{macro}{\flrow@setFCsep}
+% Next macros declare material, defined for usage as separator of both float boxes
+% in \env{floatrow} environment and for beside object and caption.
+%
+% The |\DeclareCaptionLabelSeparator|-twin.\\
+% This macro is allowed only in preamble.
+% \changes{v0.1f}{2005/06/14}{Macro is \cmd{\let} to \cmd{\DeclareCaptionLabelSeparator}.}
+% \begin{macrocode}
+\let\DeclareFloatSeparators\DeclareCaptionLabelSeparator
+\@onlypreamble\DeclareFloatSeparators
+% \end{macrocode}
+%
+% The |\caption@setlabelseparator|-analog.\\
+% Command which defines settings for separators in float row, and between beside caption and float object.
+% \changes{v0.1f}{2005/06/14}{Macro uses \pkg{caption} macros.}
+% \begin{macrocode}
+\newcommand*\flrow@setFRsep[2]{%
+ \@ifundefined{caption@lsep@#2}%
+ {\PackageError{floatrow}{Undefined float separator `#2'}{\flrow@eh}}%
+ {\expandafter\let\expandafter#1\csname caption@lsep@#2\endcsname}}
+% \end{macrocode}
+% A few options define possible separators.
+% \changes{v0.1f}{2005/06/14}{The \texttt{quad} and \texttt{none} deleted (repeated from \pkg{caption}).}
+% \begin{macrocode}
+\DeclareFloatSeparators{columnsep}{\hskip\columnsep}
+%\DeclareFloatSeparators{quad}{\quad}
+\DeclareFloatSeparators{qquad}{\qquad}
+\DeclareFloatSeparators{fil}{\hskip\columnsep plus1fil}
+\DeclareFloatSeparators{fill}{\hskip\columnsep plus1fill}
+%\DeclareFloatSeparators{none}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\floatrowsep}
+% \begin{macro}{\floatcapbesidesep}
+% Separators between beside floats, and between object and
+% beside caption.
+% \begin{macrocode}
+\newcommand\floatrowsep{\hskip\columnsep}
+\newcommand\floatcapbesidesep{\hskip\columnsep}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Defining Float Rules/Skips}
+%
+% \begin{macro}{precode=}
+% \begin{macro}{rowprecode=}
+% \begin{macro}{midcode=}
+% \begin{macro}{postcode=}
+% \begin{macro}{rowpostcode=}
+% Keys for building of float style (rules).
+% \changes{v0.1f}{2005/06/14}{Removed \texttt{Precode} and \texttt{Postcode} keys.}
+% \begin{macrocode}
+\DeclareFROpt{precode}{\flrow@FBrule\@@FRabove\@@FBabove{#1}}
+\DeclareFROpt{rowprecode}{\flrow@FRrule\@@FRabove\@@FBabove{#1}}
+\DeclareFROpt{midcode}{\flrow@FBskip{#1}}
+\DeclareFROpt{postcode}{\flrow@FBrule\@@FRbelow\@@FBbelow{#1}}
+\DeclareFROpt{rowpostcode}{\flrow@FRrule\@@FRbelow\@@FBbelow{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DeclareFloatVCode}
+% Declaring options for keys of vertical material for building of float style.
+% They could be used above and below of floatbox, and between object and caption in
+% the case when caption above/below object.
+% This macro is allowed only in preamble.
+% \begin{macrocode}
+\newcommand\DeclareFloatVCode[2]{\@namedef{flrow@FBr@#1}{#2}}
+\@onlypreamble\DeclareFloatVCode
+\newcommand\DeclareFloatPrecode{\DeclareFloatVCode}
+\newcommand\DeclareFloatMidcode{\DeclareFloatVCode}
+\newcommand\DeclareFloatPostcode{\DeclareFloatVCode}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\flrow@FBrule}
+% \begin{macro}{\flrow@FRrule}
+% \begin{macro}{\flrow@FBskip}
+% Vertical code above/below float box.
+% \begin{macrocode}
+\newcommand*\flrow@FBrule[3]{%
+ \@ifundefined{flrow@FBr@#3}%
+ {\PackageError{floatrow}{Undefined rule `#3'}{\flrow@eh}}%
+ {\let#1\empty
+ \expandafter\let\expandafter#2\csname flrow@FBr@#3\endcsname}}
+% \end{macrocode}
+% Vertical code above/below float row.
+% \begin{macrocode}
+\newcommand*\flrow@FRrule[3]{%
+ \@ifundefined{flrow@FBr@#3}%
+ {\PackageError{floatrow}{Undefined rule `#3'}{\flrow@eh}}%
+ {\def#2{\FBiffloatrow\else\@nameuse{flrow@FBr@#3}\fi}%
+ \expandafter\let\expandafter#1\csname flrow@FBr@#3\endcsname}}
+% \end{macrocode}
+% Vertical code between caption and object.
+% \begin{macrocode}
+\newcommand*\flrow@FBskip[1]{%
+ \@ifundefined{flrow@FBr@#1}%
+ {\PackageError{floatrow}{Undefined rule `#1'}{\flrow@eh}}%
+ {\expandafter\let\expandafter\@@FBskip\csname flrow@FBr@#1\endcsname}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Declared options for keys for building of float style (rules).
+% \begin{macrocode}
+\DeclareFloatVCode{none}{}
+\DeclareFloatVCode{thickrule}{\hrule height.8ptdepth0pt\kern2pt}
+\DeclareFloatVCode{rule}{\kern2pt\hrule\kern2pt}
+\DeclareFloatVCode{lowrule}{\kern2pt\hrule}
+\DeclareFloatVCode{captionskip}{\vskip\captionskip}
+% \end{macrocode}
+%
+% The command for definition of material which you
+% could put at the top and bottom of object---caption box
+% and between caption and float.
+%
+% \begin{macro}{\FBstyle@reset}
+% Reset of all used layout settings.
+% \changes{v0.1f}{2005/06/14}{Added \cmd{\captop} macro as default caption
+% position.}
+% \begin{macrocode}
+\newcommand\FBstyle@reset{\let\FRifFBOX\iffalse\OADJfalse\CADJfalse\capbot
+ \def\@@FBskip{\vskip\captionskip}\def\@@FRabove{}\def\@@FRbelow{}%
+ \def\@@FBabove{}\def\@@FBbelow{}%
+ \def\FB@Bset{}\gdef\FB@frame{}\gdef\FBo@frame{}%
+ \gdef\FBo@wadj{}\gdef\FBo@hadj{}\gdef\FB@wadj{}\gdef\FB@hadj{}}
+\newcommand\@@FRabove{}\newcommand\@@FRbelow{}
+\newcommand\@@FBabove{}\newcommand\@@FBbelow{}
+\newcommand\@@FBskip{\vskip\captionskip}
+\newcommand\FB@frame{}\newcommand\FBo@frame{}
+\newcommand\FBo@wadj{}\newcommand\FBo@hadj{}
+\newcommand\FB@wadj{}\newcommand\FB@hadj{}
+\newcommand\FB@Bset{}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Defining Float Frames}
+%
+% Keys for building of float style (boxes).
+%
+% \begin{macro}{framestyle=}
+% This key defines style of frame.
+% \begin{macrocode}
+\DeclareFROpt{framestyle}{\@ifundefined{FB@#1@frame}%
+ {\let\FRifFBOX\iffalse}{\let\FRifFBOX\iftrue\def\FB@B@{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{framearound=}
+% This key defines object to be framed.
+% \begin{macrocode}
+\DeclareFROpt{framearound}{\flrow@fr@round{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\flrow@fr@round}
+% Command for \texttt{framearound=}.
+% \changes{v0.1f}{2005/06/14}{Macro uses \pkg{caption} macro \cmd{\caption@ifinlist}.}
+% \begin{macrocode}
+\newcommand*\flrow@fr@round[1]{%
+ \caption@ifinlist{#1}{object,contents}{\let\FRifFBOX\iftrue
+ \def\FB@BO@{FBo}%
+ }{\caption@ifinlist{#1}{floatbox,all}{\let\FRifFBOX\iftrue
+ \def\FB@BO@{FB}%
+ }{\caption@ifinlist{#1}{none}{\let\FRifFBOX\iffalse
+ }{\PackageError{floatrow}{Undefined framed object `#1'}{\flrow@eh}%
+ }}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{framefit=}
+% \begin{macro}{frameset=}
+% This boolean key defines whether frame size fits to current |\hsize|.
+% \changes{v0.1f}{2005/06/14}{Removed \texttt{framereduce} key.}
+% \begin{macrocode}
+\DeclareFROpt{framefit}[0]{\flrow@setbool{\FRifFIT}{#1}}
+% \end{macrocode}
+% This key defines parameters for chosen frame.
+% \begin{macrocode}
+\DeclareFROpt{frameset}{\def\FB@Bset{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@setframe}
+% Macro which prepares box settings accordingly to predefined float layout.
+% \begin{macrocode}
+\let\FRifFIT\iffalse
+\newcommand\FB@BO@{FBo}\newcommand\FB@B@{}
+\newcommand\@@setframe{%
+ \@namedef{\FB@BO@ @hadj}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+ \@nameuse{FB@\FB@B@ @adj}}%
+ \@namedef{\FB@BO@ @wadj}{\FRifFIT\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+ \@nameuse{FB@\FB@B@ @adj}\fi}%
+ \@namedef{\FB@BO@ @frame}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+ \@nameuse{FB@\FB@B@ @frame}}}
+% \end{macrocode}
+% If box layout used.
+% \begin{macrocode}
+\let\FRifFBOX\iffalse
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FB@fbox@frame}
+% \begin{macro}{\FB@fbox@adj}
+% \begin{macro}{\FB@fbox@reset}
+% First macro is the definition of frame style (here is |\fbox|);
+% second defines compensating material to get frame fitted to current |\hsize|;
+% third defines default values of compensating material.
+% \begin{macrocode}
+\newcommand\FB@fbox@frame[1]{\hbox{%
+ \FRifFIT\else\kern-\fboxrule\kern-\fboxsep\fi
+ \fbox{#1}%
+ \FRifFIT\else\kern-\fboxrule\kern-\fboxsep\fi}\ignorespaces}
+\newcommand\FB@fbox@adj{\dimen@=2\fboxsep\advance\dimen@2\fboxrule}
+\newcommand\FB@fbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% ^^A\subsection{Default Settings}
+%
+% \begin{macro}{\flrow@setdefault}
+% (Macros analogous to |\caption@setdefault|. Commented.)
+% \begin{macrocode}
+%\newcommand\flrow@setdefault{\floatsetup{%
+% style=plain,capposition=bottom,
+% margins=centering,objectset=centering,
+% font=default,footfont=default,
+% }}
+% \end{macrocode}
+%
+% \subsubsection{Defining Float Skips}
+%
+% \begin{macro}{captionskip=}
+% \begin{macro}{footskip=}
+% The following options define skips: first---between float object and
+% caption (if it used in float style); second---before foot material
+% (footnote or other foot text).
+% \changes{v0.1f}{2005/06/14}{Defining also standard \cmd{\abovecaptionskip} for
+% compatibility with \pkg{caption}'s \cmd{\captionof}.}
+% \begin{macrocode}
+\DeclareFROpt{captionskip}{\def\captionskip{#1}%
+ \setlength\abovecaptionskip{#1}}
+\DeclareFROpt{footskip}{\def\floatfootskip{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\captionskip}
+% \begin{macro}{\floatfootskip}
+% The skip between caption and object. Here goes standard value.
+% \begin{macrocode}
+\newcommand\captionskip{10\p@}
+% \end{macrocode}
+%
+% The skip before float footnotes. Here it is equal to
+% used skip in mini pages.
+% \begin{macrocode}
+\newcommand\floatfootskip{\skip\@mpfootins}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Defining Float Footnote Rule}
+%
+% \begin{macro}{footnoterule=}
+% \begin{macro}{\flrow@footrule}
+% The definitions of |\footnoterule| inside float environment.
+% This macro is allowed only in preamble.
+% \begin{macrocode}
+\DeclareFROpt{footnoterule}{\flrow@footrule{#1}}
+\newcommand\DeclareFloatFootnoterule[2]{%
+ \long\@namedef{flrow@fnrule@#1}{#2}}
+\newcommand*\flrow@footrule[1]{%
+ \@ifundefined{flrow@fnrule@#1}%
+ {\PackageError{floatrow}{Undefined footnoterule `#1'}{\flrow@eh}}%
+ {\let\@@FRabove\empty
+ \expandafter\let\expandafter\FBfootnoterule\csname
+ flrow@fnrule@#1\endcsname}}
+\@onlypreamble\DeclareFloatFootnoterule
+% \end{macrocode}
+% Here goes standard \LaTeX{} definition used in minipages.
+% \begin{macrocode}
+\DeclareFloatFootnoterule{normal}{\kern-3\p@
+ \@tempdima.4\columnwidth
+ \hrule\@width\@tempdima\kern2.6\p@}
+% \end{macrocode}
+% Here goes standard \LaTeX{} definition used in minipages with limited maximal width.
+% \begin{macrocode}
+\DeclareFloatFootnoterule{limited}{\kern-3\p@
+ \@tempdima.4\columnwidth
+ \ifdim\@tempdima>\frulemax\@tempdima=\frulemax\fi
+ \hrule\@width\@tempdima\kern2.6\p@}
+\newcommand\frulemax{1in}
+% \end{macrocode}
+% The width of |\footnoterule| equals to full |\hsize|.
+% \begin{macrocode}
+\DeclareFloatFootnoterule{fullsize}{\kern-3\p@
+ \hrule\@width\hsize\kern2.6\p@}
+% \end{macrocode}
+% Absent footnoterule.
+% \begin{macrocode}
+\DeclareFloatFootnoterule{none}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\FBfootnoterule}
+% The definition of special footnote rule.
+% By default it defined as standard \LaTeX{} |\footnoterule|
+% \begin{macrocode}
+\@ifdefinable\FBfootnoterule{\let\FBfootnoterule\footnoterule}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Loading Fancy Float Styles}
+%
+% Options for loading of fancy float styles. Commented.
+% \begin{macrocode}
+\let\FR@iffancy\iffalse
+\DeclareFROpt{fancyboxes}{\flrow@setbool{\FR@iffancy}{#1}}
+% \end{macrocode}
+%
+% \subsubsection{New Float Type Setup}
+%
+% \begin{macro}{\DeclareFNOpt}
+% Declaring new float type like |\newfloat| does.
+% These macros allowed only in preamble.
+% \changes{v0.1f}{2005/06/14}{Redefined \cmd{\DeclareFNOpt} (AS).}
+% \begin{macrocode}
+\newcommand\DeclareFNOpt{%
+ \@ifstar{\flrow@declfnopt\AtBeginDocument}
+ {\flrow@declfnopt\@gobble}}
+\newcommand*\flrow@declfnopt[2]{%
+ #1{\undefine@key{newfloat}{#2}}\define@key{newfloat}{#2}}
+\@onlypreamble\DeclareFNOpt
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\flnew@setdefault{\setkeys{newfloat}
+ {placement=tbp,fileext=lox}}
+% \end{macrocode}
+% The |\newtoks| for defining of float environments (using |\flrow@restyle| command)
+% at the end of preamble.
+% (Took a leaf with settings for lists of floats from \pkg{float} package's book.)
+% \begin{macrocode}
+\@ifdefinable\flrow@types{\newtoks\flrow@types}
+\newcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
+ \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}%
+ \addtocounter{float@type}{\value{float@type}}
+ \@namedef{fname@#1}{#1}\newcounter{#1}%
+ \expandafter\edef\csname fnum@#1\endcsname
+ {\expandafter\noexpand\csname fname@#1\endcsname\
+ \expandafter\noexpand\csname the#1\endcsname}%
+ \@namedef{the#1}{\arabic{#1}}%
+ \flnew@setdefault\setkeys{newfloat}{#2}%
+ \let\FR@tmp=\relax
+ \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
+ \@tempa
+ \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}%
+ \addtocounter{float@type}{\value{float@type}}}
+\@onlypreamble\DeclareNewFloatType
+% \end{macrocode}
+% Key for placement defining.
+% This macro is allowed only in preamble.
+% \begin{macrocode}
+\DeclareFNOpt*{placement}{\flnew@fps{#1}}
+\newcommand\flnew@fps[1]{\@namedef{fps@\FB@captype}{#1}}
+\@onlypreamble\flnew@fps
+% \end{macrocode}
+% Key for float label name defining.
+% This macro is allowed only in preamble.
+% \begin{macrocode}
+\DeclareFNOpt*{name}{\flnew@fname{#1}}
+\newcommand\flnew@fname[1]{\@namedef{fname@\FB@captype}{#1}}
+\@onlypreamble\flnew@fname
+% \end{macrocode}
+% Key for extension of ``toc''-file.
+% This macro is allowed only in preamble.
+% \begin{macrocode}
+\DeclareFNOpt*{fileext}{\flnew@ext{#1}}
+\newcommand\flnew@ext[1]{\@namedef{ext@\FB@captype}{#1}%
+ \let\float@do=\relax
+ \xdef\@tempa{\noexpand\float@exts{\the\float@exts \float@do{#1}}}%
+ \@tempa}
+\@onlypreamble\flnew@ext
+% \end{macrocode}
+% The section of document which resets numbering of float.
+% This macro is allowed only in preamble.
+% \begin{macrocode}
+\DeclareFNOpt*{within}{\flnew@within{#1}}
+\newcommand\flnew@within[1]{\@addtoreset{\FB@captype}{#1}%
+ \expandafter\edef\csname the\FB@captype\endcsname{%
+ \expandafter\noexpand\csname
+ the#1\endcsname.\noexpand\arabic{\FB@captype}}}
+\@onlypreamble\flnew@within
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{relatedcapstyle}
+% The flag whether to use related caption style to float layout.
+% \begin{macrocode}
+\DeclareFNOpt*{relatedcapstyle}[0]{\flrow@setbool{\FR@ifCST}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Building Subfloatrow}
+%
+% \begin{macrocode}
+%<*frforsubfig>
+% \end{macrocode}
+% \changes{v0.1f}{2005/06/14}{The subfloatrow support became a part of a \pkg{floatrow} package.}
+% At first defined dimension for maximal height of subcaption. Then macro for
+% defining height of subcaption box.
+% \begin{macrocode}
+\newlength\FBsc@max
+\newlength\FBso@max
+\@ifdefinable\FBsubcheight{\let\FBsubcheight\relax}
+\@ifdefinable\FBsuboheight{\let\FBsuboheight\relax}
+% \end{macrocode}
+%
+% \begin{macro}{\adjustsubfloats}
+% The user command which loaded at the end of row of subcaptions.
+% \changes{v0.1f}{2005/06/14}{Removed \cmd{\FB@subfloat} and \cmd{\FB@subcaption}
+% definitions: the code for \env{subfloatrow} support placed in \pkg{subfig}'s
+% definitions.}
+% \changes{v0.1f}{2005/06/14}{The \cmd{\xdef} changed to local \cmd{\edef}.}
+% \begin{macrocode}
+\newcommand\adjustsubfloats{\@tempswafalse
+ \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
+ \if@tempswa\FB@writeaux{%
+ \string\global\string\c@FBcnt\thepage
+ \ifCADJ\string\edef\string\FBsubcheight{\the\FBsc@max}\fi
+ \ifOADJ\string\edef\string\FBsuboheight{\the\FBso@max}\fi
+ }\fi
+ \global\let\FBsubcheight\relax\global\let\FBsuboheight\relax
+ \global\FBso@max\z@\global\FBsc@max\z@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{subfloatrow}\label{subfloatrow}
+% Environment for placing beside subfloats. It is simpler than \env{floatrow}.
+% First go counter of floats (here it is local) in row, then the settings for float layout.
+% \begin{macrocode}
+\newcommand\subfloatrow[1][2]{\c@FRobj=#1%local
+ \ifdim\parindent<\z@\leavevmode\else\noindent\fi\hbox\bgroup
+ \Xhsize\hsize\count@#1\advance\count@-1%
+ \settowidth\@tempdima{\subfloatrowsep}%
+ \advance\Xhsize-\count@\@tempdima
+ \@tempdimb\Xhsize\divide\@tempdimb#1%
+ \hsize\@tempdimb\ignorespaces}
+% \end{macrocode}
+% Macro for sub float row end.
+% \begin{macrocode}
+\def\endsubfloatrow{\ifdim\lastskip>\z@\unskip\fi
+ \egroup\adjustsubfloats}
+% \end{macrocode}
+% \end{environment}
+%
+% The definition of subfloat separator.
+% \begin{macrocode}
+\newcommand\subfloatrowsep{\hskip\columnsep}
+\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</frforsubfig>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*frforlongtbl>
+% \end{macrocode}
+%
+% \subsection{Support for \pkg{longtable} Package}
+%
+% \changes{v0.1g}{2005/07/15}{The \pkg{longtable} support moved inside \pkg{floatrow} package.}
+% To follow layout for tables which need size of caption equal to width of
+% table, here added a code which catches width of table from \file{aux}-file
+% and sets to |\LTcapwidth| parameter (great thanks A. Sommerfeldt for
+% compact code created as patch of |\LT@array| command).
+%
+% At first we save macro |\LT@array| under name |\flrow@LT@array|.
+% Then start redefinition.
+% \begin{macrocode}
+\AtBeginDocument{\@ifundefined{LT@array}{}{\let\flrow@oriLT@array\LT@array
+ \let\LT@array\flrow@LT@array}}
+\newcommand\flrow@LT@array{%
+% \end{macrocode}
+% Here are added settings for table font (similar to other table environments).
+% \begin{macrocode}
+ \flrow@setlist{{table}{longtable}}\normalfont\floatfont
+% \end{macrocode}
+% Here goes safe and redefinition of |\LT@make@row| macro in the way
+% of managing of counting of table width.
+% \begin{macrocode}
+ \FBifLTcapwidth
+ \let\flrow@LT@make@row\LT@make@row
+ \def\LT@make@row{%
+ \let\LT@make@row\flrow@LT@make@row
+ \LT@make@row
+% \end{macrocode}
+% The |\LT@entry| here used for width calculation.
+% \begin{macrocode}
+ \ifx\LT@save@row\relax\else\begingroup
+ \LTcapwidth\z@
+ \def\LT@entry####1####2{\advance\LTcapwidth####2}\LT@save@row
+ \ifdim\LTcapwidth=\z@\else\global\LTcapwidth\LTcapwidth\fi
+ \endgroup\fi}%
+ \fi
+% \end{macrocode}
+% At last goes \pkg{longtable}'s macro itself.
+% \begin{macrocode}
+ \flrow@oriLT@array}
+% \end{macrocode}
+%
+% The definition of subfloat separator.
+% \begin{macrocode}
+\let\FBifLTcapwidth\iffalse
+\DeclareFROpt{LTcapwidth}{\flrow@LTcapwd{#1}}
+\newcommand*\flrow@LTcapwd[1]{%
+ \caption@ifinlist{#1}{table,contents}{\let\FBifLTcapwidth\iftrue
+ }{\let\FBifLTcapwidth\iffalse\setlength\LTcapwidth{#1}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</frforlongtbl>
+% \end{macrocode}
+%
+% \subsubsection{Processing of floatsetup options}
+%
+% As in caption style options are processed with usage of the \pkg{keyval} package.
+% \begin{macrocode}
+\def\ProcessOptionsWithKV#1{%
+ \let\@tempc\relax
+ \let\FR@tmp\@empty
+ \@for\CurrentOption:=\@classoptionslist\do{%
+ \@ifundefined{KV@#1@\CurrentOption}%
+ {}%
+ {%
+ \edef\FR@tmp{\FR@tmp,\CurrentOption,}%
+ \@expandtwoargs\@removeelement\CurrentOption
+ \@unusedoptionlist\@unusedoptionlist
+ }%
+ }%
+ \edef\FR@tmp{%
+ \noexpand\setkeys{#1}{%
+ \FR@tmp\@ptionlist{\@currname.\@currext}%
+ }%
+ }%
+ \FR@tmp
+ \let\CurrentOption\@empty
+ \AtEndOfPackage{\let\@unprocessedoptions\relax}}
+\ProcessOptionsWithKV{floatrow}
+\FR@iffancy\RequirePackage{fr-fancy}\fi
+\let\ProcessOptionsWithKV\undefined
+% \end{macrocode}
+% At beginning of document there are loaded macros |\flrow@restyle| for table
+% and figure floats. (Any new float type gets this command when |\newfloat|
+% macro of |\DeclareNewFloatType| are used.)
+% \begin{macrocode}
+\AtBeginDocument{\flrow@restyle{table}\flrow@restyle{figure}%
+ \let\FR@tmp\flrow@restyle \the\flrow@types
+ \@onlypreamble\flrow@restyle\flrow@types{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</floatsetup>
+% \end{macrocode}
+%
+% \changes{v0.1f}{2005/06/14}{The support for non-caption usage deleted.}
+% \changes{v0.1f}{2005/06/14}{The support for obsolete macros deleted.}
+%
+% \subsection{Additional Definitions for Fancy Frames}
+%
+% \begin{macrocode}
+%<*frfancy>
+\RequirePackage{fancybox}
+% \end{macrocode}
+%
+% \subsection{Macros for Color Frame}
+%
+% \begin{macro}{\FB@colorbox@frame}
+% \begin{macro}{\FB@colorbox@adj}
+% \begin{macro}{\FB@colorbox@reset}
+% \begin{macro}{\setcolorframe}
+% First macro is the definition of frame style (here is |\colorbox|);
+% second defines compensating material to get frame fitted to current |\hsize|;
+% third defines default values of compensating material.
+% \begin{macrocode}
+\newcommand\FB@colorbox@frame[1]{\hbox{%
+ \FRifFIT\else\kern-\fboxrule\kern-\fboxsep\fi
+ \FB@fcolorbox{#1}%
+ \FRifFIT\else\kern-\fboxrule\kern-\fboxsep\fi}\ignorespaces}
+\@ifdefinable\FB@colorbox@adj{\let\FB@colorbox@adj\FB@fbox@adj}
+\newcommand\FB@colorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+\newcommand\FB@colorbox{\fbox}
+% \end{macrocode}
+% Definition of color box (frame and fill color)
+% \begin{macrocode}
+\newcommand\setcolorframe[1]{\def\FB@fcolorbox{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% This key defines parameters (definition) for color frame.
+% \begin{macrocode}
+\DeclareFROpt{colorframeset}{\flrow@fcolorbox{#1}}
+\newcommand*\flrow@fcolorbox[1]{%
+ \@ifundefined{flrow@fcolorbox@#1}%
+ {\PackageError{floatrow}{Undefined color box `#1'}{\flrow@eh}}%
+ {\expandafter\let\expandafter\FB@fcolorbox
+ \csname flrow@fcolorbox@#1\endcsname}}
+\newcommand*\DeclareColorBox[2]{%
+ \@ifundefined{color}{\PackageError{floatrow}%
+ {For usage of colored frames\MessageBreak load color package}{}}%
+ {\long\@namedef{flrow@fcolorbox@#1}{#2}}}
+% \end{macrocode}
+%
+% \subsection{Macros for Fancy Frames}
+%
+% \begin{macro}{\FB@wshadowbox}
+% The variant of shadowbox with white contoured shadow.
+% \begin{macrocode}
+\newcommand\wshadowbox{\VerbBox\@wshadowbox}
+\newcommand\@wshadowbox[1]{%
+ \setbox\@fancybox\hbox{\fbox{#1}}%
+ \leavevmode\vbox{\offinterlineskip
+ \hbox{\copy\@fancybox\kern-\fboxrule\lower\shadowsize\hbox{%
+ \dimen@\ht\@fancybox\advance\dimen@-\fboxrule
+ \vrule\@height\ht\@fancybox\@depth-\dimen@\@width\shadowsize
+ \vrule\@height\ht\@fancybox\@depth\dp\@fancybox\@width\fboxrule}}%
+ \vskip-\fboxrule\vskip-\shadowsize
+ \moveright\shadowsize\vbox{%
+ \hrule\@width\fboxrule\@height\shadowsize
+ \hrule\@width\wd\@fancybox\@height\fboxrule}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FB@shadowbox@frame}
+% \begin{macro}{\FB@shadowbox@adj}
+% \begin{macro}{\FB@shadowbox@reset}
+% First macro is the definition of frame style (here is |\shadowbox|);
+% second defines compensating material to get frame fitted to current |\hsize|;
+% third defines default values of compensating material.
+% \begin{macrocode}
+\newcommand\FB@shadowbox@frame[1]{\hbox{%
+ \FRifFIT\else\hskip-\fboxrule\hskip-\fboxsep\fi
+ \FBs@raise{\shadowbox{#1}}%
+ \FRifFIT\else\kern-\fboxrule\kern-\fboxsep\kern-\shadowsize\fi}}
+\newcommand\FB@shadowbox@adj{\dimen@=2\fboxsep
+ \advance\dimen@2\fboxrule\advance\dimen@\shadowsize}
+\newcommand\FB@shadowbox@reset{\fboxsep3\p@\fboxrule.4\p@\shadowsize4\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\FB@wshadowbox@frame}
+% \begin{macro}{\FB@wshadowbox@adj}
+% \begin{macro}{\FB@wshadowbox@reset}
+% The definition for frame \texttt{wshadowbox}---similar to \texttt{shadowbox}
+% from \pkg{fancybox}.
+% First macro is the definition of frame style (here is |\wshadowbox|);
+% second defines compensating material to get frame fitted to current |\hsize|;
+% third defines default values of compensating material.
+% \begin{macrocode}
+\newcommand\FB@wshadowbox@frame[1]{\hbox{%
+ \FRifFIT\else\hskip-\fboxrule\hskip-\fboxsep\fi
+ \FBs@raise{\wshadowbox{#1}}%
+ \FRifFIT\else\kern-\fboxrule\kern-\fboxsep\kern-\shadowsize\fi}}
+\@ifdefinable\FB@wshadowbox@adj{\let\FB@wshadowbox@adj\FB@shadowbox@adj}
+\newcommand\FB@wshadowbox@reset{\fboxsep3\p@\fboxrule.4\p@\shadowsize4\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\FB@doublebox@frame}
+% \begin{macro}{\FB@doublebox@adj}
+% \begin{macro}{\FB@doublebox@reset}
+% First macro is the definition of frame style (here is |\doublerbox|);
+% second defines compensating material to get frame fitted to current |\hsize|;
+% third defines default values of compensating material.
+% \begin{macrocode}
+\newcommand\FB@doublebox@frame[1]{\hbox{%
+ \FRifFIT\else\kern-4.75\fboxrule\kern-.5pt\kern-\fboxsep\fi
+ \doublebox{#1}%
+ \FRifFIT\else\kern-4.75\fboxrule\kern-.5pt\kern-\fboxsep\fi}}
+\newcommand\FB@doublebox@adj{\dimen@=2\fboxsep
+ \advance\dimen@7.5\fboxrule\advance\dimen@\p@}
+\newcommand\FB@doublebox@reset{\fboxsep3\p@\fboxrule.4\p@}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\fs@shadowbox}
+% \begin{macro}{\fs@Shadowbox}
+% \begin{macro}{\fs@SHADOWBOX}
+% There are going three float styles with usage of |\shadowbox|.
+% \begin{macrocode}
+\DeclareFloatStyle{shadowbox}{style=boxed,framestyle=shadowbox}
+\DeclareFloatStyle{Shadowbox}{style=Boxed,framestyle=shadowbox}
+\DeclareFloatStyle{SHADOWBOX}{style=BOXED,framestyle=shadowbox}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\fs@wshadowbox}
+% \begin{macro}{\fs@Wshadowbox}
+% \begin{macro}{\fs@WSHADOWBOX}
+% There are going three float styles with usage of |\wshadowbox|.
+% \begin{macrocode}
+\DeclareFloatStyle{wshadowbox}{style=boxed,framestyle=wshadowbox}
+\DeclareFloatStyle{Wshadowbox}{style=Boxed,framestyle=wshadowbox}
+\DeclareFloatStyle{WSHADOWBOX}{style=BOXED,framestyle=wshadowbox}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\fs@doublebox}
+% \begin{macro}{\fs@Doublebox}
+% \begin{macro}{\fs@DOUBLEBOX}
+% There are going three float styles with usage of |\doublebox|.
+% \begin{macrocode}
+\DeclareFloatStyle{doublebox}{style=boxed,framestyle=doublebox}
+\DeclareFloatStyle{Doublebox}{style=Boxed,framestyle=doublebox}
+\DeclareFloatStyle{DOUBLEBOX}{style=BOXED,framestyle=doublebox}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+%</frfancy>
+% \end{macrocode}
+%
+% \subsection{Empty Floating page}
+%
+% At last goes small sneaky-tricky style to put desired page style for one
+% floating page.
+%
+% \begin{macro}{\floatpagestyle}
+% First goes macro which defines desired page style for page with current float.
+% \begin{macrocode}
+%<*floatpagestyle>
+\newcommand\floatpagestyle[1]{\@ifundefined{ps@#1}\undefinedpagestyle
+ {\begingroup
+ \let\thepage\relax\let\protect\@unexpandable@protect
+ \edef\reserved@a{\write\@auxout{\expandafter\string
+ \csname @setfloatpage\endcsname{\thepage}{#1}}}\reserved@a
+ \endgroup}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\emptyfloatpage}
+% The abbreviation for empty float page style.
+% \begin{macrocode}
+\newcommand\emptyfloatpage{\floatpagestyle{empty}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@setfloatpage}
+% The macro which writes necessary code for changed float page style.
+% \begin{macrocode}
+\newcommand\@setfloatpage[2]{%
+ \edef\reserved@a{floatpage@\romannumeral#1}%
+ \global\expandafter\def\csname\reserved@a\endcsname{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chkfloatpage}
+% The macro which checks whether exists necessary code for changing of current
+% float page style.
+% \begin{macrocode}
+\newcommand\@chkfloatpage{%
+ \edef\reserved@a{floatpage@\romannumeral\the\c@page}%
+ \@ifundefined{\reserved@a}{\relax}{\global\@specialpagetrue
+ \gdef\@specialstyle{\csname\reserved@a\endcsname}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@outputpage}
+% Edited \LaTeX{} core macro (release 2001/06/01)
+% \begin{macrocode}
+\def\@outputpage{%
+\begingroup % the \endgroup is put in by \aftergroup
+ \let \protect \noexpand
+ \@resetactivechars
+ \global\let\@@if@newlist\if@newlist
+ \global\@newlistfalse
+ \@parboxrestore
+ \shipout \vbox{%
+ \set@typeset@protect
+ \aftergroup \endgroup
+ \aftergroup \set@typeset@protect
+% \end{macrocode}
+% Here added checking of floating page style.
+% \begin{macrocode}
+ \@chkfloatpage %check float
+ \if@specialpage
+ \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
+ \fi
+ \if@twoside
+ \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
+ \let\@themargin\oddsidemargin
+ \else \let\@thehead\@evenhead
+ \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
+ \fi
+ \fi
+ \reset@font
+ \normalsize
+ \normalsfcodes
+ \let\label\@gobble
+ \let\index\@gobble
+ \let\glossary\@gobble
+ \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
+ \@begindvi
+ \vskip \topmargin
+ \moveright\@themargin \vbox {%
+ \setbox\@tempboxa \vbox to\headheight{%
+ \vfil
+ \color@hbox
+ \normalcolor
+ \hb@xt@\textwidth{\@thehead}%
+ \color@endbox
+ }%
+ \dp\@tempboxa \z@
+ \box\@tempboxa
+ \vskip \headsep
+ \box\@outputbox
+ \baselineskip \footskip
+ \color@hbox
+ \normalcolor
+ \hb@xt@\textwidth{\@thefoot}%
+ \color@endbox
+ }%
+ }%
+ \global\let\if@newlist\@@if@newlist
+ \global \@colht \textheight
+ \stepcounter{page}%
+ \let\firstmark\botmark
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</floatpagestyle>
+% \end{macrocode}
+%
+% \Finale
+%\endinput
diff --git a/Master/texmf-dist/source/latex/floatrow/floatrow.ins b/Master/texmf-dist/source/latex/floatrow/floatrow.ins
new file mode 100644
index 00000000000..7fcf8cad658
--- /dev/null
+++ b/Master/texmf-dist/source/latex/floatrow/floatrow.ins
@@ -0,0 +1,39 @@
+%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% IMPORTANT COPYRIGHT NOTICE:
+%%
+%% You are NOT ALLOWED to distribute this file alone.
+%% You are NOT ALLOWED to change this file.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+
+\input docstrip
+\keepsilent
+
+\declarepreamble\clspreamble
+
+This is a generated file.
+
+\endpreamble
+
+\declarepreamble\mainpreamble
+
+This is a generated file.
+
+You are NOT ALLOWED to change this file.
+
+\endpreamble
+
+\keepsilent
+%%%\askforoverwritefalse
+%%%\nopreamble
+\generate{
+ \file{floatrow.sty}{\from{floatrow.dtx}{floatrow,frforsubfig,frforlongtbl,floatsetup}}
+ \file{fr-fancy.sty}{\from{floatrow.dtx}{frfancy}}
+ \file{floatpagestyle.sty}{\from{floatrow.dtx}{floatpagestyle}}
+}
+\endbatchfile