All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Add style guide
@ 2017-07-28  9:53 Akira Yokosawa
  2017-07-28  9:55 ` [PATCH 01/10] appendix: " Akira Yokosawa
                   ` (10 more replies)
  0 siblings, 11 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28  9:53 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From cdfca8b81a7d4ee194272359d1775c0c343e0fbe Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 28 Jul 2017 18:06:01 +0900
Subject: [PATCH 00/10] Add style guide

Hi Paul,

This patch series is my attempt to add a style guide for perfbook
in response to your suggestion.

I added it under appendix/styleguide.

It consists of three parts.

  1) Paul's conventions
  2) NIST style guide
  3) LaTeX conventions

I called several conventions as "LaTeX conventions", but they are not
restricted to LaTeX community.

In 3), I attempted a few experiments with the "floatrow" package.
As it conflicts with two-column layout, I need to localize its .sty
file and apply a workaround.

Experiments I did in 3) includes:

  a) Use "listings" environment for code snippets.
  b) Place captions of Tables and Listings at the top.
  c) Improve table layout.

They would involve quite a lot of modifications if we actually employ
the styles. My intention is to show the direction of possible
contributions. I'm not that sure such changes would be worthwhile, though. 

Also, there should be a lot of room to improve in English composition.
Hopefully, unnatural sentences are at least understandable.

Any feedback is welcome.

Note:
  The version of "verbatimbox" required for this series specified in
  patch #2 is newer than the one provided in TeX Live on Ubuntu 12.04 LTS,
  which reached its regular EOL this April. The one on Ubuntu 14.04 LTS
  should suffice. 

       Thanks, Akira.
--
Akira Yokosawa (10):
  appendix: Add style guide
  Specify required revision of 'verbatimbox'
  Localize floatrow.sty
  Apply workaround to floatrow.sty and rename it floatrowpf.sty
  Define 'listing' environment for style guide
  styleguide: Add listing environment examples
  Disable 'floatrow' layout in manually aligned code snippets
  styleguide: Add example of grouping code snippets
  styleguide: Add example of preferred table layout using 'booktabs'
  styleguide: Tweak layout of 'Limitation' table

 appendix/appendix.tex                     |    1 +
 appendix/styleguide/hello.c               |    9 +
 appendix/styleguide/samplecodesnippet.tex |   19 +
 appendix/styleguide/styleguide.tex        |  841 ++++++++++++++++
 defer/rcuusage.tex                        |    6 +-
 floatrowpf.sty                            | 1480 +++++++++++++++++++++++++++++
 howto/howto.tex                           |    4 +-
 perfbook.tex                              |    6 +-
 8 files changed, 2360 insertions(+), 6 deletions(-)
 create mode 100644 appendix/styleguide/hello.c
 create mode 100644 appendix/styleguide/samplecodesnippet.tex
 create mode 100644 appendix/styleguide/styleguide.tex
 create mode 100644 floatrowpf.sty

-- 
2.7.4


^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH 01/10] appendix: Add style guide
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
@ 2017-07-28  9:55 ` Akira Yokosawa
  2017-07-28  9:57 ` [PATCH 02/10] Specify required revision of 'verbatimbox' Akira Yokosawa
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28  9:55 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From e0403ba8882761c59d52e8d65e5c65ab6e85ca29 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Wed, 19 Jul 2017 19:36:36 +0900
Subject: [PATCH 01/10] appendix: Add style guide

In response to Paul's suggestion, add style guide in Appendix.
This is the first draft with no additional package used.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/appendix.tex                     |   1 +
 appendix/styleguide/samplecodesnippet.tex |  19 +
 appendix/styleguide/styleguide.tex        | 682 ++++++++++++++++++++++++++++++
 3 files changed, 702 insertions(+)
 create mode 100644 appendix/styleguide/samplecodesnippet.tex
 create mode 100644 appendix/styleguide/styleguide.tex

diff --git a/appendix/appendix.tex b/appendix/appendix.tex
index dc80e17..d246a7f 100644
--- a/appendix/appendix.tex
+++ b/appendix/appendix.tex
@@ -4,6 +4,7 @@
 \include{appendix/questions/questions}
 \include{appendix/toyrcu/toyrcu}
 \include{appendix/whymb/whymemorybarriers}
+\include{appendix/styleguide/styleguide}
 \QuickQuizAnswers
 \input{glossary.tex}
 \IfTwoColumn{
diff --git a/appendix/styleguide/samplecodesnippet.tex b/appendix/styleguide/samplecodesnippet.tex
new file mode 100644
index 0000000..9020805
--- /dev/null
+++ b/appendix/styleguide/samplecodesnippet.tex
@@ -0,0 +1,19 @@
+\begin{figure}[tbh]
+{ \scriptsize
+\begin{verbbox}
+  1 /*
+  2  * Sample Code Snippet
+  3  */
+  4  #include <stdio.h>
+  5  int main(void)
+  6  {
+  7    printf("Hello world!\n");
+  8    return 0;
+  9  }
+\end{verbbox}
+}
+\centering
+\theverbbox
+\caption{Sample Code Snippet}
+\label{fig:app:styleguide:Sample Code Snippet}
+\end{figure}
diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
new file mode 100644
index 0000000..72b8ca0
--- /dev/null
+++ b/appendix/styleguide/styleguide.tex
@@ -0,0 +1,682 @@
+% appendix/styleguide/styleguide.tex
+% SPDX-License-Identifier: CC-BY-SA-3.0
+
+\chapter{Style Guide}
+\label{chp:app:styleguide:Style Guide}
+
+This appendix is a collection of style guides which is intended
+as a reference to improve consistency in perfbook. It also contains
+several suggestions and their experimental examples.
+
+Section~\ref{sec:app:styleguide:Paul's Conventions} describes basic
+punctuation and spelling rules.
+Section~\ref{sec:app:styleguide:NIST Style Guide} explains rules
+related to unit symbols.
+Section~\ref{sec:app:styleguide:LaTeX Conventions} summarizes
+\LaTeX-specific conventions.
+
+\section{Paul's Conventions}
+\label{sec:app:styleguide:Paul's Conventions}
+
+Following is the list of Paul's conventions assembled from his
+answers to Akira's questions regarding perfbook's punctuation policy.
+
+\begin{itemize}
+\item (On punctuations and quotations)
+  Despite being American myself, for this sort of book, the UK approach
+  is better because it removes ambiguities like the following:
+  \begin{quote}
+    Type ``\nbco{ls -a},'' look for the file ``\co{.},''
+    and file a bug if you don't see it.
+  \end{quote}
+
+  The following is much more clear:
+  \begin{quote}
+    Type ``\nbco{ls -a}'', look for the file ``\co{.}'',
+    and file a bug if you don't see it.
+  \end{quote}
+\item American English spelling: ``color'' rather than ``colour''.
+\item Oxford comma: ``a, b, and~c'' rather than ``a, b and~c''.
+  This is arbitrary.  Cases where the Oxford comma results in ambiguity
+  should be reworded, for example, by introducing numbering:  ``a,
+  b, and c and~d'' should be ``(1)~a, (2)~b, and (3)~c and~d''.
+\item Italic for emphasis.  Use sparingly.
+\item \verb|\co{}| for identifiers, \verb|\url{}| for URLs,
+  \verb|\path{}| for filenames.
+\item Dates should use an unambiguous format.  Never ``mm/dd/yy''
+  or ``dd/mm/yy'', but rather ``July 26, 2016'' or ``26 July 2016''
+  or ``26-Jul-2016'' or ``2016/07/26''.  I tend to use
+  \path{yyyy.mm.ddA} for filenames, for example.
+\item North American rules on periods and abbreviations.
+  For example neither of the following can reasonably be interpreted
+  as two sentences:
+  \begin{itemize}
+  \item Say hello, to Mr. Jones.
+  \item If it looks like she sprained her ankle, call Dr. Smith and
+    then tell her to keep the ankle iced and elevated.
+  \end{itemize}
+
+  An ambiguous example:
+  \begin{quote}
+    If I take the cow, the pig, the horse, etc. George will be upset.
+  \end{quote}
+  can be written with more words:
+  \begin{quote}
+    If I take the cow, the pig, the horse, or much of anything else,
+    George will be upset.
+  \end{quote}
+  or:
+  \begin{quote}
+    If I take the cow, the pig, the horse, etc., George will be upset.
+  \end{quote}
+\item I don't like ampersand (``\&'') in headings, but will sometimes
+  use it if doing so prevents a line break in that heading.
+\item When mentioning words, I use quotations.  When introducing
+  a new word, I use \verb|\emph{}|.
+\end{itemize}
+
+\section{NIST Style Guide}
+\label{sec:app:styleguide:NIST Style Guide}
+
+\subsection{Unit Symbol}
+\label{sec:app:styleguide:Unit Symbol}
+
+\subsubsection{SI Unit Symbol}
+\label{sec:app:styleguide:SI Unit Symbol}
+
+NIST style guide\footnote{
+  \url{https://www.nist.gov/pml/nist-guide-si-chapter-7-rules-and-style-conventions-expressing-values-quantities}}
+states the following rules (rephrased for perfbook).
+% cite: https://www.nist.gov/pml/nist-guide-si-chapter-7-rules-and-style-conventions-expressing-values-quantities
+
+\begin{itemize}
+\item When SI unit symbols such as ``ns'', ``MHz'', and ``K'' (kelvin)
+are used behind numerical values, narrow spaces should be placed between
+the values and the symbols.
+
+A narrow space can be coded in \LaTeX{} by the sequence of
+\qco{\\,}.
+For example,
+\begin{quote}
+  ``2.4\,GHz'', rather then ``2.4GHz''.
+\end{quote}
+
+\item Even when the value is used in adjectival sense, a narrow space
+should be placed. For example,
+\begin{quote}
+  ``a~10\,ms interval'', rather than ``a~10\=/ms interval'' nor
+  ``a~10ms interval''.
+\end{quote}
+\end{itemize}
+
+The symbol of micro (\micro :$10^{-6}$) can be typeset easily by
+the help of ``gensymb'' \LaTeX\ package.
+A macro \qco{\\micro} can be used in both text and
+math modes. To typeset the symbol of ``microsecond'', you can do
+so by \qco{\\micro s}. For example,
+\begin{quote}
+  10\,\micro s
+\end{quote}
+
+Note that math mode \qco{\\mu} is italic by default and should not
+be used as a prefix. An improper example:
+\begin{quote}
+  10\,$\mu $s (math mode \qco{\\mu})
+\end{quote}
+
+\subsubsection{Non-SI Unit Symbol}
+\label{sec:app:styleguide:Non-SI Unit Symbol}
+
+Although NIST style guide does not cover non-SI unit symbols
+such as ``KB'', ``MB'', and ``GB'', the same rule should be followed.
+
+Example:
+
+\begin{quote}
+  ``A~240\,GB hard drive'', rather than ``a~240\=/GB hard drive''
+  nor ``a~240GB hard drive''.
+\end{quote}
+
+Strictly speaking, NIST guide requires us to use the binary prefixes
+``Ki'', ``Mi'', or ``Gi'' to represent powers of~$2^{10}$.
+However, we accept the JEDEC conventions to use ``K'', ``M'',
+and ``G'' as binary prefixes in describing memory capacity.\footnote{
+  \url{https://www.jedec.org/standards-documents/dictionary/terms/mega-m-prefix-units-semiconductor-storage-capacity}}
+
+An acceptable example:
+\begin{quote}
+  ``8\,GB of main memory'', meaning ``8\,GiB of main memory''.
+\end{quote}
+
+Also, it is acceptable to use just ``K'', ``M'', or ``G'' as abbreviations
+appended to a numerical value, e.g., ``4K~entries''. In such cases, no space
+before an abbreviation is required. For example,
+
+\begin{quote}
+  ``8K entries'', rather than ``8\,K entries''.
+\end{quote}
+
+If you put a space in between, the symbol looks like a unit symbol and
+is confusing.
+Note that ``K'' and ``k'' represent $2^{10}$ and $10^3$, respectively.
+``M'' can represent either $2^{20}$ or $10^6$, and ``G'' can represent
+either $2^{30}$ or $10^9$. These ambiguities should not be confusing
+in discussing approximate order.
+
+\subsubsection{Degree Symbol}
+\label{sec:app:styleguide:Degree Symbol}
+
+The angular-degree symbol (\degree) does not require any space in front
+of it. NIST style guide clearly states so.
+
+The symbol of degree can also be typeset easily by the help of gensymb
+package.
+A macro \qco{\\degree} can be used in both text and math modes.
+
+Example:
+
+\begin{quote}
+  $45\degree$, rather than $45\,\degree$.
+\end{quote}
+
+\subsection{NIST Guide Yet To Be Followed}
+\label{sec:app:styleguide:NIST Guides Yet To Be Followed}
+
+There are a few cases where NIST style guide is not followed.
+Other English conventions are preferred in such cases.
+
+\subsubsection{Digit Spacing}
+\label{sec:app:styleguide:Digit Spacing}
+
+Quote from NIST check list:\footnote{
+  \#16 in \url{http://physics.nist.gov/cuu/Units/checklist.html}.
+}
+
+\begin{quote}
+  The digits of numerical values having more than four digits on either
+  side of the decimal marker are separated into groups of three using
+  a thin, fixed space counting from both the left and right of the decimal
+  marker. Commas are not used to separate digits into groups of three.
+\end{quote}
+
+\begin{quote}
+\begin{tabular}{ll}
+  NIST Example:& 15\,739.012\,53\,ms\\
+  Our conventions:& 15,739.01253\,ms\\
+\end{tabular}
+\end{quote}
+
+In \LaTeX\ coding, it is cumbersome to place thin spaces as are recommended
+in NIST guide. The \verb|\num{}| command provided by the ``siunitx''
+package would be of help for us to follow this rule.
+
+\subsubsection{Percent Symbol}
+\label{sec:app:styleguide:Percent Symbol}
+
+NIST style guide treats the percent symbol (\%) as the same as SI unit
+symbols.
+In this textbook, no space is required in front of a percent symbol.
+
+\begin{quote}
+\begin{tabular}{ll}
+  NIST guide:& 50\,\% possibility\\
+  Our conventions:& 50\% possibility\\
+\end{tabular}
+\end{quote}
+
+\subsubsection{Font Style}
+\label{sec:app:styleguide:Font Style}
+
+Quote from NIST check list:\footnote{
+  \#6 in \url{https://physics.nist.gov/cuu/Units/checklist.html}
+}
+
+\begin{quote}
+  Variables and quantity symbols are in italic type. Unit symbols
+  are in roman type. Numbers should generally be written in roman
+  type. These rules apply irrespective of the typeface used in
+  the surrounding text.
+\end{quote}
+
+For example,
+\begin{quote}
+  {\textit e} (elementary charge)
+\end{quote}
+
+On the other hand, mathematical constants such as the base
+of natural logarithms should be roman.\footnote{
+  \url{https://physics.nist.gov/cuu/pdf/typefaces.pdf}
+}
+For example,
+
+\begin{quote}
+  $\mathrm{e}^x$
+\end{quote}
+
+In this textbook, this rule is not much considered as of this writing.
+Most letters in math mode are italic regardless of what they
+represent. Exceptions are uppercase Greek letters, which are upright
+in math mode by default.\footnote{
+  See \url{https://tex.stackexchange.com/questions/119248/}
+  for the historical reason.}
+
+\pagebreak % to prevent footnotes from spilling into next page
+\section{\LaTeX\ Conventions}
+\label{sec:app:styleguide:LaTeX Conventions}
+
+Good looking \LaTeX\ documents require further considerations
+on proper use of font styles, line break exceptions, etc.
+This section summarizes guidelines specific to \LaTeX.
+
+\subsection{Monospace Font}
+\label{sec:app:styleguide:Monospace Font}
+
+Monospace font (or typewriter font) is heavily used in this textbook.
+First policy regarding monospace font in perfbook is to avoid
+directly using \qco{\\texttt} or \qco{\\tt} macro.
+It is highly recommended to use a macro or an environment
+indicating the reason why you want the font.
+
+This section explains the use cases of such macros and environments.
+
+\subsubsection{Code Snippet}
+\label{sec:app:styleguide:Code Snippet}
+
+Although the ``verbatim'' environment is commonly used to include
+listings, we use the ``verbbox'' environment provided by the
+``verbatimbox'' package for most code snippets to enable the
+centering layout.
+
+% Another option would be the ``lstlisting'' environment provided
+%  by the ``listings'' package. We are already using its ``lstinline''
+%  command in the definition of \co{\\co\{\}} macro.
+
+\begin{figure}[tbh]
+{ \scriptsize
+\verbfilebox[{\makebox[5ex][r]{\arabic{VerbboxLineNo}:\hspace{2ex}}}]
+	{appendix/styleguide/samplecodesnippet.tex}
+}
+\centering
+\theverbbox
+\caption{\LaTeX\ Source of Sample Code Snippet}
+\label{fig:app:styleguide:LaTeX Source of Sample Code Snippet}
+\end{figure}
+
+\input{appendix/styleguide/samplecodesnippet}
+
+The \LaTeX\ source of a sample code snippet is shown in
+Figure~\ref{fig:app:styleguide:LaTeX Source of Sample Code Snippet}
+and is typeset as show in
+Figure~\ref{fig:app:styleguide:Sample Code Snippet}.
+
+Note that the verbbox environment is placed inside the figure environment.
+This is to avoid a side effect of verbbox environment that interferes
+with the ``afterheading\-/ness'' of a section's first sentence
+when a verbbox is placed just below a heading.
+
+Line numbers are manually placed for ease of referencing them within
+\LaTeX\ sources.\footnote{
+  As a matter of fact, the verbatimbox package has its own line
+  number counter and the count can be displayed in the resulting
+  listing. Leftmost line numbers in
+  Figure~\ref{fig:app:styleguide:LaTeX Source of Sample Code Snippet}
+  are output by the feature. See the source of this Section
+  in \path{appendix/styleguide/styleguide.tex}
+  if you are interested.}
+
+The verbatim environment is used for listings with too many lines
+to fit in a column. It is also used to avoid overwhelming
+\LaTeX\ with a lot of floating objects.
+
+\subsubsection{Identifier}
+\label{sec:app:styleguide:Identifier}
+
+We use ``\verb|\co{}|'' macro for inline identifiers.
+(``co'' stands for ``code''.)
+
+By putting them into \verb|\co{}|, underscore characters in
+their names are free of escaping in \LaTeX\ source. It is convenient
+to search them in source files. Also, \verb|\co{}|
+macro has a capability to permit line breaks at particular
+sequences of letters. Current definition permits a line break at
+an underscore (\tco{_}), two consecutive underscores (\tco{__}),
+a white space, or an operator \tco{->}.
+
+\subsubsection{Identifier inside Table and Heading}
+\label{sec:app:styleguide:Identifier inside Table and Heading}
+
+Although \verb|\co{}| command is convenient for inlining within text,
+it is fragile because of its capability of line break.
+When it is used inside a ``tabular'' environment or its derivative
+such as ``tabulary'', it confuses column width
+estimation of those environments.
+Furthermore, \verb|\co{}| can not be safely used in section headings nor
+description headings.
+
+As a workaround, we use ``\verb|\tco{}|'' command
+inside tables and headings. It has no capability of line break
+at particular sequences, but still frees us from escaping
+underscores.
+
+When used in text, \verb|\tco{}| permits line breaks at
+white spaces.
+
+\subsubsection{Other Use Cases of Monospace Font}
+\label{sec:app:styleguide:Other Use Cases of Monospace Font}
+
+For URLs, we use ``\verb|\url{}|'' command provided by the
+``hyperref'' package. It will generate hyper references to the
+URLs.
+
+For path names, we use ``\verb|\path{}|'' command. It won't
+generate hyper references.
+
+Both \verb|\url{}| and \verb|\path{}| permit line breaks
+at \qco{/}, \qco{-}, and \qco{.}.\footnote{
+  Overfill can be a problem if the URL or the path name contains
+  long runs of unbreakable characters.
+}
+
+For short monospace statements not to be line broken, we use
+the ``\verb|\nbco{}|'' (non-breakable co) macro.
+
+\subsubsection{Limitations}
+\label{sec:app:styleguide:Limitations}
+
+There are a few cases where macros introduced in this section
+do not work as expected.
+Table~\ref{tab:app:styleguide:Limitation of Monospace Macro}
+lists such limitations.
+
+\begin{table}[tbh]
+\centering\footnotesize
+\begin{tabular}{lll}
+  Macro &  Need Escape & Should Avoid \\
+  \hline
+  \co{\\co}, \co{\\nbco} & \co{\\}, \%, \{, \} & \\
+  \co{\\tco}  & \# & \%, \{, \}, \co{\\} \\
+\end{tabular}
+\caption{Limitation of Monospace Macro}
+\label{tab:app:styleguide:Limitation of Monospace Macro}
+\end{table}
+
+While \verb|\co{}| requires some characters to be escaped,
+it can contain any character.
+
+On the other hand, \verb|\tco{}| can not handle
+\qco{\%}, \qco{\{}, \qco{\}}, nor \qco{\\} properly.
+If they are escaped by a~\qco{\\},
+they appear in the end result with the escape character.
+The \qco{\\verb} macro can be used in running text if you
+need to use monospace font for a string which contains
+many characters to escape.\footnote{
+  \co{\\verb} is not almighty though. For example, you can't use it
+  within a footnote nor table inside ``floatrow'' environment mentioned
+  later. If you do so, you will see a fatal latex error.
+  There are several workarounds of this problem, but as for perfbook,
+  \co{\\co\{\}} should suffice.}
+
+\subsection{Non Breakable Spaces}
+\label{sec:app:styleguide:Non Breakable Spaces}
+
+In \LaTeX\ conventions, proper use of non-breakable white spaces
+is highly recommended. They can prevent widowing and orphaning
+of single digit numbers or short variable names, which would
+cause the text to be confusing at first glance.
+
+The thin space mentioned earlier to be placed in front of a unit
+symbol is non breakable.
+
+Other cases to use a non-breakable space (``\verb|~|'' in \LaTeX\
+source, often referred to as ``nbsp'')
+are the following (inexhaustive).
+
+\begin{itemize}
+\item Reference to a Chapter or a Section:
+  \begin{quote}
+    Please refer to Section~\ref{sec:app:styleguide:NIST Style Guide}.
+  \end{quote}
+\item Calling out CPU number or Thread name:
+  \begin{quote}
+    After they load the pointer, CPUs~1 and~2 will see the stored
+    value.
+  \end{quote}
+\item Short variable name:
+  \begin{quote}
+    The results will be stored in variables~\co{a} and~\co{b}.
+  \end{quote}
+\end{itemize}
+
+\subsection{Hyphenation and Dashes}
+\label{sec:app:styleguide:Hyphenation and Dashes}
+
+\subsubsection{Hyphenation in Compound Word}
+\label{sec:app:styleguide:Hyphenation in Compound Word}
+
+In plain \LaTeX, compound words such as ``high-frequency''
+can be hyphenated only at the hyphen. This sometimes results
+in poor typesetting. For example:
+
+\begin{center}\begin{minipage}{2.55in}\vspace{0.6\baselineskip}
+  High-frequency radio wave, high-frequency radio wave,
+  high-frequency radio wave, high-frequency radio wave,
+  high-frequency radio wave, high-frequency radio wave.
+\vspace{0.6\baselineskip}\end{minipage}\end{center}
+
+By using a shortcut \qco{\\-/} provided by the
+``extdash'' package, hyphenation in elements of compound
+words is enabled in perfbook.\footnote{
+  In exchange for enabling the shortcut, we can't use plain
+  \LaTeX's shortcut \qco{\\-} to specify hyphenation points.
+  Use \path{pfhyphex.tex} to add such exceptions.
+}
+
+Example with \qco{\\-/}:
+
+\begin{center}\begin{minipage}{2.55in}\vspace{0.6\baselineskip}
+  High\-/frequency radio wave, high\-/frequency radio wave,
+  high\-/frequency radio wave, high\-/frequency radio wave,
+  high\-/frequency radio wave, high\-/frequency radio wave.
+\vspace{0.6\baselineskip}\end{minipage}\end{center}
+
+\subsubsection{Non Breakable Hyphen}
+\label{sec:app:styleguide:Non Breakable Hyphen}
+
+We want hyphenated compound terms such as ``x\=/coordinate'',
+``y\=/coordinate'', etc. not to be broken at the hyphen
+following a single letter.
+
+To make a hyphen unbreakable, we can use a short cut
+\qco{\\=/} also provided by the ``extdash'' package.
+
+Example without a shortcut:
+
+\begin{center}\begin{minipage}{2.55in}\vspace{0.6\baselineskip}
+x-, y-, and z-coordinates; x-, y-, and z-coordinates;
+x-, y-, and z-coordinates; x-, y-, and z-coordinates;
+x-, y-, and z-coordinates; x-, y-, and z-coordinates;
+\vspace{0.6\baselineskip}\end{minipage}\end{center}
+
+Example with \qco{\\-/}:
+
+\begin{center}\begin{minipage}{2.55in}\vspace{0.6\baselineskip}
+x-, y-, and z\-/coordinates; x-, y-, and z\-/coordinates;
+x-, y-, and z\-/coordinates; x-, y-, and z\-/coordinates;
+x-, y-, and z\-/coordinates; x-, y-, and z\-/coordinates;
+\vspace{0.6\baselineskip}\end{minipage}\end{center}
+
+Example with \qco{\\=/}:
+
+\begin{center}\begin{minipage}{2.55in}\vspace{0.6\baselineskip}
+x-, y-, and z\=/coordinates; x-, y-, and z\=/coordinates;
+x-, y-, and z\=/coordinates; x-, y-, and z\=/coordinates;
+x-, y-, and z\=/coordinates; x-, y-, and z\=/coordinates;
+\vspace{0.6\baselineskip}\end{minipage}\end{center}
+
+Note that \qco{\\=/} enables hyphenation in elements
+of compound words as the same as \qco{\\-/} does.
+
+\subsubsection{Em Dash}
+\label{sec:app:styleguide:Em Dash}
+
+Em dashes are used to indicate parenthetic expression. In perfbook,
+em dashes are placed without spaces around it. In \LaTeX\ source,
+an em dash is represented by \qco{---}.
+
+Example (quote from Section~\ref{sec:app:whymb:Cache Structure}):
+\begin{quote}
+  This disparity in speed---more than two orders of magnitude---has
+  resulted in the multi-megabyte caches found on modern CPUs.
+\end{quote}
+
+\subsubsection{En Dash}
+\label{sec:app;styleguide:En Dash}
+
+In \LaTeX\ convention, en~dashes (\==) are used for a range of (mostly)
+numbers.
+However, this is not followed in perfbook at all.
+Because of the heavy use of dashes (\=/) for such cases
+in plain-text communication, to make the \LaTeX\ sources compatible
+with them, plain dashes are kept unmodified in the sources.
+
+As a compromise, for those who are accustomed to en~dashes representing
+ranges, there is a script to substitute en~dashes for plain dashes.
+
+If you have the git repository of perfbook, by using a script
+\path{utilities/dohyphen2endash.sh}, you can do the substitutions.
+The script works only when you are in a clean git repository.
+Otherwise it will just abort to prevent you from losing local
+changes.
+
+Example with a simple dash:
+
+\begin{quote}
+  Lines~4\=/12 in
+  Figure~\ref{fig:app:styleguide:LaTeX Source of Sample Code Snippet}
+  are the contents of the verbbox environment. The box is output
+  by the \co{\\theverbbox} macro on line~16.
+\end{quote}
+
+Example with an en dash:
+
+\begin{quote}
+  Lines~4\==12 in
+  Figure~\ref{fig:app:styleguide:LaTeX Source of Sample Code Snippet}
+  are the contents of the verbbox environment. The box is output
+  by the \co{\\theverbbox} macro on line~16.
+\end{quote}
+
+\subsubsection{Numerical Minus Sign}
+\label{sec:app:styleguide:Numerical Minus Sign}
+
+Numerical minus signs should be coded as math mode minus signs,
+namely \qco{$-$}. For example,
+
+\begin{quote}
+  $-30$, rather than -30.
+\end{quote}
+
+\subsection{Improvement Candidates}
+\label{sec:app:styleguide:Improvement Candidates}
+
+There are a few areas yet to be attempted in perfbook
+which would further improve its appearance.
+This section lists up such candidates.
+
+\subsubsection{Environment for Code Snippets}
+\label{sec:app:styleguide:Environment for Code Snippets}
+
+Strictly speaking, code snippets are \emph{not} figures.
+They deserve their own floating environment.
+The ``floatrow'' package would be of help.
+
+% TODO: Add example
+
+\subsubsection{Position of Caption}
+\label{sec:app:styleguide:Position of Caption}
+
+In \LaTeX\ conventions, captions of tables should be placed
+above them. The reason is the flow of your eye movement
+when you look at them. Most tables have a row of heading at the
+top. You naturally look at the top of a table at first. Captions at
+the bottom of tables disturb this flow.
+The same can be said of code snippets, which are read from
+top to bottom.
+The floatrow package mentioned above also has the capability
+to adjust layout of caption.
+
+% TODO: Add example
+
+Once the conversion of code sippets to a new environment has
+completed, we would be able to choose one of the style options
+as the default for the environment.
+
+\subsubsection{Grouping Related Figures/Listings}
+\label{sec:app:styleguide:Grouping Related Figures/Listings}
+
+To prevent a pair of closely related figures or listings
+from being placed in different pages, it is desirable to group
+them into a single floating environment.
+The floatrow package provides the features to do so.\footnote{
+  Note that the ``subfigure'' package currently declared in the
+  preamble is not used any more.
+  The floatrow package is the choice to group floating environments
+  these days.
+  One problem of grouping figures might be the learning curve
+  to do so.}
+
+% TODO: Add example
+
+\subsubsection{Ruled Line in Table}
+\label{sec:app:styleguide:Ruled Line in Table}
+
+They say that tables drawn by using ruled lines of plain \LaTeX\
+look ugly.\footnote{
+  \url{https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf}
+}
+Vertical lines should be avoided and horizontal lines should be
+used sparingly, especially in tables of simple structure.
+
+% TODO: Add example
+
+\subsubsection{Miscellaneous Candidates}
+\label{sec:app:styleguide:Miscellaneous Candidates}
+
+Other improvement candidates are listed in the source of this
+section as comments.
+
+% Capitalize initialism:
+%    Gnu Compiler Collection = GCC
+%    gcc should be used as a command name in \co{gcc}
+%    When mentioning GCC's C language, use `GNU C'
+%
+% Trademarks:
+%    As the Legal page covers trademarks, there is no need to
+%    use trademark symbol in the text. They seems to have been
+%    imported from original publications.
+%
+% Power or POWER?
+%    IBM's trademark page at https://www.ibm.com/legal/us/en/copytrade.shtml#section-P
+%    lists the following.
+%        PowerPC
+%        Power Architecture
+%        Power
+%        POWER
+%        POWER5
+%        POWER6
+%
+%    not Power5, POWER 5, nor Power-5
+%
+% Ugly line break by \co{}
+%                                 __
+%        atomic_store()
+%
+%                           seqlock_
+%        t
+%
+%   Is there any way to prevent these breaks?
+%   Maybe we need an on-the-fly script to convert such \co{}s
+%   to couples of \co{}s.
+%   Example:
+%     \co{__atomic_store()} -> \co{__}\co{atomic_store()}
+%     \co{seqlock_t} ->        \co{seqlock_}\co{t}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 02/10] Specify required revision of 'verbatimbox'
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
  2017-07-28  9:55 ` [PATCH 01/10] appendix: " Akira Yokosawa
@ 2017-07-28  9:57 ` Akira Yokosawa
  2017-07-28  9:58 ` [PATCH 03/10] Localize floatrow.sty Akira Yokosawa
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28  9:57 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From a77121a7bba9c9df9c6cc92acea88e31b3f5f594 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Wed, 19 Jul 2017 20:02:32 +0900
Subject: [PATCH 02/10] Specify required revision of 'verbatimbox'

The command "verbfilebox" requires "verbatimbox 2014/01/30 v3.11"
which is available in TeX Live 2013/Debian.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 perfbook.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/perfbook.tex b/perfbook.tex
index ad24285..cda014c 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -36,7 +36,7 @@
 % \usepackage{underscore}
 \usepackage{pifont} % special character for qqz reference point
 \usepackage{gensymb} % symbols for both text and math modes such as \degree and \micro
-\usepackage{verbatimbox} % for centering verbatim listing in figure environment
+\usepackage{verbatimbox}[2014/01/30] % for centering verbatim listing in figure environment
 \usepackage[bottom]{footmisc} % place footnotes under floating figures/tables
 \usepackage{tabulary}
 \usepackage[hyphens]{url}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 03/10] Localize floatrow.sty
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
  2017-07-28  9:55 ` [PATCH 01/10] appendix: " Akira Yokosawa
  2017-07-28  9:57 ` [PATCH 02/10] Specify required revision of 'verbatimbox' Akira Yokosawa
@ 2017-07-28  9:58 ` Akira Yokosawa
  2017-07-31  3:26   ` Paul E. McKenney
  2017-07-28 10:00 ` [PATCH 04/10] Apply workaround to floatrow.sty and rename it floatrowpf.sty Akira Yokosawa
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28  9:58 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 53ff86011be07a62dba37a5bef56f04f25531dd1 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 20 Jul 2017 23:34:58 +0900
Subject: [PATCH 03/10] Localize floatrow.sty

The "floatrow" package conflicts with two-column layout.
A possible workaround was posted at [1] and it seems to work
in perfbook. Before the change, import the style file as of v0.3b
with trailing white spaces removed.

[1] https://tex.stackexchange.com/questions/133127/

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 floatrow.sty | 1472 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 1472 insertions(+)
 create mode 100644 floatrow.sty

diff --git a/floatrow.sty b/floatrow.sty
new file mode 100644
index 0000000..18ef28a
--- /dev/null
+++ b/floatrow.sty
@@ -0,0 +1,1472 @@
+%%
+%% This is file `floatrow.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% floatrow.dtx  (with options: `floatrow,floatsetup')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from floatrow.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file floatrow.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+\ProvidesPackage{floatrow}
+       [2008/08/02 v0.3b floatrow: float package extension]
+\@ifundefined{float@caption}{%
+  \@ifundefined{rotfloat@float}{}%
+    {\PackageError{floatrow}{Do not use rotfloat package with floatrow.\MessageBreak
+        The latter will be skipped}{}%
+  \@namedef{opt@floatrow.sty}{}\endinput}}%
+  {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak
+        The latter will be skipped}{}%
+  \@namedef{opt@floatrow.sty}{}\endinput}
+\@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)}
+\RequirePackage{keyval}
+\RequirePackage{caption3}
+\@ifpackagelater{caption3}{2007/04/11 v3.0q}{}{\PackageError
+    {floatrow}{For a successful cooperation we need at least\MessageBreak
+    version `2007/04/11 v3.0q' of package caption,\MessageBreak
+        but only version\MessageBreak
+          `\csname ver@caption.\@pkgextension\endcsname'\MessageBreak
+        is available}\@eha\endinput}
+\providecommand*\caption@fnum[1]{%
+   \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}}
+\@ifdefinable\FR@flboxreset{\let\FR@flboxreset\@floatboxreset}
+\@ifdefinable\FR@makecaption{\let\FR@makecaption\@makecaption}
+\newcommand\flrow@caption{%
+   \ifx\@captype\@undefined
+     \@latex@error{\noexpand\caption outside float}\@ehd
+     \expandafter\@gobble
+   \else
+     \refstepcounter\@captype
+     \expandafter\@firstofone
+   \fi
+   {\@dblarg{\@caption\@captype}}%
+}
+\@ifdefinable\float@caption{\let\float@caption\@caption}
+\newcounter{float@type}
+\@ifundefined{c@figure}%
+  {\setcounter{float@type}{1}}%
+  {\setcounter{float@type}{4}}
+\newcommand\flrow@package{floatrow}
+\newcommand*\flrow@error[1]{\PackageError\flrow@package{#1}\flrow@eh}
+\newcommand*\flrow@eh{%
+  If you do not understand this error, please take look\MessageBreak
+  at `floatrow' and `caption' package documentations.\MessageBreak
+  \@ehc}
+\newcommand\floatstyle[1]{\@ifundefined{flrow@sty@#1}%
+  {\flrow@error{Unknown float style `#1'}}{\edef\float@style{#1}}}
+\newcommand\floatname[2]{\@namedef{#1name}{#2}}
+\newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}}
+\newif\if@@FS
+\newcommand\FR@redefs{%
+  \@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}
+\newcommand\flrow@makecaption[2]{\ifnum\floatbox@depth=\z@
+    \ifvoid\@floatcapt
+      \else\flrow@error{Caption(s) lost}\fi\fi
+  \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
+   \linewidth\hsize
+   \ifdim\hsize<70mm\sloppy\fi
+   \normalsize
+   \abovecaptionskip\z@\belowcaptionskip\z@
+   \FR@makecaption{#1}{#2}\egroup}
+\newcommand\killfloatstyle{\FBbuildtrue\if@@FS\hsize\FB@wd\fi\@@FSfalse}
+\newcommand\flrow@capsetup{}
+\edef\float@style{plain}
+\@ifdefinable\FBB@wd{\let\FBB@wd\relax}
+\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}}
+\newcommand\flrow@restyle[1]{%
+  \@namedef{#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
+    \flrow@setlist{{#1}}%
+    \textwidth\columnwidth\edef\FBB@wd{\the\columnwidth}%
+    \FRifFBOX\@@setframe\relax\@@FStrue\@float{#1}}%
+  \@namedef{#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
+    \flrow@setlist{{#1}{widefloat}{wide#1}}%
+    \FRifFBOX\@@setframe\relax\@@FStrue\edef\FBB@wd{\the\textwidth}%
+    \let\@xdblfloat\@xfloat\relax
+    \FR@ifdoubleaswide
+     {\if@twocolumn\else\let\@dblfloat\@float\fi}\relax
+    \@dblfloat{#1}}%
+  \expandafter\let\csname end#1\endcsname\float@end
+  \expandafter\let\csname end#1*\endcsname\float@dblend
+ \@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\relax\@@FStrue
+    \let\rotfloat@@makebox\float@makebox
+    \let\float@makebox\rotfloat@makebox
+    \@float{#1}}%
+  \@namedef{endsideways#1}{\FBbuildtrue\float@end}
+  \ifx\@rotdblfloat\undefined
+   \@namedef{sideways#1*}{%
+     \flrow@error{%
+      You need rotating version 2.10 or newer to do this}%
+     \@nameuse{sideways#1}}%
+  \else
+   \@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\relax\@@FStrue
+     \let\@xdblfloat\@xfloat
+     \let\rotfloat@@makebox\float@makebox
+     \let\float@makebox\rotdblfloat@makebox
+     \@dblfloat{#1}}%
+  \fi
+  \@namedef{endsideways#1*}{\FBbuildtrue\float@dblend}}
+ \@ifundefined{wrapfloat}{}{%
+   \@ifundefined{flrow@WF@rapt}{\let\flrow@WF@rapt\WF@rapt
+   \def\WF@rapt[##1]##2{\FRifFBOX\@@setframe\relax\@@FStrue
+     \dimen@##2\relax
+     \ifdim\dimen@>\z@
+       \edef\FBB@wd{\the\dimen@}\FB@fs@wd\dimen@\FBo@wd
+     \fi
+     \flrow@WF@rapt[##1]{\dimen@}%
+       \the\FR@everyfloat\ignorespaces}%
+   }{}%
+   \@namedef{wrap#1}{\killfloatstyle\def\@captype{#1}%
+     \FR@redefs\FBc@wd\z@
+     \flrow@setlist{{#1}{wrapfloat}{wrap#1}}%
+     \def\WF@floatstyhook{\let\@currbox\WF@box
+       \ifFBbuild
+         \global\setbox\WF@box\flrow@FB{\wd\WF@box}%
+       \else
+         \global\let\flrow@typ@tmpset\undefined
+         \global\let\WF@box\@currbox
+       \fi}%
+     \@ifnextchar[\WF@wr{\WF@wr[]}}%]
+   \@namedef{endwrap#1}{\endwrapfloat
+     \@ifundefined{FloatHBarrier}{}\FloatHBarrier
+     }}
+ \@ifundefined{sf@@@subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}}
+\newcommand\RawFloats{\@ifnextchar[%]
+    \flrow@rawfloatschk\flrow@rawfloats}
+\newcommand\flrow@rawfloats{\killfloatstyle\@parboxrestore
+    \let\@makecaption\FR@makecaption
+    \expandafter\ifx\csname end\@captype\endcsname\float@endH
+        \global\FBbuildfalse
+    \else
+        \@namedef{end\@captype}{\end@float}%
+    \fi
+    \expandafter\ifx\csname end\@captype*\endcsname\float@endH
+        \global\FBbuildfalse
+    \else
+        \@namedef{end\@captype*}{\end@dblfloat}%
+    \fi
+  \@ifundefined{@rotfloat}{}{%
+    \@namedef{endsideways\@captype}{\end@rotfloat}%
+    \@namedef{endsideways\@captype*}{\end@rotdblfloat}%
+  }%
+  \@ifundefined{wrapfloat}{}{%
+    \@namedef{endwrap\@captype}{\endwrapfloat}%
+  }}
+\@ifdefinable\flrow@rawfloatschk{}
+\def\flrow@rawfloatschk[#1]{\@ifnextchar[%]
+    {\flrow@RawFloats[#1]}{\flrow@@RawFloats#1,;}}
+\@ifdefinable\flrow@RawFloats{}
+\newcommand\flrow@raw@set{\AtBeginDocument}
+\AtBeginDocument{\let\flrow@raw@set\@firstofone}
+\def\flrow@RawFloats[#1][#2]{\flrow@RawFloats@[#1]#2,;}
+\def\flrow@RawFloats@[#1]#2,{%
+  \caption@ifinlist{#2}{float}{\flrow@raw@set
+        {\@namedef{#1}{\@float{#1}}}%
+  }{\caption@ifinlist{#2}{widefloat}{\flrow@raw@set%
+        {\@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}}%
+  }{\caption@ifinlist{#2}{rotfloat}{%
+    \@ifundefined{@rotfloat}{}{\flrow@raw@set
+        {\@namedef{sideways#1}{\@rotfloat{#1}}}}%
+  }{\caption@ifinlist{#2}{widerotfloat}{%
+    \@ifundefined{@rotfloat}{}{\flrow@raw@set
+        {\@namedef{sideways#1*}{\@rotdblfloat{#1}}}}%
+  }{\caption@ifinlist{#2}{wrapfloat}{%
+    \@ifundefined{wrapfloat}{}{\flrow@raw@set
+        {\@namedef{wrap#1}{\wrapfloat{#1}}}}}%
+  }{\caption@ifinlist{#2}{all,allfloats}{%
+    \flrow@@RawFloats{#1}%
+  }{\flrow@error{Undefined float subtype `#2'}%
+  }}}}}\@ifnextchar;\@gobble{\flrow@RawFloats@[#1]}}
+\@ifdefinable\flrow@@RawFloats{}
+\def\flrow@@RawFloats#1,{%
+ \flrow@raw@set{\@namedef{#1}{\@float{#1}}%
+    \@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}%
+  \@ifundefined{@rotfloat}{}{%
+    \@namedef{sideways#1}{\@rotfloat{#1}}%
+    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
+  }%
+  \@ifundefined{wrapfloat}{}{%
+    \@namedef{wrap#1}{\wrapfloat{#1}}}%
+  }\@ifnextchar;\@gobble\flrow@@RawFloats
+}
+\newcommand\flrow@Raw@restyle[1]{%
+    \@namedef{#1}{\@float{#1}}%
+    \@namedef{#1*}{\@dblfloat{#1}}%
+    \@namedef{end#1}{\end@float}%
+    \@namedef{end#1*}{\end@dblfloat}%
+  \@ifundefined{@rotfloat}{}{%
+    \@namedef{sideways#1}{\@rotfloat{#1}}%
+    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
+    \@namedef{endsideways#1}{\end@rotfloat}%
+    \@namedef{endsideways#1*}{\end@rotdblfloat}%
+  }%
+  \@ifundefined{wrapfloat}{}{%
+    \@namedef{wrap#1}{\wrapfloat{#1}}%
+    \@namedef{endwrap#1}{\endwrapfloat}%
+  }%
+ }
+\newcommand\RawCaption[1]{{\let\@makecaption\FR@makecaption #1}}
+\@ifdefinable\float@exts{\newtoks\float@exts}
+\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}}
+\let\@float@Hx\@xfloat
+\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}}
+\AtBeginDocument{%
+  \@ifundefined{latex@xfloat}{}{%
+    \let\floatrow@ORI@xfloat\@xfloat
+    \def\@xfloat#1[#2]{%
+      \floatrow@ORI@xfloat{#1}[#2]%
+      \floatfont}}}%
+\newsavebox\float@box
+\def\@float@HH#1[H]{%
+  \@ifundefined{FloatHBarrier}{}\FloatHBarrier
+  \expandafter\let\csname end#1\endcsname\float@endH
+  \FR@ifdoubleaswide
+   {\expandafter\let\csname end#1*\endcsname\float@endH}\relax
+  \let\@currbox\float@box
+  \flrow@setlist*{{floatH}{#1H}}%
+  \def\@captype{#1}%\setbox\@floatcapt=\vbox{}%
+  \setbox\@currbox\color@vbox\normalcolor
+    \vbox\bgroup
+      \hsize\columnwidth
+      \linewidth\columnwidth
+      \@parboxrestore\leftmargin\z@\rightmargin\z@
+      \@floatboxreset \@setnobreak
+  \ignorespaces}
+\newcommand\flrow@flboxreset{\FR@flboxreset
+  \@ifundefined{capstart}{}{\capstart}%
+  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
+  \if@tempswa\FB@readaux{\relax}\fi
+  \global\let\FBcheight\relax\global\let\FBoheight\relax
+  \global\let\FBfheight\relax
+  \FBifcapbeside\FC@fs@wd\FB@fs@wd
+  \the\FR@everyfloat}
+\@ifdefinable\FBcheight{\let\FBcheight\relax}
+\@ifdefinable\FBoheight{\let\FBoheight\relax}
+\@ifdefinable\FBfheight{\let\FBfheight\relax}
+\newcommand\FB@fs@wd{\@tempdima\FBB@wd
+  \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\linewidth\hsize
+  \FBifcaptop
+    {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
+    {\columnwidth\FBc@wd}%
+  }
+\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
+  \FC@ifc@wd\@tempswatrue\@tempswafalse
+  \if@tempswa
+     \ifx\FCwidth\relax
+        \flrow@error{You didn't define width of caption\MessageBreak
+          for plain floating environment.}%
+     \else
+        \global\FBc@wd=\FCwidth
+        \FC@ifo@fil{\advance\@tempdima-\FBc@wd}\relax
+     \fi
+  \else
+    \global\FBc@wd\@tempdima
+  \fi
+  \FC@ifo@fil\relax{\@tempdima.5\@tempdima
+    \flrow@setwd\FB@wd\@tempdima}%
+  \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}%
+  \FC@ifc@wd\relax{\global\advance\FBc@wd-\FB@wd}%
+  \hsize\FBo@wd\linewidth\hsize\columnwidth\FBc@wd\linewidth\hsize
+  \FCset@vpos}
+\newcommand\float@makebox[1]{%
+  \FBifcapbeside{\flrow@FC{#1}}{\flrow@FB{#1}}}
+\newcommand\FBaskip{\z@}\newcommand\FBbskip{\z@}
+\newif\ifFBbuild\FBbuildtrue
+\newcommand\flrow@FB[1]{\vbox{\@tempdima=#1\vskip\FBaskip
+  \@parboxrestore\leftmargin\z@\rightmargin\z@
+  \hbox to\@tempdima{\def\FB@zskip{\vskip\z@}%
+  \FBleftmargin\flrow@FB@\FBrightmargin}%
+  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
+  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}%
+  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
+\newcommand\flrow@FC[1]{\vbox{\@tempdima=#1\@parboxrestore
+  \leftmargin\z@\rightmargin\z@\flrow@FClist\vskip\FBaskip
+  \hbox to\@tempdima{\FCleftmargin\flrow@FC@\FCrightmargin}%
+  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
+  \nocapbeside\global\let\FCwidth\relax
+  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
+\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}
+\newcommand\FBafil{\vfill}\newcommand\FBbfil{\vfill}
+\newcommand\FBw@box[1]{\hsize#1\columnwidth#1\linewidth#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}
+\newcommand\flrow@FB@{\global\let\flrow@typ@tmpset\undefined
+ \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\leftmargin\z@\rightmargin\z@
+  \@@FBabove
+  \FBifcaptop\@tempswatrue\@tempswafalse
+  \if@tempswa
+    \ifvoid\@floatcapt\else
+      \FB@vbox\FBc@wd\FBcheight{\FBifCAPTOP\relax\vfill
+        \unvbox\@floatcapt
+        \ifnum\FPOScnt=\@ne\vbox{\FB@foot}\fi\vfil}%
+      \@@FBskip\hrule\@height\z@\@depth\z@
+    \fi
+    \vtop{\vskip\z@\FBo@frame{\FB@vtop\FBo@wd\FBoheight
+      {\FBafil\unvbox\@currbox\FBbfil
+      \vskip\z@
+      \ifnum\FPOScnt=\z@
+        \FB@vtop\FBo@wd\FBfheight{\FB@foot\vfil}\fi}}\par
+      \vskip\z@
+      \ifnum\FPOScnt=\tw@\vskip\z@
+        \FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi}%
+  \else\ifnum\FPOScnt=\z@\FPOScnt=\@ne\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=\@ne\vtop{\FB@foot}%
+    \fi\par
+        \vfill\vskip\z@\vss
+        \ifnum\FPOScnt=2\FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi
+        }\fi
+  \fi\@@FBbelow\FB@zskip\end@FBBOX
+  \global\setbox\@floatcapt\box\voidb@x}}
+\newcommand\flrow@FC@{\global\let\flrow@typ@tmpset\undefined
+ \FB@frame{\begin@FBBOX
+   \adj@dim\FBo@wd+\FBo@wadj=\hsize
+   \settowidth\@tempdimb{\floatcapbesidesep}\advance\hsize\@tempdimb
+   \advance\hsize\FBc@wd\@parboxrestore\leftmargin\z@\rightmargin\z@
+   \@@FBabove
+    \hbox{\floatfacing*%
+      {\ifvoid\@floatcapt\else
+         \FCc@box{\FBw@box\FBc@wd\unvbox\@floatcapt\FB@foot}%
+         \floatcapbesidesep\fi
+       \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
+    \global\setbox\@floatcapt\box\voidb@x}}
+\newcommand\FB@foot{\let\FR@ifFOOT\@firstoftwo\FB@putfoots\@@par\FB@putfnotes}
+\newcommand\FB@zskip{}
+\newcommand\float@end{\ifFBbuild\@endfloatbox
+    \global\setbox\@currbox\float@makebox\columnwidth
+    \let\@endfloatbox\relax\fi
+  \end@float}
+\newcommand\floatHpenalties{}
+\newcommand\float@endH{\@endfloatbox\par
+  \FR@iffloatHaslist
+   {\floatHpenalties\relax
+    \addpenalty\@beginparpenalty}\relax
+  \vskip\intextsep
+  \ifFBbuild\setbox\@currbox\float@makebox\columnwidth\fi
+  \box\@currbox\par
+  \FR@iffloatHaslist
+   {\addpenalty\@endparpenalty\@endpetrue}\relax
+  \vskip\intextsep\relax}
+\newcommand\float@dblend{\ifFBbuild\@endfloatbox
+    \global\setbox\@currbox\float@makebox\textwidth
+    \let\@endfloatbox\relax\fi
+  \end@dblfloat}
+\newsavebox\@floatcapt
+\newcommand*{\listof}[2]{%
+  \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
+    \expandafter\providecommand\csname l@#1\endcsname
+        {\@dottedtocline{1}{1.5em}{2.3em}}%
+    \float@listhead{#2}%
+    \begingroup\setlength{\parskip}{\z@}%
+      \@starttoc{\@nameuse{ext@#1}}%
+    \endgroup}}
+\providecommand*{\float@listhead}[1]{%
+  \@ifundefined{chapter}{\def\@tempa{\section*}}%
+    {\def\@tempa{\chapter*}}%
+  \@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}%
+\newcommand\float@addtolists[1]{%
+  \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}
+\PackageInfo{floatrow}{Modified float package code loaded}
+\IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse}
+\if@tempswa
+  \let\rotfloat@HH\@float@HH
+  \def\@float@HH#1{%
+    \expandafter\let\csname endsideways#1\endcsname\float@endH
+    \let\end@float\relax
+    \rotfloat@HH{#1}}
+  \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}}
+\PackageInfo{floatrow}{Modified rotfloat package code loaded}
+\fi
+\@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat}
+\FR@everyfloat={\let\@footnotetext\@mpfootnotetext
+  \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
+  \floatobjectset\floatfont}
+\@ifdefinable\FR@ifFOOT{\let\FR@ifFOOT\@secondoftwo}
+\newcommand\FB@putfnotes{%
+  \ifvoid\@mpfootins\else\FR@ifFOOT
+    {\vskip\floatfootskip\normalcolor\FBfootnoterule
+    \unvbox\@mpfootins\@@par}\relax
+  \fi}
+\@ifdefinable\flrow@foot{\newinsert\flrow@foot}
+\newcommand\FB@putfoots{%
+  \ifvoid\flrow@foot\else\FR@ifFOOT
+    {\vskip\floatfootskip\normalcolor
+    \unvbox\flrow@foot\@@par}\relax
+  \fi}
+\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}}{}}
+\captionsetup[floatfoot]{labelformat=empty,labelsep=none}
+\newcommand\floatfoot{\@ifstar
+    {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}%
+    {\def\FR@tmp{\captionfootfont}\floatfoot@}}
+\newcommand\floatfoot@[1]{%
+  \global\setbox\flrow@foot\vbox{%
+  \floatfoot@box{#1}}}%
+\newcommand\floatfoot@box[1]{%
+  \@ifundefined{@captype}{\def\@captype{floatfoot}}{}%
+    \if@@FS\hsize\columnwidth\linewidth\columnwidth\fi
+    \@parboxrestore\reset@font\color@begingroup
+  \caption@setoptions{\@captype}%
+  \caption@setoptions{floatfoot}%
+     \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
+  \color@endgroup}
+\newcommand\newfloatcommand[2]{%
+  \@ifundefined{#1}{}%
+    {\flrow@error{\string#1 already defined}}%
+  \@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
+  \def\FB@tmpset{#3}\def\@captype{#2}%
+  \@ifnextchar[{\@floatbox}{\@floatbox[#4]}}}
+\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
+\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
+\newfloatcommand{fcapside}{figure}[\capbeside][]
+\@ifdefinable\FB@wd {\newdimen\FB@wd}
+\@ifdefinable\FBo@wd{\newdimen\FBo@wd}
+\@ifdefinable\FBc@wd{\newdimen\FBc@wd}
+\newlength\FBo@ht
+\newlength\FBc@ht
+\newlength\FBf@ht
+\newlength\FBo@max
+\newlength\FBc@max
+\newlength\FBf@max
+\newcommand\FR@loc@addcnt[2]{%
+  \@ifundefined{c@#1}{\@nocounterr{#1}}%
+    {\advance\csname c@#1\endcsname #2\relax}}
+\newcommand\FR@loc@refcnt[1]{%
+  \@ifundefined{c@#1}{\@nocounterr{#1}}%
+   {\advance\csname c@#1\endcsname1\relax}}
+\newcommand\FR@loc@{%
+  \let\FR@ifunloc\@gobble
+  \let\label\@gobble
+  \let\refstepcounter\FR@loc@refcnt
+  \let\stepcounter\FR@loc@refcnt
+  \let\refsteponlycounter\FR@loc@refcnt
+  \let\FR@ifcountH\@secondoftwo
+  \let\cl@@ckpt\empty\let\addtocounter\FR@loc@addcnt
+  \let\caption@kernel@addcontentsline\@gobbletwo
+  \let\caption@addcontentsline\@gobbletwo
+  \def\sf@updatecaptionlist##1##2##3##4{}}
+\def\FBtmp@cap#1[#2]#3{\sbox\@tempboxa{\captionlabel{#3}}%
+  \global\@tempdimb\wd\@tempboxa}
+\newcommand\captionlabel[1]{{\def\FR@tmp{\@captype}\ifnum\floatbox@depth>\@ne
+       \def\FR@tmp{sub\@captype}\caption@setsubtype*{\FR@tmp}\stepcounter{\FR@tmp}\fi
+   \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
+\newcommand\subcaptionlabel[1]{{\floatbox@depth\tw@\captionlabel{#1}}}
+\newcommand\FBget@box[3]{%
+  \FBiffloatrow\relax
+    {\ifx\FBB@wd\relax
+      \ifdim\hsize=\z@
+        \@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}%
+  \adj@dim\hsize-\FB@wadj=\@tempdima
+  \FBifcapbeside
+    {\FCget@@wd{#1}{#3}}%
+    {\nofilFCOhsize
+    \FBiffloatrow\relax
+      {\settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
+      \advance\@tempdima-\@tempdimb}}%
+  \FC@ifo@fil{\@tempdima\FB@wd}{\FB@wd\@tempdima}%
+  \adj@dim\@tempdima-\FBo@wadj=\FBo@wd
+  \FBiffloatrow\relax{\hsize\FBo@wd}%
+  \FBifcapbeside{\hsize\FB@wd}\relax
+  \linewidth\hsize
+  \def\reserved@a{#1}\ifx\reserved@a\empty
+    \else\FBget@@wd{#1}{#3}\fi
+  \hsize\FBo@wd\linewidth\hsize
+  \FBifcapbeside
+    {\FC@ifc@wd\relax{\advance\FBc@wd-\FB@wd}}%
+    {\FBc@wd\FB@wd}%
+  \setbox\z@\vbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@\hsize\FBo@wd\linewidth\hsize
+    \FBifcaptop
+      {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
+      {\columnwidth\FBc@wd}%
+    #3}%
+  \FBc@ht\ht\@floatcapt\advance\FBc@ht\dp\@floatcapt
+  \FBo@ht\ht\z@\advance\FBo@ht\dp\z@\let\FBheight\FBo@ht
+  \setbox\tw@\vbox{\null\par\FB@foot\par}%
+  \FBf@ht\ht\tw@\advance\FBf@ht\dp\tw@
+  \FBiffloatrow
+    {\ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
+    \ifCADJ
+      \FBifcaptop
+        {\ifnum\FPOScnt=\@ne\global\advance\FBc@ht\FBf@ht\fi}%
+        {\ifnum\FPOScnt=\tw@
+          \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}%
+      \ifdim\FBc@ht>\FBc@max\global\FBc@max\FBc@ht\fi
+      \gdef\FBcheight{\FBc@ht}\gdef\FBfheight{\FBf@ht}%
+    \fi}\relax
+  \def\reserved@a{#2}\ifx\reserved@a\empty
+    \FBiffloatrow{\ifOADJ
+      \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
+      \FBifcaptop
+        {\ifnum\FPOScnt=\z@
+          \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
+        \fi}\relax
+      \gdef\FBoheight{\FBo@ht}\gdef\FBfheight{\FBf@ht}%
+    \fi}\relax
+  \else
+     \FBget@@ht{#2}{#3}%
+  \fi}
+\newcommand\FCget@@wd[2]{\flrow@FClist
+  \FBiffloatrow\relax
+    {\settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
+    \advance\@tempdima-\@tempdimb\advance\hsize-\@tempdimb}%
+  \settowidth\@tempdimb{\floatcapbesidesep}\advance\@tempdima-\@tempdimb
+  \FC@ifo@fil{\FB@wd\@tempdima}\relax
+  \FC@ifc@wd\@tempswatrue\@tempswafalse
+  \if@tempswa
+    \ifx\FCwidth\relax
+      \setbox\@ne\vbox{\FR@loc@
+        \let\caption\flrow@caption
+        \let\@caption\FBtmp@cap
+         #2}%
+      \FBc@wd=\@tempdimb
+    \else
+      \FBc@wd=\FCwidth
+    \fi\FC@ifo@fil{\advance\FB@wd-\FBc@wd}\relax
+  \else
+    \FBc@wd\@tempdima
+  \fi
+  \@tempdima.5\@tempdima}
+\newcommand\flrow@gobble@[2][]{\unskip\ignorespaces}
+\newcommand\flrow@gobble{%
+    \let\caption\flrow@gobble@
+    \let\floatfoot\flrow@gobble@
+    \let\footnote\flrow@gobble@
+    \let\footnotetext\flrow@gobble@
+    }
+\newcommand\FBget@@wd[2]{\@tempswafalse
+  \begingroup
+    \@tempdima-3000pt\let\FBwidth\@tempdima
+    \setlength\dimen@{#1}\ifdim\dimen@<\z@\global\@tempswatrue\fi
+  \endgroup
+  \if@tempswa
+    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
+    \FBo@wd\wd\z@\let\FBwidth\FBo@wd
+    \setlength\FBo@wd{#1}%
+    \advance\FBo@wd\leftskip\advance\FBo@wd\rightskip
+    \adj@dim\FBo@wd+\FBo@wadj=\FB@wd
+    \setbox\flrow@foot\box\voidb@x
+    \setbox\@mpfootins\box\voidb@x
+  \else
+    \setlength\FB@wd{#1}%
+    \adj@dim\FB@wd-\FB@wadj=\FB@wd
+    \adj@dim\FB@wd-\FBo@wadj=\FBo@wd
+    \let\FBwidth\FBo@wd
+  \fi}
+\newcommand\FBget@@ht[2]{\@tempswafalse
+  \begingroup
+    \@tempdimb-3000pt\let\FBheight\@tempdimb
+    \setlength\dimen@{#1}\ifdim\dimen@<\z@
+      \global\@tempswatrue\fi
+  \endgroup
+  \if@tempswa
+    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
+    \FBo@ht\ht\z@\advance\FBo@ht\dp\z@
+    \let\FBheight\FBo@ht\setlength\FBo@ht{#1}%
+    \adj@dim\FBo@ht+\FBo@hadj=\FBo@ht
+    \FBifcaptop{\ifnum\FPOScnt=\z@\advance\FBo@ht\FBf@ht\fi}\relax
+  \else
+    \setlength\FBo@ht{#1}%
+    \adj@dim\FBo@ht-\FBo@hadj=\FBo@ht
+    \adj@dim\FBo@ht-\FB@hadj=\FBo@ht
+    \setbox\z@\vbox{\offinterlineskip\vbox{\@@FBabove}%
+      \FBifcapbeside\relax{\@@FBskip\hrule\@height\z@\@depth\z@}%
+      \vtop{\@@FBbelow}}%
+    \global\advance\FBo@ht-\ht\z@\global\advance\FBo@ht-\dp\z@
+    \FBifcapbeside\relax\FBget@@@ht
+  \fi
+  \FBiffloatrow{\ifOADJ
+    \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
+  \fi}\relax
+  \def\FBoheight{\FBo@ht}}
+\newcommand\FBget@@@ht{%
+    \ifdim\FBc@ht>\FBc@max
+      \global\advance\FBo@ht-\FBc@ht
+    \else
+      \global\advance\FBo@ht-\FBc@max
+    \fi
+    \FBifcaptop{\ifnum\FPOScnt=\@ne\else
+      \ifdim\FBf@ht>\FBf@max
+        \global\advance\FBo@ht-\FBf@ht
+      \else
+        \global\advance\FBo@ht-\FBf@max
+      \fi
+    \fi}\relax
+  }
+\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}}}
+\newcounter{FBl@b}
+\@ifdefinable\FR@ifFCBOX{\let\FR@ifFCBOX\@secondoftwo}
+\newcommand\FBs@raise{\raisebox{-\totalheight}}
+\newcommand\FBf@raise{}
+\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}%
+    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{-\height}}}%
+     {\gdef\FBf@raise{}}%
+    \gdef\FBs@raise{\raisebox{-\totalheight}}%
+  \or\gdef\FC@bbox{\vbox\@parboxto\bgroup}\gdef\FC@ebox{\vskip\z@\egroup}%
+    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{\depth}}}%
+     {\gdef\FBf@raise{}}%
+    \gdef\FBs@raise{}\fi}
+\@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}
+\newcommand\floatbox[2][]{\begingroup
+  \def\FB@tmpset{#1}\def\@captype{#2}%
+  \@ifnextchar[{\@floatbox}{\@floatbox[]}}
+\@ifdefinable\@floatbox{}\@ifdefinable\@@floatbox{}
+\def\@floatbox[#1]{%
+  \@ifnextchar[{\@@floatbox[#1]}{\@@floatbox[#1][]}}
+\@ifdefinable\floatbox@depth{\newcount\floatbox@depth}
+\def\@@floatbox[#1][#2]{%
+  \@ifnextchar[{\@@@floatbox[#1][#2]}{\@@@floatbox[#1][#2][]}}%]
+\@ifdefinable\@@@floatbox{}
+\long\def\@@@floatbox[#1][#2][#3]#4#5{\advance\floatbox@depth\@ne
+  \@FB@vpos{#3}%
+  \if@@FS\else\FR@redefs
+    \ifcase\floatbox@depth\or
+      \flrow@setlist{{\@captype}}\or
+      \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
+    \fi
+    \FRifFBOX\@@setframe\relax\@@FStrue
+  \fi
+  \FB@tmpset
+  \FBifcapbeside\flrow@FClist\relax
+  \@parboxrestore\leftmargin\z@\rightmargin\z@
+  \floatobjectset\floatfont
+  \FBget@box{#1}{#2}{#4#5}%
+  \FBifcapbeside\FCset@vpos\relax
+  \FBiffloatrow{\FR@floatbox{\@ifundefined{capstart}{}{\capstart}#4#5}}%
+   {\adj@dim\FB@wd+\FB@wadj=\hsize\linewidth\hsize
+    \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi
+    \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}\let\FBB@wd\relax
+    #4#5}\FBbuildtrue
+    \FBifcapbeside{\flrow@FC\FBB@wd}{\flrow@FB\FBB@wd}%
+    \global\FBbuildfalse
+    \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
+   }\advance\floatbox@depth\m@ne
+  \endgroup\ignorespaces}
+\newcommand\FR@floatbox[1]{\@tempswafalse
+    \ifOADJ\@tempswatrue\fi\ifCADJ\@tempswatrue\fi
+    \if@tempswa\@ifundefined{FB@@boxmax}{}{\FB@@boxmax}\fi
+    \FBsetbox@obj{#1}\begin@FBBOX
+      \FBifcapbeside\flrow@FC@\flrow@FB@
+    \end@FBBOX
+    \addtocounter{FRobj}\m@ne
+    \@tempswafalse\FR@iffacing\@tempswatrue\relax
+    \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
+    \advance\Xhsize-\FB@wd
+    \FBifcapbeside
+      {\advance\Xhsize-\FBc@wd
+       \FR@ifcountH{\global\advance\Zhsize-\FBc@wd}\relax
+       \settowidth\@tempdimb{\floatcapbesidesep}%
+       \advance\Xhsize-\@tempdimb
+       \FR@ifcountH{\global\advance\Zhsize-\@tempdimb}\relax}\relax
+    \ifnum\c@FRobj=\z@
+      \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
+      \floatrowsep
+      \adj@dim\Xhsize-\FB@wadj={\global\Xhsize}%
+      \adj@dim\Zhsize-\FB@wadj={\global\Zhsize}%
+    \fi}
+\newcommand\FBsetbox@obj[1]{%
+  \setbox\float@box\color@vbox\normalcolor
+  \FBifcaptop
+     {\FB@vtop\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
+      \ifnum\FPOScnt=\z@\columnwidth\FBo@wd\else\columnwidth\FBc@wd\fi}%
+     {\FB@vbox\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
+      \columnwidth\FBc@wd}%
+  #1\FBbfil\egroup\color@endbox
+  \let\@currbox\float@box}
+\@ifdefinable\FBiffloatrow{\let\FBiffloatrow\@secondoftwo}
+\newcounter{FRobj}
+\newcounter{FRsobj}
+\newlength\Xhsize
+\newlength\sXhsize
+\newlength\Zhsize
+\newlength\sZhsize
+\newcommand\flrow@to{to\hsize}
+\newcommand\flrow@boxset[1]{#1}
+\newcommand\flrow@setrowhbox{%
+\FR@ifROWFILL{\def\flrow@left{\hskip\leftskip}\def\flrow@right{\hskip\rightskip}%
+  }{\let\flrow@to\empty\def\flrow@left{}\def\flrow@right{}}%
+}
+\newcommand\flrow@left{}\newcommand\flrow@right{}
+\newcommand\flrow@hbox@bgroup{\hbox\flrow@to
+    \bgroup\flrow@left}
+\newcommand\flrow@hbox@egroup{\flrow@right
+    \egroup}
+\newbox\flrow@rowbox
+\newcommand\floatrow[1][2]{\c@FRobj=#1\relax
+  \ifcase\floatbox@depth
+    \flrow@setlist*{{floatrow}{\@captype row}}%
+  \or
+    \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
+    \flrow@settype{subfloatrow}\flrow@settype{sub\@captype row}%
+    \ifx\flrow@to\empty\def\flrow@boxset##1{}\fi
+  \fi%
+  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
+  \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
+  \if@tempswa\FB@readaux{\relax}\fi
+  \flrow@boxset{\ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\else\hsize\FBB@wd\fi}%
+  \ifnum\floatbox@depth=\z@\vspace\FBaskip\else\leavevmode\fi
+  \hbox\flrow@to\bgroup%outer h box
+  \FRleftmargin
+  \flrow@boxset{\hsize\FBB@wd
+     \settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}\advance\hsize-\@tempdima}%
+  \bgroup\ifx\FR@frame\empty\else\def\FB@frame{}\def\FB@wadj{}\def\FB@hadj{}\fi%frame set
+  \flrow@boxset{\adj@dim\hsize-\FR@wadj=\hsize}%
+  \setbox\flrow@rowbox\vbox\bgroup%v box
+        \@@FRabove
+    \flrow@setrowhbox
+    \flrow@hbox@bgroup\let\FBiffloatrow\@firstoftwo
+      \Xhsize\hsize\count@#1\advance\count@\m@ne
+      \settowidth\@tempdima{\floatrowsep}\advance\Xhsize-\count@\@tempdima
+      \@tempdimb\Xhsize
+      \FR@iftwolevel
+        {\ifnum\floatbox@depth=\z@\Zhsize\Xhsize\else
+            \ifdim\Zhsize=\z@\Zhsize\Xhsize\sZhsize\Xhsize\fi
+            \FR@ifcountH{\global\advance\Zhsize-\count@\@tempdima}\relax
+         \fi}{\@tempdimb\Xhsize\Zhsize\Xhsize}%
+      \divide\@tempdimb#1\relax\FB@wd\@tempdimb
+      \hsize\@tempdimb\ignorespaces}
+\def\endfloatrow{\ifdim\lastskip>\z@\unskip\fi
+      \flrow@hbox@egroup%h box
+    \@@FRbelow
+    \egroup%v box
+    \FR@frame{\box\flrow@rowbox}%
+    \egroup%frame set
+    \FRrightmargin\egroup%outer h box
+    \ifnum\floatbox@depth=\z@\vspace\FBbskip\fi
+  \gdef\FBaskip{\z@}\gdef\FBbskip{\z@}%
+  \global\FBf@max\z@\global\FBo@max\z@\global\FBc@max\z@
+  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
+\newenvironment{subfloatrow}{\capsubrowsettings
+    \captionsetup{subtype}\@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
+\newcommand\capsubrowsettings{\caption@setoptions{subfloatrow}\caption@setoptions{sub\@captype row}}
+\newenvironment{subfloatrow*}[1][2]{\let\flrow@to\empty
+    \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
+    \FR@ifunloc{\let\FR@ifcountH\@firstoftwo}\let\c@FRobj\c@FRsobj
+    \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
+    \floatrow[#1]\killfloatstyle}{\ifdim\lastskip>\z@\unskip\fi
+     \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
+\newcommand\subfloatrowsep{\hskip\columnsep}
+\@ifdefinable\FR@ifcountH{\let\FR@ifcountH\@firstoftwo}
+\@ifdefinable\FR@ifunloc{\let\FR@ifunloc\@firstofone}
+\@ifdefinable\FR@iftwolevel{\let\FR@iftwolevel\@secondoftwo}
+\newcommand\CommonHeightRow{\@ifstar
+    {\let\FR@iftwolevel\@firstoftwo\CommonHeightRow@
+   }{\let\FR@iftwolevel\@secondoftwo\CommonHeightRow@}}
+\newcommand\DefaultCommonHeight{25pt}
+\newcommand\CommonHeight{\DefaultCommonHeight}
+\newcommand\CommonHeightRow@[2][\DefaultCommonHeight]{\def\CommonHeight{#1}\setbox\z@
+    \hbox{\FR@loc@\let\FR@ifunloc\@firstofone#2}%
+    \ifcase\floatbox@depth\def\@tempa{\Xhsize}\def\@tempb{\Zhsize}\or
+        \def\@tempa{\sXhsize}\def\@tempb{\Zhsize}\fi
+    \FR@calc@CommonHeight#2}
+\@ifdefinable\FR@Zunitlength{\newdimen\FR@Zunitlength}
+\newcommand\FR@calc@CommonHeight{%
+    \@tempdima\@tempb\advance\@tempdima-\@tempa
+    \count@\@tempdima\relax\divide\count@16384\relax
+    \divide\@tempb\count@\relax\FR@Zunitlength\@tempb\relax
+    \@tempdima\CommonHeight\relax
+    \count@\@tempdima\relax\divide\count@16384\relax
+    \@tempdima\count@\FR@Zunitlength\relax
+    \edef\CommonHeight{\the\@tempdima}}
+\newcommand\begin@FBBOX{\vbox\bgroup}
+\def\end@FBBOX{\egroup}
+\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse
+  \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip\z@}%
+             {\vskip\z@\egroup$\egroup}}
+\newcommand\TopFloatBoxes{\CADJfalse\OADJfalse
+  \buildFBBOX{\vtop\bgroup\vskip\z@}{\egroup}}
+\newcommand\BottomFloatBoxes{\CADJfalse\OADJfalse
+  \buildFBBOX{\vbox\bgroup}{\vskip\z@\egroup}}
+\newcommand\PlainFloatBoxes{%
+  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
+\newcommand\buildFBBOX[2]{\gdef\begin@FBBOX{#1}\gdef\end@FBBOX{#2}}
+\def\newdimentocommand  #1#2#3{%
+    #1\@tempdima{#3}\@ifdefinable#2{\xdef#2{\the\@tempdima}}}
+\def\renewdimentocommand#1#2#3{%
+    #1\@tempdima{#3}\xdef#2{\the\@tempdima}}
+\def\newskiptocommand   #1#2#3{%
+    #1\@tempskipa{#3}\@ifdefinable#2{\xdef#2{\the\@tempskipa}}}
+\def\renewskiptocommand #1#2#3{%
+    #1\@tempskipa{#3}\xdef#2{\the\@tempskipa}}
+\def\newlengthtocommand{\newskiptocommand}
+\def\renewlengthtocommand{\renewskiptocommand}
+\newcommand*\flrow@setbool[1]{%
+  \expandafter\caption@set@bool\csname FR@if#1\endcsname}
+\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}}}
+\newcommand\thisfloatsetup{\floatsetup[tmpset]}
+\def\flrow@setup{\caption@setkeys[floatrow]{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}}}%
+\newcommand\flrow@setlist{\@ifstar\flrow@setlist@@\flrow@setlist@}
+\newcommand\flrow@setlist@[1]{\@flrow@setlist#1{tmpset};%
+  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
+  \caption@setposition{\FBifcaptop tb}}
+\newcommand\flrow@setlist@@[1]{\@flrow@setlist#1;%
+  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
+  \caption@setposition{\FBifcaptop tb}}
+\newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble
+  \@flrow@setlist}
+\@ifundefined{caption@setoptions}{\let\caption@setoptions\caption@settype}{}
+\newcommand\@cap@setlist[1]{\caption@setoptions{#1}%
+   \@ifnextchar;{\let\caption@setfloattype\@gobble\@gobble}\@cap@setlist}
+\newcommand\flrow@FClist{\flrow@setlist
+  {{floatbeside}{capbesidefloat}{\@captype beside}{capbeside\@captype}}}
+\newcommand*\clearfloatsetup[1]{\@nameundef{flrow@typ@#1}}
+\newcommand\DeclareFROpt{%
+  \@ifstar{\flrow@declopt\AtEndOfPackage}
+          {\flrow@declopt\@gobble}}
+\newcommand*\flrow@declopt[2]{%
+  #1{\undefine@key{floatrow}{#2}}\define@key{floatrow}{#2}}
+\@onlypreamble\DeclareFROpt
+\@onlypreamble\flrow@declopt
+\@ifdefinable\FR@ifrawfloats{\let\FR@ifrawfloats\@secondoftwo}
+\DeclareFROpt*{rawfloats}[0]{\flrow@setbool{rawfloats}{#1}}
+\@ifdefinable\FR@ifdoubleaswide{\let\FR@ifdoubleaswide\@secondoftwo}
+\DeclareFROpt{doublefloataswide}[0]{\flrow@setbool{doubleaswide}{#1}}
+\@ifdefinable\FR@iffloatHaslist{\let\FR@iffloatHaslist\@secondoftwo}
+\DeclareFROpt{floatHaslist}[0]{\flrow@setbool{floatHaslist}{#1}}
+\newcommand*\DeclareFloatStyle[2]{%
+  \global\@namedef{flrow@sty@#1}{#2}}
+\@onlypreamble\DeclareFloatStyle
+\newcommand*\flrow@setstyle[1]{%
+  \@ifundefined{flrow@sty@#1}%
+    {\flrow@error{Undefined float style `#1'}}%
+    {\FBstyle@reset
+     \def\flrow@capsetup{%
+        \@ifundefined{caption@sty@#1}{}{\caption@setstyle*{#1}}%
+        \caption@setoptions {#1}}%
+     \flrow@esetup{\csname flrow@sty@#1\endcsname}}}
+\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}
+\DeclareFloatStyle{default}{%
+     style=plain,captionskip=10pt,
+     margins=centering,objectset=centering,
+     capbesideposition=left,facing=no,
+     floatrowsep=columnsep,capbesidesep=columnsep,
+     font=default,footfont=footnotesize}
+\DeclareFROpt{style}{\flrow@setstyle{#1}}
+\@ifdefinable\FR@ifCST{\let\FR@ifCST\@firstoftwo}
+\DeclareFROpt{relatedcapstyle}[0]{\flrow@setbool{CST}{#1}}
+\DeclareFROpt{font}{\flrow@setfont{font}{#1}}
+\DeclareFROpt{footfont}{\captionsetup[floatfoot]{font={#1}}}
+\DeclareCaptionOption{footfont}{\caption@setfont{footfont}{#1}}
+\@ifdefinable\floatfont{\let\floatfont\empty}
+\newcommand*\captionfootfont{\normalfont\footnotesize}
+\let\DeclareFloatFont\DeclareCaptionFont
+\@onlypreamble\DeclareFloatFont
+\newcommand*\flrow@setfont[2]{%
+   \caption@setfont{@tempa}{#2}%
+   \expandafter\let\csname float#1\endcsname\caption@tempa}
+\DeclareFROpt{capposition}{\flrow@cappos{#1}}
+\DeclareFROpt{position}{\flrow@cappos{#1}}
+\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
+  }{\flrow@error{Undefined caption position `#1'}%
+  }}}}}
+\@ifdefinable\FBifcaptop{\let\FBifcaptop\@secondoftwo}
+\newcommand\captop{\let\FBifcaptop\@firstoftwo}
+\newcommand\capbot{\let\FBifcaptop\@secondoftwo}
+\@ifdefinable\FBifCAPTOP{\let\FBifCAPTOP\@secondoftwo}
+\newcommand\CAPTOP{\captop\let\FBifCAPTOP\@firstoftwo\CADJtrue}
+\@ifdefinable\FBifcapbeside{}\let\FBifcapbeside\@secondoftwo
+\newcommand\capbeside{\let\FBifcapbeside\@firstoftwo}
+\newcommand\nocapbeside{\let\FBifcapbeside\@secondoftwo}
+\DeclareFROpt{capbesideframe}[0]{\flrow@setbool{FCBOX}{#1}}
+\DeclareFROpt{capbesidewidth}[1]{\flrow@FCc@wd{#1}}
+\@ifdefinable\FC@ifc@wd{\let\FC@ifc@wd\@secondoftwo}
+\newcommand\useFCwidth{\let\FC@ifc@wd\@firstoftwo\let\FCwidth\relax}
+\@ifdefinable\FCwidth{\let\FCwidth\relax}
+\newcommand\flrow@FCc@wd[1]{%
+  \caption@ifinlist{#1}{none,sidefil}{\let\FC@ifc@wd\@secondoftwo
+  }{\useFCwidth\def\FCwidth{#1}}}
+\DeclareFROpt{capbesideposition}{\flrow@scpos{#1}}
+\newcommand\DeclareSCPos[2]{%
+  \define@key{flrow@scpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@scpos[1]{%
+  \let\FR@tmp\@empty
+  \begingroup\caption@setkeys[floatrow]{flrow@scpos}{#1}\endgroup
+  \FR@tmp}
+\@onlypreamble\DeclareSCPos
+\DeclareSCPos{left}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}}
+\DeclareSCPos{right}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\z@}}
+\DeclareSCPos{inside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
+    \count@\c@FBcnt\ifnum\count@=\z@\count@\@ne\fi
+  }}
+\DeclareSCPos{outside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
+    \count@\c@FBcnt\ifnum\count@=\z@\else\advance\count@\@ne\fi
+  }}
+\DeclareSCPos{center}{\def\@FC@vpos{\count@\z@}}
+\DeclareSCPos{top}{\def\@FC@vpos{\count@\@ne}}
+\DeclareSCPos{bottom}{\def\@FC@vpos{\count@\tw@}}
+\newcommand*\@FC@vpos{\count@\tw@}
+\newcommand*\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}
+\newcounter{FBcnt}
+\DeclareFROpt{footposition}{\flrow@ftpos{#1}}
+\newcommand\DeclareFtPos[2]{%
+  \define@key{flrow@ftpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@ftpos[1]{%
+  \let\FR@tmp\@empty
+  \begingroup\caption@setkeys[floatrow]{flrow@ftpos}{#1}\endgroup
+  \FR@tmp}
+\@onlypreamble\DeclareFtPos
+\@ifdefinable\FPOScnt{\newcount\FPOScnt}
+\DeclareFtPos{caption}{\FPOScnt1\relax}
+\DeclareFtPos{bottom}{\FPOScnt2\relax}
+\DeclareFtPos{default}{\FPOScnt0\relax}
+\DeclareFROpt{heightadjust}{\flrow@htadj{#1}}
+\newcommand\DeclareHtAdj[2]{%
+  \define@key{flrow@htadj}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@htadj[1]{\let\FR@tmp\@empty
+  \begingroup\caption@setkeys[floatrow]{flrow@htadj}{#1}\endgroup
+  \FR@tmp}
+\@onlypreamble\DeclareHtAdj
+\DeclareHtAdj{all}{\CADJtrue\OADJtrue}
+\DeclareHtAdj{caption}{\CADJtrue}
+\DeclareHtAdj{object}{\OADJtrue}
+\DeclareHtAdj{none}{\CADJfalse\OADJfalse}
+\DeclareHtAdj{nocaption}{\CADJfalse}
+\DeclareHtAdj{noobject}{\OADJfalse}
+\newif\ifCADJ
+\newif\ifOADJ
+\DeclareFROpt{valign}{\@FB@vpos{#1}}
+\newcommand\@FB@vpos[1]{%
+  \if#1t\def\FBafil{}\def\FBbfil{\vss}\else
+     \if#1b\def\FBafil{\vss}\def\FBbfil{}\else
+        \if#1c\def\FBafil{\vskip0ptplus1fillminus1000pt}%
+              \def\FBbfil{\vskip0ptplus1fillminus1000pt}\else
+           \if#1s\def\FBafil{\vskip0ptminus1000pt}%
+                 \def\FBbfil{\vskip0ptminus1000pt}%
+  \fi\fi\fi\fi}
+\@ifdefinable\FR@iffacing{\let\FR@iffacing\@secondoftwo}
+\DeclareFROpt{facing}[1]{\flrow@setbool{facing}{#1}}
+\newcommand\FB@facing{}
+\DeclareFROpt{margins}{\flrow@FBAlign{#1}}
+\newcommand*\flrow@FBAlign[1]{%
+  \@ifundefined{flrow@mj@#1}%
+    {\flrow@error{Undefined float alignment `#1'}}%
+    {\@nameuse{flrow@mj@#1}}}
+\newcommand*\DeclareMarginSet[2]{%
+  \global\@namedef{flrow@mj@#1}{#2}}
+\@onlypreamble\DeclareMarginSet
+\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@}
+\newskip\LTleft\newskip\LTright
+\DeclareMarginSet{hangleft}{\setfloatmargins
+    {\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
+  \LTleft-\marginparwidth\advance\LTleft-\marginparsep
+  \LTright=\fill}
+\DeclareMarginSet{hangright}{\setfloatmargins
+    {\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
+  \LTleft=\fill
+  \LTright-\marginparwidth\advance\LTright-\marginparsep}
+\DeclareMarginSet{hanginside}{\setfloatmargins
+    *{\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
+  }
+\DeclareMarginSet{hangoutside}{\setfloatmargins
+    *{\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
+  }
+\newcommand\flrow@mj@default{\flrow@mj@centering}
+\newcommand\floatfacing{\@ifstar
+  {\@FC@hpos\floatfacing@}{\FB@facing\floatfacing@}}
+\newcommand\floatfacing@[2]{\ifodd\count@#1\else#2\fi}
+\newcommand\floatboxmargins{\def\FR@tmp{FB}\FB@mset}
+\newcommand\floatrowmargins{\def\FR@tmp{FR}\FB@mset}
+\newcommand\floatcapbesidemargins{\def\FR@tmp{FC}\FB@mset}
+\newcommand\FB@mset{\@ifstar{\FB@mset@}{\FB@@mset}}
+\newcommand\FB@mset@[2]{%
+  \def\FB@facing{\let\FR@iffacing\@firstoftwo\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}}
+\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}}
+\setfloatmargins\hfill\hfill
+\DeclareFROpt{objectset}{\flrow@FBoAlign{#1}}
+\DeclareFROpt{justification}{\flrow@FBoAlign{#1}}
+\let\DeclareObjectSet\DeclareCaptionJustification
+\@onlypreamble\DeclareObjectSet
+\newcommand*\flrow@FBoAlign[1]{%
+  \@ifundefined{caption@hj@#1}%
+    {\flrow@error{Undefined object setting `#1'}}%
+    {\expandafter\let\expandafter\floatobjectset
+     \csname caption@hj@#1\endcsname}}
+\newcommand*\floatobjectset{\centering}
+\DeclareFROpt{floatwidth}{\flrow@FBo@wd{#1}}
+\@ifdefinable\FC@ifo@fil{\let\FC@ifo@fil\@secondoftwo}
+\newcommand\filFCOhsize{\let\FC@ifo@fil\@firstoftwo}
+\newcommand\nofilFCOhsize{\let\FC@ifo@fil\@secondoftwo}
+\newcommand\flrow@setwd{\relax}
+\newcommand\flrow@FBo@wd[1]{%
+  \caption@ifinlist{#1}{none,sidefil}{\filFCOhsize
+  }{\nofilFCOhsize\def\flrow@setwd{\@tempdima=#1}}}
+\DeclareFROpt{floatrowsep}{\flrow@setFRsep\floatrowsep{#1}}
+\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}}
+\DeclareFROpt{capbesidesep}{\flrow@setFRsep\floatcapbesidesep{#1}}
+\let\DeclareFloatSeparators\DeclareCaptionLabelSeparator
+\@onlypreamble\DeclareFloatSeparators
+\newcommand*\flrow@setFRsep[2]{%
+  \@ifundefined{caption@lsep@#2}%
+    {\flrow@error{Undefined float separator `#2'}}%
+    {\expandafter\let\expandafter#1\csname caption@lsep@#2\endcsname}}
+\DeclareFloatSeparators{columnsep}{\hskip\columnsep}
+\DeclareFloatSeparators{qquad}{\qquad}
+\DeclareFloatSeparators{fil}{\hskip\columnsep plus1fil}
+\DeclareFloatSeparators{fill}{\hskip\columnsep plus1fill}
+\newcommand\floatrowsep{\hskip\columnsep}
+\newcommand\floatcapbesidesep{\hskip\columnsep}
+\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}}
+\newcommand\DeclareFloatVCode[2]{\@namedef{flrow@FBr@#1}{#2}}
+\@onlypreamble\DeclareFloatVCode
+\newcommand*\flrow@FBrule[3]{%
+  \@ifundefined{flrow@FBr@#3}%
+    {\flrow@error{Undefined rule `#3'}}%
+    {\let#1\empty
+     \expandafter\let\expandafter#2\csname flrow@FBr@#3\endcsname}}
+\newcommand*\flrow@FRrule[3]{%
+  \@ifundefined{flrow@FBr@#3}%
+    {\flrow@error{Undefined rule `#3'}}%
+    {\def#2{\FBiffloatrow\relax{\@nameuse{flrow@FBr@#3}}}%
+     \expandafter\let\expandafter#1\csname flrow@FBr@#3\endcsname}}
+\newcommand*\flrow@FBskip[1]{%
+  \@ifundefined{flrow@FBr@#1}%
+    {\flrow@error{Undefined rule `#1'}}%
+    {\expandafter\let\expandafter\@@FBskip\csname flrow@FBr@#1\endcsname}}
+\DeclareFloatVCode{none}{}
+\DeclareFloatVCode{thickrule}{\par\rule{\hsize}{.8pt}\vskip2pt\par}
+\DeclareFloatVCode{rule}{\vskip2pt\hrule\vskip2pt}
+\DeclareFloatVCode{lowrule}{\par\vskip2pt\rule\hsize\@wholewidth\par}
+\DeclareFloatVCode{captionskip}{\vskip\captionskip}
+\newcommand\FBstyle@reset{\let\FRifFBOX\@secondoftwo\OADJfalse\CADJfalse\capbot
+  \def\@@FBskip{\vskip\captionskip}\def\@@FRabove{}\def\@@FRbelow{}%
+  \def\@@FBabove{}\def\@@FBbelow{}%
+  \def\FB@Bset{}\def\FB@frame{}\def\FBo@frame{}\def\FR@frame{}%
+  \def\FBo@wadj{}\def\FBo@hadj{}\def\FB@wadj{}\def\FB@hadj{}\def\FR@wadj{}\def\FR@hadj{}}
+\newcommand\@@FBskip{\vskip\captionskip}
+\@ifdefinable\@@FRabove{\def\@@FRabove{}}
+\@ifdefinable\@@FRbelow{\def\@@FRbelow{}}
+\@ifdefinable\@@FBabove{\def\@@FBabove{}}
+\@ifdefinable\@@FBbelow{\def\@@FBbelow{}}
+\@ifdefinable\FB@frame {\def\FB@frame {}}
+\@ifdefinable\FBo@frame{\def\FBo@frame{}}
+\@ifdefinable\FR@frame {\def\FR@frame {}}
+\@ifdefinable\FBo@wadj {\def\FBo@wadj {}}
+\@ifdefinable\FBo@hadj {\def\FBo@hadj {}}
+\@ifdefinable\FB@wadj  {\def\FB@wadj  {}}
+\@ifdefinable\FB@hadj  {\def\FB@hadj  {}}
+\@ifdefinable\FR@wadj  {\def\FR@wadj  {}}
+\@ifdefinable\FR@hadj  {\def\FR@hadj  {}}
+\@ifdefinable\FB@Bset  {\def\FB@Bset  {}}
+\DeclareFROpt{framestyle}{\@ifundefined{FB@#1@frame}%
+  {\let\FRifFBOX\@secondoftwo}{\let\FRifFBOX\@firstoftwo\def\FB@B@{#1}}}
+\DeclareFROpt{framearound}{\flrow@fr@round{#1}}
+\newcommand*\flrow@fr@round[1]{%
+ \caption@ifinlist{#1}{object,contents}{\let\FRifFBOX\@firstoftwo
+    \def\FB@BO@{FBo}%
+  }{\caption@ifinlist{#1}{floatbox,all}{\let\FRifFBOX\@firstoftwo
+    \def\FB@BO@{FB}%
+  }{\caption@ifinlist{#1}{row}{\let\FRifFBOX\@firstoftwo
+    \def\FB@BO@{FR}%
+  }{\caption@ifinlist{#1}{none}{\let\FRifFBOX\@secondoftwo
+  }{\flrow@error{Undefined framed object `#1'}%
+  }}}}}
+\@ifdefinable\FR@ifFIT{\let\FR@ifFIT\@secondoftwo}
+\@ifdefinable\FR@ifROWFILL{\let\FR@ifROWFILL\@secondoftwo}
+\DeclareFROpt{framefit}[0]{\flrow@setbool{FIT}{#1}}
+\@ifdefinable\flrow@@setROWFILL{}
+\@ifdefinable\flrow@leftfill{}\@ifdefinable\flrow@rightfill{}
+\DeclareFROpt{rowfill}[0]{\flrow@setbool{ROWFILL}{#1}}
+\DeclareFROpt{frameset}{\def\FB@Bset{#1}}
+\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}{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+    \@nameuse{FB@\FB@B@ @adj}}\relax}%
+  \@namedef{\FB@BO@ @frame}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+    \@nameuse{FB@\FB@B@ @frame}}%
+  \ifx\FR@frame\empty\else%\ifx\FB@frame\empty
+     \def\FB@hadj{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+       \@nameuse{FB@\FB@B@ @adj}}%
+     \def\FB@wadj{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+       \@nameuse{FB@\FB@B@ @adj}}\relax}%
+     \def\FB@frame{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+       \@nameuse{FB@\FB@B@ @frame}}%
+  \fi%\fi
+  }
+\@ifdefinable\FRifFBOX{\let\FRifFBOX\@secondoftwo}
+\newcommand\FB@fbox@frame[1]{\hbox{%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\fbox{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\newcommand\FB@fbox@adj{\dimen@=2\fboxsep\advance\dimen@2\fboxrule}
+\newcommand\FB@fbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+\newcommand\FB@colorbox@frame[1]{\hbox{%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\@ifdefinable\FB@colorbox@adj{\let\FB@colorbox@adj\FB@fbox@adj}
+\newcommand\FB@colorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+\newcommand\FB@fcolorbox{\fbox}
+\newcommand\FB@fcolorcorners{}
+\@ifdefinable\FR@phantom{}\@ifdefinable\FRset@color{}
+\newcommand\FB@FRcolorbox@frame[1]{\hbox{\let\color@block\FRcolor@block
+  \let\FR@phantom\@firstofone\let\FRset@color\set@color\FB@fcolorcorners
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\@ifdefinable\FB@FRcolorbox@adj{\let\FB@FRcolorbox@adj\FB@fbox@adj}
+\newcommand\FB@FRcolorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+\newcommand\FB@corners@frame[1]{\hbox{\let\color@block\FRcolor@block
+  \let\FR@phantom\phantom\let\FRset@color\relax\FB@fcolorcorners
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\colorbox{white}{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\@ifdefinable\FB@corners@adj{\let\FB@corners@adj\FB@fbox@adj}
+\newcommand\FB@corners@reset{\fboxsep3\p@\fboxrule\z@}
+\newcommand\flrow@l@color@side[2]{{\let\unitlength\relax
+    \picture(\z@,\z@)(\z@,\z@)
+    \put(\z@,#1){{\flrow@ll@col@put}}
+    \put(\z@,#2){{\flrow@ul@col@put}}
+    \endpicture}}
+\newcommand\flrow@r@color@side[2]{{\let\unitlength\relax
+    \picture(\z@,\z@)(\z@,\z@)
+    \put(\z@,#1){{\flrow@lr@col@put}}
+    \put(\z@,#2){{\flrow@ur@col@put}}
+    \endpicture}}
+\newcommand\flrow@ll@col@put{}
+\newcommand\flrow@ul@col@put{}
+\newcommand\flrow@lr@col@put{}
+\newcommand\flrow@ur@col@put{}
+\newcommand\flrow@cboxcorners[4]{%
+    \def\flrow@ll@col@put{#1}%
+    \def\flrow@lr@col@put{#2}%
+    \def\flrow@ur@col@put{#3}%
+    \def\flrow@ul@col@put{#4}%
+    }
+\newcommand\FRcolorboxwd{\z@}
+\newcommand\FRcolorboxht{\z@}
+\newcommand\FRcolorboxdp{\z@}
+\def\FRcolor@block#1#2#3{%
+  {\FRset@color
+   \rlap{\@tempdima#1\edef\FRcolorboxwd{\the\@tempdima}\@tempdima#2\advance\@tempdima#3%
+   \edef\FRcolorboxht{\the\@tempdima}\@tempdima#3\edef\FRcolorboxdp{\the\@tempdima}%
+   \ifcolors@\else\let\FR@phantom\phantom\fi
+     \flrow@l@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
+     \FR@phantom{\vrule\@width#1\@height#2\@depth#3}%
+     \flrow@r@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
+    }}}
+\DeclareFROpt{colorframeset}{\flrow@fcolorbox{#1}}
+\DeclareFROpt{colorframecorners}{\flrow@fcolorcorners{#1}}
+\newcommand*\flrow@fcolorbox[1]{%
+  \@ifundefined{flrow@fcolorbox@#1}%
+    {\flrow@error{Undefined color box `#1'}}%
+    {\expandafter\let\expandafter\FB@fcolorbox
+     \csname flrow@fcolorbox@#1\endcsname}}
+\newcommand*\flrow@fcolorcorners[1]{%
+  \@ifundefined{flrow@fcolorcorners@#1}%
+    {\flrow@error{Undefined color box corners `#1'}}%
+    {\expandafter\let\expandafter\FB@fcolorcorners
+     \csname flrow@fcolorcorners@#1\endcsname}}
+\newcommand*\DeclareColorBox[2]{%
+  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
+   \long\@namedef{flrow@fcolorbox@#1}{#2}}}
+\newcommand*\DeclareCBoxCorners[5]{%
+  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
+   \long\@namedef{flrow@fcolorcorners@#1}{\flrow@cboxcorners{#2}{#3}{#4}{#5}}}}
+\@onlypreamble\DeclareColorBox
+\@onlypreamble\DeclareCBoxCorners
+\newcommand\flrow@load@colorpackage{\IfFileExists{color.sty}%
+    {\def\next{\RequirePackage{color}}}{\let\next\relax}\next}
+\AtBeginDocument{\flrow@load@colorpackage\let\flrow@load@colorpackage\relax}
+\DeclareFROpt{captionskip}{\def\captionskip{#1}%
+  \setlength\abovecaptionskip{#1}}
+\DeclareFROpt{footskip}{\def\floatfootskip{#1}}
+\newcommand\captionskip{10\p@}
+\newcommand\floatfootskip{\skip\@mpfootins}
+\DeclareFROpt{footnoterule}{\flrow@footrule{#1}}
+\newcommand\DeclareFloatFootnoterule[2]{%
+  \long\@namedef{flrow@fnrule@#1}{#2}}
+\newcommand*\flrow@footrule[1]{%
+  \@ifundefined{flrow@fnrule@#1}%
+    {\flrow@error{Undefined footnoterule `#1'}}%
+    {\let\@@FRabove\empty
+     \expandafter\let\expandafter\FBfootnoterule\csname
+       flrow@fnrule@#1\endcsname}}
+\@onlypreamble\DeclareFloatFootnoterule
+\DeclareFloatFootnoterule{normal}{\kern-3\p@
+  \@tempdima.4\columnwidth
+  \hrule\@width\@tempdima\kern2.6\p@}
+\DeclareFloatFootnoterule{limited}{\kern-3\p@
+  \@tempdima.4\columnwidth
+  \ifdim\@tempdima>\frulemax\@tempdima=\frulemax\fi
+  \hrule\@width\@tempdima\kern2.6\p@}
+\newcommand\frulemax{1in}
+\DeclareFloatFootnoterule{fullsize}{\kern-3\p@
+  \hrule\@width\hsize\kern2.6\p@}
+\DeclareFloatFootnoterule{none}{}
+\@ifdefinable\FBfootnoterule{\let\FBfootnoterule\footnoterule}
+\@ifdefinable\FR@iffancy{\let\FR@iffancy\@secondoftwo}
+\DeclareFROpt{fancyboxes}{\flrow@setbool{fancy}{#1}}
+\newcommand\DeclareFNOpt{%
+   \@ifstar{\flrow@declfnopt\AtBeginDocument}
+           {\flrow@declfnopt\@gobble}}
+\newcommand*\flrow@declfnopt[2]{%
+   #1{\undefine@key{newfloat}{#2}}\define@key{newfloat}{#2}}
+\@onlypreamble\DeclareFNOpt
+\@ifdefinable\flrow@types{\newtoks\flrow@types}
+\newcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
+  \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
+  \addtocounter{float@type}{\value{float@type}}%
+  \@namedef{#1name}{#1}\newcounter{#1}%
+  \expandafter\edef\csname fnum@#1\endcsname
+    {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
+       \expandafter\noexpand\csname the#1\endcsname}%
+  \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
+  \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
+  \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
+  \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
+  \@tempa}
+\@onlypreamble\DeclareNewFloatType
+\DeclareFNOpt*{placement}{\flnew@fps{#1}}
+\newcommand\flnew@fps[1]{\@namedef{fps@\FB@captype}{#1}}
+\@onlypreamble\flnew@fps
+\DeclareFNOpt*{name}{\flnew@fname{#1}}
+\newcommand\flnew@fname[1]{\@namedef{\FB@captype name}{#1}}
+\@onlypreamble\flnew@fname
+\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
+\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
+\def\ProcessOptionsWithKV#1{%
+  \let\@tempc\relax
+  \let\FR@tmp\@empty
+  \@for\CurrentOption:=\@classoptionslist\do{%
+    \@ifundefined{KV@#1@\CurrentOption}%
+    {}%
+    {%
+      \@ifundefined{KV@#1@\CurrentOption @default}{%
+       \PackageInfo{#1}{Global option `\CurrentOption' ignored}%
+      }{%
+      \PackageInfo{#1}{Global option `\CurrentOption' processed}%
+      \edef\FR@tmp{\FR@tmp,\CurrentOption,}%
+      \@expandtwoargs\@removeelement\CurrentOption
+        \@unusedoptionlist\@unusedoptionlist
+        }%
+    }%
+  }%
+  \edef\FR@tmp{%
+    \noexpand\caption@setkeys[floatrow]{#1}{%
+      \FR@tmp\@ptionlist{\@currname.\@currext}%
+    }%
+  }%
+  \FR@tmp
+  \let\CurrentOption\@empty
+  \AtEndOfPackage{\let\@unprocessedoptions\relax}}
+\ProcessOptionsWithKV{floatrow}
+\FR@iffancy{\RequirePackage{fr-fancy}}\relax
+\let\ProcessOptionsWithKV\undefined
+\AtBeginDocument{
+ \FR@ifrawfloats
+  {\let\FR@tmp\flrow@Raw@restyle
+ }{\flrow@restyle{table}\flrow@restyle{figure}%
+   \let\FR@tmp\flrow@restyle
+  }\the\flrow@types
+ \@onlypreamble\flrow@restyle\@onlypreamble\flrow@Raw@restyle
+ \flrow@types={}}
+\AtBeginDocument{%
+\@ifundefined{sf@@@subfloat}{\@tempswafalse}{\@tempswatrue}
+\if@tempswa\RequirePackage{fr-subfig}\fi}
+\AtBeginDocument{%
+\@ifundefined{LT@array}{\@tempswafalse}{\@tempswatrue}
+\if@tempswa\RequirePackage{fr-longtable}\fi}
+\endinput
+%%
+%% End of file `floatrow.sty'.
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 04/10] Apply workaround to floatrow.sty and rename it floatrowpf.sty
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
                   ` (2 preceding siblings ...)
  2017-07-28  9:58 ` [PATCH 03/10] Localize floatrow.sty Akira Yokosawa
@ 2017-07-28 10:00 ` Akira Yokosawa
  2017-07-28 10:01 ` [PATCH 05/10] Define 'listing' environment for style guide Akira Yokosawa
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28 10:00 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 5e41dffa203a6c85d5af80a468e3dac33946567d Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 20 Jul 2017 23:35:31 +0900
Subject: [PATCH 04/10] Apply workaround to floatrow.sty and rename it floatrowpf.sty

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 floatrow.sty   | 1472 -------------------------------------------------------
 floatrowpf.sty | 1480 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 1480 insertions(+), 1472 deletions(-)
 delete mode 100644 floatrow.sty
 create mode 100644 floatrowpf.sty

diff --git a/floatrow.sty b/floatrow.sty
deleted file mode 100644
index 18ef28a..0000000
--- a/floatrow.sty
+++ /dev/null
@@ -1,1472 +0,0 @@
-%%
-%% This is file `floatrow.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% floatrow.dtx  (with options: `floatrow,floatsetup')
-%%
-%% IMPORTANT NOTICE:
-%%
-%% For the copyright see the source file.
-%%
-%% Any modified versions of this file must be renamed
-%% with new filenames distinct from floatrow.sty.
-%%
-%% For distribution of the original source see the terms
-%% for copying and modification in the file floatrow.dtx.
-%%
-%% This generated file may be distributed as long as the
-%% original source files, as listed above, are part of the
-%% same distribution. (The sources need not necessarily be
-%% in the same archive or directory.)
-\NeedsTeXFormat{LaTeX2e}[1995/06/01]
-\ProvidesPackage{floatrow}
-       [2008/08/02 v0.3b floatrow: float package extension]
-\@ifundefined{float@caption}{%
-  \@ifundefined{rotfloat@float}{}%
-    {\PackageError{floatrow}{Do not use rotfloat package with floatrow.\MessageBreak
-        The latter will be skipped}{}%
-  \@namedef{opt@floatrow.sty}{}\endinput}}%
-  {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak
-        The latter will be skipped}{}%
-  \@namedef{opt@floatrow.sty}{}\endinput}
-\@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)}
-\RequirePackage{keyval}
-\RequirePackage{caption3}
-\@ifpackagelater{caption3}{2007/04/11 v3.0q}{}{\PackageError
-    {floatrow}{For a successful cooperation we need at least\MessageBreak
-    version `2007/04/11 v3.0q' of package caption,\MessageBreak
-        but only version\MessageBreak
-          `\csname ver@caption.\@pkgextension\endcsname'\MessageBreak
-        is available}\@eha\endinput}
-\providecommand*\caption@fnum[1]{%
-   \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}}
-\@ifdefinable\FR@flboxreset{\let\FR@flboxreset\@floatboxreset}
-\@ifdefinable\FR@makecaption{\let\FR@makecaption\@makecaption}
-\newcommand\flrow@caption{%
-   \ifx\@captype\@undefined
-     \@latex@error{\noexpand\caption outside float}\@ehd
-     \expandafter\@gobble
-   \else
-     \refstepcounter\@captype
-     \expandafter\@firstofone
-   \fi
-   {\@dblarg{\@caption\@captype}}%
-}
-\@ifdefinable\float@caption{\let\float@caption\@caption}
-\newcounter{float@type}
-\@ifundefined{c@figure}%
-  {\setcounter{float@type}{1}}%
-  {\setcounter{float@type}{4}}
-\newcommand\flrow@package{floatrow}
-\newcommand*\flrow@error[1]{\PackageError\flrow@package{#1}\flrow@eh}
-\newcommand*\flrow@eh{%
-  If you do not understand this error, please take look\MessageBreak
-  at `floatrow' and `caption' package documentations.\MessageBreak
-  \@ehc}
-\newcommand\floatstyle[1]{\@ifundefined{flrow@sty@#1}%
-  {\flrow@error{Unknown float style `#1'}}{\edef\float@style{#1}}}
-\newcommand\floatname[2]{\@namedef{#1name}{#2}}
-\newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}}
-\newif\if@@FS
-\newcommand\FR@redefs{%
-  \@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}
-\newcommand\flrow@makecaption[2]{\ifnum\floatbox@depth=\z@
-    \ifvoid\@floatcapt
-      \else\flrow@error{Caption(s) lost}\fi\fi
-  \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
-   \linewidth\hsize
-   \ifdim\hsize<70mm\sloppy\fi
-   \normalsize
-   \abovecaptionskip\z@\belowcaptionskip\z@
-   \FR@makecaption{#1}{#2}\egroup}
-\newcommand\killfloatstyle{\FBbuildtrue\if@@FS\hsize\FB@wd\fi\@@FSfalse}
-\newcommand\flrow@capsetup{}
-\edef\float@style{plain}
-\@ifdefinable\FBB@wd{\let\FBB@wd\relax}
-\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}}
-\newcommand\flrow@restyle[1]{%
-  \@namedef{#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
-    \flrow@setlist{{#1}}%
-    \textwidth\columnwidth\edef\FBB@wd{\the\columnwidth}%
-    \FRifFBOX\@@setframe\relax\@@FStrue\@float{#1}}%
-  \@namedef{#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
-    \flrow@setlist{{#1}{widefloat}{wide#1}}%
-    \FRifFBOX\@@setframe\relax\@@FStrue\edef\FBB@wd{\the\textwidth}%
-    \let\@xdblfloat\@xfloat\relax
-    \FR@ifdoubleaswide
-     {\if@twocolumn\else\let\@dblfloat\@float\fi}\relax
-    \@dblfloat{#1}}%
-  \expandafter\let\csname end#1\endcsname\float@end
-  \expandafter\let\csname end#1*\endcsname\float@dblend
- \@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\relax\@@FStrue
-    \let\rotfloat@@makebox\float@makebox
-    \let\float@makebox\rotfloat@makebox
-    \@float{#1}}%
-  \@namedef{endsideways#1}{\FBbuildtrue\float@end}
-  \ifx\@rotdblfloat\undefined
-   \@namedef{sideways#1*}{%
-     \flrow@error{%
-      You need rotating version 2.10 or newer to do this}%
-     \@nameuse{sideways#1}}%
-  \else
-   \@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\relax\@@FStrue
-     \let\@xdblfloat\@xfloat
-     \let\rotfloat@@makebox\float@makebox
-     \let\float@makebox\rotdblfloat@makebox
-     \@dblfloat{#1}}%
-  \fi
-  \@namedef{endsideways#1*}{\FBbuildtrue\float@dblend}}
- \@ifundefined{wrapfloat}{}{%
-   \@ifundefined{flrow@WF@rapt}{\let\flrow@WF@rapt\WF@rapt
-   \def\WF@rapt[##1]##2{\FRifFBOX\@@setframe\relax\@@FStrue
-     \dimen@##2\relax
-     \ifdim\dimen@>\z@
-       \edef\FBB@wd{\the\dimen@}\FB@fs@wd\dimen@\FBo@wd
-     \fi
-     \flrow@WF@rapt[##1]{\dimen@}%
-       \the\FR@everyfloat\ignorespaces}%
-   }{}%
-   \@namedef{wrap#1}{\killfloatstyle\def\@captype{#1}%
-     \FR@redefs\FBc@wd\z@
-     \flrow@setlist{{#1}{wrapfloat}{wrap#1}}%
-     \def\WF@floatstyhook{\let\@currbox\WF@box
-       \ifFBbuild
-         \global\setbox\WF@box\flrow@FB{\wd\WF@box}%
-       \else
-         \global\let\flrow@typ@tmpset\undefined
-         \global\let\WF@box\@currbox
-       \fi}%
-     \@ifnextchar[\WF@wr{\WF@wr[]}}%]
-   \@namedef{endwrap#1}{\endwrapfloat
-     \@ifundefined{FloatHBarrier}{}\FloatHBarrier
-     }}
- \@ifundefined{sf@@@subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}}
-\newcommand\RawFloats{\@ifnextchar[%]
-    \flrow@rawfloatschk\flrow@rawfloats}
-\newcommand\flrow@rawfloats{\killfloatstyle\@parboxrestore
-    \let\@makecaption\FR@makecaption
-    \expandafter\ifx\csname end\@captype\endcsname\float@endH
-        \global\FBbuildfalse
-    \else
-        \@namedef{end\@captype}{\end@float}%
-    \fi
-    \expandafter\ifx\csname end\@captype*\endcsname\float@endH
-        \global\FBbuildfalse
-    \else
-        \@namedef{end\@captype*}{\end@dblfloat}%
-    \fi
-  \@ifundefined{@rotfloat}{}{%
-    \@namedef{endsideways\@captype}{\end@rotfloat}%
-    \@namedef{endsideways\@captype*}{\end@rotdblfloat}%
-  }%
-  \@ifundefined{wrapfloat}{}{%
-    \@namedef{endwrap\@captype}{\endwrapfloat}%
-  }}
-\@ifdefinable\flrow@rawfloatschk{}
-\def\flrow@rawfloatschk[#1]{\@ifnextchar[%]
-    {\flrow@RawFloats[#1]}{\flrow@@RawFloats#1,;}}
-\@ifdefinable\flrow@RawFloats{}
-\newcommand\flrow@raw@set{\AtBeginDocument}
-\AtBeginDocument{\let\flrow@raw@set\@firstofone}
-\def\flrow@RawFloats[#1][#2]{\flrow@RawFloats@[#1]#2,;}
-\def\flrow@RawFloats@[#1]#2,{%
-  \caption@ifinlist{#2}{float}{\flrow@raw@set
-        {\@namedef{#1}{\@float{#1}}}%
-  }{\caption@ifinlist{#2}{widefloat}{\flrow@raw@set%
-        {\@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}}%
-  }{\caption@ifinlist{#2}{rotfloat}{%
-    \@ifundefined{@rotfloat}{}{\flrow@raw@set
-        {\@namedef{sideways#1}{\@rotfloat{#1}}}}%
-  }{\caption@ifinlist{#2}{widerotfloat}{%
-    \@ifundefined{@rotfloat}{}{\flrow@raw@set
-        {\@namedef{sideways#1*}{\@rotdblfloat{#1}}}}%
-  }{\caption@ifinlist{#2}{wrapfloat}{%
-    \@ifundefined{wrapfloat}{}{\flrow@raw@set
-        {\@namedef{wrap#1}{\wrapfloat{#1}}}}}%
-  }{\caption@ifinlist{#2}{all,allfloats}{%
-    \flrow@@RawFloats{#1}%
-  }{\flrow@error{Undefined float subtype `#2'}%
-  }}}}}\@ifnextchar;\@gobble{\flrow@RawFloats@[#1]}}
-\@ifdefinable\flrow@@RawFloats{}
-\def\flrow@@RawFloats#1,{%
- \flrow@raw@set{\@namedef{#1}{\@float{#1}}%
-    \@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}%
-  \@ifundefined{@rotfloat}{}{%
-    \@namedef{sideways#1}{\@rotfloat{#1}}%
-    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
-  }%
-  \@ifundefined{wrapfloat}{}{%
-    \@namedef{wrap#1}{\wrapfloat{#1}}}%
-  }\@ifnextchar;\@gobble\flrow@@RawFloats
-}
-\newcommand\flrow@Raw@restyle[1]{%
-    \@namedef{#1}{\@float{#1}}%
-    \@namedef{#1*}{\@dblfloat{#1}}%
-    \@namedef{end#1}{\end@float}%
-    \@namedef{end#1*}{\end@dblfloat}%
-  \@ifundefined{@rotfloat}{}{%
-    \@namedef{sideways#1}{\@rotfloat{#1}}%
-    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
-    \@namedef{endsideways#1}{\end@rotfloat}%
-    \@namedef{endsideways#1*}{\end@rotdblfloat}%
-  }%
-  \@ifundefined{wrapfloat}{}{%
-    \@namedef{wrap#1}{\wrapfloat{#1}}%
-    \@namedef{endwrap#1}{\endwrapfloat}%
-  }%
- }
-\newcommand\RawCaption[1]{{\let\@makecaption\FR@makecaption #1}}
-\@ifdefinable\float@exts{\newtoks\float@exts}
-\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}}
-\let\@float@Hx\@xfloat
-\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}}
-\AtBeginDocument{%
-  \@ifundefined{latex@xfloat}{}{%
-    \let\floatrow@ORI@xfloat\@xfloat
-    \def\@xfloat#1[#2]{%
-      \floatrow@ORI@xfloat{#1}[#2]%
-      \floatfont}}}%
-\newsavebox\float@box
-\def\@float@HH#1[H]{%
-  \@ifundefined{FloatHBarrier}{}\FloatHBarrier
-  \expandafter\let\csname end#1\endcsname\float@endH
-  \FR@ifdoubleaswide
-   {\expandafter\let\csname end#1*\endcsname\float@endH}\relax
-  \let\@currbox\float@box
-  \flrow@setlist*{{floatH}{#1H}}%
-  \def\@captype{#1}%\setbox\@floatcapt=\vbox{}%
-  \setbox\@currbox\color@vbox\normalcolor
-    \vbox\bgroup
-      \hsize\columnwidth
-      \linewidth\columnwidth
-      \@parboxrestore\leftmargin\z@\rightmargin\z@
-      \@floatboxreset \@setnobreak
-  \ignorespaces}
-\newcommand\flrow@flboxreset{\FR@flboxreset
-  \@ifundefined{capstart}{}{\capstart}%
-  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
-  \if@tempswa\FB@readaux{\relax}\fi
-  \global\let\FBcheight\relax\global\let\FBoheight\relax
-  \global\let\FBfheight\relax
-  \FBifcapbeside\FC@fs@wd\FB@fs@wd
-  \the\FR@everyfloat}
-\@ifdefinable\FBcheight{\let\FBcheight\relax}
-\@ifdefinable\FBoheight{\let\FBoheight\relax}
-\@ifdefinable\FBfheight{\let\FBfheight\relax}
-\newcommand\FB@fs@wd{\@tempdima\FBB@wd
-  \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\linewidth\hsize
-  \FBifcaptop
-    {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
-    {\columnwidth\FBc@wd}%
-  }
-\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
-  \FC@ifc@wd\@tempswatrue\@tempswafalse
-  \if@tempswa
-     \ifx\FCwidth\relax
-        \flrow@error{You didn't define width of caption\MessageBreak
-          for plain floating environment.}%
-     \else
-        \global\FBc@wd=\FCwidth
-        \FC@ifo@fil{\advance\@tempdima-\FBc@wd}\relax
-     \fi
-  \else
-    \global\FBc@wd\@tempdima
-  \fi
-  \FC@ifo@fil\relax{\@tempdima.5\@tempdima
-    \flrow@setwd\FB@wd\@tempdima}%
-  \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}%
-  \FC@ifc@wd\relax{\global\advance\FBc@wd-\FB@wd}%
-  \hsize\FBo@wd\linewidth\hsize\columnwidth\FBc@wd\linewidth\hsize
-  \FCset@vpos}
-\newcommand\float@makebox[1]{%
-  \FBifcapbeside{\flrow@FC{#1}}{\flrow@FB{#1}}}
-\newcommand\FBaskip{\z@}\newcommand\FBbskip{\z@}
-\newif\ifFBbuild\FBbuildtrue
-\newcommand\flrow@FB[1]{\vbox{\@tempdima=#1\vskip\FBaskip
-  \@parboxrestore\leftmargin\z@\rightmargin\z@
-  \hbox to\@tempdima{\def\FB@zskip{\vskip\z@}%
-  \FBleftmargin\flrow@FB@\FBrightmargin}%
-  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
-  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}%
-  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
-\newcommand\flrow@FC[1]{\vbox{\@tempdima=#1\@parboxrestore
-  \leftmargin\z@\rightmargin\z@\flrow@FClist\vskip\FBaskip
-  \hbox to\@tempdima{\FCleftmargin\flrow@FC@\FCrightmargin}%
-  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
-  \nocapbeside\global\let\FCwidth\relax
-  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
-\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}
-\newcommand\FBafil{\vfill}\newcommand\FBbfil{\vfill}
-\newcommand\FBw@box[1]{\hsize#1\columnwidth#1\linewidth#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}
-\newcommand\flrow@FB@{\global\let\flrow@typ@tmpset\undefined
- \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\leftmargin\z@\rightmargin\z@
-  \@@FBabove
-  \FBifcaptop\@tempswatrue\@tempswafalse
-  \if@tempswa
-    \ifvoid\@floatcapt\else
-      \FB@vbox\FBc@wd\FBcheight{\FBifCAPTOP\relax\vfill
-        \unvbox\@floatcapt
-        \ifnum\FPOScnt=\@ne\vbox{\FB@foot}\fi\vfil}%
-      \@@FBskip\hrule\@height\z@\@depth\z@
-    \fi
-    \vtop{\vskip\z@\FBo@frame{\FB@vtop\FBo@wd\FBoheight
-      {\FBafil\unvbox\@currbox\FBbfil
-      \vskip\z@
-      \ifnum\FPOScnt=\z@
-        \FB@vtop\FBo@wd\FBfheight{\FB@foot\vfil}\fi}}\par
-      \vskip\z@
-      \ifnum\FPOScnt=\tw@\vskip\z@
-        \FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi}%
-  \else\ifnum\FPOScnt=\z@\FPOScnt=\@ne\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=\@ne\vtop{\FB@foot}%
-    \fi\par
-        \vfill\vskip\z@\vss
-        \ifnum\FPOScnt=2\FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi
-        }\fi
-  \fi\@@FBbelow\FB@zskip\end@FBBOX
-  \global\setbox\@floatcapt\box\voidb@x}}
-\newcommand\flrow@FC@{\global\let\flrow@typ@tmpset\undefined
- \FB@frame{\begin@FBBOX
-   \adj@dim\FBo@wd+\FBo@wadj=\hsize
-   \settowidth\@tempdimb{\floatcapbesidesep}\advance\hsize\@tempdimb
-   \advance\hsize\FBc@wd\@parboxrestore\leftmargin\z@\rightmargin\z@
-   \@@FBabove
-    \hbox{\floatfacing*%
-      {\ifvoid\@floatcapt\else
-         \FCc@box{\FBw@box\FBc@wd\unvbox\@floatcapt\FB@foot}%
-         \floatcapbesidesep\fi
-       \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
-    \global\setbox\@floatcapt\box\voidb@x}}
-\newcommand\FB@foot{\let\FR@ifFOOT\@firstoftwo\FB@putfoots\@@par\FB@putfnotes}
-\newcommand\FB@zskip{}
-\newcommand\float@end{\ifFBbuild\@endfloatbox
-    \global\setbox\@currbox\float@makebox\columnwidth
-    \let\@endfloatbox\relax\fi
-  \end@float}
-\newcommand\floatHpenalties{}
-\newcommand\float@endH{\@endfloatbox\par
-  \FR@iffloatHaslist
-   {\floatHpenalties\relax
-    \addpenalty\@beginparpenalty}\relax
-  \vskip\intextsep
-  \ifFBbuild\setbox\@currbox\float@makebox\columnwidth\fi
-  \box\@currbox\par
-  \FR@iffloatHaslist
-   {\addpenalty\@endparpenalty\@endpetrue}\relax
-  \vskip\intextsep\relax}
-\newcommand\float@dblend{\ifFBbuild\@endfloatbox
-    \global\setbox\@currbox\float@makebox\textwidth
-    \let\@endfloatbox\relax\fi
-  \end@dblfloat}
-\newsavebox\@floatcapt
-\newcommand*{\listof}[2]{%
-  \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
-    \expandafter\providecommand\csname l@#1\endcsname
-        {\@dottedtocline{1}{1.5em}{2.3em}}%
-    \float@listhead{#2}%
-    \begingroup\setlength{\parskip}{\z@}%
-      \@starttoc{\@nameuse{ext@#1}}%
-    \endgroup}}
-\providecommand*{\float@listhead}[1]{%
-  \@ifundefined{chapter}{\def\@tempa{\section*}}%
-    {\def\@tempa{\chapter*}}%
-  \@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}%
-\newcommand\float@addtolists[1]{%
-  \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}
-\PackageInfo{floatrow}{Modified float package code loaded}
-\IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse}
-\if@tempswa
-  \let\rotfloat@HH\@float@HH
-  \def\@float@HH#1{%
-    \expandafter\let\csname endsideways#1\endcsname\float@endH
-    \let\end@float\relax
-    \rotfloat@HH{#1}}
-  \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}}
-\PackageInfo{floatrow}{Modified rotfloat package code loaded}
-\fi
-\@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat}
-\FR@everyfloat={\let\@footnotetext\@mpfootnotetext
-  \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
-  \floatobjectset\floatfont}
-\@ifdefinable\FR@ifFOOT{\let\FR@ifFOOT\@secondoftwo}
-\newcommand\FB@putfnotes{%
-  \ifvoid\@mpfootins\else\FR@ifFOOT
-    {\vskip\floatfootskip\normalcolor\FBfootnoterule
-    \unvbox\@mpfootins\@@par}\relax
-  \fi}
-\@ifdefinable\flrow@foot{\newinsert\flrow@foot}
-\newcommand\FB@putfoots{%
-  \ifvoid\flrow@foot\else\FR@ifFOOT
-    {\vskip\floatfootskip\normalcolor
-    \unvbox\flrow@foot\@@par}\relax
-  \fi}
-\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}}{}}
-\captionsetup[floatfoot]{labelformat=empty,labelsep=none}
-\newcommand\floatfoot{\@ifstar
-    {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}%
-    {\def\FR@tmp{\captionfootfont}\floatfoot@}}
-\newcommand\floatfoot@[1]{%
-  \global\setbox\flrow@foot\vbox{%
-  \floatfoot@box{#1}}}%
-\newcommand\floatfoot@box[1]{%
-  \@ifundefined{@captype}{\def\@captype{floatfoot}}{}%
-    \if@@FS\hsize\columnwidth\linewidth\columnwidth\fi
-    \@parboxrestore\reset@font\color@begingroup
-  \caption@setoptions{\@captype}%
-  \caption@setoptions{floatfoot}%
-     \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
-  \color@endgroup}
-\newcommand\newfloatcommand[2]{%
-  \@ifundefined{#1}{}%
-    {\flrow@error{\string#1 already defined}}%
-  \@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
-  \def\FB@tmpset{#3}\def\@captype{#2}%
-  \@ifnextchar[{\@floatbox}{\@floatbox[#4]}}}
-\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
-\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
-\newfloatcommand{fcapside}{figure}[\capbeside][]
-\@ifdefinable\FB@wd {\newdimen\FB@wd}
-\@ifdefinable\FBo@wd{\newdimen\FBo@wd}
-\@ifdefinable\FBc@wd{\newdimen\FBc@wd}
-\newlength\FBo@ht
-\newlength\FBc@ht
-\newlength\FBf@ht
-\newlength\FBo@max
-\newlength\FBc@max
-\newlength\FBf@max
-\newcommand\FR@loc@addcnt[2]{%
-  \@ifundefined{c@#1}{\@nocounterr{#1}}%
-    {\advance\csname c@#1\endcsname #2\relax}}
-\newcommand\FR@loc@refcnt[1]{%
-  \@ifundefined{c@#1}{\@nocounterr{#1}}%
-   {\advance\csname c@#1\endcsname1\relax}}
-\newcommand\FR@loc@{%
-  \let\FR@ifunloc\@gobble
-  \let\label\@gobble
-  \let\refstepcounter\FR@loc@refcnt
-  \let\stepcounter\FR@loc@refcnt
-  \let\refsteponlycounter\FR@loc@refcnt
-  \let\FR@ifcountH\@secondoftwo
-  \let\cl@@ckpt\empty\let\addtocounter\FR@loc@addcnt
-  \let\caption@kernel@addcontentsline\@gobbletwo
-  \let\caption@addcontentsline\@gobbletwo
-  \def\sf@updatecaptionlist##1##2##3##4{}}
-\def\FBtmp@cap#1[#2]#3{\sbox\@tempboxa{\captionlabel{#3}}%
-  \global\@tempdimb\wd\@tempboxa}
-\newcommand\captionlabel[1]{{\def\FR@tmp{\@captype}\ifnum\floatbox@depth>\@ne
-       \def\FR@tmp{sub\@captype}\caption@setsubtype*{\FR@tmp}\stepcounter{\FR@tmp}\fi
-   \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
-\newcommand\subcaptionlabel[1]{{\floatbox@depth\tw@\captionlabel{#1}}}
-\newcommand\FBget@box[3]{%
-  \FBiffloatrow\relax
-    {\ifx\FBB@wd\relax
-      \ifdim\hsize=\z@
-        \@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}%
-  \adj@dim\hsize-\FB@wadj=\@tempdima
-  \FBifcapbeside
-    {\FCget@@wd{#1}{#3}}%
-    {\nofilFCOhsize
-    \FBiffloatrow\relax
-      {\settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
-      \advance\@tempdima-\@tempdimb}}%
-  \FC@ifo@fil{\@tempdima\FB@wd}{\FB@wd\@tempdima}%
-  \adj@dim\@tempdima-\FBo@wadj=\FBo@wd
-  \FBiffloatrow\relax{\hsize\FBo@wd}%
-  \FBifcapbeside{\hsize\FB@wd}\relax
-  \linewidth\hsize
-  \def\reserved@a{#1}\ifx\reserved@a\empty
-    \else\FBget@@wd{#1}{#3}\fi
-  \hsize\FBo@wd\linewidth\hsize
-  \FBifcapbeside
-    {\FC@ifc@wd\relax{\advance\FBc@wd-\FB@wd}}%
-    {\FBc@wd\FB@wd}%
-  \setbox\z@\vbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@\hsize\FBo@wd\linewidth\hsize
-    \FBifcaptop
-      {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
-      {\columnwidth\FBc@wd}%
-    #3}%
-  \FBc@ht\ht\@floatcapt\advance\FBc@ht\dp\@floatcapt
-  \FBo@ht\ht\z@\advance\FBo@ht\dp\z@\let\FBheight\FBo@ht
-  \setbox\tw@\vbox{\null\par\FB@foot\par}%
-  \FBf@ht\ht\tw@\advance\FBf@ht\dp\tw@
-  \FBiffloatrow
-    {\ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
-    \ifCADJ
-      \FBifcaptop
-        {\ifnum\FPOScnt=\@ne\global\advance\FBc@ht\FBf@ht\fi}%
-        {\ifnum\FPOScnt=\tw@
-          \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}%
-      \ifdim\FBc@ht>\FBc@max\global\FBc@max\FBc@ht\fi
-      \gdef\FBcheight{\FBc@ht}\gdef\FBfheight{\FBf@ht}%
-    \fi}\relax
-  \def\reserved@a{#2}\ifx\reserved@a\empty
-    \FBiffloatrow{\ifOADJ
-      \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
-      \FBifcaptop
-        {\ifnum\FPOScnt=\z@
-          \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
-        \fi}\relax
-      \gdef\FBoheight{\FBo@ht}\gdef\FBfheight{\FBf@ht}%
-    \fi}\relax
-  \else
-     \FBget@@ht{#2}{#3}%
-  \fi}
-\newcommand\FCget@@wd[2]{\flrow@FClist
-  \FBiffloatrow\relax
-    {\settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
-    \advance\@tempdima-\@tempdimb\advance\hsize-\@tempdimb}%
-  \settowidth\@tempdimb{\floatcapbesidesep}\advance\@tempdima-\@tempdimb
-  \FC@ifo@fil{\FB@wd\@tempdima}\relax
-  \FC@ifc@wd\@tempswatrue\@tempswafalse
-  \if@tempswa
-    \ifx\FCwidth\relax
-      \setbox\@ne\vbox{\FR@loc@
-        \let\caption\flrow@caption
-        \let\@caption\FBtmp@cap
-         #2}%
-      \FBc@wd=\@tempdimb
-    \else
-      \FBc@wd=\FCwidth
-    \fi\FC@ifo@fil{\advance\FB@wd-\FBc@wd}\relax
-  \else
-    \FBc@wd\@tempdima
-  \fi
-  \@tempdima.5\@tempdima}
-\newcommand\flrow@gobble@[2][]{\unskip\ignorespaces}
-\newcommand\flrow@gobble{%
-    \let\caption\flrow@gobble@
-    \let\floatfoot\flrow@gobble@
-    \let\footnote\flrow@gobble@
-    \let\footnotetext\flrow@gobble@
-    }
-\newcommand\FBget@@wd[2]{\@tempswafalse
-  \begingroup
-    \@tempdima-3000pt\let\FBwidth\@tempdima
-    \setlength\dimen@{#1}\ifdim\dimen@<\z@\global\@tempswatrue\fi
-  \endgroup
-  \if@tempswa
-    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
-    \FBo@wd\wd\z@\let\FBwidth\FBo@wd
-    \setlength\FBo@wd{#1}%
-    \advance\FBo@wd\leftskip\advance\FBo@wd\rightskip
-    \adj@dim\FBo@wd+\FBo@wadj=\FB@wd
-    \setbox\flrow@foot\box\voidb@x
-    \setbox\@mpfootins\box\voidb@x
-  \else
-    \setlength\FB@wd{#1}%
-    \adj@dim\FB@wd-\FB@wadj=\FB@wd
-    \adj@dim\FB@wd-\FBo@wadj=\FBo@wd
-    \let\FBwidth\FBo@wd
-  \fi}
-\newcommand\FBget@@ht[2]{\@tempswafalse
-  \begingroup
-    \@tempdimb-3000pt\let\FBheight\@tempdimb
-    \setlength\dimen@{#1}\ifdim\dimen@<\z@
-      \global\@tempswatrue\fi
-  \endgroup
-  \if@tempswa
-    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
-    \FBo@ht\ht\z@\advance\FBo@ht\dp\z@
-    \let\FBheight\FBo@ht\setlength\FBo@ht{#1}%
-    \adj@dim\FBo@ht+\FBo@hadj=\FBo@ht
-    \FBifcaptop{\ifnum\FPOScnt=\z@\advance\FBo@ht\FBf@ht\fi}\relax
-  \else
-    \setlength\FBo@ht{#1}%
-    \adj@dim\FBo@ht-\FBo@hadj=\FBo@ht
-    \adj@dim\FBo@ht-\FB@hadj=\FBo@ht
-    \setbox\z@\vbox{\offinterlineskip\vbox{\@@FBabove}%
-      \FBifcapbeside\relax{\@@FBskip\hrule\@height\z@\@depth\z@}%
-      \vtop{\@@FBbelow}}%
-    \global\advance\FBo@ht-\ht\z@\global\advance\FBo@ht-\dp\z@
-    \FBifcapbeside\relax\FBget@@@ht
-  \fi
-  \FBiffloatrow{\ifOADJ
-    \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
-  \fi}\relax
-  \def\FBoheight{\FBo@ht}}
-\newcommand\FBget@@@ht{%
-    \ifdim\FBc@ht>\FBc@max
-      \global\advance\FBo@ht-\FBc@ht
-    \else
-      \global\advance\FBo@ht-\FBc@max
-    \fi
-    \FBifcaptop{\ifnum\FPOScnt=\@ne\else
-      \ifdim\FBf@ht>\FBf@max
-        \global\advance\FBo@ht-\FBf@ht
-      \else
-        \global\advance\FBo@ht-\FBf@max
-      \fi
-    \fi}\relax
-  }
-\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}}}
-\newcounter{FBl@b}
-\@ifdefinable\FR@ifFCBOX{\let\FR@ifFCBOX\@secondoftwo}
-\newcommand\FBs@raise{\raisebox{-\totalheight}}
-\newcommand\FBf@raise{}
-\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}%
-    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{-\height}}}%
-     {\gdef\FBf@raise{}}%
-    \gdef\FBs@raise{\raisebox{-\totalheight}}%
-  \or\gdef\FC@bbox{\vbox\@parboxto\bgroup}\gdef\FC@ebox{\vskip\z@\egroup}%
-    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{\depth}}}%
-     {\gdef\FBf@raise{}}%
-    \gdef\FBs@raise{}\fi}
-\@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}
-\newcommand\floatbox[2][]{\begingroup
-  \def\FB@tmpset{#1}\def\@captype{#2}%
-  \@ifnextchar[{\@floatbox}{\@floatbox[]}}
-\@ifdefinable\@floatbox{}\@ifdefinable\@@floatbox{}
-\def\@floatbox[#1]{%
-  \@ifnextchar[{\@@floatbox[#1]}{\@@floatbox[#1][]}}
-\@ifdefinable\floatbox@depth{\newcount\floatbox@depth}
-\def\@@floatbox[#1][#2]{%
-  \@ifnextchar[{\@@@floatbox[#1][#2]}{\@@@floatbox[#1][#2][]}}%]
-\@ifdefinable\@@@floatbox{}
-\long\def\@@@floatbox[#1][#2][#3]#4#5{\advance\floatbox@depth\@ne
-  \@FB@vpos{#3}%
-  \if@@FS\else\FR@redefs
-    \ifcase\floatbox@depth\or
-      \flrow@setlist{{\@captype}}\or
-      \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
-    \fi
-    \FRifFBOX\@@setframe\relax\@@FStrue
-  \fi
-  \FB@tmpset
-  \FBifcapbeside\flrow@FClist\relax
-  \@parboxrestore\leftmargin\z@\rightmargin\z@
-  \floatobjectset\floatfont
-  \FBget@box{#1}{#2}{#4#5}%
-  \FBifcapbeside\FCset@vpos\relax
-  \FBiffloatrow{\FR@floatbox{\@ifundefined{capstart}{}{\capstart}#4#5}}%
-   {\adj@dim\FB@wd+\FB@wadj=\hsize\linewidth\hsize
-    \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi
-    \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}\let\FBB@wd\relax
-    #4#5}\FBbuildtrue
-    \FBifcapbeside{\flrow@FC\FBB@wd}{\flrow@FB\FBB@wd}%
-    \global\FBbuildfalse
-    \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
-   }\advance\floatbox@depth\m@ne
-  \endgroup\ignorespaces}
-\newcommand\FR@floatbox[1]{\@tempswafalse
-    \ifOADJ\@tempswatrue\fi\ifCADJ\@tempswatrue\fi
-    \if@tempswa\@ifundefined{FB@@boxmax}{}{\FB@@boxmax}\fi
-    \FBsetbox@obj{#1}\begin@FBBOX
-      \FBifcapbeside\flrow@FC@\flrow@FB@
-    \end@FBBOX
-    \addtocounter{FRobj}\m@ne
-    \@tempswafalse\FR@iffacing\@tempswatrue\relax
-    \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
-    \advance\Xhsize-\FB@wd
-    \FBifcapbeside
-      {\advance\Xhsize-\FBc@wd
-       \FR@ifcountH{\global\advance\Zhsize-\FBc@wd}\relax
-       \settowidth\@tempdimb{\floatcapbesidesep}%
-       \advance\Xhsize-\@tempdimb
-       \FR@ifcountH{\global\advance\Zhsize-\@tempdimb}\relax}\relax
-    \ifnum\c@FRobj=\z@
-      \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
-      \floatrowsep
-      \adj@dim\Xhsize-\FB@wadj={\global\Xhsize}%
-      \adj@dim\Zhsize-\FB@wadj={\global\Zhsize}%
-    \fi}
-\newcommand\FBsetbox@obj[1]{%
-  \setbox\float@box\color@vbox\normalcolor
-  \FBifcaptop
-     {\FB@vtop\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
-      \ifnum\FPOScnt=\z@\columnwidth\FBo@wd\else\columnwidth\FBc@wd\fi}%
-     {\FB@vbox\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
-      \columnwidth\FBc@wd}%
-  #1\FBbfil\egroup\color@endbox
-  \let\@currbox\float@box}
-\@ifdefinable\FBiffloatrow{\let\FBiffloatrow\@secondoftwo}
-\newcounter{FRobj}
-\newcounter{FRsobj}
-\newlength\Xhsize
-\newlength\sXhsize
-\newlength\Zhsize
-\newlength\sZhsize
-\newcommand\flrow@to{to\hsize}
-\newcommand\flrow@boxset[1]{#1}
-\newcommand\flrow@setrowhbox{%
-\FR@ifROWFILL{\def\flrow@left{\hskip\leftskip}\def\flrow@right{\hskip\rightskip}%
-  }{\let\flrow@to\empty\def\flrow@left{}\def\flrow@right{}}%
-}
-\newcommand\flrow@left{}\newcommand\flrow@right{}
-\newcommand\flrow@hbox@bgroup{\hbox\flrow@to
-    \bgroup\flrow@left}
-\newcommand\flrow@hbox@egroup{\flrow@right
-    \egroup}
-\newbox\flrow@rowbox
-\newcommand\floatrow[1][2]{\c@FRobj=#1\relax
-  \ifcase\floatbox@depth
-    \flrow@setlist*{{floatrow}{\@captype row}}%
-  \or
-    \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
-    \flrow@settype{subfloatrow}\flrow@settype{sub\@captype row}%
-    \ifx\flrow@to\empty\def\flrow@boxset##1{}\fi
-  \fi%
-  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
-  \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
-  \if@tempswa\FB@readaux{\relax}\fi
-  \flrow@boxset{\ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\else\hsize\FBB@wd\fi}%
-  \ifnum\floatbox@depth=\z@\vspace\FBaskip\else\leavevmode\fi
-  \hbox\flrow@to\bgroup%outer h box
-  \FRleftmargin
-  \flrow@boxset{\hsize\FBB@wd
-     \settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}\advance\hsize-\@tempdima}%
-  \bgroup\ifx\FR@frame\empty\else\def\FB@frame{}\def\FB@wadj{}\def\FB@hadj{}\fi%frame set
-  \flrow@boxset{\adj@dim\hsize-\FR@wadj=\hsize}%
-  \setbox\flrow@rowbox\vbox\bgroup%v box
-        \@@FRabove
-    \flrow@setrowhbox
-    \flrow@hbox@bgroup\let\FBiffloatrow\@firstoftwo
-      \Xhsize\hsize\count@#1\advance\count@\m@ne
-      \settowidth\@tempdima{\floatrowsep}\advance\Xhsize-\count@\@tempdima
-      \@tempdimb\Xhsize
-      \FR@iftwolevel
-        {\ifnum\floatbox@depth=\z@\Zhsize\Xhsize\else
-            \ifdim\Zhsize=\z@\Zhsize\Xhsize\sZhsize\Xhsize\fi
-            \FR@ifcountH{\global\advance\Zhsize-\count@\@tempdima}\relax
-         \fi}{\@tempdimb\Xhsize\Zhsize\Xhsize}%
-      \divide\@tempdimb#1\relax\FB@wd\@tempdimb
-      \hsize\@tempdimb\ignorespaces}
-\def\endfloatrow{\ifdim\lastskip>\z@\unskip\fi
-      \flrow@hbox@egroup%h box
-    \@@FRbelow
-    \egroup%v box
-    \FR@frame{\box\flrow@rowbox}%
-    \egroup%frame set
-    \FRrightmargin\egroup%outer h box
-    \ifnum\floatbox@depth=\z@\vspace\FBbskip\fi
-  \gdef\FBaskip{\z@}\gdef\FBbskip{\z@}%
-  \global\FBf@max\z@\global\FBo@max\z@\global\FBc@max\z@
-  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
-\newenvironment{subfloatrow}{\capsubrowsettings
-    \captionsetup{subtype}\@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
-\newcommand\capsubrowsettings{\caption@setoptions{subfloatrow}\caption@setoptions{sub\@captype row}}
-\newenvironment{subfloatrow*}[1][2]{\let\flrow@to\empty
-    \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
-    \FR@ifunloc{\let\FR@ifcountH\@firstoftwo}\let\c@FRobj\c@FRsobj
-    \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
-    \floatrow[#1]\killfloatstyle}{\ifdim\lastskip>\z@\unskip\fi
-     \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
-\newcommand\subfloatrowsep{\hskip\columnsep}
-\@ifdefinable\FR@ifcountH{\let\FR@ifcountH\@firstoftwo}
-\@ifdefinable\FR@ifunloc{\let\FR@ifunloc\@firstofone}
-\@ifdefinable\FR@iftwolevel{\let\FR@iftwolevel\@secondoftwo}
-\newcommand\CommonHeightRow{\@ifstar
-    {\let\FR@iftwolevel\@firstoftwo\CommonHeightRow@
-   }{\let\FR@iftwolevel\@secondoftwo\CommonHeightRow@}}
-\newcommand\DefaultCommonHeight{25pt}
-\newcommand\CommonHeight{\DefaultCommonHeight}
-\newcommand\CommonHeightRow@[2][\DefaultCommonHeight]{\def\CommonHeight{#1}\setbox\z@
-    \hbox{\FR@loc@\let\FR@ifunloc\@firstofone#2}%
-    \ifcase\floatbox@depth\def\@tempa{\Xhsize}\def\@tempb{\Zhsize}\or
-        \def\@tempa{\sXhsize}\def\@tempb{\Zhsize}\fi
-    \FR@calc@CommonHeight#2}
-\@ifdefinable\FR@Zunitlength{\newdimen\FR@Zunitlength}
-\newcommand\FR@calc@CommonHeight{%
-    \@tempdima\@tempb\advance\@tempdima-\@tempa
-    \count@\@tempdima\relax\divide\count@16384\relax
-    \divide\@tempb\count@\relax\FR@Zunitlength\@tempb\relax
-    \@tempdima\CommonHeight\relax
-    \count@\@tempdima\relax\divide\count@16384\relax
-    \@tempdima\count@\FR@Zunitlength\relax
-    \edef\CommonHeight{\the\@tempdima}}
-\newcommand\begin@FBBOX{\vbox\bgroup}
-\def\end@FBBOX{\egroup}
-\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse
-  \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip\z@}%
-             {\vskip\z@\egroup$\egroup}}
-\newcommand\TopFloatBoxes{\CADJfalse\OADJfalse
-  \buildFBBOX{\vtop\bgroup\vskip\z@}{\egroup}}
-\newcommand\BottomFloatBoxes{\CADJfalse\OADJfalse
-  \buildFBBOX{\vbox\bgroup}{\vskip\z@\egroup}}
-\newcommand\PlainFloatBoxes{%
-  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
-\newcommand\buildFBBOX[2]{\gdef\begin@FBBOX{#1}\gdef\end@FBBOX{#2}}
-\def\newdimentocommand  #1#2#3{%
-    #1\@tempdima{#3}\@ifdefinable#2{\xdef#2{\the\@tempdima}}}
-\def\renewdimentocommand#1#2#3{%
-    #1\@tempdima{#3}\xdef#2{\the\@tempdima}}
-\def\newskiptocommand   #1#2#3{%
-    #1\@tempskipa{#3}\@ifdefinable#2{\xdef#2{\the\@tempskipa}}}
-\def\renewskiptocommand #1#2#3{%
-    #1\@tempskipa{#3}\xdef#2{\the\@tempskipa}}
-\def\newlengthtocommand{\newskiptocommand}
-\def\renewlengthtocommand{\renewskiptocommand}
-\newcommand*\flrow@setbool[1]{%
-  \expandafter\caption@set@bool\csname FR@if#1\endcsname}
-\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}}}
-\newcommand\thisfloatsetup{\floatsetup[tmpset]}
-\def\flrow@setup{\caption@setkeys[floatrow]{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}}}%
-\newcommand\flrow@setlist{\@ifstar\flrow@setlist@@\flrow@setlist@}
-\newcommand\flrow@setlist@[1]{\@flrow@setlist#1{tmpset};%
-  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
-  \caption@setposition{\FBifcaptop tb}}
-\newcommand\flrow@setlist@@[1]{\@flrow@setlist#1;%
-  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
-  \caption@setposition{\FBifcaptop tb}}
-\newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble
-  \@flrow@setlist}
-\@ifundefined{caption@setoptions}{\let\caption@setoptions\caption@settype}{}
-\newcommand\@cap@setlist[1]{\caption@setoptions{#1}%
-   \@ifnextchar;{\let\caption@setfloattype\@gobble\@gobble}\@cap@setlist}
-\newcommand\flrow@FClist{\flrow@setlist
-  {{floatbeside}{capbesidefloat}{\@captype beside}{capbeside\@captype}}}
-\newcommand*\clearfloatsetup[1]{\@nameundef{flrow@typ@#1}}
-\newcommand\DeclareFROpt{%
-  \@ifstar{\flrow@declopt\AtEndOfPackage}
-          {\flrow@declopt\@gobble}}
-\newcommand*\flrow@declopt[2]{%
-  #1{\undefine@key{floatrow}{#2}}\define@key{floatrow}{#2}}
-\@onlypreamble\DeclareFROpt
-\@onlypreamble\flrow@declopt
-\@ifdefinable\FR@ifrawfloats{\let\FR@ifrawfloats\@secondoftwo}
-\DeclareFROpt*{rawfloats}[0]{\flrow@setbool{rawfloats}{#1}}
-\@ifdefinable\FR@ifdoubleaswide{\let\FR@ifdoubleaswide\@secondoftwo}
-\DeclareFROpt{doublefloataswide}[0]{\flrow@setbool{doubleaswide}{#1}}
-\@ifdefinable\FR@iffloatHaslist{\let\FR@iffloatHaslist\@secondoftwo}
-\DeclareFROpt{floatHaslist}[0]{\flrow@setbool{floatHaslist}{#1}}
-\newcommand*\DeclareFloatStyle[2]{%
-  \global\@namedef{flrow@sty@#1}{#2}}
-\@onlypreamble\DeclareFloatStyle
-\newcommand*\flrow@setstyle[1]{%
-  \@ifundefined{flrow@sty@#1}%
-    {\flrow@error{Undefined float style `#1'}}%
-    {\FBstyle@reset
-     \def\flrow@capsetup{%
-        \@ifundefined{caption@sty@#1}{}{\caption@setstyle*{#1}}%
-        \caption@setoptions {#1}}%
-     \flrow@esetup{\csname flrow@sty@#1\endcsname}}}
-\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}
-\DeclareFloatStyle{default}{%
-     style=plain,captionskip=10pt,
-     margins=centering,objectset=centering,
-     capbesideposition=left,facing=no,
-     floatrowsep=columnsep,capbesidesep=columnsep,
-     font=default,footfont=footnotesize}
-\DeclareFROpt{style}{\flrow@setstyle{#1}}
-\@ifdefinable\FR@ifCST{\let\FR@ifCST\@firstoftwo}
-\DeclareFROpt{relatedcapstyle}[0]{\flrow@setbool{CST}{#1}}
-\DeclareFROpt{font}{\flrow@setfont{font}{#1}}
-\DeclareFROpt{footfont}{\captionsetup[floatfoot]{font={#1}}}
-\DeclareCaptionOption{footfont}{\caption@setfont{footfont}{#1}}
-\@ifdefinable\floatfont{\let\floatfont\empty}
-\newcommand*\captionfootfont{\normalfont\footnotesize}
-\let\DeclareFloatFont\DeclareCaptionFont
-\@onlypreamble\DeclareFloatFont
-\newcommand*\flrow@setfont[2]{%
-   \caption@setfont{@tempa}{#2}%
-   \expandafter\let\csname float#1\endcsname\caption@tempa}
-\DeclareFROpt{capposition}{\flrow@cappos{#1}}
-\DeclareFROpt{position}{\flrow@cappos{#1}}
-\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
-  }{\flrow@error{Undefined caption position `#1'}%
-  }}}}}
-\@ifdefinable\FBifcaptop{\let\FBifcaptop\@secondoftwo}
-\newcommand\captop{\let\FBifcaptop\@firstoftwo}
-\newcommand\capbot{\let\FBifcaptop\@secondoftwo}
-\@ifdefinable\FBifCAPTOP{\let\FBifCAPTOP\@secondoftwo}
-\newcommand\CAPTOP{\captop\let\FBifCAPTOP\@firstoftwo\CADJtrue}
-\@ifdefinable\FBifcapbeside{}\let\FBifcapbeside\@secondoftwo
-\newcommand\capbeside{\let\FBifcapbeside\@firstoftwo}
-\newcommand\nocapbeside{\let\FBifcapbeside\@secondoftwo}
-\DeclareFROpt{capbesideframe}[0]{\flrow@setbool{FCBOX}{#1}}
-\DeclareFROpt{capbesidewidth}[1]{\flrow@FCc@wd{#1}}
-\@ifdefinable\FC@ifc@wd{\let\FC@ifc@wd\@secondoftwo}
-\newcommand\useFCwidth{\let\FC@ifc@wd\@firstoftwo\let\FCwidth\relax}
-\@ifdefinable\FCwidth{\let\FCwidth\relax}
-\newcommand\flrow@FCc@wd[1]{%
-  \caption@ifinlist{#1}{none,sidefil}{\let\FC@ifc@wd\@secondoftwo
-  }{\useFCwidth\def\FCwidth{#1}}}
-\DeclareFROpt{capbesideposition}{\flrow@scpos{#1}}
-\newcommand\DeclareSCPos[2]{%
-  \define@key{flrow@scpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
-\newcommand*\flrow@scpos[1]{%
-  \let\FR@tmp\@empty
-  \begingroup\caption@setkeys[floatrow]{flrow@scpos}{#1}\endgroup
-  \FR@tmp}
-\@onlypreamble\DeclareSCPos
-\DeclareSCPos{left}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}}
-\DeclareSCPos{right}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\z@}}
-\DeclareSCPos{inside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
-    \count@\c@FBcnt\ifnum\count@=\z@\count@\@ne\fi
-  }}
-\DeclareSCPos{outside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
-    \count@\c@FBcnt\ifnum\count@=\z@\else\advance\count@\@ne\fi
-  }}
-\DeclareSCPos{center}{\def\@FC@vpos{\count@\z@}}
-\DeclareSCPos{top}{\def\@FC@vpos{\count@\@ne}}
-\DeclareSCPos{bottom}{\def\@FC@vpos{\count@\tw@}}
-\newcommand*\@FC@vpos{\count@\tw@}
-\newcommand*\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}
-\newcounter{FBcnt}
-\DeclareFROpt{footposition}{\flrow@ftpos{#1}}
-\newcommand\DeclareFtPos[2]{%
-  \define@key{flrow@ftpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
-\newcommand*\flrow@ftpos[1]{%
-  \let\FR@tmp\@empty
-  \begingroup\caption@setkeys[floatrow]{flrow@ftpos}{#1}\endgroup
-  \FR@tmp}
-\@onlypreamble\DeclareFtPos
-\@ifdefinable\FPOScnt{\newcount\FPOScnt}
-\DeclareFtPos{caption}{\FPOScnt1\relax}
-\DeclareFtPos{bottom}{\FPOScnt2\relax}
-\DeclareFtPos{default}{\FPOScnt0\relax}
-\DeclareFROpt{heightadjust}{\flrow@htadj{#1}}
-\newcommand\DeclareHtAdj[2]{%
-  \define@key{flrow@htadj}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
-\newcommand*\flrow@htadj[1]{\let\FR@tmp\@empty
-  \begingroup\caption@setkeys[floatrow]{flrow@htadj}{#1}\endgroup
-  \FR@tmp}
-\@onlypreamble\DeclareHtAdj
-\DeclareHtAdj{all}{\CADJtrue\OADJtrue}
-\DeclareHtAdj{caption}{\CADJtrue}
-\DeclareHtAdj{object}{\OADJtrue}
-\DeclareHtAdj{none}{\CADJfalse\OADJfalse}
-\DeclareHtAdj{nocaption}{\CADJfalse}
-\DeclareHtAdj{noobject}{\OADJfalse}
-\newif\ifCADJ
-\newif\ifOADJ
-\DeclareFROpt{valign}{\@FB@vpos{#1}}
-\newcommand\@FB@vpos[1]{%
-  \if#1t\def\FBafil{}\def\FBbfil{\vss}\else
-     \if#1b\def\FBafil{\vss}\def\FBbfil{}\else
-        \if#1c\def\FBafil{\vskip0ptplus1fillminus1000pt}%
-              \def\FBbfil{\vskip0ptplus1fillminus1000pt}\else
-           \if#1s\def\FBafil{\vskip0ptminus1000pt}%
-                 \def\FBbfil{\vskip0ptminus1000pt}%
-  \fi\fi\fi\fi}
-\@ifdefinable\FR@iffacing{\let\FR@iffacing\@secondoftwo}
-\DeclareFROpt{facing}[1]{\flrow@setbool{facing}{#1}}
-\newcommand\FB@facing{}
-\DeclareFROpt{margins}{\flrow@FBAlign{#1}}
-\newcommand*\flrow@FBAlign[1]{%
-  \@ifundefined{flrow@mj@#1}%
-    {\flrow@error{Undefined float alignment `#1'}}%
-    {\@nameuse{flrow@mj@#1}}}
-\newcommand*\DeclareMarginSet[2]{%
-  \global\@namedef{flrow@mj@#1}{#2}}
-\@onlypreamble\DeclareMarginSet
-\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@}
-\newskip\LTleft\newskip\LTright
-\DeclareMarginSet{hangleft}{\setfloatmargins
-    {\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
-  \LTleft-\marginparwidth\advance\LTleft-\marginparsep
-  \LTright=\fill}
-\DeclareMarginSet{hangright}{\setfloatmargins
-    {\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
-  \LTleft=\fill
-  \LTright-\marginparwidth\advance\LTright-\marginparsep}
-\DeclareMarginSet{hanginside}{\setfloatmargins
-    *{\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
-  }
-\DeclareMarginSet{hangoutside}{\setfloatmargins
-    *{\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
-  }
-\newcommand\flrow@mj@default{\flrow@mj@centering}
-\newcommand\floatfacing{\@ifstar
-  {\@FC@hpos\floatfacing@}{\FB@facing\floatfacing@}}
-\newcommand\floatfacing@[2]{\ifodd\count@#1\else#2\fi}
-\newcommand\floatboxmargins{\def\FR@tmp{FB}\FB@mset}
-\newcommand\floatrowmargins{\def\FR@tmp{FR}\FB@mset}
-\newcommand\floatcapbesidemargins{\def\FR@tmp{FC}\FB@mset}
-\newcommand\FB@mset{\@ifstar{\FB@mset@}{\FB@@mset}}
-\newcommand\FB@mset@[2]{%
-  \def\FB@facing{\let\FR@iffacing\@firstoftwo\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}}
-\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}}
-\setfloatmargins\hfill\hfill
-\DeclareFROpt{objectset}{\flrow@FBoAlign{#1}}
-\DeclareFROpt{justification}{\flrow@FBoAlign{#1}}
-\let\DeclareObjectSet\DeclareCaptionJustification
-\@onlypreamble\DeclareObjectSet
-\newcommand*\flrow@FBoAlign[1]{%
-  \@ifundefined{caption@hj@#1}%
-    {\flrow@error{Undefined object setting `#1'}}%
-    {\expandafter\let\expandafter\floatobjectset
-     \csname caption@hj@#1\endcsname}}
-\newcommand*\floatobjectset{\centering}
-\DeclareFROpt{floatwidth}{\flrow@FBo@wd{#1}}
-\@ifdefinable\FC@ifo@fil{\let\FC@ifo@fil\@secondoftwo}
-\newcommand\filFCOhsize{\let\FC@ifo@fil\@firstoftwo}
-\newcommand\nofilFCOhsize{\let\FC@ifo@fil\@secondoftwo}
-\newcommand\flrow@setwd{\relax}
-\newcommand\flrow@FBo@wd[1]{%
-  \caption@ifinlist{#1}{none,sidefil}{\filFCOhsize
-  }{\nofilFCOhsize\def\flrow@setwd{\@tempdima=#1}}}
-\DeclareFROpt{floatrowsep}{\flrow@setFRsep\floatrowsep{#1}}
-\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}}
-\DeclareFROpt{capbesidesep}{\flrow@setFRsep\floatcapbesidesep{#1}}
-\let\DeclareFloatSeparators\DeclareCaptionLabelSeparator
-\@onlypreamble\DeclareFloatSeparators
-\newcommand*\flrow@setFRsep[2]{%
-  \@ifundefined{caption@lsep@#2}%
-    {\flrow@error{Undefined float separator `#2'}}%
-    {\expandafter\let\expandafter#1\csname caption@lsep@#2\endcsname}}
-\DeclareFloatSeparators{columnsep}{\hskip\columnsep}
-\DeclareFloatSeparators{qquad}{\qquad}
-\DeclareFloatSeparators{fil}{\hskip\columnsep plus1fil}
-\DeclareFloatSeparators{fill}{\hskip\columnsep plus1fill}
-\newcommand\floatrowsep{\hskip\columnsep}
-\newcommand\floatcapbesidesep{\hskip\columnsep}
-\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}}
-\newcommand\DeclareFloatVCode[2]{\@namedef{flrow@FBr@#1}{#2}}
-\@onlypreamble\DeclareFloatVCode
-\newcommand*\flrow@FBrule[3]{%
-  \@ifundefined{flrow@FBr@#3}%
-    {\flrow@error{Undefined rule `#3'}}%
-    {\let#1\empty
-     \expandafter\let\expandafter#2\csname flrow@FBr@#3\endcsname}}
-\newcommand*\flrow@FRrule[3]{%
-  \@ifundefined{flrow@FBr@#3}%
-    {\flrow@error{Undefined rule `#3'}}%
-    {\def#2{\FBiffloatrow\relax{\@nameuse{flrow@FBr@#3}}}%
-     \expandafter\let\expandafter#1\csname flrow@FBr@#3\endcsname}}
-\newcommand*\flrow@FBskip[1]{%
-  \@ifundefined{flrow@FBr@#1}%
-    {\flrow@error{Undefined rule `#1'}}%
-    {\expandafter\let\expandafter\@@FBskip\csname flrow@FBr@#1\endcsname}}
-\DeclareFloatVCode{none}{}
-\DeclareFloatVCode{thickrule}{\par\rule{\hsize}{.8pt}\vskip2pt\par}
-\DeclareFloatVCode{rule}{\vskip2pt\hrule\vskip2pt}
-\DeclareFloatVCode{lowrule}{\par\vskip2pt\rule\hsize\@wholewidth\par}
-\DeclareFloatVCode{captionskip}{\vskip\captionskip}
-\newcommand\FBstyle@reset{\let\FRifFBOX\@secondoftwo\OADJfalse\CADJfalse\capbot
-  \def\@@FBskip{\vskip\captionskip}\def\@@FRabove{}\def\@@FRbelow{}%
-  \def\@@FBabove{}\def\@@FBbelow{}%
-  \def\FB@Bset{}\def\FB@frame{}\def\FBo@frame{}\def\FR@frame{}%
-  \def\FBo@wadj{}\def\FBo@hadj{}\def\FB@wadj{}\def\FB@hadj{}\def\FR@wadj{}\def\FR@hadj{}}
-\newcommand\@@FBskip{\vskip\captionskip}
-\@ifdefinable\@@FRabove{\def\@@FRabove{}}
-\@ifdefinable\@@FRbelow{\def\@@FRbelow{}}
-\@ifdefinable\@@FBabove{\def\@@FBabove{}}
-\@ifdefinable\@@FBbelow{\def\@@FBbelow{}}
-\@ifdefinable\FB@frame {\def\FB@frame {}}
-\@ifdefinable\FBo@frame{\def\FBo@frame{}}
-\@ifdefinable\FR@frame {\def\FR@frame {}}
-\@ifdefinable\FBo@wadj {\def\FBo@wadj {}}
-\@ifdefinable\FBo@hadj {\def\FBo@hadj {}}
-\@ifdefinable\FB@wadj  {\def\FB@wadj  {}}
-\@ifdefinable\FB@hadj  {\def\FB@hadj  {}}
-\@ifdefinable\FR@wadj  {\def\FR@wadj  {}}
-\@ifdefinable\FR@hadj  {\def\FR@hadj  {}}
-\@ifdefinable\FB@Bset  {\def\FB@Bset  {}}
-\DeclareFROpt{framestyle}{\@ifundefined{FB@#1@frame}%
-  {\let\FRifFBOX\@secondoftwo}{\let\FRifFBOX\@firstoftwo\def\FB@B@{#1}}}
-\DeclareFROpt{framearound}{\flrow@fr@round{#1}}
-\newcommand*\flrow@fr@round[1]{%
- \caption@ifinlist{#1}{object,contents}{\let\FRifFBOX\@firstoftwo
-    \def\FB@BO@{FBo}%
-  }{\caption@ifinlist{#1}{floatbox,all}{\let\FRifFBOX\@firstoftwo
-    \def\FB@BO@{FB}%
-  }{\caption@ifinlist{#1}{row}{\let\FRifFBOX\@firstoftwo
-    \def\FB@BO@{FR}%
-  }{\caption@ifinlist{#1}{none}{\let\FRifFBOX\@secondoftwo
-  }{\flrow@error{Undefined framed object `#1'}%
-  }}}}}
-\@ifdefinable\FR@ifFIT{\let\FR@ifFIT\@secondoftwo}
-\@ifdefinable\FR@ifROWFILL{\let\FR@ifROWFILL\@secondoftwo}
-\DeclareFROpt{framefit}[0]{\flrow@setbool{FIT}{#1}}
-\@ifdefinable\flrow@@setROWFILL{}
-\@ifdefinable\flrow@leftfill{}\@ifdefinable\flrow@rightfill{}
-\DeclareFROpt{rowfill}[0]{\flrow@setbool{ROWFILL}{#1}}
-\DeclareFROpt{frameset}{\def\FB@Bset{#1}}
-\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}{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
-    \@nameuse{FB@\FB@B@ @adj}}\relax}%
-  \@namedef{\FB@BO@ @frame}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
-    \@nameuse{FB@\FB@B@ @frame}}%
-  \ifx\FR@frame\empty\else%\ifx\FB@frame\empty
-     \def\FB@hadj{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
-       \@nameuse{FB@\FB@B@ @adj}}%
-     \def\FB@wadj{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
-       \@nameuse{FB@\FB@B@ @adj}}\relax}%
-     \def\FB@frame{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
-       \@nameuse{FB@\FB@B@ @frame}}%
-  \fi%\fi
-  }
-\@ifdefinable\FRifFBOX{\let\FRifFBOX\@secondoftwo}
-\newcommand\FB@fbox@frame[1]{\hbox{%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\fbox{#1}%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
-\newcommand\FB@fbox@adj{\dimen@=2\fboxsep\advance\dimen@2\fboxrule}
-\newcommand\FB@fbox@reset{\fboxsep3\p@\fboxrule.4\p@}
-\newcommand\FB@colorbox@frame[1]{\hbox{%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
-\@ifdefinable\FB@colorbox@adj{\let\FB@colorbox@adj\FB@fbox@adj}
-\newcommand\FB@colorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
-\newcommand\FB@fcolorbox{\fbox}
-\newcommand\FB@fcolorcorners{}
-\@ifdefinable\FR@phantom{}\@ifdefinable\FRset@color{}
-\newcommand\FB@FRcolorbox@frame[1]{\hbox{\let\color@block\FRcolor@block
-  \let\FR@phantom\@firstofone\let\FRset@color\set@color\FB@fcolorcorners
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
-\@ifdefinable\FB@FRcolorbox@adj{\let\FB@FRcolorbox@adj\FB@fbox@adj}
-\newcommand\FB@FRcolorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
-\newcommand\FB@corners@frame[1]{\hbox{\let\color@block\FRcolor@block
-  \let\FR@phantom\phantom\let\FRset@color\relax\FB@fcolorcorners
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\colorbox{white}{#1}%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
-\@ifdefinable\FB@corners@adj{\let\FB@corners@adj\FB@fbox@adj}
-\newcommand\FB@corners@reset{\fboxsep3\p@\fboxrule\z@}
-\newcommand\flrow@l@color@side[2]{{\let\unitlength\relax
-    \picture(\z@,\z@)(\z@,\z@)
-    \put(\z@,#1){{\flrow@ll@col@put}}
-    \put(\z@,#2){{\flrow@ul@col@put}}
-    \endpicture}}
-\newcommand\flrow@r@color@side[2]{{\let\unitlength\relax
-    \picture(\z@,\z@)(\z@,\z@)
-    \put(\z@,#1){{\flrow@lr@col@put}}
-    \put(\z@,#2){{\flrow@ur@col@put}}
-    \endpicture}}
-\newcommand\flrow@ll@col@put{}
-\newcommand\flrow@ul@col@put{}
-\newcommand\flrow@lr@col@put{}
-\newcommand\flrow@ur@col@put{}
-\newcommand\flrow@cboxcorners[4]{%
-    \def\flrow@ll@col@put{#1}%
-    \def\flrow@lr@col@put{#2}%
-    \def\flrow@ur@col@put{#3}%
-    \def\flrow@ul@col@put{#4}%
-    }
-\newcommand\FRcolorboxwd{\z@}
-\newcommand\FRcolorboxht{\z@}
-\newcommand\FRcolorboxdp{\z@}
-\def\FRcolor@block#1#2#3{%
-  {\FRset@color
-   \rlap{\@tempdima#1\edef\FRcolorboxwd{\the\@tempdima}\@tempdima#2\advance\@tempdima#3%
-   \edef\FRcolorboxht{\the\@tempdima}\@tempdima#3\edef\FRcolorboxdp{\the\@tempdima}%
-   \ifcolors@\else\let\FR@phantom\phantom\fi
-     \flrow@l@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
-     \FR@phantom{\vrule\@width#1\@height#2\@depth#3}%
-     \flrow@r@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
-    }}}
-\DeclareFROpt{colorframeset}{\flrow@fcolorbox{#1}}
-\DeclareFROpt{colorframecorners}{\flrow@fcolorcorners{#1}}
-\newcommand*\flrow@fcolorbox[1]{%
-  \@ifundefined{flrow@fcolorbox@#1}%
-    {\flrow@error{Undefined color box `#1'}}%
-    {\expandafter\let\expandafter\FB@fcolorbox
-     \csname flrow@fcolorbox@#1\endcsname}}
-\newcommand*\flrow@fcolorcorners[1]{%
-  \@ifundefined{flrow@fcolorcorners@#1}%
-    {\flrow@error{Undefined color box corners `#1'}}%
-    {\expandafter\let\expandafter\FB@fcolorcorners
-     \csname flrow@fcolorcorners@#1\endcsname}}
-\newcommand*\DeclareColorBox[2]{%
-  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
-   \long\@namedef{flrow@fcolorbox@#1}{#2}}}
-\newcommand*\DeclareCBoxCorners[5]{%
-  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
-   \long\@namedef{flrow@fcolorcorners@#1}{\flrow@cboxcorners{#2}{#3}{#4}{#5}}}}
-\@onlypreamble\DeclareColorBox
-\@onlypreamble\DeclareCBoxCorners
-\newcommand\flrow@load@colorpackage{\IfFileExists{color.sty}%
-    {\def\next{\RequirePackage{color}}}{\let\next\relax}\next}
-\AtBeginDocument{\flrow@load@colorpackage\let\flrow@load@colorpackage\relax}
-\DeclareFROpt{captionskip}{\def\captionskip{#1}%
-  \setlength\abovecaptionskip{#1}}
-\DeclareFROpt{footskip}{\def\floatfootskip{#1}}
-\newcommand\captionskip{10\p@}
-\newcommand\floatfootskip{\skip\@mpfootins}
-\DeclareFROpt{footnoterule}{\flrow@footrule{#1}}
-\newcommand\DeclareFloatFootnoterule[2]{%
-  \long\@namedef{flrow@fnrule@#1}{#2}}
-\newcommand*\flrow@footrule[1]{%
-  \@ifundefined{flrow@fnrule@#1}%
-    {\flrow@error{Undefined footnoterule `#1'}}%
-    {\let\@@FRabove\empty
-     \expandafter\let\expandafter\FBfootnoterule\csname
-       flrow@fnrule@#1\endcsname}}
-\@onlypreamble\DeclareFloatFootnoterule
-\DeclareFloatFootnoterule{normal}{\kern-3\p@
-  \@tempdima.4\columnwidth
-  \hrule\@width\@tempdima\kern2.6\p@}
-\DeclareFloatFootnoterule{limited}{\kern-3\p@
-  \@tempdima.4\columnwidth
-  \ifdim\@tempdima>\frulemax\@tempdima=\frulemax\fi
-  \hrule\@width\@tempdima\kern2.6\p@}
-\newcommand\frulemax{1in}
-\DeclareFloatFootnoterule{fullsize}{\kern-3\p@
-  \hrule\@width\hsize\kern2.6\p@}
-\DeclareFloatFootnoterule{none}{}
-\@ifdefinable\FBfootnoterule{\let\FBfootnoterule\footnoterule}
-\@ifdefinable\FR@iffancy{\let\FR@iffancy\@secondoftwo}
-\DeclareFROpt{fancyboxes}{\flrow@setbool{fancy}{#1}}
-\newcommand\DeclareFNOpt{%
-   \@ifstar{\flrow@declfnopt\AtBeginDocument}
-           {\flrow@declfnopt\@gobble}}
-\newcommand*\flrow@declfnopt[2]{%
-   #1{\undefine@key{newfloat}{#2}}\define@key{newfloat}{#2}}
-\@onlypreamble\DeclareFNOpt
-\@ifdefinable\flrow@types{\newtoks\flrow@types}
-\newcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
-  \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
-  \addtocounter{float@type}{\value{float@type}}%
-  \@namedef{#1name}{#1}\newcounter{#1}%
-  \expandafter\edef\csname fnum@#1\endcsname
-    {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
-       \expandafter\noexpand\csname the#1\endcsname}%
-  \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
-  \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
-  \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
-  \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
-  \@tempa}
-\@onlypreamble\DeclareNewFloatType
-\DeclareFNOpt*{placement}{\flnew@fps{#1}}
-\newcommand\flnew@fps[1]{\@namedef{fps@\FB@captype}{#1}}
-\@onlypreamble\flnew@fps
-\DeclareFNOpt*{name}{\flnew@fname{#1}}
-\newcommand\flnew@fname[1]{\@namedef{\FB@captype name}{#1}}
-\@onlypreamble\flnew@fname
-\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
-\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
-\def\ProcessOptionsWithKV#1{%
-  \let\@tempc\relax
-  \let\FR@tmp\@empty
-  \@for\CurrentOption:=\@classoptionslist\do{%
-    \@ifundefined{KV@#1@\CurrentOption}%
-    {}%
-    {%
-      \@ifundefined{KV@#1@\CurrentOption @default}{%
-       \PackageInfo{#1}{Global option `\CurrentOption' ignored}%
-      }{%
-      \PackageInfo{#1}{Global option `\CurrentOption' processed}%
-      \edef\FR@tmp{\FR@tmp,\CurrentOption,}%
-      \@expandtwoargs\@removeelement\CurrentOption
-        \@unusedoptionlist\@unusedoptionlist
-        }%
-    }%
-  }%
-  \edef\FR@tmp{%
-    \noexpand\caption@setkeys[floatrow]{#1}{%
-      \FR@tmp\@ptionlist{\@currname.\@currext}%
-    }%
-  }%
-  \FR@tmp
-  \let\CurrentOption\@empty
-  \AtEndOfPackage{\let\@unprocessedoptions\relax}}
-\ProcessOptionsWithKV{floatrow}
-\FR@iffancy{\RequirePackage{fr-fancy}}\relax
-\let\ProcessOptionsWithKV\undefined
-\AtBeginDocument{
- \FR@ifrawfloats
-  {\let\FR@tmp\flrow@Raw@restyle
- }{\flrow@restyle{table}\flrow@restyle{figure}%
-   \let\FR@tmp\flrow@restyle
-  }\the\flrow@types
- \@onlypreamble\flrow@restyle\@onlypreamble\flrow@Raw@restyle
- \flrow@types={}}
-\AtBeginDocument{%
-\@ifundefined{sf@@@subfloat}{\@tempswafalse}{\@tempswatrue}
-\if@tempswa\RequirePackage{fr-subfig}\fi}
-\AtBeginDocument{%
-\@ifundefined{LT@array}{\@tempswafalse}{\@tempswatrue}
-\if@tempswa\RequirePackage{fr-longtable}\fi}
-\endinput
-%%
-%% End of file `floatrow.sty'.
diff --git a/floatrowpf.sty b/floatrowpf.sty
new file mode 100644
index 0000000..fc83f06
--- /dev/null
+++ b/floatrowpf.sty
@@ -0,0 +1,1480 @@
+%%%
+%%% This is file `floatrowpf.sty', which is a modified version
+%%% of `floatrow.sty' to work around issues in two-column layout.
+%%% The possible workaround was posted at:
+%%% https://tex.stackexchange.com/questions/133127/
+%%%
+%%% Following is the original header:
+%%%
+%% This is file `floatrow.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% floatrow.dtx  (with options: `floatrow,floatsetup')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from floatrow.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file floatrow.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+\ProvidesPackage{floatrowpf}
+       [2017/07/17 v0.3b1 floatrow: float package extension]
+\@ifundefined{float@caption}{%
+  \@ifundefined{rotfloat@float}{}%
+    {\PackageError{floatrow}{Do not use rotfloat package with floatrow.\MessageBreak
+        The latter will be skipped}{}%
+  \@namedef{opt@floatrow.sty}{}\endinput}}%
+  {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak
+        The latter will be skipped}{}%
+  \@namedef{opt@floatrow.sty}{}\endinput}
+\@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)}
+\RequirePackage{keyval}
+\RequirePackage{caption3}
+\@ifpackagelater{caption3}{2007/04/11 v3.0q}{}{\PackageError
+    {floatrow}{For a successful cooperation we need at least\MessageBreak
+    version `2007/04/11 v3.0q' of package caption,\MessageBreak
+        but only version\MessageBreak
+          `\csname ver@caption.\@pkgextension\endcsname'\MessageBreak
+        is available}\@eha\endinput}
+\providecommand*\caption@fnum[1]{%
+   \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}}
+\@ifdefinable\FR@flboxreset{\let\FR@flboxreset\@floatboxreset}
+\@ifdefinable\FR@makecaption{\let\FR@makecaption\@makecaption}
+\newcommand\flrow@caption{%
+   \ifx\@captype\@undefined
+     \@latex@error{\noexpand\caption outside float}\@ehd
+     \expandafter\@gobble
+   \else
+     \refstepcounter\@captype
+     \expandafter\@firstofone
+   \fi
+   {\@dblarg{\@caption\@captype}}%
+}
+\@ifdefinable\float@caption{\let\float@caption\@caption}
+\newcounter{float@type}
+\@ifundefined{c@figure}%
+  {\setcounter{float@type}{1}}%
+  {\setcounter{float@type}{4}}
+\newcommand\flrow@package{floatrow}
+\newcommand*\flrow@error[1]{\PackageError\flrow@package{#1}\flrow@eh}
+\newcommand*\flrow@eh{%
+  If you do not understand this error, please take look\MessageBreak
+  at `floatrow' and `caption' package documentations.\MessageBreak
+  \@ehc}
+\newcommand\floatstyle[1]{\@ifundefined{flrow@sty@#1}%
+  {\flrow@error{Unknown float style `#1'}}{\edef\float@style{#1}}}
+\newcommand\floatname[2]{\@namedef{#1name}{#2}}
+\newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}}
+\newif\if@@FS
+\newcommand\FR@redefs{%
+  \@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}
+\newcommand\flrow@makecaption[2]{\ifnum\floatbox@depth=\z@
+    \ifvoid\@floatcapt
+      \else\flrow@error{Caption(s) lost}\fi\fi
+  \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
+   \linewidth\hsize
+   \ifdim\hsize<70mm\sloppy\fi
+   \normalsize
+   \abovecaptionskip\z@\belowcaptionskip\z@
+   \FR@makecaption{#1}{#2}\egroup}
+\newcommand\killfloatstyle{\FBbuildtrue\if@@FS\hsize\FB@wd\fi\@@FSfalse}
+\newcommand\flrow@capsetup{}
+\edef\float@style{plain}
+\@ifdefinable\FBB@wd{\let\FBB@wd\relax}
+\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}}
+\newcommand\flrow@restyle[1]{%
+  \@namedef{#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
+    \flrow@setlist{{#1}}%
+    %\textwidth\columnwidth <-- error in two-column layout
+    \edef\FBB@wd{\the\columnwidth}%
+    \FRifFBOX\@@setframe\relax\@@FStrue\@float{#1}}%
+  \@namedef{#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
+    \flrow@setlist{{#1}{widefloat}{wide#1}}%
+    \FRifFBOX\@@setframe\relax\@@FStrue\edef\FBB@wd{\the\textwidth}%
+    \let\@xdblfloat\@xfloat\relax
+    \FR@ifdoubleaswide
+     {\if@twocolumn\else\let\@dblfloat\@float\fi}\relax
+    \@dblfloat{#1}}%
+  \expandafter\let\csname end#1\endcsname\float@end
+  \expandafter\let\csname end#1*\endcsname\float@dblend
+ \@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\relax\@@FStrue
+    \let\rotfloat@@makebox\float@makebox
+    \let\float@makebox\rotfloat@makebox
+    \@float{#1}}%
+  \@namedef{endsideways#1}{\FBbuildtrue\float@end}
+  \ifx\@rotdblfloat\undefined
+   \@namedef{sideways#1*}{%
+     \flrow@error{%
+      You need rotating version 2.10 or newer to do this}%
+     \@nameuse{sideways#1}}%
+  \else
+   \@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\relax\@@FStrue
+     \let\@xdblfloat\@xfloat
+     \let\rotfloat@@makebox\float@makebox
+     \let\float@makebox\rotdblfloat@makebox
+     \@dblfloat{#1}}%
+  \fi
+  \@namedef{endsideways#1*}{\FBbuildtrue\float@dblend}}
+ \@ifundefined{wrapfloat}{}{%
+   \@ifundefined{flrow@WF@rapt}{\let\flrow@WF@rapt\WF@rapt
+   \def\WF@rapt[##1]##2{\FRifFBOX\@@setframe\relax\@@FStrue
+     \dimen@##2\relax
+     \ifdim\dimen@>\z@
+       \edef\FBB@wd{\the\dimen@}\FB@fs@wd\dimen@\FBo@wd
+     \fi
+     \flrow@WF@rapt[##1]{\dimen@}%
+       \the\FR@everyfloat\ignorespaces}%
+   }{}%
+   \@namedef{wrap#1}{\killfloatstyle\def\@captype{#1}%
+     \FR@redefs\FBc@wd\z@
+     \flrow@setlist{{#1}{wrapfloat}{wrap#1}}%
+     \def\WF@floatstyhook{\let\@currbox\WF@box
+       \ifFBbuild
+         \global\setbox\WF@box\flrow@FB{\wd\WF@box}%
+       \else
+         \global\let\flrow@typ@tmpset\undefined
+         \global\let\WF@box\@currbox
+       \fi}%
+     \@ifnextchar[\WF@wr{\WF@wr[]}}%]
+   \@namedef{endwrap#1}{\endwrapfloat
+     \@ifundefined{FloatHBarrier}{}\FloatHBarrier
+     }}
+ \@ifundefined{sf@@@subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}}
+\newcommand\RawFloats{\@ifnextchar[%]
+    \flrow@rawfloatschk\flrow@rawfloats}
+\newcommand\flrow@rawfloats{\killfloatstyle\@parboxrestore
+    \let\@makecaption\FR@makecaption
+    \expandafter\ifx\csname end\@captype\endcsname\float@endH
+        \global\FBbuildfalse
+    \else
+        \@namedef{end\@captype}{\end@float}%
+    \fi
+    \expandafter\ifx\csname end\@captype*\endcsname\float@endH
+        \global\FBbuildfalse
+    \else
+        \@namedef{end\@captype*}{\end@dblfloat}%
+    \fi
+  \@ifundefined{@rotfloat}{}{%
+    \@namedef{endsideways\@captype}{\end@rotfloat}%
+    \@namedef{endsideways\@captype*}{\end@rotdblfloat}%
+  }%
+  \@ifundefined{wrapfloat}{}{%
+    \@namedef{endwrap\@captype}{\endwrapfloat}%
+  }}
+\@ifdefinable\flrow@rawfloatschk{}
+\def\flrow@rawfloatschk[#1]{\@ifnextchar[%]
+    {\flrow@RawFloats[#1]}{\flrow@@RawFloats#1,;}}
+\@ifdefinable\flrow@RawFloats{}
+\newcommand\flrow@raw@set{\AtBeginDocument}
+\AtBeginDocument{\let\flrow@raw@set\@firstofone}
+\def\flrow@RawFloats[#1][#2]{\flrow@RawFloats@[#1]#2,;}
+\def\flrow@RawFloats@[#1]#2,{%
+  \caption@ifinlist{#2}{float}{\flrow@raw@set
+        {\@namedef{#1}{\@float{#1}}}%
+  }{\caption@ifinlist{#2}{widefloat}{\flrow@raw@set%
+        {\@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}}%
+  }{\caption@ifinlist{#2}{rotfloat}{%
+    \@ifundefined{@rotfloat}{}{\flrow@raw@set
+        {\@namedef{sideways#1}{\@rotfloat{#1}}}}%
+  }{\caption@ifinlist{#2}{widerotfloat}{%
+    \@ifundefined{@rotfloat}{}{\flrow@raw@set
+        {\@namedef{sideways#1*}{\@rotdblfloat{#1}}}}%
+  }{\caption@ifinlist{#2}{wrapfloat}{%
+    \@ifundefined{wrapfloat}{}{\flrow@raw@set
+        {\@namedef{wrap#1}{\wrapfloat{#1}}}}}%
+  }{\caption@ifinlist{#2}{all,allfloats}{%
+    \flrow@@RawFloats{#1}%
+  }{\flrow@error{Undefined float subtype `#2'}%
+  }}}}}\@ifnextchar;\@gobble{\flrow@RawFloats@[#1]}}
+\@ifdefinable\flrow@@RawFloats{}
+\def\flrow@@RawFloats#1,{%
+ \flrow@raw@set{\@namedef{#1}{\@float{#1}}%
+    \@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}%
+  \@ifundefined{@rotfloat}{}{%
+    \@namedef{sideways#1}{\@rotfloat{#1}}%
+    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
+  }%
+  \@ifundefined{wrapfloat}{}{%
+    \@namedef{wrap#1}{\wrapfloat{#1}}}%
+  }\@ifnextchar;\@gobble\flrow@@RawFloats
+}
+\newcommand\flrow@Raw@restyle[1]{%
+    \@namedef{#1}{\@float{#1}}%
+    \@namedef{#1*}{\@dblfloat{#1}}%
+    \@namedef{end#1}{\end@float}%
+    \@namedef{end#1*}{\end@dblfloat}%
+  \@ifundefined{@rotfloat}{}{%
+    \@namedef{sideways#1}{\@rotfloat{#1}}%
+    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
+    \@namedef{endsideways#1}{\end@rotfloat}%
+    \@namedef{endsideways#1*}{\end@rotdblfloat}%
+  }%
+  \@ifundefined{wrapfloat}{}{%
+    \@namedef{wrap#1}{\wrapfloat{#1}}%
+    \@namedef{endwrap#1}{\endwrapfloat}%
+  }%
+ }
+\newcommand\RawCaption[1]{{\let\@makecaption\FR@makecaption #1}}
+\@ifdefinable\float@exts{\newtoks\float@exts}
+\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}}
+\let\@float@Hx\@xfloat
+\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}}
+\AtBeginDocument{%
+  \@ifundefined{latex@xfloat}{}{%
+    \let\floatrow@ORI@xfloat\@xfloat
+    \def\@xfloat#1[#2]{%
+      \floatrow@ORI@xfloat{#1}[#2]%
+      \floatfont}}}%
+\newsavebox\float@box
+\def\@float@HH#1[H]{%
+  \@ifundefined{FloatHBarrier}{}\FloatHBarrier
+  \expandafter\let\csname end#1\endcsname\float@endH
+  \FR@ifdoubleaswide
+   {\expandafter\let\csname end#1*\endcsname\float@endH}\relax
+  \let\@currbox\float@box
+  \flrow@setlist*{{floatH}{#1H}}%
+  \def\@captype{#1}%\setbox\@floatcapt=\vbox{}%
+  \setbox\@currbox\color@vbox\normalcolor
+    \vbox\bgroup
+      \hsize\columnwidth
+      \linewidth\columnwidth
+      \@parboxrestore\leftmargin\z@\rightmargin\z@
+      \@floatboxreset \@setnobreak
+  \ignorespaces}
+\newcommand\flrow@flboxreset{\FR@flboxreset
+  \@ifundefined{capstart}{}{\capstart}%
+  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
+  \if@tempswa\FB@readaux{\relax}\fi
+  \global\let\FBcheight\relax\global\let\FBoheight\relax
+  \global\let\FBfheight\relax
+  \FBifcapbeside\FC@fs@wd\FB@fs@wd
+  \the\FR@everyfloat}
+\@ifdefinable\FBcheight{\let\FBcheight\relax}
+\@ifdefinable\FBoheight{\let\FBoheight\relax}
+\@ifdefinable\FBfheight{\let\FBfheight\relax}
+\newcommand\FB@fs@wd{\@tempdima\FBB@wd
+  \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\linewidth\hsize
+  \FBifcaptop
+    {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
+    {\columnwidth\FBc@wd}%
+  }
+\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
+  \FC@ifc@wd\@tempswatrue\@tempswafalse
+  \if@tempswa
+     \ifx\FCwidth\relax
+        \flrow@error{You didn't define width of caption\MessageBreak
+          for plain floating environment.}%
+     \else
+        \global\FBc@wd=\FCwidth
+        \FC@ifo@fil{\advance\@tempdima-\FBc@wd}\relax
+     \fi
+  \else
+    \global\FBc@wd\@tempdima
+  \fi
+  \FC@ifo@fil\relax{\@tempdima.5\@tempdima
+    \flrow@setwd\FB@wd\@tempdima}%
+  \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}%
+  \FC@ifc@wd\relax{\global\advance\FBc@wd-\FB@wd}%
+  \hsize\FBo@wd\linewidth\hsize\columnwidth\FBc@wd\linewidth\hsize
+  \FCset@vpos}
+\newcommand\float@makebox[1]{%
+  \FBifcapbeside{\flrow@FC{#1}}{\flrow@FB{#1}}}
+\newcommand\FBaskip{\z@}\newcommand\FBbskip{\z@}
+\newif\ifFBbuild\FBbuildtrue
+\newcommand\flrow@FB[1]{\vbox{\@tempdima=#1\vskip\FBaskip
+  \@parboxrestore\leftmargin\z@\rightmargin\z@
+  \hbox to\@tempdima{\def\FB@zskip{\vskip\z@}%
+  \FBleftmargin\flrow@FB@\FBrightmargin}%
+  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
+  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}%
+  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
+\newcommand\flrow@FC[1]{\vbox{\@tempdima=#1\@parboxrestore
+  \leftmargin\z@\rightmargin\z@\flrow@FClist\vskip\FBaskip
+  \hbox to\@tempdima{\FCleftmargin\flrow@FC@\FCrightmargin}%
+  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
+  \nocapbeside\global\let\FCwidth\relax
+  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
+\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}
+\newcommand\FBafil{\vfill}\newcommand\FBbfil{\vfill}
+\newcommand\FBw@box[1]{\hsize#1\columnwidth#1\linewidth#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}
+\newcommand\flrow@FB@{\global\let\flrow@typ@tmpset\undefined
+ \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\leftmargin\z@\rightmargin\z@
+  \@@FBabove
+  \FBifcaptop\@tempswatrue\@tempswafalse
+  \if@tempswa
+    \ifvoid\@floatcapt\else
+      \FB@vbox\FBc@wd\FBcheight{\FBifCAPTOP\relax\vfill
+        \unvbox\@floatcapt
+        \ifnum\FPOScnt=\@ne\vbox{\FB@foot}\fi\vfil}%
+      \@@FBskip\hrule\@height\z@\@depth\z@
+    \fi
+    \vtop{\vskip\z@\FBo@frame{\FB@vtop\FBo@wd\FBoheight
+      {\FBafil\unvbox\@currbox\FBbfil
+      \vskip\z@
+      \ifnum\FPOScnt=\z@
+        \FB@vtop\FBo@wd\FBfheight{\FB@foot\vfil}\fi}}\par
+      \vskip\z@
+      \ifnum\FPOScnt=\tw@\vskip\z@
+        \FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi}%
+  \else\ifnum\FPOScnt=\z@\FPOScnt=\@ne\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=\@ne\vtop{\FB@foot}%
+    \fi\par
+        \vfill\vskip\z@\vss
+        \ifnum\FPOScnt=2\FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi
+        }\fi
+  \fi\@@FBbelow\FB@zskip\end@FBBOX
+  \global\setbox\@floatcapt\box\voidb@x}}
+\newcommand\flrow@FC@{\global\let\flrow@typ@tmpset\undefined
+ \FB@frame{\begin@FBBOX
+   \adj@dim\FBo@wd+\FBo@wadj=\hsize
+   \settowidth\@tempdimb{\floatcapbesidesep}\advance\hsize\@tempdimb
+   \advance\hsize\FBc@wd\@parboxrestore\leftmargin\z@\rightmargin\z@
+   \@@FBabove
+    \hbox{\floatfacing*%
+      {\ifvoid\@floatcapt\else
+         \FCc@box{\FBw@box\FBc@wd\unvbox\@floatcapt\FB@foot}%
+         \floatcapbesidesep\fi
+       \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
+    \global\setbox\@floatcapt\box\voidb@x}}
+\newcommand\FB@foot{\let\FR@ifFOOT\@firstoftwo\FB@putfoots\@@par\FB@putfnotes}
+\newcommand\FB@zskip{}
+\newcommand\float@end{\ifFBbuild\@endfloatbox
+    \global\setbox\@currbox\float@makebox\columnwidth
+    \let\@endfloatbox\relax\fi
+  \end@float}
+\newcommand\floatHpenalties{}
+\newcommand\float@endH{\@endfloatbox\par
+  \FR@iffloatHaslist
+   {\floatHpenalties\relax
+    \addpenalty\@beginparpenalty}\relax
+  \vskip\intextsep
+  \ifFBbuild\setbox\@currbox\float@makebox\columnwidth\fi
+  \box\@currbox\par
+  \FR@iffloatHaslist
+   {\addpenalty\@endparpenalty\@endpetrue}\relax
+  \vskip\intextsep\relax}
+\newcommand\float@dblend{\ifFBbuild\@endfloatbox
+    \global\setbox\@currbox\float@makebox\textwidth
+    \let\@endfloatbox\relax\fi
+  \end@dblfloat}
+\newsavebox\@floatcapt
+\newcommand*{\listof}[2]{%
+  \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
+    \expandafter\providecommand\csname l@#1\endcsname
+        {\@dottedtocline{1}{1.5em}{2.3em}}%
+    \float@listhead{#2}%
+    \begingroup\setlength{\parskip}{\z@}%
+      \@starttoc{\@nameuse{ext@#1}}%
+    \endgroup}}
+\providecommand*{\float@listhead}[1]{%
+  \@ifundefined{chapter}{\def\@tempa{\section*}}%
+    {\def\@tempa{\chapter*}}%
+  \@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}%
+\newcommand\float@addtolists[1]{%
+  \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}
+\PackageInfo{floatrow}{Modified float package code loaded}
+\IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse}
+\if@tempswa
+  \let\rotfloat@HH\@float@HH
+  \def\@float@HH#1{%
+    \expandafter\let\csname endsideways#1\endcsname\float@endH
+    \let\end@float\relax
+    \rotfloat@HH{#1}}
+  \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}}
+\PackageInfo{floatrow}{Modified rotfloat package code loaded}
+\fi
+\@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat}
+\FR@everyfloat={\let\@footnotetext\@mpfootnotetext
+  \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
+  \floatobjectset\floatfont}
+\@ifdefinable\FR@ifFOOT{\let\FR@ifFOOT\@secondoftwo}
+\newcommand\FB@putfnotes{%
+  \ifvoid\@mpfootins\else\FR@ifFOOT
+    {\vskip\floatfootskip\normalcolor\FBfootnoterule
+    \unvbox\@mpfootins\@@par}\relax
+  \fi}
+\@ifdefinable\flrow@foot{\newinsert\flrow@foot}
+\newcommand\FB@putfoots{%
+  \ifvoid\flrow@foot\else\FR@ifFOOT
+    {\vskip\floatfootskip\normalcolor
+    \unvbox\flrow@foot\@@par}\relax
+  \fi}
+\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}}{}}
+\captionsetup[floatfoot]{labelformat=empty,labelsep=none}
+\newcommand\floatfoot{\@ifstar
+    {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}%
+    {\def\FR@tmp{\captionfootfont}\floatfoot@}}
+\newcommand\floatfoot@[1]{%
+  \global\setbox\flrow@foot\vbox{%
+  \floatfoot@box{#1}}}%
+\newcommand\floatfoot@box[1]{%
+  \@ifundefined{@captype}{\def\@captype{floatfoot}}{}%
+    \if@@FS\hsize\columnwidth\linewidth\columnwidth\fi
+    \@parboxrestore\reset@font\color@begingroup
+  \caption@setoptions{\@captype}%
+  \caption@setoptions{floatfoot}%
+     \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
+  \color@endgroup}
+\newcommand\newfloatcommand[2]{%
+  \@ifundefined{#1}{}%
+    {\flrow@error{\string#1 already defined}}%
+  \@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
+  \def\FB@tmpset{#3}\def\@captype{#2}%
+  \@ifnextchar[{\@floatbox}{\@floatbox[#4]}}}
+\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
+\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
+\newfloatcommand{fcapside}{figure}[\capbeside][]
+\@ifdefinable\FB@wd {\newdimen\FB@wd}
+\@ifdefinable\FBo@wd{\newdimen\FBo@wd}
+\@ifdefinable\FBc@wd{\newdimen\FBc@wd}
+\newlength\FBo@ht
+\newlength\FBc@ht
+\newlength\FBf@ht
+\newlength\FBo@max
+\newlength\FBc@max
+\newlength\FBf@max
+\newcommand\FR@loc@addcnt[2]{%
+  \@ifundefined{c@#1}{\@nocounterr{#1}}%
+    {\advance\csname c@#1\endcsname #2\relax}}
+\newcommand\FR@loc@refcnt[1]{%
+  \@ifundefined{c@#1}{\@nocounterr{#1}}%
+   {\advance\csname c@#1\endcsname1\relax}}
+\newcommand\FR@loc@{%
+  \let\FR@ifunloc\@gobble
+  \let\label\@gobble
+  \let\refstepcounter\FR@loc@refcnt
+  \let\stepcounter\FR@loc@refcnt
+  \let\refsteponlycounter\FR@loc@refcnt
+  \let\FR@ifcountH\@secondoftwo
+  \let\cl@@ckpt\empty\let\addtocounter\FR@loc@addcnt
+  \let\caption@kernel@addcontentsline\@gobbletwo
+  \let\caption@addcontentsline\@gobbletwo
+  \def\sf@updatecaptionlist##1##2##3##4{}}
+\def\FBtmp@cap#1[#2]#3{\sbox\@tempboxa{\captionlabel{#3}}%
+  \global\@tempdimb\wd\@tempboxa}
+\newcommand\captionlabel[1]{{\def\FR@tmp{\@captype}\ifnum\floatbox@depth>\@ne
+       \def\FR@tmp{sub\@captype}\caption@setsubtype*{\FR@tmp}\stepcounter{\FR@tmp}\fi
+   \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
+\newcommand\subcaptionlabel[1]{{\floatbox@depth\tw@\captionlabel{#1}}}
+\newcommand\FBget@box[3]{%
+  \FBiffloatrow\relax
+    {\ifx\FBB@wd\relax
+      \ifdim\hsize=\z@
+        \@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}%
+  \adj@dim\hsize-\FB@wadj=\@tempdima
+  \FBifcapbeside
+    {\FCget@@wd{#1}{#3}}%
+    {\nofilFCOhsize
+    \FBiffloatrow\relax
+      {\settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
+      \advance\@tempdima-\@tempdimb}}%
+  \FC@ifo@fil{\@tempdima\FB@wd}{\FB@wd\@tempdima}%
+  \adj@dim\@tempdima-\FBo@wadj=\FBo@wd
+  \FBiffloatrow\relax{\hsize\FBo@wd}%
+  \FBifcapbeside{\hsize\FB@wd}\relax
+  \linewidth\hsize
+  \def\reserved@a{#1}\ifx\reserved@a\empty
+    \else\FBget@@wd{#1}{#3}\fi
+  \hsize\FBo@wd\linewidth\hsize
+  \FBifcapbeside
+    {\FC@ifc@wd\relax{\advance\FBc@wd-\FB@wd}}%
+    {\FBc@wd\FB@wd}%
+  \setbox\z@\vbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@\hsize\FBo@wd\linewidth\hsize
+    \FBifcaptop
+      {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
+      {\columnwidth\FBc@wd}%
+    #3}%
+  \FBc@ht\ht\@floatcapt\advance\FBc@ht\dp\@floatcapt
+  \FBo@ht\ht\z@\advance\FBo@ht\dp\z@\let\FBheight\FBo@ht
+  \setbox\tw@\vbox{\null\par\FB@foot\par}%
+  \FBf@ht\ht\tw@\advance\FBf@ht\dp\tw@
+  \FBiffloatrow
+    {\ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
+    \ifCADJ
+      \FBifcaptop
+        {\ifnum\FPOScnt=\@ne\global\advance\FBc@ht\FBf@ht\fi}%
+        {\ifnum\FPOScnt=\tw@
+          \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}%
+      \ifdim\FBc@ht>\FBc@max\global\FBc@max\FBc@ht\fi
+      \gdef\FBcheight{\FBc@ht}\gdef\FBfheight{\FBf@ht}%
+    \fi}\relax
+  \def\reserved@a{#2}\ifx\reserved@a\empty
+    \FBiffloatrow{\ifOADJ
+      \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
+      \FBifcaptop
+        {\ifnum\FPOScnt=\z@
+          \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
+        \fi}\relax
+      \gdef\FBoheight{\FBo@ht}\gdef\FBfheight{\FBf@ht}%
+    \fi}\relax
+  \else
+     \FBget@@ht{#2}{#3}%
+  \fi}
+\newcommand\FCget@@wd[2]{\flrow@FClist
+  \FBiffloatrow\relax
+    {\settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
+    \advance\@tempdima-\@tempdimb\advance\hsize-\@tempdimb}%
+  \settowidth\@tempdimb{\floatcapbesidesep}\advance\@tempdima-\@tempdimb
+  \FC@ifo@fil{\FB@wd\@tempdima}\relax
+  \FC@ifc@wd\@tempswatrue\@tempswafalse
+  \if@tempswa
+    \ifx\FCwidth\relax
+      \setbox\@ne\vbox{\FR@loc@
+        \let\caption\flrow@caption
+        \let\@caption\FBtmp@cap
+         #2}%
+      \FBc@wd=\@tempdimb
+    \else
+      \FBc@wd=\FCwidth
+    \fi\FC@ifo@fil{\advance\FB@wd-\FBc@wd}\relax
+  \else
+    \FBc@wd\@tempdima
+  \fi
+  \@tempdima.5\@tempdima}
+\newcommand\flrow@gobble@[2][]{\unskip\ignorespaces}
+\newcommand\flrow@gobble{%
+    \let\caption\flrow@gobble@
+    \let\floatfoot\flrow@gobble@
+    \let\footnote\flrow@gobble@
+    \let\footnotetext\flrow@gobble@
+    }
+\newcommand\FBget@@wd[2]{\@tempswafalse
+  \begingroup
+    \@tempdima-3000pt\let\FBwidth\@tempdima
+    \setlength\dimen@{#1}\ifdim\dimen@<\z@\global\@tempswatrue\fi
+  \endgroup
+  \if@tempswa
+    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
+    \FBo@wd\wd\z@\let\FBwidth\FBo@wd
+    \setlength\FBo@wd{#1}%
+    \advance\FBo@wd\leftskip\advance\FBo@wd\rightskip
+    \adj@dim\FBo@wd+\FBo@wadj=\FB@wd
+    \setbox\flrow@foot\box\voidb@x
+    \setbox\@mpfootins\box\voidb@x
+  \else
+    \setlength\FB@wd{#1}%
+    \adj@dim\FB@wd-\FB@wadj=\FB@wd
+    \adj@dim\FB@wd-\FBo@wadj=\FBo@wd
+    \let\FBwidth\FBo@wd
+  \fi}
+\newcommand\FBget@@ht[2]{\@tempswafalse
+  \begingroup
+    \@tempdimb-3000pt\let\FBheight\@tempdimb
+    \setlength\dimen@{#1}\ifdim\dimen@<\z@
+      \global\@tempswatrue\fi
+  \endgroup
+  \if@tempswa
+    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
+    \FBo@ht\ht\z@\advance\FBo@ht\dp\z@
+    \let\FBheight\FBo@ht\setlength\FBo@ht{#1}%
+    \adj@dim\FBo@ht+\FBo@hadj=\FBo@ht
+    \FBifcaptop{\ifnum\FPOScnt=\z@\advance\FBo@ht\FBf@ht\fi}\relax
+  \else
+    \setlength\FBo@ht{#1}%
+    \adj@dim\FBo@ht-\FBo@hadj=\FBo@ht
+    \adj@dim\FBo@ht-\FB@hadj=\FBo@ht
+    \setbox\z@\vbox{\offinterlineskip\vbox{\@@FBabove}%
+      \FBifcapbeside\relax{\@@FBskip\hrule\@height\z@\@depth\z@}%
+      \vtop{\@@FBbelow}}%
+    \global\advance\FBo@ht-\ht\z@\global\advance\FBo@ht-\dp\z@
+    \FBifcapbeside\relax\FBget@@@ht
+  \fi
+  \FBiffloatrow{\ifOADJ
+    \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
+  \fi}\relax
+  \def\FBoheight{\FBo@ht}}
+\newcommand\FBget@@@ht{%
+    \ifdim\FBc@ht>\FBc@max
+      \global\advance\FBo@ht-\FBc@ht
+    \else
+      \global\advance\FBo@ht-\FBc@max
+    \fi
+    \FBifcaptop{\ifnum\FPOScnt=\@ne\else
+      \ifdim\FBf@ht>\FBf@max
+        \global\advance\FBo@ht-\FBf@ht
+      \else
+        \global\advance\FBo@ht-\FBf@max
+      \fi
+    \fi}\relax
+  }
+\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}}}
+\newcounter{FBl@b}
+\@ifdefinable\FR@ifFCBOX{\let\FR@ifFCBOX\@secondoftwo}
+\newcommand\FBs@raise{\raisebox{-\totalheight}}
+\newcommand\FBf@raise{}
+\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}%
+    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{-\height}}}%
+     {\gdef\FBf@raise{}}%
+    \gdef\FBs@raise{\raisebox{-\totalheight}}%
+  \or\gdef\FC@bbox{\vbox\@parboxto\bgroup}\gdef\FC@ebox{\vskip\z@\egroup}%
+    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{\depth}}}%
+     {\gdef\FBf@raise{}}%
+    \gdef\FBs@raise{}\fi}
+\@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}
+\newcommand\floatbox[2][]{\begingroup
+  \def\FB@tmpset{#1}\def\@captype{#2}%
+  \@ifnextchar[{\@floatbox}{\@floatbox[]}}
+\@ifdefinable\@floatbox{}\@ifdefinable\@@floatbox{}
+\def\@floatbox[#1]{%
+  \@ifnextchar[{\@@floatbox[#1]}{\@@floatbox[#1][]}}
+\@ifdefinable\floatbox@depth{\newcount\floatbox@depth}
+\def\@@floatbox[#1][#2]{%
+  \@ifnextchar[{\@@@floatbox[#1][#2]}{\@@@floatbox[#1][#2][]}}%]
+\@ifdefinable\@@@floatbox{}
+\long\def\@@@floatbox[#1][#2][#3]#4#5{\advance\floatbox@depth\@ne
+  \@FB@vpos{#3}%
+  \if@@FS\else\FR@redefs
+    \ifcase\floatbox@depth\or
+      \flrow@setlist{{\@captype}}\or
+      \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
+    \fi
+    \FRifFBOX\@@setframe\relax\@@FStrue
+  \fi
+  \FB@tmpset
+  \FBifcapbeside\flrow@FClist\relax
+  \@parboxrestore\leftmargin\z@\rightmargin\z@
+  \floatobjectset\floatfont
+  \FBget@box{#1}{#2}{#4#5}%
+  \FBifcapbeside\FCset@vpos\relax
+  \FBiffloatrow{\FR@floatbox{\@ifundefined{capstart}{}{\capstart}#4#5}}%
+   {\adj@dim\FB@wd+\FB@wadj=\hsize\linewidth\hsize
+    \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi
+    \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}\let\FBB@wd\relax
+    #4#5}\FBbuildtrue
+    \FBifcapbeside{\flrow@FC\FBB@wd}{\flrow@FB\FBB@wd}%
+    \global\FBbuildfalse
+    \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
+   }\advance\floatbox@depth\m@ne
+  \endgroup\ignorespaces}
+\newcommand\FR@floatbox[1]{\@tempswafalse
+    \ifOADJ\@tempswatrue\fi\ifCADJ\@tempswatrue\fi
+    \if@tempswa\@ifundefined{FB@@boxmax}{}{\FB@@boxmax}\fi
+    \FBsetbox@obj{#1}\begin@FBBOX
+      \FBifcapbeside\flrow@FC@\flrow@FB@
+    \end@FBBOX
+    \addtocounter{FRobj}\m@ne
+    \@tempswafalse\FR@iffacing\@tempswatrue\relax
+    \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
+    \advance\Xhsize-\FB@wd
+    \FBifcapbeside
+      {\advance\Xhsize-\FBc@wd
+       \FR@ifcountH{\global\advance\Zhsize-\FBc@wd}\relax
+       \settowidth\@tempdimb{\floatcapbesidesep}%
+       \advance\Xhsize-\@tempdimb
+       \FR@ifcountH{\global\advance\Zhsize-\@tempdimb}\relax}\relax
+    \ifnum\c@FRobj=\z@
+      \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
+      \floatrowsep
+      \adj@dim\Xhsize-\FB@wadj={\global\Xhsize}%
+      \adj@dim\Zhsize-\FB@wadj={\global\Zhsize}%
+    \fi}
+\newcommand\FBsetbox@obj[1]{%
+  \setbox\float@box\color@vbox\normalcolor
+  \FBifcaptop
+     {\FB@vtop\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
+      \ifnum\FPOScnt=\z@\columnwidth\FBo@wd\else\columnwidth\FBc@wd\fi}%
+     {\FB@vbox\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
+      \columnwidth\FBc@wd}%
+  #1\FBbfil\egroup\color@endbox
+  \let\@currbox\float@box}
+\@ifdefinable\FBiffloatrow{\let\FBiffloatrow\@secondoftwo}
+\newcounter{FRobj}
+\newcounter{FRsobj}
+\newlength\Xhsize
+\newlength\sXhsize
+\newlength\Zhsize
+\newlength\sZhsize
+\newcommand\flrow@to{to\hsize}
+\newcommand\flrow@boxset[1]{#1}
+\newcommand\flrow@setrowhbox{%
+\FR@ifROWFILL{\def\flrow@left{\hskip\leftskip}\def\flrow@right{\hskip\rightskip}%
+  }{\let\flrow@to\empty\def\flrow@left{}\def\flrow@right{}}%
+}
+\newcommand\flrow@left{}\newcommand\flrow@right{}
+\newcommand\flrow@hbox@bgroup{\hbox\flrow@to
+    \bgroup\flrow@left}
+\newcommand\flrow@hbox@egroup{\flrow@right
+    \egroup}
+\newbox\flrow@rowbox
+\newcommand\floatrow[1][2]{\c@FRobj=#1\relax
+  \ifcase\floatbox@depth
+    \flrow@setlist*{{floatrow}{\@captype row}}%
+  \or
+    \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
+    \flrow@settype{subfloatrow}\flrow@settype{sub\@captype row}%
+    \ifx\flrow@to\empty\def\flrow@boxset##1{}\fi
+  \fi%
+  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
+  \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
+  \if@tempswa\FB@readaux{\relax}\fi
+  \flrow@boxset{\ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\else\hsize\FBB@wd\fi}%
+  \ifnum\floatbox@depth=\z@\vspace\FBaskip\else\leavevmode\fi
+  \hbox\flrow@to\bgroup%outer h box
+  \FRleftmargin
+  \flrow@boxset{\hsize\FBB@wd
+     \settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}\advance\hsize-\@tempdima}%
+  \bgroup\ifx\FR@frame\empty\else\def\FB@frame{}\def\FB@wadj{}\def\FB@hadj{}\fi%frame set
+  \flrow@boxset{\adj@dim\hsize-\FR@wadj=\hsize}%
+  \setbox\flrow@rowbox\vbox\bgroup%v box
+        \@@FRabove
+    \flrow@setrowhbox
+    \flrow@hbox@bgroup\let\FBiffloatrow\@firstoftwo
+      \Xhsize\hsize\count@#1\advance\count@\m@ne
+      \settowidth\@tempdima{\floatrowsep}\advance\Xhsize-\count@\@tempdima
+      \@tempdimb\Xhsize
+      \FR@iftwolevel
+        {\ifnum\floatbox@depth=\z@\Zhsize\Xhsize\else
+            \ifdim\Zhsize=\z@\Zhsize\Xhsize\sZhsize\Xhsize\fi
+            \FR@ifcountH{\global\advance\Zhsize-\count@\@tempdima}\relax
+         \fi}{\@tempdimb\Xhsize\Zhsize\Xhsize}%
+      \divide\@tempdimb#1\relax\FB@wd\@tempdimb
+      \hsize\@tempdimb\ignorespaces}
+\def\endfloatrow{\ifdim\lastskip>\z@\unskip\fi
+      \flrow@hbox@egroup%h box
+    \@@FRbelow
+    \egroup%v box
+    \FR@frame{\box\flrow@rowbox}%
+    \egroup%frame set
+    \FRrightmargin\egroup%outer h box
+    \ifnum\floatbox@depth=\z@\vspace\FBbskip\fi
+  \gdef\FBaskip{\z@}\gdef\FBbskip{\z@}%
+  \global\FBf@max\z@\global\FBo@max\z@\global\FBc@max\z@
+  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
+\newenvironment{subfloatrow}{\capsubrowsettings
+    \captionsetup{subtype}\@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
+\newcommand\capsubrowsettings{\caption@setoptions{subfloatrow}\caption@setoptions{sub\@captype row}}
+\newenvironment{subfloatrow*}[1][2]{\let\flrow@to\empty
+    \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
+    \FR@ifunloc{\let\FR@ifcountH\@firstoftwo}\let\c@FRobj\c@FRsobj
+    \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
+    \floatrow[#1]\killfloatstyle}{\ifdim\lastskip>\z@\unskip\fi
+     \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
+\newcommand\subfloatrowsep{\hskip\columnsep}
+\@ifdefinable\FR@ifcountH{\let\FR@ifcountH\@firstoftwo}
+\@ifdefinable\FR@ifunloc{\let\FR@ifunloc\@firstofone}
+\@ifdefinable\FR@iftwolevel{\let\FR@iftwolevel\@secondoftwo}
+\newcommand\CommonHeightRow{\@ifstar
+    {\let\FR@iftwolevel\@firstoftwo\CommonHeightRow@
+   }{\let\FR@iftwolevel\@secondoftwo\CommonHeightRow@}}
+\newcommand\DefaultCommonHeight{25pt}
+\newcommand\CommonHeight{\DefaultCommonHeight}
+\newcommand\CommonHeightRow@[2][\DefaultCommonHeight]{\def\CommonHeight{#1}\setbox\z@
+    \hbox{\FR@loc@\let\FR@ifunloc\@firstofone#2}%
+    \ifcase\floatbox@depth\def\@tempa{\Xhsize}\def\@tempb{\Zhsize}\or
+        \def\@tempa{\sXhsize}\def\@tempb{\Zhsize}\fi
+    \FR@calc@CommonHeight#2}
+\@ifdefinable\FR@Zunitlength{\newdimen\FR@Zunitlength}
+\newcommand\FR@calc@CommonHeight{%
+    \@tempdima\@tempb\advance\@tempdima-\@tempa
+    \count@\@tempdima\relax\divide\count@16384\relax
+    \divide\@tempb\count@\relax\FR@Zunitlength\@tempb\relax
+    \@tempdima\CommonHeight\relax
+    \count@\@tempdima\relax\divide\count@16384\relax
+    \@tempdima\count@\FR@Zunitlength\relax
+    \edef\CommonHeight{\the\@tempdima}}
+\newcommand\begin@FBBOX{\vbox\bgroup}
+\def\end@FBBOX{\egroup}
+\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse
+  \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip\z@}%
+             {\vskip\z@\egroup$\egroup}}
+\newcommand\TopFloatBoxes{\CADJfalse\OADJfalse
+  \buildFBBOX{\vtop\bgroup\vskip\z@}{\egroup}}
+\newcommand\BottomFloatBoxes{\CADJfalse\OADJfalse
+  \buildFBBOX{\vbox\bgroup}{\vskip\z@\egroup}}
+\newcommand\PlainFloatBoxes{%
+  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
+\newcommand\buildFBBOX[2]{\gdef\begin@FBBOX{#1}\gdef\end@FBBOX{#2}}
+\def\newdimentocommand  #1#2#3{%
+    #1\@tempdima{#3}\@ifdefinable#2{\xdef#2{\the\@tempdima}}}
+\def\renewdimentocommand#1#2#3{%
+    #1\@tempdima{#3}\xdef#2{\the\@tempdima}}
+\def\newskiptocommand   #1#2#3{%
+    #1\@tempskipa{#3}\@ifdefinable#2{\xdef#2{\the\@tempskipa}}}
+\def\renewskiptocommand #1#2#3{%
+    #1\@tempskipa{#3}\xdef#2{\the\@tempskipa}}
+\def\newlengthtocommand{\newskiptocommand}
+\def\renewlengthtocommand{\renewskiptocommand}
+\newcommand*\flrow@setbool[1]{%
+  \expandafter\caption@set@bool\csname FR@if#1\endcsname}
+\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}}}
+\newcommand\thisfloatsetup{\floatsetup[tmpset]}
+\def\flrow@setup{\caption@setkeys[floatrow]{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}}}%
+\newcommand\flrow@setlist{\@ifstar\flrow@setlist@@\flrow@setlist@}
+\newcommand\flrow@setlist@[1]{\@flrow@setlist#1{tmpset};%
+  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
+  \caption@setposition{\FBifcaptop tb}}
+\newcommand\flrow@setlist@@[1]{\@flrow@setlist#1;%
+  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
+  \caption@setposition{\FBifcaptop tb}}
+\newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble
+  \@flrow@setlist}
+\@ifundefined{caption@setoptions}{\let\caption@setoptions\caption@settype}{}
+\newcommand\@cap@setlist[1]{\caption@setoptions{#1}%
+   \@ifnextchar;{\let\caption@setfloattype\@gobble\@gobble}\@cap@setlist}
+\newcommand\flrow@FClist{\flrow@setlist
+  {{floatbeside}{capbesidefloat}{\@captype beside}{capbeside\@captype}}}
+\newcommand*\clearfloatsetup[1]{\@nameundef{flrow@typ@#1}}
+\newcommand\DeclareFROpt{%
+  \@ifstar{\flrow@declopt\AtEndOfPackage}
+          {\flrow@declopt\@gobble}}
+\newcommand*\flrow@declopt[2]{%
+  #1{\undefine@key{floatrow}{#2}}\define@key{floatrow}{#2}}
+\@onlypreamble\DeclareFROpt
+\@onlypreamble\flrow@declopt
+\@ifdefinable\FR@ifrawfloats{\let\FR@ifrawfloats\@secondoftwo}
+\DeclareFROpt*{rawfloats}[0]{\flrow@setbool{rawfloats}{#1}}
+\@ifdefinable\FR@ifdoubleaswide{\let\FR@ifdoubleaswide\@secondoftwo}
+\DeclareFROpt{doublefloataswide}[0]{\flrow@setbool{doubleaswide}{#1}}
+\@ifdefinable\FR@iffloatHaslist{\let\FR@iffloatHaslist\@secondoftwo}
+\DeclareFROpt{floatHaslist}[0]{\flrow@setbool{floatHaslist}{#1}}
+\newcommand*\DeclareFloatStyle[2]{%
+  \global\@namedef{flrow@sty@#1}{#2}}
+\@onlypreamble\DeclareFloatStyle
+\newcommand*\flrow@setstyle[1]{%
+  \@ifundefined{flrow@sty@#1}%
+    {\flrow@error{Undefined float style `#1'}}%
+    {\FBstyle@reset
+     \def\flrow@capsetup{%
+        \@ifundefined{caption@sty@#1}{}{\caption@setstyle*{#1}}%
+        \caption@setoptions {#1}}%
+     \flrow@esetup{\csname flrow@sty@#1\endcsname}}}
+\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}
+\DeclareFloatStyle{default}{%
+     style=plain,captionskip=10pt,
+     margins=centering,objectset=centering,
+     capbesideposition=left,facing=no,
+     floatrowsep=columnsep,capbesidesep=columnsep,
+     font=default,footfont=footnotesize}
+\DeclareFROpt{style}{\flrow@setstyle{#1}}
+\@ifdefinable\FR@ifCST{\let\FR@ifCST\@firstoftwo}
+\DeclareFROpt{relatedcapstyle}[0]{\flrow@setbool{CST}{#1}}
+\DeclareFROpt{font}{\flrow@setfont{font}{#1}}
+\DeclareFROpt{footfont}{\captionsetup[floatfoot]{font={#1}}}
+\DeclareCaptionOption{footfont}{\caption@setfont{footfont}{#1}}
+\@ifdefinable\floatfont{\let\floatfont\empty}
+\newcommand*\captionfootfont{\normalfont\footnotesize}
+\let\DeclareFloatFont\DeclareCaptionFont
+\@onlypreamble\DeclareFloatFont
+\newcommand*\flrow@setfont[2]{%
+   \caption@setfont{@tempa}{#2}%
+   \expandafter\let\csname float#1\endcsname\caption@tempa}
+\DeclareFROpt{capposition}{\flrow@cappos{#1}}
+\DeclareFROpt{position}{\flrow@cappos{#1}}
+\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
+  }{\flrow@error{Undefined caption position `#1'}%
+  }}}}}
+\@ifdefinable\FBifcaptop{\let\FBifcaptop\@secondoftwo}
+\newcommand\captop{\let\FBifcaptop\@firstoftwo}
+\newcommand\capbot{\let\FBifcaptop\@secondoftwo}
+\@ifdefinable\FBifCAPTOP{\let\FBifCAPTOP\@secondoftwo}
+\newcommand\CAPTOP{\captop\let\FBifCAPTOP\@firstoftwo\CADJtrue}
+\@ifdefinable\FBifcapbeside{}\let\FBifcapbeside\@secondoftwo
+\newcommand\capbeside{\let\FBifcapbeside\@firstoftwo}
+\newcommand\nocapbeside{\let\FBifcapbeside\@secondoftwo}
+\DeclareFROpt{capbesideframe}[0]{\flrow@setbool{FCBOX}{#1}}
+\DeclareFROpt{capbesidewidth}[1]{\flrow@FCc@wd{#1}}
+\@ifdefinable\FC@ifc@wd{\let\FC@ifc@wd\@secondoftwo}
+\newcommand\useFCwidth{\let\FC@ifc@wd\@firstoftwo\let\FCwidth\relax}
+\@ifdefinable\FCwidth{\let\FCwidth\relax}
+\newcommand\flrow@FCc@wd[1]{%
+  \caption@ifinlist{#1}{none,sidefil}{\let\FC@ifc@wd\@secondoftwo
+  }{\useFCwidth\def\FCwidth{#1}}}
+\DeclareFROpt{capbesideposition}{\flrow@scpos{#1}}
+\newcommand\DeclareSCPos[2]{%
+  \define@key{flrow@scpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@scpos[1]{%
+  \let\FR@tmp\@empty
+  \begingroup\caption@setkeys[floatrow]{flrow@scpos}{#1}\endgroup
+  \FR@tmp}
+\@onlypreamble\DeclareSCPos
+\DeclareSCPos{left}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}}
+\DeclareSCPos{right}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\z@}}
+\DeclareSCPos{inside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
+    \count@\c@FBcnt\ifnum\count@=\z@\count@\@ne\fi
+  }}
+\DeclareSCPos{outside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
+    \count@\c@FBcnt\ifnum\count@=\z@\else\advance\count@\@ne\fi
+  }}
+\DeclareSCPos{center}{\def\@FC@vpos{\count@\z@}}
+\DeclareSCPos{top}{\def\@FC@vpos{\count@\@ne}}
+\DeclareSCPos{bottom}{\def\@FC@vpos{\count@\tw@}}
+\newcommand*\@FC@vpos{\count@\tw@}
+\newcommand*\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}
+\newcounter{FBcnt}
+\DeclareFROpt{footposition}{\flrow@ftpos{#1}}
+\newcommand\DeclareFtPos[2]{%
+  \define@key{flrow@ftpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@ftpos[1]{%
+  \let\FR@tmp\@empty
+  \begingroup\caption@setkeys[floatrow]{flrow@ftpos}{#1}\endgroup
+  \FR@tmp}
+\@onlypreamble\DeclareFtPos
+\@ifdefinable\FPOScnt{\newcount\FPOScnt}
+\DeclareFtPos{caption}{\FPOScnt1\relax}
+\DeclareFtPos{bottom}{\FPOScnt2\relax}
+\DeclareFtPos{default}{\FPOScnt0\relax}
+\DeclareFROpt{heightadjust}{\flrow@htadj{#1}}
+\newcommand\DeclareHtAdj[2]{%
+  \define@key{flrow@htadj}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@htadj[1]{\let\FR@tmp\@empty
+  \begingroup\caption@setkeys[floatrow]{flrow@htadj}{#1}\endgroup
+  \FR@tmp}
+\@onlypreamble\DeclareHtAdj
+\DeclareHtAdj{all}{\CADJtrue\OADJtrue}
+\DeclareHtAdj{caption}{\CADJtrue}
+\DeclareHtAdj{object}{\OADJtrue}
+\DeclareHtAdj{none}{\CADJfalse\OADJfalse}
+\DeclareHtAdj{nocaption}{\CADJfalse}
+\DeclareHtAdj{noobject}{\OADJfalse}
+\newif\ifCADJ
+\newif\ifOADJ
+\DeclareFROpt{valign}{\@FB@vpos{#1}}
+\newcommand\@FB@vpos[1]{%
+  \if#1t\def\FBafil{}\def\FBbfil{\vss}\else
+     \if#1b\def\FBafil{\vss}\def\FBbfil{}\else
+        \if#1c\def\FBafil{\vskip0ptplus1fillminus1000pt}%
+              \def\FBbfil{\vskip0ptplus1fillminus1000pt}\else
+           \if#1s\def\FBafil{\vskip0ptminus1000pt}%
+                 \def\FBbfil{\vskip0ptminus1000pt}%
+  \fi\fi\fi\fi}
+\@ifdefinable\FR@iffacing{\let\FR@iffacing\@secondoftwo}
+\DeclareFROpt{facing}[1]{\flrow@setbool{facing}{#1}}
+\newcommand\FB@facing{}
+\DeclareFROpt{margins}{\flrow@FBAlign{#1}}
+\newcommand*\flrow@FBAlign[1]{%
+  \@ifundefined{flrow@mj@#1}%
+    {\flrow@error{Undefined float alignment `#1'}}%
+    {\@nameuse{flrow@mj@#1}}}
+\newcommand*\DeclareMarginSet[2]{%
+  \global\@namedef{flrow@mj@#1}{#2}}
+\@onlypreamble\DeclareMarginSet
+\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@}
+\newskip\LTleft\newskip\LTright
+\DeclareMarginSet{hangleft}{\setfloatmargins
+    {\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
+  \LTleft-\marginparwidth\advance\LTleft-\marginparsep
+  \LTright=\fill}
+\DeclareMarginSet{hangright}{\setfloatmargins
+    {\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
+  \LTleft=\fill
+  \LTright-\marginparwidth\advance\LTright-\marginparsep}
+\DeclareMarginSet{hanginside}{\setfloatmargins
+    *{\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
+  }
+\DeclareMarginSet{hangoutside}{\setfloatmargins
+    *{\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
+  }
+\newcommand\flrow@mj@default{\flrow@mj@centering}
+\newcommand\floatfacing{\@ifstar
+  {\@FC@hpos\floatfacing@}{\FB@facing\floatfacing@}}
+\newcommand\floatfacing@[2]{\ifodd\count@#1\else#2\fi}
+\newcommand\floatboxmargins{\def\FR@tmp{FB}\FB@mset}
+\newcommand\floatrowmargins{\def\FR@tmp{FR}\FB@mset}
+\newcommand\floatcapbesidemargins{\def\FR@tmp{FC}\FB@mset}
+\newcommand\FB@mset{\@ifstar{\FB@mset@}{\FB@@mset}}
+\newcommand\FB@mset@[2]{%
+  \def\FB@facing{\let\FR@iffacing\@firstoftwo\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}}
+\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}}
+\setfloatmargins\hfill\hfill
+\DeclareFROpt{objectset}{\flrow@FBoAlign{#1}}
+\DeclareFROpt{justification}{\flrow@FBoAlign{#1}}
+\let\DeclareObjectSet\DeclareCaptionJustification
+\@onlypreamble\DeclareObjectSet
+\newcommand*\flrow@FBoAlign[1]{%
+  \@ifundefined{caption@hj@#1}%
+    {\flrow@error{Undefined object setting `#1'}}%
+    {\expandafter\let\expandafter\floatobjectset
+     \csname caption@hj@#1\endcsname}}
+\newcommand*\floatobjectset{\centering}
+\DeclareFROpt{floatwidth}{\flrow@FBo@wd{#1}}
+\@ifdefinable\FC@ifo@fil{\let\FC@ifo@fil\@secondoftwo}
+\newcommand\filFCOhsize{\let\FC@ifo@fil\@firstoftwo}
+\newcommand\nofilFCOhsize{\let\FC@ifo@fil\@secondoftwo}
+\newcommand\flrow@setwd{\relax}
+\newcommand\flrow@FBo@wd[1]{%
+  \caption@ifinlist{#1}{none,sidefil}{\filFCOhsize
+  }{\nofilFCOhsize\def\flrow@setwd{\@tempdima=#1}}}
+\DeclareFROpt{floatrowsep}{\flrow@setFRsep\floatrowsep{#1}}
+\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}}
+\DeclareFROpt{capbesidesep}{\flrow@setFRsep\floatcapbesidesep{#1}}
+\let\DeclareFloatSeparators\DeclareCaptionLabelSeparator
+\@onlypreamble\DeclareFloatSeparators
+\newcommand*\flrow@setFRsep[2]{%
+  \@ifundefined{caption@lsep@#2}%
+    {\flrow@error{Undefined float separator `#2'}}%
+    {\expandafter\let\expandafter#1\csname caption@lsep@#2\endcsname}}
+\DeclareFloatSeparators{columnsep}{\hskip\columnsep}
+\DeclareFloatSeparators{qquad}{\qquad}
+\DeclareFloatSeparators{fil}{\hskip\columnsep plus1fil}
+\DeclareFloatSeparators{fill}{\hskip\columnsep plus1fill}
+\newcommand\floatrowsep{\hskip\columnsep}
+\newcommand\floatcapbesidesep{\hskip\columnsep}
+\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}}
+\newcommand\DeclareFloatVCode[2]{\@namedef{flrow@FBr@#1}{#2}}
+\@onlypreamble\DeclareFloatVCode
+\newcommand*\flrow@FBrule[3]{%
+  \@ifundefined{flrow@FBr@#3}%
+    {\flrow@error{Undefined rule `#3'}}%
+    {\let#1\empty
+     \expandafter\let\expandafter#2\csname flrow@FBr@#3\endcsname}}
+\newcommand*\flrow@FRrule[3]{%
+  \@ifundefined{flrow@FBr@#3}%
+    {\flrow@error{Undefined rule `#3'}}%
+    {\def#2{\FBiffloatrow\relax{\@nameuse{flrow@FBr@#3}}}%
+     \expandafter\let\expandafter#1\csname flrow@FBr@#3\endcsname}}
+\newcommand*\flrow@FBskip[1]{%
+  \@ifundefined{flrow@FBr@#1}%
+    {\flrow@error{Undefined rule `#1'}}%
+    {\expandafter\let\expandafter\@@FBskip\csname flrow@FBr@#1\endcsname}}
+\DeclareFloatVCode{none}{}
+\DeclareFloatVCode{thickrule}{\par\rule{\hsize}{.8pt}\vskip2pt\par}
+\DeclareFloatVCode{rule}{\vskip2pt\hrule\vskip2pt}
+\DeclareFloatVCode{lowrule}{\par\vskip2pt\rule\hsize\@wholewidth\par}
+\DeclareFloatVCode{captionskip}{\vskip\captionskip}
+\newcommand\FBstyle@reset{\let\FRifFBOX\@secondoftwo\OADJfalse\CADJfalse\capbot
+  \def\@@FBskip{\vskip\captionskip}\def\@@FRabove{}\def\@@FRbelow{}%
+  \def\@@FBabove{}\def\@@FBbelow{}%
+  \def\FB@Bset{}\def\FB@frame{}\def\FBo@frame{}\def\FR@frame{}%
+  \def\FBo@wadj{}\def\FBo@hadj{}\def\FB@wadj{}\def\FB@hadj{}\def\FR@wadj{}\def\FR@hadj{}}
+\newcommand\@@FBskip{\vskip\captionskip}
+\@ifdefinable\@@FRabove{\def\@@FRabove{}}
+\@ifdefinable\@@FRbelow{\def\@@FRbelow{}}
+\@ifdefinable\@@FBabove{\def\@@FBabove{}}
+\@ifdefinable\@@FBbelow{\def\@@FBbelow{}}
+\@ifdefinable\FB@frame {\def\FB@frame {}}
+\@ifdefinable\FBo@frame{\def\FBo@frame{}}
+\@ifdefinable\FR@frame {\def\FR@frame {}}
+\@ifdefinable\FBo@wadj {\def\FBo@wadj {}}
+\@ifdefinable\FBo@hadj {\def\FBo@hadj {}}
+\@ifdefinable\FB@wadj  {\def\FB@wadj  {}}
+\@ifdefinable\FB@hadj  {\def\FB@hadj  {}}
+\@ifdefinable\FR@wadj  {\def\FR@wadj  {}}
+\@ifdefinable\FR@hadj  {\def\FR@hadj  {}}
+\@ifdefinable\FB@Bset  {\def\FB@Bset  {}}
+\DeclareFROpt{framestyle}{\@ifundefined{FB@#1@frame}%
+  {\let\FRifFBOX\@secondoftwo}{\let\FRifFBOX\@firstoftwo\def\FB@B@{#1}}}
+\DeclareFROpt{framearound}{\flrow@fr@round{#1}}
+\newcommand*\flrow@fr@round[1]{%
+ \caption@ifinlist{#1}{object,contents}{\let\FRifFBOX\@firstoftwo
+    \def\FB@BO@{FBo}%
+  }{\caption@ifinlist{#1}{floatbox,all}{\let\FRifFBOX\@firstoftwo
+    \def\FB@BO@{FB}%
+  }{\caption@ifinlist{#1}{row}{\let\FRifFBOX\@firstoftwo
+    \def\FB@BO@{FR}%
+  }{\caption@ifinlist{#1}{none}{\let\FRifFBOX\@secondoftwo
+  }{\flrow@error{Undefined framed object `#1'}%
+  }}}}}
+\@ifdefinable\FR@ifFIT{\let\FR@ifFIT\@secondoftwo}
+\@ifdefinable\FR@ifROWFILL{\let\FR@ifROWFILL\@secondoftwo}
+\DeclareFROpt{framefit}[0]{\flrow@setbool{FIT}{#1}}
+\@ifdefinable\flrow@@setROWFILL{}
+\@ifdefinable\flrow@leftfill{}\@ifdefinable\flrow@rightfill{}
+\DeclareFROpt{rowfill}[0]{\flrow@setbool{ROWFILL}{#1}}
+\DeclareFROpt{frameset}{\def\FB@Bset{#1}}
+\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}{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+    \@nameuse{FB@\FB@B@ @adj}}\relax}%
+  \@namedef{\FB@BO@ @frame}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+    \@nameuse{FB@\FB@B@ @frame}}%
+  \ifx\FR@frame\empty\else%\ifx\FB@frame\empty
+     \def\FB@hadj{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+       \@nameuse{FB@\FB@B@ @adj}}%
+     \def\FB@wadj{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+       \@nameuse{FB@\FB@B@ @adj}}\relax}%
+     \def\FB@frame{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+       \@nameuse{FB@\FB@B@ @frame}}%
+  \fi%\fi
+  }
+\@ifdefinable\FRifFBOX{\let\FRifFBOX\@secondoftwo}
+\newcommand\FB@fbox@frame[1]{\hbox{%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\fbox{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\newcommand\FB@fbox@adj{\dimen@=2\fboxsep\advance\dimen@2\fboxrule}
+\newcommand\FB@fbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+\newcommand\FB@colorbox@frame[1]{\hbox{%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\@ifdefinable\FB@colorbox@adj{\let\FB@colorbox@adj\FB@fbox@adj}
+\newcommand\FB@colorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+\newcommand\FB@fcolorbox{\fbox}
+\newcommand\FB@fcolorcorners{}
+\@ifdefinable\FR@phantom{}\@ifdefinable\FRset@color{}
+\newcommand\FB@FRcolorbox@frame[1]{\hbox{\let\color@block\FRcolor@block
+  \let\FR@phantom\@firstofone\let\FRset@color\set@color\FB@fcolorcorners
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\@ifdefinable\FB@FRcolorbox@adj{\let\FB@FRcolorbox@adj\FB@fbox@adj}
+\newcommand\FB@FRcolorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+\newcommand\FB@corners@frame[1]{\hbox{\let\color@block\FRcolor@block
+  \let\FR@phantom\phantom\let\FRset@color\relax\FB@fcolorcorners
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\colorbox{white}{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\@ifdefinable\FB@corners@adj{\let\FB@corners@adj\FB@fbox@adj}
+\newcommand\FB@corners@reset{\fboxsep3\p@\fboxrule\z@}
+\newcommand\flrow@l@color@side[2]{{\let\unitlength\relax
+    \picture(\z@,\z@)(\z@,\z@)
+    \put(\z@,#1){{\flrow@ll@col@put}}
+    \put(\z@,#2){{\flrow@ul@col@put}}
+    \endpicture}}
+\newcommand\flrow@r@color@side[2]{{\let\unitlength\relax
+    \picture(\z@,\z@)(\z@,\z@)
+    \put(\z@,#1){{\flrow@lr@col@put}}
+    \put(\z@,#2){{\flrow@ur@col@put}}
+    \endpicture}}
+\newcommand\flrow@ll@col@put{}
+\newcommand\flrow@ul@col@put{}
+\newcommand\flrow@lr@col@put{}
+\newcommand\flrow@ur@col@put{}
+\newcommand\flrow@cboxcorners[4]{%
+    \def\flrow@ll@col@put{#1}%
+    \def\flrow@lr@col@put{#2}%
+    \def\flrow@ur@col@put{#3}%
+    \def\flrow@ul@col@put{#4}%
+    }
+\newcommand\FRcolorboxwd{\z@}
+\newcommand\FRcolorboxht{\z@}
+\newcommand\FRcolorboxdp{\z@}
+\def\FRcolor@block#1#2#3{%
+  {\FRset@color
+   \rlap{\@tempdima#1\edef\FRcolorboxwd{\the\@tempdima}\@tempdima#2\advance\@tempdima#3%
+   \edef\FRcolorboxht{\the\@tempdima}\@tempdima#3\edef\FRcolorboxdp{\the\@tempdima}%
+   \ifcolors@\else\let\FR@phantom\phantom\fi
+     \flrow@l@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
+     \FR@phantom{\vrule\@width#1\@height#2\@depth#3}%
+     \flrow@r@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
+    }}}
+\DeclareFROpt{colorframeset}{\flrow@fcolorbox{#1}}
+\DeclareFROpt{colorframecorners}{\flrow@fcolorcorners{#1}}
+\newcommand*\flrow@fcolorbox[1]{%
+  \@ifundefined{flrow@fcolorbox@#1}%
+    {\flrow@error{Undefined color box `#1'}}%
+    {\expandafter\let\expandafter\FB@fcolorbox
+     \csname flrow@fcolorbox@#1\endcsname}}
+\newcommand*\flrow@fcolorcorners[1]{%
+  \@ifundefined{flrow@fcolorcorners@#1}%
+    {\flrow@error{Undefined color box corners `#1'}}%
+    {\expandafter\let\expandafter\FB@fcolorcorners
+     \csname flrow@fcolorcorners@#1\endcsname}}
+\newcommand*\DeclareColorBox[2]{%
+  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
+   \long\@namedef{flrow@fcolorbox@#1}{#2}}}
+\newcommand*\DeclareCBoxCorners[5]{%
+  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
+   \long\@namedef{flrow@fcolorcorners@#1}{\flrow@cboxcorners{#2}{#3}{#4}{#5}}}}
+\@onlypreamble\DeclareColorBox
+\@onlypreamble\DeclareCBoxCorners
+\newcommand\flrow@load@colorpackage{\IfFileExists{color.sty}%
+    {\def\next{\RequirePackage{color}}}{\let\next\relax}\next}
+\AtBeginDocument{\flrow@load@colorpackage\let\flrow@load@colorpackage\relax}
+\DeclareFROpt{captionskip}{\def\captionskip{#1}%
+  \setlength\abovecaptionskip{#1}}
+\DeclareFROpt{footskip}{\def\floatfootskip{#1}}
+\newcommand\captionskip{10\p@}
+\newcommand\floatfootskip{\skip\@mpfootins}
+\DeclareFROpt{footnoterule}{\flrow@footrule{#1}}
+\newcommand\DeclareFloatFootnoterule[2]{%
+  \long\@namedef{flrow@fnrule@#1}{#2}}
+\newcommand*\flrow@footrule[1]{%
+  \@ifundefined{flrow@fnrule@#1}%
+    {\flrow@error{Undefined footnoterule `#1'}}%
+    {\let\@@FRabove\empty
+     \expandafter\let\expandafter\FBfootnoterule\csname
+       flrow@fnrule@#1\endcsname}}
+\@onlypreamble\DeclareFloatFootnoterule
+\DeclareFloatFootnoterule{normal}{\kern-3\p@
+  \@tempdima.4\columnwidth
+  \hrule\@width\@tempdima\kern2.6\p@}
+\DeclareFloatFootnoterule{limited}{\kern-3\p@
+  \@tempdima.4\columnwidth
+  \ifdim\@tempdima>\frulemax\@tempdima=\frulemax\fi
+  \hrule\@width\@tempdima\kern2.6\p@}
+\newcommand\frulemax{1in}
+\DeclareFloatFootnoterule{fullsize}{\kern-3\p@
+  \hrule\@width\hsize\kern2.6\p@}
+\DeclareFloatFootnoterule{none}{}
+\@ifdefinable\FBfootnoterule{\let\FBfootnoterule\footnoterule}
+\@ifdefinable\FR@iffancy{\let\FR@iffancy\@secondoftwo}
+\DeclareFROpt{fancyboxes}{\flrow@setbool{fancy}{#1}}
+\newcommand\DeclareFNOpt{%
+   \@ifstar{\flrow@declfnopt\AtBeginDocument}
+           {\flrow@declfnopt\@gobble}}
+\newcommand*\flrow@declfnopt[2]{%
+   #1{\undefine@key{newfloat}{#2}}\define@key{newfloat}{#2}}
+\@onlypreamble\DeclareFNOpt
+\@ifdefinable\flrow@types{\newtoks\flrow@types}
+\newcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
+  \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
+  \addtocounter{float@type}{\value{float@type}}%
+  \@namedef{#1name}{#1}\newcounter{#1}%
+  \expandafter\edef\csname fnum@#1\endcsname
+    {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
+       \expandafter\noexpand\csname the#1\endcsname}%
+  \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
+  \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
+  \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
+  \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
+  \@tempa}
+\@onlypreamble\DeclareNewFloatType
+\DeclareFNOpt*{placement}{\flnew@fps{#1}}
+\newcommand\flnew@fps[1]{\@namedef{fps@\FB@captype}{#1}}
+\@onlypreamble\flnew@fps
+\DeclareFNOpt*{name}{\flnew@fname{#1}}
+\newcommand\flnew@fname[1]{\@namedef{\FB@captype name}{#1}}
+\@onlypreamble\flnew@fname
+\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
+\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
+\def\ProcessOptionsWithKV#1{%
+  \let\@tempc\relax
+  \let\FR@tmp\@empty
+  \@for\CurrentOption:=\@classoptionslist\do{%
+    \@ifundefined{KV@#1@\CurrentOption}%
+    {}%
+    {%
+      \@ifundefined{KV@#1@\CurrentOption @default}{%
+       \PackageInfo{#1}{Global option `\CurrentOption' ignored}%
+      }{%
+      \PackageInfo{#1}{Global option `\CurrentOption' processed}%
+      \edef\FR@tmp{\FR@tmp,\CurrentOption,}%
+      \@expandtwoargs\@removeelement\CurrentOption
+        \@unusedoptionlist\@unusedoptionlist
+        }%
+    }%
+  }%
+  \edef\FR@tmp{%
+    \noexpand\caption@setkeys[floatrow]{#1}{%
+      \FR@tmp\@ptionlist{\@currname.\@currext}%
+    }%
+  }%
+  \FR@tmp
+  \let\CurrentOption\@empty
+  \AtEndOfPackage{\let\@unprocessedoptions\relax}}
+\ProcessOptionsWithKV{floatrow}
+\FR@iffancy{\RequirePackage{fr-fancy}}\relax
+\let\ProcessOptionsWithKV\undefined
+\AtBeginDocument{
+ \FR@ifrawfloats
+  {\let\FR@tmp\flrow@Raw@restyle
+ }{\flrow@restyle{table}\flrow@restyle{figure}%
+   \let\FR@tmp\flrow@restyle
+  }\the\flrow@types
+ \@onlypreamble\flrow@restyle\@onlypreamble\flrow@Raw@restyle
+ \flrow@types={}}
+\AtBeginDocument{%
+\@ifundefined{sf@@@subfloat}{\@tempswafalse}{\@tempswatrue}
+\if@tempswa\RequirePackage{fr-subfig}\fi}
+\AtBeginDocument{%
+\@ifundefined{LT@array}{\@tempswafalse}{\@tempswatrue}
+\if@tempswa\RequirePackage{fr-longtable}\fi}
+\endinput
+%%
+%% End of file `floatrow.sty'.
-- 
2.7.4




^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 05/10] Define 'listing' environment for style guide
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
                   ` (3 preceding siblings ...)
  2017-07-28 10:00 ` [PATCH 04/10] Apply workaround to floatrow.sty and rename it floatrowpf.sty Akira Yokosawa
@ 2017-07-28 10:01 ` Akira Yokosawa
  2017-07-28 10:02 ` [PATCH 06/10] styleguide: Add listing environment examples Akira Yokosawa
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28 10:01 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From c73dfa97f5d383073fece910d9d0ede8bdab6e18 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 20 Jul 2017 23:42:40 +0900
Subject: [PATCH 05/10] Define 'listing' environment for style guide

Define an experimental floating environment for code snippet
to be used in style guide. It requires "floatrowpf" package
(customized floatrow).

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 perfbook.tex | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/perfbook.tex b/perfbook.tex
index cda014c..629ecea 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -80,6 +80,9 @@
 \renewcommand{\path}[1]{\nolinkurl{#1}} % workaround of interference with mathastext
 }{}

+\usepackage{floatrowpf} % Use customized floatrow
+\DeclareNewFloatType{listing}{placement=htbp,name=Listing,within=chapter,fileext=lst}
+
 \usepackage{bm} % for bold math mode fonts --- should be after math mode font choice

 \IfLmttForCode{
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 06/10] styleguide: Add listing environment examples
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
                   ` (4 preceding siblings ...)
  2017-07-28 10:01 ` [PATCH 05/10] Define 'listing' environment for style guide Akira Yokosawa
@ 2017-07-28 10:02 ` Akira Yokosawa
  2017-07-28 10:03 ` [PATCH 07/10] Disable 'floatrow' layout in manually aligned code snippets Akira Yokosawa
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28 10:02 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From ccc648b55d760931fa49d1dc8a24a9312b0cb5c2 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 20 Jul 2017 23:50:12 +0900
Subject: [PATCH 06/10] styleguide: Add listing environment examples

Add three examples:

  1) Caption at the bottom
  2) Caption at the top
  3) "Ruled" style

Example 2) and 3) change their looks by the floatrow's
"\thisfloatsetup{}" macro.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/hello.c        |  9 +++++++
 appendix/styleguide/styleguide.tex | 48 ++++++++++++++++++++++++++++++++++++--
 2 files changed, 55 insertions(+), 2 deletions(-)
 create mode 100644 appendix/styleguide/hello.c

diff --git a/appendix/styleguide/hello.c b/appendix/styleguide/hello.c
new file mode 100644
index 0000000..d35d93f
--- /dev/null
+++ b/appendix/styleguide/hello.c
@@ -0,0 +1,9 @@
+/*
+ * Sample Code Snippet
+ */
+#include <stdio.h>
+int main(void)
+{
+  printf("Hello world!\n");
+  return 0;
+}
diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index 72b8ca0..d2ace52 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -589,8 +589,21 @@ This section lists up such candidates.
 Strictly speaking, code snippets are \emph{not} figures.
 They deserve their own floating environment.
 The ``floatrow'' package would be of help.
+Figure~\ref{fig:app:styleguide:Sample Code Snippet}
+can be typeset as in
+Listing~\ref{lst:app:styleguide:Sample Code Snippet}
+using an experimental environment ``listing''.

-% TODO: Add example
+\begin{listing}
+{ \scriptsize
+\verbfilebox[{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}]
+	{appendix/styleguide/hello.c}
+}
+\centering
+\theverbbox
+\caption{Sample Code Snippet}
+\label{lst:app:styleguide:Sample Code Snippet}
+\end{listing}

 \subsubsection{Position of Caption}
 \label{sec:app:styleguide:Position of Caption}
@@ -604,8 +617,39 @@ The same can be said of code snippets, which are read from
 top to bottom.
 The floatrow package mentioned above also has the capability
 to adjust layout of caption.
+For example,
+Listing~\ref{lst:app:styleguide:Sample Code Snippet (Top)}
+has the option \qco{cappostion=top} in its preamble.

-% TODO: Add example
+\begin{listing}\RawFloats
+{ \scriptsize
+\verbfilebox[{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}]
+	{appendix/styleguide/hello.c}
+}
+\begin{floatrow}[1]\thisfloatsetup{capposition=top}
+  \floatbox{listing}[\columnwidth]{\caption{Sample Code Snippet (Top)}
+    \label{lst:app:styleguide:Sample Code Snippet (Top)}}{
+\theverbbox
+}
+\end{floatrow}
+\end{listing}
+
+For code snippets, the ``ruled'' style would look even better.
+Listing~\ref{lst:app:styleguide:Sample Code Snippet (Ruled)}
+is an example using the option \qco{style=ruled}.
+
+\begin{listing}\RawFloats
+{ \scriptsize
+\verbfilebox[{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}]
+	{appendix/styleguide/hello.c}
+}
+\begin{floatrow}[1]\thisfloatsetup{style=ruled}
+  \floatbox{listing}[\columnwidth]{\caption{Sample Code Snippet (Ruled)}
+    \label{lst:app:styleguide:Sample Code Snippet (Ruled)}}{
+\theverbbox
+}
+\end{floatrow}
+\end{listing}

 Once the conversion of code sippets to a new environment has
 completed, we would be able to choose one of the style options
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 07/10] Disable 'floatrow' layout in manually aligned code snippets
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
                   ` (5 preceding siblings ...)
  2017-07-28 10:02 ` [PATCH 06/10] styleguide: Add listing environment examples Akira Yokosawa
@ 2017-07-28 10:03 ` Akira Yokosawa
  2017-07-28 10:04 ` [PATCH 08/10] styleguide: Add example of grouping " Akira Yokosawa
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28 10:03 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 5867a50f61759b67220b3dfdec72d7b9691f6b09 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 21 Jul 2017 00:02:37 +0900
Subject: [PATCH 07/10] Disable 'floatrow' layout in manually aligned code snippets

floatrow's default horizontal margin setting is "centering".
It conflicts with manually aligned code snippets in "figure*"
environments.

Disable the layout by \RawFloats macro for now.

These listings should be grouped into combined floating objects,
if we decide to employ the floatrow's feature.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 defer/rcuusage.tex | 6 +++---
 howto/howto.tex    | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/defer/rcuusage.tex b/defer/rcuusage.tex
index af4faff..f3174f3 100644
--- a/defer/rcuusage.tex
+++ b/defer/rcuusage.tex
@@ -603,7 +603,7 @@ and
 all taken from
 Wikipedia~\cite{WikipediaRCU}.

-\begin{figure*}[htbp]
+\begin{figure*}[htbp]\RawFloats
 { \scriptsize
 \begin{verbbox}
  1 struct el {                           1 struct el {
@@ -623,7 +623,7 @@ Wikipedia~\cite{WikipediaRCU}.
 \label{fig:defer:Converting Reader-Writer Locking to RCU: Data}
 \end{figure*}

-\begin{figure*}[htbp]
+\begin{figure*}[htbp]\RawFloats
 { \scriptsize
 \begin{verbbox}
  1 int search(long key, int *result)     1 int search(long key, int *result)
@@ -649,7 +649,7 @@ Wikipedia~\cite{WikipediaRCU}.
 \label{fig:defer:Converting Reader-Writer Locking to RCU: Search}
 \end{figure*}

-\begin{figure*}[htbp]
+\begin{figure*}[htbp]\RawFloats
 { \scriptsize
 \begin{verbbox}
  1 int delete(long key)                  1 int delete(long key)
diff --git a/howto/howto.tex b/howto/howto.tex
index 323f95f..af88c46 100644
--- a/howto/howto.tex
+++ b/howto/howto.tex
@@ -361,7 +361,7 @@ Other types of systems have well-known ways of locating files by filename.
 \section{Whose Book Is This?}
 \label{sec:howto:Whose Book Is This?}

-\begin{figure*}[tbp]
+\begin{figure*}[tbp]\RawFloats
 {
 \scriptsize
 \begin{verbbox}
@@ -379,7 +379,7 @@ Other types of systems have well-known ways of locating files by filename.
 \label{fig:howto:Creating a Up-To-Date PDF}
 \end{figure*}

-\begin{figure*}[tbp]
+\begin{figure*}[tbp]\RawFloats
 {
 \scriptsize
 \begin{verbbox}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 08/10] styleguide: Add example of grouping code snippets
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
                   ` (6 preceding siblings ...)
  2017-07-28 10:03 ` [PATCH 07/10] Disable 'floatrow' layout in manually aligned code snippets Akira Yokosawa
@ 2017-07-28 10:04 ` Akira Yokosawa
  2017-07-28 10:05 ` [PATCH 09/10] styleguide: Add example of preferred table layout using 'booktabs' Akira Yokosawa
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28 10:04 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 6ded852056ccbac9537fff8230bec667062c9d49 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 21 Jul 2017 22:15:05 +0900
Subject: [PATCH 08/10] styleguide: Add example of grouping code snippets

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/styleguide.tex | 79 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 78 insertions(+), 1 deletion(-)

diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index d2ace52..dab6ffd 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -669,7 +669,84 @@ The floatrow package provides the features to do so.\footnote{
   One problem of grouping figures might be the learning curve
   to do so.}

-% TODO: Add example
+For example,
+Figures~\ref{fig:advsync:Message-Passing Litmus Test}
+and~\ref{fig:advsync:Enforcing Order of Message-Passing Litmus Test}
+can be grouped together as in
+Listings~\ref{lst:app:styleguide:Message-Passing Litmus Test}
+and~\ref{lst:app:styleguide:Enforcing Order of Message-Passing Litmus Test}.
+
+\begin{listing*}\RawFloats
+{ \scriptsize
+\begin{verbbox}
+ 1 C C-MP+o-wmb-o+o-o.litmus
+ 2
+ 3 {
+ 4 }
+ 5
+ 6
+ 7 P0(int* x0, int* x1) {
+ 8
+ 9   WRITE_ONCE(*x0, 2);
+10   smp_wmb();
+11   WRITE_ONCE(*x1, 2);
+12
+13 }
+14
+15 P1(int* x0, int* x1) {
+16
+17   int r2;
+18   int r3;
+19
+20   r2 = READ_ONCE(*x1);
+21   r3 = READ_ONCE(*x0);
+22
+23 }
+24
+25 exists (1:r2=2 /\ 1:r3=0)
+\end{verbbox}
+}
+  \begin{floatrow}[2]\thisfloatsetup{style=ruled}
+    \floatbox{listing}[2.2in]{\caption{Message-Passing Litmus Test}
+      \label{lst:app:styleguide:Message-Passing Litmus Test}}{
+      \theverbbox
+}
+{ \scriptsize
+\begin{verbbox}
+ 1 C C-MP+o-wmb-o+o-rmb-o.litmus
+ 2
+ 3 {
+ 4 }
+ 5
+ 6 P0(int* x0, int* x1) {
+ 7
+ 8   WRITE_ONCE(*x0, 2);
+ 9   smp_wmb();
+10   WRITE_ONCE(*x1, 2);
+11
+12 }
+13
+14 P1(int* x0, int* x1) {
+15
+16   int r2;
+17   int r3;
+18
+19   r2 = READ_ONCE(*x1);
+20   smp_rmb();
+21   r3 = READ_ONCE(*x0);
+22
+23 }
+24
+25 exists (1:r2=2 /\ 1:r3=0)
+\end{verbbox}
+}
+    \thisfloatsetup{style=ruled}\hspace{1em}%
+    \floatbox{listing}[2.2in]{\caption{Enforcing Order of Message\-/Passing Litmus Test}
+      \label{lst:app:styleguide:Enforcing Order of Message-Passing Litmus Test}}{
+      \theverbbox
+}
+  \end{floatrow}
+\end{listing*}

 \subsubsection{Ruled Line in Table}
 \label{sec:app:styleguide:Ruled Line in Table}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 09/10] styleguide: Add example of preferred table layout using 'booktabs'
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
                   ` (7 preceding siblings ...)
  2017-07-28 10:04 ` [PATCH 08/10] styleguide: Add example of grouping " Akira Yokosawa
@ 2017-07-28 10:05 ` Akira Yokosawa
  2017-07-28 10:06 ` [PATCH 10/10] styleguide: Tweak layout of 'Limitation' table Akira Yokosawa
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28 10:05 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 34bcfe5d4ead90d2bec9373e5f5352c5530183c2 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 21 Jul 2017 22:31:43 +0900
Subject: [PATCH 09/10] styleguide: Add example of preferred table layout using 'booktabs'

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/styleguide.tex | 35 ++++++++++++++++++++++++++++++++++-
 perfbook.tex                       |  1 +
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index dab6ffd..17a74d7 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -758,7 +758,40 @@ look ugly.\footnote{
 Vertical lines should be avoided and horizontal lines should be
 used sparingly, especially in tables of simple structure.

-% TODO: Add example
+For example,
+Table~\ref{tab:cpu:Performance of Synchronization Mechanisms on 4-CPU 1.8GHz AMD Opteron 844 System}
+can be tweaked by the help of ``booktabs'' package as is shown in
+Table~\ref{tab:app:styleguide:Performance of Synchronization Mechanisms of 4-CPU 1.8GHz AMD Opteron 844 System},
+with the caption at the top.
+
+\begin{table}[htb]\RawFloats
+\renewcommand*{\arraystretch}{1.2}
+\begin{floatrow}[1]\ttabbox[]{
+\small
+\begin{tabular}{@{}lrr@{}}\toprule
+				& 	 	& Ratio \\
+	Operation		& Cost (ns) 	& (cost/clock) \\
+	\midrule
+	Clock period		&           0.6	&           1.0 \\
+	Best-case CAS		&          37.9	&          63.2 \\
+	Best-case lock		&          65.6	&         109.3 \\
+	Single cache miss	&         139.5	&         232.5 \\
+	CAS cache miss		&         306.0	&         510.0 \\
+	Comms Fabric		&       5,000\textcolor{white}{.0}
+						&       8,330\textcolor{white}{.0}
+								\\
+	Global Comms		& 195,000,000\textcolor{white}{.0}
+						& 325,000,000\textcolor{white}{.0} \\
+\bottomrule
+\end{tabular}}{
+\caption{Performance of Synchronization Mechanisms of 4-CPU 1.8\,GHz AMD Opteron 844 System}
+\label{tab:app:styleguide:Performance of Synchronization Mechanisms of 4-CPU 1.8GHz AMD Opteron 844 System}
+}
+\end{floatrow}
+\end{table}
+
+Note that ruled lines of booktabs can not be mixed with
+vertical lines in a table.

 \subsubsection{Miscellaneous Candidates}
 \label{sec:app:styleguide:Miscellaneous Candidates}
diff --git a/perfbook.tex b/perfbook.tex
index 629ecea..16d30dd 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -82,6 +82,7 @@

 \usepackage{floatrowpf} % Use customized floatrow
 \DeclareNewFloatType{listing}{placement=htbp,name=Listing,within=chapter,fileext=lst}
+\usepackage{booktabs} % For better looking tables

 \usepackage{bm} % for bold math mode fonts --- should be after math mode font choice

-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 10/10] styleguide: Tweak layout of 'Limitation' table
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
                   ` (8 preceding siblings ...)
  2017-07-28 10:05 ` [PATCH 09/10] styleguide: Add example of preferred table layout using 'booktabs' Akira Yokosawa
@ 2017-07-28 10:06 ` Akira Yokosawa
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-28 10:06 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From cdfca8b81a7d4ee194272359d1775c0c343e0fbe Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 28 Jul 2017 16:46:48 +0900
Subject: [PATCH 10/10] styleguide: Tweak layout of 'Limitation' table

Move caption to top, and use nice ruled lines of "booktabs".

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/styleguide.tex | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index 17a74d7..3e5746b 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -389,15 +389,20 @@ Table~\ref{tab:app:styleguide:Limitation of Monospace Macro}
 lists such limitations.

 \begin{table}[tbh]
-\centering\footnotesize
-\begin{tabular}{lll}
+  \renewcommand*{\arraystretch}{1.2}
+  \begin{floatrow}[1]
+    \ttabbox[\columnwidth]{
+\footnotesize
+\begin{tabular}{@{}lll@{}}\toprule
   Macro &  Need Escape & Should Avoid \\
-  \hline
+  \midrule
   \co{\\co}, \co{\\nbco} & \co{\\}, \%, \{, \} & \\
   \co{\\tco}  & \# & \%, \{, \}, \co{\\} \\
+\bottomrule
 \end{tabular}
-\caption{Limitation of Monospace Macro}
-\label{tab:app:styleguide:Limitation of Monospace Macro}
+}{\caption{Limitation of Monospace Macro}
+    \label{tab:app:styleguide:Limitation of Monospace Macro}}
+  \end{floatrow}
 \end{table}

 While \verb|\co{}| requires some characters to be escaped,
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* Re: [PATCH 03/10] Localize floatrow.sty
  2017-07-28  9:58 ` [PATCH 03/10] Localize floatrow.sty Akira Yokosawa
@ 2017-07-31  3:26   ` Paul E. McKenney
  2017-07-31  4:05     ` Akira Yokosawa
  0 siblings, 1 reply; 40+ messages in thread
From: Paul E. McKenney @ 2017-07-31  3:26 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Fri, Jul 28, 2017 at 06:58:07PM +0900, Akira Yokosawa wrote:
> >From 53ff86011be07a62dba37a5bef56f04f25531dd1 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Thu, 20 Jul 2017 23:34:58 +0900
> Subject: [PATCH 03/10] Localize floatrow.sty
> 
> The "floatrow" package conflicts with two-column layout.
> A possible workaround was posted at [1] and it seems to work
> in perfbook. Before the change, import the style file as of v0.3b
> with trailing white spaces removed.
> 
> [1] https://tex.stackexchange.com/questions/133127/

If I understand the license correctly, we have to use a different name
due to having modified the file.  Or has this change (commenting out
\textwidth\columnwidth) been applied upstream?  Or does changing the
name mean that the fix is ineffective?

(I applied the first two, thank you!)

							Thanx, Paul

> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> ---
>  floatrow.sty | 1472 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 1472 insertions(+)
>  create mode 100644 floatrow.sty
> 
> diff --git a/floatrow.sty b/floatrow.sty
> new file mode 100644
> index 0000000..18ef28a
> --- /dev/null
> +++ b/floatrow.sty
> @@ -0,0 +1,1472 @@
> +%%
> +%% This is file `floatrow.sty',
> +%% generated with the docstrip utility.
> +%%
> +%% The original source files were:
> +%%
> +%% floatrow.dtx  (with options: `floatrow,floatsetup')
> +%%
> +%% IMPORTANT NOTICE:
> +%%
> +%% For the copyright see the source file.
> +%%
> +%% Any modified versions of this file must be renamed
> +%% with new filenames distinct from floatrow.sty.
> +%%
> +%% For distribution of the original source see the terms
> +%% for copying and modification in the file floatrow.dtx.
> +%%
> +%% This generated file may be distributed as long as the
> +%% original source files, as listed above, are part of the
> +%% same distribution. (The sources need not necessarily be
> +%% in the same archive or directory.)
> +\NeedsTeXFormat{LaTeX2e}[1995/06/01]
> +\ProvidesPackage{floatrow}
> +       [2008/08/02 v0.3b floatrow: float package extension]
> +\@ifundefined{float@caption}{%
> +  \@ifundefined{rotfloat@float}{}%
> +    {\PackageError{floatrow}{Do not use rotfloat package with floatrow.\MessageBreak
> +        The latter will be skipped}{}%
> +  \@namedef{opt@floatrow.sty}{}\endinput}}%
> +  {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak
> +        The latter will be skipped}{}%
> +  \@namedef{opt@floatrow.sty}{}\endinput}
> +\@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)}
> +\RequirePackage{keyval}
> +\RequirePackage{caption3}
> +\@ifpackagelater{caption3}{2007/04/11 v3.0q}{}{\PackageError
> +    {floatrow}{For a successful cooperation we need at least\MessageBreak
> +    version `2007/04/11 v3.0q' of package caption,\MessageBreak
> +        but only version\MessageBreak
> +          `\csname ver@caption.\@pkgextension\endcsname'\MessageBreak
> +        is available}\@eha\endinput}
> +\providecommand*\caption@fnum[1]{%
> +   \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}}
> +\@ifdefinable\FR@flboxreset{\let\FR@flboxreset\@floatboxreset}
> +\@ifdefinable\FR@makecaption{\let\FR@makecaption\@makecaption}
> +\newcommand\flrow@caption{%
> +   \ifx\@captype\@undefined
> +     \@latex@error{\noexpand\caption outside float}\@ehd
> +     \expandafter\@gobble
> +   \else
> +     \refstepcounter\@captype
> +     \expandafter\@firstofone
> +   \fi
> +   {\@dblarg{\@caption\@captype}}%
> +}
> +\@ifdefinable\float@caption{\let\float@caption\@caption}
> +\newcounter{float@type}
> +\@ifundefined{c@figure}%
> +  {\setcounter{float@type}{1}}%
> +  {\setcounter{float@type}{4}}
> +\newcommand\flrow@package{floatrow}
> +\newcommand*\flrow@error[1]{\PackageError\flrow@package{#1}\flrow@eh}
> +\newcommand*\flrow@eh{%
> +  If you do not understand this error, please take look\MessageBreak
> +  at `floatrow' and `caption' package documentations.\MessageBreak
> +  \@ehc}
> +\newcommand\floatstyle[1]{\@ifundefined{flrow@sty@#1}%
> +  {\flrow@error{Unknown float style `#1'}}{\edef\float@style{#1}}}
> +\newcommand\floatname[2]{\@namedef{#1name}{#2}}
> +\newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}}
> +\newif\if@@FS
> +\newcommand\FR@redefs{%
> +  \@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}
> +\newcommand\flrow@makecaption[2]{\ifnum\floatbox@depth=\z@
> +    \ifvoid\@floatcapt
> +      \else\flrow@error{Caption(s) lost}\fi\fi
> +  \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
> +   \linewidth\hsize
> +   \ifdim\hsize<70mm\sloppy\fi
> +   \normalsize
> +   \abovecaptionskip\z@\belowcaptionskip\z@
> +   \FR@makecaption{#1}{#2}\egroup}
> +\newcommand\killfloatstyle{\FBbuildtrue\if@@FS\hsize\FB@wd\fi\@@FSfalse}
> +\newcommand\flrow@capsetup{}
> +\edef\float@style{plain}
> +\@ifdefinable\FBB@wd{\let\FBB@wd\relax}
> +\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}}
> +\newcommand\flrow@restyle[1]{%
> +  \@namedef{#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
> +    \flrow@setlist{{#1}}%
> +    \textwidth\columnwidth\edef\FBB@wd{\the\columnwidth}%
> +    \FRifFBOX\@@setframe\relax\@@FStrue\@float{#1}}%
> +  \@namedef{#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
> +    \flrow@setlist{{#1}{widefloat}{wide#1}}%
> +    \FRifFBOX\@@setframe\relax\@@FStrue\edef\FBB@wd{\the\textwidth}%
> +    \let\@xdblfloat\@xfloat\relax
> +    \FR@ifdoubleaswide
> +     {\if@twocolumn\else\let\@dblfloat\@float\fi}\relax
> +    \@dblfloat{#1}}%
> +  \expandafter\let\csname end#1\endcsname\float@end
> +  \expandafter\let\csname end#1*\endcsname\float@dblend
> + \@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\relax\@@FStrue
> +    \let\rotfloat@@makebox\float@makebox
> +    \let\float@makebox\rotfloat@makebox
> +    \@float{#1}}%
> +  \@namedef{endsideways#1}{\FBbuildtrue\float@end}
> +  \ifx\@rotdblfloat\undefined
> +   \@namedef{sideways#1*}{%
> +     \flrow@error{%
> +      You need rotating version 2.10 or newer to do this}%
> +     \@nameuse{sideways#1}}%
> +  \else
> +   \@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\relax\@@FStrue
> +     \let\@xdblfloat\@xfloat
> +     \let\rotfloat@@makebox\float@makebox
> +     \let\float@makebox\rotdblfloat@makebox
> +     \@dblfloat{#1}}%
> +  \fi
> +  \@namedef{endsideways#1*}{\FBbuildtrue\float@dblend}}
> + \@ifundefined{wrapfloat}{}{%
> +   \@ifundefined{flrow@WF@rapt}{\let\flrow@WF@rapt\WF@rapt
> +   \def\WF@rapt[##1]##2{\FRifFBOX\@@setframe\relax\@@FStrue
> +     \dimen@##2\relax
> +     \ifdim\dimen@>\z@
> +       \edef\FBB@wd{\the\dimen@}\FB@fs@wd\dimen@\FBo@wd
> +     \fi
> +     \flrow@WF@rapt[##1]{\dimen@}%
> +       \the\FR@everyfloat\ignorespaces}%
> +   }{}%
> +   \@namedef{wrap#1}{\killfloatstyle\def\@captype{#1}%
> +     \FR@redefs\FBc@wd\z@
> +     \flrow@setlist{{#1}{wrapfloat}{wrap#1}}%
> +     \def\WF@floatstyhook{\let\@currbox\WF@box
> +       \ifFBbuild
> +         \global\setbox\WF@box\flrow@FB{\wd\WF@box}%
> +       \else
> +         \global\let\flrow@typ@tmpset\undefined
> +         \global\let\WF@box\@currbox
> +       \fi}%
> +     \@ifnextchar[\WF@wr{\WF@wr[]}}%]
> +   \@namedef{endwrap#1}{\endwrapfloat
> +     \@ifundefined{FloatHBarrier}{}\FloatHBarrier
> +     }}
> + \@ifundefined{sf@@@subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}}
> +\newcommand\RawFloats{\@ifnextchar[%]
> +    \flrow@rawfloatschk\flrow@rawfloats}
> +\newcommand\flrow@rawfloats{\killfloatstyle\@parboxrestore
> +    \let\@makecaption\FR@makecaption
> +    \expandafter\ifx\csname end\@captype\endcsname\float@endH
> +        \global\FBbuildfalse
> +    \else
> +        \@namedef{end\@captype}{\end@float}%
> +    \fi
> +    \expandafter\ifx\csname end\@captype*\endcsname\float@endH
> +        \global\FBbuildfalse
> +    \else
> +        \@namedef{end\@captype*}{\end@dblfloat}%
> +    \fi
> +  \@ifundefined{@rotfloat}{}{%
> +    \@namedef{endsideways\@captype}{\end@rotfloat}%
> +    \@namedef{endsideways\@captype*}{\end@rotdblfloat}%
> +  }%
> +  \@ifundefined{wrapfloat}{}{%
> +    \@namedef{endwrap\@captype}{\endwrapfloat}%
> +  }}
> +\@ifdefinable\flrow@rawfloatschk{}
> +\def\flrow@rawfloatschk[#1]{\@ifnextchar[%]
> +    {\flrow@RawFloats[#1]}{\flrow@@RawFloats#1,;}}
> +\@ifdefinable\flrow@RawFloats{}
> +\newcommand\flrow@raw@set{\AtBeginDocument}
> +\AtBeginDocument{\let\flrow@raw@set\@firstofone}
> +\def\flrow@RawFloats[#1][#2]{\flrow@RawFloats@[#1]#2,;}
> +\def\flrow@RawFloats@[#1]#2,{%
> +  \caption@ifinlist{#2}{float}{\flrow@raw@set
> +        {\@namedef{#1}{\@float{#1}}}%
> +  }{\caption@ifinlist{#2}{widefloat}{\flrow@raw@set%
> +        {\@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}}%
> +  }{\caption@ifinlist{#2}{rotfloat}{%
> +    \@ifundefined{@rotfloat}{}{\flrow@raw@set
> +        {\@namedef{sideways#1}{\@rotfloat{#1}}}}%
> +  }{\caption@ifinlist{#2}{widerotfloat}{%
> +    \@ifundefined{@rotfloat}{}{\flrow@raw@set
> +        {\@namedef{sideways#1*}{\@rotdblfloat{#1}}}}%
> +  }{\caption@ifinlist{#2}{wrapfloat}{%
> +    \@ifundefined{wrapfloat}{}{\flrow@raw@set
> +        {\@namedef{wrap#1}{\wrapfloat{#1}}}}}%
> +  }{\caption@ifinlist{#2}{all,allfloats}{%
> +    \flrow@@RawFloats{#1}%
> +  }{\flrow@error{Undefined float subtype `#2'}%
> +  }}}}}\@ifnextchar;\@gobble{\flrow@RawFloats@[#1]}}
> +\@ifdefinable\flrow@@RawFloats{}
> +\def\flrow@@RawFloats#1,{%
> + \flrow@raw@set{\@namedef{#1}{\@float{#1}}%
> +    \@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}%
> +  \@ifundefined{@rotfloat}{}{%
> +    \@namedef{sideways#1}{\@rotfloat{#1}}%
> +    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
> +  }%
> +  \@ifundefined{wrapfloat}{}{%
> +    \@namedef{wrap#1}{\wrapfloat{#1}}}%
> +  }\@ifnextchar;\@gobble\flrow@@RawFloats
> +}
> +\newcommand\flrow@Raw@restyle[1]{%
> +    \@namedef{#1}{\@float{#1}}%
> +    \@namedef{#1*}{\@dblfloat{#1}}%
> +    \@namedef{end#1}{\end@float}%
> +    \@namedef{end#1*}{\end@dblfloat}%
> +  \@ifundefined{@rotfloat}{}{%
> +    \@namedef{sideways#1}{\@rotfloat{#1}}%
> +    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
> +    \@namedef{endsideways#1}{\end@rotfloat}%
> +    \@namedef{endsideways#1*}{\end@rotdblfloat}%
> +  }%
> +  \@ifundefined{wrapfloat}{}{%
> +    \@namedef{wrap#1}{\wrapfloat{#1}}%
> +    \@namedef{endwrap#1}{\endwrapfloat}%
> +  }%
> + }
> +\newcommand\RawCaption[1]{{\let\@makecaption\FR@makecaption #1}}
> +\@ifdefinable\float@exts{\newtoks\float@exts}
> +\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}}
> +\let\@float@Hx\@xfloat
> +\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}}
> +\AtBeginDocument{%
> +  \@ifundefined{latex@xfloat}{}{%
> +    \let\floatrow@ORI@xfloat\@xfloat
> +    \def\@xfloat#1[#2]{%
> +      \floatrow@ORI@xfloat{#1}[#2]%
> +      \floatfont}}}%
> +\newsavebox\float@box
> +\def\@float@HH#1[H]{%
> +  \@ifundefined{FloatHBarrier}{}\FloatHBarrier
> +  \expandafter\let\csname end#1\endcsname\float@endH
> +  \FR@ifdoubleaswide
> +   {\expandafter\let\csname end#1*\endcsname\float@endH}\relax
> +  \let\@currbox\float@box
> +  \flrow@setlist*{{floatH}{#1H}}%
> +  \def\@captype{#1}%\setbox\@floatcapt=\vbox{}%
> +  \setbox\@currbox\color@vbox\normalcolor
> +    \vbox\bgroup
> +      \hsize\columnwidth
> +      \linewidth\columnwidth
> +      \@parboxrestore\leftmargin\z@\rightmargin\z@
> +      \@floatboxreset \@setnobreak
> +  \ignorespaces}
> +\newcommand\flrow@flboxreset{\FR@flboxreset
> +  \@ifundefined{capstart}{}{\capstart}%
> +  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
> +  \if@tempswa\FB@readaux{\relax}\fi
> +  \global\let\FBcheight\relax\global\let\FBoheight\relax
> +  \global\let\FBfheight\relax
> +  \FBifcapbeside\FC@fs@wd\FB@fs@wd
> +  \the\FR@everyfloat}
> +\@ifdefinable\FBcheight{\let\FBcheight\relax}
> +\@ifdefinable\FBoheight{\let\FBoheight\relax}
> +\@ifdefinable\FBfheight{\let\FBfheight\relax}
> +\newcommand\FB@fs@wd{\@tempdima\FBB@wd
> +  \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\linewidth\hsize
> +  \FBifcaptop
> +    {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
> +    {\columnwidth\FBc@wd}%
> +  }
> +\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
> +  \FC@ifc@wd\@tempswatrue\@tempswafalse
> +  \if@tempswa
> +     \ifx\FCwidth\relax
> +        \flrow@error{You didn't define width of caption\MessageBreak
> +          for plain floating environment.}%
> +     \else
> +        \global\FBc@wd=\FCwidth
> +        \FC@ifo@fil{\advance\@tempdima-\FBc@wd}\relax
> +     \fi
> +  \else
> +    \global\FBc@wd\@tempdima
> +  \fi
> +  \FC@ifo@fil\relax{\@tempdima.5\@tempdima
> +    \flrow@setwd\FB@wd\@tempdima}%
> +  \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}%
> +  \FC@ifc@wd\relax{\global\advance\FBc@wd-\FB@wd}%
> +  \hsize\FBo@wd\linewidth\hsize\columnwidth\FBc@wd\linewidth\hsize
> +  \FCset@vpos}
> +\newcommand\float@makebox[1]{%
> +  \FBifcapbeside{\flrow@FC{#1}}{\flrow@FB{#1}}}
> +\newcommand\FBaskip{\z@}\newcommand\FBbskip{\z@}
> +\newif\ifFBbuild\FBbuildtrue
> +\newcommand\flrow@FB[1]{\vbox{\@tempdima=#1\vskip\FBaskip
> +  \@parboxrestore\leftmargin\z@\rightmargin\z@
> +  \hbox to\@tempdima{\def\FB@zskip{\vskip\z@}%
> +  \FBleftmargin\flrow@FB@\FBrightmargin}%
> +  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
> +  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}%
> +  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
> +\newcommand\flrow@FC[1]{\vbox{\@tempdima=#1\@parboxrestore
> +  \leftmargin\z@\rightmargin\z@\flrow@FClist\vskip\FBaskip
> +  \hbox to\@tempdima{\FCleftmargin\flrow@FC@\FCrightmargin}%
> +  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
> +  \nocapbeside\global\let\FCwidth\relax
> +  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
> +\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}
> +\newcommand\FBafil{\vfill}\newcommand\FBbfil{\vfill}
> +\newcommand\FBw@box[1]{\hsize#1\columnwidth#1\linewidth#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}
> +\newcommand\flrow@FB@{\global\let\flrow@typ@tmpset\undefined
> + \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\leftmargin\z@\rightmargin\z@
> +  \@@FBabove
> +  \FBifcaptop\@tempswatrue\@tempswafalse
> +  \if@tempswa
> +    \ifvoid\@floatcapt\else
> +      \FB@vbox\FBc@wd\FBcheight{\FBifCAPTOP\relax\vfill
> +        \unvbox\@floatcapt
> +        \ifnum\FPOScnt=\@ne\vbox{\FB@foot}\fi\vfil}%
> +      \@@FBskip\hrule\@height\z@\@depth\z@
> +    \fi
> +    \vtop{\vskip\z@\FBo@frame{\FB@vtop\FBo@wd\FBoheight
> +      {\FBafil\unvbox\@currbox\FBbfil
> +      \vskip\z@
> +      \ifnum\FPOScnt=\z@
> +        \FB@vtop\FBo@wd\FBfheight{\FB@foot\vfil}\fi}}\par
> +      \vskip\z@
> +      \ifnum\FPOScnt=\tw@\vskip\z@
> +        \FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi}%
> +  \else\ifnum\FPOScnt=\z@\FPOScnt=\@ne\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=\@ne\vtop{\FB@foot}%
> +    \fi\par
> +        \vfill\vskip\z@\vss
> +        \ifnum\FPOScnt=2\FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi
> +        }\fi
> +  \fi\@@FBbelow\FB@zskip\end@FBBOX
> +  \global\setbox\@floatcapt\box\voidb@x}}
> +\newcommand\flrow@FC@{\global\let\flrow@typ@tmpset\undefined
> + \FB@frame{\begin@FBBOX
> +   \adj@dim\FBo@wd+\FBo@wadj=\hsize
> +   \settowidth\@tempdimb{\floatcapbesidesep}\advance\hsize\@tempdimb
> +   \advance\hsize\FBc@wd\@parboxrestore\leftmargin\z@\rightmargin\z@
> +   \@@FBabove
> +    \hbox{\floatfacing*%
> +      {\ifvoid\@floatcapt\else
> +         \FCc@box{\FBw@box\FBc@wd\unvbox\@floatcapt\FB@foot}%
> +         \floatcapbesidesep\fi
> +       \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
> +    \global\setbox\@floatcapt\box\voidb@x}}
> +\newcommand\FB@foot{\let\FR@ifFOOT\@firstoftwo\FB@putfoots\@@par\FB@putfnotes}
> +\newcommand\FB@zskip{}
> +\newcommand\float@end{\ifFBbuild\@endfloatbox
> +    \global\setbox\@currbox\float@makebox\columnwidth
> +    \let\@endfloatbox\relax\fi
> +  \end@float}
> +\newcommand\floatHpenalties{}
> +\newcommand\float@endH{\@endfloatbox\par
> +  \FR@iffloatHaslist
> +   {\floatHpenalties\relax
> +    \addpenalty\@beginparpenalty}\relax
> +  \vskip\intextsep
> +  \ifFBbuild\setbox\@currbox\float@makebox\columnwidth\fi
> +  \box\@currbox\par
> +  \FR@iffloatHaslist
> +   {\addpenalty\@endparpenalty\@endpetrue}\relax
> +  \vskip\intextsep\relax}
> +\newcommand\float@dblend{\ifFBbuild\@endfloatbox
> +    \global\setbox\@currbox\float@makebox\textwidth
> +    \let\@endfloatbox\relax\fi
> +  \end@dblfloat}
> +\newsavebox\@floatcapt
> +\newcommand*{\listof}[2]{%
> +  \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
> +    \expandafter\providecommand\csname l@#1\endcsname
> +        {\@dottedtocline{1}{1.5em}{2.3em}}%
> +    \float@listhead{#2}%
> +    \begingroup\setlength{\parskip}{\z@}%
> +      \@starttoc{\@nameuse{ext@#1}}%
> +    \endgroup}}
> +\providecommand*{\float@listhead}[1]{%
> +  \@ifundefined{chapter}{\def\@tempa{\section*}}%
> +    {\def\@tempa{\chapter*}}%
> +  \@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}%
> +\newcommand\float@addtolists[1]{%
> +  \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}
> +\PackageInfo{floatrow}{Modified float package code loaded}
> +\IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse}
> +\if@tempswa
> +  \let\rotfloat@HH\@float@HH
> +  \def\@float@HH#1{%
> +    \expandafter\let\csname endsideways#1\endcsname\float@endH
> +    \let\end@float\relax
> +    \rotfloat@HH{#1}}
> +  \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}}
> +\PackageInfo{floatrow}{Modified rotfloat package code loaded}
> +\fi
> +\@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat}
> +\FR@everyfloat={\let\@footnotetext\@mpfootnotetext
> +  \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
> +  \floatobjectset\floatfont}
> +\@ifdefinable\FR@ifFOOT{\let\FR@ifFOOT\@secondoftwo}
> +\newcommand\FB@putfnotes{%
> +  \ifvoid\@mpfootins\else\FR@ifFOOT
> +    {\vskip\floatfootskip\normalcolor\FBfootnoterule
> +    \unvbox\@mpfootins\@@par}\relax
> +  \fi}
> +\@ifdefinable\flrow@foot{\newinsert\flrow@foot}
> +\newcommand\FB@putfoots{%
> +  \ifvoid\flrow@foot\else\FR@ifFOOT
> +    {\vskip\floatfootskip\normalcolor
> +    \unvbox\flrow@foot\@@par}\relax
> +  \fi}
> +\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}}{}}
> +\captionsetup[floatfoot]{labelformat=empty,labelsep=none}
> +\newcommand\floatfoot{\@ifstar
> +    {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}%
> +    {\def\FR@tmp{\captionfootfont}\floatfoot@}}
> +\newcommand\floatfoot@[1]{%
> +  \global\setbox\flrow@foot\vbox{%
> +  \floatfoot@box{#1}}}%
> +\newcommand\floatfoot@box[1]{%
> +  \@ifundefined{@captype}{\def\@captype{floatfoot}}{}%
> +    \if@@FS\hsize\columnwidth\linewidth\columnwidth\fi
> +    \@parboxrestore\reset@font\color@begingroup
> +  \caption@setoptions{\@captype}%
> +  \caption@setoptions{floatfoot}%
> +     \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
> +  \color@endgroup}
> +\newcommand\newfloatcommand[2]{%
> +  \@ifundefined{#1}{}%
> +    {\flrow@error{\string#1 already defined}}%
> +  \@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
> +  \def\FB@tmpset{#3}\def\@captype{#2}%
> +  \@ifnextchar[{\@floatbox}{\@floatbox[#4]}}}
> +\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
> +\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
> +\newfloatcommand{fcapside}{figure}[\capbeside][]
> +\@ifdefinable\FB@wd {\newdimen\FB@wd}
> +\@ifdefinable\FBo@wd{\newdimen\FBo@wd}
> +\@ifdefinable\FBc@wd{\newdimen\FBc@wd}
> +\newlength\FBo@ht
> +\newlength\FBc@ht
> +\newlength\FBf@ht
> +\newlength\FBo@max
> +\newlength\FBc@max
> +\newlength\FBf@max
> +\newcommand\FR@loc@addcnt[2]{%
> +  \@ifundefined{c@#1}{\@nocounterr{#1}}%
> +    {\advance\csname c@#1\endcsname #2\relax}}
> +\newcommand\FR@loc@refcnt[1]{%
> +  \@ifundefined{c@#1}{\@nocounterr{#1}}%
> +   {\advance\csname c@#1\endcsname1\relax}}
> +\newcommand\FR@loc@{%
> +  \let\FR@ifunloc\@gobble
> +  \let\label\@gobble
> +  \let\refstepcounter\FR@loc@refcnt
> +  \let\stepcounter\FR@loc@refcnt
> +  \let\refsteponlycounter\FR@loc@refcnt
> +  \let\FR@ifcountH\@secondoftwo
> +  \let\cl@@ckpt\empty\let\addtocounter\FR@loc@addcnt
> +  \let\caption@kernel@addcontentsline\@gobbletwo
> +  \let\caption@addcontentsline\@gobbletwo
> +  \def\sf@updatecaptionlist##1##2##3##4{}}
> +\def\FBtmp@cap#1[#2]#3{\sbox\@tempboxa{\captionlabel{#3}}%
> +  \global\@tempdimb\wd\@tempboxa}
> +\newcommand\captionlabel[1]{{\def\FR@tmp{\@captype}\ifnum\floatbox@depth>\@ne
> +       \def\FR@tmp{sub\@captype}\caption@setsubtype*{\FR@tmp}\stepcounter{\FR@tmp}\fi
> +   \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
> +\newcommand\subcaptionlabel[1]{{\floatbox@depth\tw@\captionlabel{#1}}}
> +\newcommand\FBget@box[3]{%
> +  \FBiffloatrow\relax
> +    {\ifx\FBB@wd\relax
> +      \ifdim\hsize=\z@
> +        \@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}%
> +  \adj@dim\hsize-\FB@wadj=\@tempdima
> +  \FBifcapbeside
> +    {\FCget@@wd{#1}{#3}}%
> +    {\nofilFCOhsize
> +    \FBiffloatrow\relax
> +      {\settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
> +      \advance\@tempdima-\@tempdimb}}%
> +  \FC@ifo@fil{\@tempdima\FB@wd}{\FB@wd\@tempdima}%
> +  \adj@dim\@tempdima-\FBo@wadj=\FBo@wd
> +  \FBiffloatrow\relax{\hsize\FBo@wd}%
> +  \FBifcapbeside{\hsize\FB@wd}\relax
> +  \linewidth\hsize
> +  \def\reserved@a{#1}\ifx\reserved@a\empty
> +    \else\FBget@@wd{#1}{#3}\fi
> +  \hsize\FBo@wd\linewidth\hsize
> +  \FBifcapbeside
> +    {\FC@ifc@wd\relax{\advance\FBc@wd-\FB@wd}}%
> +    {\FBc@wd\FB@wd}%
> +  \setbox\z@\vbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@\hsize\FBo@wd\linewidth\hsize
> +    \FBifcaptop
> +      {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
> +      {\columnwidth\FBc@wd}%
> +    #3}%
> +  \FBc@ht\ht\@floatcapt\advance\FBc@ht\dp\@floatcapt
> +  \FBo@ht\ht\z@\advance\FBo@ht\dp\z@\let\FBheight\FBo@ht
> +  \setbox\tw@\vbox{\null\par\FB@foot\par}%
> +  \FBf@ht\ht\tw@\advance\FBf@ht\dp\tw@
> +  \FBiffloatrow
> +    {\ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
> +    \ifCADJ
> +      \FBifcaptop
> +        {\ifnum\FPOScnt=\@ne\global\advance\FBc@ht\FBf@ht\fi}%
> +        {\ifnum\FPOScnt=\tw@
> +          \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}%
> +      \ifdim\FBc@ht>\FBc@max\global\FBc@max\FBc@ht\fi
> +      \gdef\FBcheight{\FBc@ht}\gdef\FBfheight{\FBf@ht}%
> +    \fi}\relax
> +  \def\reserved@a{#2}\ifx\reserved@a\empty
> +    \FBiffloatrow{\ifOADJ
> +      \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
> +      \FBifcaptop
> +        {\ifnum\FPOScnt=\z@
> +          \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
> +        \fi}\relax
> +      \gdef\FBoheight{\FBo@ht}\gdef\FBfheight{\FBf@ht}%
> +    \fi}\relax
> +  \else
> +     \FBget@@ht{#2}{#3}%
> +  \fi}
> +\newcommand\FCget@@wd[2]{\flrow@FClist
> +  \FBiffloatrow\relax
> +    {\settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
> +    \advance\@tempdima-\@tempdimb\advance\hsize-\@tempdimb}%
> +  \settowidth\@tempdimb{\floatcapbesidesep}\advance\@tempdima-\@tempdimb
> +  \FC@ifo@fil{\FB@wd\@tempdima}\relax
> +  \FC@ifc@wd\@tempswatrue\@tempswafalse
> +  \if@tempswa
> +    \ifx\FCwidth\relax
> +      \setbox\@ne\vbox{\FR@loc@
> +        \let\caption\flrow@caption
> +        \let\@caption\FBtmp@cap
> +         #2}%
> +      \FBc@wd=\@tempdimb
> +    \else
> +      \FBc@wd=\FCwidth
> +    \fi\FC@ifo@fil{\advance\FB@wd-\FBc@wd}\relax
> +  \else
> +    \FBc@wd\@tempdima
> +  \fi
> +  \@tempdima.5\@tempdima}
> +\newcommand\flrow@gobble@[2][]{\unskip\ignorespaces}
> +\newcommand\flrow@gobble{%
> +    \let\caption\flrow@gobble@
> +    \let\floatfoot\flrow@gobble@
> +    \let\footnote\flrow@gobble@
> +    \let\footnotetext\flrow@gobble@
> +    }
> +\newcommand\FBget@@wd[2]{\@tempswafalse
> +  \begingroup
> +    \@tempdima-3000pt\let\FBwidth\@tempdima
> +    \setlength\dimen@{#1}\ifdim\dimen@<\z@\global\@tempswatrue\fi
> +  \endgroup
> +  \if@tempswa
> +    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
> +    \FBo@wd\wd\z@\let\FBwidth\FBo@wd
> +    \setlength\FBo@wd{#1}%
> +    \advance\FBo@wd\leftskip\advance\FBo@wd\rightskip
> +    \adj@dim\FBo@wd+\FBo@wadj=\FB@wd
> +    \setbox\flrow@foot\box\voidb@x
> +    \setbox\@mpfootins\box\voidb@x
> +  \else
> +    \setlength\FB@wd{#1}%
> +    \adj@dim\FB@wd-\FB@wadj=\FB@wd
> +    \adj@dim\FB@wd-\FBo@wadj=\FBo@wd
> +    \let\FBwidth\FBo@wd
> +  \fi}
> +\newcommand\FBget@@ht[2]{\@tempswafalse
> +  \begingroup
> +    \@tempdimb-3000pt\let\FBheight\@tempdimb
> +    \setlength\dimen@{#1}\ifdim\dimen@<\z@
> +      \global\@tempswatrue\fi
> +  \endgroup
> +  \if@tempswa
> +    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
> +    \FBo@ht\ht\z@\advance\FBo@ht\dp\z@
> +    \let\FBheight\FBo@ht\setlength\FBo@ht{#1}%
> +    \adj@dim\FBo@ht+\FBo@hadj=\FBo@ht
> +    \FBifcaptop{\ifnum\FPOScnt=\z@\advance\FBo@ht\FBf@ht\fi}\relax
> +  \else
> +    \setlength\FBo@ht{#1}%
> +    \adj@dim\FBo@ht-\FBo@hadj=\FBo@ht
> +    \adj@dim\FBo@ht-\FB@hadj=\FBo@ht
> +    \setbox\z@\vbox{\offinterlineskip\vbox{\@@FBabove}%
> +      \FBifcapbeside\relax{\@@FBskip\hrule\@height\z@\@depth\z@}%
> +      \vtop{\@@FBbelow}}%
> +    \global\advance\FBo@ht-\ht\z@\global\advance\FBo@ht-\dp\z@
> +    \FBifcapbeside\relax\FBget@@@ht
> +  \fi
> +  \FBiffloatrow{\ifOADJ
> +    \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
> +  \fi}\relax
> +  \def\FBoheight{\FBo@ht}}
> +\newcommand\FBget@@@ht{%
> +    \ifdim\FBc@ht>\FBc@max
> +      \global\advance\FBo@ht-\FBc@ht
> +    \else
> +      \global\advance\FBo@ht-\FBc@max
> +    \fi
> +    \FBifcaptop{\ifnum\FPOScnt=\@ne\else
> +      \ifdim\FBf@ht>\FBf@max
> +        \global\advance\FBo@ht-\FBf@ht
> +      \else
> +        \global\advance\FBo@ht-\FBf@max
> +      \fi
> +    \fi}\relax
> +  }
> +\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}}}
> +\newcounter{FBl@b}
> +\@ifdefinable\FR@ifFCBOX{\let\FR@ifFCBOX\@secondoftwo}
> +\newcommand\FBs@raise{\raisebox{-\totalheight}}
> +\newcommand\FBf@raise{}
> +\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}%
> +    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{-\height}}}%
> +     {\gdef\FBf@raise{}}%
> +    \gdef\FBs@raise{\raisebox{-\totalheight}}%
> +  \or\gdef\FC@bbox{\vbox\@parboxto\bgroup}\gdef\FC@ebox{\vskip\z@\egroup}%
> +    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{\depth}}}%
> +     {\gdef\FBf@raise{}}%
> +    \gdef\FBs@raise{}\fi}
> +\@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}
> +\newcommand\floatbox[2][]{\begingroup
> +  \def\FB@tmpset{#1}\def\@captype{#2}%
> +  \@ifnextchar[{\@floatbox}{\@floatbox[]}}
> +\@ifdefinable\@floatbox{}\@ifdefinable\@@floatbox{}
> +\def\@floatbox[#1]{%
> +  \@ifnextchar[{\@@floatbox[#1]}{\@@floatbox[#1][]}}
> +\@ifdefinable\floatbox@depth{\newcount\floatbox@depth}
> +\def\@@floatbox[#1][#2]{%
> +  \@ifnextchar[{\@@@floatbox[#1][#2]}{\@@@floatbox[#1][#2][]}}%]
> +\@ifdefinable\@@@floatbox{}
> +\long\def\@@@floatbox[#1][#2][#3]#4#5{\advance\floatbox@depth\@ne
> +  \@FB@vpos{#3}%
> +  \if@@FS\else\FR@redefs
> +    \ifcase\floatbox@depth\or
> +      \flrow@setlist{{\@captype}}\or
> +      \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
> +    \fi
> +    \FRifFBOX\@@setframe\relax\@@FStrue
> +  \fi
> +  \FB@tmpset
> +  \FBifcapbeside\flrow@FClist\relax
> +  \@parboxrestore\leftmargin\z@\rightmargin\z@
> +  \floatobjectset\floatfont
> +  \FBget@box{#1}{#2}{#4#5}%
> +  \FBifcapbeside\FCset@vpos\relax
> +  \FBiffloatrow{\FR@floatbox{\@ifundefined{capstart}{}{\capstart}#4#5}}%
> +   {\adj@dim\FB@wd+\FB@wadj=\hsize\linewidth\hsize
> +    \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi
> +    \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}\let\FBB@wd\relax
> +    #4#5}\FBbuildtrue
> +    \FBifcapbeside{\flrow@FC\FBB@wd}{\flrow@FB\FBB@wd}%
> +    \global\FBbuildfalse
> +    \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
> +   }\advance\floatbox@depth\m@ne
> +  \endgroup\ignorespaces}
> +\newcommand\FR@floatbox[1]{\@tempswafalse
> +    \ifOADJ\@tempswatrue\fi\ifCADJ\@tempswatrue\fi
> +    \if@tempswa\@ifundefined{FB@@boxmax}{}{\FB@@boxmax}\fi
> +    \FBsetbox@obj{#1}\begin@FBBOX
> +      \FBifcapbeside\flrow@FC@\flrow@FB@
> +    \end@FBBOX
> +    \addtocounter{FRobj}\m@ne
> +    \@tempswafalse\FR@iffacing\@tempswatrue\relax
> +    \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
> +    \advance\Xhsize-\FB@wd
> +    \FBifcapbeside
> +      {\advance\Xhsize-\FBc@wd
> +       \FR@ifcountH{\global\advance\Zhsize-\FBc@wd}\relax
> +       \settowidth\@tempdimb{\floatcapbesidesep}%
> +       \advance\Xhsize-\@tempdimb
> +       \FR@ifcountH{\global\advance\Zhsize-\@tempdimb}\relax}\relax
> +    \ifnum\c@FRobj=\z@
> +      \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
> +      \floatrowsep
> +      \adj@dim\Xhsize-\FB@wadj={\global\Xhsize}%
> +      \adj@dim\Zhsize-\FB@wadj={\global\Zhsize}%
> +    \fi}
> +\newcommand\FBsetbox@obj[1]{%
> +  \setbox\float@box\color@vbox\normalcolor
> +  \FBifcaptop
> +     {\FB@vtop\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
> +      \ifnum\FPOScnt=\z@\columnwidth\FBo@wd\else\columnwidth\FBc@wd\fi}%
> +     {\FB@vbox\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
> +      \columnwidth\FBc@wd}%
> +  #1\FBbfil\egroup\color@endbox
> +  \let\@currbox\float@box}
> +\@ifdefinable\FBiffloatrow{\let\FBiffloatrow\@secondoftwo}
> +\newcounter{FRobj}
> +\newcounter{FRsobj}
> +\newlength\Xhsize
> +\newlength\sXhsize
> +\newlength\Zhsize
> +\newlength\sZhsize
> +\newcommand\flrow@to{to\hsize}
> +\newcommand\flrow@boxset[1]{#1}
> +\newcommand\flrow@setrowhbox{%
> +\FR@ifROWFILL{\def\flrow@left{\hskip\leftskip}\def\flrow@right{\hskip\rightskip}%
> +  }{\let\flrow@to\empty\def\flrow@left{}\def\flrow@right{}}%
> +}
> +\newcommand\flrow@left{}\newcommand\flrow@right{}
> +\newcommand\flrow@hbox@bgroup{\hbox\flrow@to
> +    \bgroup\flrow@left}
> +\newcommand\flrow@hbox@egroup{\flrow@right
> +    \egroup}
> +\newbox\flrow@rowbox
> +\newcommand\floatrow[1][2]{\c@FRobj=#1\relax
> +  \ifcase\floatbox@depth
> +    \flrow@setlist*{{floatrow}{\@captype row}}%
> +  \or
> +    \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
> +    \flrow@settype{subfloatrow}\flrow@settype{sub\@captype row}%
> +    \ifx\flrow@to\empty\def\flrow@boxset##1{}\fi
> +  \fi%
> +  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
> +  \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
> +  \if@tempswa\FB@readaux{\relax}\fi
> +  \flrow@boxset{\ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\else\hsize\FBB@wd\fi}%
> +  \ifnum\floatbox@depth=\z@\vspace\FBaskip\else\leavevmode\fi
> +  \hbox\flrow@to\bgroup%outer h box
> +  \FRleftmargin
> +  \flrow@boxset{\hsize\FBB@wd
> +     \settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}\advance\hsize-\@tempdima}%
> +  \bgroup\ifx\FR@frame\empty\else\def\FB@frame{}\def\FB@wadj{}\def\FB@hadj{}\fi%frame set
> +  \flrow@boxset{\adj@dim\hsize-\FR@wadj=\hsize}%
> +  \setbox\flrow@rowbox\vbox\bgroup%v box
> +        \@@FRabove
> +    \flrow@setrowhbox
> +    \flrow@hbox@bgroup\let\FBiffloatrow\@firstoftwo
> +      \Xhsize\hsize\count@#1\advance\count@\m@ne
> +      \settowidth\@tempdima{\floatrowsep}\advance\Xhsize-\count@\@tempdima
> +      \@tempdimb\Xhsize
> +      \FR@iftwolevel
> +        {\ifnum\floatbox@depth=\z@\Zhsize\Xhsize\else
> +            \ifdim\Zhsize=\z@\Zhsize\Xhsize\sZhsize\Xhsize\fi
> +            \FR@ifcountH{\global\advance\Zhsize-\count@\@tempdima}\relax
> +         \fi}{\@tempdimb\Xhsize\Zhsize\Xhsize}%
> +      \divide\@tempdimb#1\relax\FB@wd\@tempdimb
> +      \hsize\@tempdimb\ignorespaces}
> +\def\endfloatrow{\ifdim\lastskip>\z@\unskip\fi
> +      \flrow@hbox@egroup%h box
> +    \@@FRbelow
> +    \egroup%v box
> +    \FR@frame{\box\flrow@rowbox}%
> +    \egroup%frame set
> +    \FRrightmargin\egroup%outer h box
> +    \ifnum\floatbox@depth=\z@\vspace\FBbskip\fi
> +  \gdef\FBaskip{\z@}\gdef\FBbskip{\z@}%
> +  \global\FBf@max\z@\global\FBo@max\z@\global\FBc@max\z@
> +  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
> +\newenvironment{subfloatrow}{\capsubrowsettings
> +    \captionsetup{subtype}\@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
> +\newcommand\capsubrowsettings{\caption@setoptions{subfloatrow}\caption@setoptions{sub\@captype row}}
> +\newenvironment{subfloatrow*}[1][2]{\let\flrow@to\empty
> +    \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
> +    \FR@ifunloc{\let\FR@ifcountH\@firstoftwo}\let\c@FRobj\c@FRsobj
> +    \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
> +    \floatrow[#1]\killfloatstyle}{\ifdim\lastskip>\z@\unskip\fi
> +     \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
> +\newcommand\subfloatrowsep{\hskip\columnsep}
> +\@ifdefinable\FR@ifcountH{\let\FR@ifcountH\@firstoftwo}
> +\@ifdefinable\FR@ifunloc{\let\FR@ifunloc\@firstofone}
> +\@ifdefinable\FR@iftwolevel{\let\FR@iftwolevel\@secondoftwo}
> +\newcommand\CommonHeightRow{\@ifstar
> +    {\let\FR@iftwolevel\@firstoftwo\CommonHeightRow@
> +   }{\let\FR@iftwolevel\@secondoftwo\CommonHeightRow@}}
> +\newcommand\DefaultCommonHeight{25pt}
> +\newcommand\CommonHeight{\DefaultCommonHeight}
> +\newcommand\CommonHeightRow@[2][\DefaultCommonHeight]{\def\CommonHeight{#1}\setbox\z@
> +    \hbox{\FR@loc@\let\FR@ifunloc\@firstofone#2}%
> +    \ifcase\floatbox@depth\def\@tempa{\Xhsize}\def\@tempb{\Zhsize}\or
> +        \def\@tempa{\sXhsize}\def\@tempb{\Zhsize}\fi
> +    \FR@calc@CommonHeight#2}
> +\@ifdefinable\FR@Zunitlength{\newdimen\FR@Zunitlength}
> +\newcommand\FR@calc@CommonHeight{%
> +    \@tempdima\@tempb\advance\@tempdima-\@tempa
> +    \count@\@tempdima\relax\divide\count@16384\relax
> +    \divide\@tempb\count@\relax\FR@Zunitlength\@tempb\relax
> +    \@tempdima\CommonHeight\relax
> +    \count@\@tempdima\relax\divide\count@16384\relax
> +    \@tempdima\count@\FR@Zunitlength\relax
> +    \edef\CommonHeight{\the\@tempdima}}
> +\newcommand\begin@FBBOX{\vbox\bgroup}
> +\def\end@FBBOX{\egroup}
> +\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse
> +  \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip\z@}%
> +             {\vskip\z@\egroup$\egroup}}
> +\newcommand\TopFloatBoxes{\CADJfalse\OADJfalse
> +  \buildFBBOX{\vtop\bgroup\vskip\z@}{\egroup}}
> +\newcommand\BottomFloatBoxes{\CADJfalse\OADJfalse
> +  \buildFBBOX{\vbox\bgroup}{\vskip\z@\egroup}}
> +\newcommand\PlainFloatBoxes{%
> +  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
> +\newcommand\buildFBBOX[2]{\gdef\begin@FBBOX{#1}\gdef\end@FBBOX{#2}}
> +\def\newdimentocommand  #1#2#3{%
> +    #1\@tempdima{#3}\@ifdefinable#2{\xdef#2{\the\@tempdima}}}
> +\def\renewdimentocommand#1#2#3{%
> +    #1\@tempdima{#3}\xdef#2{\the\@tempdima}}
> +\def\newskiptocommand   #1#2#3{%
> +    #1\@tempskipa{#3}\@ifdefinable#2{\xdef#2{\the\@tempskipa}}}
> +\def\renewskiptocommand #1#2#3{%
> +    #1\@tempskipa{#3}\xdef#2{\the\@tempskipa}}
> +\def\newlengthtocommand{\newskiptocommand}
> +\def\renewlengthtocommand{\renewskiptocommand}
> +\newcommand*\flrow@setbool[1]{%
> +  \expandafter\caption@set@bool\csname FR@if#1\endcsname}
> +\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}}}
> +\newcommand\thisfloatsetup{\floatsetup[tmpset]}
> +\def\flrow@setup{\caption@setkeys[floatrow]{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}}}%
> +\newcommand\flrow@setlist{\@ifstar\flrow@setlist@@\flrow@setlist@}
> +\newcommand\flrow@setlist@[1]{\@flrow@setlist#1{tmpset};%
> +  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
> +  \caption@setposition{\FBifcaptop tb}}
> +\newcommand\flrow@setlist@@[1]{\@flrow@setlist#1;%
> +  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
> +  \caption@setposition{\FBifcaptop tb}}
> +\newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble
> +  \@flrow@setlist}
> +\@ifundefined{caption@setoptions}{\let\caption@setoptions\caption@settype}{}
> +\newcommand\@cap@setlist[1]{\caption@setoptions{#1}%
> +   \@ifnextchar;{\let\caption@setfloattype\@gobble\@gobble}\@cap@setlist}
> +\newcommand\flrow@FClist{\flrow@setlist
> +  {{floatbeside}{capbesidefloat}{\@captype beside}{capbeside\@captype}}}
> +\newcommand*\clearfloatsetup[1]{\@nameundef{flrow@typ@#1}}
> +\newcommand\DeclareFROpt{%
> +  \@ifstar{\flrow@declopt\AtEndOfPackage}
> +          {\flrow@declopt\@gobble}}
> +\newcommand*\flrow@declopt[2]{%
> +  #1{\undefine@key{floatrow}{#2}}\define@key{floatrow}{#2}}
> +\@onlypreamble\DeclareFROpt
> +\@onlypreamble\flrow@declopt
> +\@ifdefinable\FR@ifrawfloats{\let\FR@ifrawfloats\@secondoftwo}
> +\DeclareFROpt*{rawfloats}[0]{\flrow@setbool{rawfloats}{#1}}
> +\@ifdefinable\FR@ifdoubleaswide{\let\FR@ifdoubleaswide\@secondoftwo}
> +\DeclareFROpt{doublefloataswide}[0]{\flrow@setbool{doubleaswide}{#1}}
> +\@ifdefinable\FR@iffloatHaslist{\let\FR@iffloatHaslist\@secondoftwo}
> +\DeclareFROpt{floatHaslist}[0]{\flrow@setbool{floatHaslist}{#1}}
> +\newcommand*\DeclareFloatStyle[2]{%
> +  \global\@namedef{flrow@sty@#1}{#2}}
> +\@onlypreamble\DeclareFloatStyle
> +\newcommand*\flrow@setstyle[1]{%
> +  \@ifundefined{flrow@sty@#1}%
> +    {\flrow@error{Undefined float style `#1'}}%
> +    {\FBstyle@reset
> +     \def\flrow@capsetup{%
> +        \@ifundefined{caption@sty@#1}{}{\caption@setstyle*{#1}}%
> +        \caption@setoptions {#1}}%
> +     \flrow@esetup{\csname flrow@sty@#1\endcsname}}}
> +\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}
> +\DeclareFloatStyle{default}{%
> +     style=plain,captionskip=10pt,
> +     margins=centering,objectset=centering,
> +     capbesideposition=left,facing=no,
> +     floatrowsep=columnsep,capbesidesep=columnsep,
> +     font=default,footfont=footnotesize}
> +\DeclareFROpt{style}{\flrow@setstyle{#1}}
> +\@ifdefinable\FR@ifCST{\let\FR@ifCST\@firstoftwo}
> +\DeclareFROpt{relatedcapstyle}[0]{\flrow@setbool{CST}{#1}}
> +\DeclareFROpt{font}{\flrow@setfont{font}{#1}}
> +\DeclareFROpt{footfont}{\captionsetup[floatfoot]{font={#1}}}
> +\DeclareCaptionOption{footfont}{\caption@setfont{footfont}{#1}}
> +\@ifdefinable\floatfont{\let\floatfont\empty}
> +\newcommand*\captionfootfont{\normalfont\footnotesize}
> +\let\DeclareFloatFont\DeclareCaptionFont
> +\@onlypreamble\DeclareFloatFont
> +\newcommand*\flrow@setfont[2]{%
> +   \caption@setfont{@tempa}{#2}%
> +   \expandafter\let\csname float#1\endcsname\caption@tempa}
> +\DeclareFROpt{capposition}{\flrow@cappos{#1}}
> +\DeclareFROpt{position}{\flrow@cappos{#1}}
> +\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
> +  }{\flrow@error{Undefined caption position `#1'}%
> +  }}}}}
> +\@ifdefinable\FBifcaptop{\let\FBifcaptop\@secondoftwo}
> +\newcommand\captop{\let\FBifcaptop\@firstoftwo}
> +\newcommand\capbot{\let\FBifcaptop\@secondoftwo}
> +\@ifdefinable\FBifCAPTOP{\let\FBifCAPTOP\@secondoftwo}
> +\newcommand\CAPTOP{\captop\let\FBifCAPTOP\@firstoftwo\CADJtrue}
> +\@ifdefinable\FBifcapbeside{}\let\FBifcapbeside\@secondoftwo
> +\newcommand\capbeside{\let\FBifcapbeside\@firstoftwo}
> +\newcommand\nocapbeside{\let\FBifcapbeside\@secondoftwo}
> +\DeclareFROpt{capbesideframe}[0]{\flrow@setbool{FCBOX}{#1}}
> +\DeclareFROpt{capbesidewidth}[1]{\flrow@FCc@wd{#1}}
> +\@ifdefinable\FC@ifc@wd{\let\FC@ifc@wd\@secondoftwo}
> +\newcommand\useFCwidth{\let\FC@ifc@wd\@firstoftwo\let\FCwidth\relax}
> +\@ifdefinable\FCwidth{\let\FCwidth\relax}
> +\newcommand\flrow@FCc@wd[1]{%
> +  \caption@ifinlist{#1}{none,sidefil}{\let\FC@ifc@wd\@secondoftwo
> +  }{\useFCwidth\def\FCwidth{#1}}}
> +\DeclareFROpt{capbesideposition}{\flrow@scpos{#1}}
> +\newcommand\DeclareSCPos[2]{%
> +  \define@key{flrow@scpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
> +\newcommand*\flrow@scpos[1]{%
> +  \let\FR@tmp\@empty
> +  \begingroup\caption@setkeys[floatrow]{flrow@scpos}{#1}\endgroup
> +  \FR@tmp}
> +\@onlypreamble\DeclareSCPos
> +\DeclareSCPos{left}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}}
> +\DeclareSCPos{right}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\z@}}
> +\DeclareSCPos{inside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
> +    \count@\c@FBcnt\ifnum\count@=\z@\count@\@ne\fi
> +  }}
> +\DeclareSCPos{outside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
> +    \count@\c@FBcnt\ifnum\count@=\z@\else\advance\count@\@ne\fi
> +  }}
> +\DeclareSCPos{center}{\def\@FC@vpos{\count@\z@}}
> +\DeclareSCPos{top}{\def\@FC@vpos{\count@\@ne}}
> +\DeclareSCPos{bottom}{\def\@FC@vpos{\count@\tw@}}
> +\newcommand*\@FC@vpos{\count@\tw@}
> +\newcommand*\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}
> +\newcounter{FBcnt}
> +\DeclareFROpt{footposition}{\flrow@ftpos{#1}}
> +\newcommand\DeclareFtPos[2]{%
> +  \define@key{flrow@ftpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
> +\newcommand*\flrow@ftpos[1]{%
> +  \let\FR@tmp\@empty
> +  \begingroup\caption@setkeys[floatrow]{flrow@ftpos}{#1}\endgroup
> +  \FR@tmp}
> +\@onlypreamble\DeclareFtPos
> +\@ifdefinable\FPOScnt{\newcount\FPOScnt}
> +\DeclareFtPos{caption}{\FPOScnt1\relax}
> +\DeclareFtPos{bottom}{\FPOScnt2\relax}
> +\DeclareFtPos{default}{\FPOScnt0\relax}
> +\DeclareFROpt{heightadjust}{\flrow@htadj{#1}}
> +\newcommand\DeclareHtAdj[2]{%
> +  \define@key{flrow@htadj}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
> +\newcommand*\flrow@htadj[1]{\let\FR@tmp\@empty
> +  \begingroup\caption@setkeys[floatrow]{flrow@htadj}{#1}\endgroup
> +  \FR@tmp}
> +\@onlypreamble\DeclareHtAdj
> +\DeclareHtAdj{all}{\CADJtrue\OADJtrue}
> +\DeclareHtAdj{caption}{\CADJtrue}
> +\DeclareHtAdj{object}{\OADJtrue}
> +\DeclareHtAdj{none}{\CADJfalse\OADJfalse}
> +\DeclareHtAdj{nocaption}{\CADJfalse}
> +\DeclareHtAdj{noobject}{\OADJfalse}
> +\newif\ifCADJ
> +\newif\ifOADJ
> +\DeclareFROpt{valign}{\@FB@vpos{#1}}
> +\newcommand\@FB@vpos[1]{%
> +  \if#1t\def\FBafil{}\def\FBbfil{\vss}\else
> +     \if#1b\def\FBafil{\vss}\def\FBbfil{}\else
> +        \if#1c\def\FBafil{\vskip0ptplus1fillminus1000pt}%
> +              \def\FBbfil{\vskip0ptplus1fillminus1000pt}\else
> +           \if#1s\def\FBafil{\vskip0ptminus1000pt}%
> +                 \def\FBbfil{\vskip0ptminus1000pt}%
> +  \fi\fi\fi\fi}
> +\@ifdefinable\FR@iffacing{\let\FR@iffacing\@secondoftwo}
> +\DeclareFROpt{facing}[1]{\flrow@setbool{facing}{#1}}
> +\newcommand\FB@facing{}
> +\DeclareFROpt{margins}{\flrow@FBAlign{#1}}
> +\newcommand*\flrow@FBAlign[1]{%
> +  \@ifundefined{flrow@mj@#1}%
> +    {\flrow@error{Undefined float alignment `#1'}}%
> +    {\@nameuse{flrow@mj@#1}}}
> +\newcommand*\DeclareMarginSet[2]{%
> +  \global\@namedef{flrow@mj@#1}{#2}}
> +\@onlypreamble\DeclareMarginSet
> +\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@}
> +\newskip\LTleft\newskip\LTright
> +\DeclareMarginSet{hangleft}{\setfloatmargins
> +    {\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
> +  \LTleft-\marginparwidth\advance\LTleft-\marginparsep
> +  \LTright=\fill}
> +\DeclareMarginSet{hangright}{\setfloatmargins
> +    {\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
> +  \LTleft=\fill
> +  \LTright-\marginparwidth\advance\LTright-\marginparsep}
> +\DeclareMarginSet{hanginside}{\setfloatmargins
> +    *{\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
> +  }
> +\DeclareMarginSet{hangoutside}{\setfloatmargins
> +    *{\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
> +  }
> +\newcommand\flrow@mj@default{\flrow@mj@centering}
> +\newcommand\floatfacing{\@ifstar
> +  {\@FC@hpos\floatfacing@}{\FB@facing\floatfacing@}}
> +\newcommand\floatfacing@[2]{\ifodd\count@#1\else#2\fi}
> +\newcommand\floatboxmargins{\def\FR@tmp{FB}\FB@mset}
> +\newcommand\floatrowmargins{\def\FR@tmp{FR}\FB@mset}
> +\newcommand\floatcapbesidemargins{\def\FR@tmp{FC}\FB@mset}
> +\newcommand\FB@mset{\@ifstar{\FB@mset@}{\FB@@mset}}
> +\newcommand\FB@mset@[2]{%
> +  \def\FB@facing{\let\FR@iffacing\@firstoftwo\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}}
> +\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}}
> +\setfloatmargins\hfill\hfill
> +\DeclareFROpt{objectset}{\flrow@FBoAlign{#1}}
> +\DeclareFROpt{justification}{\flrow@FBoAlign{#1}}
> +\let\DeclareObjectSet\DeclareCaptionJustification
> +\@onlypreamble\DeclareObjectSet
> +\newcommand*\flrow@FBoAlign[1]{%
> +  \@ifundefined{caption@hj@#1}%
> +    {\flrow@error{Undefined object setting `#1'}}%
> +    {\expandafter\let\expandafter\floatobjectset
> +     \csname caption@hj@#1\endcsname}}
> +\newcommand*\floatobjectset{\centering}
> +\DeclareFROpt{floatwidth}{\flrow@FBo@wd{#1}}
> +\@ifdefinable\FC@ifo@fil{\let\FC@ifo@fil\@secondoftwo}
> +\newcommand\filFCOhsize{\let\FC@ifo@fil\@firstoftwo}
> +\newcommand\nofilFCOhsize{\let\FC@ifo@fil\@secondoftwo}
> +\newcommand\flrow@setwd{\relax}
> +\newcommand\flrow@FBo@wd[1]{%
> +  \caption@ifinlist{#1}{none,sidefil}{\filFCOhsize
> +  }{\nofilFCOhsize\def\flrow@setwd{\@tempdima=#1}}}
> +\DeclareFROpt{floatrowsep}{\flrow@setFRsep\floatrowsep{#1}}
> +\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}}
> +\DeclareFROpt{capbesidesep}{\flrow@setFRsep\floatcapbesidesep{#1}}
> +\let\DeclareFloatSeparators\DeclareCaptionLabelSeparator
> +\@onlypreamble\DeclareFloatSeparators
> +\newcommand*\flrow@setFRsep[2]{%
> +  \@ifundefined{caption@lsep@#2}%
> +    {\flrow@error{Undefined float separator `#2'}}%
> +    {\expandafter\let\expandafter#1\csname caption@lsep@#2\endcsname}}
> +\DeclareFloatSeparators{columnsep}{\hskip\columnsep}
> +\DeclareFloatSeparators{qquad}{\qquad}
> +\DeclareFloatSeparators{fil}{\hskip\columnsep plus1fil}
> +\DeclareFloatSeparators{fill}{\hskip\columnsep plus1fill}
> +\newcommand\floatrowsep{\hskip\columnsep}
> +\newcommand\floatcapbesidesep{\hskip\columnsep}
> +\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}}
> +\newcommand\DeclareFloatVCode[2]{\@namedef{flrow@FBr@#1}{#2}}
> +\@onlypreamble\DeclareFloatVCode
> +\newcommand*\flrow@FBrule[3]{%
> +  \@ifundefined{flrow@FBr@#3}%
> +    {\flrow@error{Undefined rule `#3'}}%
> +    {\let#1\empty
> +     \expandafter\let\expandafter#2\csname flrow@FBr@#3\endcsname}}
> +\newcommand*\flrow@FRrule[3]{%
> +  \@ifundefined{flrow@FBr@#3}%
> +    {\flrow@error{Undefined rule `#3'}}%
> +    {\def#2{\FBiffloatrow\relax{\@nameuse{flrow@FBr@#3}}}%
> +     \expandafter\let\expandafter#1\csname flrow@FBr@#3\endcsname}}
> +\newcommand*\flrow@FBskip[1]{%
> +  \@ifundefined{flrow@FBr@#1}%
> +    {\flrow@error{Undefined rule `#1'}}%
> +    {\expandafter\let\expandafter\@@FBskip\csname flrow@FBr@#1\endcsname}}
> +\DeclareFloatVCode{none}{}
> +\DeclareFloatVCode{thickrule}{\par\rule{\hsize}{.8pt}\vskip2pt\par}
> +\DeclareFloatVCode{rule}{\vskip2pt\hrule\vskip2pt}
> +\DeclareFloatVCode{lowrule}{\par\vskip2pt\rule\hsize\@wholewidth\par}
> +\DeclareFloatVCode{captionskip}{\vskip\captionskip}
> +\newcommand\FBstyle@reset{\let\FRifFBOX\@secondoftwo\OADJfalse\CADJfalse\capbot
> +  \def\@@FBskip{\vskip\captionskip}\def\@@FRabove{}\def\@@FRbelow{}%
> +  \def\@@FBabove{}\def\@@FBbelow{}%
> +  \def\FB@Bset{}\def\FB@frame{}\def\FBo@frame{}\def\FR@frame{}%
> +  \def\FBo@wadj{}\def\FBo@hadj{}\def\FB@wadj{}\def\FB@hadj{}\def\FR@wadj{}\def\FR@hadj{}}
> +\newcommand\@@FBskip{\vskip\captionskip}
> +\@ifdefinable\@@FRabove{\def\@@FRabove{}}
> +\@ifdefinable\@@FRbelow{\def\@@FRbelow{}}
> +\@ifdefinable\@@FBabove{\def\@@FBabove{}}
> +\@ifdefinable\@@FBbelow{\def\@@FBbelow{}}
> +\@ifdefinable\FB@frame {\def\FB@frame {}}
> +\@ifdefinable\FBo@frame{\def\FBo@frame{}}
> +\@ifdefinable\FR@frame {\def\FR@frame {}}
> +\@ifdefinable\FBo@wadj {\def\FBo@wadj {}}
> +\@ifdefinable\FBo@hadj {\def\FBo@hadj {}}
> +\@ifdefinable\FB@wadj  {\def\FB@wadj  {}}
> +\@ifdefinable\FB@hadj  {\def\FB@hadj  {}}
> +\@ifdefinable\FR@wadj  {\def\FR@wadj  {}}
> +\@ifdefinable\FR@hadj  {\def\FR@hadj  {}}
> +\@ifdefinable\FB@Bset  {\def\FB@Bset  {}}
> +\DeclareFROpt{framestyle}{\@ifundefined{FB@#1@frame}%
> +  {\let\FRifFBOX\@secondoftwo}{\let\FRifFBOX\@firstoftwo\def\FB@B@{#1}}}
> +\DeclareFROpt{framearound}{\flrow@fr@round{#1}}
> +\newcommand*\flrow@fr@round[1]{%
> + \caption@ifinlist{#1}{object,contents}{\let\FRifFBOX\@firstoftwo
> +    \def\FB@BO@{FBo}%
> +  }{\caption@ifinlist{#1}{floatbox,all}{\let\FRifFBOX\@firstoftwo
> +    \def\FB@BO@{FB}%
> +  }{\caption@ifinlist{#1}{row}{\let\FRifFBOX\@firstoftwo
> +    \def\FB@BO@{FR}%
> +  }{\caption@ifinlist{#1}{none}{\let\FRifFBOX\@secondoftwo
> +  }{\flrow@error{Undefined framed object `#1'}%
> +  }}}}}
> +\@ifdefinable\FR@ifFIT{\let\FR@ifFIT\@secondoftwo}
> +\@ifdefinable\FR@ifROWFILL{\let\FR@ifROWFILL\@secondoftwo}
> +\DeclareFROpt{framefit}[0]{\flrow@setbool{FIT}{#1}}
> +\@ifdefinable\flrow@@setROWFILL{}
> +\@ifdefinable\flrow@leftfill{}\@ifdefinable\flrow@rightfill{}
> +\DeclareFROpt{rowfill}[0]{\flrow@setbool{ROWFILL}{#1}}
> +\DeclareFROpt{frameset}{\def\FB@Bset{#1}}
> +\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}{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
> +    \@nameuse{FB@\FB@B@ @adj}}\relax}%
> +  \@namedef{\FB@BO@ @frame}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
> +    \@nameuse{FB@\FB@B@ @frame}}%
> +  \ifx\FR@frame\empty\else%\ifx\FB@frame\empty
> +     \def\FB@hadj{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
> +       \@nameuse{FB@\FB@B@ @adj}}%
> +     \def\FB@wadj{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
> +       \@nameuse{FB@\FB@B@ @adj}}\relax}%
> +     \def\FB@frame{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
> +       \@nameuse{FB@\FB@B@ @frame}}%
> +  \fi%\fi
> +  }
> +\@ifdefinable\FRifFBOX{\let\FRifFBOX\@secondoftwo}
> +\newcommand\FB@fbox@frame[1]{\hbox{%
> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\fbox{#1}%
> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
> +\newcommand\FB@fbox@adj{\dimen@=2\fboxsep\advance\dimen@2\fboxrule}
> +\newcommand\FB@fbox@reset{\fboxsep3\p@\fboxrule.4\p@}
> +\newcommand\FB@colorbox@frame[1]{\hbox{%
> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
> +\@ifdefinable\FB@colorbox@adj{\let\FB@colorbox@adj\FB@fbox@adj}
> +\newcommand\FB@colorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
> +\newcommand\FB@fcolorbox{\fbox}
> +\newcommand\FB@fcolorcorners{}
> +\@ifdefinable\FR@phantom{}\@ifdefinable\FRset@color{}
> +\newcommand\FB@FRcolorbox@frame[1]{\hbox{\let\color@block\FRcolor@block
> +  \let\FR@phantom\@firstofone\let\FRset@color\set@color\FB@fcolorcorners
> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
> +\@ifdefinable\FB@FRcolorbox@adj{\let\FB@FRcolorbox@adj\FB@fbox@adj}
> +\newcommand\FB@FRcolorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
> +\newcommand\FB@corners@frame[1]{\hbox{\let\color@block\FRcolor@block
> +  \let\FR@phantom\phantom\let\FRset@color\relax\FB@fcolorcorners
> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\colorbox{white}{#1}%
> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
> +\@ifdefinable\FB@corners@adj{\let\FB@corners@adj\FB@fbox@adj}
> +\newcommand\FB@corners@reset{\fboxsep3\p@\fboxrule\z@}
> +\newcommand\flrow@l@color@side[2]{{\let\unitlength\relax
> +    \picture(\z@,\z@)(\z@,\z@)
> +    \put(\z@,#1){{\flrow@ll@col@put}}
> +    \put(\z@,#2){{\flrow@ul@col@put}}
> +    \endpicture}}
> +\newcommand\flrow@r@color@side[2]{{\let\unitlength\relax
> +    \picture(\z@,\z@)(\z@,\z@)
> +    \put(\z@,#1){{\flrow@lr@col@put}}
> +    \put(\z@,#2){{\flrow@ur@col@put}}
> +    \endpicture}}
> +\newcommand\flrow@ll@col@put{}
> +\newcommand\flrow@ul@col@put{}
> +\newcommand\flrow@lr@col@put{}
> +\newcommand\flrow@ur@col@put{}
> +\newcommand\flrow@cboxcorners[4]{%
> +    \def\flrow@ll@col@put{#1}%
> +    \def\flrow@lr@col@put{#2}%
> +    \def\flrow@ur@col@put{#3}%
> +    \def\flrow@ul@col@put{#4}%
> +    }
> +\newcommand\FRcolorboxwd{\z@}
> +\newcommand\FRcolorboxht{\z@}
> +\newcommand\FRcolorboxdp{\z@}
> +\def\FRcolor@block#1#2#3{%
> +  {\FRset@color
> +   \rlap{\@tempdima#1\edef\FRcolorboxwd{\the\@tempdima}\@tempdima#2\advance\@tempdima#3%
> +   \edef\FRcolorboxht{\the\@tempdima}\@tempdima#3\edef\FRcolorboxdp{\the\@tempdima}%
> +   \ifcolors@\else\let\FR@phantom\phantom\fi
> +     \flrow@l@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
> +     \FR@phantom{\vrule\@width#1\@height#2\@depth#3}%
> +     \flrow@r@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
> +    }}}
> +\DeclareFROpt{colorframeset}{\flrow@fcolorbox{#1}}
> +\DeclareFROpt{colorframecorners}{\flrow@fcolorcorners{#1}}
> +\newcommand*\flrow@fcolorbox[1]{%
> +  \@ifundefined{flrow@fcolorbox@#1}%
> +    {\flrow@error{Undefined color box `#1'}}%
> +    {\expandafter\let\expandafter\FB@fcolorbox
> +     \csname flrow@fcolorbox@#1\endcsname}}
> +\newcommand*\flrow@fcolorcorners[1]{%
> +  \@ifundefined{flrow@fcolorcorners@#1}%
> +    {\flrow@error{Undefined color box corners `#1'}}%
> +    {\expandafter\let\expandafter\FB@fcolorcorners
> +     \csname flrow@fcolorcorners@#1\endcsname}}
> +\newcommand*\DeclareColorBox[2]{%
> +  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
> +   \long\@namedef{flrow@fcolorbox@#1}{#2}}}
> +\newcommand*\DeclareCBoxCorners[5]{%
> +  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
> +   \long\@namedef{flrow@fcolorcorners@#1}{\flrow@cboxcorners{#2}{#3}{#4}{#5}}}}
> +\@onlypreamble\DeclareColorBox
> +\@onlypreamble\DeclareCBoxCorners
> +\newcommand\flrow@load@colorpackage{\IfFileExists{color.sty}%
> +    {\def\next{\RequirePackage{color}}}{\let\next\relax}\next}
> +\AtBeginDocument{\flrow@load@colorpackage\let\flrow@load@colorpackage\relax}
> +\DeclareFROpt{captionskip}{\def\captionskip{#1}%
> +  \setlength\abovecaptionskip{#1}}
> +\DeclareFROpt{footskip}{\def\floatfootskip{#1}}
> +\newcommand\captionskip{10\p@}
> +\newcommand\floatfootskip{\skip\@mpfootins}
> +\DeclareFROpt{footnoterule}{\flrow@footrule{#1}}
> +\newcommand\DeclareFloatFootnoterule[2]{%
> +  \long\@namedef{flrow@fnrule@#1}{#2}}
> +\newcommand*\flrow@footrule[1]{%
> +  \@ifundefined{flrow@fnrule@#1}%
> +    {\flrow@error{Undefined footnoterule `#1'}}%
> +    {\let\@@FRabove\empty
> +     \expandafter\let\expandafter\FBfootnoterule\csname
> +       flrow@fnrule@#1\endcsname}}
> +\@onlypreamble\DeclareFloatFootnoterule
> +\DeclareFloatFootnoterule{normal}{\kern-3\p@
> +  \@tempdima.4\columnwidth
> +  \hrule\@width\@tempdima\kern2.6\p@}
> +\DeclareFloatFootnoterule{limited}{\kern-3\p@
> +  \@tempdima.4\columnwidth
> +  \ifdim\@tempdima>\frulemax\@tempdima=\frulemax\fi
> +  \hrule\@width\@tempdima\kern2.6\p@}
> +\newcommand\frulemax{1in}
> +\DeclareFloatFootnoterule{fullsize}{\kern-3\p@
> +  \hrule\@width\hsize\kern2.6\p@}
> +\DeclareFloatFootnoterule{none}{}
> +\@ifdefinable\FBfootnoterule{\let\FBfootnoterule\footnoterule}
> +\@ifdefinable\FR@iffancy{\let\FR@iffancy\@secondoftwo}
> +\DeclareFROpt{fancyboxes}{\flrow@setbool{fancy}{#1}}
> +\newcommand\DeclareFNOpt{%
> +   \@ifstar{\flrow@declfnopt\AtBeginDocument}
> +           {\flrow@declfnopt\@gobble}}
> +\newcommand*\flrow@declfnopt[2]{%
> +   #1{\undefine@key{newfloat}{#2}}\define@key{newfloat}{#2}}
> +\@onlypreamble\DeclareFNOpt
> +\@ifdefinable\flrow@types{\newtoks\flrow@types}
> +\newcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
> +  \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
> +  \addtocounter{float@type}{\value{float@type}}%
> +  \@namedef{#1name}{#1}\newcounter{#1}%
> +  \expandafter\edef\csname fnum@#1\endcsname
> +    {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
> +       \expandafter\noexpand\csname the#1\endcsname}%
> +  \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
> +  \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
> +  \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
> +  \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
> +  \@tempa}
> +\@onlypreamble\DeclareNewFloatType
> +\DeclareFNOpt*{placement}{\flnew@fps{#1}}
> +\newcommand\flnew@fps[1]{\@namedef{fps@\FB@captype}{#1}}
> +\@onlypreamble\flnew@fps
> +\DeclareFNOpt*{name}{\flnew@fname{#1}}
> +\newcommand\flnew@fname[1]{\@namedef{\FB@captype name}{#1}}
> +\@onlypreamble\flnew@fname
> +\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
> +\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
> +\def\ProcessOptionsWithKV#1{%
> +  \let\@tempc\relax
> +  \let\FR@tmp\@empty
> +  \@for\CurrentOption:=\@classoptionslist\do{%
> +    \@ifundefined{KV@#1@\CurrentOption}%
> +    {}%
> +    {%
> +      \@ifundefined{KV@#1@\CurrentOption @default}{%
> +       \PackageInfo{#1}{Global option `\CurrentOption' ignored}%
> +      }{%
> +      \PackageInfo{#1}{Global option `\CurrentOption' processed}%
> +      \edef\FR@tmp{\FR@tmp,\CurrentOption,}%
> +      \@expandtwoargs\@removeelement\CurrentOption
> +        \@unusedoptionlist\@unusedoptionlist
> +        }%
> +    }%
> +  }%
> +  \edef\FR@tmp{%
> +    \noexpand\caption@setkeys[floatrow]{#1}{%
> +      \FR@tmp\@ptionlist{\@currname.\@currext}%
> +    }%
> +  }%
> +  \FR@tmp
> +  \let\CurrentOption\@empty
> +  \AtEndOfPackage{\let\@unprocessedoptions\relax}}
> +\ProcessOptionsWithKV{floatrow}
> +\FR@iffancy{\RequirePackage{fr-fancy}}\relax
> +\let\ProcessOptionsWithKV\undefined
> +\AtBeginDocument{
> + \FR@ifrawfloats
> +  {\let\FR@tmp\flrow@Raw@restyle
> + }{\flrow@restyle{table}\flrow@restyle{figure}%
> +   \let\FR@tmp\flrow@restyle
> +  }\the\flrow@types
> + \@onlypreamble\flrow@restyle\@onlypreamble\flrow@Raw@restyle
> + \flrow@types={}}
> +\AtBeginDocument{%
> +\@ifundefined{sf@@@subfloat}{\@tempswafalse}{\@tempswatrue}
> +\if@tempswa\RequirePackage{fr-subfig}\fi}
> +\AtBeginDocument{%
> +\@ifundefined{LT@array}{\@tempswafalse}{\@tempswatrue}
> +\if@tempswa\RequirePackage{fr-longtable}\fi}
> +\endinput
> +%%
> +%% End of file `floatrow.sty'.
> -- 
> 2.7.4
> 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 03/10] Localize floatrow.sty
  2017-07-31  3:26   ` Paul E. McKenney
@ 2017-07-31  4:05     ` Akira Yokosawa
  2017-07-31  5:01       ` Akira Yokosawa
  0 siblings, 1 reply; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31  4:05 UTC (permalink / raw)
  To: paulmck; +Cc: perfbook, Akira Yokosawa





2017/07/31 12:26、Paul E. McKenney <paulmck@linux.vnet.ibm.com> のメッセージ:

> On Fri, Jul 28, 2017 at 06:58:07PM +0900, Akira Yokosawa wrote:
>>> From 53ff86011be07a62dba37a5bef56f04f25531dd1 Mon Sep 17 00:00:00 2001
>> From: Akira Yokosawa <akiyks@gmail.com>
>> Date: Thu, 20 Jul 2017 23:34:58 +0900
>> Subject: [PATCH 03/10] Localize floatrow.sty
>> 
>> The "floatrow" package conflicts with two-column layout.
>> A possible workaround was posted at [1] and it seems to work
>> in perfbook. Before the change, import the style file as of v0.3b
>> with trailing white spaces removed.
>> 
>> [1] https://tex.stackexchange.com/questions/133127/
> 
> If I understand the license correctly, we have to use a different name
> due to having modified the file.  

Yes.
I did the rename in the next commit. By splitting them,
it would be easier to see the workaround.

Or, do we need to keep the trailing blanks at this point?

> Or has this change (commenting out
> \textwidth\columnwidth) been applied upstream?

No, the workaround looks like only a hint.
Again, two-column layout tend to have little attention.

>  Or does changing the
> name mean that the fix is ineffective?

It is effective for perfbook AFAICS.

Thanks, Akira 
(from mobile, might be QP encoded)
> 
> (I applied the first two, thank you!)
> 
>                            Thanx, Paul
> 
>> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
>> ---
>> floatrow.sty | 1472 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 1472 insertions(+)
>> create mode 100644 floatrow.sty
>> 
>> diff --git a/floatrow.sty b/floatrow.sty
>> new file mode 100644
>> index 0000000..18ef28a
>> --- /dev/null
>> +++ b/floatrow.sty
>> @@ -0,0 +1,1472 @@
>> +%%
>> +%% This is file `floatrow.sty',
>> +%% generated with the docstrip utility.
>> +%%
>> +%% The original source files were:
>> +%%
>> +%% floatrow.dtx  (with options: `floatrow,floatsetup')
>> +%%
>> +%% IMPORTANT NOTICE:
>> +%%
>> +%% For the copyright see the source file.
>> +%%
>> +%% Any modified versions of this file must be renamed
>> +%% with new filenames distinct from floatrow.sty.
>> +%%
>> +%% For distribution of the original source see the terms
>> +%% for copying and modification in the file floatrow.dtx.
>> +%%
>> +%% This generated file may be distributed as long as the
>> +%% original source files, as listed above, are part of the
>> +%% same distribution. (The sources need not necessarily be
>> +%% in the same archive or directory.)
>> +\NeedsTeXFormat{LaTeX2e}[1995/06/01]
>> +\ProvidesPackage{floatrow}
>> +       [2008/08/02 v0.3b floatrow: float package extension]
>> +\@ifundefined{float@caption}{%
>> +  \@ifundefined{rotfloat@float}{}%
>> +    {\PackageError{floatrow}{Do not use rotfloat package with floatrow.\MessageBreak
>> +        The latter will be skipped}{}%
>> +  \@namedef{opt@floatrow.sty}{}\endinput}}%
>> +  {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak
>> +        The latter will be skipped}{}%
>> +  \@namedef{opt@floatrow.sty}{}\endinput}
>> +\@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)}
>> +\RequirePackage{keyval}
>> +\RequirePackage{caption3}
>> +\@ifpackagelater{caption3}{2007/04/11 v3.0q}{}{\PackageError
>> +    {floatrow}{For a successful cooperation we need at least\MessageBreak
>> +    version `2007/04/11 v3.0q' of package caption,\MessageBreak
>> +        but only version\MessageBreak
>> +          `\csname ver@caption.\@pkgextension\endcsname'\MessageBreak
>> +        is available}\@eha\endinput}
>> +\providecommand*\caption@fnum[1]{%
>> +   \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}}
>> +\@ifdefinable\FR@flboxreset{\let\FR@flboxreset\@floatboxreset}
>> +\@ifdefinable\FR@makecaption{\let\FR@makecaption\@makecaption}
>> +\newcommand\flrow@caption{%
>> +   \ifx\@captype\@undefined
>> +     \@latex@error{\noexpand\caption outside float}\@ehd
>> +     \expandafter\@gobble
>> +   \else
>> +     \refstepcounter\@captype
>> +     \expandafter\@firstofone
>> +   \fi
>> +   {\@dblarg{\@caption\@captype}}%
>> +}
>> +\@ifdefinable\float@caption{\let\float@caption\@caption}
>> +\newcounter{float@type}
>> +\@ifundefined{c@figure}%
>> +  {\setcounter{float@type}{1}}%
>> +  {\setcounter{float@type}{4}}
>> +\newcommand\flrow@package{floatrow}
>> +\newcommand*\flrow@error[1]{\PackageError\flrow@package{#1}\flrow@eh}
>> +\newcommand*\flrow@eh{%
>> +  If you do not understand this error, please take look\MessageBreak
>> +  at `floatrow' and `caption' package documentations.\MessageBreak
>> +  \@ehc}
>> +\newcommand\floatstyle[1]{\@ifundefined{flrow@sty@#1}%
>> +  {\flrow@error{Unknown float style `#1'}}{\edef\float@style{#1}}}
>> +\newcommand\floatname[2]{\@namedef{#1name}{#2}}
>> +\newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}}
>> +\newif\if@@FS
>> +\newcommand\FR@redefs{%
>> +  \@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}
>> +\newcommand\flrow@makecaption[2]{\ifnum\floatbox@depth=\z@
>> +    \ifvoid\@floatcapt
>> +      \else\flrow@error{Caption(s) lost}\fi\fi
>> +  \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
>> +   \linewidth\hsize
>> +   \ifdim\hsize<70mm\sloppy\fi
>> +   \normalsize
>> +   \abovecaptionskip\z@\belowcaptionskip\z@
>> +   \FR@makecaption{#1}{#2}\egroup}
>> +\newcommand\killfloatstyle{\FBbuildtrue\if@@FS\hsize\FB@wd\fi\@@FSfalse}
>> +\newcommand\flrow@capsetup{}
>> +\edef\float@style{plain}
>> +\@ifdefinable\FBB@wd{\let\FBB@wd\relax}
>> +\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}}
>> +\newcommand\flrow@restyle[1]{%
>> +  \@namedef{#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
>> +    \flrow@setlist{{#1}}%
>> +    \textwidth\columnwidth\edef\FBB@wd{\the\columnwidth}%
>> +    \FRifFBOX\@@setframe\relax\@@FStrue\@float{#1}}%
>> +  \@namedef{#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
>> +    \flrow@setlist{{#1}{widefloat}{wide#1}}%
>> +    \FRifFBOX\@@setframe\relax\@@FStrue\edef\FBB@wd{\the\textwidth}%
>> +    \let\@xdblfloat\@xfloat\relax
>> +    \FR@ifdoubleaswide
>> +     {\if@twocolumn\else\let\@dblfloat\@float\fi}\relax
>> +    \@dblfloat{#1}}%
>> +  \expandafter\let\csname end#1\endcsname\float@end
>> +  \expandafter\let\csname end#1*\endcsname\float@dblend
>> + \@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\relax\@@FStrue
>> +    \let\rotfloat@@makebox\float@makebox
>> +    \let\float@makebox\rotfloat@makebox
>> +    \@float{#1}}%
>> +  \@namedef{endsideways#1}{\FBbuildtrue\float@end}
>> +  \ifx\@rotdblfloat\undefined
>> +   \@namedef{sideways#1*}{%
>> +     \flrow@error{%
>> +      You need rotating version 2.10 or newer to do this}%
>> +     \@nameuse{sideways#1}}%
>> +  \else
>> +   \@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\relax\@@FStrue
>> +     \let\@xdblfloat\@xfloat
>> +     \let\rotfloat@@makebox\float@makebox
>> +     \let\float@makebox\rotdblfloat@makebox
>> +     \@dblfloat{#1}}%
>> +  \fi
>> +  \@namedef{endsideways#1*}{\FBbuildtrue\float@dblend}}
>> + \@ifundefined{wrapfloat}{}{%
>> +   \@ifundefined{flrow@WF@rapt}{\let\flrow@WF@rapt\WF@rapt
>> +   \def\WF@rapt[##1]##2{\FRifFBOX\@@setframe\relax\@@FStrue
>> +     \dimen@##2\relax
>> +     \ifdim\dimen@>\z@
>> +       \edef\FBB@wd{\the\dimen@}\FB@fs@wd\dimen@\FBo@wd
>> +     \fi
>> +     \flrow@WF@rapt[##1]{\dimen@}%
>> +       \the\FR@everyfloat\ignorespaces}%
>> +   }{}%
>> +   \@namedef{wrap#1}{\killfloatstyle\def\@captype{#1}%
>> +     \FR@redefs\FBc@wd\z@
>> +     \flrow@setlist{{#1}{wrapfloat}{wrap#1}}%
>> +     \def\WF@floatstyhook{\let\@currbox\WF@box
>> +       \ifFBbuild
>> +         \global\setbox\WF@box\flrow@FB{\wd\WF@box}%
>> +       \else
>> +         \global\let\flrow@typ@tmpset\undefined
>> +         \global\let\WF@box\@currbox
>> +       \fi}%
>> +     \@ifnextchar[\WF@wr{\WF@wr[]}}%]
>> +   \@namedef{endwrap#1}{\endwrapfloat
>> +     \@ifundefined{FloatHBarrier}{}\FloatHBarrier
>> +     }}
>> + \@ifundefined{sf@@@subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}}
>> +\newcommand\RawFloats{\@ifnextchar[%]
>> +    \flrow@rawfloatschk\flrow@rawfloats}
>> +\newcommand\flrow@rawfloats{\killfloatstyle\@parboxrestore
>> +    \let\@makecaption\FR@makecaption
>> +    \expandafter\ifx\csname end\@captype\endcsname\float@endH
>> +        \global\FBbuildfalse
>> +    \else
>> +        \@namedef{end\@captype}{\end@float}%
>> +    \fi
>> +    \expandafter\ifx\csname end\@captype*\endcsname\float@endH
>> +        \global\FBbuildfalse
>> +    \else
>> +        \@namedef{end\@captype*}{\end@dblfloat}%
>> +    \fi
>> +  \@ifundefined{@rotfloat}{}{%
>> +    \@namedef{endsideways\@captype}{\end@rotfloat}%
>> +    \@namedef{endsideways\@captype*}{\end@rotdblfloat}%
>> +  }%
>> +  \@ifundefined{wrapfloat}{}{%
>> +    \@namedef{endwrap\@captype}{\endwrapfloat}%
>> +  }}
>> +\@ifdefinable\flrow@rawfloatschk{}
>> +\def\flrow@rawfloatschk[#1]{\@ifnextchar[%]
>> +    {\flrow@RawFloats[#1]}{\flrow@@RawFloats#1,;}}
>> +\@ifdefinable\flrow@RawFloats{}
>> +\newcommand\flrow@raw@set{\AtBeginDocument}
>> +\AtBeginDocument{\let\flrow@raw@set\@firstofone}
>> +\def\flrow@RawFloats[#1][#2]{\flrow@RawFloats@[#1]#2,;}
>> +\def\flrow@RawFloats@[#1]#2,{%
>> +  \caption@ifinlist{#2}{float}{\flrow@raw@set
>> +        {\@namedef{#1}{\@float{#1}}}%
>> +  }{\caption@ifinlist{#2}{widefloat}{\flrow@raw@set%
>> +        {\@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}}%
>> +  }{\caption@ifinlist{#2}{rotfloat}{%
>> +    \@ifundefined{@rotfloat}{}{\flrow@raw@set
>> +        {\@namedef{sideways#1}{\@rotfloat{#1}}}}%
>> +  }{\caption@ifinlist{#2}{widerotfloat}{%
>> +    \@ifundefined{@rotfloat}{}{\flrow@raw@set
>> +        {\@namedef{sideways#1*}{\@rotdblfloat{#1}}}}%
>> +  }{\caption@ifinlist{#2}{wrapfloat}{%
>> +    \@ifundefined{wrapfloat}{}{\flrow@raw@set
>> +        {\@namedef{wrap#1}{\wrapfloat{#1}}}}}%
>> +  }{\caption@ifinlist{#2}{all,allfloats}{%
>> +    \flrow@@RawFloats{#1}%
>> +  }{\flrow@error{Undefined float subtype `#2'}%
>> +  }}}}}\@ifnextchar;\@gobble{\flrow@RawFloats@[#1]}}
>> +\@ifdefinable\flrow@@RawFloats{}
>> +\def\flrow@@RawFloats#1,{%
>> + \flrow@raw@set{\@namedef{#1}{\@float{#1}}%
>> +    \@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}%
>> +  \@ifundefined{@rotfloat}{}{%
>> +    \@namedef{sideways#1}{\@rotfloat{#1}}%
>> +    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
>> +  }%
>> +  \@ifundefined{wrapfloat}{}{%
>> +    \@namedef{wrap#1}{\wrapfloat{#1}}}%
>> +  }\@ifnextchar;\@gobble\flrow@@RawFloats
>> +}
>> +\newcommand\flrow@Raw@restyle[1]{%
>> +    \@namedef{#1}{\@float{#1}}%
>> +    \@namedef{#1*}{\@dblfloat{#1}}%
>> +    \@namedef{end#1}{\end@float}%
>> +    \@namedef{end#1*}{\end@dblfloat}%
>> +  \@ifundefined{@rotfloat}{}{%
>> +    \@namedef{sideways#1}{\@rotfloat{#1}}%
>> +    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
>> +    \@namedef{endsideways#1}{\end@rotfloat}%
>> +    \@namedef{endsideways#1*}{\end@rotdblfloat}%
>> +  }%
>> +  \@ifundefined{wrapfloat}{}{%
>> +    \@namedef{wrap#1}{\wrapfloat{#1}}%
>> +    \@namedef{endwrap#1}{\endwrapfloat}%
>> +  }%
>> + }
>> +\newcommand\RawCaption[1]{{\let\@makecaption\FR@makecaption #1}}
>> +\@ifdefinable\float@exts{\newtoks\float@exts}
>> +\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}}
>> +\let\@float@Hx\@xfloat
>> +\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}}
>> +\AtBeginDocument{%
>> +  \@ifundefined{latex@xfloat}{}{%
>> +    \let\floatrow@ORI@xfloat\@xfloat
>> +    \def\@xfloat#1[#2]{%
>> +      \floatrow@ORI@xfloat{#1}[#2]%
>> +      \floatfont}}}%
>> +\newsavebox\float@box
>> +\def\@float@HH#1[H]{%
>> +  \@ifundefined{FloatHBarrier}{}\FloatHBarrier
>> +  \expandafter\let\csname end#1\endcsname\float@endH
>> +  \FR@ifdoubleaswide
>> +   {\expandafter\let\csname end#1*\endcsname\float@endH}\relax
>> +  \let\@currbox\float@box
>> +  \flrow@setlist*{{floatH}{#1H}}%
>> +  \def\@captype{#1}%\setbox\@floatcapt=\vbox{}%
>> +  \setbox\@currbox\color@vbox\normalcolor
>> +    \vbox\bgroup
>> +      \hsize\columnwidth
>> +      \linewidth\columnwidth
>> +      \@parboxrestore\leftmargin\z@\rightmargin\z@
>> +      \@floatboxreset \@setnobreak
>> +  \ignorespaces}
>> +\newcommand\flrow@flboxreset{\FR@flboxreset
>> +  \@ifundefined{capstart}{}{\capstart}%
>> +  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
>> +  \if@tempswa\FB@readaux{\relax}\fi
>> +  \global\let\FBcheight\relax\global\let\FBoheight\relax
>> +  \global\let\FBfheight\relax
>> +  \FBifcapbeside\FC@fs@wd\FB@fs@wd
>> +  \the\FR@everyfloat}
>> +\@ifdefinable\FBcheight{\let\FBcheight\relax}
>> +\@ifdefinable\FBoheight{\let\FBoheight\relax}
>> +\@ifdefinable\FBfheight{\let\FBfheight\relax}
>> +\newcommand\FB@fs@wd{\@tempdima\FBB@wd
>> +  \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\linewidth\hsize
>> +  \FBifcaptop
>> +    {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
>> +    {\columnwidth\FBc@wd}%
>> +  }
>> +\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
>> +  \FC@ifc@wd\@tempswatrue\@tempswafalse
>> +  \if@tempswa
>> +     \ifx\FCwidth\relax
>> +        \flrow@error{You didn't define width of caption\MessageBreak
>> +          for plain floating environment.}%
>> +     \else
>> +        \global\FBc@wd=\FCwidth
>> +        \FC@ifo@fil{\advance\@tempdima-\FBc@wd}\relax
>> +     \fi
>> +  \else
>> +    \global\FBc@wd\@tempdima
>> +  \fi
>> +  \FC@ifo@fil\relax{\@tempdima.5\@tempdima
>> +    \flrow@setwd\FB@wd\@tempdima}%
>> +  \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}%
>> +  \FC@ifc@wd\relax{\global\advance\FBc@wd-\FB@wd}%
>> +  \hsize\FBo@wd\linewidth\hsize\columnwidth\FBc@wd\linewidth\hsize
>> +  \FCset@vpos}
>> +\newcommand\float@makebox[1]{%
>> +  \FBifcapbeside{\flrow@FC{#1}}{\flrow@FB{#1}}}
>> +\newcommand\FBaskip{\z@}\newcommand\FBbskip{\z@}
>> +\newif\ifFBbuild\FBbuildtrue
>> +\newcommand\flrow@FB[1]{\vbox{\@tempdima=#1\vskip\FBaskip
>> +  \@parboxrestore\leftmargin\z@\rightmargin\z@
>> +  \hbox to\@tempdima{\def\FB@zskip{\vskip\z@}%
>> +  \FBleftmargin\flrow@FB@\FBrightmargin}%
>> +  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
>> +  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}%
>> +  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
>> +\newcommand\flrow@FC[1]{\vbox{\@tempdima=#1\@parboxrestore
>> +  \leftmargin\z@\rightmargin\z@\flrow@FClist\vskip\FBaskip
>> +  \hbox to\@tempdima{\FCleftmargin\flrow@FC@\FCrightmargin}%
>> +  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
>> +  \nocapbeside\global\let\FCwidth\relax
>> +  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
>> +\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}
>> +\newcommand\FBafil{\vfill}\newcommand\FBbfil{\vfill}
>> +\newcommand\FBw@box[1]{\hsize#1\columnwidth#1\linewidth#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}
>> +\newcommand\flrow@FB@{\global\let\flrow@typ@tmpset\undefined
>> + \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\leftmargin\z@\rightmargin\z@
>> +  \@@FBabove
>> +  \FBifcaptop\@tempswatrue\@tempswafalse
>> +  \if@tempswa
>> +    \ifvoid\@floatcapt\else
>> +      \FB@vbox\FBc@wd\FBcheight{\FBifCAPTOP\relax\vfill
>> +        \unvbox\@floatcapt
>> +        \ifnum\FPOScnt=\@ne\vbox{\FB@foot}\fi\vfil}%
>> +      \@@FBskip\hrule\@height\z@\@depth\z@
>> +    \fi
>> +    \vtop{\vskip\z@\FBo@frame{\FB@vtop\FBo@wd\FBoheight
>> +      {\FBafil\unvbox\@currbox\FBbfil
>> +      \vskip\z@
>> +      \ifnum\FPOScnt=\z@
>> +        \FB@vtop\FBo@wd\FBfheight{\FB@foot\vfil}\fi}}\par
>> +      \vskip\z@
>> +      \ifnum\FPOScnt=\tw@\vskip\z@
>> +        \FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi}%
>> +  \else\ifnum\FPOScnt=\z@\FPOScnt=\@ne\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=\@ne\vtop{\FB@foot}%
>> +    \fi\par
>> +        \vfill\vskip\z@\vss
>> +        \ifnum\FPOScnt=2\FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi
>> +        }\fi
>> +  \fi\@@FBbelow\FB@zskip\end@FBBOX
>> +  \global\setbox\@floatcapt\box\voidb@x}}
>> +\newcommand\flrow@FC@{\global\let\flrow@typ@tmpset\undefined
>> + \FB@frame{\begin@FBBOX
>> +   \adj@dim\FBo@wd+\FBo@wadj=\hsize
>> +   \settowidth\@tempdimb{\floatcapbesidesep}\advance\hsize\@tempdimb
>> +   \advance\hsize\FBc@wd\@parboxrestore\leftmargin\z@\rightmargin\z@
>> +   \@@FBabove
>> +    \hbox{\floatfacing*%
>> +      {\ifvoid\@floatcapt\else
>> +         \FCc@box{\FBw@box\FBc@wd\unvbox\@floatcapt\FB@foot}%
>> +         \floatcapbesidesep\fi
>> +       \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
>> +    \global\setbox\@floatcapt\box\voidb@x}}
>> +\newcommand\FB@foot{\let\FR@ifFOOT\@firstoftwo\FB@putfoots\@@par\FB@putfnotes}
>> +\newcommand\FB@zskip{}
>> +\newcommand\float@end{\ifFBbuild\@endfloatbox
>> +    \global\setbox\@currbox\float@makebox\columnwidth
>> +    \let\@endfloatbox\relax\fi
>> +  \end@float}
>> +\newcommand\floatHpenalties{}
>> +\newcommand\float@endH{\@endfloatbox\par
>> +  \FR@iffloatHaslist
>> +   {\floatHpenalties\relax
>> +    \addpenalty\@beginparpenalty}\relax
>> +  \vskip\intextsep
>> +  \ifFBbuild\setbox\@currbox\float@makebox\columnwidth\fi
>> +  \box\@currbox\par
>> +  \FR@iffloatHaslist
>> +   {\addpenalty\@endparpenalty\@endpetrue}\relax
>> +  \vskip\intextsep\relax}
>> +\newcommand\float@dblend{\ifFBbuild\@endfloatbox
>> +    \global\setbox\@currbox\float@makebox\textwidth
>> +    \let\@endfloatbox\relax\fi
>> +  \end@dblfloat}
>> +\newsavebox\@floatcapt
>> +\newcommand*{\listof}[2]{%
>> +  \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
>> +    \expandafter\providecommand\csname l@#1\endcsname
>> +        {\@dottedtocline{1}{1.5em}{2.3em}}%
>> +    \float@listhead{#2}%
>> +    \begingroup\setlength{\parskip}{\z@}%
>> +      \@starttoc{\@nameuse{ext@#1}}%
>> +    \endgroup}}
>> +\providecommand*{\float@listhead}[1]{%
>> +  \@ifundefined{chapter}{\def\@tempa{\section*}}%
>> +    {\def\@tempa{\chapter*}}%
>> +  \@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}%
>> +\newcommand\float@addtolists[1]{%
>> +  \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}
>> +\PackageInfo{floatrow}{Modified float package code loaded}
>> +\IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse}
>> +\if@tempswa
>> +  \let\rotfloat@HH\@float@HH
>> +  \def\@float@HH#1{%
>> +    \expandafter\let\csname endsideways#1\endcsname\float@endH
>> +    \let\end@float\relax
>> +    \rotfloat@HH{#1}}
>> +  \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}}
>> +\PackageInfo{floatrow}{Modified rotfloat package code loaded}
>> +\fi
>> +\@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat}
>> +\FR@everyfloat={\let\@footnotetext\@mpfootnotetext
>> +  \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
>> +  \floatobjectset\floatfont}
>> +\@ifdefinable\FR@ifFOOT{\let\FR@ifFOOT\@secondoftwo}
>> +\newcommand\FB@putfnotes{%
>> +  \ifvoid\@mpfootins\else\FR@ifFOOT
>> +    {\vskip\floatfootskip\normalcolor\FBfootnoterule
>> +    \unvbox\@mpfootins\@@par}\relax
>> +  \fi}
>> +\@ifdefinable\flrow@foot{\newinsert\flrow@foot}
>> +\newcommand\FB@putfoots{%
>> +  \ifvoid\flrow@foot\else\FR@ifFOOT
>> +    {\vskip\floatfootskip\normalcolor
>> +    \unvbox\flrow@foot\@@par}\relax
>> +  \fi}
>> +\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}}{}}
>> +\captionsetup[floatfoot]{labelformat=empty,labelsep=none}
>> +\newcommand\floatfoot{\@ifstar
>> +    {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}%
>> +    {\def\FR@tmp{\captionfootfont}\floatfoot@}}
>> +\newcommand\floatfoot@[1]{%
>> +  \global\setbox\flrow@foot\vbox{%
>> +  \floatfoot@box{#1}}}%
>> +\newcommand\floatfoot@box[1]{%
>> +  \@ifundefined{@captype}{\def\@captype{floatfoot}}{}%
>> +    \if@@FS\hsize\columnwidth\linewidth\columnwidth\fi
>> +    \@parboxrestore\reset@font\color@begingroup
>> +  \caption@setoptions{\@captype}%
>> +  \caption@setoptions{floatfoot}%
>> +     \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
>> +  \color@endgroup}
>> +\newcommand\newfloatcommand[2]{%
>> +  \@ifundefined{#1}{}%
>> +    {\flrow@error{\string#1 already defined}}%
>> +  \@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
>> +  \def\FB@tmpset{#3}\def\@captype{#2}%
>> +  \@ifnextchar[{\@floatbox}{\@floatbox[#4]}}}
>> +\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
>> +\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
>> +\newfloatcommand{fcapside}{figure}[\capbeside][]
>> +\@ifdefinable\FB@wd {\newdimen\FB@wd}
>> +\@ifdefinable\FBo@wd{\newdimen\FBo@wd}
>> +\@ifdefinable\FBc@wd{\newdimen\FBc@wd}
>> +\newlength\FBo@ht
>> +\newlength\FBc@ht
>> +\newlength\FBf@ht
>> +\newlength\FBo@max
>> +\newlength\FBc@max
>> +\newlength\FBf@max
>> +\newcommand\FR@loc@addcnt[2]{%
>> +  \@ifundefined{c@#1}{\@nocounterr{#1}}%
>> +    {\advance\csname c@#1\endcsname #2\relax}}
>> +\newcommand\FR@loc@refcnt[1]{%
>> +  \@ifundefined{c@#1}{\@nocounterr{#1}}%
>> +   {\advance\csname c@#1\endcsname1\relax}}
>> +\newcommand\FR@loc@{%
>> +  \let\FR@ifunloc\@gobble
>> +  \let\label\@gobble
>> +  \let\refstepcounter\FR@loc@refcnt
>> +  \let\stepcounter\FR@loc@refcnt
>> +  \let\refsteponlycounter\FR@loc@refcnt
>> +  \let\FR@ifcountH\@secondoftwo
>> +  \let\cl@@ckpt\empty\let\addtocounter\FR@loc@addcnt
>> +  \let\caption@kernel@addcontentsline\@gobbletwo
>> +  \let\caption@addcontentsline\@gobbletwo
>> +  \def\sf@updatecaptionlist##1##2##3##4{}}
>> +\def\FBtmp@cap#1[#2]#3{\sbox\@tempboxa{\captionlabel{#3}}%
>> +  \global\@tempdimb\wd\@tempboxa}
>> +\newcommand\captionlabel[1]{{\def\FR@tmp{\@captype}\ifnum\floatbox@depth>\@ne
>> +       \def\FR@tmp{sub\@captype}\caption@setsubtype*{\FR@tmp}\stepcounter{\FR@tmp}\fi
>> +   \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
>> +\newcommand\subcaptionlabel[1]{{\floatbox@depth\tw@\captionlabel{#1}}}
>> +\newcommand\FBget@box[3]{%
>> +  \FBiffloatrow\relax
>> +    {\ifx\FBB@wd\relax
>> +      \ifdim\hsize=\z@
>> +        \@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}%
>> +  \adj@dim\hsize-\FB@wadj=\@tempdima
>> +  \FBifcapbeside
>> +    {\FCget@@wd{#1}{#3}}%
>> +    {\nofilFCOhsize
>> +    \FBiffloatrow\relax
>> +      {\settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
>> +      \advance\@tempdima-\@tempdimb}}%
>> +  \FC@ifo@fil{\@tempdima\FB@wd}{\FB@wd\@tempdima}%
>> +  \adj@dim\@tempdima-\FBo@wadj=\FBo@wd
>> +  \FBiffloatrow\relax{\hsize\FBo@wd}%
>> +  \FBifcapbeside{\hsize\FB@wd}\relax
>> +  \linewidth\hsize
>> +  \def\reserved@a{#1}\ifx\reserved@a\empty
>> +    \else\FBget@@wd{#1}{#3}\fi
>> +  \hsize\FBo@wd\linewidth\hsize
>> +  \FBifcapbeside
>> +    {\FC@ifc@wd\relax{\advance\FBc@wd-\FB@wd}}%
>> +    {\FBc@wd\FB@wd}%
>> +  \setbox\z@\vbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@\hsize\FBo@wd\linewidth\hsize
>> +    \FBifcaptop
>> +      {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
>> +      {\columnwidth\FBc@wd}%
>> +    #3}%
>> +  \FBc@ht\ht\@floatcapt\advance\FBc@ht\dp\@floatcapt
>> +  \FBo@ht\ht\z@\advance\FBo@ht\dp\z@\let\FBheight\FBo@ht
>> +  \setbox\tw@\vbox{\null\par\FB@foot\par}%
>> +  \FBf@ht\ht\tw@\advance\FBf@ht\dp\tw@
>> +  \FBiffloatrow
>> +    {\ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
>> +    \ifCADJ
>> +      \FBifcaptop
>> +        {\ifnum\FPOScnt=\@ne\global\advance\FBc@ht\FBf@ht\fi}%
>> +        {\ifnum\FPOScnt=\tw@
>> +          \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}%
>> +      \ifdim\FBc@ht>\FBc@max\global\FBc@max\FBc@ht\fi
>> +      \gdef\FBcheight{\FBc@ht}\gdef\FBfheight{\FBf@ht}%
>> +    \fi}\relax
>> +  \def\reserved@a{#2}\ifx\reserved@a\empty
>> +    \FBiffloatrow{\ifOADJ
>> +      \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
>> +      \FBifcaptop
>> +        {\ifnum\FPOScnt=\z@
>> +          \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
>> +        \fi}\relax
>> +      \gdef\FBoheight{\FBo@ht}\gdef\FBfheight{\FBf@ht}%
>> +    \fi}\relax
>> +  \else
>> +     \FBget@@ht{#2}{#3}%
>> +  \fi}
>> +\newcommand\FCget@@wd[2]{\flrow@FClist
>> +  \FBiffloatrow\relax
>> +    {\settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
>> +    \advance\@tempdima-\@tempdimb\advance\hsize-\@tempdimb}%
>> +  \settowidth\@tempdimb{\floatcapbesidesep}\advance\@tempdima-\@tempdimb
>> +  \FC@ifo@fil{\FB@wd\@tempdima}\relax
>> +  \FC@ifc@wd\@tempswatrue\@tempswafalse
>> +  \if@tempswa
>> +    \ifx\FCwidth\relax
>> +      \setbox\@ne\vbox{\FR@loc@
>> +        \let\caption\flrow@caption
>> +        \let\@caption\FBtmp@cap
>> +         #2}%
>> +      \FBc@wd=\@tempdimb
>> +    \else
>> +      \FBc@wd=\FCwidth
>> +    \fi\FC@ifo@fil{\advance\FB@wd-\FBc@wd}\relax
>> +  \else
>> +    \FBc@wd\@tempdima
>> +  \fi
>> +  \@tempdima.5\@tempdima}
>> +\newcommand\flrow@gobble@[2][]{\unskip\ignorespaces}
>> +\newcommand\flrow@gobble{%
>> +    \let\caption\flrow@gobble@
>> +    \let\floatfoot\flrow@gobble@
>> +    \let\footnote\flrow@gobble@
>> +    \let\footnotetext\flrow@gobble@
>> +    }
>> +\newcommand\FBget@@wd[2]{\@tempswafalse
>> +  \begingroup
>> +    \@tempdima-3000pt\let\FBwidth\@tempdima
>> +    \setlength\dimen@{#1}\ifdim\dimen@<\z@\global\@tempswatrue\fi
>> +  \endgroup
>> +  \if@tempswa
>> +    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
>> +    \FBo@wd\wd\z@\let\FBwidth\FBo@wd
>> +    \setlength\FBo@wd{#1}%
>> +    \advance\FBo@wd\leftskip\advance\FBo@wd\rightskip
>> +    \adj@dim\FBo@wd+\FBo@wadj=\FB@wd
>> +    \setbox\flrow@foot\box\voidb@x
>> +    \setbox\@mpfootins\box\voidb@x
>> +  \else
>> +    \setlength\FB@wd{#1}%
>> +    \adj@dim\FB@wd-\FB@wadj=\FB@wd
>> +    \adj@dim\FB@wd-\FBo@wadj=\FBo@wd
>> +    \let\FBwidth\FBo@wd
>> +  \fi}
>> +\newcommand\FBget@@ht[2]{\@tempswafalse
>> +  \begingroup
>> +    \@tempdimb-3000pt\let\FBheight\@tempdimb
>> +    \setlength\dimen@{#1}\ifdim\dimen@<\z@
>> +      \global\@tempswatrue\fi
>> +  \endgroup
>> +  \if@tempswa
>> +    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
>> +    \FBo@ht\ht\z@\advance\FBo@ht\dp\z@
>> +    \let\FBheight\FBo@ht\setlength\FBo@ht{#1}%
>> +    \adj@dim\FBo@ht+\FBo@hadj=\FBo@ht
>> +    \FBifcaptop{\ifnum\FPOScnt=\z@\advance\FBo@ht\FBf@ht\fi}\relax
>> +  \else
>> +    \setlength\FBo@ht{#1}%
>> +    \adj@dim\FBo@ht-\FBo@hadj=\FBo@ht
>> +    \adj@dim\FBo@ht-\FB@hadj=\FBo@ht
>> +    \setbox\z@\vbox{\offinterlineskip\vbox{\@@FBabove}%
>> +      \FBifcapbeside\relax{\@@FBskip\hrule\@height\z@\@depth\z@}%
>> +      \vtop{\@@FBbelow}}%
>> +    \global\advance\FBo@ht-\ht\z@\global\advance\FBo@ht-\dp\z@
>> +    \FBifcapbeside\relax\FBget@@@ht
>> +  \fi
>> +  \FBiffloatrow{\ifOADJ
>> +    \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
>> +  \fi}\relax
>> +  \def\FBoheight{\FBo@ht}}
>> +\newcommand\FBget@@@ht{%
>> +    \ifdim\FBc@ht>\FBc@max
>> +      \global\advance\FBo@ht-\FBc@ht
>> +    \else
>> +      \global\advance\FBo@ht-\FBc@max
>> +    \fi
>> +    \FBifcaptop{\ifnum\FPOScnt=\@ne\else
>> +      \ifdim\FBf@ht>\FBf@max
>> +        \global\advance\FBo@ht-\FBf@ht
>> +      \else
>> +        \global\advance\FBo@ht-\FBf@max
>> +      \fi
>> +    \fi}\relax
>> +  }
>> +\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}}}
>> +\newcounter{FBl@b}
>> +\@ifdefinable\FR@ifFCBOX{\let\FR@ifFCBOX\@secondoftwo}
>> +\newcommand\FBs@raise{\raisebox{-\totalheight}}
>> +\newcommand\FBf@raise{}
>> +\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}%
>> +    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{-\height}}}%
>> +     {\gdef\FBf@raise{}}%
>> +    \gdef\FBs@raise{\raisebox{-\totalheight}}%
>> +  \or\gdef\FC@bbox{\vbox\@parboxto\bgroup}\gdef\FC@ebox{\vskip\z@\egroup}%
>> +    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{\depth}}}%
>> +     {\gdef\FBf@raise{}}%
>> +    \gdef\FBs@raise{}\fi}
>> +\@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}
>> +\newcommand\floatbox[2][]{\begingroup
>> +  \def\FB@tmpset{#1}\def\@captype{#2}%
>> +  \@ifnextchar[{\@floatbox}{\@floatbox[]}}
>> +\@ifdefinable\@floatbox{}\@ifdefinable\@@floatbox{}
>> +\def\@floatbox[#1]{%
>> +  \@ifnextchar[{\@@floatbox[#1]}{\@@floatbox[#1][]}}
>> +\@ifdefinable\floatbox@depth{\newcount\floatbox@depth}
>> +\def\@@floatbox[#1][#2]{%
>> +  \@ifnextchar[{\@@@floatbox[#1][#2]}{\@@@floatbox[#1][#2][]}}%]
>> +\@ifdefinable\@@@floatbox{}
>> +\long\def\@@@floatbox[#1][#2][#3]#4#5{\advance\floatbox@depth\@ne
>> +  \@FB@vpos{#3}%
>> +  \if@@FS\else\FR@redefs
>> +    \ifcase\floatbox@depth\or
>> +      \flrow@setlist{{\@captype}}\or
>> +      \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
>> +    \fi
>> +    \FRifFBOX\@@setframe\relax\@@FStrue
>> +  \fi
>> +  \FB@tmpset
>> +  \FBifcapbeside\flrow@FClist\relax
>> +  \@parboxrestore\leftmargin\z@\rightmargin\z@
>> +  \floatobjectset\floatfont
>> +  \FBget@box{#1}{#2}{#4#5}%
>> +  \FBifcapbeside\FCset@vpos\relax
>> +  \FBiffloatrow{\FR@floatbox{\@ifundefined{capstart}{}{\capstart}#4#5}}%
>> +   {\adj@dim\FB@wd+\FB@wadj=\hsize\linewidth\hsize
>> +    \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi
>> +    \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}\let\FBB@wd\relax
>> +    #4#5}\FBbuildtrue
>> +    \FBifcapbeside{\flrow@FC\FBB@wd}{\flrow@FB\FBB@wd}%
>> +    \global\FBbuildfalse
>> +    \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
>> +   }\advance\floatbox@depth\m@ne
>> +  \endgroup\ignorespaces}
>> +\newcommand\FR@floatbox[1]{\@tempswafalse
>> +    \ifOADJ\@tempswatrue\fi\ifCADJ\@tempswatrue\fi
>> +    \if@tempswa\@ifundefined{FB@@boxmax}{}{\FB@@boxmax}\fi
>> +    \FBsetbox@obj{#1}\begin@FBBOX
>> +      \FBifcapbeside\flrow@FC@\flrow@FB@
>> +    \end@FBBOX
>> +    \addtocounter{FRobj}\m@ne
>> +    \@tempswafalse\FR@iffacing\@tempswatrue\relax
>> +    \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
>> +    \advance\Xhsize-\FB@wd
>> +    \FBifcapbeside
>> +      {\advance\Xhsize-\FBc@wd
>> +       \FR@ifcountH{\global\advance\Zhsize-\FBc@wd}\relax
>> +       \settowidth\@tempdimb{\floatcapbesidesep}%
>> +       \advance\Xhsize-\@tempdimb
>> +       \FR@ifcountH{\global\advance\Zhsize-\@tempdimb}\relax}\relax
>> +    \ifnum\c@FRobj=\z@
>> +      \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
>> +      \floatrowsep
>> +      \adj@dim\Xhsize-\FB@wadj={\global\Xhsize}%
>> +      \adj@dim\Zhsize-\FB@wadj={\global\Zhsize}%
>> +    \fi}
>> +\newcommand\FBsetbox@obj[1]{%
>> +  \setbox\float@box\color@vbox\normalcolor
>> +  \FBifcaptop
>> +     {\FB@vtop\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
>> +      \ifnum\FPOScnt=\z@\columnwidth\FBo@wd\else\columnwidth\FBc@wd\fi}%
>> +     {\FB@vbox\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
>> +      \columnwidth\FBc@wd}%
>> +  #1\FBbfil\egroup\color@endbox
>> +  \let\@currbox\float@box}
>> +\@ifdefinable\FBiffloatrow{\let\FBiffloatrow\@secondoftwo}
>> +\newcounter{FRobj}
>> +\newcounter{FRsobj}
>> +\newlength\Xhsize
>> +\newlength\sXhsize
>> +\newlength\Zhsize
>> +\newlength\sZhsize
>> +\newcommand\flrow@to{to\hsize}
>> +\newcommand\flrow@boxset[1]{#1}
>> +\newcommand\flrow@setrowhbox{%
>> +\FR@ifROWFILL{\def\flrow@left{\hskip\leftskip}\def\flrow@right{\hskip\rightskip}%
>> +  }{\let\flrow@to\empty\def\flrow@left{}\def\flrow@right{}}%
>> +}
>> +\newcommand\flrow@left{}\newcommand\flrow@right{}
>> +\newcommand\flrow@hbox@bgroup{\hbox\flrow@to
>> +    \bgroup\flrow@left}
>> +\newcommand\flrow@hbox@egroup{\flrow@right
>> +    \egroup}
>> +\newbox\flrow@rowbox
>> +\newcommand\floatrow[1][2]{\c@FRobj=#1\relax
>> +  \ifcase\floatbox@depth
>> +    \flrow@setlist*{{floatrow}{\@captype row}}%
>> +  \or
>> +    \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
>> +    \flrow@settype{subfloatrow}\flrow@settype{sub\@captype row}%
>> +    \ifx\flrow@to\empty\def\flrow@boxset##1{}\fi
>> +  \fi%
>> +  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
>> +  \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
>> +  \if@tempswa\FB@readaux{\relax}\fi
>> +  \flrow@boxset{\ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\else\hsize\FBB@wd\fi}%
>> +  \ifnum\floatbox@depth=\z@\vspace\FBaskip\else\leavevmode\fi
>> +  \hbox\flrow@to\bgroup%outer h box
>> +  \FRleftmargin
>> +  \flrow@boxset{\hsize\FBB@wd
>> +     \settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}\advance\hsize-\@tempdima}%
>> +  \bgroup\ifx\FR@frame\empty\else\def\FB@frame{}\def\FB@wadj{}\def\FB@hadj{}\fi%frame set
>> +  \flrow@boxset{\adj@dim\hsize-\FR@wadj=\hsize}%
>> +  \setbox\flrow@rowbox\vbox\bgroup%v box
>> +        \@@FRabove
>> +    \flrow@setrowhbox
>> +    \flrow@hbox@bgroup\let\FBiffloatrow\@firstoftwo
>> +      \Xhsize\hsize\count@#1\advance\count@\m@ne
>> +      \settowidth\@tempdima{\floatrowsep}\advance\Xhsize-\count@\@tempdima
>> +      \@tempdimb\Xhsize
>> +      \FR@iftwolevel
>> +        {\ifnum\floatbox@depth=\z@\Zhsize\Xhsize\else
>> +            \ifdim\Zhsize=\z@\Zhsize\Xhsize\sZhsize\Xhsize\fi
>> +            \FR@ifcountH{\global\advance\Zhsize-\count@\@tempdima}\relax
>> +         \fi}{\@tempdimb\Xhsize\Zhsize\Xhsize}%
>> +      \divide\@tempdimb#1\relax\FB@wd\@tempdimb
>> +      \hsize\@tempdimb\ignorespaces}
>> +\def\endfloatrow{\ifdim\lastskip>\z@\unskip\fi
>> +      \flrow@hbox@egroup%h box
>> +    \@@FRbelow
>> +    \egroup%v box
>> +    \FR@frame{\box\flrow@rowbox}%
>> +    \egroup%frame set
>> +    \FRrightmargin\egroup%outer h box
>> +    \ifnum\floatbox@depth=\z@\vspace\FBbskip\fi
>> +  \gdef\FBaskip{\z@}\gdef\FBbskip{\z@}%
>> +  \global\FBf@max\z@\global\FBo@max\z@\global\FBc@max\z@
>> +  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
>> +\newenvironment{subfloatrow}{\capsubrowsettings
>> +    \captionsetup{subtype}\@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
>> +\newcommand\capsubrowsettings{\caption@setoptions{subfloatrow}\caption@setoptions{sub\@captype row}}
>> +\newenvironment{subfloatrow*}[1][2]{\let\flrow@to\empty
>> +    \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
>> +    \FR@ifunloc{\let\FR@ifcountH\@firstoftwo}\let\c@FRobj\c@FRsobj
>> +    \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
>> +    \floatrow[#1]\killfloatstyle}{\ifdim\lastskip>\z@\unskip\fi
>> +     \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
>> +\newcommand\subfloatrowsep{\hskip\columnsep}
>> +\@ifdefinable\FR@ifcountH{\let\FR@ifcountH\@firstoftwo}
>> +\@ifdefinable\FR@ifunloc{\let\FR@ifunloc\@firstofone}
>> +\@ifdefinable\FR@iftwolevel{\let\FR@iftwolevel\@secondoftwo}
>> +\newcommand\CommonHeightRow{\@ifstar
>> +    {\let\FR@iftwolevel\@firstoftwo\CommonHeightRow@
>> +   }{\let\FR@iftwolevel\@secondoftwo\CommonHeightRow@}}
>> +\newcommand\DefaultCommonHeight{25pt}
>> +\newcommand\CommonHeight{\DefaultCommonHeight}
>> +\newcommand\CommonHeightRow@[2][\DefaultCommonHeight]{\def\CommonHeight{#1}\setbox\z@
>> +    \hbox{\FR@loc@\let\FR@ifunloc\@firstofone#2}%
>> +    \ifcase\floatbox@depth\def\@tempa{\Xhsize}\def\@tempb{\Zhsize}\or
>> +        \def\@tempa{\sXhsize}\def\@tempb{\Zhsize}\fi
>> +    \FR@calc@CommonHeight#2}
>> +\@ifdefinable\FR@Zunitlength{\newdimen\FR@Zunitlength}
>> +\newcommand\FR@calc@CommonHeight{%
>> +    \@tempdima\@tempb\advance\@tempdima-\@tempa
>> +    \count@\@tempdima\relax\divide\count@16384\relax
>> +    \divide\@tempb\count@\relax\FR@Zunitlength\@tempb\relax
>> +    \@tempdima\CommonHeight\relax
>> +    \count@\@tempdima\relax\divide\count@16384\relax
>> +    \@tempdima\count@\FR@Zunitlength\relax
>> +    \edef\CommonHeight{\the\@tempdima}}
>> +\newcommand\begin@FBBOX{\vbox\bgroup}
>> +\def\end@FBBOX{\egroup}
>> +\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse
>> +  \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip\z@}%
>> +             {\vskip\z@\egroup$\egroup}}
>> +\newcommand\TopFloatBoxes{\CADJfalse\OADJfalse
>> +  \buildFBBOX{\vtop\bgroup\vskip\z@}{\egroup}}
>> +\newcommand\BottomFloatBoxes{\CADJfalse\OADJfalse
>> +  \buildFBBOX{\vbox\bgroup}{\vskip\z@\egroup}}
>> +\newcommand\PlainFloatBoxes{%
>> +  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
>> +\newcommand\buildFBBOX[2]{\gdef\begin@FBBOX{#1}\gdef\end@FBBOX{#2}}
>> +\def\newdimentocommand  #1#2#3{%
>> +    #1\@tempdima{#3}\@ifdefinable#2{\xdef#2{\the\@tempdima}}}
>> +\def\renewdimentocommand#1#2#3{%
>> +    #1\@tempdima{#3}\xdef#2{\the\@tempdima}}
>> +\def\newskiptocommand   #1#2#3{%
>> +    #1\@tempskipa{#3}\@ifdefinable#2{\xdef#2{\the\@tempskipa}}}
>> +\def\renewskiptocommand #1#2#3{%
>> +    #1\@tempskipa{#3}\xdef#2{\the\@tempskipa}}
>> +\def\newlengthtocommand{\newskiptocommand}
>> +\def\renewlengthtocommand{\renewskiptocommand}
>> +\newcommand*\flrow@setbool[1]{%
>> +  \expandafter\caption@set@bool\csname FR@if#1\endcsname}
>> +\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}}}
>> +\newcommand\thisfloatsetup{\floatsetup[tmpset]}
>> +\def\flrow@setup{\caption@setkeys[floatrow]{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}}}%
>> +\newcommand\flrow@setlist{\@ifstar\flrow@setlist@@\flrow@setlist@}
>> +\newcommand\flrow@setlist@[1]{\@flrow@setlist#1{tmpset};%
>> +  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
>> +  \caption@setposition{\FBifcaptop tb}}
>> +\newcommand\flrow@setlist@@[1]{\@flrow@setlist#1;%
>> +  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
>> +  \caption@setposition{\FBifcaptop tb}}
>> +\newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble
>> +  \@flrow@setlist}
>> +\@ifundefined{caption@setoptions}{\let\caption@setoptions\caption@settype}{}
>> +\newcommand\@cap@setlist[1]{\caption@setoptions{#1}%
>> +   \@ifnextchar;{\let\caption@setfloattype\@gobble\@gobble}\@cap@setlist}
>> +\newcommand\flrow@FClist{\flrow@setlist
>> +  {{floatbeside}{capbesidefloat}{\@captype beside}{capbeside\@captype}}}
>> +\newcommand*\clearfloatsetup[1]{\@nameundef{flrow@typ@#1}}
>> +\newcommand\DeclareFROpt{%
>> +  \@ifstar{\flrow@declopt\AtEndOfPackage}
>> +          {\flrow@declopt\@gobble}}
>> +\newcommand*\flrow@declopt[2]{%
>> +  #1{\undefine@key{floatrow}{#2}}\define@key{floatrow}{#2}}
>> +\@onlypreamble\DeclareFROpt
>> +\@onlypreamble\flrow@declopt
>> +\@ifdefinable\FR@ifrawfloats{\let\FR@ifrawfloats\@secondoftwo}
>> +\DeclareFROpt*{rawfloats}[0]{\flrow@setbool{rawfloats}{#1}}
>> +\@ifdefinable\FR@ifdoubleaswide{\let\FR@ifdoubleaswide\@secondoftwo}
>> +\DeclareFROpt{doublefloataswide}[0]{\flrow@setbool{doubleaswide}{#1}}
>> +\@ifdefinable\FR@iffloatHaslist{\let\FR@iffloatHaslist\@secondoftwo}
>> +\DeclareFROpt{floatHaslist}[0]{\flrow@setbool{floatHaslist}{#1}}
>> +\newcommand*\DeclareFloatStyle[2]{%
>> +  \global\@namedef{flrow@sty@#1}{#2}}
>> +\@onlypreamble\DeclareFloatStyle
>> +\newcommand*\flrow@setstyle[1]{%
>> +  \@ifundefined{flrow@sty@#1}%
>> +    {\flrow@error{Undefined float style `#1'}}%
>> +    {\FBstyle@reset
>> +     \def\flrow@capsetup{%
>> +        \@ifundefined{caption@sty@#1}{}{\caption@setstyle*{#1}}%
>> +        \caption@setoptions {#1}}%
>> +     \flrow@esetup{\csname flrow@sty@#1\endcsname}}}
>> +\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}
>> +\DeclareFloatStyle{default}{%
>> +     style=plain,captionskip=10pt,
>> +     margins=centering,objectset=centering,
>> +     capbesideposition=left,facing=no,
>> +     floatrowsep=columnsep,capbesidesep=columnsep,
>> +     font=default,footfont=footnotesize}
>> +\DeclareFROpt{style}{\flrow@setstyle{#1}}
>> +\@ifdefinable\FR@ifCST{\let\FR@ifCST\@firstoftwo}
>> +\DeclareFROpt{relatedcapstyle}[0]{\flrow@setbool{CST}{#1}}
>> +\DeclareFROpt{font}{\flrow@setfont{font}{#1}}
>> +\DeclareFROpt{footfont}{\captionsetup[floatfoot]{font={#1}}}
>> +\DeclareCaptionOption{footfont}{\caption@setfont{footfont}{#1}}
>> +\@ifdefinable\floatfont{\let\floatfont\empty}
>> +\newcommand*\captionfootfont{\normalfont\footnotesize}
>> +\let\DeclareFloatFont\DeclareCaptionFont
>> +\@onlypreamble\DeclareFloatFont
>> +\newcommand*\flrow@setfont[2]{%
>> +   \caption@setfont{@tempa}{#2}%
>> +   \expandafter\let\csname float#1\endcsname\caption@tempa}
>> +\DeclareFROpt{capposition}{\flrow@cappos{#1}}
>> +\DeclareFROpt{position}{\flrow@cappos{#1}}
>> +\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
>> +  }{\flrow@error{Undefined caption position `#1'}%
>> +  }}}}}
>> +\@ifdefinable\FBifcaptop{\let\FBifcaptop\@secondoftwo}
>> +\newcommand\captop{\let\FBifcaptop\@firstoftwo}
>> +\newcommand\capbot{\let\FBifcaptop\@secondoftwo}
>> +\@ifdefinable\FBifCAPTOP{\let\FBifCAPTOP\@secondoftwo}
>> +\newcommand\CAPTOP{\captop\let\FBifCAPTOP\@firstoftwo\CADJtrue}
>> +\@ifdefinable\FBifcapbeside{}\let\FBifcapbeside\@secondoftwo
>> +\newcommand\capbeside{\let\FBifcapbeside\@firstoftwo}
>> +\newcommand\nocapbeside{\let\FBifcapbeside\@secondoftwo}
>> +\DeclareFROpt{capbesideframe}[0]{\flrow@setbool{FCBOX}{#1}}
>> +\DeclareFROpt{capbesidewidth}[1]{\flrow@FCc@wd{#1}}
>> +\@ifdefinable\FC@ifc@wd{\let\FC@ifc@wd\@secondoftwo}
>> +\newcommand\useFCwidth{\let\FC@ifc@wd\@firstoftwo\let\FCwidth\relax}
>> +\@ifdefinable\FCwidth{\let\FCwidth\relax}
>> +\newcommand\flrow@FCc@wd[1]{%
>> +  \caption@ifinlist{#1}{none,sidefil}{\let\FC@ifc@wd\@secondoftwo
>> +  }{\useFCwidth\def\FCwidth{#1}}}
>> +\DeclareFROpt{capbesideposition}{\flrow@scpos{#1}}
>> +\newcommand\DeclareSCPos[2]{%
>> +  \define@key{flrow@scpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
>> +\newcommand*\flrow@scpos[1]{%
>> +  \let\FR@tmp\@empty
>> +  \begingroup\caption@setkeys[floatrow]{flrow@scpos}{#1}\endgroup
>> +  \FR@tmp}
>> +\@onlypreamble\DeclareSCPos
>> +\DeclareSCPos{left}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}}
>> +\DeclareSCPos{right}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\z@}}
>> +\DeclareSCPos{inside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
>> +    \count@\c@FBcnt\ifnum\count@=\z@\count@\@ne\fi
>> +  }}
>> +\DeclareSCPos{outside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
>> +    \count@\c@FBcnt\ifnum\count@=\z@\else\advance\count@\@ne\fi
>> +  }}
>> +\DeclareSCPos{center}{\def\@FC@vpos{\count@\z@}}
>> +\DeclareSCPos{top}{\def\@FC@vpos{\count@\@ne}}
>> +\DeclareSCPos{bottom}{\def\@FC@vpos{\count@\tw@}}
>> +\newcommand*\@FC@vpos{\count@\tw@}
>> +\newcommand*\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}
>> +\newcounter{FBcnt}
>> +\DeclareFROpt{footposition}{\flrow@ftpos{#1}}
>> +\newcommand\DeclareFtPos[2]{%
>> +  \define@key{flrow@ftpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
>> +\newcommand*\flrow@ftpos[1]{%
>> +  \let\FR@tmp\@empty
>> +  \begingroup\caption@setkeys[floatrow]{flrow@ftpos}{#1}\endgroup
>> +  \FR@tmp}
>> +\@onlypreamble\DeclareFtPos
>> +\@ifdefinable\FPOScnt{\newcount\FPOScnt}
>> +\DeclareFtPos{caption}{\FPOScnt1\relax}
>> +\DeclareFtPos{bottom}{\FPOScnt2\relax}
>> +\DeclareFtPos{default}{\FPOScnt0\relax}
>> +\DeclareFROpt{heightadjust}{\flrow@htadj{#1}}
>> +\newcommand\DeclareHtAdj[2]{%
>> +  \define@key{flrow@htadj}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
>> +\newcommand*\flrow@htadj[1]{\let\FR@tmp\@empty
>> +  \begingroup\caption@setkeys[floatrow]{flrow@htadj}{#1}\endgroup
>> +  \FR@tmp}
>> +\@onlypreamble\DeclareHtAdj
>> +\DeclareHtAdj{all}{\CADJtrue\OADJtrue}
>> +\DeclareHtAdj{caption}{\CADJtrue}
>> +\DeclareHtAdj{object}{\OADJtrue}
>> +\DeclareHtAdj{none}{\CADJfalse\OADJfalse}
>> +\DeclareHtAdj{nocaption}{\CADJfalse}
>> +\DeclareHtAdj{noobject}{\OADJfalse}
>> +\newif\ifCADJ
>> +\newif\ifOADJ
>> +\DeclareFROpt{valign}{\@FB@vpos{#1}}
>> +\newcommand\@FB@vpos[1]{%
>> +  \if#1t\def\FBafil{}\def\FBbfil{\vss}\else
>> +     \if#1b\def\FBafil{\vss}\def\FBbfil{}\else
>> +        \if#1c\def\FBafil{\vskip0ptplus1fillminus1000pt}%
>> +              \def\FBbfil{\vskip0ptplus1fillminus1000pt}\else
>> +           \if#1s\def\FBafil{\vskip0ptminus1000pt}%
>> +                 \def\FBbfil{\vskip0ptminus1000pt}%
>> +  \fi\fi\fi\fi}
>> +\@ifdefinable\FR@iffacing{\let\FR@iffacing\@secondoftwo}
>> +\DeclareFROpt{facing}[1]{\flrow@setbool{facing}{#1}}
>> +\newcommand\FB@facing{}
>> +\DeclareFROpt{margins}{\flrow@FBAlign{#1}}
>> +\newcommand*\flrow@FBAlign[1]{%
>> +  \@ifundefined{flrow@mj@#1}%
>> +    {\flrow@error{Undefined float alignment `#1'}}%
>> +    {\@nameuse{flrow@mj@#1}}}
>> +\newcommand*\DeclareMarginSet[2]{%
>> +  \global\@namedef{flrow@mj@#1}{#2}}
>> +\@onlypreamble\DeclareMarginSet
>> +\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@}
>> +\newskip\LTleft\newskip\LTright
>> +\DeclareMarginSet{hangleft}{\setfloatmargins
>> +    {\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
>> +  \LTleft-\marginparwidth\advance\LTleft-\marginparsep
>> +  \LTright=\fill}
>> +\DeclareMarginSet{hangright}{\setfloatmargins
>> +    {\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
>> +  \LTleft=\fill
>> +  \LTright-\marginparwidth\advance\LTright-\marginparsep}
>> +\DeclareMarginSet{hanginside}{\setfloatmargins
>> +    *{\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
>> +  }
>> +\DeclareMarginSet{hangoutside}{\setfloatmargins
>> +    *{\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
>> +  }
>> +\newcommand\flrow@mj@default{\flrow@mj@centering}
>> +\newcommand\floatfacing{\@ifstar
>> +  {\@FC@hpos\floatfacing@}{\FB@facing\floatfacing@}}
>> +\newcommand\floatfacing@[2]{\ifodd\count@#1\else#2\fi}
>> +\newcommand\floatboxmargins{\def\FR@tmp{FB}\FB@mset}
>> +\newcommand\floatrowmargins{\def\FR@tmp{FR}\FB@mset}
>> +\newcommand\floatcapbesidemargins{\def\FR@tmp{FC}\FB@mset}
>> +\newcommand\FB@mset{\@ifstar{\FB@mset@}{\FB@@mset}}
>> +\newcommand\FB@mset@[2]{%
>> +  \def\FB@facing{\let\FR@iffacing\@firstoftwo\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}}
>> +\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}}
>> +\setfloatmargins\hfill\hfill
>> +\DeclareFROpt{objectset}{\flrow@FBoAlign{#1}}
>> +\DeclareFROpt{justification}{\flrow@FBoAlign{#1}}
>> +\let\DeclareObjectSet\DeclareCaptionJustification
>> +\@onlypreamble\DeclareObjectSet
>> +\newcommand*\flrow@FBoAlign[1]{%
>> +  \@ifundefined{caption@hj@#1}%
>> +    {\flrow@error{Undefined object setting `#1'}}%
>> +    {\expandafter\let\expandafter\floatobjectset
>> +     \csname caption@hj@#1\endcsname}}
>> +\newcommand*\floatobjectset{\centering}
>> +\DeclareFROpt{floatwidth}{\flrow@FBo@wd{#1}}
>> +\@ifdefinable\FC@ifo@fil{\let\FC@ifo@fil\@secondoftwo}
>> +\newcommand\filFCOhsize{\let\FC@ifo@fil\@firstoftwo}
>> +\newcommand\nofilFCOhsize{\let\FC@ifo@fil\@secondoftwo}
>> +\newcommand\flrow@setwd{\relax}
>> +\newcommand\flrow@FBo@wd[1]{%
>> +  \caption@ifinlist{#1}{none,sidefil}{\filFCOhsize
>> +  }{\nofilFCOhsize\def\flrow@setwd{\@tempdima=#1}}}
>> +\DeclareFROpt{floatrowsep}{\flrow@setFRsep\floatrowsep{#1}}
>> +\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}}
>> +\DeclareFROpt{capbesidesep}{\flrow@setFRsep\floatcapbesidesep{#1}}
>> +\let\DeclareFloatSeparators\DeclareCaptionLabelSeparator
>> +\@onlypreamble\DeclareFloatSeparators
>> +\newcommand*\flrow@setFRsep[2]{%
>> +  \@ifundefined{caption@lsep@#2}%
>> +    {\flrow@error{Undefined float separator `#2'}}%
>> +    {\expandafter\let\expandafter#1\csname caption@lsep@#2\endcsname}}
>> +\DeclareFloatSeparators{columnsep}{\hskip\columnsep}
>> +\DeclareFloatSeparators{qquad}{\qquad}
>> +\DeclareFloatSeparators{fil}{\hskip\columnsep plus1fil}
>> +\DeclareFloatSeparators{fill}{\hskip\columnsep plus1fill}
>> +\newcommand\floatrowsep{\hskip\columnsep}
>> +\newcommand\floatcapbesidesep{\hskip\columnsep}
>> +\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}}
>> +\newcommand\DeclareFloatVCode[2]{\@namedef{flrow@FBr@#1}{#2}}
>> +\@onlypreamble\DeclareFloatVCode
>> +\newcommand*\flrow@FBrule[3]{%
>> +  \@ifundefined{flrow@FBr@#3}%
>> +    {\flrow@error{Undefined rule `#3'}}%
>> +    {\let#1\empty
>> +     \expandafter\let\expandafter#2\csname flrow@FBr@#3\endcsname}}
>> +\newcommand*\flrow@FRrule[3]{%
>> +  \@ifundefined{flrow@FBr@#3}%
>> +    {\flrow@error{Undefined rule `#3'}}%
>> +    {\def#2{\FBiffloatrow\relax{\@nameuse{flrow@FBr@#3}}}%
>> +     \expandafter\let\expandafter#1\csname flrow@FBr@#3\endcsname}}
>> +\newcommand*\flrow@FBskip[1]{%
>> +  \@ifundefined{flrow@FBr@#1}%
>> +    {\flrow@error{Undefined rule `#1'}}%
>> +    {\expandafter\let\expandafter\@@FBskip\csname flrow@FBr@#1\endcsname}}
>> +\DeclareFloatVCode{none}{}
>> +\DeclareFloatVCode{thickrule}{\par\rule{\hsize}{.8pt}\vskip2pt\par}
>> +\DeclareFloatVCode{rule}{\vskip2pt\hrule\vskip2pt}
>> +\DeclareFloatVCode{lowrule}{\par\vskip2pt\rule\hsize\@wholewidth\par}
>> +\DeclareFloatVCode{captionskip}{\vskip\captionskip}
>> +\newcommand\FBstyle@reset{\let\FRifFBOX\@secondoftwo\OADJfalse\CADJfalse\capbot
>> +  \def\@@FBskip{\vskip\captionskip}\def\@@FRabove{}\def\@@FRbelow{}%
>> +  \def\@@FBabove{}\def\@@FBbelow{}%
>> +  \def\FB@Bset{}\def\FB@frame{}\def\FBo@frame{}\def\FR@frame{}%
>> +  \def\FBo@wadj{}\def\FBo@hadj{}\def\FB@wadj{}\def\FB@hadj{}\def\FR@wadj{}\def\FR@hadj{}}
>> +\newcommand\@@FBskip{\vskip\captionskip}
>> +\@ifdefinable\@@FRabove{\def\@@FRabove{}}
>> +\@ifdefinable\@@FRbelow{\def\@@FRbelow{}}
>> +\@ifdefinable\@@FBabove{\def\@@FBabove{}}
>> +\@ifdefinable\@@FBbelow{\def\@@FBbelow{}}
>> +\@ifdefinable\FB@frame {\def\FB@frame {}}
>> +\@ifdefinable\FBo@frame{\def\FBo@frame{}}
>> +\@ifdefinable\FR@frame {\def\FR@frame {}}
>> +\@ifdefinable\FBo@wadj {\def\FBo@wadj {}}
>> +\@ifdefinable\FBo@hadj {\def\FBo@hadj {}}
>> +\@ifdefinable\FB@wadj  {\def\FB@wadj  {}}
>> +\@ifdefinable\FB@hadj  {\def\FB@hadj  {}}
>> +\@ifdefinable\FR@wadj  {\def\FR@wadj  {}}
>> +\@ifdefinable\FR@hadj  {\def\FR@hadj  {}}
>> +\@ifdefinable\FB@Bset  {\def\FB@Bset  {}}
>> +\DeclareFROpt{framestyle}{\@ifundefined{FB@#1@frame}%
>> +  {\let\FRifFBOX\@secondoftwo}{\let\FRifFBOX\@firstoftwo\def\FB@B@{#1}}}
>> +\DeclareFROpt{framearound}{\flrow@fr@round{#1}}
>> +\newcommand*\flrow@fr@round[1]{%
>> + \caption@ifinlist{#1}{object,contents}{\let\FRifFBOX\@firstoftwo
>> +    \def\FB@BO@{FBo}%
>> +  }{\caption@ifinlist{#1}{floatbox,all}{\let\FRifFBOX\@firstoftwo
>> +    \def\FB@BO@{FB}%
>> +  }{\caption@ifinlist{#1}{row}{\let\FRifFBOX\@firstoftwo
>> +    \def\FB@BO@{FR}%
>> +  }{\caption@ifinlist{#1}{none}{\let\FRifFBOX\@secondoftwo
>> +  }{\flrow@error{Undefined framed object `#1'}%
>> +  }}}}}
>> +\@ifdefinable\FR@ifFIT{\let\FR@ifFIT\@secondoftwo}
>> +\@ifdefinable\FR@ifROWFILL{\let\FR@ifROWFILL\@secondoftwo}
>> +\DeclareFROpt{framefit}[0]{\flrow@setbool{FIT}{#1}}
>> +\@ifdefinable\flrow@@setROWFILL{}
>> +\@ifdefinable\flrow@leftfill{}\@ifdefinable\flrow@rightfill{}
>> +\DeclareFROpt{rowfill}[0]{\flrow@setbool{ROWFILL}{#1}}
>> +\DeclareFROpt{frameset}{\def\FB@Bset{#1}}
>> +\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}{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
>> +    \@nameuse{FB@\FB@B@ @adj}}\relax}%
>> +  \@namedef{\FB@BO@ @frame}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
>> +    \@nameuse{FB@\FB@B@ @frame}}%
>> +  \ifx\FR@frame\empty\else%\ifx\FB@frame\empty
>> +     \def\FB@hadj{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
>> +       \@nameuse{FB@\FB@B@ @adj}}%
>> +     \def\FB@wadj{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
>> +       \@nameuse{FB@\FB@B@ @adj}}\relax}%
>> +     \def\FB@frame{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
>> +       \@nameuse{FB@\FB@B@ @frame}}%
>> +  \fi%\fi
>> +  }
>> +\@ifdefinable\FRifFBOX{\let\FRifFBOX\@secondoftwo}
>> +\newcommand\FB@fbox@frame[1]{\hbox{%
>> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\fbox{#1}%
>> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
>> +\newcommand\FB@fbox@adj{\dimen@=2\fboxsep\advance\dimen@2\fboxrule}
>> +\newcommand\FB@fbox@reset{\fboxsep3\p@\fboxrule.4\p@}
>> +\newcommand\FB@colorbox@frame[1]{\hbox{%
>> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
>> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
>> +\@ifdefinable\FB@colorbox@adj{\let\FB@colorbox@adj\FB@fbox@adj}
>> +\newcommand\FB@colorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
>> +\newcommand\FB@fcolorbox{\fbox}
>> +\newcommand\FB@fcolorcorners{}
>> +\@ifdefinable\FR@phantom{}\@ifdefinable\FRset@color{}
>> +\newcommand\FB@FRcolorbox@frame[1]{\hbox{\let\color@block\FRcolor@block
>> +  \let\FR@phantom\@firstofone\let\FRset@color\set@color\FB@fcolorcorners
>> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
>> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
>> +\@ifdefinable\FB@FRcolorbox@adj{\let\FB@FRcolorbox@adj\FB@fbox@adj}
>> +\newcommand\FB@FRcolorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
>> +\newcommand\FB@corners@frame[1]{\hbox{\let\color@block\FRcolor@block
>> +  \let\FR@phantom\phantom\let\FRset@color\relax\FB@fcolorcorners
>> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\colorbox{white}{#1}%
>> +  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
>> +\@ifdefinable\FB@corners@adj{\let\FB@corners@adj\FB@fbox@adj}
>> +\newcommand\FB@corners@reset{\fboxsep3\p@\fboxrule\z@}
>> +\newcommand\flrow@l@color@side[2]{{\let\unitlength\relax
>> +    \picture(\z@,\z@)(\z@,\z@)
>> +    \put(\z@,#1){{\flrow@ll@col@put}}
>> +    \put(\z@,#2){{\flrow@ul@col@put}}
>> +    \endpicture}}
>> +\newcommand\flrow@r@color@side[2]{{\let\unitlength\relax
>> +    \picture(\z@,\z@)(\z@,\z@)
>> +    \put(\z@,#1){{\flrow@lr@col@put}}
>> +    \put(\z@,#2){{\flrow@ur@col@put}}
>> +    \endpicture}}
>> +\newcommand\flrow@ll@col@put{}
>> +\newcommand\flrow@ul@col@put{}
>> +\newcommand\flrow@lr@col@put{}
>> +\newcommand\flrow@ur@col@put{}
>> +\newcommand\flrow@cboxcorners[4]{%
>> +    \def\flrow@ll@col@put{#1}%
>> +    \def\flrow@lr@col@put{#2}%
>> +    \def\flrow@ur@col@put{#3}%
>> +    \def\flrow@ul@col@put{#4}%
>> +    }
>> +\newcommand\FRcolorboxwd{\z@}
>> +\newcommand\FRcolorboxht{\z@}
>> +\newcommand\FRcolorboxdp{\z@}
>> +\def\FRcolor@block#1#2#3{%
>> +  {\FRset@color
>> +   \rlap{\@tempdima#1\edef\FRcolorboxwd{\the\@tempdima}\@tempdima#2\advance\@tempdima#3%
>> +   \edef\FRcolorboxht{\the\@tempdima}\@tempdima#3\edef\FRcolorboxdp{\the\@tempdima}%
>> +   \ifcolors@\else\let\FR@phantom\phantom\fi
>> +     \flrow@l@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
>> +     \FR@phantom{\vrule\@width#1\@height#2\@depth#3}%
>> +     \flrow@r@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
>> +    }}}
>> +\DeclareFROpt{colorframeset}{\flrow@fcolorbox{#1}}
>> +\DeclareFROpt{colorframecorners}{\flrow@fcolorcorners{#1}}
>> +\newcommand*\flrow@fcolorbox[1]{%
>> +  \@ifundefined{flrow@fcolorbox@#1}%
>> +    {\flrow@error{Undefined color box `#1'}}%
>> +    {\expandafter\let\expandafter\FB@fcolorbox
>> +     \csname flrow@fcolorbox@#1\endcsname}}
>> +\newcommand*\flrow@fcolorcorners[1]{%
>> +  \@ifundefined{flrow@fcolorcorners@#1}%
>> +    {\flrow@error{Undefined color box corners `#1'}}%
>> +    {\expandafter\let\expandafter\FB@fcolorcorners
>> +     \csname flrow@fcolorcorners@#1\endcsname}}
>> +\newcommand*\DeclareColorBox[2]{%
>> +  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
>> +   \long\@namedef{flrow@fcolorbox@#1}{#2}}}
>> +\newcommand*\DeclareCBoxCorners[5]{%
>> +  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
>> +   \long\@namedef{flrow@fcolorcorners@#1}{\flrow@cboxcorners{#2}{#3}{#4}{#5}}}}
>> +\@onlypreamble\DeclareColorBox
>> +\@onlypreamble\DeclareCBoxCorners
>> +\newcommand\flrow@load@colorpackage{\IfFileExists{color.sty}%
>> +    {\def\next{\RequirePackage{color}}}{\let\next\relax}\next}
>> +\AtBeginDocument{\flrow@load@colorpackage\let\flrow@load@colorpackage\relax}
>> +\DeclareFROpt{captionskip}{\def\captionskip{#1}%
>> +  \setlength\abovecaptionskip{#1}}
>> +\DeclareFROpt{footskip}{\def\floatfootskip{#1}}
>> +\newcommand\captionskip{10\p@}
>> +\newcommand\floatfootskip{\skip\@mpfootins}
>> +\DeclareFROpt{footnoterule}{\flrow@footrule{#1}}
>> +\newcommand\DeclareFloatFootnoterule[2]{%
>> +  \long\@namedef{flrow@fnrule@#1}{#2}}
>> +\newcommand*\flrow@footrule[1]{%
>> +  \@ifundefined{flrow@fnrule@#1}%
>> +    {\flrow@error{Undefined footnoterule `#1'}}%
>> +    {\let\@@FRabove\empty
>> +     \expandafter\let\expandafter\FBfootnoterule\csname
>> +       flrow@fnrule@#1\endcsname}}
>> +\@onlypreamble\DeclareFloatFootnoterule
>> +\DeclareFloatFootnoterule{normal}{\kern-3\p@
>> +  \@tempdima.4\columnwidth
>> +  \hrule\@width\@tempdima\kern2.6\p@}
>> +\DeclareFloatFootnoterule{limited}{\kern-3\p@
>> +  \@tempdima.4\columnwidth
>> +  \ifdim\@tempdima>\frulemax\@tempdima=\frulemax\fi
>> +  \hrule\@width\@tempdima\kern2.6\p@}
>> +\newcommand\frulemax{1in}
>> +\DeclareFloatFootnoterule{fullsize}{\kern-3\p@
>> +  \hrule\@width\hsize\kern2.6\p@}
>> +\DeclareFloatFootnoterule{none}{}
>> +\@ifdefinable\FBfootnoterule{\let\FBfootnoterule\footnoterule}
>> +\@ifdefinable\FR@iffancy{\let\FR@iffancy\@secondoftwo}
>> +\DeclareFROpt{fancyboxes}{\flrow@setbool{fancy}{#1}}
>> +\newcommand\DeclareFNOpt{%
>> +   \@ifstar{\flrow@declfnopt\AtBeginDocument}
>> +           {\flrow@declfnopt\@gobble}}
>> +\newcommand*\flrow@declfnopt[2]{%
>> +   #1{\undefine@key{newfloat}{#2}}\define@key{newfloat}{#2}}
>> +\@onlypreamble\DeclareFNOpt
>> +\@ifdefinable\flrow@types{\newtoks\flrow@types}
>> +\newcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
>> +  \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
>> +  \addtocounter{float@type}{\value{float@type}}%
>> +  \@namedef{#1name}{#1}\newcounter{#1}%
>> +  \expandafter\edef\csname fnum@#1\endcsname
>> +    {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
>> +       \expandafter\noexpand\csname the#1\endcsname}%
>> +  \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
>> +  \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
>> +  \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
>> +  \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
>> +  \@tempa}
>> +\@onlypreamble\DeclareNewFloatType
>> +\DeclareFNOpt*{placement}{\flnew@fps{#1}}
>> +\newcommand\flnew@fps[1]{\@namedef{fps@\FB@captype}{#1}}
>> +\@onlypreamble\flnew@fps
>> +\DeclareFNOpt*{name}{\flnew@fname{#1}}
>> +\newcommand\flnew@fname[1]{\@namedef{\FB@captype name}{#1}}
>> +\@onlypreamble\flnew@fname
>> +\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
>> +\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
>> +\def\ProcessOptionsWithKV#1{%
>> +  \let\@tempc\relax
>> +  \let\FR@tmp\@empty
>> +  \@for\CurrentOption:=\@classoptionslist\do{%
>> +    \@ifundefined{KV@#1@\CurrentOption}%
>> +    {}%
>> +    {%
>> +      \@ifundefined{KV@#1@\CurrentOption @default}{%
>> +       \PackageInfo{#1}{Global option `\CurrentOption' ignored}%
>> +      }{%
>> +      \PackageInfo{#1}{Global option `\CurrentOption' processed}%
>> +      \edef\FR@tmp{\FR@tmp,\CurrentOption,}%
>> +      \@expandtwoargs\@removeelement\CurrentOption
>> +        \@unusedoptionlist\@unusedoptionlist
>> +        }%
>> +    }%
>> +  }%
>> +  \edef\FR@tmp{%
>> +    \noexpand\caption@setkeys[floatrow]{#1}{%
>> +      \FR@tmp\@ptionlist{\@currname.\@currext}%
>> +    }%
>> +  }%
>> +  \FR@tmp
>> +  \let\CurrentOption\@empty
>> +  \AtEndOfPackage{\let\@unprocessedoptions\relax}}
>> +\ProcessOptionsWithKV{floatrow}
>> +\FR@iffancy{\RequirePackage{fr-fancy}}\relax
>> +\let\ProcessOptionsWithKV\undefined
>> +\AtBeginDocument{
>> + \FR@ifrawfloats
>> +  {\let\FR@tmp\flrow@Raw@restyle
>> + }{\flrow@restyle{table}\flrow@restyle{figure}%
>> +   \let\FR@tmp\flrow@restyle
>> +  }\the\flrow@types
>> + \@onlypreamble\flrow@restyle\@onlypreamble\flrow@Raw@restyle
>> + \flrow@types={}}
>> +\AtBeginDocument{%
>> +\@ifundefined{sf@@@subfloat}{\@tempswafalse}{\@tempswatrue}
>> +\if@tempswa\RequirePackage{fr-subfig}\fi}
>> +\AtBeginDocument{%
>> +\@ifundefined{LT@array}{\@tempswafalse}{\@tempswatrue}
>> +\if@tempswa\RequirePackage{fr-longtable}\fi}
>> +\endinput
>> +%%
>> +%% End of file `floatrow.sty'.
>> -- 
>> 2.7.4
>> 
>> 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 03/10] Localize floatrow.sty
  2017-07-31  4:05     ` Akira Yokosawa
@ 2017-07-31  5:01       ` Akira Yokosawa
  2017-07-31 12:45         ` Paul E. McKenney
  0 siblings, 1 reply; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31  5:01 UTC (permalink / raw)
  To: paulmck; +Cc: perfbook, Akira Yokosawa

2017/07/31 13:05、Akira Yokosawa <akiyks@gmail.com> のメッセージ:

> 
> 
> 
> 
> 2017/07/31 12:26、Paul E. McKenney <paulmck@linux.vnet.ibm.com> のメッセージ:
> 
>> On Fri, Jul 28, 2017 at 06:58:07PM +0900, Akira Yokosawa wrote:
>>>> From 53ff86011be07a62dba37a5bef56f04f25531dd1 Mon Sep 17 00:00:00 2001
>>> From: Akira Yokosawa <akiyks@gmail.com>
>>> Date: Thu, 20 Jul 2017 23:34:58 +0900
>>> Subject: [PATCH 03/10] Localize floatrow.sty
>>> 
>>> The "floatrow" package conflicts with two-column layout.
>>> A possible workaround was posted at [1] and it seems to work
>>> in perfbook. Before the change, import the style file as of v0.3b
>>> with trailing white spaces removed.
>>> 
>>> [1] https://tex.stackexchange.com/questions/133127/
>> 
>> If I understand the license correctly, we have to use a different name
>> due to having modified the file.  
> 
> Yes.
> I did the rename in the next commit. By splitting them,
> it would be easier to see the workaround.

Ah, now I see your point.
This patch should have used the renamed file name.
Then the following diff would have been much smaller.

I'll respin later.

Thanks, Akira 
(from mobile, might be QP encoded)

> 
> Or, do we need to keep the trailing blanks at this point?
> 
>> Or has this change (commenting out
>> \textwidth\columnwidth) been applied upstream?
> 
> No, the workaround looks like only a hint.
> Again, two-column layout tend to have little attention.
> 
>> Or does changing the
>> name mean that the fix is ineffective?
> 
> It is effective for perfbook AFAICS.
> 
> Thanks, Akira 
> (from mobile, might be QP encoded)
>> 
>> (I applied the first two, thank you!)
>> 
>>                           Thanx, Paul

[...]

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 03/10] Localize floatrow.sty
  2017-07-31  5:01       ` Akira Yokosawa
@ 2017-07-31 12:45         ` Paul E. McKenney
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. McKenney @ 2017-07-31 12:45 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Mon, Jul 31, 2017 at 02:01:55PM +0900, Akira Yokosawa wrote:
> 2017/07/31 13:05、Akira Yokosawa <akiyks@gmail.com> のメッセージ:
> 
> > 
> > 
> > 
> > 
> > 2017/07/31 12:26、Paul E. McKenney <paulmck@linux.vnet.ibm.com> のメッセージ:
> > 
> >> On Fri, Jul 28, 2017 at 06:58:07PM +0900, Akira Yokosawa wrote:
> >>>> From 53ff86011be07a62dba37a5bef56f04f25531dd1 Mon Sep 17 00:00:00 2001
> >>> From: Akira Yokosawa <akiyks@gmail.com>
> >>> Date: Thu, 20 Jul 2017 23:34:58 +0900
> >>> Subject: [PATCH 03/10] Localize floatrow.sty
> >>> 
> >>> The "floatrow" package conflicts with two-column layout.
> >>> A possible workaround was posted at [1] and it seems to work
> >>> in perfbook. Before the change, import the style file as of v0.3b
> >>> with trailing white spaces removed.
> >>> 
> >>> [1] https://tex.stackexchange.com/questions/133127/
> >> 
> >> If I understand the license correctly, we have to use a different name
> >> due to having modified the file.  
> > 
> > Yes.
> > I did the rename in the next commit. By splitting them,
> > it would be easier to see the workaround.
> 
> Ah, now I see your point.
> This patch should have used the renamed file name.
> Then the following diff would have been much smaller.
> 
> I'll respin later.

Very good, thank you!

							Thanx, Paul

> Thanks, Akira 
> (from mobile, might be QP encoded)
> 
> > 
> > Or, do we need to keep the trailing blanks at this point?
> > 
> >> Or has this change (commenting out
> >> \textwidth\columnwidth) been applied upstream?
> > 
> > No, the workaround looks like only a hint.
> > Again, two-column layout tend to have little attention.
> > 
> >> Or does changing the
> >> name mean that the fix is ineffective?
> > 
> > It is effective for perfbook AFAICS.
> > 
> > Thanks, Akira 
> > (from mobile, might be QP encoded)
> >> 
> >> (I applied the first two, thank you!)
> >> 
> >>                           Thanx, Paul
> 
> [...]--
> To unsubscribe from this list: send the line "unsubscribe perfbook" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v2 0/8] Add style guide
  2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
                   ` (9 preceding siblings ...)
  2017-07-28 10:06 ` [PATCH 10/10] styleguide: Tweak layout of 'Limitation' table Akira Yokosawa
@ 2017-07-31 14:43 ` Akira Yokosawa
  2017-07-31 14:44   ` [PATCH v2 1/8] Localize floatrow.sty as floatrowpf.sty Akira Yokosawa
                     ` (10 more replies)
  10 siblings, 11 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31 14:43 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Mon, 31 Jul 2017 23:20:57 +0900
Subject: [PATCH v2 0/8] Add style guide

Hi Paul,

This is the respin I mentioned earlier.
Patch #2 has a few more changes from v1 to modify strings of package name.
Other than that, the end result should be the same as v1.

Note on the status of the floatrow package:

Current version v0.3b was revised 2009/08/02.
There has been no update since.
I'm not sure if upstreaming is possible.

        Thanks, Akira
--
Akira Yokosawa (8):
  Localize floatrow.sty as floatrowpf.sty
  Apply workaround to floatrowpf.sty
  Define 'listing' environment for style guide
  styleguide: Add listing environment examples
  Disable 'floatrow' layout in manually aligned code snippets
  styleguide: Add example of grouping code snippets
  styleguide: Add example of preferred table layout using 'booktabs'
  styleguide: Tweak layout of 'Limitation' table

 appendix/styleguide/hello.c        |    9 +
 appendix/styleguide/styleguide.tex |  177 ++++-
 defer/rcuusage.tex                 |    6 +-
 floatrowpf.sty                     | 1482 ++++++++++++++++++++++++++++++++++++
 howto/howto.tex                    |    4 +-
 perfbook.tex                       |    4 +
 6 files changed, 1668 insertions(+), 14 deletions(-)
 create mode 100644 appendix/styleguide/hello.c
 create mode 100644 floatrowpf.sty

-- 
2.7.4



^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH v2 1/8] Localize floatrow.sty as floatrowpf.sty
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
@ 2017-07-31 14:44   ` Akira Yokosawa
  2017-07-31 14:46   ` [PATCH v2 2/8] Apply workaround to floatrowpf.sty Akira Yokosawa
                     ` (9 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31 14:44 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From d4ae1407d79c7f4ea498735e26c0df4160876272 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 20 Jul 2017 23:34:58 +0900
Subject: [PATCH v2 1/8] Localize floatrow.sty as floatrowpf.sty

The "floatrow" package conflicts with two-column layout.
A possible workaround was posted at [1] and it seems to work
in perfbook. Before the change, import the style file as of v0.3b
with trailing white spaces removed.

[1] https://tex.stackexchange.com/questions/133127/

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 floatrowpf.sty | 1472 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 1472 insertions(+)
 create mode 100644 floatrowpf.sty

diff --git a/floatrowpf.sty b/floatrowpf.sty
new file mode 100644
index 0000000..18ef28a
--- /dev/null
+++ b/floatrowpf.sty
@@ -0,0 +1,1472 @@
+%%
+%% This is file `floatrow.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% floatrow.dtx  (with options: `floatrow,floatsetup')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from floatrow.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file floatrow.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+\ProvidesPackage{floatrow}
+       [2008/08/02 v0.3b floatrow: float package extension]
+\@ifundefined{float@caption}{%
+  \@ifundefined{rotfloat@float}{}%
+    {\PackageError{floatrow}{Do not use rotfloat package with floatrow.\MessageBreak
+        The latter will be skipped}{}%
+  \@namedef{opt@floatrow.sty}{}\endinput}}%
+  {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak
+        The latter will be skipped}{}%
+  \@namedef{opt@floatrow.sty}{}\endinput}
+\@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)}
+\RequirePackage{keyval}
+\RequirePackage{caption3}
+\@ifpackagelater{caption3}{2007/04/11 v3.0q}{}{\PackageError
+    {floatrow}{For a successful cooperation we need at least\MessageBreak
+    version `2007/04/11 v3.0q' of package caption,\MessageBreak
+        but only version\MessageBreak
+          `\csname ver@caption.\@pkgextension\endcsname'\MessageBreak
+        is available}\@eha\endinput}
+\providecommand*\caption@fnum[1]{%
+   \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}}
+\@ifdefinable\FR@flboxreset{\let\FR@flboxreset\@floatboxreset}
+\@ifdefinable\FR@makecaption{\let\FR@makecaption\@makecaption}
+\newcommand\flrow@caption{%
+   \ifx\@captype\@undefined
+     \@latex@error{\noexpand\caption outside float}\@ehd
+     \expandafter\@gobble
+   \else
+     \refstepcounter\@captype
+     \expandafter\@firstofone
+   \fi
+   {\@dblarg{\@caption\@captype}}%
+}
+\@ifdefinable\float@caption{\let\float@caption\@caption}
+\newcounter{float@type}
+\@ifundefined{c@figure}%
+  {\setcounter{float@type}{1}}%
+  {\setcounter{float@type}{4}}
+\newcommand\flrow@package{floatrow}
+\newcommand*\flrow@error[1]{\PackageError\flrow@package{#1}\flrow@eh}
+\newcommand*\flrow@eh{%
+  If you do not understand this error, please take look\MessageBreak
+  at `floatrow' and `caption' package documentations.\MessageBreak
+  \@ehc}
+\newcommand\floatstyle[1]{\@ifundefined{flrow@sty@#1}%
+  {\flrow@error{Unknown float style `#1'}}{\edef\float@style{#1}}}
+\newcommand\floatname[2]{\@namedef{#1name}{#2}}
+\newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}}
+\newif\if@@FS
+\newcommand\FR@redefs{%
+  \@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}
+\newcommand\flrow@makecaption[2]{\ifnum\floatbox@depth=\z@
+    \ifvoid\@floatcapt
+      \else\flrow@error{Caption(s) lost}\fi\fi
+  \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
+   \linewidth\hsize
+   \ifdim\hsize<70mm\sloppy\fi
+   \normalsize
+   \abovecaptionskip\z@\belowcaptionskip\z@
+   \FR@makecaption{#1}{#2}\egroup}
+\newcommand\killfloatstyle{\FBbuildtrue\if@@FS\hsize\FB@wd\fi\@@FSfalse}
+\newcommand\flrow@capsetup{}
+\edef\float@style{plain}
+\@ifdefinable\FBB@wd{\let\FBB@wd\relax}
+\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}}
+\newcommand\flrow@restyle[1]{%
+  \@namedef{#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
+    \flrow@setlist{{#1}}%
+    \textwidth\columnwidth\edef\FBB@wd{\the\columnwidth}%
+    \FRifFBOX\@@setframe\relax\@@FStrue\@float{#1}}%
+  \@namedef{#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
+    \flrow@setlist{{#1}{widefloat}{wide#1}}%
+    \FRifFBOX\@@setframe\relax\@@FStrue\edef\FBB@wd{\the\textwidth}%
+    \let\@xdblfloat\@xfloat\relax
+    \FR@ifdoubleaswide
+     {\if@twocolumn\else\let\@dblfloat\@float\fi}\relax
+    \@dblfloat{#1}}%
+  \expandafter\let\csname end#1\endcsname\float@end
+  \expandafter\let\csname end#1*\endcsname\float@dblend
+ \@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\relax\@@FStrue
+    \let\rotfloat@@makebox\float@makebox
+    \let\float@makebox\rotfloat@makebox
+    \@float{#1}}%
+  \@namedef{endsideways#1}{\FBbuildtrue\float@end}
+  \ifx\@rotdblfloat\undefined
+   \@namedef{sideways#1*}{%
+     \flrow@error{%
+      You need rotating version 2.10 or newer to do this}%
+     \@nameuse{sideways#1}}%
+  \else
+   \@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\relax\@@FStrue
+     \let\@xdblfloat\@xfloat
+     \let\rotfloat@@makebox\float@makebox
+     \let\float@makebox\rotdblfloat@makebox
+     \@dblfloat{#1}}%
+  \fi
+  \@namedef{endsideways#1*}{\FBbuildtrue\float@dblend}}
+ \@ifundefined{wrapfloat}{}{%
+   \@ifundefined{flrow@WF@rapt}{\let\flrow@WF@rapt\WF@rapt
+   \def\WF@rapt[##1]##2{\FRifFBOX\@@setframe\relax\@@FStrue
+     \dimen@##2\relax
+     \ifdim\dimen@>\z@
+       \edef\FBB@wd{\the\dimen@}\FB@fs@wd\dimen@\FBo@wd
+     \fi
+     \flrow@WF@rapt[##1]{\dimen@}%
+       \the\FR@everyfloat\ignorespaces}%
+   }{}%
+   \@namedef{wrap#1}{\killfloatstyle\def\@captype{#1}%
+     \FR@redefs\FBc@wd\z@
+     \flrow@setlist{{#1}{wrapfloat}{wrap#1}}%
+     \def\WF@floatstyhook{\let\@currbox\WF@box
+       \ifFBbuild
+         \global\setbox\WF@box\flrow@FB{\wd\WF@box}%
+       \else
+         \global\let\flrow@typ@tmpset\undefined
+         \global\let\WF@box\@currbox
+       \fi}%
+     \@ifnextchar[\WF@wr{\WF@wr[]}}%]
+   \@namedef{endwrap#1}{\endwrapfloat
+     \@ifundefined{FloatHBarrier}{}\FloatHBarrier
+     }}
+ \@ifundefined{sf@@@subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}}
+\newcommand\RawFloats{\@ifnextchar[%]
+    \flrow@rawfloatschk\flrow@rawfloats}
+\newcommand\flrow@rawfloats{\killfloatstyle\@parboxrestore
+    \let\@makecaption\FR@makecaption
+    \expandafter\ifx\csname end\@captype\endcsname\float@endH
+        \global\FBbuildfalse
+    \else
+        \@namedef{end\@captype}{\end@float}%
+    \fi
+    \expandafter\ifx\csname end\@captype*\endcsname\float@endH
+        \global\FBbuildfalse
+    \else
+        \@namedef{end\@captype*}{\end@dblfloat}%
+    \fi
+  \@ifundefined{@rotfloat}{}{%
+    \@namedef{endsideways\@captype}{\end@rotfloat}%
+    \@namedef{endsideways\@captype*}{\end@rotdblfloat}%
+  }%
+  \@ifundefined{wrapfloat}{}{%
+    \@namedef{endwrap\@captype}{\endwrapfloat}%
+  }}
+\@ifdefinable\flrow@rawfloatschk{}
+\def\flrow@rawfloatschk[#1]{\@ifnextchar[%]
+    {\flrow@RawFloats[#1]}{\flrow@@RawFloats#1,;}}
+\@ifdefinable\flrow@RawFloats{}
+\newcommand\flrow@raw@set{\AtBeginDocument}
+\AtBeginDocument{\let\flrow@raw@set\@firstofone}
+\def\flrow@RawFloats[#1][#2]{\flrow@RawFloats@[#1]#2,;}
+\def\flrow@RawFloats@[#1]#2,{%
+  \caption@ifinlist{#2}{float}{\flrow@raw@set
+        {\@namedef{#1}{\@float{#1}}}%
+  }{\caption@ifinlist{#2}{widefloat}{\flrow@raw@set%
+        {\@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}}%
+  }{\caption@ifinlist{#2}{rotfloat}{%
+    \@ifundefined{@rotfloat}{}{\flrow@raw@set
+        {\@namedef{sideways#1}{\@rotfloat{#1}}}}%
+  }{\caption@ifinlist{#2}{widerotfloat}{%
+    \@ifundefined{@rotfloat}{}{\flrow@raw@set
+        {\@namedef{sideways#1*}{\@rotdblfloat{#1}}}}%
+  }{\caption@ifinlist{#2}{wrapfloat}{%
+    \@ifundefined{wrapfloat}{}{\flrow@raw@set
+        {\@namedef{wrap#1}{\wrapfloat{#1}}}}}%
+  }{\caption@ifinlist{#2}{all,allfloats}{%
+    \flrow@@RawFloats{#1}%
+  }{\flrow@error{Undefined float subtype `#2'}%
+  }}}}}\@ifnextchar;\@gobble{\flrow@RawFloats@[#1]}}
+\@ifdefinable\flrow@@RawFloats{}
+\def\flrow@@RawFloats#1,{%
+ \flrow@raw@set{\@namedef{#1}{\@float{#1}}%
+    \@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}%
+  \@ifundefined{@rotfloat}{}{%
+    \@namedef{sideways#1}{\@rotfloat{#1}}%
+    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
+  }%
+  \@ifundefined{wrapfloat}{}{%
+    \@namedef{wrap#1}{\wrapfloat{#1}}}%
+  }\@ifnextchar;\@gobble\flrow@@RawFloats
+}
+\newcommand\flrow@Raw@restyle[1]{%
+    \@namedef{#1}{\@float{#1}}%
+    \@namedef{#1*}{\@dblfloat{#1}}%
+    \@namedef{end#1}{\end@float}%
+    \@namedef{end#1*}{\end@dblfloat}%
+  \@ifundefined{@rotfloat}{}{%
+    \@namedef{sideways#1}{\@rotfloat{#1}}%
+    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
+    \@namedef{endsideways#1}{\end@rotfloat}%
+    \@namedef{endsideways#1*}{\end@rotdblfloat}%
+  }%
+  \@ifundefined{wrapfloat}{}{%
+    \@namedef{wrap#1}{\wrapfloat{#1}}%
+    \@namedef{endwrap#1}{\endwrapfloat}%
+  }%
+ }
+\newcommand\RawCaption[1]{{\let\@makecaption\FR@makecaption #1}}
+\@ifdefinable\float@exts{\newtoks\float@exts}
+\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}}
+\let\@float@Hx\@xfloat
+\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}}
+\AtBeginDocument{%
+  \@ifundefined{latex@xfloat}{}{%
+    \let\floatrow@ORI@xfloat\@xfloat
+    \def\@xfloat#1[#2]{%
+      \floatrow@ORI@xfloat{#1}[#2]%
+      \floatfont}}}%
+\newsavebox\float@box
+\def\@float@HH#1[H]{%
+  \@ifundefined{FloatHBarrier}{}\FloatHBarrier
+  \expandafter\let\csname end#1\endcsname\float@endH
+  \FR@ifdoubleaswide
+   {\expandafter\let\csname end#1*\endcsname\float@endH}\relax
+  \let\@currbox\float@box
+  \flrow@setlist*{{floatH}{#1H}}%
+  \def\@captype{#1}%\setbox\@floatcapt=\vbox{}%
+  \setbox\@currbox\color@vbox\normalcolor
+    \vbox\bgroup
+      \hsize\columnwidth
+      \linewidth\columnwidth
+      \@parboxrestore\leftmargin\z@\rightmargin\z@
+      \@floatboxreset \@setnobreak
+  \ignorespaces}
+\newcommand\flrow@flboxreset{\FR@flboxreset
+  \@ifundefined{capstart}{}{\capstart}%
+  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
+  \if@tempswa\FB@readaux{\relax}\fi
+  \global\let\FBcheight\relax\global\let\FBoheight\relax
+  \global\let\FBfheight\relax
+  \FBifcapbeside\FC@fs@wd\FB@fs@wd
+  \the\FR@everyfloat}
+\@ifdefinable\FBcheight{\let\FBcheight\relax}
+\@ifdefinable\FBoheight{\let\FBoheight\relax}
+\@ifdefinable\FBfheight{\let\FBfheight\relax}
+\newcommand\FB@fs@wd{\@tempdima\FBB@wd
+  \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\linewidth\hsize
+  \FBifcaptop
+    {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
+    {\columnwidth\FBc@wd}%
+  }
+\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
+  \FC@ifc@wd\@tempswatrue\@tempswafalse
+  \if@tempswa
+     \ifx\FCwidth\relax
+        \flrow@error{You didn't define width of caption\MessageBreak
+          for plain floating environment.}%
+     \else
+        \global\FBc@wd=\FCwidth
+        \FC@ifo@fil{\advance\@tempdima-\FBc@wd}\relax
+     \fi
+  \else
+    \global\FBc@wd\@tempdima
+  \fi
+  \FC@ifo@fil\relax{\@tempdima.5\@tempdima
+    \flrow@setwd\FB@wd\@tempdima}%
+  \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}%
+  \FC@ifc@wd\relax{\global\advance\FBc@wd-\FB@wd}%
+  \hsize\FBo@wd\linewidth\hsize\columnwidth\FBc@wd\linewidth\hsize
+  \FCset@vpos}
+\newcommand\float@makebox[1]{%
+  \FBifcapbeside{\flrow@FC{#1}}{\flrow@FB{#1}}}
+\newcommand\FBaskip{\z@}\newcommand\FBbskip{\z@}
+\newif\ifFBbuild\FBbuildtrue
+\newcommand\flrow@FB[1]{\vbox{\@tempdima=#1\vskip\FBaskip
+  \@parboxrestore\leftmargin\z@\rightmargin\z@
+  \hbox to\@tempdima{\def\FB@zskip{\vskip\z@}%
+  \FBleftmargin\flrow@FB@\FBrightmargin}%
+  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
+  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}%
+  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
+\newcommand\flrow@FC[1]{\vbox{\@tempdima=#1\@parboxrestore
+  \leftmargin\z@\rightmargin\z@\flrow@FClist\vskip\FBaskip
+  \hbox to\@tempdima{\FCleftmargin\flrow@FC@\FCrightmargin}%
+  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
+  \nocapbeside\global\let\FCwidth\relax
+  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
+\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}
+\newcommand\FBafil{\vfill}\newcommand\FBbfil{\vfill}
+\newcommand\FBw@box[1]{\hsize#1\columnwidth#1\linewidth#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}
+\newcommand\flrow@FB@{\global\let\flrow@typ@tmpset\undefined
+ \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\leftmargin\z@\rightmargin\z@
+  \@@FBabove
+  \FBifcaptop\@tempswatrue\@tempswafalse
+  \if@tempswa
+    \ifvoid\@floatcapt\else
+      \FB@vbox\FBc@wd\FBcheight{\FBifCAPTOP\relax\vfill
+        \unvbox\@floatcapt
+        \ifnum\FPOScnt=\@ne\vbox{\FB@foot}\fi\vfil}%
+      \@@FBskip\hrule\@height\z@\@depth\z@
+    \fi
+    \vtop{\vskip\z@\FBo@frame{\FB@vtop\FBo@wd\FBoheight
+      {\FBafil\unvbox\@currbox\FBbfil
+      \vskip\z@
+      \ifnum\FPOScnt=\z@
+        \FB@vtop\FBo@wd\FBfheight{\FB@foot\vfil}\fi}}\par
+      \vskip\z@
+      \ifnum\FPOScnt=\tw@\vskip\z@
+        \FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi}%
+  \else\ifnum\FPOScnt=\z@\FPOScnt=\@ne\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=\@ne\vtop{\FB@foot}%
+    \fi\par
+        \vfill\vskip\z@\vss
+        \ifnum\FPOScnt=2\FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi
+        }\fi
+  \fi\@@FBbelow\FB@zskip\end@FBBOX
+  \global\setbox\@floatcapt\box\voidb@x}}
+\newcommand\flrow@FC@{\global\let\flrow@typ@tmpset\undefined
+ \FB@frame{\begin@FBBOX
+   \adj@dim\FBo@wd+\FBo@wadj=\hsize
+   \settowidth\@tempdimb{\floatcapbesidesep}\advance\hsize\@tempdimb
+   \advance\hsize\FBc@wd\@parboxrestore\leftmargin\z@\rightmargin\z@
+   \@@FBabove
+    \hbox{\floatfacing*%
+      {\ifvoid\@floatcapt\else
+         \FCc@box{\FBw@box\FBc@wd\unvbox\@floatcapt\FB@foot}%
+         \floatcapbesidesep\fi
+       \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
+    \global\setbox\@floatcapt\box\voidb@x}}
+\newcommand\FB@foot{\let\FR@ifFOOT\@firstoftwo\FB@putfoots\@@par\FB@putfnotes}
+\newcommand\FB@zskip{}
+\newcommand\float@end{\ifFBbuild\@endfloatbox
+    \global\setbox\@currbox\float@makebox\columnwidth
+    \let\@endfloatbox\relax\fi
+  \end@float}
+\newcommand\floatHpenalties{}
+\newcommand\float@endH{\@endfloatbox\par
+  \FR@iffloatHaslist
+   {\floatHpenalties\relax
+    \addpenalty\@beginparpenalty}\relax
+  \vskip\intextsep
+  \ifFBbuild\setbox\@currbox\float@makebox\columnwidth\fi
+  \box\@currbox\par
+  \FR@iffloatHaslist
+   {\addpenalty\@endparpenalty\@endpetrue}\relax
+  \vskip\intextsep\relax}
+\newcommand\float@dblend{\ifFBbuild\@endfloatbox
+    \global\setbox\@currbox\float@makebox\textwidth
+    \let\@endfloatbox\relax\fi
+  \end@dblfloat}
+\newsavebox\@floatcapt
+\newcommand*{\listof}[2]{%
+  \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
+    \expandafter\providecommand\csname l@#1\endcsname
+        {\@dottedtocline{1}{1.5em}{2.3em}}%
+    \float@listhead{#2}%
+    \begingroup\setlength{\parskip}{\z@}%
+      \@starttoc{\@nameuse{ext@#1}}%
+    \endgroup}}
+\providecommand*{\float@listhead}[1]{%
+  \@ifundefined{chapter}{\def\@tempa{\section*}}%
+    {\def\@tempa{\chapter*}}%
+  \@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}%
+\newcommand\float@addtolists[1]{%
+  \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}
+\PackageInfo{floatrow}{Modified float package code loaded}
+\IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse}
+\if@tempswa
+  \let\rotfloat@HH\@float@HH
+  \def\@float@HH#1{%
+    \expandafter\let\csname endsideways#1\endcsname\float@endH
+    \let\end@float\relax
+    \rotfloat@HH{#1}}
+  \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}}
+\PackageInfo{floatrow}{Modified rotfloat package code loaded}
+\fi
+\@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat}
+\FR@everyfloat={\let\@footnotetext\@mpfootnotetext
+  \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
+  \floatobjectset\floatfont}
+\@ifdefinable\FR@ifFOOT{\let\FR@ifFOOT\@secondoftwo}
+\newcommand\FB@putfnotes{%
+  \ifvoid\@mpfootins\else\FR@ifFOOT
+    {\vskip\floatfootskip\normalcolor\FBfootnoterule
+    \unvbox\@mpfootins\@@par}\relax
+  \fi}
+\@ifdefinable\flrow@foot{\newinsert\flrow@foot}
+\newcommand\FB@putfoots{%
+  \ifvoid\flrow@foot\else\FR@ifFOOT
+    {\vskip\floatfootskip\normalcolor
+    \unvbox\flrow@foot\@@par}\relax
+  \fi}
+\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}}{}}
+\captionsetup[floatfoot]{labelformat=empty,labelsep=none}
+\newcommand\floatfoot{\@ifstar
+    {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}%
+    {\def\FR@tmp{\captionfootfont}\floatfoot@}}
+\newcommand\floatfoot@[1]{%
+  \global\setbox\flrow@foot\vbox{%
+  \floatfoot@box{#1}}}%
+\newcommand\floatfoot@box[1]{%
+  \@ifundefined{@captype}{\def\@captype{floatfoot}}{}%
+    \if@@FS\hsize\columnwidth\linewidth\columnwidth\fi
+    \@parboxrestore\reset@font\color@begingroup
+  \caption@setoptions{\@captype}%
+  \caption@setoptions{floatfoot}%
+     \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
+  \color@endgroup}
+\newcommand\newfloatcommand[2]{%
+  \@ifundefined{#1}{}%
+    {\flrow@error{\string#1 already defined}}%
+  \@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
+  \def\FB@tmpset{#3}\def\@captype{#2}%
+  \@ifnextchar[{\@floatbox}{\@floatbox[#4]}}}
+\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
+\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
+\newfloatcommand{fcapside}{figure}[\capbeside][]
+\@ifdefinable\FB@wd {\newdimen\FB@wd}
+\@ifdefinable\FBo@wd{\newdimen\FBo@wd}
+\@ifdefinable\FBc@wd{\newdimen\FBc@wd}
+\newlength\FBo@ht
+\newlength\FBc@ht
+\newlength\FBf@ht
+\newlength\FBo@max
+\newlength\FBc@max
+\newlength\FBf@max
+\newcommand\FR@loc@addcnt[2]{%
+  \@ifundefined{c@#1}{\@nocounterr{#1}}%
+    {\advance\csname c@#1\endcsname #2\relax}}
+\newcommand\FR@loc@refcnt[1]{%
+  \@ifundefined{c@#1}{\@nocounterr{#1}}%
+   {\advance\csname c@#1\endcsname1\relax}}
+\newcommand\FR@loc@{%
+  \let\FR@ifunloc\@gobble
+  \let\label\@gobble
+  \let\refstepcounter\FR@loc@refcnt
+  \let\stepcounter\FR@loc@refcnt
+  \let\refsteponlycounter\FR@loc@refcnt
+  \let\FR@ifcountH\@secondoftwo
+  \let\cl@@ckpt\empty\let\addtocounter\FR@loc@addcnt
+  \let\caption@kernel@addcontentsline\@gobbletwo
+  \let\caption@addcontentsline\@gobbletwo
+  \def\sf@updatecaptionlist##1##2##3##4{}}
+\def\FBtmp@cap#1[#2]#3{\sbox\@tempboxa{\captionlabel{#3}}%
+  \global\@tempdimb\wd\@tempboxa}
+\newcommand\captionlabel[1]{{\def\FR@tmp{\@captype}\ifnum\floatbox@depth>\@ne
+       \def\FR@tmp{sub\@captype}\caption@setsubtype*{\FR@tmp}\stepcounter{\FR@tmp}\fi
+   \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
+\newcommand\subcaptionlabel[1]{{\floatbox@depth\tw@\captionlabel{#1}}}
+\newcommand\FBget@box[3]{%
+  \FBiffloatrow\relax
+    {\ifx\FBB@wd\relax
+      \ifdim\hsize=\z@
+        \@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}%
+  \adj@dim\hsize-\FB@wadj=\@tempdima
+  \FBifcapbeside
+    {\FCget@@wd{#1}{#3}}%
+    {\nofilFCOhsize
+    \FBiffloatrow\relax
+      {\settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
+      \advance\@tempdima-\@tempdimb}}%
+  \FC@ifo@fil{\@tempdima\FB@wd}{\FB@wd\@tempdima}%
+  \adj@dim\@tempdima-\FBo@wadj=\FBo@wd
+  \FBiffloatrow\relax{\hsize\FBo@wd}%
+  \FBifcapbeside{\hsize\FB@wd}\relax
+  \linewidth\hsize
+  \def\reserved@a{#1}\ifx\reserved@a\empty
+    \else\FBget@@wd{#1}{#3}\fi
+  \hsize\FBo@wd\linewidth\hsize
+  \FBifcapbeside
+    {\FC@ifc@wd\relax{\advance\FBc@wd-\FB@wd}}%
+    {\FBc@wd\FB@wd}%
+  \setbox\z@\vbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@\hsize\FBo@wd\linewidth\hsize
+    \FBifcaptop
+      {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
+      {\columnwidth\FBc@wd}%
+    #3}%
+  \FBc@ht\ht\@floatcapt\advance\FBc@ht\dp\@floatcapt
+  \FBo@ht\ht\z@\advance\FBo@ht\dp\z@\let\FBheight\FBo@ht
+  \setbox\tw@\vbox{\null\par\FB@foot\par}%
+  \FBf@ht\ht\tw@\advance\FBf@ht\dp\tw@
+  \FBiffloatrow
+    {\ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
+    \ifCADJ
+      \FBifcaptop
+        {\ifnum\FPOScnt=\@ne\global\advance\FBc@ht\FBf@ht\fi}%
+        {\ifnum\FPOScnt=\tw@
+          \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}%
+      \ifdim\FBc@ht>\FBc@max\global\FBc@max\FBc@ht\fi
+      \gdef\FBcheight{\FBc@ht}\gdef\FBfheight{\FBf@ht}%
+    \fi}\relax
+  \def\reserved@a{#2}\ifx\reserved@a\empty
+    \FBiffloatrow{\ifOADJ
+      \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
+      \FBifcaptop
+        {\ifnum\FPOScnt=\z@
+          \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
+        \fi}\relax
+      \gdef\FBoheight{\FBo@ht}\gdef\FBfheight{\FBf@ht}%
+    \fi}\relax
+  \else
+     \FBget@@ht{#2}{#3}%
+  \fi}
+\newcommand\FCget@@wd[2]{\flrow@FClist
+  \FBiffloatrow\relax
+    {\settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
+    \advance\@tempdima-\@tempdimb\advance\hsize-\@tempdimb}%
+  \settowidth\@tempdimb{\floatcapbesidesep}\advance\@tempdima-\@tempdimb
+  \FC@ifo@fil{\FB@wd\@tempdima}\relax
+  \FC@ifc@wd\@tempswatrue\@tempswafalse
+  \if@tempswa
+    \ifx\FCwidth\relax
+      \setbox\@ne\vbox{\FR@loc@
+        \let\caption\flrow@caption
+        \let\@caption\FBtmp@cap
+         #2}%
+      \FBc@wd=\@tempdimb
+    \else
+      \FBc@wd=\FCwidth
+    \fi\FC@ifo@fil{\advance\FB@wd-\FBc@wd}\relax
+  \else
+    \FBc@wd\@tempdima
+  \fi
+  \@tempdima.5\@tempdima}
+\newcommand\flrow@gobble@[2][]{\unskip\ignorespaces}
+\newcommand\flrow@gobble{%
+    \let\caption\flrow@gobble@
+    \let\floatfoot\flrow@gobble@
+    \let\footnote\flrow@gobble@
+    \let\footnotetext\flrow@gobble@
+    }
+\newcommand\FBget@@wd[2]{\@tempswafalse
+  \begingroup
+    \@tempdima-3000pt\let\FBwidth\@tempdima
+    \setlength\dimen@{#1}\ifdim\dimen@<\z@\global\@tempswatrue\fi
+  \endgroup
+  \if@tempswa
+    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
+    \FBo@wd\wd\z@\let\FBwidth\FBo@wd
+    \setlength\FBo@wd{#1}%
+    \advance\FBo@wd\leftskip\advance\FBo@wd\rightskip
+    \adj@dim\FBo@wd+\FBo@wadj=\FB@wd
+    \setbox\flrow@foot\box\voidb@x
+    \setbox\@mpfootins\box\voidb@x
+  \else
+    \setlength\FB@wd{#1}%
+    \adj@dim\FB@wd-\FB@wadj=\FB@wd
+    \adj@dim\FB@wd-\FBo@wadj=\FBo@wd
+    \let\FBwidth\FBo@wd
+  \fi}
+\newcommand\FBget@@ht[2]{\@tempswafalse
+  \begingroup
+    \@tempdimb-3000pt\let\FBheight\@tempdimb
+    \setlength\dimen@{#1}\ifdim\dimen@<\z@
+      \global\@tempswatrue\fi
+  \endgroup
+  \if@tempswa
+    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
+    \FBo@ht\ht\z@\advance\FBo@ht\dp\z@
+    \let\FBheight\FBo@ht\setlength\FBo@ht{#1}%
+    \adj@dim\FBo@ht+\FBo@hadj=\FBo@ht
+    \FBifcaptop{\ifnum\FPOScnt=\z@\advance\FBo@ht\FBf@ht\fi}\relax
+  \else
+    \setlength\FBo@ht{#1}%
+    \adj@dim\FBo@ht-\FBo@hadj=\FBo@ht
+    \adj@dim\FBo@ht-\FB@hadj=\FBo@ht
+    \setbox\z@\vbox{\offinterlineskip\vbox{\@@FBabove}%
+      \FBifcapbeside\relax{\@@FBskip\hrule\@height\z@\@depth\z@}%
+      \vtop{\@@FBbelow}}%
+    \global\advance\FBo@ht-\ht\z@\global\advance\FBo@ht-\dp\z@
+    \FBifcapbeside\relax\FBget@@@ht
+  \fi
+  \FBiffloatrow{\ifOADJ
+    \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
+  \fi}\relax
+  \def\FBoheight{\FBo@ht}}
+\newcommand\FBget@@@ht{%
+    \ifdim\FBc@ht>\FBc@max
+      \global\advance\FBo@ht-\FBc@ht
+    \else
+      \global\advance\FBo@ht-\FBc@max
+    \fi
+    \FBifcaptop{\ifnum\FPOScnt=\@ne\else
+      \ifdim\FBf@ht>\FBf@max
+        \global\advance\FBo@ht-\FBf@ht
+      \else
+        \global\advance\FBo@ht-\FBf@max
+      \fi
+    \fi}\relax
+  }
+\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}}}
+\newcounter{FBl@b}
+\@ifdefinable\FR@ifFCBOX{\let\FR@ifFCBOX\@secondoftwo}
+\newcommand\FBs@raise{\raisebox{-\totalheight}}
+\newcommand\FBf@raise{}
+\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}%
+    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{-\height}}}%
+     {\gdef\FBf@raise{}}%
+    \gdef\FBs@raise{\raisebox{-\totalheight}}%
+  \or\gdef\FC@bbox{\vbox\@parboxto\bgroup}\gdef\FC@ebox{\vskip\z@\egroup}%
+    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{\depth}}}%
+     {\gdef\FBf@raise{}}%
+    \gdef\FBs@raise{}\fi}
+\@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}
+\newcommand\floatbox[2][]{\begingroup
+  \def\FB@tmpset{#1}\def\@captype{#2}%
+  \@ifnextchar[{\@floatbox}{\@floatbox[]}}
+\@ifdefinable\@floatbox{}\@ifdefinable\@@floatbox{}
+\def\@floatbox[#1]{%
+  \@ifnextchar[{\@@floatbox[#1]}{\@@floatbox[#1][]}}
+\@ifdefinable\floatbox@depth{\newcount\floatbox@depth}
+\def\@@floatbox[#1][#2]{%
+  \@ifnextchar[{\@@@floatbox[#1][#2]}{\@@@floatbox[#1][#2][]}}%]
+\@ifdefinable\@@@floatbox{}
+\long\def\@@@floatbox[#1][#2][#3]#4#5{\advance\floatbox@depth\@ne
+  \@FB@vpos{#3}%
+  \if@@FS\else\FR@redefs
+    \ifcase\floatbox@depth\or
+      \flrow@setlist{{\@captype}}\or
+      \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
+    \fi
+    \FRifFBOX\@@setframe\relax\@@FStrue
+  \fi
+  \FB@tmpset
+  \FBifcapbeside\flrow@FClist\relax
+  \@parboxrestore\leftmargin\z@\rightmargin\z@
+  \floatobjectset\floatfont
+  \FBget@box{#1}{#2}{#4#5}%
+  \FBifcapbeside\FCset@vpos\relax
+  \FBiffloatrow{\FR@floatbox{\@ifundefined{capstart}{}{\capstart}#4#5}}%
+   {\adj@dim\FB@wd+\FB@wadj=\hsize\linewidth\hsize
+    \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi
+    \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}\let\FBB@wd\relax
+    #4#5}\FBbuildtrue
+    \FBifcapbeside{\flrow@FC\FBB@wd}{\flrow@FB\FBB@wd}%
+    \global\FBbuildfalse
+    \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
+   }\advance\floatbox@depth\m@ne
+  \endgroup\ignorespaces}
+\newcommand\FR@floatbox[1]{\@tempswafalse
+    \ifOADJ\@tempswatrue\fi\ifCADJ\@tempswatrue\fi
+    \if@tempswa\@ifundefined{FB@@boxmax}{}{\FB@@boxmax}\fi
+    \FBsetbox@obj{#1}\begin@FBBOX
+      \FBifcapbeside\flrow@FC@\flrow@FB@
+    \end@FBBOX
+    \addtocounter{FRobj}\m@ne
+    \@tempswafalse\FR@iffacing\@tempswatrue\relax
+    \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
+    \advance\Xhsize-\FB@wd
+    \FBifcapbeside
+      {\advance\Xhsize-\FBc@wd
+       \FR@ifcountH{\global\advance\Zhsize-\FBc@wd}\relax
+       \settowidth\@tempdimb{\floatcapbesidesep}%
+       \advance\Xhsize-\@tempdimb
+       \FR@ifcountH{\global\advance\Zhsize-\@tempdimb}\relax}\relax
+    \ifnum\c@FRobj=\z@
+      \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
+      \floatrowsep
+      \adj@dim\Xhsize-\FB@wadj={\global\Xhsize}%
+      \adj@dim\Zhsize-\FB@wadj={\global\Zhsize}%
+    \fi}
+\newcommand\FBsetbox@obj[1]{%
+  \setbox\float@box\color@vbox\normalcolor
+  \FBifcaptop
+     {\FB@vtop\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
+      \ifnum\FPOScnt=\z@\columnwidth\FBo@wd\else\columnwidth\FBc@wd\fi}%
+     {\FB@vbox\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
+      \columnwidth\FBc@wd}%
+  #1\FBbfil\egroup\color@endbox
+  \let\@currbox\float@box}
+\@ifdefinable\FBiffloatrow{\let\FBiffloatrow\@secondoftwo}
+\newcounter{FRobj}
+\newcounter{FRsobj}
+\newlength\Xhsize
+\newlength\sXhsize
+\newlength\Zhsize
+\newlength\sZhsize
+\newcommand\flrow@to{to\hsize}
+\newcommand\flrow@boxset[1]{#1}
+\newcommand\flrow@setrowhbox{%
+\FR@ifROWFILL{\def\flrow@left{\hskip\leftskip}\def\flrow@right{\hskip\rightskip}%
+  }{\let\flrow@to\empty\def\flrow@left{}\def\flrow@right{}}%
+}
+\newcommand\flrow@left{}\newcommand\flrow@right{}
+\newcommand\flrow@hbox@bgroup{\hbox\flrow@to
+    \bgroup\flrow@left}
+\newcommand\flrow@hbox@egroup{\flrow@right
+    \egroup}
+\newbox\flrow@rowbox
+\newcommand\floatrow[1][2]{\c@FRobj=#1\relax
+  \ifcase\floatbox@depth
+    \flrow@setlist*{{floatrow}{\@captype row}}%
+  \or
+    \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
+    \flrow@settype{subfloatrow}\flrow@settype{sub\@captype row}%
+    \ifx\flrow@to\empty\def\flrow@boxset##1{}\fi
+  \fi%
+  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
+  \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
+  \if@tempswa\FB@readaux{\relax}\fi
+  \flrow@boxset{\ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\else\hsize\FBB@wd\fi}%
+  \ifnum\floatbox@depth=\z@\vspace\FBaskip\else\leavevmode\fi
+  \hbox\flrow@to\bgroup%outer h box
+  \FRleftmargin
+  \flrow@boxset{\hsize\FBB@wd
+     \settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}\advance\hsize-\@tempdima}%
+  \bgroup\ifx\FR@frame\empty\else\def\FB@frame{}\def\FB@wadj{}\def\FB@hadj{}\fi%frame set
+  \flrow@boxset{\adj@dim\hsize-\FR@wadj=\hsize}%
+  \setbox\flrow@rowbox\vbox\bgroup%v box
+        \@@FRabove
+    \flrow@setrowhbox
+    \flrow@hbox@bgroup\let\FBiffloatrow\@firstoftwo
+      \Xhsize\hsize\count@#1\advance\count@\m@ne
+      \settowidth\@tempdima{\floatrowsep}\advance\Xhsize-\count@\@tempdima
+      \@tempdimb\Xhsize
+      \FR@iftwolevel
+        {\ifnum\floatbox@depth=\z@\Zhsize\Xhsize\else
+            \ifdim\Zhsize=\z@\Zhsize\Xhsize\sZhsize\Xhsize\fi
+            \FR@ifcountH{\global\advance\Zhsize-\count@\@tempdima}\relax
+         \fi}{\@tempdimb\Xhsize\Zhsize\Xhsize}%
+      \divide\@tempdimb#1\relax\FB@wd\@tempdimb
+      \hsize\@tempdimb\ignorespaces}
+\def\endfloatrow{\ifdim\lastskip>\z@\unskip\fi
+      \flrow@hbox@egroup%h box
+    \@@FRbelow
+    \egroup%v box
+    \FR@frame{\box\flrow@rowbox}%
+    \egroup%frame set
+    \FRrightmargin\egroup%outer h box
+    \ifnum\floatbox@depth=\z@\vspace\FBbskip\fi
+  \gdef\FBaskip{\z@}\gdef\FBbskip{\z@}%
+  \global\FBf@max\z@\global\FBo@max\z@\global\FBc@max\z@
+  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
+\newenvironment{subfloatrow}{\capsubrowsettings
+    \captionsetup{subtype}\@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
+\newcommand\capsubrowsettings{\caption@setoptions{subfloatrow}\caption@setoptions{sub\@captype row}}
+\newenvironment{subfloatrow*}[1][2]{\let\flrow@to\empty
+    \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
+    \FR@ifunloc{\let\FR@ifcountH\@firstoftwo}\let\c@FRobj\c@FRsobj
+    \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
+    \floatrow[#1]\killfloatstyle}{\ifdim\lastskip>\z@\unskip\fi
+     \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
+\newcommand\subfloatrowsep{\hskip\columnsep}
+\@ifdefinable\FR@ifcountH{\let\FR@ifcountH\@firstoftwo}
+\@ifdefinable\FR@ifunloc{\let\FR@ifunloc\@firstofone}
+\@ifdefinable\FR@iftwolevel{\let\FR@iftwolevel\@secondoftwo}
+\newcommand\CommonHeightRow{\@ifstar
+    {\let\FR@iftwolevel\@firstoftwo\CommonHeightRow@
+   }{\let\FR@iftwolevel\@secondoftwo\CommonHeightRow@}}
+\newcommand\DefaultCommonHeight{25pt}
+\newcommand\CommonHeight{\DefaultCommonHeight}
+\newcommand\CommonHeightRow@[2][\DefaultCommonHeight]{\def\CommonHeight{#1}\setbox\z@
+    \hbox{\FR@loc@\let\FR@ifunloc\@firstofone#2}%
+    \ifcase\floatbox@depth\def\@tempa{\Xhsize}\def\@tempb{\Zhsize}\or
+        \def\@tempa{\sXhsize}\def\@tempb{\Zhsize}\fi
+    \FR@calc@CommonHeight#2}
+\@ifdefinable\FR@Zunitlength{\newdimen\FR@Zunitlength}
+\newcommand\FR@calc@CommonHeight{%
+    \@tempdima\@tempb\advance\@tempdima-\@tempa
+    \count@\@tempdima\relax\divide\count@16384\relax
+    \divide\@tempb\count@\relax\FR@Zunitlength\@tempb\relax
+    \@tempdima\CommonHeight\relax
+    \count@\@tempdima\relax\divide\count@16384\relax
+    \@tempdima\count@\FR@Zunitlength\relax
+    \edef\CommonHeight{\the\@tempdima}}
+\newcommand\begin@FBBOX{\vbox\bgroup}
+\def\end@FBBOX{\egroup}
+\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse
+  \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip\z@}%
+             {\vskip\z@\egroup$\egroup}}
+\newcommand\TopFloatBoxes{\CADJfalse\OADJfalse
+  \buildFBBOX{\vtop\bgroup\vskip\z@}{\egroup}}
+\newcommand\BottomFloatBoxes{\CADJfalse\OADJfalse
+  \buildFBBOX{\vbox\bgroup}{\vskip\z@\egroup}}
+\newcommand\PlainFloatBoxes{%
+  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
+\newcommand\buildFBBOX[2]{\gdef\begin@FBBOX{#1}\gdef\end@FBBOX{#2}}
+\def\newdimentocommand  #1#2#3{%
+    #1\@tempdima{#3}\@ifdefinable#2{\xdef#2{\the\@tempdima}}}
+\def\renewdimentocommand#1#2#3{%
+    #1\@tempdima{#3}\xdef#2{\the\@tempdima}}
+\def\newskiptocommand   #1#2#3{%
+    #1\@tempskipa{#3}\@ifdefinable#2{\xdef#2{\the\@tempskipa}}}
+\def\renewskiptocommand #1#2#3{%
+    #1\@tempskipa{#3}\xdef#2{\the\@tempskipa}}
+\def\newlengthtocommand{\newskiptocommand}
+\def\renewlengthtocommand{\renewskiptocommand}
+\newcommand*\flrow@setbool[1]{%
+  \expandafter\caption@set@bool\csname FR@if#1\endcsname}
+\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}}}
+\newcommand\thisfloatsetup{\floatsetup[tmpset]}
+\def\flrow@setup{\caption@setkeys[floatrow]{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}}}%
+\newcommand\flrow@setlist{\@ifstar\flrow@setlist@@\flrow@setlist@}
+\newcommand\flrow@setlist@[1]{\@flrow@setlist#1{tmpset};%
+  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
+  \caption@setposition{\FBifcaptop tb}}
+\newcommand\flrow@setlist@@[1]{\@flrow@setlist#1;%
+  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
+  \caption@setposition{\FBifcaptop tb}}
+\newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble
+  \@flrow@setlist}
+\@ifundefined{caption@setoptions}{\let\caption@setoptions\caption@settype}{}
+\newcommand\@cap@setlist[1]{\caption@setoptions{#1}%
+   \@ifnextchar;{\let\caption@setfloattype\@gobble\@gobble}\@cap@setlist}
+\newcommand\flrow@FClist{\flrow@setlist
+  {{floatbeside}{capbesidefloat}{\@captype beside}{capbeside\@captype}}}
+\newcommand*\clearfloatsetup[1]{\@nameundef{flrow@typ@#1}}
+\newcommand\DeclareFROpt{%
+  \@ifstar{\flrow@declopt\AtEndOfPackage}
+          {\flrow@declopt\@gobble}}
+\newcommand*\flrow@declopt[2]{%
+  #1{\undefine@key{floatrow}{#2}}\define@key{floatrow}{#2}}
+\@onlypreamble\DeclareFROpt
+\@onlypreamble\flrow@declopt
+\@ifdefinable\FR@ifrawfloats{\let\FR@ifrawfloats\@secondoftwo}
+\DeclareFROpt*{rawfloats}[0]{\flrow@setbool{rawfloats}{#1}}
+\@ifdefinable\FR@ifdoubleaswide{\let\FR@ifdoubleaswide\@secondoftwo}
+\DeclareFROpt{doublefloataswide}[0]{\flrow@setbool{doubleaswide}{#1}}
+\@ifdefinable\FR@iffloatHaslist{\let\FR@iffloatHaslist\@secondoftwo}
+\DeclareFROpt{floatHaslist}[0]{\flrow@setbool{floatHaslist}{#1}}
+\newcommand*\DeclareFloatStyle[2]{%
+  \global\@namedef{flrow@sty@#1}{#2}}
+\@onlypreamble\DeclareFloatStyle
+\newcommand*\flrow@setstyle[1]{%
+  \@ifundefined{flrow@sty@#1}%
+    {\flrow@error{Undefined float style `#1'}}%
+    {\FBstyle@reset
+     \def\flrow@capsetup{%
+        \@ifundefined{caption@sty@#1}{}{\caption@setstyle*{#1}}%
+        \caption@setoptions {#1}}%
+     \flrow@esetup{\csname flrow@sty@#1\endcsname}}}
+\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}
+\DeclareFloatStyle{default}{%
+     style=plain,captionskip=10pt,
+     margins=centering,objectset=centering,
+     capbesideposition=left,facing=no,
+     floatrowsep=columnsep,capbesidesep=columnsep,
+     font=default,footfont=footnotesize}
+\DeclareFROpt{style}{\flrow@setstyle{#1}}
+\@ifdefinable\FR@ifCST{\let\FR@ifCST\@firstoftwo}
+\DeclareFROpt{relatedcapstyle}[0]{\flrow@setbool{CST}{#1}}
+\DeclareFROpt{font}{\flrow@setfont{font}{#1}}
+\DeclareFROpt{footfont}{\captionsetup[floatfoot]{font={#1}}}
+\DeclareCaptionOption{footfont}{\caption@setfont{footfont}{#1}}
+\@ifdefinable\floatfont{\let\floatfont\empty}
+\newcommand*\captionfootfont{\normalfont\footnotesize}
+\let\DeclareFloatFont\DeclareCaptionFont
+\@onlypreamble\DeclareFloatFont
+\newcommand*\flrow@setfont[2]{%
+   \caption@setfont{@tempa}{#2}%
+   \expandafter\let\csname float#1\endcsname\caption@tempa}
+\DeclareFROpt{capposition}{\flrow@cappos{#1}}
+\DeclareFROpt{position}{\flrow@cappos{#1}}
+\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
+  }{\flrow@error{Undefined caption position `#1'}%
+  }}}}}
+\@ifdefinable\FBifcaptop{\let\FBifcaptop\@secondoftwo}
+\newcommand\captop{\let\FBifcaptop\@firstoftwo}
+\newcommand\capbot{\let\FBifcaptop\@secondoftwo}
+\@ifdefinable\FBifCAPTOP{\let\FBifCAPTOP\@secondoftwo}
+\newcommand\CAPTOP{\captop\let\FBifCAPTOP\@firstoftwo\CADJtrue}
+\@ifdefinable\FBifcapbeside{}\let\FBifcapbeside\@secondoftwo
+\newcommand\capbeside{\let\FBifcapbeside\@firstoftwo}
+\newcommand\nocapbeside{\let\FBifcapbeside\@secondoftwo}
+\DeclareFROpt{capbesideframe}[0]{\flrow@setbool{FCBOX}{#1}}
+\DeclareFROpt{capbesidewidth}[1]{\flrow@FCc@wd{#1}}
+\@ifdefinable\FC@ifc@wd{\let\FC@ifc@wd\@secondoftwo}
+\newcommand\useFCwidth{\let\FC@ifc@wd\@firstoftwo\let\FCwidth\relax}
+\@ifdefinable\FCwidth{\let\FCwidth\relax}
+\newcommand\flrow@FCc@wd[1]{%
+  \caption@ifinlist{#1}{none,sidefil}{\let\FC@ifc@wd\@secondoftwo
+  }{\useFCwidth\def\FCwidth{#1}}}
+\DeclareFROpt{capbesideposition}{\flrow@scpos{#1}}
+\newcommand\DeclareSCPos[2]{%
+  \define@key{flrow@scpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@scpos[1]{%
+  \let\FR@tmp\@empty
+  \begingroup\caption@setkeys[floatrow]{flrow@scpos}{#1}\endgroup
+  \FR@tmp}
+\@onlypreamble\DeclareSCPos
+\DeclareSCPos{left}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}}
+\DeclareSCPos{right}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\z@}}
+\DeclareSCPos{inside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
+    \count@\c@FBcnt\ifnum\count@=\z@\count@\@ne\fi
+  }}
+\DeclareSCPos{outside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
+    \count@\c@FBcnt\ifnum\count@=\z@\else\advance\count@\@ne\fi
+  }}
+\DeclareSCPos{center}{\def\@FC@vpos{\count@\z@}}
+\DeclareSCPos{top}{\def\@FC@vpos{\count@\@ne}}
+\DeclareSCPos{bottom}{\def\@FC@vpos{\count@\tw@}}
+\newcommand*\@FC@vpos{\count@\tw@}
+\newcommand*\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}
+\newcounter{FBcnt}
+\DeclareFROpt{footposition}{\flrow@ftpos{#1}}
+\newcommand\DeclareFtPos[2]{%
+  \define@key{flrow@ftpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@ftpos[1]{%
+  \let\FR@tmp\@empty
+  \begingroup\caption@setkeys[floatrow]{flrow@ftpos}{#1}\endgroup
+  \FR@tmp}
+\@onlypreamble\DeclareFtPos
+\@ifdefinable\FPOScnt{\newcount\FPOScnt}
+\DeclareFtPos{caption}{\FPOScnt1\relax}
+\DeclareFtPos{bottom}{\FPOScnt2\relax}
+\DeclareFtPos{default}{\FPOScnt0\relax}
+\DeclareFROpt{heightadjust}{\flrow@htadj{#1}}
+\newcommand\DeclareHtAdj[2]{%
+  \define@key{flrow@htadj}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
+\newcommand*\flrow@htadj[1]{\let\FR@tmp\@empty
+  \begingroup\caption@setkeys[floatrow]{flrow@htadj}{#1}\endgroup
+  \FR@tmp}
+\@onlypreamble\DeclareHtAdj
+\DeclareHtAdj{all}{\CADJtrue\OADJtrue}
+\DeclareHtAdj{caption}{\CADJtrue}
+\DeclareHtAdj{object}{\OADJtrue}
+\DeclareHtAdj{none}{\CADJfalse\OADJfalse}
+\DeclareHtAdj{nocaption}{\CADJfalse}
+\DeclareHtAdj{noobject}{\OADJfalse}
+\newif\ifCADJ
+\newif\ifOADJ
+\DeclareFROpt{valign}{\@FB@vpos{#1}}
+\newcommand\@FB@vpos[1]{%
+  \if#1t\def\FBafil{}\def\FBbfil{\vss}\else
+     \if#1b\def\FBafil{\vss}\def\FBbfil{}\else
+        \if#1c\def\FBafil{\vskip0ptplus1fillminus1000pt}%
+              \def\FBbfil{\vskip0ptplus1fillminus1000pt}\else
+           \if#1s\def\FBafil{\vskip0ptminus1000pt}%
+                 \def\FBbfil{\vskip0ptminus1000pt}%
+  \fi\fi\fi\fi}
+\@ifdefinable\FR@iffacing{\let\FR@iffacing\@secondoftwo}
+\DeclareFROpt{facing}[1]{\flrow@setbool{facing}{#1}}
+\newcommand\FB@facing{}
+\DeclareFROpt{margins}{\flrow@FBAlign{#1}}
+\newcommand*\flrow@FBAlign[1]{%
+  \@ifundefined{flrow@mj@#1}%
+    {\flrow@error{Undefined float alignment `#1'}}%
+    {\@nameuse{flrow@mj@#1}}}
+\newcommand*\DeclareMarginSet[2]{%
+  \global\@namedef{flrow@mj@#1}{#2}}
+\@onlypreamble\DeclareMarginSet
+\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@}
+\newskip\LTleft\newskip\LTright
+\DeclareMarginSet{hangleft}{\setfloatmargins
+    {\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
+  \LTleft-\marginparwidth\advance\LTleft-\marginparsep
+  \LTright=\fill}
+\DeclareMarginSet{hangright}{\setfloatmargins
+    {\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
+  \LTleft=\fill
+  \LTright-\marginparwidth\advance\LTright-\marginparsep}
+\DeclareMarginSet{hanginside}{\setfloatmargins
+    *{\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
+  }
+\DeclareMarginSet{hangoutside}{\setfloatmargins
+    *{\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
+  }
+\newcommand\flrow@mj@default{\flrow@mj@centering}
+\newcommand\floatfacing{\@ifstar
+  {\@FC@hpos\floatfacing@}{\FB@facing\floatfacing@}}
+\newcommand\floatfacing@[2]{\ifodd\count@#1\else#2\fi}
+\newcommand\floatboxmargins{\def\FR@tmp{FB}\FB@mset}
+\newcommand\floatrowmargins{\def\FR@tmp{FR}\FB@mset}
+\newcommand\floatcapbesidemargins{\def\FR@tmp{FC}\FB@mset}
+\newcommand\FB@mset{\@ifstar{\FB@mset@}{\FB@@mset}}
+\newcommand\FB@mset@[2]{%
+  \def\FB@facing{\let\FR@iffacing\@firstoftwo\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}}
+\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}}
+\setfloatmargins\hfill\hfill
+\DeclareFROpt{objectset}{\flrow@FBoAlign{#1}}
+\DeclareFROpt{justification}{\flrow@FBoAlign{#1}}
+\let\DeclareObjectSet\DeclareCaptionJustification
+\@onlypreamble\DeclareObjectSet
+\newcommand*\flrow@FBoAlign[1]{%
+  \@ifundefined{caption@hj@#1}%
+    {\flrow@error{Undefined object setting `#1'}}%
+    {\expandafter\let\expandafter\floatobjectset
+     \csname caption@hj@#1\endcsname}}
+\newcommand*\floatobjectset{\centering}
+\DeclareFROpt{floatwidth}{\flrow@FBo@wd{#1}}
+\@ifdefinable\FC@ifo@fil{\let\FC@ifo@fil\@secondoftwo}
+\newcommand\filFCOhsize{\let\FC@ifo@fil\@firstoftwo}
+\newcommand\nofilFCOhsize{\let\FC@ifo@fil\@secondoftwo}
+\newcommand\flrow@setwd{\relax}
+\newcommand\flrow@FBo@wd[1]{%
+  \caption@ifinlist{#1}{none,sidefil}{\filFCOhsize
+  }{\nofilFCOhsize\def\flrow@setwd{\@tempdima=#1}}}
+\DeclareFROpt{floatrowsep}{\flrow@setFRsep\floatrowsep{#1}}
+\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}}
+\DeclareFROpt{capbesidesep}{\flrow@setFRsep\floatcapbesidesep{#1}}
+\let\DeclareFloatSeparators\DeclareCaptionLabelSeparator
+\@onlypreamble\DeclareFloatSeparators
+\newcommand*\flrow@setFRsep[2]{%
+  \@ifundefined{caption@lsep@#2}%
+    {\flrow@error{Undefined float separator `#2'}}%
+    {\expandafter\let\expandafter#1\csname caption@lsep@#2\endcsname}}
+\DeclareFloatSeparators{columnsep}{\hskip\columnsep}
+\DeclareFloatSeparators{qquad}{\qquad}
+\DeclareFloatSeparators{fil}{\hskip\columnsep plus1fil}
+\DeclareFloatSeparators{fill}{\hskip\columnsep plus1fill}
+\newcommand\floatrowsep{\hskip\columnsep}
+\newcommand\floatcapbesidesep{\hskip\columnsep}
+\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}}
+\newcommand\DeclareFloatVCode[2]{\@namedef{flrow@FBr@#1}{#2}}
+\@onlypreamble\DeclareFloatVCode
+\newcommand*\flrow@FBrule[3]{%
+  \@ifundefined{flrow@FBr@#3}%
+    {\flrow@error{Undefined rule `#3'}}%
+    {\let#1\empty
+     \expandafter\let\expandafter#2\csname flrow@FBr@#3\endcsname}}
+\newcommand*\flrow@FRrule[3]{%
+  \@ifundefined{flrow@FBr@#3}%
+    {\flrow@error{Undefined rule `#3'}}%
+    {\def#2{\FBiffloatrow\relax{\@nameuse{flrow@FBr@#3}}}%
+     \expandafter\let\expandafter#1\csname flrow@FBr@#3\endcsname}}
+\newcommand*\flrow@FBskip[1]{%
+  \@ifundefined{flrow@FBr@#1}%
+    {\flrow@error{Undefined rule `#1'}}%
+    {\expandafter\let\expandafter\@@FBskip\csname flrow@FBr@#1\endcsname}}
+\DeclareFloatVCode{none}{}
+\DeclareFloatVCode{thickrule}{\par\rule{\hsize}{.8pt}\vskip2pt\par}
+\DeclareFloatVCode{rule}{\vskip2pt\hrule\vskip2pt}
+\DeclareFloatVCode{lowrule}{\par\vskip2pt\rule\hsize\@wholewidth\par}
+\DeclareFloatVCode{captionskip}{\vskip\captionskip}
+\newcommand\FBstyle@reset{\let\FRifFBOX\@secondoftwo\OADJfalse\CADJfalse\capbot
+  \def\@@FBskip{\vskip\captionskip}\def\@@FRabove{}\def\@@FRbelow{}%
+  \def\@@FBabove{}\def\@@FBbelow{}%
+  \def\FB@Bset{}\def\FB@frame{}\def\FBo@frame{}\def\FR@frame{}%
+  \def\FBo@wadj{}\def\FBo@hadj{}\def\FB@wadj{}\def\FB@hadj{}\def\FR@wadj{}\def\FR@hadj{}}
+\newcommand\@@FBskip{\vskip\captionskip}
+\@ifdefinable\@@FRabove{\def\@@FRabove{}}
+\@ifdefinable\@@FRbelow{\def\@@FRbelow{}}
+\@ifdefinable\@@FBabove{\def\@@FBabove{}}
+\@ifdefinable\@@FBbelow{\def\@@FBbelow{}}
+\@ifdefinable\FB@frame {\def\FB@frame {}}
+\@ifdefinable\FBo@frame{\def\FBo@frame{}}
+\@ifdefinable\FR@frame {\def\FR@frame {}}
+\@ifdefinable\FBo@wadj {\def\FBo@wadj {}}
+\@ifdefinable\FBo@hadj {\def\FBo@hadj {}}
+\@ifdefinable\FB@wadj  {\def\FB@wadj  {}}
+\@ifdefinable\FB@hadj  {\def\FB@hadj  {}}
+\@ifdefinable\FR@wadj  {\def\FR@wadj  {}}
+\@ifdefinable\FR@hadj  {\def\FR@hadj  {}}
+\@ifdefinable\FB@Bset  {\def\FB@Bset  {}}
+\DeclareFROpt{framestyle}{\@ifundefined{FB@#1@frame}%
+  {\let\FRifFBOX\@secondoftwo}{\let\FRifFBOX\@firstoftwo\def\FB@B@{#1}}}
+\DeclareFROpt{framearound}{\flrow@fr@round{#1}}
+\newcommand*\flrow@fr@round[1]{%
+ \caption@ifinlist{#1}{object,contents}{\let\FRifFBOX\@firstoftwo
+    \def\FB@BO@{FBo}%
+  }{\caption@ifinlist{#1}{floatbox,all}{\let\FRifFBOX\@firstoftwo
+    \def\FB@BO@{FB}%
+  }{\caption@ifinlist{#1}{row}{\let\FRifFBOX\@firstoftwo
+    \def\FB@BO@{FR}%
+  }{\caption@ifinlist{#1}{none}{\let\FRifFBOX\@secondoftwo
+  }{\flrow@error{Undefined framed object `#1'}%
+  }}}}}
+\@ifdefinable\FR@ifFIT{\let\FR@ifFIT\@secondoftwo}
+\@ifdefinable\FR@ifROWFILL{\let\FR@ifROWFILL\@secondoftwo}
+\DeclareFROpt{framefit}[0]{\flrow@setbool{FIT}{#1}}
+\@ifdefinable\flrow@@setROWFILL{}
+\@ifdefinable\flrow@leftfill{}\@ifdefinable\flrow@rightfill{}
+\DeclareFROpt{rowfill}[0]{\flrow@setbool{ROWFILL}{#1}}
+\DeclareFROpt{frameset}{\def\FB@Bset{#1}}
+\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}{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+    \@nameuse{FB@\FB@B@ @adj}}\relax}%
+  \@namedef{\FB@BO@ @frame}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+    \@nameuse{FB@\FB@B@ @frame}}%
+  \ifx\FR@frame\empty\else%\ifx\FB@frame\empty
+     \def\FB@hadj{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+       \@nameuse{FB@\FB@B@ @adj}}%
+     \def\FB@wadj{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+       \@nameuse{FB@\FB@B@ @adj}}\relax}%
+     \def\FB@frame{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
+       \@nameuse{FB@\FB@B@ @frame}}%
+  \fi%\fi
+  }
+\@ifdefinable\FRifFBOX{\let\FRifFBOX\@secondoftwo}
+\newcommand\FB@fbox@frame[1]{\hbox{%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\fbox{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\newcommand\FB@fbox@adj{\dimen@=2\fboxsep\advance\dimen@2\fboxrule}
+\newcommand\FB@fbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+\newcommand\FB@colorbox@frame[1]{\hbox{%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\@ifdefinable\FB@colorbox@adj{\let\FB@colorbox@adj\FB@fbox@adj}
+\newcommand\FB@colorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+\newcommand\FB@fcolorbox{\fbox}
+\newcommand\FB@fcolorcorners{}
+\@ifdefinable\FR@phantom{}\@ifdefinable\FRset@color{}
+\newcommand\FB@FRcolorbox@frame[1]{\hbox{\let\color@block\FRcolor@block
+  \let\FR@phantom\@firstofone\let\FRset@color\set@color\FB@fcolorcorners
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\@ifdefinable\FB@FRcolorbox@adj{\let\FB@FRcolorbox@adj\FB@fbox@adj}
+\newcommand\FB@FRcolorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
+\newcommand\FB@corners@frame[1]{\hbox{\let\color@block\FRcolor@block
+  \let\FR@phantom\phantom\let\FRset@color\relax\FB@fcolorcorners
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\colorbox{white}{#1}%
+  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
+\@ifdefinable\FB@corners@adj{\let\FB@corners@adj\FB@fbox@adj}
+\newcommand\FB@corners@reset{\fboxsep3\p@\fboxrule\z@}
+\newcommand\flrow@l@color@side[2]{{\let\unitlength\relax
+    \picture(\z@,\z@)(\z@,\z@)
+    \put(\z@,#1){{\flrow@ll@col@put}}
+    \put(\z@,#2){{\flrow@ul@col@put}}
+    \endpicture}}
+\newcommand\flrow@r@color@side[2]{{\let\unitlength\relax
+    \picture(\z@,\z@)(\z@,\z@)
+    \put(\z@,#1){{\flrow@lr@col@put}}
+    \put(\z@,#2){{\flrow@ur@col@put}}
+    \endpicture}}
+\newcommand\flrow@ll@col@put{}
+\newcommand\flrow@ul@col@put{}
+\newcommand\flrow@lr@col@put{}
+\newcommand\flrow@ur@col@put{}
+\newcommand\flrow@cboxcorners[4]{%
+    \def\flrow@ll@col@put{#1}%
+    \def\flrow@lr@col@put{#2}%
+    \def\flrow@ur@col@put{#3}%
+    \def\flrow@ul@col@put{#4}%
+    }
+\newcommand\FRcolorboxwd{\z@}
+\newcommand\FRcolorboxht{\z@}
+\newcommand\FRcolorboxdp{\z@}
+\def\FRcolor@block#1#2#3{%
+  {\FRset@color
+   \rlap{\@tempdima#1\edef\FRcolorboxwd{\the\@tempdima}\@tempdima#2\advance\@tempdima#3%
+   \edef\FRcolorboxht{\the\@tempdima}\@tempdima#3\edef\FRcolorboxdp{\the\@tempdima}%
+   \ifcolors@\else\let\FR@phantom\phantom\fi
+     \flrow@l@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
+     \FR@phantom{\vrule\@width#1\@height#2\@depth#3}%
+     \flrow@r@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
+    }}}
+\DeclareFROpt{colorframeset}{\flrow@fcolorbox{#1}}
+\DeclareFROpt{colorframecorners}{\flrow@fcolorcorners{#1}}
+\newcommand*\flrow@fcolorbox[1]{%
+  \@ifundefined{flrow@fcolorbox@#1}%
+    {\flrow@error{Undefined color box `#1'}}%
+    {\expandafter\let\expandafter\FB@fcolorbox
+     \csname flrow@fcolorbox@#1\endcsname}}
+\newcommand*\flrow@fcolorcorners[1]{%
+  \@ifundefined{flrow@fcolorcorners@#1}%
+    {\flrow@error{Undefined color box corners `#1'}}%
+    {\expandafter\let\expandafter\FB@fcolorcorners
+     \csname flrow@fcolorcorners@#1\endcsname}}
+\newcommand*\DeclareColorBox[2]{%
+  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
+   \long\@namedef{flrow@fcolorbox@#1}{#2}}}
+\newcommand*\DeclareCBoxCorners[5]{%
+  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
+   \long\@namedef{flrow@fcolorcorners@#1}{\flrow@cboxcorners{#2}{#3}{#4}{#5}}}}
+\@onlypreamble\DeclareColorBox
+\@onlypreamble\DeclareCBoxCorners
+\newcommand\flrow@load@colorpackage{\IfFileExists{color.sty}%
+    {\def\next{\RequirePackage{color}}}{\let\next\relax}\next}
+\AtBeginDocument{\flrow@load@colorpackage\let\flrow@load@colorpackage\relax}
+\DeclareFROpt{captionskip}{\def\captionskip{#1}%
+  \setlength\abovecaptionskip{#1}}
+\DeclareFROpt{footskip}{\def\floatfootskip{#1}}
+\newcommand\captionskip{10\p@}
+\newcommand\floatfootskip{\skip\@mpfootins}
+\DeclareFROpt{footnoterule}{\flrow@footrule{#1}}
+\newcommand\DeclareFloatFootnoterule[2]{%
+  \long\@namedef{flrow@fnrule@#1}{#2}}
+\newcommand*\flrow@footrule[1]{%
+  \@ifundefined{flrow@fnrule@#1}%
+    {\flrow@error{Undefined footnoterule `#1'}}%
+    {\let\@@FRabove\empty
+     \expandafter\let\expandafter\FBfootnoterule\csname
+       flrow@fnrule@#1\endcsname}}
+\@onlypreamble\DeclareFloatFootnoterule
+\DeclareFloatFootnoterule{normal}{\kern-3\p@
+  \@tempdima.4\columnwidth
+  \hrule\@width\@tempdima\kern2.6\p@}
+\DeclareFloatFootnoterule{limited}{\kern-3\p@
+  \@tempdima.4\columnwidth
+  \ifdim\@tempdima>\frulemax\@tempdima=\frulemax\fi
+  \hrule\@width\@tempdima\kern2.6\p@}
+\newcommand\frulemax{1in}
+\DeclareFloatFootnoterule{fullsize}{\kern-3\p@
+  \hrule\@width\hsize\kern2.6\p@}
+\DeclareFloatFootnoterule{none}{}
+\@ifdefinable\FBfootnoterule{\let\FBfootnoterule\footnoterule}
+\@ifdefinable\FR@iffancy{\let\FR@iffancy\@secondoftwo}
+\DeclareFROpt{fancyboxes}{\flrow@setbool{fancy}{#1}}
+\newcommand\DeclareFNOpt{%
+   \@ifstar{\flrow@declfnopt\AtBeginDocument}
+           {\flrow@declfnopt\@gobble}}
+\newcommand*\flrow@declfnopt[2]{%
+   #1{\undefine@key{newfloat}{#2}}\define@key{newfloat}{#2}}
+\@onlypreamble\DeclareFNOpt
+\@ifdefinable\flrow@types{\newtoks\flrow@types}
+\newcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
+  \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
+  \addtocounter{float@type}{\value{float@type}}%
+  \@namedef{#1name}{#1}\newcounter{#1}%
+  \expandafter\edef\csname fnum@#1\endcsname
+    {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
+       \expandafter\noexpand\csname the#1\endcsname}%
+  \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
+  \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
+  \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
+  \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
+  \@tempa}
+\@onlypreamble\DeclareNewFloatType
+\DeclareFNOpt*{placement}{\flnew@fps{#1}}
+\newcommand\flnew@fps[1]{\@namedef{fps@\FB@captype}{#1}}
+\@onlypreamble\flnew@fps
+\DeclareFNOpt*{name}{\flnew@fname{#1}}
+\newcommand\flnew@fname[1]{\@namedef{\FB@captype name}{#1}}
+\@onlypreamble\flnew@fname
+\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
+\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
+\def\ProcessOptionsWithKV#1{%
+  \let\@tempc\relax
+  \let\FR@tmp\@empty
+  \@for\CurrentOption:=\@classoptionslist\do{%
+    \@ifundefined{KV@#1@\CurrentOption}%
+    {}%
+    {%
+      \@ifundefined{KV@#1@\CurrentOption @default}{%
+       \PackageInfo{#1}{Global option `\CurrentOption' ignored}%
+      }{%
+      \PackageInfo{#1}{Global option `\CurrentOption' processed}%
+      \edef\FR@tmp{\FR@tmp,\CurrentOption,}%
+      \@expandtwoargs\@removeelement\CurrentOption
+        \@unusedoptionlist\@unusedoptionlist
+        }%
+    }%
+  }%
+  \edef\FR@tmp{%
+    \noexpand\caption@setkeys[floatrow]{#1}{%
+      \FR@tmp\@ptionlist{\@currname.\@currext}%
+    }%
+  }%
+  \FR@tmp
+  \let\CurrentOption\@empty
+  \AtEndOfPackage{\let\@unprocessedoptions\relax}}
+\ProcessOptionsWithKV{floatrow}
+\FR@iffancy{\RequirePackage{fr-fancy}}\relax
+\let\ProcessOptionsWithKV\undefined
+\AtBeginDocument{
+ \FR@ifrawfloats
+  {\let\FR@tmp\flrow@Raw@restyle
+ }{\flrow@restyle{table}\flrow@restyle{figure}%
+   \let\FR@tmp\flrow@restyle
+  }\the\flrow@types
+ \@onlypreamble\flrow@restyle\@onlypreamble\flrow@Raw@restyle
+ \flrow@types={}}
+\AtBeginDocument{%
+\@ifundefined{sf@@@subfloat}{\@tempswafalse}{\@tempswatrue}
+\if@tempswa\RequirePackage{fr-subfig}\fi}
+\AtBeginDocument{%
+\@ifundefined{LT@array}{\@tempswafalse}{\@tempswatrue}
+\if@tempswa\RequirePackage{fr-longtable}\fi}
+\endinput
+%%
+%% End of file `floatrow.sty'.
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v2 2/8] Apply workaround to floatrowpf.sty
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
  2017-07-31 14:44   ` [PATCH v2 1/8] Localize floatrow.sty as floatrowpf.sty Akira Yokosawa
@ 2017-07-31 14:46   ` Akira Yokosawa
  2017-07-31 14:47   ` [PATCH v2 3/8] Define 'listing' environment for style guide Akira Yokosawa
                     ` (8 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31 14:46 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 709e5350e4b9ca4435142c67fa3e05fe0748365c Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 20 Jul 2017 23:35:31 +0900
Subject: [PATCH v2 2/8] Apply workaround to floatrowpf.sty

Also modify package names in the sty file. They are output to
the log file as part of info or error messages.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 floatrowpf.sty | 38 ++++++++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 14 deletions(-)

diff --git a/floatrowpf.sty b/floatrowpf.sty
index 18ef28a..b98af62 100644
--- a/floatrowpf.sty
+++ b/floatrowpf.sty
@@ -1,4 +1,13 @@
-%%
+%%%
+%%% This is file `floatrowpf.sty', which is a modified version
+%%% of `floatrow.sty' to work around issues in two-column layout.
+%%% The possible workaround was posted at:
+%%% https://tex.stackexchange.com/questions/133127/
+%%%
+%%% Modified by Akira Yokosawa for perfbook project.
+%%%
+%%% Following is the original header:
+%%%
 %% This is file `floatrow.sty',
 %% generated with the docstrip utility.
 %%
@@ -21,16 +30,16 @@
 %% same distribution. (The sources need not necessarily be
 %% in the same archive or directory.)
 \NeedsTeXFormat{LaTeX2e}[1995/06/01]
-\ProvidesPackage{floatrow}
-       [2008/08/02 v0.3b floatrow: float package extension]
+\ProvidesPackage{floatrowpf}
+       [2017/07/17 v0.3b-ay floatrowpf: customized floatrow for perfbook]
 \@ifundefined{float@caption}{%
   \@ifundefined{rotfloat@float}{}%
-    {\PackageError{floatrow}{Do not use rotfloat package with floatrow.\MessageBreak
+    {\PackageError{floatrowpf}{Do not use rotfloat package with floatrowpf.\MessageBreak
         The latter will be skipped}{}%
-  \@namedef{opt@floatrow.sty}{}\endinput}}%
-  {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak
+  \@namedef{opt@floatrowpf.sty}{}\endinput}}%
+  {\PackageError{floatrowpf}{Do not use float package with floatrowpf.\MessageBreak
         The latter will be skipped}{}%
-  \@namedef{opt@floatrow.sty}{}\endinput}
+  \@namedef{opt@floatrowpf.sty}{}\endinput}
 \@namedef{ver@float.sty}{2001/11/08 v1.3d (excerpt)
     Float enhancements (AL)}
 \@namedef{ver@rotfloat.sty}{2004/01/04 v1.2 (excerpt)
@@ -38,7 +47,7 @@
 \RequirePackage{keyval}
 \RequirePackage{caption3}
 \@ifpackagelater{caption3}{2007/04/11 v3.0q}{}{\PackageError
-    {floatrow}{For a successful cooperation we need at least\MessageBreak
+    {floatrowpf}{For a successful cooperation we need at least\MessageBreak
     version `2007/04/11 v3.0q' of package caption,\MessageBreak
         but only version\MessageBreak
           `\csname ver@caption.\@pkgextension\endcsname'\MessageBreak
@@ -62,7 +71,7 @@
 \@ifundefined{c@figure}%
   {\setcounter{float@type}{1}}%
   {\setcounter{float@type}{4}}
-\newcommand\flrow@package{floatrow}
+\newcommand\flrow@package{floatrowpf}
 \newcommand*\flrow@error[1]{\PackageError\flrow@package{#1}\flrow@eh}
 \newcommand*\flrow@eh{%
   If you do not understand this error, please take look\MessageBreak
@@ -114,7 +123,8 @@
 \newcommand\flrow@restyle[1]{%
   \@namedef{#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
     \flrow@setlist{{#1}}%
-    \textwidth\columnwidth\edef\FBB@wd{\the\columnwidth}%
+    %\textwidth\columnwidth <-- error in two-column layout
+    \edef\FBB@wd{\the\columnwidth}%
     \FRifFBOX\@@setframe\relax\@@FStrue\@float{#1}}%
   \@namedef{#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
     \flrow@setlist{{#1}{widefloat}{wide#1}}%
@@ -452,7 +462,7 @@
   \@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}%
 \newcommand\float@addtolists[1]{%
   \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}
-\PackageInfo{floatrow}{Modified float package code loaded}
+\PackageInfo{floatrowpf}{Modified float package code loaded}
 \IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse}
 \if@tempswa
   \let\rotfloat@HH\@float@HH
@@ -470,7 +480,7 @@
       \@rotdblfloat{}[]%
       \ifFBbuild\rotfloat@@makebox{#1}\else\box\@currbox\fi
       \end@rotdblfloat}}
-\PackageInfo{floatrow}{Modified rotfloat package code loaded}
+\PackageInfo{floatrowpf}{Modified rotfloat package code loaded}
 \fi
 \@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat}
 \FR@everyfloat={\let\@footnotetext\@mpfootnotetext
@@ -516,7 +526,7 @@
   \@ifnextchar[{\FB@nc{#1}{#2}}{\FB@nc{#1}{#2}[]}}
 \newcommand\renewfloatcommand[2]{%
   \@ifundefined{#1}{}%
-    {\PackageInfo{floatrow}{Redefining \string#1}}%
+    {\PackageInfo{floatrowpf}{Redefining \string#1}}%
   \@ifnextchar[{\FB@nc{#1}{#2}}{\FB@nc{#1}{#2}[]}}
 \@ifdefinable\FB@nc{}\@ifdefinable\FB@@nc{}
 \def\FB@nc#1#2[#3]{%
@@ -1469,4 +1479,4 @@
 \if@tempswa\RequirePackage{fr-longtable}\fi}
 \endinput
 %%
-%% End of file `floatrow.sty'.
+%% End of file `floatrowpf.sty'.
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v2 3/8] Define 'listing' environment for style guide
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
  2017-07-31 14:44   ` [PATCH v2 1/8] Localize floatrow.sty as floatrowpf.sty Akira Yokosawa
  2017-07-31 14:46   ` [PATCH v2 2/8] Apply workaround to floatrowpf.sty Akira Yokosawa
@ 2017-07-31 14:47   ` Akira Yokosawa
  2017-07-31 14:49   ` [PATCH v2 4/8] styleguide: Add listing environment examples Akira Yokosawa
                     ` (7 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31 14:47 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 461d28b39c4d2ea05cda3fe4a256ee27677576fe Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 20 Jul 2017 23:42:40 +0900
Subject: [PATCH v2 3/8] Define 'listing' environment for style guide

Define an experimental floating environment for code snippet
to be used in style guide. It requires "floatrowpf" package
(customized floatrow).

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 perfbook.tex | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/perfbook.tex b/perfbook.tex
index cda014c..629ecea 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -80,6 +80,9 @@
 \renewcommand{\path}[1]{\nolinkurl{#1}} % workaround of interference with mathastext
 }{}

+\usepackage{floatrowpf} % Use customized floatrow
+\DeclareNewFloatType{listing}{placement=htbp,name=Listing,within=chapter,fileext=lst}
+
 \usepackage{bm} % for bold math mode fonts --- should be after math mode font choice

 \IfLmttForCode{


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v2 4/8] styleguide: Add listing environment examples
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
                     ` (2 preceding siblings ...)
  2017-07-31 14:47   ` [PATCH v2 3/8] Define 'listing' environment for style guide Akira Yokosawa
@ 2017-07-31 14:49   ` Akira Yokosawa
  2017-07-31 14:50   ` [PATCH v2 5/8] Disable 'floatrow' layout in manually aligned code snippets Akira Yokosawa
                     ` (6 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31 14:49 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 33da9b7a0ee4c525b7cd7079722d5a40d5079f37 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 20 Jul 2017 23:50:12 +0900
Subject: [PATCH v2 4/8] styleguide: Add listing environment examples

Add three examples:

  1) Caption at the bottom
  2) Caption at the top
  3) "Ruled" style

Example 2) and 3) change their looks by the floatrow's
"\thisfloatsetup{}" macro.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/hello.c        |  9 +++++++
 appendix/styleguide/styleguide.tex | 48 ++++++++++++++++++++++++++++++++++++--
 2 files changed, 55 insertions(+), 2 deletions(-)
 create mode 100644 appendix/styleguide/hello.c

diff --git a/appendix/styleguide/hello.c b/appendix/styleguide/hello.c
new file mode 100644
index 0000000..d35d93f
--- /dev/null
+++ b/appendix/styleguide/hello.c
@@ -0,0 +1,9 @@
+/*
+ * Sample Code Snippet
+ */
+#include <stdio.h>
+int main(void)
+{
+  printf("Hello world!\n");
+  return 0;
+}
diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index 72b8ca0..b04b62b 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -589,8 +589,21 @@ This section lists up such candidates.
 Strictly speaking, code snippets are \emph{not} figures.
 They deserve their own floating environment.
 The ``floatrow'' package would be of help.
+Figure~\ref{fig:app:styleguide:Sample Code Snippet}
+can be typeset as in
+Listing~\ref{lst:app:styleguide:Sample Code Snippet}
+using an experimental environment ``listing''.

-% TODO: Add example
+\begin{listing}
+{ \scriptsize
+\verbfilebox[{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}]
+	{appendix/styleguide/hello.c}
+}
+\centering
+\theverbbox
+\caption{Sample Code Snippet}
+\label{lst:app:styleguide:Sample Code Snippet}
+\end{listing}

 \subsubsection{Position of Caption}
 \label{sec:app:styleguide:Position of Caption}
@@ -604,8 +617,39 @@ The same can be said of code snippets, which are read from
 top to bottom.
 The floatrow package mentioned above also has the capability
 to adjust layout of caption.
+For example,
+Listing~\ref{lst:app:styleguide:Sample Code Snippet (Top)}
+has the option \qco{cappostion=top} in its preamble.

-% TODO: Add example
+\begin{listing}\RawFloats
+{ \scriptsize
+\verbfilebox[{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}]
+	{appendix/styleguide/hello.c}
+}
+\begin{floatrow}[1]\thisfloatsetup{capposition=top}
+  \floatbox{listing}[2.5in]{\caption{Sample Code Snippet (Top)}
+    \label{lst:app:styleguide:Sample Code Snippet (Top)}}{
+\theverbbox
+}
+\end{floatrow}
+\end{listing}
+
+For code snippets, the ``ruled'' style would look even better.
+Listing~\ref{lst:app:styleguide:Sample Code Snippet (Ruled)}
+is an example using the option \qco{style=ruled}.
+
+\begin{listing}\RawFloats
+{ \scriptsize
+\verbfilebox[{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}]
+	{appendix/styleguide/hello.c}
+}
+\begin{floatrow}[1]\thisfloatsetup{style=ruled}
+  \floatbox{listing}[2.5in]{\caption{Sample Code Snippet (Ruled)}
+    \label{lst:app:styleguide:Sample Code Snippet (Ruled)}}{
+\theverbbox
+}
+\end{floatrow}
+\end{listing}

 Once the conversion of code sippets to a new environment has
 completed, we would be able to choose one of the style options
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v2 5/8] Disable 'floatrow' layout in manually aligned code snippets
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
                     ` (3 preceding siblings ...)
  2017-07-31 14:49   ` [PATCH v2 4/8] styleguide: Add listing environment examples Akira Yokosawa
@ 2017-07-31 14:50   ` Akira Yokosawa
  2017-07-31 14:51   ` [PATCH v2 6/8] styleguide: Add example of grouping " Akira Yokosawa
                     ` (5 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31 14:50 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From b6806967d9ffbac1c992769e62e67c86134e2630 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 21 Jul 2017 00:02:37 +0900
Subject: [PATCH v2 5/8] Disable 'floatrow' layout in manually aligned code snippets

floatrow's default horizontal margin setting is "centering".
It conflicts with manually aligned code snippets in "figure*"
environments.

Disable the layout by \RawFloats macro for now.

These listings should be grouped into combined floating objects,
if we decide to employ the floatrow's feature.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 defer/rcuusage.tex | 6 +++---
 howto/howto.tex    | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/defer/rcuusage.tex b/defer/rcuusage.tex
index af4faff..f3174f3 100644
--- a/defer/rcuusage.tex
+++ b/defer/rcuusage.tex
@@ -603,7 +603,7 @@ and
 all taken from
 Wikipedia~\cite{WikipediaRCU}.

-\begin{figure*}[htbp]
+\begin{figure*}[htbp]\RawFloats
 { \scriptsize
 \begin{verbbox}
  1 struct el {                           1 struct el {
@@ -623,7 +623,7 @@ Wikipedia~\cite{WikipediaRCU}.
 \label{fig:defer:Converting Reader-Writer Locking to RCU: Data}
 \end{figure*}

-\begin{figure*}[htbp]
+\begin{figure*}[htbp]\RawFloats
 { \scriptsize
 \begin{verbbox}
  1 int search(long key, int *result)     1 int search(long key, int *result)
@@ -649,7 +649,7 @@ Wikipedia~\cite{WikipediaRCU}.
 \label{fig:defer:Converting Reader-Writer Locking to RCU: Search}
 \end{figure*}

-\begin{figure*}[htbp]
+\begin{figure*}[htbp]\RawFloats
 { \scriptsize
 \begin{verbbox}
  1 int delete(long key)                  1 int delete(long key)
diff --git a/howto/howto.tex b/howto/howto.tex
index 323f95f..af88c46 100644
--- a/howto/howto.tex
+++ b/howto/howto.tex
@@ -361,7 +361,7 @@ Other types of systems have well-known ways of locating files by filename.
 \section{Whose Book Is This?}
 \label{sec:howto:Whose Book Is This?}

-\begin{figure*}[tbp]
+\begin{figure*}[tbp]\RawFloats
 {
 \scriptsize
 \begin{verbbox}
@@ -379,7 +379,7 @@ Other types of systems have well-known ways of locating files by filename.
 \label{fig:howto:Creating a Up-To-Date PDF}
 \end{figure*}

-\begin{figure*}[tbp]
+\begin{figure*}[tbp]\RawFloats
 {
 \scriptsize
 \begin{verbbox}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v2 6/8] styleguide: Add example of grouping code snippets
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
                     ` (4 preceding siblings ...)
  2017-07-31 14:50   ` [PATCH v2 5/8] Disable 'floatrow' layout in manually aligned code snippets Akira Yokosawa
@ 2017-07-31 14:51   ` Akira Yokosawa
  2017-07-31 14:52   ` [PATCH v2 7/8] styleguide: Add example of preferred table layout using 'booktabs' Akira Yokosawa
                     ` (4 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31 14:51 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 8a66ba5902d512e0e5e9a2bea27b4542ff74b57d Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 21 Jul 2017 22:15:05 +0900
Subject: [PATCH v2 6/8] styleguide: Add example of grouping code snippets

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/styleguide.tex | 79 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 78 insertions(+), 1 deletion(-)

diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index b04b62b..f84ade8 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -669,7 +669,84 @@ The floatrow package provides the features to do so.\footnote{
   One problem of grouping figures might be the learning curve
   to do so.}

-% TODO: Add example
+For example,
+Figures~\ref{fig:advsync:Message-Passing Litmus Test}
+and~\ref{fig:advsync:Enforcing Order of Message-Passing Litmus Test}
+can be grouped together as in
+Listings~\ref{lst:app:styleguide:Message-Passing Litmus Test}
+and~\ref{lst:app:styleguide:Enforcing Order of Message-Passing Litmus Test}.
+
+\begin{listing*}\RawFloats
+{ \scriptsize
+\begin{verbbox}
+ 1 C C-MP+o-wmb-o+o-o.litmus
+ 2
+ 3 {
+ 4 }
+ 5
+ 6
+ 7 P0(int* x0, int* x1) {
+ 8
+ 9   WRITE_ONCE(*x0, 2);
+10   smp_wmb();
+11   WRITE_ONCE(*x1, 2);
+12
+13 }
+14
+15 P1(int* x0, int* x1) {
+16
+17   int r2;
+18   int r3;
+19
+20   r2 = READ_ONCE(*x1);
+21   r3 = READ_ONCE(*x0);
+22
+23 }
+24
+25 exists (1:r2=2 /\ 1:r3=0)
+\end{verbbox}
+}
+  \begin{floatrow}[2]\thisfloatsetup{style=ruled}
+    \floatbox{listing}[2.2in]{\caption{Message-Passing Litmus Test}
+      \label{lst:app:styleguide:Message-Passing Litmus Test}}{
+      \theverbbox
+}
+{ \scriptsize
+\begin{verbbox}
+ 1 C C-MP+o-wmb-o+o-rmb-o.litmus
+ 2
+ 3 {
+ 4 }
+ 5
+ 6 P0(int* x0, int* x1) {
+ 7
+ 8   WRITE_ONCE(*x0, 2);
+ 9   smp_wmb();
+10   WRITE_ONCE(*x1, 2);
+11
+12 }
+13
+14 P1(int* x0, int* x1) {
+15
+16   int r2;
+17   int r3;
+18
+19   r2 = READ_ONCE(*x1);
+20   smp_rmb();
+21   r3 = READ_ONCE(*x0);
+22
+23 }
+24
+25 exists (1:r2=2 /\ 1:r3=0)
+\end{verbbox}
+}
+    \thisfloatsetup{style=ruled}\hspace{1em}%
+    \floatbox{listing}[2.2in]{\caption{Enforcing Order of Message\-/Passing Litmus Test}
+      \label{lst:app:styleguide:Enforcing Order of Message-Passing Litmus Test}}{
+      \theverbbox
+}
+  \end{floatrow}
+\end{listing*}

 \subsubsection{Ruled Line in Table}
 \label{sec:app:styleguide:Ruled Line in Table}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v2 7/8] styleguide: Add example of preferred table layout using 'booktabs'
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
                     ` (5 preceding siblings ...)
  2017-07-31 14:51   ` [PATCH v2 6/8] styleguide: Add example of grouping " Akira Yokosawa
@ 2017-07-31 14:52   ` Akira Yokosawa
  2017-07-31 14:52   ` [PATCH v2 8/8] styleguide: Tweak layout of 'Limitation' table Akira Yokosawa
                     ` (3 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31 14:52 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 5845c0f3d977aa65f167bba16ceace693e47764a Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 21 Jul 2017 22:31:43 +0900
Subject: [PATCH v2 7/8] styleguide: Add example of preferred table layout using 'booktabs'

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/styleguide.tex | 35 ++++++++++++++++++++++++++++++++++-
 perfbook.tex                       |  1 +
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index f84ade8..ac95364 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -758,7 +758,40 @@ look ugly.\footnote{
 Vertical lines should be avoided and horizontal lines should be
 used sparingly, especially in tables of simple structure.

-% TODO: Add example
+For example,
+Table~\ref{tab:cpu:Performance of Synchronization Mechanisms on 4-CPU 1.8GHz AMD Opteron 844 System}
+can be tweaked by the help of ``booktabs'' package as is shown in
+Table~\ref{tab:app:styleguide:Performance of Synchronization Mechanisms of 4-CPU 1.8GHz AMD Opteron 844 System},
+with the caption at the top.
+
+\begin{table}[htb]\RawFloats
+\renewcommand*{\arraystretch}{1.2}
+\begin{floatrow}[1]\ttabbox[]{
+\small
+\begin{tabular}{@{}lrr@{}}\toprule
+				& 	 	& Ratio \\
+	Operation		& Cost (ns) 	& (cost/clock) \\
+	\midrule
+	Clock period		&           0.6	&           1.0 \\
+	Best-case CAS		&          37.9	&          63.2 \\
+	Best-case lock		&          65.6	&         109.3 \\
+	Single cache miss	&         139.5	&         232.5 \\
+	CAS cache miss		&         306.0	&         510.0 \\
+	Comms Fabric		&       5,000\textcolor{white}{.0}
+						&       8,330\textcolor{white}{.0}
+								\\
+	Global Comms		& 195,000,000\textcolor{white}{.0}
+						& 325,000,000\textcolor{white}{.0} \\
+\bottomrule
+\end{tabular}}{
+\caption{Performance of Synchronization Mechanisms of 4-CPU 1.8\,GHz AMD Opteron 844 System}
+\label{tab:app:styleguide:Performance of Synchronization Mechanisms of 4-CPU 1.8GHz AMD Opteron 844 System}
+}
+\end{floatrow}
+\end{table}
+
+Note that ruled lines of booktabs can not be mixed with
+vertical lines in a table.

 \subsubsection{Miscellaneous Candidates}
 \label{sec:app:styleguide:Miscellaneous Candidates}
diff --git a/perfbook.tex b/perfbook.tex
index 629ecea..16d30dd 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -82,6 +82,7 @@

 \usepackage{floatrowpf} % Use customized floatrow
 \DeclareNewFloatType{listing}{placement=htbp,name=Listing,within=chapter,fileext=lst}
+\usepackage{booktabs} % For better looking tables

 \usepackage{bm} % for bold math mode fonts --- should be after math mode font choice

-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH v2 8/8] styleguide: Tweak layout of 'Limitation' table
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
                     ` (6 preceding siblings ...)
  2017-07-31 14:52   ` [PATCH v2 7/8] styleguide: Add example of preferred table layout using 'booktabs' Akira Yokosawa
@ 2017-07-31 14:52   ` Akira Yokosawa
  2017-07-31 15:24   ` [PATCH v2 0/8] Add style guide Akira Yokosawa
                     ` (2 subsequent siblings)
  10 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31 14:52 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 28 Jul 2017 16:46:48 +0900
Subject: [PATCH v2 8/8] styleguide: Tweak layout of 'Limitation' table

Move caption to top, and use nice ruled lines of "booktabs".

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/styleguide.tex | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index ac95364..6f5236f 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -389,15 +389,20 @@ Table~\ref{tab:app:styleguide:Limitation of Monospace Macro}
 lists such limitations.

 \begin{table}[tbh]
-\centering\footnotesize
-\begin{tabular}{lll}
+  \renewcommand*{\arraystretch}{1.2}
+  \begin{floatrow}[1]
+    \ttabbox[\columnwidth]{
+\footnotesize
+\begin{tabular}{@{}lll@{}}\toprule
   Macro &  Need Escape & Should Avoid \\
-  \hline
+  \midrule
   \co{\\co}, \co{\\nbco} & \co{\\}, \%, \{, \} & \\
   \co{\\tco}  & \# & \%, \{, \}, \co{\\} \\
+\bottomrule
 \end{tabular}
-\caption{Limitation of Monospace Macro}
-\label{tab:app:styleguide:Limitation of Monospace Macro}
+}{\caption{Limitation of Monospace Macro}
+    \label{tab:app:styleguide:Limitation of Monospace Macro}}
+  \end{floatrow}
 \end{table}

 While \verb|\co{}| requires some characters to be escaped,
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* Re: [PATCH v2 0/8] Add style guide
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
                     ` (7 preceding siblings ...)
  2017-07-31 14:52   ` [PATCH v2 8/8] styleguide: Tweak layout of 'Limitation' table Akira Yokosawa
@ 2017-07-31 15:24   ` Akira Yokosawa
  2017-07-31 15:55     ` Paul E. McKenney
  2017-07-31 15:57   ` Paul E. McKenney
  2017-08-01 20:40   ` Paul E. McKenney
  10 siblings, 1 reply; 40+ messages in thread
From: Akira Yokosawa @ 2017-07-31 15:24 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

On 2017/07/31 23:43, Akira Yokosawa wrote:
>>From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Mon, 31 Jul 2017 23:20:57 +0900
> Subject: [PATCH v2 0/8] Add style guide
> 
> Hi Paul,
> 
> This is the respin I mentioned earlier.
> Patch #2 has a few more changes from v1 to modify strings of package name.
> Other than that, the end result should be the same as v1.
> 
> Note on the status of the floatrow package:
> 
> Current version v0.3b was revised 2009/08/02.
> There has been no update since.
> I'm not sure if upstreaming is possible.

And I tried to send a message to the author's email address given in
the documentation of the package. It resulted in "User unknown".

> 
>         Thanks, Akira
> --
> Akira Yokosawa (8):
>   Localize floatrow.sty as floatrowpf.sty
>   Apply workaround to floatrowpf.sty
>   Define 'listing' environment for style guide
>   styleguide: Add listing environment examples
>   Disable 'floatrow' layout in manually aligned code snippets
>   styleguide: Add example of grouping code snippets
>   styleguide: Add example of preferred table layout using 'booktabs'
>   styleguide: Tweak layout of 'Limitation' table
> 
>  appendix/styleguide/hello.c        |    9 +
>  appendix/styleguide/styleguide.tex |  177 ++++-
>  defer/rcuusage.tex                 |    6 +-
>  floatrowpf.sty                     | 1482 ++++++++++++++++++++++++++++++++++++
>  howto/howto.tex                    |    4 +-
>  perfbook.tex                       |    4 +
>  6 files changed, 1668 insertions(+), 14 deletions(-)
>  create mode 100644 appendix/styleguide/hello.c
>  create mode 100644 floatrowpf.sty
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v2 0/8] Add style guide
  2017-07-31 15:24   ` [PATCH v2 0/8] Add style guide Akira Yokosawa
@ 2017-07-31 15:55     ` Paul E. McKenney
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. McKenney @ 2017-07-31 15:55 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Tue, Aug 01, 2017 at 12:24:48AM +0900, Akira Yokosawa wrote:
> On 2017/07/31 23:43, Akira Yokosawa wrote:
> >>From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
> > From: Akira Yokosawa <akiyks@gmail.com>
> > Date: Mon, 31 Jul 2017 23:20:57 +0900
> > Subject: [PATCH v2 0/8] Add style guide
> > 
> > Hi Paul,
> > 
> > This is the respin I mentioned earlier.
> > Patch #2 has a few more changes from v1 to modify strings of package name.
> > Other than that, the end result should be the same as v1.
> > 
> > Note on the status of the floatrow package:
> > 
> > Current version v0.3b was revised 2009/08/02.
> > There has been no update since.
> > I'm not sure if upstreaming is possible.
> 
> And I tried to send a message to the author's email address given in
> the documentation of the package. It resulted in "User unknown".

That does make it hard to report a bug...  I have to ask if there are
any appropriate email lists.

Someday I will tell you my story about the "bc" command.  :-(

							Thanx, Paul

> >         Thanks, Akira
> > --
> > Akira Yokosawa (8):
> >   Localize floatrow.sty as floatrowpf.sty
> >   Apply workaround to floatrowpf.sty
> >   Define 'listing' environment for style guide
> >   styleguide: Add listing environment examples
> >   Disable 'floatrow' layout in manually aligned code snippets
> >   styleguide: Add example of grouping code snippets
> >   styleguide: Add example of preferred table layout using 'booktabs'
> >   styleguide: Tweak layout of 'Limitation' table
> > 
> >  appendix/styleguide/hello.c        |    9 +
> >  appendix/styleguide/styleguide.tex |  177 ++++-
> >  defer/rcuusage.tex                 |    6 +-
> >  floatrowpf.sty                     | 1482 ++++++++++++++++++++++++++++++++++++
> >  howto/howto.tex                    |    4 +-
> >  perfbook.tex                       |    4 +
> >  6 files changed, 1668 insertions(+), 14 deletions(-)
> >  create mode 100644 appendix/styleguide/hello.c
> >  create mode 100644 floatrowpf.sty
> > 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v2 0/8] Add style guide
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
                     ` (8 preceding siblings ...)
  2017-07-31 15:24   ` [PATCH v2 0/8] Add style guide Akira Yokosawa
@ 2017-07-31 15:57   ` Paul E. McKenney
  2017-08-01 20:40   ` Paul E. McKenney
  10 siblings, 0 replies; 40+ messages in thread
From: Paul E. McKenney @ 2017-07-31 15:57 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Mon, Jul 31, 2017 at 11:43:41PM +0900, Akira Yokosawa wrote:
> >From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Mon, 31 Jul 2017 23:20:57 +0900
> Subject: [PATCH v2 0/8] Add style guide
> 
> Hi Paul,
> 
> This is the respin I mentioned earlier.
> Patch #2 has a few more changes from v1 to modify strings of package name.
> Other than that, the end result should be the same as v1.
> 
> Note on the status of the floatrow package:
> 
> Current version v0.3b was revised 2009/08/02.
> There has been no update since.
> I'm not sure if upstreaming is possible.

Thank you for the quick respin!  3/8 and 7/8 haven't made it here yet,
will look at this once they appear.

							Thanx, Paul

>         Thanks, Akira
> --
> Akira Yokosawa (8):
>   Localize floatrow.sty as floatrowpf.sty
>   Apply workaround to floatrowpf.sty
>   Define 'listing' environment for style guide
>   styleguide: Add listing environment examples
>   Disable 'floatrow' layout in manually aligned code snippets
>   styleguide: Add example of grouping code snippets
>   styleguide: Add example of preferred table layout using 'booktabs'
>   styleguide: Tweak layout of 'Limitation' table
> 
>  appendix/styleguide/hello.c        |    9 +
>  appendix/styleguide/styleguide.tex |  177 ++++-
>  defer/rcuusage.tex                 |    6 +-
>  floatrowpf.sty                     | 1482 ++++++++++++++++++++++++++++++++++++
>  howto/howto.tex                    |    4 +-
>  perfbook.tex                       |    4 +
>  6 files changed, 1668 insertions(+), 14 deletions(-)
>  create mode 100644 appendix/styleguide/hello.c
>  create mode 100644 floatrowpf.sty
> 
> -- 
> 2.7.4
> 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v2 0/8] Add style guide
  2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
                     ` (9 preceding siblings ...)
  2017-07-31 15:57   ` Paul E. McKenney
@ 2017-08-01 20:40   ` Paul E. McKenney
  2017-08-02 14:57     ` Akira Yokosawa
  10 siblings, 1 reply; 40+ messages in thread
From: Paul E. McKenney @ 2017-08-01 20:40 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Mon, Jul 31, 2017 at 11:43:41PM +0900, Akira Yokosawa wrote:
> >From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Mon, 31 Jul 2017 23:20:57 +0900
> Subject: [PATCH v2 0/8] Add style guide
> 
> Hi Paul,
> 
> This is the respin I mentioned earlier.
> Patch #2 has a few more changes from v1 to modify strings of package name.
> Other than that, the end result should be the same as v1.

Having a style guide is very good -- for one thing, it allows me to
copy and paste from a uniform set of examples as opposed to whatever
example happens to be at hand.  ;-)

So thank you very much!!!

> Note on the status of the floatrow package:
> 
> Current version v0.3b was revised 2009/08/02.
> There has been no update since.
> I'm not sure if upstreaming is possible.

If we have to maintain our own, so it goes.

The missing two patches eventually showed up, so I applied them.

Some comments:

o	I have misgivings about thin spaces instead of commas for
	numbers.  I do understand the concern, given that many of our
	European readers are used to 1.234.567,89 instead of 1,234,567.89.
	My problem is that the NIST convention sounds like one of those
	compromises that makes things worse for everyone.

	But let's see what I think in a year or two.

o	I don't have an objection to the NIST percent convention.
	Let's face it, the percent character is a pain in LaTeX
	no matter what.  ;-)

o	I would definitely consider patches to improve the math.

o	I like the idea of autonumbering, but not if it requires
	the code being in separate files.  Now, I have toyed with
	the idea of automatically extracting the code from the
	CodeSamples directory, but haven't yet come up with anything
	satisfactory.

	The automation would probably make for more failures to
	update line-number references in the text, but then again
	that sometimes happens with the current arrangements.

o	I am not all that much a fan of captions at the tops of tables,
	but it is a very common convention, so I will accept patches
	converting tables to that format.

o	The ruled code (as in Listings D.3, D.4, and D.5) does look nice.
	Listing D.2 looks quite strange to me.  I would be happy to
	accept patches to make the listings look like Listing D.3.

o	In https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf,
	I find the examples from The Economist to be much more attractive
	than his example tables.  Not sure whether LaTeX is up to all
	that without excessive formatting pain, though.  ;-)

	If it is easy to do, it would be interesting to see what
	Table D.2 would look like with The-Economist-style dashed
	lines between the rows.

o	Putting related code side by side as in Listings D.4 and D.5
	could be quite useful.  I did this manually in a few places,
	for example, Figures 9.38-9.40.  Maybe these would look better
	as floatrows.

And the comment at the end:

% Capitalize initialism:
%    Gnu Compiler Collection = GCC
%    gcc should be used as a command name in \co{gcc}
%    When mentioning GCC's C language, use `GNU C'

I have been rather random here, and it would be good to have a
standard.  The one above looks fine to me.

% Trademarks:
%    As the Legal page covers trademarks, there is no need to
%    use trademark symbol in the text. They seems to have been
%    imported from original publications.

Indeed they have!

% Power or POWER?
%    IBM's trademark page at https://www.ibm.com/legal/us/en/copytrade.shtml#section-P
%    lists the following.
%        PowerPC
%        Power Architecture
%        Power
%        POWER
%        POWER5
%        POWER6
%
%    not Power5, POWER 5, nor Power-5

IBM's preferences have changed over time, so I end up importing
whatever was the style at the time of publication.  :-/

Again, consistency would be good, but IBM's preferences are likely
to continue to change over time.

What would you suggest?

% Ugly line break by \co{}
%                                 __
%        atomic_store()
%
%                           seqlock_
%        t
%
%   Is there any way to prevent these breaks?
%   Maybe we need an on-the-fly script to convert such \co{}s
%   to couples of \co{}s.
%   Example:
%     \co{__atomic_store()} -> \co{__}\co{atomic_store()}
%     \co{seqlock_t} ->        \co{seqlock_}\co{t}

As long as it is automated!  ;-)

Overall, my main goal here is making the book more attractive and
easier to read -- not so much conventions for conventions sake.

							Thanx, Paul

>         Thanks, Akira
> --
> Akira Yokosawa (8):
>   Localize floatrow.sty as floatrowpf.sty
>   Apply workaround to floatrowpf.sty
>   Define 'listing' environment for style guide
>   styleguide: Add listing environment examples
>   Disable 'floatrow' layout in manually aligned code snippets
>   styleguide: Add example of grouping code snippets
>   styleguide: Add example of preferred table layout using 'booktabs'
>   styleguide: Tweak layout of 'Limitation' table
> 
>  appendix/styleguide/hello.c        |    9 +
>  appendix/styleguide/styleguide.tex |  177 ++++-
>  defer/rcuusage.tex                 |    6 +-
>  floatrowpf.sty                     | 1482 ++++++++++++++++++++++++++++++++++++
>  howto/howto.tex                    |    4 +-
>  perfbook.tex                       |    4 +
>  6 files changed, 1668 insertions(+), 14 deletions(-)
>  create mode 100644 appendix/styleguide/hello.c
>  create mode 100644 floatrowpf.sty
> 
> -- 
> 2.7.4
> 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v2 0/8] Add style guide
  2017-08-01 20:40   ` Paul E. McKenney
@ 2017-08-02 14:57     ` Akira Yokosawa
  2017-08-02 16:29       ` Paul E. McKenney
  0 siblings, 1 reply; 40+ messages in thread
From: Akira Yokosawa @ 2017-08-02 14:57 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

On 2017/08/01 13:40:47 -0700, Paul E. McKenney wrote:
> On Mon, Jul 31, 2017 at 11:43:41PM +0900, Akira Yokosawa wrote:
>> >From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
>> From: Akira Yokosawa <akiyks@gmail.com>
>> Date: Mon, 31 Jul 2017 23:20:57 +0900
>> Subject: [PATCH v2 0/8] Add style guide
>>
>> Hi Paul,
>>
>> This is the respin I mentioned earlier.
>> Patch #2 has a few more changes from v1 to modify strings of package name.
>> Other than that, the end result should be the same as v1.
> 
> Having a style guide is very good -- for one thing, it allows me to
> copy and paste from a uniform set of examples as opposed to whatever
> example happens to be at hand.  ;-)
> 
> So thank you very much!!!

Glad to know you like it!

> 
>> Note on the status of the floatrow package:
>>
>> Current version v0.3b was revised 2009/08/02.
>> There has been no update since.
>> I'm not sure if upstreaming is possible.
> 
> If we have to maintain our own, so it goes.
> 
> The missing two patches eventually showed up, so I applied them.
> 
> Some comments:
> 
> o	I have misgivings about thin spaces instead of commas for
> 	numbers.  I do understand the concern, given that many of our
> 	European readers are used to 1.234.567,89 instead of 1,234,567.89.
> 	My problem is that the NIST convention sounds like one of those
> 	compromises that makes things worse for everyone.
> 
> 	But let's see what I think in a year or two.

Maybe in another decade??? ;-)

> 
> o	I don't have an objection to the NIST percent convention.
> 	Let's face it, the percent character is a pain in LaTeX
> 	no matter what.  ;-)
> 
> o	I would definitely consider patches to improve the math.
> 
> o	I like the idea of autonumbering, but not if it requires
> 	the code being in separate files.

No, separate files are not required.
The LaTeX source of the code snippet cannot be embedded in \verbbox{}
because of the LaTeX commands therein, but \verbbox{} of C sources can
have the same option as the \verbfilebox{}.
By defining the option as a macro, it would be easier to convert to
auto-numbering scheme.

                                           Now, I have toyed with
> 	the idea of automatically extracting the code from the
> 	CodeSamples directory, but haven't yet come up with anything
> 	satisfactory.

Besides the adjustment of indentation, there need to be some way to
specify the part of the code you want to include as a code snippet.

> 
> 	The automation would probably make for more failures to
> 	update line-number references in the text, but then again
> 	that sometimes happens with the current arrangements.
> 
> o	I am not all that much a fan of captions at the tops of tables,
> 	but it is a very common convention, so I will accept patches
> 	converting tables to that format.

Position of captions can be specified in perfbook.tex for each type of float.
So it should be easy to choose a layout of your choice without any
modification of the source of tables, similar to the monospace font choice.

> 
> o	The ruled code (as in Listings D.3, D.4, and D.5) does look nice.
> 	Listing D.2 looks quite strange to me.  I would be happy to
> 	accept patches to make the listings look like Listing D.3.

Before such style adjustment, we need to convert those code snippets
to the "listings" environment. It will involve changes of label names and
its references, and the citing words "Figure" need to be changed to "Listing".

Those changes would be larger than the conversion from verbatim to verbbox.

> 
> o	In https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf,
> 	I find the examples from The Economist to be much more attractive
> 	than his example tables.  Not sure whether LaTeX is up to all
> 	that without excessive formatting pain, though.  ;-)
> 
> 	If it is easy to do, it would be interesting to see what
> 	Table D.2 would look like with The-Economist-style dashed
> 	lines between the rows.

There is a package named "arydshln". It provides dashed rules for tables.
But it conflicts with "tabulary" package. I'll see what I can.

> 
> o	Putting related code side by side as in Listings D.4 and D.5
> 	could be quite useful.  I did this manually in a few places,
> 	for example, Figures 9.38-9.40.  Maybe these would look better
> 	as floatrows.
> 
> And the comment at the end:
> 
> % Capitalize initialism:
> %    Gnu Compiler Collection = GCC
> %    gcc should be used as a command name in \co{gcc}
> %    When mentioning GCC's C language, use `GNU C'
> 
> I have been rather random here, and it would be good to have a
> standard.  The one above looks fine to me.
> 
> % Trademarks:
> %    As the Legal page covers trademarks, there is no need to
> %    use trademark symbol in the text. They seems to have been
> %    imported from original publications.
> 
> Indeed they have!
> 
> % Power or POWER?
> %    IBM's trademark page at https://www.ibm.com/legal/us/en/copytrade.shtml#section-P
> %    lists the following.
> %        PowerPC
> %        Power Architecture
> %        Power
> %        POWER
> %        POWER5
> %        POWER6
> %
> %    not Power5, POWER 5, nor Power-5
> 
> IBM's preferences have changed over time, so I end up importing
> whatever was the style at the time of publication.  :-/
> 
> Again, consistency would be good, but IBM's preferences are likely
> to continue to change over time.
> 
> What would you suggest?

What about defining a  macro named "\Power{}", which can be used like
\Power{5} in the source code? If IBM's preference changes, we can
change the definition accordingly.

> 
> % Ugly line break by \co{}
> %                                 __
> %        atomic_store()
> %
> %                           seqlock_
> %        t
> %
> %   Is there any way to prevent these breaks?
> %   Maybe we need an on-the-fly script to convert such \co{}s
> %   to couples of \co{}s.
> %   Example:
> %     \co{__atomic_store()} -> \co{__}\co{atomic_store()}
> %     \co{seqlock_t} ->        \co{seqlock_}\co{t}
> 
> As long as it is automated!  ;-)
> 
> Overall, my main goal here is making the book more attractive and
> easier to read -- not so much conventions for conventions sake.

Yes, I think I understand.

If I'm guessing right, you are in the middle of updating the memory
barriers section.
If the transition to auto-numbering helps in adding new code snippets,
I can generate an example patch of a (say) litmus test.

The other changes can wait after the upcoming release, I suppose.

        Thanks, Akira

> 
> 							Thanx, Paul
> 
>>         Thanks, Akira
>> --
>> Akira Yokosawa (8):
>>   Localize floatrow.sty as floatrowpf.sty
>>   Apply workaround to floatrowpf.sty
>>   Define 'listing' environment for style guide
>>   styleguide: Add listing environment examples
>>   Disable 'floatrow' layout in manually aligned code snippets
>>   styleguide: Add example of grouping code snippets
>>   styleguide: Add example of preferred table layout using 'booktabs'
>>   styleguide: Tweak layout of 'Limitation' table
>>
>>  appendix/styleguide/hello.c        |    9 +
>>  appendix/styleguide/styleguide.tex |  177 ++++-
>>  defer/rcuusage.tex                 |    6 +-
>>  floatrowpf.sty                     | 1482 ++++++++++++++++++++++++++++++++++++
>>  howto/howto.tex                    |    4 +-
>>  perfbook.tex                       |    4 +
>>  6 files changed, 1668 insertions(+), 14 deletions(-)
>>  create mode 100644 appendix/styleguide/hello.c
>>  create mode 100644 floatrowpf.sty
>>
>> -- 
>> 2.7.4
>>
>>
> 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v2 0/8] Add style guide
  2017-08-02 14:57     ` Akira Yokosawa
@ 2017-08-02 16:29       ` Paul E. McKenney
  2017-08-02 22:22         ` Akira Yokosawa
  0 siblings, 1 reply; 40+ messages in thread
From: Paul E. McKenney @ 2017-08-02 16:29 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Wed, Aug 02, 2017 at 11:57:33PM +0900, Akira Yokosawa wrote:
> On 2017/08/01 13:40:47 -0700, Paul E. McKenney wrote:
> > On Mon, Jul 31, 2017 at 11:43:41PM +0900, Akira Yokosawa wrote:
> >> >From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
> >> From: Akira Yokosawa <akiyks@gmail.com>
> >> Date: Mon, 31 Jul 2017 23:20:57 +0900
> >> Subject: [PATCH v2 0/8] Add style guide
> >>
> >> Hi Paul,
> >>
> >> This is the respin I mentioned earlier.
> >> Patch #2 has a few more changes from v1 to modify strings of package name.
> >> Other than that, the end result should be the same as v1.
> > 
> > Having a style guide is very good -- for one thing, it allows me to
> > copy and paste from a uniform set of examples as opposed to whatever
> > example happens to be at hand.  ;-)
> > 
> > So thank you very much!!!
> 
> Glad to know you like it!
> 
> >> Note on the status of the floatrow package:
> >>
> >> Current version v0.3b was revised 2009/08/02.
> >> There has been no update since.
> >> I'm not sure if upstreaming is possible.
> > 
> > If we have to maintain our own, so it goes.
> > 
> > The missing two patches eventually showed up, so I applied them.
> > 
> > Some comments:
> > 
> > o	I have misgivings about thin spaces instead of commas for
> > 	numbers.  I do understand the concern, given that many of our
> > 	European readers are used to 1.234.567,89 instead of 1,234,567.89.
> > 	My problem is that the NIST convention sounds like one of those
> > 	compromises that makes things worse for everyone.
> > 
> > 	But let's see what I think in a year or two.
> 
> Maybe in another decade??? ;-)

Hey, a decade is less than 20% of my lifespan thus far.  ;-)

> > o	I don't have an objection to the NIST percent convention.
> > 	Let's face it, the percent character is a pain in LaTeX
> > 	no matter what.  ;-)
> > 
> > o	I would definitely consider patches to improve the math.
> > 
> > o	I like the idea of autonumbering, but not if it requires
> > 	the code being in separate files.
> 
> No, separate files are not required.
> The LaTeX source of the code snippet cannot be embedded in \verbbox{}
> because of the LaTeX commands therein, but \verbbox{} of C sources can
> have the same option as the \verbfilebox{}.
> By defining the option as a macro, it would be easier to convert to
> auto-numbering scheme.

The main value is not the auto-numbering, given that I have to do
tab-to-space conversion anyway, and I have one script that does both.
(See utilities/c2latex.sh and utilities/latex2c.sh.)  Though I do admit
that auto-numbering would make trivial edits easier.

The win is the prettier format.

>                                            Now, I have toyed with
> > 	the idea of automatically extracting the code from the
> > 	CodeSamples directory, but haven't yet come up with anything
> > 	satisfactory.
> 
> Besides the adjustment of indentation, there need to be some way to
> specify the part of the code you want to include as a code snippet.

And it might or might not be worth it.  It has not been worth it thus
far, but who knows?

> > 	The automation would probably make for more failures to
> > 	update line-number references in the text, but then again
> > 	that sometimes happens with the current arrangements.
> > 
> > o	I am not all that much a fan of captions at the tops of tables,
> > 	but it is a very common convention, so I will accept patches
> > 	converting tables to that format.
> 
> Position of captions can be specified in perfbook.tex for each type of float.
> So it should be easy to choose a layout of your choice without any
> modification of the source of tables, similar to the monospace font choice.

OK, even better!

> > o	The ruled code (as in Listings D.3, D.4, and D.5) does look nice.
> > 	Listing D.2 looks quite strange to me.  I would be happy to
> > 	accept patches to make the listings look like Listing D.3.
> 
> Before such style adjustment, we need to convert those code snippets
> to the "listings" environment. It will involve changes of label names and
> its references, and the citing words "Figure" need to be changed to "Listing".
> 
> Those changes would be larger than the conversion from verbatim to verbbox.

Maybe chapter by chapter?  Your suggestion of starting with the litmus
tests in the updated memory-barriers section sounds good.  (And yes,
I have been stalled by other work, but will be on this no later than
the week of August 21st.)

> > o	In https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf,
> > 	I find the examples from The Economist to be much more attractive
> > 	than his example tables.  Not sure whether LaTeX is up to all
> > 	that without excessive formatting pain, though.  ;-)
> > 
> > 	If it is easy to do, it would be interesting to see what
> > 	Table D.2 would look like with The-Economist-style dashed
> > 	lines between the rows.
> 
> There is a package named "arydshln". It provides dashed rules for tables.
> But it conflicts with "tabulary" package. I'll see what I can.

Ouch!  Well, at least a package exists, I suppose.

> > o	Putting related code side by side as in Listings D.4 and D.5
> > 	could be quite useful.  I did this manually in a few places,
> > 	for example, Figures 9.38-9.40.  Maybe these would look better
> > 	as floatrows.
> > 
> > And the comment at the end:
> > 
> > % Capitalize initialism:
> > %    Gnu Compiler Collection = GCC
> > %    gcc should be used as a command name in \co{gcc}
> > %    When mentioning GCC's C language, use `GNU C'
> > 
> > I have been rather random here, and it would be good to have a
> > standard.  The one above looks fine to me.
> > 
> > % Trademarks:
> > %    As the Legal page covers trademarks, there is no need to
> > %    use trademark symbol in the text. They seems to have been
> > %    imported from original publications.
> > 
> > Indeed they have!
> > 
> > % Power or POWER?
> > %    IBM's trademark page at https://www.ibm.com/legal/us/en/copytrade.shtml#section-P
> > %    lists the following.
> > %        PowerPC
> > %        Power Architecture
> > %        Power
> > %        POWER
> > %        POWER5
> > %        POWER6
> > %
> > %    not Power5, POWER 5, nor Power-5
> > 
> > IBM's preferences have changed over time, so I end up importing
> > whatever was the style at the time of publication.  :-/
> > 
> > Again, consistency would be good, but IBM's preferences are likely
> > to continue to change over time.
> > 
> > What would you suggest?
> 
> What about defining a  macro named "\Power{}", which can be used like
> \Power{5} in the source code? If IBM's preference changes, we can
> change the definition accordingly.

The definition might end up with special cases over time, but better than
massive repeated rounds of search-and-replace.  ;-)

> > % Ugly line break by \co{}
> > %                                 __
> > %        atomic_store()
> > %
> > %                           seqlock_
> > %        t
> > %
> > %   Is there any way to prevent these breaks?
> > %   Maybe we need an on-the-fly script to convert such \co{}s
> > %   to couples of \co{}s.
> > %   Example:
> > %     \co{__atomic_store()} -> \co{__}\co{atomic_store()}
> > %     \co{seqlock_t} ->        \co{seqlock_}\co{t}
> > 
> > As long as it is automated!  ;-)
> > 
> > Overall, my main goal here is making the book more attractive and
> > easier to read -- not so much conventions for conventions sake.
> 
> Yes, I think I understand.
> 
> If I'm guessing right, you are in the middle of updating the memory
> barriers section.
> If the transition to auto-numbering helps in adding new code snippets,
> I can generate an example patch of a (say) litmus test.
> 
> The other changes can wait after the upcoming release, I suppose.

That sounds very good!  I am hoping to release by the end of August or
September, FWIW.

							Thanx, Paul

>         Thanks, Akira
> 
> > 
> > 							Thanx, Paul
> > 
> >>         Thanks, Akira
> >> --
> >> Akira Yokosawa (8):
> >>   Localize floatrow.sty as floatrowpf.sty
> >>   Apply workaround to floatrowpf.sty
> >>   Define 'listing' environment for style guide
> >>   styleguide: Add listing environment examples
> >>   Disable 'floatrow' layout in manually aligned code snippets
> >>   styleguide: Add example of grouping code snippets
> >>   styleguide: Add example of preferred table layout using 'booktabs'
> >>   styleguide: Tweak layout of 'Limitation' table
> >>
> >>  appendix/styleguide/hello.c        |    9 +
> >>  appendix/styleguide/styleguide.tex |  177 ++++-
> >>  defer/rcuusage.tex                 |    6 +-
> >>  floatrowpf.sty                     | 1482 ++++++++++++++++++++++++++++++++++++
> >>  howto/howto.tex                    |    4 +-
> >>  perfbook.tex                       |    4 +
> >>  6 files changed, 1668 insertions(+), 14 deletions(-)
> >>  create mode 100644 appendix/styleguide/hello.c
> >>  create mode 100644 floatrowpf.sty
> >>
> >> -- 
> >> 2.7.4
> >>
> >>
> > 
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe perfbook" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v2 0/8] Add style guide
  2017-08-02 16:29       ` Paul E. McKenney
@ 2017-08-02 22:22         ` Akira Yokosawa
  2017-08-02 22:48           ` Paul E. McKenney
  0 siblings, 1 reply; 40+ messages in thread
From: Akira Yokosawa @ 2017-08-02 22:22 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

On 2017/08/02 09:29:10 -0700, Paul E. McKenney wrote:
> On Wed, Aug 02, 2017 at 11:57:33PM +0900, Akira Yokosawa wrote:
>> On 2017/08/01 13:40:47 -0700, Paul E. McKenney wrote:
>>> On Mon, Jul 31, 2017 at 11:43:41PM +0900, Akira Yokosawa wrote:
>>>> >From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
>>>> From: Akira Yokosawa <akiyks@gmail.com>
>>>> Date: Mon, 31 Jul 2017 23:20:57 +0900
>>>> Subject: [PATCH v2 0/8] Add style guide
>>>>
>>>> Hi Paul,
>>>>
>>>> This is the respin I mentioned earlier.
>>>> Patch #2 has a few more changes from v1 to modify strings of package name.
>>>> Other than that, the end result should be the same as v1.
>>>
>>> Having a style guide is very good -- for one thing, it allows me to
>>> copy and paste from a uniform set of examples as opposed to whatever
>>> example happens to be at hand.  ;-)
>>>
>>> So thank you very much!!!
>>
>> Glad to know you like it!
>>
>>>> Note on the status of the floatrow package:
>>>>
>>>> Current version v0.3b was revised 2009/08/02.
>>>> There has been no update since.
>>>> I'm not sure if upstreaming is possible.
>>>
>>> If we have to maintain our own, so it goes.
>>>
>>> The missing two patches eventually showed up, so I applied them.
>>>
>>> Some comments:
>>>
>>> o	I have misgivings about thin spaces instead of commas for
>>> 	numbers.  I do understand the concern, given that many of our
>>> 	European readers are used to 1.234.567,89 instead of 1,234,567.89.
>>> 	My problem is that the NIST convention sounds like one of those
>>> 	compromises that makes things worse for everyone.
>>>
>>> 	But let's see what I think in a year or two.
>>
>> Maybe in another decade??? ;-)
> 
> Hey, a decade is less than 20% of my lifespan thus far.  ;-)
> 
>>> o	I don't have an objection to the NIST percent convention.
>>> 	Let's face it, the percent character is a pain in LaTeX
>>> 	no matter what.  ;-)
>>>
>>> o	I would definitely consider patches to improve the math.
>>>
>>> o	I like the idea of autonumbering, but not if it requires
>>> 	the code being in separate files.
>>
>> No, separate files are not required.
>> The LaTeX source of the code snippet cannot be embedded in \verbbox{}
>> because of the LaTeX commands therein, but \verbbox{} of C sources can
>> have the same option as the \verbfilebox{}.
>> By defining the option as a macro, it would be easier to convert to
>> auto-numbering scheme.
> 
> The main value is not the auto-numbering, given that I have to do
> tab-to-space conversion anyway, and I have one script that does both.
> (See utilities/c2latex.sh and utilities/latex2c.sh.)  Though I do admit
> that auto-numbering would make trivial edits easier.
> 
> The win is the prettier format.
> 
>>                                            Now, I have toyed with
>>> 	the idea of automatically extracting the code from the
>>> 	CodeSamples directory, but haven't yet come up with anything
>>> 	satisfactory.
>>
>> Besides the adjustment of indentation, there need to be some way to
>> specify the part of the code you want to include as a code snippet.
> 
> And it might or might not be worth it.  It has not been worth it thus
> far, but who knows?
> 
>>> 	The automation would probably make for more failures to
>>> 	update line-number references in the text, but then again
>>> 	that sometimes happens with the current arrangements.
>>>
>>> o	I am not all that much a fan of captions at the tops of tables,
>>> 	but it is a very common convention, so I will accept patches
>>> 	converting tables to that format.
>>
>> Position of captions can be specified in perfbook.tex for each type of float.
>> So it should be easy to choose a layout of your choice without any
>> modification of the source of tables, similar to the monospace font choice.
> 
> OK, even better!
> 
>>> o	The ruled code (as in Listings D.3, D.4, and D.5) does look nice.
>>> 	Listing D.2 looks quite strange to me.  I would be happy to
>>> 	accept patches to make the listings look like Listing D.3.
>>
>> Before such style adjustment, we need to convert those code snippets
>> to the "listings" environment. It will involve changes of label names and
>> its references, and the citing words "Figure" need to be changed to "Listing".
>>
>> Those changes would be larger than the conversion from verbatim to verbbox.
> 
> Maybe chapter by chapter?  Your suggestion of starting with the litmus
> tests in the updated memory-barriers section sounds good.  (And yes,
> I have been stalled by other work, but will be on this no later than
> the week of August 21st.)

My suggestion was to employ auto-numbering there, but do you also want
the conversion to "listings" environment with the "ruled" appearance at
the same time?
That would cause inconsistency in the upcoming release, I'm afraid.

Well, litmus tests are special and new look only for them might be OK.
I can prepare trial patches; one for auto-numbering, another for the
"ruled" appearance.

Would this work for you?

          Thanks, Akira

> 
>>> o	In https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf,
>>> 	I find the examples from The Economist to be much more attractive
>>> 	than his example tables.  Not sure whether LaTeX is up to all
>>> 	that without excessive formatting pain, though.  ;-)
>>>
>>> 	If it is easy to do, it would be interesting to see what
>>> 	Table D.2 would look like with The-Economist-style dashed
>>> 	lines between the rows.
>>
>> There is a package named "arydshln". It provides dashed rules for tables.
>> But it conflicts with "tabulary" package. I'll see what I can.
> 
> Ouch!  Well, at least a package exists, I suppose.
> 
>>> o	Putting related code side by side as in Listings D.4 and D.5
>>> 	could be quite useful.  I did this manually in a few places,
>>> 	for example, Figures 9.38-9.40.  Maybe these would look better
>>> 	as floatrows.
>>>
>>> And the comment at the end:
>>>
>>> % Capitalize initialism:
>>> %    Gnu Compiler Collection = GCC
>>> %    gcc should be used as a command name in \co{gcc}
>>> %    When mentioning GCC's C language, use `GNU C'
>>>
>>> I have been rather random here, and it would be good to have a
>>> standard.  The one above looks fine to me.
>>>
>>> % Trademarks:
>>> %    As the Legal page covers trademarks, there is no need to
>>> %    use trademark symbol in the text. They seems to have been
>>> %    imported from original publications.
>>>
>>> Indeed they have!
>>>
>>> % Power or POWER?
>>> %    IBM's trademark page at https://www.ibm.com/legal/us/en/copytrade.shtml#section-P
>>> %    lists the following.
>>> %        PowerPC
>>> %        Power Architecture
>>> %        Power
>>> %        POWER
>>> %        POWER5
>>> %        POWER6
>>> %
>>> %    not Power5, POWER 5, nor Power-5
>>>
>>> IBM's preferences have changed over time, so I end up importing
>>> whatever was the style at the time of publication.  :-/
>>>
>>> Again, consistency would be good, but IBM's preferences are likely
>>> to continue to change over time.
>>>
>>> What would you suggest?
>>
>> What about defining a  macro named "\Power{}", which can be used like
>> \Power{5} in the source code? If IBM's preference changes, we can
>> change the definition accordingly.
> 
> The definition might end up with special cases over time, but better than
> massive repeated rounds of search-and-replace.  ;-)
> 
>>> % Ugly line break by \co{}
>>> %                                 __
>>> %        atomic_store()
>>> %
>>> %                           seqlock_
>>> %        t
>>> %
>>> %   Is there any way to prevent these breaks?
>>> %   Maybe we need an on-the-fly script to convert such \co{}s
>>> %   to couples of \co{}s.
>>> %   Example:
>>> %     \co{__atomic_store()} -> \co{__}\co{atomic_store()}
>>> %     \co{seqlock_t} ->        \co{seqlock_}\co{t}
>>>
>>> As long as it is automated!  ;-)
>>>
>>> Overall, my main goal here is making the book more attractive and
>>> easier to read -- not so much conventions for conventions sake.
>>
>> Yes, I think I understand.
>>
>> If I'm guessing right, you are in the middle of updating the memory
>> barriers section.
>> If the transition to auto-numbering helps in adding new code snippets,
>> I can generate an example patch of a (say) litmus test.
>>
>> The other changes can wait after the upcoming release, I suppose.
> 
> That sounds very good!  I am hoping to release by the end of August or
> September, FWIW.
> 
> 							Thanx, Paul
> 
>>         Thanks, Akira
>>
>>>
>>> 							Thanx, Paul
>>>
>>>>         Thanks, Akira
>>>> --
>>>> Akira Yokosawa (8):
>>>>   Localize floatrow.sty as floatrowpf.sty
>>>>   Apply workaround to floatrowpf.sty
>>>>   Define 'listing' environment for style guide
>>>>   styleguide: Add listing environment examples
>>>>   Disable 'floatrow' layout in manually aligned code snippets
>>>>   styleguide: Add example of grouping code snippets
>>>>   styleguide: Add example of preferred table layout using 'booktabs'
>>>>   styleguide: Tweak layout of 'Limitation' table
>>>>
>>>>  appendix/styleguide/hello.c        |    9 +
>>>>  appendix/styleguide/styleguide.tex |  177 ++++-
>>>>  defer/rcuusage.tex                 |    6 +-
>>>>  floatrowpf.sty                     | 1482 ++++++++++++++++++++++++++++++++++++
>>>>  howto/howto.tex                    |    4 +-
>>>>  perfbook.tex                       |    4 +
>>>>  6 files changed, 1668 insertions(+), 14 deletions(-)
>>>>  create mode 100644 appendix/styleguide/hello.c
>>>>  create mode 100644 floatrowpf.sty
>>>>
>>>> -- 
>>>> 2.7.4
>>>>
>>>>
>>>
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe perfbook" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v2 0/8] Add style guide
  2017-08-02 22:22         ` Akira Yokosawa
@ 2017-08-02 22:48           ` Paul E. McKenney
  2017-08-05  2:09             ` Akira Yokosawa
  0 siblings, 1 reply; 40+ messages in thread
From: Paul E. McKenney @ 2017-08-02 22:48 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Thu, Aug 03, 2017 at 07:22:07AM +0900, Akira Yokosawa wrote:
> On 2017/08/02 09:29:10 -0700, Paul E. McKenney wrote:
> > On Wed, Aug 02, 2017 at 11:57:33PM +0900, Akira Yokosawa wrote:
> >> On 2017/08/01 13:40:47 -0700, Paul E. McKenney wrote:
> >>> On Mon, Jul 31, 2017 at 11:43:41PM +0900, Akira Yokosawa wrote:
> >>>> >From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
> >>>> From: Akira Yokosawa <akiyks@gmail.com>
> >>>> Date: Mon, 31 Jul 2017 23:20:57 +0900
> >>>> Subject: [PATCH v2 0/8] Add style guide
> >>>>
> >>>> Hi Paul,
> >>>>
> >>>> This is the respin I mentioned earlier.
> >>>> Patch #2 has a few more changes from v1 to modify strings of package name.
> >>>> Other than that, the end result should be the same as v1.
> >>>
> >>> Having a style guide is very good -- for one thing, it allows me to
> >>> copy and paste from a uniform set of examples as opposed to whatever
> >>> example happens to be at hand.  ;-)
> >>>
> >>> So thank you very much!!!
> >>
> >> Glad to know you like it!
> >>
> >>>> Note on the status of the floatrow package:
> >>>>
> >>>> Current version v0.3b was revised 2009/08/02.
> >>>> There has been no update since.
> >>>> I'm not sure if upstreaming is possible.
> >>>
> >>> If we have to maintain our own, so it goes.
> >>>
> >>> The missing two patches eventually showed up, so I applied them.
> >>>
> >>> Some comments:
> >>>
> >>> o	I have misgivings about thin spaces instead of commas for
> >>> 	numbers.  I do understand the concern, given that many of our
> >>> 	European readers are used to 1.234.567,89 instead of 1,234,567.89.
> >>> 	My problem is that the NIST convention sounds like one of those
> >>> 	compromises that makes things worse for everyone.
> >>>
> >>> 	But let's see what I think in a year or two.
> >>
> >> Maybe in another decade??? ;-)
> > 
> > Hey, a decade is less than 20% of my lifespan thus far.  ;-)
> > 
> >>> o	I don't have an objection to the NIST percent convention.
> >>> 	Let's face it, the percent character is a pain in LaTeX
> >>> 	no matter what.  ;-)
> >>>
> >>> o	I would definitely consider patches to improve the math.
> >>>
> >>> o	I like the idea of autonumbering, but not if it requires
> >>> 	the code being in separate files.
> >>
> >> No, separate files are not required.
> >> The LaTeX source of the code snippet cannot be embedded in \verbbox{}
> >> because of the LaTeX commands therein, but \verbbox{} of C sources can
> >> have the same option as the \verbfilebox{}.
> >> By defining the option as a macro, it would be easier to convert to
> >> auto-numbering scheme.
> > 
> > The main value is not the auto-numbering, given that I have to do
> > tab-to-space conversion anyway, and I have one script that does both.
> > (See utilities/c2latex.sh and utilities/latex2c.sh.)  Though I do admit
> > that auto-numbering would make trivial edits easier.
> > 
> > The win is the prettier format.
> > 
> >>                                            Now, I have toyed with
> >>> 	the idea of automatically extracting the code from the
> >>> 	CodeSamples directory, but haven't yet come up with anything
> >>> 	satisfactory.
> >>
> >> Besides the adjustment of indentation, there need to be some way to
> >> specify the part of the code you want to include as a code snippet.
> > 
> > And it might or might not be worth it.  It has not been worth it thus
> > far, but who knows?
> > 
> >>> 	The automation would probably make for more failures to
> >>> 	update line-number references in the text, but then again
> >>> 	that sometimes happens with the current arrangements.
> >>>
> >>> o	I am not all that much a fan of captions at the tops of tables,
> >>> 	but it is a very common convention, so I will accept patches
> >>> 	converting tables to that format.
> >>
> >> Position of captions can be specified in perfbook.tex for each type of float.
> >> So it should be easy to choose a layout of your choice without any
> >> modification of the source of tables, similar to the monospace font choice.
> > 
> > OK, even better!
> > 
> >>> o	The ruled code (as in Listings D.3, D.4, and D.5) does look nice.
> >>> 	Listing D.2 looks quite strange to me.  I would be happy to
> >>> 	accept patches to make the listings look like Listing D.3.
> >>
> >> Before such style adjustment, we need to convert those code snippets
> >> to the "listings" environment. It will involve changes of label names and
> >> its references, and the citing words "Figure" need to be changed to "Listing".
> >>
> >> Those changes would be larger than the conversion from verbatim to verbbox.
> > 
> > Maybe chapter by chapter?  Your suggestion of starting with the litmus
> > tests in the updated memory-barriers section sounds good.  (And yes,
> > I have been stalled by other work, but will be on this no later than
> > the week of August 21st.)
> 
> My suggestion was to employ auto-numbering there, but do you also want
> the conversion to "listings" environment with the "ruled" appearance at
> the same time?
> That would cause inconsistency in the upcoming release, I'm afraid.
> 
> Well, litmus tests are special and new look only for them might be OK.
> I can prepare trial patches; one for auto-numbering, another for the
> "ruled" appearance.
> 
> Would this work for you?

That actually sounds like a very good plan -- new format for litmus
tests, and the code remains the same.  Perhaps the contrast will
elicit feedback.

Besides, this is a release, not a full-fledged edition.  For an edition,
we would want a higher degree of consistency.  ;-)

							Thanx, Paul

>           Thanks, Akira
> 
> > 
> >>> o	In https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf,
> >>> 	I find the examples from The Economist to be much more attractive
> >>> 	than his example tables.  Not sure whether LaTeX is up to all
> >>> 	that without excessive formatting pain, though.  ;-)
> >>>
> >>> 	If it is easy to do, it would be interesting to see what
> >>> 	Table D.2 would look like with The-Economist-style dashed
> >>> 	lines between the rows.
> >>
> >> There is a package named "arydshln". It provides dashed rules for tables.
> >> But it conflicts with "tabulary" package. I'll see what I can.
> > 
> > Ouch!  Well, at least a package exists, I suppose.
> > 
> >>> o	Putting related code side by side as in Listings D.4 and D.5
> >>> 	could be quite useful.  I did this manually in a few places,
> >>> 	for example, Figures 9.38-9.40.  Maybe these would look better
> >>> 	as floatrows.
> >>>
> >>> And the comment at the end:
> >>>
> >>> % Capitalize initialism:
> >>> %    Gnu Compiler Collection = GCC
> >>> %    gcc should be used as a command name in \co{gcc}
> >>> %    When mentioning GCC's C language, use `GNU C'
> >>>
> >>> I have been rather random here, and it would be good to have a
> >>> standard.  The one above looks fine to me.
> >>>
> >>> % Trademarks:
> >>> %    As the Legal page covers trademarks, there is no need to
> >>> %    use trademark symbol in the text. They seems to have been
> >>> %    imported from original publications.
> >>>
> >>> Indeed they have!
> >>>
> >>> % Power or POWER?
> >>> %    IBM's trademark page at https://www.ibm.com/legal/us/en/copytrade.shtml#section-P
> >>> %    lists the following.
> >>> %        PowerPC
> >>> %        Power Architecture
> >>> %        Power
> >>> %        POWER
> >>> %        POWER5
> >>> %        POWER6
> >>> %
> >>> %    not Power5, POWER 5, nor Power-5
> >>>
> >>> IBM's preferences have changed over time, so I end up importing
> >>> whatever was the style at the time of publication.  :-/
> >>>
> >>> Again, consistency would be good, but IBM's preferences are likely
> >>> to continue to change over time.
> >>>
> >>> What would you suggest?
> >>
> >> What about defining a  macro named "\Power{}", which can be used like
> >> \Power{5} in the source code? If IBM's preference changes, we can
> >> change the definition accordingly.
> > 
> > The definition might end up with special cases over time, but better than
> > massive repeated rounds of search-and-replace.  ;-)
> > 
> >>> % Ugly line break by \co{}
> >>> %                                 __
> >>> %        atomic_store()
> >>> %
> >>> %                           seqlock_
> >>> %        t
> >>> %
> >>> %   Is there any way to prevent these breaks?
> >>> %   Maybe we need an on-the-fly script to convert such \co{}s
> >>> %   to couples of \co{}s.
> >>> %   Example:
> >>> %     \co{__atomic_store()} -> \co{__}\co{atomic_store()}
> >>> %     \co{seqlock_t} ->        \co{seqlock_}\co{t}
> >>>
> >>> As long as it is automated!  ;-)
> >>>
> >>> Overall, my main goal here is making the book more attractive and
> >>> easier to read -- not so much conventions for conventions sake.
> >>
> >> Yes, I think I understand.
> >>
> >> If I'm guessing right, you are in the middle of updating the memory
> >> barriers section.
> >> If the transition to auto-numbering helps in adding new code snippets,
> >> I can generate an example patch of a (say) litmus test.
> >>
> >> The other changes can wait after the upcoming release, I suppose.
> > 
> > That sounds very good!  I am hoping to release by the end of August or
> > September, FWIW.
> > 
> > 							Thanx, Paul
> > 
> >>         Thanks, Akira
> >>
> >>>
> >>> 							Thanx, Paul
> >>>
> >>>>         Thanks, Akira
> >>>> --
> >>>> Akira Yokosawa (8):
> >>>>   Localize floatrow.sty as floatrowpf.sty
> >>>>   Apply workaround to floatrowpf.sty
> >>>>   Define 'listing' environment for style guide
> >>>>   styleguide: Add listing environment examples
> >>>>   Disable 'floatrow' layout in manually aligned code snippets
> >>>>   styleguide: Add example of grouping code snippets
> >>>>   styleguide: Add example of preferred table layout using 'booktabs'
> >>>>   styleguide: Tweak layout of 'Limitation' table
> >>>>
> >>>>  appendix/styleguide/hello.c        |    9 +
> >>>>  appendix/styleguide/styleguide.tex |  177 ++++-
> >>>>  defer/rcuusage.tex                 |    6 +-
> >>>>  floatrowpf.sty                     | 1482 ++++++++++++++++++++++++++++++++++++
> >>>>  howto/howto.tex                    |    4 +-
> >>>>  perfbook.tex                       |    4 +
> >>>>  6 files changed, 1668 insertions(+), 14 deletions(-)
> >>>>  create mode 100644 appendix/styleguide/hello.c
> >>>>  create mode 100644 floatrowpf.sty
> >>>>
> >>>> -- 
> >>>> 2.7.4
> >>>>
> >>>>
> >>>
> >>>
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe perfbook" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> > 
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe perfbook" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH v2 0/8] Add style guide
  2017-08-02 22:48           ` Paul E. McKenney
@ 2017-08-05  2:09             ` Akira Yokosawa
  2017-08-05  3:41               ` [PATCH 0/3] Employ auto-numbering in litmus tests Akira Yokosawa
  0 siblings, 1 reply; 40+ messages in thread
From: Akira Yokosawa @ 2017-08-05  2:09 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

On 2017/08/02 15:48:20 -0700, Paul E. McKenney wrote:
> On Thu, Aug 03, 2017 at 07:22:07AM +0900, Akira Yokosawa wrote:
>> On 2017/08/02 09:29:10 -0700, Paul E. McKenney wrote:
>>> On Wed, Aug 02, 2017 at 11:57:33PM +0900, Akira Yokosawa wrote:
>>>> On 2017/08/01 13:40:47 -0700, Paul E. McKenney wrote:
>>>>> On Mon, Jul 31, 2017 at 11:43:41PM +0900, Akira Yokosawa wrote:
>>>>>> >From e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
>>>>>> From: Akira Yokosawa <akiyks@gmail.com>
>>>>>> Date: Mon, 31 Jul 2017 23:20:57 +0900
>>>>>> Subject: [PATCH v2 0/8] Add style guide
>>>>>>
>>>>>> Hi Paul,
>>>>>>
>>>>>> This is the respin I mentioned earlier.
>>>>>> Patch #2 has a few more changes from v1 to modify strings of package name.
>>>>>> Other than that, the end result should be the same as v1.
>>>>>
>>>>> Having a style guide is very good -- for one thing, it allows me to
>>>>> copy and paste from a uniform set of examples as opposed to whatever
>>>>> example happens to be at hand.  ;-)
>>>>>
>>>>> So thank you very much!!!
>>>>
>>>> Glad to know you like it!
>>>>
>>>>>> Note on the status of the floatrow package:
>>>>>>
>>>>>> Current version v0.3b was revised 2009/08/02.
>>>>>> There has been no update since.
>>>>>> I'm not sure if upstreaming is possible.
>>>>>
>>>>> If we have to maintain our own, so it goes.
>>>>>
>>>>> The missing two patches eventually showed up, so I applied them.
>>>>>
>>>>> Some comments:
>>>>>
>>>>> o	I have misgivings about thin spaces instead of commas for
>>>>> 	numbers.  I do understand the concern, given that many of our
>>>>> 	European readers are used to 1.234.567,89 instead of 1,234,567.89.
>>>>> 	My problem is that the NIST convention sounds like one of those
>>>>> 	compromises that makes things worse for everyone.
>>>>>
>>>>> 	But let's see what I think in a year or two.
>>>>
>>>> Maybe in another decade??? ;-)
>>>
>>> Hey, a decade is less than 20% of my lifespan thus far.  ;-)
>>>
>>>>> o	I don't have an objection to the NIST percent convention.
>>>>> 	Let's face it, the percent character is a pain in LaTeX
>>>>> 	no matter what.  ;-)
>>>>>
>>>>> o	I would definitely consider patches to improve the math.
>>>>>
>>>>> o	I like the idea of autonumbering, but not if it requires
>>>>> 	the code being in separate files.
>>>>
>>>> No, separate files are not required.
>>>> The LaTeX source of the code snippet cannot be embedded in \verbbox{}
>>>> because of the LaTeX commands therein, but \verbbox{} of C sources can
>>>> have the same option as the \verbfilebox{}.
>>>> By defining the option as a macro, it would be easier to convert to
>>>> auto-numbering scheme.
>>>
>>> The main value is not the auto-numbering, given that I have to do
>>> tab-to-space conversion anyway, and I have one script that does both.
>>> (See utilities/c2latex.sh and utilities/latex2c.sh.)  Though I do admit
>>> that auto-numbering would make trivial edits easier.
>>>
>>> The win is the prettier format.
>>>
>>>>                                            Now, I have toyed with
>>>>> 	the idea of automatically extracting the code from the
>>>>> 	CodeSamples directory, but haven't yet come up with anything
>>>>> 	satisfactory.
>>>>
>>>> Besides the adjustment of indentation, there need to be some way to
>>>> specify the part of the code you want to include as a code snippet.
>>>
>>> And it might or might not be worth it.  It has not been worth it thus
>>> far, but who knows?
>>>
>>>>> 	The automation would probably make for more failures to
>>>>> 	update line-number references in the text, but then again
>>>>> 	that sometimes happens with the current arrangements.
>>>>>
>>>>> o	I am not all that much a fan of captions at the tops of tables,
>>>>> 	but it is a very common convention, so I will accept patches
>>>>> 	converting tables to that format.
>>>>
>>>> Position of captions can be specified in perfbook.tex for each type of float.
>>>> So it should be easy to choose a layout of your choice without any
>>>> modification of the source of tables, similar to the monospace font choice.
>>>
>>> OK, even better!
>>>
>>>>> o	The ruled code (as in Listings D.3, D.4, and D.5) does look nice.
>>>>> 	Listing D.2 looks quite strange to me.  I would be happy to
>>>>> 	accept patches to make the listings look like Listing D.3.
>>>>
>>>> Before such style adjustment, we need to convert those code snippets
>>>> to the "listings" environment. It will involve changes of label names and
>>>> its references, and the citing words "Figure" need to be changed to "Listing".
>>>>
>>>> Those changes would be larger than the conversion from verbatim to verbbox.
>>>
>>> Maybe chapter by chapter?  Your suggestion of starting with the litmus
>>> tests in the updated memory-barriers section sounds good.  (And yes,
>>> I have been stalled by other work, but will be on this no later than
>>> the week of August 21st.)
>>
>> My suggestion was to employ auto-numbering there, but do you also want
>> the conversion to "listings" environment with the "ruled" appearance at
>> the same time?
>> That would cause inconsistency in the upcoming release, I'm afraid.
>>
>> Well, litmus tests are special and new look only for them might be OK.
>> I can prepare trial patches; one for auto-numbering, another for the
>> "ruled" appearance.
>>
>> Would this work for you?
> 
> That actually sounds like a very good plan -- new format for litmus
> tests, and the code remains the same.  Perhaps the contrast will
> elicit feedback.
> 
> Besides, this is a release, not a full-fledged edition.  For an edition,
> we would want a higher degree of consistency.  ;-)

Paul, there is a bad news.

While I was preparing patches for litmus tests, I tried another package
"caption" to further customize the looks of caption.

However, it turned out that the localized floatrowpf.sty doesn't work
with caption package.
If you enable both packages, pdflatex ends up in a fatal error.

Original floatrow.sty works fine (except for the layout issue in
two-column). So the workaround found at stackexchange should not have
been applied.

I'll revert these 8 patches and try another option "subfig" package instead.

Auto-numbering in litmus tests should work independent of floatrow.
So I'll also submit the patches for them later.

We should suspend conversion of litmus tests to "listing" environment
at the moment.

Sorry for causing all the mess.

Regards,
Akira

> 
> 							Thanx, Paul
> 
>>           Thanks, Akira
>>
>>>
>>>>> o	In https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf,
>>>>> 	I find the examples from The Economist to be much more attractive
>>>>> 	than his example tables.  Not sure whether LaTeX is up to all
>>>>> 	that without excessive formatting pain, though.  ;-)
>>>>>
>>>>> 	If it is easy to do, it would be interesting to see what
>>>>> 	Table D.2 would look like with The-Economist-style dashed
>>>>> 	lines between the rows.
>>>>
>>>> There is a package named "arydshln". It provides dashed rules for tables.
>>>> But it conflicts with "tabulary" package. I'll see what I can.
>>>
>>> Ouch!  Well, at least a package exists, I suppose.
>>>
>>>>> o	Putting related code side by side as in Listings D.4 and D.5
>>>>> 	could be quite useful.  I did this manually in a few places,
>>>>> 	for example, Figures 9.38-9.40.  Maybe these would look better
>>>>> 	as floatrows.
>>>>>
>>>>> And the comment at the end:
>>>>>
>>>>> % Capitalize initialism:
>>>>> %    Gnu Compiler Collection = GCC
>>>>> %    gcc should be used as a command name in \co{gcc}
>>>>> %    When mentioning GCC's C language, use `GNU C'
>>>>>
>>>>> I have been rather random here, and it would be good to have a
>>>>> standard.  The one above looks fine to me.
>>>>>
>>>>> % Trademarks:
>>>>> %    As the Legal page covers trademarks, there is no need to
>>>>> %    use trademark symbol in the text. They seems to have been
>>>>> %    imported from original publications.
>>>>>
>>>>> Indeed they have!
>>>>>
>>>>> % Power or POWER?
>>>>> %    IBM's trademark page at https://www.ibm.com/legal/us/en/copytrade.shtml#section-P
>>>>> %    lists the following.
>>>>> %        PowerPC
>>>>> %        Power Architecture
>>>>> %        Power
>>>>> %        POWER
>>>>> %        POWER5
>>>>> %        POWER6
>>>>> %
>>>>> %    not Power5, POWER 5, nor Power-5
>>>>>
>>>>> IBM's preferences have changed over time, so I end up importing
>>>>> whatever was the style at the time of publication.  :-/
>>>>>
>>>>> Again, consistency would be good, but IBM's preferences are likely
>>>>> to continue to change over time.
>>>>>
>>>>> What would you suggest?
>>>>
>>>> What about defining a  macro named "\Power{}", which can be used like
>>>> \Power{5} in the source code? If IBM's preference changes, we can
>>>> change the definition accordingly.
>>>
>>> The definition might end up with special cases over time, but better than
>>> massive repeated rounds of search-and-replace.  ;-)
>>>
>>>>> % Ugly line break by \co{}
>>>>> %                                 __
>>>>> %        atomic_store()
>>>>> %
>>>>> %                           seqlock_
>>>>> %        t
>>>>> %
>>>>> %   Is there any way to prevent these breaks?
>>>>> %   Maybe we need an on-the-fly script to convert such \co{}s
>>>>> %   to couples of \co{}s.
>>>>> %   Example:
>>>>> %     \co{__atomic_store()} -> \co{__}\co{atomic_store()}
>>>>> %     \co{seqlock_t} ->        \co{seqlock_}\co{t}
>>>>>
>>>>> As long as it is automated!  ;-)
>>>>>
>>>>> Overall, my main goal here is making the book more attractive and
>>>>> easier to read -- not so much conventions for conventions sake.
>>>>
>>>> Yes, I think I understand.
>>>>
>>>> If I'm guessing right, you are in the middle of updating the memory
>>>> barriers section.
>>>> If the transition to auto-numbering helps in adding new code snippets,
>>>> I can generate an example patch of a (say) litmus test.
>>>>
>>>> The other changes can wait after the upcoming release, I suppose.
>>>
>>> That sounds very good!  I am hoping to release by the end of August or
>>> September, FWIW.
>>>
>>> 							Thanx, Paul
>>>
>>>>         Thanks, Akira
>>>>
>>>>>
>>>>> 							Thanx, Paul
>>>>>
>>>>>>         Thanks, Akira
>>>>>> --
>>>>>> Akira Yokosawa (8):
>>>>>>   Localize floatrow.sty as floatrowpf.sty
>>>>>>   Apply workaround to floatrowpf.sty
>>>>>>   Define 'listing' environment for style guide
>>>>>>   styleguide: Add listing environment examples
>>>>>>   Disable 'floatrow' layout in manually aligned code snippets
>>>>>>   styleguide: Add example of grouping code snippets
>>>>>>   styleguide: Add example of preferred table layout using 'booktabs'
>>>>>>   styleguide: Tweak layout of 'Limitation' table
>>>>>>
>>>>>>  appendix/styleguide/hello.c        |    9 +
>>>>>>  appendix/styleguide/styleguide.tex |  177 ++++-
>>>>>>  defer/rcuusage.tex                 |    6 +-
>>>>>>  floatrowpf.sty                     | 1482 ++++++++++++++++++++++++++++++++++++
>>>>>>  howto/howto.tex                    |    4 +-
>>>>>>  perfbook.tex                       |    4 +
>>>>>>  6 files changed, 1668 insertions(+), 14 deletions(-)
>>>>>>  create mode 100644 appendix/styleguide/hello.c
>>>>>>  create mode 100644 floatrowpf.sty
>>>>>>
>>>>>> -- 
>>>>>> 2.7.4
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe perfbook" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>
>>>
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe perfbook" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH 0/3] Employ auto-numbering in litmus tests
  2017-08-05  2:09             ` Akira Yokosawa
@ 2017-08-05  3:41               ` Akira Yokosawa
  2017-08-05  3:43                 ` [PATCH 1/3] Revert commits after "Localize floatrow.sty as floatrowpf.sty" Akira Yokosawa
                                   ` (3 more replies)
  0 siblings, 4 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-08-05  3:41 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From ba0af5ad755ab4e175b07abb71890077e4d54a20 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sat, 5 Aug 2017 12:29:10 +0900
Subject: [PATCH 0/3] Employ auto-numbering in litmus tests

Hi Paul,

As I mentioned earlier, we need to revert commits related to floatrow.
Patch #1 does the revert.
Patch #2 converts litmus tests in Memory Barriers section to use
auto-numbering.
Patch #3 updates style guide to reflect the removal of floatrow and
a typo fix. 

I'm considering "subfig" package as an alternative to floatrow.
It predates floatrow and has less capability.
I'll see if it works in two-column layout, and update the style guide
if it goes well.

      Thanks, Akira 

Akira Yokosawa (3):
  Revert commits after "Localize floatrow.sty as floatrowpf.sty"
  advsync: Employ auto-numbering in litmus tests
  styleguide: Remove references to 'floatrow' and adjust context

 advsync/memorybarriers.tex         |  502 ++++++------
 appendix/styleguide/hello.c        |    9 -
 appendix/styleguide/styleguide.tex |  205 +----
 defer/rcuusage.tex                 |    6 +-
 floatrowpf.sty                     | 1482 ------------------------------------
 howto/howto.tex                    |    4 +-
 perfbook.tex                       |    4 +-
 7 files changed, 280 insertions(+), 1932 deletions(-)
 delete mode 100644 appendix/styleguide/hello.c
 delete mode 100644 floatrowpf.sty

-- 
2.7.4



^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH 1/3] Revert commits after "Localize floatrow.sty as floatrowpf.sty"
  2017-08-05  3:41               ` [PATCH 0/3] Employ auto-numbering in litmus tests Akira Yokosawa
@ 2017-08-05  3:43                 ` Akira Yokosawa
  2017-08-05  3:44                 ` [PATCH 2/3] advsync: Employ auto-numbering in litmus tests Akira Yokosawa
                                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-08-05  3:43 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 0303dcbf121ba63c855d59ef98864f4bcc3fe108 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sat, 5 Aug 2017 11:30:33 +0900
Subject: [PATCH 1/3] Revert commits after "Localize floatrow.sty as floatrowpf.sty"

It turns out that the workaround of floatrow's conflict with
two-column layout causes build failure when the "caption"
package is added in the preamble.
So revert the following 8 commits that relies floatrowpf.sty.

  4f90fe21d9a9 ("Localize floatrow.sty as floatrowpf.sty")
  f91cb12fd082 ("Apply workaround to floatrowpf.sty")
  b3c03d55bbdd ("Define 'listing' environment for style guide")
  fec4c19f0fc0 ("styleguide: Add listing environment examples")
  4a99c22ba7d7 ("Disable 'floatrow' layout in manually aligned code snippets")
  33d239e0ca0c ("styleguide: Add example of grouping code snippets")
  5ac664e8b3e8 ("styleguide: Add example of preferred table layout using
                 'booktabs'")
  c49e4ea4bd06 ("styleguide: Tweak layout of 'Limitation' table")

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/hello.c        |    9 -
 appendix/styleguide/styleguide.tex |  177 +----
 defer/rcuusage.tex                 |    6 +-
 floatrowpf.sty                     | 1482 ------------------------------------
 howto/howto.tex                    |    4 +-
 perfbook.tex                       |    4 -
 6 files changed, 14 insertions(+), 1668 deletions(-)
 delete mode 100644 appendix/styleguide/hello.c
 delete mode 100644 floatrowpf.sty

diff --git a/appendix/styleguide/hello.c b/appendix/styleguide/hello.c
deleted file mode 100644
index d35d93f..0000000
--- a/appendix/styleguide/hello.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Sample Code Snippet
- */
-#include <stdio.h>
-int main(void)
-{
-  printf("Hello world!\n");
-  return 0;
-}
diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index 6f5236f..72b8ca0 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -389,20 +389,15 @@ Table~\ref{tab:app:styleguide:Limitation of Monospace Macro}
 lists such limitations.

 \begin{table}[tbh]
-  \renewcommand*{\arraystretch}{1.2}
-  \begin{floatrow}[1]
-    \ttabbox[\columnwidth]{
-\footnotesize
-\begin{tabular}{@{}lll@{}}\toprule
+\centering\footnotesize
+\begin{tabular}{lll}
   Macro &  Need Escape & Should Avoid \\
-  \midrule
+  \hline
   \co{\\co}, \co{\\nbco} & \co{\\}, \%, \{, \} & \\
   \co{\\tco}  & \# & \%, \{, \}, \co{\\} \\
-\bottomrule
 \end{tabular}
-}{\caption{Limitation of Monospace Macro}
-    \label{tab:app:styleguide:Limitation of Monospace Macro}}
-  \end{floatrow}
+\caption{Limitation of Monospace Macro}
+\label{tab:app:styleguide:Limitation of Monospace Macro}
 \end{table}

 While \verb|\co{}| requires some characters to be escaped,
@@ -594,21 +589,8 @@ This section lists up such candidates.
 Strictly speaking, code snippets are \emph{not} figures.
 They deserve their own floating environment.
 The ``floatrow'' package would be of help.
-Figure~\ref{fig:app:styleguide:Sample Code Snippet}
-can be typeset as in
-Listing~\ref{lst:app:styleguide:Sample Code Snippet}
-using an experimental environment ``listing''.

-\begin{listing}
-{ \scriptsize
-\verbfilebox[{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}]
-	{appendix/styleguide/hello.c}
-}
-\centering
-\theverbbox
-\caption{Sample Code Snippet}
-\label{lst:app:styleguide:Sample Code Snippet}
-\end{listing}
+% TODO: Add example

 \subsubsection{Position of Caption}
 \label{sec:app:styleguide:Position of Caption}
@@ -622,39 +604,8 @@ The same can be said of code snippets, which are read from
 top to bottom.
 The floatrow package mentioned above also has the capability
 to adjust layout of caption.
-For example,
-Listing~\ref{lst:app:styleguide:Sample Code Snippet (Top)}
-has the option \qco{cappostion=top} in its preamble.
-
-\begin{listing}\RawFloats
-{ \scriptsize
-\verbfilebox[{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}]
-	{appendix/styleguide/hello.c}
-}
-\begin{floatrow}[1]\thisfloatsetup{capposition=top}
-  \floatbox{listing}[2.5in]{\caption{Sample Code Snippet (Top)}
-    \label{lst:app:styleguide:Sample Code Snippet (Top)}}{
-\theverbbox
-}
-\end{floatrow}
-\end{listing}

-For code snippets, the ``ruled'' style would look even better.
-Listing~\ref{lst:app:styleguide:Sample Code Snippet (Ruled)}
-is an example using the option \qco{style=ruled}.
-
-\begin{listing}\RawFloats
-{ \scriptsize
-\verbfilebox[{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}]
-	{appendix/styleguide/hello.c}
-}
-\begin{floatrow}[1]\thisfloatsetup{style=ruled}
-  \floatbox{listing}[2.5in]{\caption{Sample Code Snippet (Ruled)}
-    \label{lst:app:styleguide:Sample Code Snippet (Ruled)}}{
-\theverbbox
-}
-\end{floatrow}
-\end{listing}
+% TODO: Add example

 Once the conversion of code sippets to a new environment has
 completed, we would be able to choose one of the style options
@@ -674,84 +625,7 @@ The floatrow package provides the features to do so.\footnote{
   One problem of grouping figures might be the learning curve
   to do so.}

-For example,
-Figures~\ref{fig:advsync:Message-Passing Litmus Test}
-and~\ref{fig:advsync:Enforcing Order of Message-Passing Litmus Test}
-can be grouped together as in
-Listings~\ref{lst:app:styleguide:Message-Passing Litmus Test}
-and~\ref{lst:app:styleguide:Enforcing Order of Message-Passing Litmus Test}.
-
-\begin{listing*}\RawFloats
-{ \scriptsize
-\begin{verbbox}
- 1 C C-MP+o-wmb-o+o-o.litmus
- 2
- 3 {
- 4 }
- 5
- 6
- 7 P0(int* x0, int* x1) {
- 8
- 9   WRITE_ONCE(*x0, 2);
-10   smp_wmb();
-11   WRITE_ONCE(*x1, 2);
-12
-13 }
-14
-15 P1(int* x0, int* x1) {
-16
-17   int r2;
-18   int r3;
-19
-20   r2 = READ_ONCE(*x1);
-21   r3 = READ_ONCE(*x0);
-22
-23 }
-24
-25 exists (1:r2=2 /\ 1:r3=0)
-\end{verbbox}
-}
-  \begin{floatrow}[2]\thisfloatsetup{style=ruled}
-    \floatbox{listing}[2.2in]{\caption{Message-Passing Litmus Test}
-      \label{lst:app:styleguide:Message-Passing Litmus Test}}{
-      \theverbbox
-}
-{ \scriptsize
-\begin{verbbox}
- 1 C C-MP+o-wmb-o+o-rmb-o.litmus
- 2
- 3 {
- 4 }
- 5
- 6 P0(int* x0, int* x1) {
- 7
- 8   WRITE_ONCE(*x0, 2);
- 9   smp_wmb();
-10   WRITE_ONCE(*x1, 2);
-11
-12 }
-13
-14 P1(int* x0, int* x1) {
-15
-16   int r2;
-17   int r3;
-18
-19   r2 = READ_ONCE(*x1);
-20   smp_rmb();
-21   r3 = READ_ONCE(*x0);
-22
-23 }
-24
-25 exists (1:r2=2 /\ 1:r3=0)
-\end{verbbox}
-}
-    \thisfloatsetup{style=ruled}\hspace{1em}%
-    \floatbox{listing}[2.2in]{\caption{Enforcing Order of Message\-/Passing Litmus Test}
-      \label{lst:app:styleguide:Enforcing Order of Message-Passing Litmus Test}}{
-      \theverbbox
-}
-  \end{floatrow}
-\end{listing*}
+% TODO: Add example

 \subsubsection{Ruled Line in Table}
 \label{sec:app:styleguide:Ruled Line in Table}
@@ -763,40 +637,7 @@ look ugly.\footnote{
 Vertical lines should be avoided and horizontal lines should be
 used sparingly, especially in tables of simple structure.

-For example,
-Table~\ref{tab:cpu:Performance of Synchronization Mechanisms on 4-CPU 1.8GHz AMD Opteron 844 System}
-can be tweaked by the help of ``booktabs'' package as is shown in
-Table~\ref{tab:app:styleguide:Performance of Synchronization Mechanisms of 4-CPU 1.8GHz AMD Opteron 844 System},
-with the caption at the top.
-
-\begin{table}[htb]\RawFloats
-\renewcommand*{\arraystretch}{1.2}
-\begin{floatrow}[1]\ttabbox[]{
-\small
-\begin{tabular}{@{}lrr@{}}\toprule
-				& 	 	& Ratio \\
-	Operation		& Cost (ns) 	& (cost/clock) \\
-	\midrule
-	Clock period		&           0.6	&           1.0 \\
-	Best-case CAS		&          37.9	&          63.2 \\
-	Best-case lock		&          65.6	&         109.3 \\
-	Single cache miss	&         139.5	&         232.5 \\
-	CAS cache miss		&         306.0	&         510.0 \\
-	Comms Fabric		&       5,000\textcolor{white}{.0}
-						&       8,330\textcolor{white}{.0}
-								\\
-	Global Comms		& 195,000,000\textcolor{white}{.0}
-						& 325,000,000\textcolor{white}{.0} \\
-\bottomrule
-\end{tabular}}{
-\caption{Performance of Synchronization Mechanisms of 4-CPU 1.8\,GHz AMD Opteron 844 System}
-\label{tab:app:styleguide:Performance of Synchronization Mechanisms of 4-CPU 1.8GHz AMD Opteron 844 System}
-}
-\end{floatrow}
-\end{table}
-
-Note that ruled lines of booktabs can not be mixed with
-vertical lines in a table.
+% TODO: Add example

 \subsubsection{Miscellaneous Candidates}
 \label{sec:app:styleguide:Miscellaneous Candidates}
diff --git a/defer/rcuusage.tex b/defer/rcuusage.tex
index f3174f3..af4faff 100644
--- a/defer/rcuusage.tex
+++ b/defer/rcuusage.tex
@@ -603,7 +603,7 @@ and
 all taken from
 Wikipedia~\cite{WikipediaRCU}.

-\begin{figure*}[htbp]\RawFloats
+\begin{figure*}[htbp]
 { \scriptsize
 \begin{verbbox}
  1 struct el {                           1 struct el {
@@ -623,7 +623,7 @@ Wikipedia~\cite{WikipediaRCU}.
 \label{fig:defer:Converting Reader-Writer Locking to RCU: Data}
 \end{figure*}

-\begin{figure*}[htbp]\RawFloats
+\begin{figure*}[htbp]
 { \scriptsize
 \begin{verbbox}
  1 int search(long key, int *result)     1 int search(long key, int *result)
@@ -649,7 +649,7 @@ Wikipedia~\cite{WikipediaRCU}.
 \label{fig:defer:Converting Reader-Writer Locking to RCU: Search}
 \end{figure*}

-\begin{figure*}[htbp]\RawFloats
+\begin{figure*}[htbp]
 { \scriptsize
 \begin{verbbox}
  1 int delete(long key)                  1 int delete(long key)
diff --git a/floatrowpf.sty b/floatrowpf.sty
deleted file mode 100644
index b98af62..0000000
--- a/floatrowpf.sty
+++ /dev/null
@@ -1,1482 +0,0 @@
-%%%
-%%% This is file `floatrowpf.sty', which is a modified version
-%%% of `floatrow.sty' to work around issues in two-column layout.
-%%% The possible workaround was posted at:
-%%% https://tex.stackexchange.com/questions/133127/
-%%%
-%%% Modified by Akira Yokosawa for perfbook project.
-%%%
-%%% Following is the original header:
-%%%
-%% This is file `floatrow.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% floatrow.dtx  (with options: `floatrow,floatsetup')
-%%
-%% IMPORTANT NOTICE:
-%%
-%% For the copyright see the source file.
-%%
-%% Any modified versions of this file must be renamed
-%% with new filenames distinct from floatrow.sty.
-%%
-%% For distribution of the original source see the terms
-%% for copying and modification in the file floatrow.dtx.
-%%
-%% This generated file may be distributed as long as the
-%% original source files, as listed above, are part of the
-%% same distribution. (The sources need not necessarily be
-%% in the same archive or directory.)
-\NeedsTeXFormat{LaTeX2e}[1995/06/01]
-\ProvidesPackage{floatrowpf}
-       [2017/07/17 v0.3b-ay floatrowpf: customized floatrow for perfbook]
-\@ifundefined{float@caption}{%
-  \@ifundefined{rotfloat@float}{}%
-    {\PackageError{floatrowpf}{Do not use rotfloat package with floatrowpf.\MessageBreak
-        The latter will be skipped}{}%
-  \@namedef{opt@floatrowpf.sty}{}\endinput}}%
-  {\PackageError{floatrowpf}{Do not use float package with floatrowpf.\MessageBreak
-        The latter will be skipped}{}%
-  \@namedef{opt@floatrowpf.sty}{}\endinput}
-\@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)}
-\RequirePackage{keyval}
-\RequirePackage{caption3}
-\@ifpackagelater{caption3}{2007/04/11 v3.0q}{}{\PackageError
-    {floatrowpf}{For a successful cooperation we need at least\MessageBreak
-    version `2007/04/11 v3.0q' of package caption,\MessageBreak
-        but only version\MessageBreak
-          `\csname ver@caption.\@pkgextension\endcsname'\MessageBreak
-        is available}\@eha\endinput}
-\providecommand*\caption@fnum[1]{%
-   \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}}
-\@ifdefinable\FR@flboxreset{\let\FR@flboxreset\@floatboxreset}
-\@ifdefinable\FR@makecaption{\let\FR@makecaption\@makecaption}
-\newcommand\flrow@caption{%
-   \ifx\@captype\@undefined
-     \@latex@error{\noexpand\caption outside float}\@ehd
-     \expandafter\@gobble
-   \else
-     \refstepcounter\@captype
-     \expandafter\@firstofone
-   \fi
-   {\@dblarg{\@caption\@captype}}%
-}
-\@ifdefinable\float@caption{\let\float@caption\@caption}
-\newcounter{float@type}
-\@ifundefined{c@figure}%
-  {\setcounter{float@type}{1}}%
-  {\setcounter{float@type}{4}}
-\newcommand\flrow@package{floatrowpf}
-\newcommand*\flrow@error[1]{\PackageError\flrow@package{#1}\flrow@eh}
-\newcommand*\flrow@eh{%
-  If you do not understand this error, please take look\MessageBreak
-  at `floatrow' and `caption' package documentations.\MessageBreak
-  \@ehc}
-\newcommand\floatstyle[1]{\@ifundefined{flrow@sty@#1}%
-  {\flrow@error{Unknown float style `#1'}}{\edef\float@style{#1}}}
-\newcommand\floatname[2]{\@namedef{#1name}{#2}}
-\newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}}
-\newif\if@@FS
-\newcommand\FR@redefs{%
-  \@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}
-\newcommand\flrow@makecaption[2]{\ifnum\floatbox@depth=\z@
-    \ifvoid\@floatcapt
-      \else\flrow@error{Caption(s) lost}\fi\fi
-  \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
-   \linewidth\hsize
-   \ifdim\hsize<70mm\sloppy\fi
-   \normalsize
-   \abovecaptionskip\z@\belowcaptionskip\z@
-   \FR@makecaption{#1}{#2}\egroup}
-\newcommand\killfloatstyle{\FBbuildtrue\if@@FS\hsize\FB@wd\fi\@@FSfalse}
-\newcommand\flrow@capsetup{}
-\edef\float@style{plain}
-\@ifdefinable\FBB@wd{\let\FBB@wd\relax}
-\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}}
-\newcommand\flrow@restyle[1]{%
-  \@namedef{#1}{\killfloatstyle\def\@captype{#1}\FR@redefs
-    \flrow@setlist{{#1}}%
-    %\textwidth\columnwidth <-- error in two-column layout
-    \edef\FBB@wd{\the\columnwidth}%
-    \FRifFBOX\@@setframe\relax\@@FStrue\@float{#1}}%
-  \@namedef{#1*}{\killfloatstyle\def\@captype{#1}\FR@redefs
-    \flrow@setlist{{#1}{widefloat}{wide#1}}%
-    \FRifFBOX\@@setframe\relax\@@FStrue\edef\FBB@wd{\the\textwidth}%
-    \let\@xdblfloat\@xfloat\relax
-    \FR@ifdoubleaswide
-     {\if@twocolumn\else\let\@dblfloat\@float\fi}\relax
-    \@dblfloat{#1}}%
-  \expandafter\let\csname end#1\endcsname\float@end
-  \expandafter\let\csname end#1*\endcsname\float@dblend
- \@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\relax\@@FStrue
-    \let\rotfloat@@makebox\float@makebox
-    \let\float@makebox\rotfloat@makebox
-    \@float{#1}}%
-  \@namedef{endsideways#1}{\FBbuildtrue\float@end}
-  \ifx\@rotdblfloat\undefined
-   \@namedef{sideways#1*}{%
-     \flrow@error{%
-      You need rotating version 2.10 or newer to do this}%
-     \@nameuse{sideways#1}}%
-  \else
-   \@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\relax\@@FStrue
-     \let\@xdblfloat\@xfloat
-     \let\rotfloat@@makebox\float@makebox
-     \let\float@makebox\rotdblfloat@makebox
-     \@dblfloat{#1}}%
-  \fi
-  \@namedef{endsideways#1*}{\FBbuildtrue\float@dblend}}
- \@ifundefined{wrapfloat}{}{%
-   \@ifundefined{flrow@WF@rapt}{\let\flrow@WF@rapt\WF@rapt
-   \def\WF@rapt[##1]##2{\FRifFBOX\@@setframe\relax\@@FStrue
-     \dimen@##2\relax
-     \ifdim\dimen@>\z@
-       \edef\FBB@wd{\the\dimen@}\FB@fs@wd\dimen@\FBo@wd
-     \fi
-     \flrow@WF@rapt[##1]{\dimen@}%
-       \the\FR@everyfloat\ignorespaces}%
-   }{}%
-   \@namedef{wrap#1}{\killfloatstyle\def\@captype{#1}%
-     \FR@redefs\FBc@wd\z@
-     \flrow@setlist{{#1}{wrapfloat}{wrap#1}}%
-     \def\WF@floatstyhook{\let\@currbox\WF@box
-       \ifFBbuild
-         \global\setbox\WF@box\flrow@FB{\wd\WF@box}%
-       \else
-         \global\let\flrow@typ@tmpset\undefined
-         \global\let\WF@box\@currbox
-       \fi}%
-     \@ifnextchar[\WF@wr{\WF@wr[]}}%]
-   \@namedef{endwrap#1}{\endwrapfloat
-     \@ifundefined{FloatHBarrier}{}\FloatHBarrier
-     }}
- \@ifundefined{sf@@@subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}}
-\newcommand\RawFloats{\@ifnextchar[%]
-    \flrow@rawfloatschk\flrow@rawfloats}
-\newcommand\flrow@rawfloats{\killfloatstyle\@parboxrestore
-    \let\@makecaption\FR@makecaption
-    \expandafter\ifx\csname end\@captype\endcsname\float@endH
-        \global\FBbuildfalse
-    \else
-        \@namedef{end\@captype}{\end@float}%
-    \fi
-    \expandafter\ifx\csname end\@captype*\endcsname\float@endH
-        \global\FBbuildfalse
-    \else
-        \@namedef{end\@captype*}{\end@dblfloat}%
-    \fi
-  \@ifundefined{@rotfloat}{}{%
-    \@namedef{endsideways\@captype}{\end@rotfloat}%
-    \@namedef{endsideways\@captype*}{\end@rotdblfloat}%
-  }%
-  \@ifundefined{wrapfloat}{}{%
-    \@namedef{endwrap\@captype}{\endwrapfloat}%
-  }}
-\@ifdefinable\flrow@rawfloatschk{}
-\def\flrow@rawfloatschk[#1]{\@ifnextchar[%]
-    {\flrow@RawFloats[#1]}{\flrow@@RawFloats#1,;}}
-\@ifdefinable\flrow@RawFloats{}
-\newcommand\flrow@raw@set{\AtBeginDocument}
-\AtBeginDocument{\let\flrow@raw@set\@firstofone}
-\def\flrow@RawFloats[#1][#2]{\flrow@RawFloats@[#1]#2,;}
-\def\flrow@RawFloats@[#1]#2,{%
-  \caption@ifinlist{#2}{float}{\flrow@raw@set
-        {\@namedef{#1}{\@float{#1}}}%
-  }{\caption@ifinlist{#2}{widefloat}{\flrow@raw@set%
-        {\@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}}%
-  }{\caption@ifinlist{#2}{rotfloat}{%
-    \@ifundefined{@rotfloat}{}{\flrow@raw@set
-        {\@namedef{sideways#1}{\@rotfloat{#1}}}}%
-  }{\caption@ifinlist{#2}{widerotfloat}{%
-    \@ifundefined{@rotfloat}{}{\flrow@raw@set
-        {\@namedef{sideways#1*}{\@rotdblfloat{#1}}}}%
-  }{\caption@ifinlist{#2}{wrapfloat}{%
-    \@ifundefined{wrapfloat}{}{\flrow@raw@set
-        {\@namedef{wrap#1}{\wrapfloat{#1}}}}}%
-  }{\caption@ifinlist{#2}{all,allfloats}{%
-    \flrow@@RawFloats{#1}%
-  }{\flrow@error{Undefined float subtype `#2'}%
-  }}}}}\@ifnextchar;\@gobble{\flrow@RawFloats@[#1]}}
-\@ifdefinable\flrow@@RawFloats{}
-\def\flrow@@RawFloats#1,{%
- \flrow@raw@set{\@namedef{#1}{\@float{#1}}%
-    \@namedef{#1*}{\let\@xdblfloat\@xfloat\@dblfloat{#1}}%
-  \@ifundefined{@rotfloat}{}{%
-    \@namedef{sideways#1}{\@rotfloat{#1}}%
-    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
-  }%
-  \@ifundefined{wrapfloat}{}{%
-    \@namedef{wrap#1}{\wrapfloat{#1}}}%
-  }\@ifnextchar;\@gobble\flrow@@RawFloats
-}
-\newcommand\flrow@Raw@restyle[1]{%
-    \@namedef{#1}{\@float{#1}}%
-    \@namedef{#1*}{\@dblfloat{#1}}%
-    \@namedef{end#1}{\end@float}%
-    \@namedef{end#1*}{\end@dblfloat}%
-  \@ifundefined{@rotfloat}{}{%
-    \@namedef{sideways#1}{\@rotfloat{#1}}%
-    \@namedef{sideways#1*}{\@rotdblfloat{#1}}%
-    \@namedef{endsideways#1}{\end@rotfloat}%
-    \@namedef{endsideways#1*}{\end@rotdblfloat}%
-  }%
-  \@ifundefined{wrapfloat}{}{%
-    \@namedef{wrap#1}{\wrapfloat{#1}}%
-    \@namedef{endwrap#1}{\endwrapfloat}%
-  }%
- }
-\newcommand\RawCaption[1]{{\let\@makecaption\FR@makecaption #1}}
-\@ifdefinable\float@exts{\newtoks\float@exts}
-\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}}
-\let\@float@Hx\@xfloat
-\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}}
-\AtBeginDocument{%
-  \@ifundefined{latex@xfloat}{}{%
-    \let\floatrow@ORI@xfloat\@xfloat
-    \def\@xfloat#1[#2]{%
-      \floatrow@ORI@xfloat{#1}[#2]%
-      \floatfont}}}%
-\newsavebox\float@box
-\def\@float@HH#1[H]{%
-  \@ifundefined{FloatHBarrier}{}\FloatHBarrier
-  \expandafter\let\csname end#1\endcsname\float@endH
-  \FR@ifdoubleaswide
-   {\expandafter\let\csname end#1*\endcsname\float@endH}\relax
-  \let\@currbox\float@box
-  \flrow@setlist*{{floatH}{#1H}}%
-  \def\@captype{#1}%\setbox\@floatcapt=\vbox{}%
-  \setbox\@currbox\color@vbox\normalcolor
-    \vbox\bgroup
-      \hsize\columnwidth
-      \linewidth\columnwidth
-      \@parboxrestore\leftmargin\z@\rightmargin\z@
-      \@floatboxreset \@setnobreak
-  \ignorespaces}
-\newcommand\flrow@flboxreset{\FR@flboxreset
-  \@ifundefined{capstart}{}{\capstart}%
-  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
-  \if@tempswa\FB@readaux{\relax}\fi
-  \global\let\FBcheight\relax\global\let\FBoheight\relax
-  \global\let\FBfheight\relax
-  \FBifcapbeside\FC@fs@wd\FB@fs@wd
-  \the\FR@everyfloat}
-\@ifdefinable\FBcheight{\let\FBcheight\relax}
-\@ifdefinable\FBoheight{\let\FBoheight\relax}
-\@ifdefinable\FBfheight{\let\FBfheight\relax}
-\newcommand\FB@fs@wd{\@tempdima\FBB@wd
-  \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\linewidth\hsize
-  \FBifcaptop
-    {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
-    {\columnwidth\FBc@wd}%
-  }
-\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
-  \FC@ifc@wd\@tempswatrue\@tempswafalse
-  \if@tempswa
-     \ifx\FCwidth\relax
-        \flrow@error{You didn't define width of caption\MessageBreak
-          for plain floating environment.}%
-     \else
-        \global\FBc@wd=\FCwidth
-        \FC@ifo@fil{\advance\@tempdima-\FBc@wd}\relax
-     \fi
-  \else
-    \global\FBc@wd\@tempdima
-  \fi
-  \FC@ifo@fil\relax{\@tempdima.5\@tempdima
-    \flrow@setwd\FB@wd\@tempdima}%
-  \adj@dim\@tempdima-\FBo@wadj={\global\FBo@wd}%
-  \FC@ifc@wd\relax{\global\advance\FBc@wd-\FB@wd}%
-  \hsize\FBo@wd\linewidth\hsize\columnwidth\FBc@wd\linewidth\hsize
-  \FCset@vpos}
-\newcommand\float@makebox[1]{%
-  \FBifcapbeside{\flrow@FC{#1}}{\flrow@FB{#1}}}
-\newcommand\FBaskip{\z@}\newcommand\FBbskip{\z@}
-\newif\ifFBbuild\FBbuildtrue
-\newcommand\flrow@FB[1]{\vbox{\@tempdima=#1\vskip\FBaskip
-  \@parboxrestore\leftmargin\z@\rightmargin\z@
-  \hbox to\@tempdima{\def\FB@zskip{\vskip\z@}%
-  \FBleftmargin\flrow@FB@\FBrightmargin}%
-  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
-  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}%
-  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
-\newcommand\flrow@FC[1]{\vbox{\@tempdima=#1\@parboxrestore
-  \leftmargin\z@\rightmargin\z@\flrow@FClist\vskip\FBaskip
-  \hbox to\@tempdima{\FCleftmargin\flrow@FC@\FCrightmargin}%
-  \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
-  \nocapbeside\global\let\FCwidth\relax
-  \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}}}
-\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}
-\newcommand\FBafil{\vfill}\newcommand\FBbfil{\vfill}
-\newcommand\FBw@box[1]{\hsize#1\columnwidth#1\linewidth#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}
-\newcommand\flrow@FB@{\global\let\flrow@typ@tmpset\undefined
- \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\leftmargin\z@\rightmargin\z@
-  \@@FBabove
-  \FBifcaptop\@tempswatrue\@tempswafalse
-  \if@tempswa
-    \ifvoid\@floatcapt\else
-      \FB@vbox\FBc@wd\FBcheight{\FBifCAPTOP\relax\vfill
-        \unvbox\@floatcapt
-        \ifnum\FPOScnt=\@ne\vbox{\FB@foot}\fi\vfil}%
-      \@@FBskip\hrule\@height\z@\@depth\z@
-    \fi
-    \vtop{\vskip\z@\FBo@frame{\FB@vtop\FBo@wd\FBoheight
-      {\FBafil\unvbox\@currbox\FBbfil
-      \vskip\z@
-      \ifnum\FPOScnt=\z@
-        \FB@vtop\FBo@wd\FBfheight{\FB@foot\vfil}\fi}}\par
-      \vskip\z@
-      \ifnum\FPOScnt=\tw@\vskip\z@
-        \FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi}%
-  \else\ifnum\FPOScnt=\z@\FPOScnt=\@ne\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=\@ne\vtop{\FB@foot}%
-    \fi\par
-        \vfill\vskip\z@\vss
-        \ifnum\FPOScnt=2\FB@vtop\FBc@wd\FBfheight{\FB@foot\vfil}\fi
-        }\fi
-  \fi\@@FBbelow\FB@zskip\end@FBBOX
-  \global\setbox\@floatcapt\box\voidb@x}}
-\newcommand\flrow@FC@{\global\let\flrow@typ@tmpset\undefined
- \FB@frame{\begin@FBBOX
-   \adj@dim\FBo@wd+\FBo@wadj=\hsize
-   \settowidth\@tempdimb{\floatcapbesidesep}\advance\hsize\@tempdimb
-   \advance\hsize\FBc@wd\@parboxrestore\leftmargin\z@\rightmargin\z@
-   \@@FBabove
-    \hbox{\floatfacing*%
-      {\ifvoid\@floatcapt\else
-         \FCc@box{\FBw@box\FBc@wd\unvbox\@floatcapt\FB@foot}%
-         \floatcapbesidesep\fi
-       \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
-    \global\setbox\@floatcapt\box\voidb@x}}
-\newcommand\FB@foot{\let\FR@ifFOOT\@firstoftwo\FB@putfoots\@@par\FB@putfnotes}
-\newcommand\FB@zskip{}
-\newcommand\float@end{\ifFBbuild\@endfloatbox
-    \global\setbox\@currbox\float@makebox\columnwidth
-    \let\@endfloatbox\relax\fi
-  \end@float}
-\newcommand\floatHpenalties{}
-\newcommand\float@endH{\@endfloatbox\par
-  \FR@iffloatHaslist
-   {\floatHpenalties\relax
-    \addpenalty\@beginparpenalty}\relax
-  \vskip\intextsep
-  \ifFBbuild\setbox\@currbox\float@makebox\columnwidth\fi
-  \box\@currbox\par
-  \FR@iffloatHaslist
-   {\addpenalty\@endparpenalty\@endpetrue}\relax
-  \vskip\intextsep\relax}
-\newcommand\float@dblend{\ifFBbuild\@endfloatbox
-    \global\setbox\@currbox\float@makebox\textwidth
-    \let\@endfloatbox\relax\fi
-  \end@dblfloat}
-\newsavebox\@floatcapt
-\newcommand*{\listof}[2]{%
-  \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{%
-    \expandafter\providecommand\csname l@#1\endcsname
-        {\@dottedtocline{1}{1.5em}{2.3em}}%
-    \float@listhead{#2}%
-    \begingroup\setlength{\parskip}{\z@}%
-      \@starttoc{\@nameuse{ext@#1}}%
-    \endgroup}}
-\providecommand*{\float@listhead}[1]{%
-  \@ifundefined{chapter}{\def\@tempa{\section*}}%
-    {\def\@tempa{\chapter*}}%
-  \@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}%
-\newcommand\float@addtolists[1]{%
-  \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}
-\PackageInfo{floatrowpf}{Modified float package code loaded}
-\IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse}
-\if@tempswa
-  \let\rotfloat@HH\@float@HH
-  \def\@float@HH#1{%
-    \expandafter\let\csname endsideways#1\endcsname\float@endH
-    \let\end@float\relax
-    \rotfloat@HH{#1}}
-  \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}}
-\PackageInfo{floatrowpf}{Modified rotfloat package code loaded}
-\fi
-\@ifdefinable\FR@everyfloat{\newtoks\FR@everyfloat}
-\FR@everyfloat={\let\@footnotetext\@mpfootnotetext
-  \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
-  \floatobjectset\floatfont}
-\@ifdefinable\FR@ifFOOT{\let\FR@ifFOOT\@secondoftwo}
-\newcommand\FB@putfnotes{%
-  \ifvoid\@mpfootins\else\FR@ifFOOT
-    {\vskip\floatfootskip\normalcolor\FBfootnoterule
-    \unvbox\@mpfootins\@@par}\relax
-  \fi}
-\@ifdefinable\flrow@foot{\newinsert\flrow@foot}
-\newcommand\FB@putfoots{%
-  \ifvoid\flrow@foot\else\FR@ifFOOT
-    {\vskip\floatfootskip\normalcolor
-    \unvbox\flrow@foot\@@par}\relax
-  \fi}
-\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}}{}}
-\captionsetup[floatfoot]{labelformat=empty,labelsep=none}
-\newcommand\floatfoot{\@ifstar
-    {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}%
-    {\def\FR@tmp{\captionfootfont}\floatfoot@}}
-\newcommand\floatfoot@[1]{%
-  \global\setbox\flrow@foot\vbox{%
-  \floatfoot@box{#1}}}%
-\newcommand\floatfoot@box[1]{%
-  \@ifundefined{@captype}{\def\@captype{floatfoot}}{}%
-    \if@@FS\hsize\columnwidth\linewidth\columnwidth\fi
-    \@parboxrestore\reset@font\color@begingroup
-  \caption@setoptions{\@captype}%
-  \caption@setoptions{floatfoot}%
-     \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}%
-  \color@endgroup}
-\newcommand\newfloatcommand[2]{%
-  \@ifundefined{#1}{}%
-    {\flrow@error{\string#1 already defined}}%
-  \@ifnextchar[{\FB@nc{#1}{#2}}{\FB@nc{#1}{#2}[]}}
-\newcommand\renewfloatcommand[2]{%
-  \@ifundefined{#1}{}%
-    {\PackageInfo{floatrowpf}{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
-  \def\FB@tmpset{#3}\def\@captype{#2}%
-  \@ifnextchar[{\@floatbox}{\@floatbox[#4]}}}
-\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
-\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
-\newfloatcommand{fcapside}{figure}[\capbeside][]
-\@ifdefinable\FB@wd {\newdimen\FB@wd}
-\@ifdefinable\FBo@wd{\newdimen\FBo@wd}
-\@ifdefinable\FBc@wd{\newdimen\FBc@wd}
-\newlength\FBo@ht
-\newlength\FBc@ht
-\newlength\FBf@ht
-\newlength\FBo@max
-\newlength\FBc@max
-\newlength\FBf@max
-\newcommand\FR@loc@addcnt[2]{%
-  \@ifundefined{c@#1}{\@nocounterr{#1}}%
-    {\advance\csname c@#1\endcsname #2\relax}}
-\newcommand\FR@loc@refcnt[1]{%
-  \@ifundefined{c@#1}{\@nocounterr{#1}}%
-   {\advance\csname c@#1\endcsname1\relax}}
-\newcommand\FR@loc@{%
-  \let\FR@ifunloc\@gobble
-  \let\label\@gobble
-  \let\refstepcounter\FR@loc@refcnt
-  \let\stepcounter\FR@loc@refcnt
-  \let\refsteponlycounter\FR@loc@refcnt
-  \let\FR@ifcountH\@secondoftwo
-  \let\cl@@ckpt\empty\let\addtocounter\FR@loc@addcnt
-  \let\caption@kernel@addcontentsline\@gobbletwo
-  \let\caption@addcontentsline\@gobbletwo
-  \def\sf@updatecaptionlist##1##2##3##4{}}
-\def\FBtmp@cap#1[#2]#3{\sbox\@tempboxa{\captionlabel{#3}}%
-  \global\@tempdimb\wd\@tempboxa}
-\newcommand\captionlabel[1]{{\def\FR@tmp{\@captype}\ifnum\floatbox@depth>\@ne
-       \def\FR@tmp{sub\@captype}\caption@setsubtype*{\FR@tmp}\stepcounter{\FR@tmp}\fi
-   \caption@@@make{\caption@fnum\FR@tmp}{#1}}}
-\newcommand\subcaptionlabel[1]{{\floatbox@depth\tw@\captionlabel{#1}}}
-\newcommand\FBget@box[3]{%
-  \FBiffloatrow\relax
-    {\ifx\FBB@wd\relax
-      \ifdim\hsize=\z@
-        \@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}%
-  \adj@dim\hsize-\FB@wadj=\@tempdima
-  \FBifcapbeside
-    {\FCget@@wd{#1}{#3}}%
-    {\nofilFCOhsize
-    \FBiffloatrow\relax
-      {\settowidth\@tempdimb{{\FBleftmargin}{\FBrightmargin}}%
-      \advance\@tempdima-\@tempdimb}}%
-  \FC@ifo@fil{\@tempdima\FB@wd}{\FB@wd\@tempdima}%
-  \adj@dim\@tempdima-\FBo@wadj=\FBo@wd
-  \FBiffloatrow\relax{\hsize\FBo@wd}%
-  \FBifcapbeside{\hsize\FB@wd}\relax
-  \linewidth\hsize
-  \def\reserved@a{#1}\ifx\reserved@a\empty
-    \else\FBget@@wd{#1}{#3}\fi
-  \hsize\FBo@wd\linewidth\hsize
-  \FBifcapbeside
-    {\FC@ifc@wd\relax{\advance\FBc@wd-\FB@wd}}%
-    {\FBc@wd\FB@wd}%
-  \setbox\z@\vbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@\hsize\FBo@wd\linewidth\hsize
-    \FBifcaptop
-      {\ifnum\FPOScnt=\z@\columnwidth\hsize\else\columnwidth\FBc@wd\fi}%
-      {\columnwidth\FBc@wd}%
-    #3}%
-  \FBc@ht\ht\@floatcapt\advance\FBc@ht\dp\@floatcapt
-  \FBo@ht\ht\z@\advance\FBo@ht\dp\z@\let\FBheight\FBo@ht
-  \setbox\tw@\vbox{\null\par\FB@foot\par}%
-  \FBf@ht\ht\tw@\advance\FBf@ht\dp\tw@
-  \FBiffloatrow
-    {\ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
-    \ifCADJ
-      \FBifcaptop
-        {\ifnum\FPOScnt=\@ne\global\advance\FBc@ht\FBf@ht\fi}%
-        {\ifnum\FPOScnt=\tw@
-          \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}%
-      \ifdim\FBc@ht>\FBc@max\global\FBc@max\FBc@ht\fi
-      \gdef\FBcheight{\FBc@ht}\gdef\FBfheight{\FBf@ht}%
-    \fi}\relax
-  \def\reserved@a{#2}\ifx\reserved@a\empty
-    \FBiffloatrow{\ifOADJ
-      \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
-      \FBifcaptop
-        {\ifnum\FPOScnt=\z@
-          \ifdim\FBf@ht>\FBf@max\global\FBf@max\FBf@ht\fi
-        \fi}\relax
-      \gdef\FBoheight{\FBo@ht}\gdef\FBfheight{\FBf@ht}%
-    \fi}\relax
-  \else
-     \FBget@@ht{#2}{#3}%
-  \fi}
-\newcommand\FCget@@wd[2]{\flrow@FClist
-  \FBiffloatrow\relax
-    {\settowidth\@tempdimb{{\FCleftmargin}{\FCrightmargin}}%
-    \advance\@tempdima-\@tempdimb\advance\hsize-\@tempdimb}%
-  \settowidth\@tempdimb{\floatcapbesidesep}\advance\@tempdima-\@tempdimb
-  \FC@ifo@fil{\FB@wd\@tempdima}\relax
-  \FC@ifc@wd\@tempswatrue\@tempswafalse
-  \if@tempswa
-    \ifx\FCwidth\relax
-      \setbox\@ne\vbox{\FR@loc@
-        \let\caption\flrow@caption
-        \let\@caption\FBtmp@cap
-         #2}%
-      \FBc@wd=\@tempdimb
-    \else
-      \FBc@wd=\FCwidth
-    \fi\FC@ifo@fil{\advance\FB@wd-\FBc@wd}\relax
-  \else
-    \FBc@wd\@tempdima
-  \fi
-  \@tempdima.5\@tempdima}
-\newcommand\flrow@gobble@[2][]{\unskip\ignorespaces}
-\newcommand\flrow@gobble{%
-    \let\caption\flrow@gobble@
-    \let\floatfoot\flrow@gobble@
-    \let\footnote\flrow@gobble@
-    \let\footnotetext\flrow@gobble@
-    }
-\newcommand\FBget@@wd[2]{\@tempswafalse
-  \begingroup
-    \@tempdima-3000pt\let\FBwidth\@tempdima
-    \setlength\dimen@{#1}\ifdim\dimen@<\z@\global\@tempswatrue\fi
-  \endgroup
-  \if@tempswa
-    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
-    \FBo@wd\wd\z@\let\FBwidth\FBo@wd
-    \setlength\FBo@wd{#1}%
-    \advance\FBo@wd\leftskip\advance\FBo@wd\rightskip
-    \adj@dim\FBo@wd+\FBo@wadj=\FB@wd
-    \setbox\flrow@foot\box\voidb@x
-    \setbox\@mpfootins\box\voidb@x
-  \else
-    \setlength\FB@wd{#1}%
-    \adj@dim\FB@wd-\FB@wadj=\FB@wd
-    \adj@dim\FB@wd-\FBo@wadj=\FBo@wd
-    \let\FBwidth\FBo@wd
-  \fi}
-\newcommand\FBget@@ht[2]{\@tempswafalse
-  \begingroup
-    \@tempdimb-3000pt\let\FBheight\@tempdimb
-    \setlength\dimen@{#1}\ifdim\dimen@<\z@
-      \global\@tempswatrue\fi
-  \endgroup
-  \if@tempswa
-    \setbox\z@\hbox{\let\FR@ifROWFILL\@secondoftwo\FR@loc@#2}%
-    \FBo@ht\ht\z@\advance\FBo@ht\dp\z@
-    \let\FBheight\FBo@ht\setlength\FBo@ht{#1}%
-    \adj@dim\FBo@ht+\FBo@hadj=\FBo@ht
-    \FBifcaptop{\ifnum\FPOScnt=\z@\advance\FBo@ht\FBf@ht\fi}\relax
-  \else
-    \setlength\FBo@ht{#1}%
-    \adj@dim\FBo@ht-\FBo@hadj=\FBo@ht
-    \adj@dim\FBo@ht-\FB@hadj=\FBo@ht
-    \setbox\z@\vbox{\offinterlineskip\vbox{\@@FBabove}%
-      \FBifcapbeside\relax{\@@FBskip\hrule\@height\z@\@depth\z@}%
-      \vtop{\@@FBbelow}}%
-    \global\advance\FBo@ht-\ht\z@\global\advance\FBo@ht-\dp\z@
-    \FBifcapbeside\relax\FBget@@@ht
-  \fi
-  \FBiffloatrow{\ifOADJ
-    \ifdim\FBo@ht>\FBo@max\global\FBo@max\FBo@ht\fi
-  \fi}\relax
-  \def\FBoheight{\FBo@ht}}
-\newcommand\FBget@@@ht{%
-    \ifdim\FBc@ht>\FBc@max
-      \global\advance\FBo@ht-\FBc@ht
-    \else
-      \global\advance\FBo@ht-\FBc@max
-    \fi
-    \FBifcaptop{\ifnum\FPOScnt=\@ne\else
-      \ifdim\FBf@ht>\FBf@max
-        \global\advance\FBo@ht-\FBf@ht
-      \else
-        \global\advance\FBo@ht-\FBf@max
-      \fi
-    \fi}\relax
-  }
-\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}}}
-\newcounter{FBl@b}
-\@ifdefinable\FR@ifFCBOX{\let\FR@ifFCBOX\@secondoftwo}
-\newcommand\FBs@raise{\raisebox{-\totalheight}}
-\newcommand\FBf@raise{}
-\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}%
-    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{-\height}}}%
-     {\gdef\FBf@raise{}}%
-    \gdef\FBs@raise{\raisebox{-\totalheight}}%
-  \or\gdef\FC@bbox{\vbox\@parboxto\bgroup}\gdef\FC@ebox{\vskip\z@\egroup}%
-    \FR@ifFCBOX{\gdef\FBf@raise{\raisebox{\depth}}}%
-     {\gdef\FBf@raise{}}%
-    \gdef\FBs@raise{}\fi}
-\@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}
-\newcommand\floatbox[2][]{\begingroup
-  \def\FB@tmpset{#1}\def\@captype{#2}%
-  \@ifnextchar[{\@floatbox}{\@floatbox[]}}
-\@ifdefinable\@floatbox{}\@ifdefinable\@@floatbox{}
-\def\@floatbox[#1]{%
-  \@ifnextchar[{\@@floatbox[#1]}{\@@floatbox[#1][]}}
-\@ifdefinable\floatbox@depth{\newcount\floatbox@depth}
-\def\@@floatbox[#1][#2]{%
-  \@ifnextchar[{\@@@floatbox[#1][#2]}{\@@@floatbox[#1][#2][]}}%]
-\@ifdefinable\@@@floatbox{}
-\long\def\@@@floatbox[#1][#2][#3]#4#5{\advance\floatbox@depth\@ne
-  \@FB@vpos{#3}%
-  \if@@FS\else\FR@redefs
-    \ifcase\floatbox@depth\or
-      \flrow@setlist{{\@captype}}\or
-      \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
-    \fi
-    \FRifFBOX\@@setframe\relax\@@FStrue
-  \fi
-  \FB@tmpset
-  \FBifcapbeside\flrow@FClist\relax
-  \@parboxrestore\leftmargin\z@\rightmargin\z@
-  \floatobjectset\floatfont
-  \FBget@box{#1}{#2}{#4#5}%
-  \FBifcapbeside\FCset@vpos\relax
-  \FBiffloatrow{\FR@floatbox{\@ifundefined{capstart}{}{\capstart}#4#5}}%
-   {\adj@dim\FB@wd+\FB@wadj=\hsize\linewidth\hsize
-    \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi
-    \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}\let\FBB@wd\relax
-    #4#5}\FBbuildtrue
-    \FBifcapbeside{\flrow@FC\FBB@wd}{\flrow@FB\FBB@wd}%
-    \global\FBbuildfalse
-    \FR@iffacing{\FB@writeaux{\string\global\string\c@FBcnt\thepage}}\relax
-   }\advance\floatbox@depth\m@ne
-  \endgroup\ignorespaces}
-\newcommand\FR@floatbox[1]{\@tempswafalse
-    \ifOADJ\@tempswatrue\fi\ifCADJ\@tempswatrue\fi
-    \if@tempswa\@ifundefined{FB@@boxmax}{}{\FB@@boxmax}\fi
-    \FBsetbox@obj{#1}\begin@FBBOX
-      \FBifcapbeside\flrow@FC@\flrow@FB@
-    \end@FBBOX
-    \addtocounter{FRobj}\m@ne
-    \@tempswafalse\FR@iffacing\@tempswatrue\relax
-    \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
-    \advance\Xhsize-\FB@wd
-    \FBifcapbeside
-      {\advance\Xhsize-\FBc@wd
-       \FR@ifcountH{\global\advance\Zhsize-\FBc@wd}\relax
-       \settowidth\@tempdimb{\floatcapbesidesep}%
-       \advance\Xhsize-\@tempdimb
-       \FR@ifcountH{\global\advance\Zhsize-\@tempdimb}\relax}\relax
-    \ifnum\c@FRobj=\z@
-      \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
-      \floatrowsep
-      \adj@dim\Xhsize-\FB@wadj={\global\Xhsize}%
-      \adj@dim\Zhsize-\FB@wadj={\global\Zhsize}%
-    \fi}
-\newcommand\FBsetbox@obj[1]{%
-  \setbox\float@box\color@vbox\normalcolor
-  \FBifcaptop
-     {\FB@vtop\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
-      \ifnum\FPOScnt=\z@\columnwidth\FBo@wd\else\columnwidth\FBc@wd\fi}%
-     {\FB@vbox\FBo@wd\FBoheight\bgroup\FBafil\floatobjectset\floatfont
-      \columnwidth\FBc@wd}%
-  #1\FBbfil\egroup\color@endbox
-  \let\@currbox\float@box}
-\@ifdefinable\FBiffloatrow{\let\FBiffloatrow\@secondoftwo}
-\newcounter{FRobj}
-\newcounter{FRsobj}
-\newlength\Xhsize
-\newlength\sXhsize
-\newlength\Zhsize
-\newlength\sZhsize
-\newcommand\flrow@to{to\hsize}
-\newcommand\flrow@boxset[1]{#1}
-\newcommand\flrow@setrowhbox{%
-\FR@ifROWFILL{\def\flrow@left{\hskip\leftskip}\def\flrow@right{\hskip\rightskip}%
-  }{\let\flrow@to\empty\def\flrow@left{}\def\flrow@right{}}%
-}
-\newcommand\flrow@left{}\newcommand\flrow@right{}
-\newcommand\flrow@hbox@bgroup{\hbox\flrow@to
-    \bgroup\flrow@left}
-\newcommand\flrow@hbox@egroup{\flrow@right
-    \egroup}
-\newbox\flrow@rowbox
-\newcommand\floatrow[1][2]{\c@FRobj=#1\relax
-  \ifcase\floatbox@depth
-    \flrow@setlist*{{floatrow}{\@captype row}}%
-  \or
-    \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}%
-    \flrow@settype{subfloatrow}\flrow@settype{sub\@captype row}%
-    \ifx\flrow@to\empty\def\flrow@boxset##1{}\fi
-  \fi%
-  \FB@facing\@tempswafalse\FR@iffacing\@tempswatrue\relax
-  \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
-  \if@tempswa\FB@readaux{\relax}\fi
-  \flrow@boxset{\ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\else\hsize\FBB@wd\fi}%
-  \ifnum\floatbox@depth=\z@\vspace\FBaskip\else\leavevmode\fi
-  \hbox\flrow@to\bgroup%outer h box
-  \FRleftmargin
-  \flrow@boxset{\hsize\FBB@wd
-     \settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}\advance\hsize-\@tempdima}%
-  \bgroup\ifx\FR@frame\empty\else\def\FB@frame{}\def\FB@wadj{}\def\FB@hadj{}\fi%frame set
-  \flrow@boxset{\adj@dim\hsize-\FR@wadj=\hsize}%
-  \setbox\flrow@rowbox\vbox\bgroup%v box
-        \@@FRabove
-    \flrow@setrowhbox
-    \flrow@hbox@bgroup\let\FBiffloatrow\@firstoftwo
-      \Xhsize\hsize\count@#1\advance\count@\m@ne
-      \settowidth\@tempdima{\floatrowsep}\advance\Xhsize-\count@\@tempdima
-      \@tempdimb\Xhsize
-      \FR@iftwolevel
-        {\ifnum\floatbox@depth=\z@\Zhsize\Xhsize\else
-            \ifdim\Zhsize=\z@\Zhsize\Xhsize\sZhsize\Xhsize\fi
-            \FR@ifcountH{\global\advance\Zhsize-\count@\@tempdima}\relax
-         \fi}{\@tempdimb\Xhsize\Zhsize\Xhsize}%
-      \divide\@tempdimb#1\relax\FB@wd\@tempdimb
-      \hsize\@tempdimb\ignorespaces}
-\def\endfloatrow{\ifdim\lastskip>\z@\unskip\fi
-      \flrow@hbox@egroup%h box
-    \@@FRbelow
-    \egroup%v box
-    \FR@frame{\box\flrow@rowbox}%
-    \egroup%frame set
-    \FRrightmargin\egroup%outer h box
-    \ifnum\floatbox@depth=\z@\vspace\FBbskip\fi
-  \gdef\FBaskip{\z@}\gdef\FBbskip{\z@}%
-  \global\FBf@max\z@\global\FBo@max\z@\global\FBc@max\z@
-  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
-\newenvironment{subfloatrow}{\capsubrowsettings
-    \captionsetup{subtype}\@nameuse{subfloatrow*}}{\@nameuse{endsubfloatrow*}}
-\newcommand\capsubrowsettings{\caption@setoptions{subfloatrow}\caption@setoptions{sub\@captype row}}
-\newenvironment{subfloatrow*}[1][2]{\let\flrow@to\empty
-    \let\Xhsize\sXhsize%\let\Zhsize\sZhsize
-    \FR@ifunloc{\let\FR@ifcountH\@firstoftwo}\let\c@FRobj\c@FRsobj
-    \def\FRleftmargin{}\def\FRrightmargin{}\let\floatrowsep\subfloatrowsep
-    \floatrow[#1]\killfloatstyle}{\ifdim\lastskip>\z@\unskip\fi
-     \@ifundefined{adjustsubfloats}\relax\adjustsubfloats\endfloatrow}
-\newcommand\subfloatrowsep{\hskip\columnsep}
-\@ifdefinable\FR@ifcountH{\let\FR@ifcountH\@firstoftwo}
-\@ifdefinable\FR@ifunloc{\let\FR@ifunloc\@firstofone}
-\@ifdefinable\FR@iftwolevel{\let\FR@iftwolevel\@secondoftwo}
-\newcommand\CommonHeightRow{\@ifstar
-    {\let\FR@iftwolevel\@firstoftwo\CommonHeightRow@
-   }{\let\FR@iftwolevel\@secondoftwo\CommonHeightRow@}}
-\newcommand\DefaultCommonHeight{25pt}
-\newcommand\CommonHeight{\DefaultCommonHeight}
-\newcommand\CommonHeightRow@[2][\DefaultCommonHeight]{\def\CommonHeight{#1}\setbox\z@
-    \hbox{\FR@loc@\let\FR@ifunloc\@firstofone#2}%
-    \ifcase\floatbox@depth\def\@tempa{\Xhsize}\def\@tempb{\Zhsize}\or
-        \def\@tempa{\sXhsize}\def\@tempb{\Zhsize}\fi
-    \FR@calc@CommonHeight#2}
-\@ifdefinable\FR@Zunitlength{\newdimen\FR@Zunitlength}
-\newcommand\FR@calc@CommonHeight{%
-    \@tempdima\@tempb\advance\@tempdima-\@tempa
-    \count@\@tempdima\relax\divide\count@16384\relax
-    \divide\@tempb\count@\relax\FR@Zunitlength\@tempb\relax
-    \@tempdima\CommonHeight\relax
-    \count@\@tempdima\relax\divide\count@16384\relax
-    \@tempdima\count@\FR@Zunitlength\relax
-    \edef\CommonHeight{\the\@tempdima}}
-\newcommand\begin@FBBOX{\vbox\bgroup}
-\def\end@FBBOX{\egroup}
-\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse
-  \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip\z@}%
-             {\vskip\z@\egroup$\egroup}}
-\newcommand\TopFloatBoxes{\CADJfalse\OADJfalse
-  \buildFBBOX{\vtop\bgroup\vskip\z@}{\egroup}}
-\newcommand\BottomFloatBoxes{\CADJfalse\OADJfalse
-  \buildFBBOX{\vbox\bgroup}{\vskip\z@\egroup}}
-\newcommand\PlainFloatBoxes{%
-  \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}}
-\newcommand\buildFBBOX[2]{\gdef\begin@FBBOX{#1}\gdef\end@FBBOX{#2}}
-\def\newdimentocommand  #1#2#3{%
-    #1\@tempdima{#3}\@ifdefinable#2{\xdef#2{\the\@tempdima}}}
-\def\renewdimentocommand#1#2#3{%
-    #1\@tempdima{#3}\xdef#2{\the\@tempdima}}
-\def\newskiptocommand   #1#2#3{%
-    #1\@tempskipa{#3}\@ifdefinable#2{\xdef#2{\the\@tempskipa}}}
-\def\renewskiptocommand #1#2#3{%
-    #1\@tempskipa{#3}\xdef#2{\the\@tempskipa}}
-\def\newlengthtocommand{\newskiptocommand}
-\def\renewlengthtocommand{\renewskiptocommand}
-\newcommand*\flrow@setbool[1]{%
-  \expandafter\caption@set@bool\csname FR@if#1\endcsname}
-\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}}}
-\newcommand\thisfloatsetup{\floatsetup[tmpset]}
-\def\flrow@setup{\caption@setkeys[floatrow]{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}}}%
-\newcommand\flrow@setlist{\@ifstar\flrow@setlist@@\flrow@setlist@}
-\newcommand\flrow@setlist@[1]{\@flrow@setlist#1{tmpset};%
-  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
-  \caption@setposition{\FBifcaptop tb}}
-\newcommand\flrow@setlist@@[1]{\@flrow@setlist#1;%
-  \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;%
-  \caption@setposition{\FBifcaptop tb}}
-\newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble
-  \@flrow@setlist}
-\@ifundefined{caption@setoptions}{\let\caption@setoptions\caption@settype}{}
-\newcommand\@cap@setlist[1]{\caption@setoptions{#1}%
-   \@ifnextchar;{\let\caption@setfloattype\@gobble\@gobble}\@cap@setlist}
-\newcommand\flrow@FClist{\flrow@setlist
-  {{floatbeside}{capbesidefloat}{\@captype beside}{capbeside\@captype}}}
-\newcommand*\clearfloatsetup[1]{\@nameundef{flrow@typ@#1}}
-\newcommand\DeclareFROpt{%
-  \@ifstar{\flrow@declopt\AtEndOfPackage}
-          {\flrow@declopt\@gobble}}
-\newcommand*\flrow@declopt[2]{%
-  #1{\undefine@key{floatrow}{#2}}\define@key{floatrow}{#2}}
-\@onlypreamble\DeclareFROpt
-\@onlypreamble\flrow@declopt
-\@ifdefinable\FR@ifrawfloats{\let\FR@ifrawfloats\@secondoftwo}
-\DeclareFROpt*{rawfloats}[0]{\flrow@setbool{rawfloats}{#1}}
-\@ifdefinable\FR@ifdoubleaswide{\let\FR@ifdoubleaswide\@secondoftwo}
-\DeclareFROpt{doublefloataswide}[0]{\flrow@setbool{doubleaswide}{#1}}
-\@ifdefinable\FR@iffloatHaslist{\let\FR@iffloatHaslist\@secondoftwo}
-\DeclareFROpt{floatHaslist}[0]{\flrow@setbool{floatHaslist}{#1}}
-\newcommand*\DeclareFloatStyle[2]{%
-  \global\@namedef{flrow@sty@#1}{#2}}
-\@onlypreamble\DeclareFloatStyle
-\newcommand*\flrow@setstyle[1]{%
-  \@ifundefined{flrow@sty@#1}%
-    {\flrow@error{Undefined float style `#1'}}%
-    {\FBstyle@reset
-     \def\flrow@capsetup{%
-        \@ifundefined{caption@sty@#1}{}{\caption@setstyle*{#1}}%
-        \caption@setoptions {#1}}%
-     \flrow@esetup{\csname flrow@sty@#1\endcsname}}}
-\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}
-\DeclareFloatStyle{default}{%
-     style=plain,captionskip=10pt,
-     margins=centering,objectset=centering,
-     capbesideposition=left,facing=no,
-     floatrowsep=columnsep,capbesidesep=columnsep,
-     font=default,footfont=footnotesize}
-\DeclareFROpt{style}{\flrow@setstyle{#1}}
-\@ifdefinable\FR@ifCST{\let\FR@ifCST\@firstoftwo}
-\DeclareFROpt{relatedcapstyle}[0]{\flrow@setbool{CST}{#1}}
-\DeclareFROpt{font}{\flrow@setfont{font}{#1}}
-\DeclareFROpt{footfont}{\captionsetup[floatfoot]{font={#1}}}
-\DeclareCaptionOption{footfont}{\caption@setfont{footfont}{#1}}
-\@ifdefinable\floatfont{\let\floatfont\empty}
-\newcommand*\captionfootfont{\normalfont\footnotesize}
-\let\DeclareFloatFont\DeclareCaptionFont
-\@onlypreamble\DeclareFloatFont
-\newcommand*\flrow@setfont[2]{%
-   \caption@setfont{@tempa}{#2}%
-   \expandafter\let\csname float#1\endcsname\caption@tempa}
-\DeclareFROpt{capposition}{\flrow@cappos{#1}}
-\DeclareFROpt{position}{\flrow@cappos{#1}}
-\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
-  }{\flrow@error{Undefined caption position `#1'}%
-  }}}}}
-\@ifdefinable\FBifcaptop{\let\FBifcaptop\@secondoftwo}
-\newcommand\captop{\let\FBifcaptop\@firstoftwo}
-\newcommand\capbot{\let\FBifcaptop\@secondoftwo}
-\@ifdefinable\FBifCAPTOP{\let\FBifCAPTOP\@secondoftwo}
-\newcommand\CAPTOP{\captop\let\FBifCAPTOP\@firstoftwo\CADJtrue}
-\@ifdefinable\FBifcapbeside{}\let\FBifcapbeside\@secondoftwo
-\newcommand\capbeside{\let\FBifcapbeside\@firstoftwo}
-\newcommand\nocapbeside{\let\FBifcapbeside\@secondoftwo}
-\DeclareFROpt{capbesideframe}[0]{\flrow@setbool{FCBOX}{#1}}
-\DeclareFROpt{capbesidewidth}[1]{\flrow@FCc@wd{#1}}
-\@ifdefinable\FC@ifc@wd{\let\FC@ifc@wd\@secondoftwo}
-\newcommand\useFCwidth{\let\FC@ifc@wd\@firstoftwo\let\FCwidth\relax}
-\@ifdefinable\FCwidth{\let\FCwidth\relax}
-\newcommand\flrow@FCc@wd[1]{%
-  \caption@ifinlist{#1}{none,sidefil}{\let\FC@ifc@wd\@secondoftwo
-  }{\useFCwidth\def\FCwidth{#1}}}
-\DeclareFROpt{capbesideposition}{\flrow@scpos{#1}}
-\newcommand\DeclareSCPos[2]{%
-  \define@key{flrow@scpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
-\newcommand*\flrow@scpos[1]{%
-  \let\FR@tmp\@empty
-  \begingroup\caption@setkeys[floatrow]{flrow@scpos}{#1}\endgroup
-  \FR@tmp}
-\@onlypreamble\DeclareSCPos
-\DeclareSCPos{left}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}}
-\DeclareSCPos{right}{\def\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\z@}}
-\DeclareSCPos{inside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
-    \count@\c@FBcnt\ifnum\count@=\z@\count@\@ne\fi
-  }}
-\DeclareSCPos{outside}{\def\@FC@hpos{\let\FR@iffacing\@firstoftwo
-    \count@\c@FBcnt\ifnum\count@=\z@\else\advance\count@\@ne\fi
-  }}
-\DeclareSCPos{center}{\def\@FC@vpos{\count@\z@}}
-\DeclareSCPos{top}{\def\@FC@vpos{\count@\@ne}}
-\DeclareSCPos{bottom}{\def\@FC@vpos{\count@\tw@}}
-\newcommand*\@FC@vpos{\count@\tw@}
-\newcommand*\@FC@hpos{\let\FR@iffacing\@secondoftwo\count@\@ne}
-\newcounter{FBcnt}
-\DeclareFROpt{footposition}{\flrow@ftpos{#1}}
-\newcommand\DeclareFtPos[2]{%
-  \define@key{flrow@ftpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
-\newcommand*\flrow@ftpos[1]{%
-  \let\FR@tmp\@empty
-  \begingroup\caption@setkeys[floatrow]{flrow@ftpos}{#1}\endgroup
-  \FR@tmp}
-\@onlypreamble\DeclareFtPos
-\@ifdefinable\FPOScnt{\newcount\FPOScnt}
-\DeclareFtPos{caption}{\FPOScnt1\relax}
-\DeclareFtPos{bottom}{\FPOScnt2\relax}
-\DeclareFtPos{default}{\FPOScnt0\relax}
-\DeclareFROpt{heightadjust}{\flrow@htadj{#1}}
-\newcommand\DeclareHtAdj[2]{%
-  \define@key{flrow@htadj}{#1}[]{\g@addto@macro\FR@tmp{#2}}}
-\newcommand*\flrow@htadj[1]{\let\FR@tmp\@empty
-  \begingroup\caption@setkeys[floatrow]{flrow@htadj}{#1}\endgroup
-  \FR@tmp}
-\@onlypreamble\DeclareHtAdj
-\DeclareHtAdj{all}{\CADJtrue\OADJtrue}
-\DeclareHtAdj{caption}{\CADJtrue}
-\DeclareHtAdj{object}{\OADJtrue}
-\DeclareHtAdj{none}{\CADJfalse\OADJfalse}
-\DeclareHtAdj{nocaption}{\CADJfalse}
-\DeclareHtAdj{noobject}{\OADJfalse}
-\newif\ifCADJ
-\newif\ifOADJ
-\DeclareFROpt{valign}{\@FB@vpos{#1}}
-\newcommand\@FB@vpos[1]{%
-  \if#1t\def\FBafil{}\def\FBbfil{\vss}\else
-     \if#1b\def\FBafil{\vss}\def\FBbfil{}\else
-        \if#1c\def\FBafil{\vskip0ptplus1fillminus1000pt}%
-              \def\FBbfil{\vskip0ptplus1fillminus1000pt}\else
-           \if#1s\def\FBafil{\vskip0ptminus1000pt}%
-                 \def\FBbfil{\vskip0ptminus1000pt}%
-  \fi\fi\fi\fi}
-\@ifdefinable\FR@iffacing{\let\FR@iffacing\@secondoftwo}
-\DeclareFROpt{facing}[1]{\flrow@setbool{facing}{#1}}
-\newcommand\FB@facing{}
-\DeclareFROpt{margins}{\flrow@FBAlign{#1}}
-\newcommand*\flrow@FBAlign[1]{%
-  \@ifundefined{flrow@mj@#1}%
-    {\flrow@error{Undefined float alignment `#1'}}%
-    {\@nameuse{flrow@mj@#1}}}
-\newcommand*\DeclareMarginSet[2]{%
-  \global\@namedef{flrow@mj@#1}{#2}}
-\@onlypreamble\DeclareMarginSet
-\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@}
-\newskip\LTleft\newskip\LTright
-\DeclareMarginSet{hangleft}{\setfloatmargins
-    {\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
-  \LTleft-\marginparwidth\advance\LTleft-\marginparsep
-  \LTright=\fill}
-\DeclareMarginSet{hangright}{\setfloatmargins
-    {\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
-  \LTleft=\fill
-  \LTright-\marginparwidth\advance\LTright-\marginparsep}
-\DeclareMarginSet{hanginside}{\setfloatmargins
-    *{\hskip-\marginparwidth\hskip-\marginparsep\hskip\leftskip}{\hskip\rightskip}%
-  }
-\DeclareMarginSet{hangoutside}{\setfloatmargins
-    *{\hskip\leftskip}{\hskip-\marginparwidth\hskip-\marginparsep\hskip\rightskip}%
-  }
-\newcommand\flrow@mj@default{\flrow@mj@centering}
-\newcommand\floatfacing{\@ifstar
-  {\@FC@hpos\floatfacing@}{\FB@facing\floatfacing@}}
-\newcommand\floatfacing@[2]{\ifodd\count@#1\else#2\fi}
-\newcommand\floatboxmargins{\def\FR@tmp{FB}\FB@mset}
-\newcommand\floatrowmargins{\def\FR@tmp{FR}\FB@mset}
-\newcommand\floatcapbesidemargins{\def\FR@tmp{FC}\FB@mset}
-\newcommand\FB@mset{\@ifstar{\FB@mset@}{\FB@@mset}}
-\newcommand\FB@mset@[2]{%
-  \def\FB@facing{\let\FR@iffacing\@firstoftwo\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}}
-\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}}
-\setfloatmargins\hfill\hfill
-\DeclareFROpt{objectset}{\flrow@FBoAlign{#1}}
-\DeclareFROpt{justification}{\flrow@FBoAlign{#1}}
-\let\DeclareObjectSet\DeclareCaptionJustification
-\@onlypreamble\DeclareObjectSet
-\newcommand*\flrow@FBoAlign[1]{%
-  \@ifundefined{caption@hj@#1}%
-    {\flrow@error{Undefined object setting `#1'}}%
-    {\expandafter\let\expandafter\floatobjectset
-     \csname caption@hj@#1\endcsname}}
-\newcommand*\floatobjectset{\centering}
-\DeclareFROpt{floatwidth}{\flrow@FBo@wd{#1}}
-\@ifdefinable\FC@ifo@fil{\let\FC@ifo@fil\@secondoftwo}
-\newcommand\filFCOhsize{\let\FC@ifo@fil\@firstoftwo}
-\newcommand\nofilFCOhsize{\let\FC@ifo@fil\@secondoftwo}
-\newcommand\flrow@setwd{\relax}
-\newcommand\flrow@FBo@wd[1]{%
-  \caption@ifinlist{#1}{none,sidefil}{\filFCOhsize
-  }{\nofilFCOhsize\def\flrow@setwd{\@tempdima=#1}}}
-\DeclareFROpt{floatrowsep}{\flrow@setFRsep\floatrowsep{#1}}
-\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}}
-\DeclareFROpt{capbesidesep}{\flrow@setFRsep\floatcapbesidesep{#1}}
-\let\DeclareFloatSeparators\DeclareCaptionLabelSeparator
-\@onlypreamble\DeclareFloatSeparators
-\newcommand*\flrow@setFRsep[2]{%
-  \@ifundefined{caption@lsep@#2}%
-    {\flrow@error{Undefined float separator `#2'}}%
-    {\expandafter\let\expandafter#1\csname caption@lsep@#2\endcsname}}
-\DeclareFloatSeparators{columnsep}{\hskip\columnsep}
-\DeclareFloatSeparators{qquad}{\qquad}
-\DeclareFloatSeparators{fil}{\hskip\columnsep plus1fil}
-\DeclareFloatSeparators{fill}{\hskip\columnsep plus1fill}
-\newcommand\floatrowsep{\hskip\columnsep}
-\newcommand\floatcapbesidesep{\hskip\columnsep}
-\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}}
-\newcommand\DeclareFloatVCode[2]{\@namedef{flrow@FBr@#1}{#2}}
-\@onlypreamble\DeclareFloatVCode
-\newcommand*\flrow@FBrule[3]{%
-  \@ifundefined{flrow@FBr@#3}%
-    {\flrow@error{Undefined rule `#3'}}%
-    {\let#1\empty
-     \expandafter\let\expandafter#2\csname flrow@FBr@#3\endcsname}}
-\newcommand*\flrow@FRrule[3]{%
-  \@ifundefined{flrow@FBr@#3}%
-    {\flrow@error{Undefined rule `#3'}}%
-    {\def#2{\FBiffloatrow\relax{\@nameuse{flrow@FBr@#3}}}%
-     \expandafter\let\expandafter#1\csname flrow@FBr@#3\endcsname}}
-\newcommand*\flrow@FBskip[1]{%
-  \@ifundefined{flrow@FBr@#1}%
-    {\flrow@error{Undefined rule `#1'}}%
-    {\expandafter\let\expandafter\@@FBskip\csname flrow@FBr@#1\endcsname}}
-\DeclareFloatVCode{none}{}
-\DeclareFloatVCode{thickrule}{\par\rule{\hsize}{.8pt}\vskip2pt\par}
-\DeclareFloatVCode{rule}{\vskip2pt\hrule\vskip2pt}
-\DeclareFloatVCode{lowrule}{\par\vskip2pt\rule\hsize\@wholewidth\par}
-\DeclareFloatVCode{captionskip}{\vskip\captionskip}
-\newcommand\FBstyle@reset{\let\FRifFBOX\@secondoftwo\OADJfalse\CADJfalse\capbot
-  \def\@@FBskip{\vskip\captionskip}\def\@@FRabove{}\def\@@FRbelow{}%
-  \def\@@FBabove{}\def\@@FBbelow{}%
-  \def\FB@Bset{}\def\FB@frame{}\def\FBo@frame{}\def\FR@frame{}%
-  \def\FBo@wadj{}\def\FBo@hadj{}\def\FB@wadj{}\def\FB@hadj{}\def\FR@wadj{}\def\FR@hadj{}}
-\newcommand\@@FBskip{\vskip\captionskip}
-\@ifdefinable\@@FRabove{\def\@@FRabove{}}
-\@ifdefinable\@@FRbelow{\def\@@FRbelow{}}
-\@ifdefinable\@@FBabove{\def\@@FBabove{}}
-\@ifdefinable\@@FBbelow{\def\@@FBbelow{}}
-\@ifdefinable\FB@frame {\def\FB@frame {}}
-\@ifdefinable\FBo@frame{\def\FBo@frame{}}
-\@ifdefinable\FR@frame {\def\FR@frame {}}
-\@ifdefinable\FBo@wadj {\def\FBo@wadj {}}
-\@ifdefinable\FBo@hadj {\def\FBo@hadj {}}
-\@ifdefinable\FB@wadj  {\def\FB@wadj  {}}
-\@ifdefinable\FB@hadj  {\def\FB@hadj  {}}
-\@ifdefinable\FR@wadj  {\def\FR@wadj  {}}
-\@ifdefinable\FR@hadj  {\def\FR@hadj  {}}
-\@ifdefinable\FB@Bset  {\def\FB@Bset  {}}
-\DeclareFROpt{framestyle}{\@ifundefined{FB@#1@frame}%
-  {\let\FRifFBOX\@secondoftwo}{\let\FRifFBOX\@firstoftwo\def\FB@B@{#1}}}
-\DeclareFROpt{framearound}{\flrow@fr@round{#1}}
-\newcommand*\flrow@fr@round[1]{%
- \caption@ifinlist{#1}{object,contents}{\let\FRifFBOX\@firstoftwo
-    \def\FB@BO@{FBo}%
-  }{\caption@ifinlist{#1}{floatbox,all}{\let\FRifFBOX\@firstoftwo
-    \def\FB@BO@{FB}%
-  }{\caption@ifinlist{#1}{row}{\let\FRifFBOX\@firstoftwo
-    \def\FB@BO@{FR}%
-  }{\caption@ifinlist{#1}{none}{\let\FRifFBOX\@secondoftwo
-  }{\flrow@error{Undefined framed object `#1'}%
-  }}}}}
-\@ifdefinable\FR@ifFIT{\let\FR@ifFIT\@secondoftwo}
-\@ifdefinable\FR@ifROWFILL{\let\FR@ifROWFILL\@secondoftwo}
-\DeclareFROpt{framefit}[0]{\flrow@setbool{FIT}{#1}}
-\@ifdefinable\flrow@@setROWFILL{}
-\@ifdefinable\flrow@leftfill{}\@ifdefinable\flrow@rightfill{}
-\DeclareFROpt{rowfill}[0]{\flrow@setbool{ROWFILL}{#1}}
-\DeclareFROpt{frameset}{\def\FB@Bset{#1}}
-\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}{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
-    \@nameuse{FB@\FB@B@ @adj}}\relax}%
-  \@namedef{\FB@BO@ @frame}{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
-    \@nameuse{FB@\FB@B@ @frame}}%
-  \ifx\FR@frame\empty\else%\ifx\FB@frame\empty
-     \def\FB@hadj{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
-       \@nameuse{FB@\FB@B@ @adj}}%
-     \def\FB@wadj{\FR@ifFIT{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
-       \@nameuse{FB@\FB@B@ @adj}}\relax}%
-     \def\FB@frame{\@nameuse{FB@\FB@B@ @reset}\FB@Bset
-       \@nameuse{FB@\FB@B@ @frame}}%
-  \fi%\fi
-  }
-\@ifdefinable\FRifFBOX{\let\FRifFBOX\@secondoftwo}
-\newcommand\FB@fbox@frame[1]{\hbox{%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\fbox{#1}%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
-\newcommand\FB@fbox@adj{\dimen@=2\fboxsep\advance\dimen@2\fboxrule}
-\newcommand\FB@fbox@reset{\fboxsep3\p@\fboxrule.4\p@}
-\newcommand\FB@colorbox@frame[1]{\hbox{%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
-\@ifdefinable\FB@colorbox@adj{\let\FB@colorbox@adj\FB@fbox@adj}
-\newcommand\FB@colorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
-\newcommand\FB@fcolorbox{\fbox}
-\newcommand\FB@fcolorcorners{}
-\@ifdefinable\FR@phantom{}\@ifdefinable\FRset@color{}
-\newcommand\FB@FRcolorbox@frame[1]{\hbox{\let\color@block\FRcolor@block
-  \let\FR@phantom\@firstofone\let\FRset@color\set@color\FB@fcolorcorners
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\FB@fcolorbox{#1}%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
-\@ifdefinable\FB@FRcolorbox@adj{\let\FB@FRcolorbox@adj\FB@fbox@adj}
-\newcommand\FB@FRcolorbox@reset{\fboxsep3\p@\fboxrule.4\p@}
-\newcommand\FB@corners@frame[1]{\hbox{\let\color@block\FRcolor@block
-  \let\FR@phantom\phantom\let\FRset@color\relax\FB@fcolorcorners
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}\colorbox{white}{#1}%
-  \FR@ifFIT\relax{\kern-\fboxrule\kern-\fboxsep}}\ignorespaces}
-\@ifdefinable\FB@corners@adj{\let\FB@corners@adj\FB@fbox@adj}
-\newcommand\FB@corners@reset{\fboxsep3\p@\fboxrule\z@}
-\newcommand\flrow@l@color@side[2]{{\let\unitlength\relax
-    \picture(\z@,\z@)(\z@,\z@)
-    \put(\z@,#1){{\flrow@ll@col@put}}
-    \put(\z@,#2){{\flrow@ul@col@put}}
-    \endpicture}}
-\newcommand\flrow@r@color@side[2]{{\let\unitlength\relax
-    \picture(\z@,\z@)(\z@,\z@)
-    \put(\z@,#1){{\flrow@lr@col@put}}
-    \put(\z@,#2){{\flrow@ur@col@put}}
-    \endpicture}}
-\newcommand\flrow@ll@col@put{}
-\newcommand\flrow@ul@col@put{}
-\newcommand\flrow@lr@col@put{}
-\newcommand\flrow@ur@col@put{}
-\newcommand\flrow@cboxcorners[4]{%
-    \def\flrow@ll@col@put{#1}%
-    \def\flrow@lr@col@put{#2}%
-    \def\flrow@ur@col@put{#3}%
-    \def\flrow@ul@col@put{#4}%
-    }
-\newcommand\FRcolorboxwd{\z@}
-\newcommand\FRcolorboxht{\z@}
-\newcommand\FRcolorboxdp{\z@}
-\def\FRcolor@block#1#2#3{%
-  {\FRset@color
-   \rlap{\@tempdima#1\edef\FRcolorboxwd{\the\@tempdima}\@tempdima#2\advance\@tempdima#3%
-   \edef\FRcolorboxht{\the\@tempdima}\@tempdima#3\edef\FRcolorboxdp{\the\@tempdima}%
-   \ifcolors@\else\let\FR@phantom\phantom\fi
-     \flrow@l@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
-     \FR@phantom{\vrule\@width#1\@height#2\@depth#3}%
-     \flrow@r@color@side{-\FRcolorboxdp}{\FRcolorboxht}%
-    }}}
-\DeclareFROpt{colorframeset}{\flrow@fcolorbox{#1}}
-\DeclareFROpt{colorframecorners}{\flrow@fcolorcorners{#1}}
-\newcommand*\flrow@fcolorbox[1]{%
-  \@ifundefined{flrow@fcolorbox@#1}%
-    {\flrow@error{Undefined color box `#1'}}%
-    {\expandafter\let\expandafter\FB@fcolorbox
-     \csname flrow@fcolorbox@#1\endcsname}}
-\newcommand*\flrow@fcolorcorners[1]{%
-  \@ifundefined{flrow@fcolorcorners@#1}%
-    {\flrow@error{Undefined color box corners `#1'}}%
-    {\expandafter\let\expandafter\FB@fcolorcorners
-     \csname flrow@fcolorcorners@#1\endcsname}}
-\newcommand*\DeclareColorBox[2]{%
-  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
-   \long\@namedef{flrow@fcolorbox@#1}{#2}}}
-\newcommand*\DeclareCBoxCorners[5]{%
-  \@ifundefined{color}{}{\let\flrow@load@colorpackage\relax
-   \long\@namedef{flrow@fcolorcorners@#1}{\flrow@cboxcorners{#2}{#3}{#4}{#5}}}}
-\@onlypreamble\DeclareColorBox
-\@onlypreamble\DeclareCBoxCorners
-\newcommand\flrow@load@colorpackage{\IfFileExists{color.sty}%
-    {\def\next{\RequirePackage{color}}}{\let\next\relax}\next}
-\AtBeginDocument{\flrow@load@colorpackage\let\flrow@load@colorpackage\relax}
-\DeclareFROpt{captionskip}{\def\captionskip{#1}%
-  \setlength\abovecaptionskip{#1}}
-\DeclareFROpt{footskip}{\def\floatfootskip{#1}}
-\newcommand\captionskip{10\p@}
-\newcommand\floatfootskip{\skip\@mpfootins}
-\DeclareFROpt{footnoterule}{\flrow@footrule{#1}}
-\newcommand\DeclareFloatFootnoterule[2]{%
-  \long\@namedef{flrow@fnrule@#1}{#2}}
-\newcommand*\flrow@footrule[1]{%
-  \@ifundefined{flrow@fnrule@#1}%
-    {\flrow@error{Undefined footnoterule `#1'}}%
-    {\let\@@FRabove\empty
-     \expandafter\let\expandafter\FBfootnoterule\csname
-       flrow@fnrule@#1\endcsname}}
-\@onlypreamble\DeclareFloatFootnoterule
-\DeclareFloatFootnoterule{normal}{\kern-3\p@
-  \@tempdima.4\columnwidth
-  \hrule\@width\@tempdima\kern2.6\p@}
-\DeclareFloatFootnoterule{limited}{\kern-3\p@
-  \@tempdima.4\columnwidth
-  \ifdim\@tempdima>\frulemax\@tempdima=\frulemax\fi
-  \hrule\@width\@tempdima\kern2.6\p@}
-\newcommand\frulemax{1in}
-\DeclareFloatFootnoterule{fullsize}{\kern-3\p@
-  \hrule\@width\hsize\kern2.6\p@}
-\DeclareFloatFootnoterule{none}{}
-\@ifdefinable\FBfootnoterule{\let\FBfootnoterule\footnoterule}
-\@ifdefinable\FR@iffancy{\let\FR@iffancy\@secondoftwo}
-\DeclareFROpt{fancyboxes}{\flrow@setbool{fancy}{#1}}
-\newcommand\DeclareFNOpt{%
-   \@ifstar{\flrow@declfnopt\AtBeginDocument}
-           {\flrow@declfnopt\@gobble}}
-\newcommand*\flrow@declfnopt[2]{%
-   #1{\undefine@key{newfloat}{#2}}\define@key{newfloat}{#2}}
-\@onlypreamble\DeclareFNOpt
-\@ifdefinable\flrow@types{\newtoks\flrow@types}
-\newcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}%
-  \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}%
-  \addtocounter{float@type}{\value{float@type}}%
-  \@namedef{#1name}{#1}\newcounter{#1}%
-  \expandafter\edef\csname fnum@#1\endcsname
-    {\expandafter\noexpand\csname #1name\endcsname\nobreakspace
-       \expandafter\noexpand\csname the#1\endcsname}%
-  \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}%
-  \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}%
-  \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax
-  \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}%
-  \@tempa}
-\@onlypreamble\DeclareNewFloatType
-\DeclareFNOpt*{placement}{\flnew@fps{#1}}
-\newcommand\flnew@fps[1]{\@namedef{fps@\FB@captype}{#1}}
-\@onlypreamble\flnew@fps
-\DeclareFNOpt*{name}{\flnew@fname{#1}}
-\newcommand\flnew@fname[1]{\@namedef{\FB@captype name}{#1}}
-\@onlypreamble\flnew@fname
-\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
-\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
-\def\ProcessOptionsWithKV#1{%
-  \let\@tempc\relax
-  \let\FR@tmp\@empty
-  \@for\CurrentOption:=\@classoptionslist\do{%
-    \@ifundefined{KV@#1@\CurrentOption}%
-    {}%
-    {%
-      \@ifundefined{KV@#1@\CurrentOption @default}{%
-       \PackageInfo{#1}{Global option `\CurrentOption' ignored}%
-      }{%
-      \PackageInfo{#1}{Global option `\CurrentOption' processed}%
-      \edef\FR@tmp{\FR@tmp,\CurrentOption,}%
-      \@expandtwoargs\@removeelement\CurrentOption
-        \@unusedoptionlist\@unusedoptionlist
-        }%
-    }%
-  }%
-  \edef\FR@tmp{%
-    \noexpand\caption@setkeys[floatrow]{#1}{%
-      \FR@tmp\@ptionlist{\@currname.\@currext}%
-    }%
-  }%
-  \FR@tmp
-  \let\CurrentOption\@empty
-  \AtEndOfPackage{\let\@unprocessedoptions\relax}}
-\ProcessOptionsWithKV{floatrow}
-\FR@iffancy{\RequirePackage{fr-fancy}}\relax
-\let\ProcessOptionsWithKV\undefined
-\AtBeginDocument{
- \FR@ifrawfloats
-  {\let\FR@tmp\flrow@Raw@restyle
- }{\flrow@restyle{table}\flrow@restyle{figure}%
-   \let\FR@tmp\flrow@restyle
-  }\the\flrow@types
- \@onlypreamble\flrow@restyle\@onlypreamble\flrow@Raw@restyle
- \flrow@types={}}
-\AtBeginDocument{%
-\@ifundefined{sf@@@subfloat}{\@tempswafalse}{\@tempswatrue}
-\if@tempswa\RequirePackage{fr-subfig}\fi}
-\AtBeginDocument{%
-\@ifundefined{LT@array}{\@tempswafalse}{\@tempswatrue}
-\if@tempswa\RequirePackage{fr-longtable}\fi}
-\endinput
-%%
-%% End of file `floatrowpf.sty'.
diff --git a/howto/howto.tex b/howto/howto.tex
index 2e95375..90abb14 100644
--- a/howto/howto.tex
+++ b/howto/howto.tex
@@ -361,7 +361,7 @@ Other types of systems have well-known ways of locating files by filename.
 \section{Whose Book Is This?}
 \label{sec:howto:Whose Book Is This?}

-\begin{figure*}[tbp]\RawFloats
+\begin{figure*}[tbp]
 {
 \scriptsize
 \begin{verbbox}
@@ -379,7 +379,7 @@ Other types of systems have well-known ways of locating files by filename.
 \label{fig:howto:Creating a Up-To-Date PDF}
 \end{figure*}

-\begin{figure*}[tbp]\RawFloats
+\begin{figure*}[tbp]
 {
 \scriptsize
 \begin{verbbox}
diff --git a/perfbook.tex b/perfbook.tex
index 16d30dd..cda014c 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -80,10 +80,6 @@
 \renewcommand{\path}[1]{\nolinkurl{#1}} % workaround of interference with mathastext
 }{}

-\usepackage{floatrowpf} % Use customized floatrow
-\DeclareNewFloatType{listing}{placement=htbp,name=Listing,within=chapter,fileext=lst}
-\usepackage{booktabs} % For better looking tables
-
 \usepackage{bm} % for bold math mode fonts --- should be after math mode font choice

 \IfLmttForCode{
-- 
2.7.4




^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 2/3] advsync: Employ auto-numbering in litmus tests
  2017-08-05  3:41               ` [PATCH 0/3] Employ auto-numbering in litmus tests Akira Yokosawa
  2017-08-05  3:43                 ` [PATCH 1/3] Revert commits after "Localize floatrow.sty as floatrowpf.sty" Akira Yokosawa
@ 2017-08-05  3:44                 ` Akira Yokosawa
  2017-08-05  3:46                 ` [PATCH 3/3] styleguide: Remove references to 'floatrow' and adjust context Akira Yokosawa
  2017-08-05 15:09                 ` [PATCH 0/3] Employ auto-numbering in litmus tests Paul E. McKenney
  3 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-08-05  3:44 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From afc9bca87eff357ed51a49e8933a1006071d8b39 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Thu, 3 Aug 2017 21:37:34 +0900
Subject: [PATCH 2/3] advsync: Employ auto-numbering in litmus tests

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 advsync/memorybarriers.tex | 502 ++++++++++++++++++++++-----------------------
 perfbook.tex               |   2 +
 2 files changed, 253 insertions(+), 251 deletions(-)

diff --git a/advsync/memorybarriers.tex b/advsync/memorybarriers.tex
index 6754ba5..3ebd3bc 100644
--- a/advsync/memorybarriers.tex
+++ b/advsync/memorybarriers.tex
@@ -14,29 +14,29 @@ RCU.

 \begin{figure}
 { \scriptsize
-\begin{verbbox}
- 1 C C-SB+o-o+o-o
- 2 {
- 3 }
- 4
- 5 P0(int *x0, int *x1)
- 6 {
- 7   int r2;
- 8
- 9   WRITE_ONCE(*x0, 2);
-10   r2 = READ_ONCE(*x1);
-11 }
-12
-13
-14 P1(int *x0, int *x1)
-15 {
-16   int r2;
-17
-18   WRITE_ONCE(*x1, 2);
-19   r2 = READ_ONCE(*x0);
-20 }
-21
-22 exists (1:r2=0 /\ 0:r2=0)
+\begin{verbbox}[\LstLineNo]
+C C-SB+o-o+o-o
+{
+}
+
+P0(int *x0, int *x1)
+{
+  int r2;
+
+  WRITE_ONCE(*x0, 2);
+  r2 = READ_ONCE(*x1);
+}
+
+
+P1(int *x0, int *x1)
+{
+  int r2;
+
+  WRITE_ONCE(*x1, 2);
+  r2 = READ_ONCE(*x0);
+}
+
+exists (1:r2=0 /\ 0:r2=0)
 \end{verbbox}
 }
 \centering
@@ -284,31 +284,31 @@ thus allowing you to stop reading this section.

 \begin{figure}
 { \scriptsize
-\begin{verbbox}
- 1 C C-SB+o-mb-o+o-mb-o
- 2 {
- 3 }
- 4
- 5 P0(int *x0, int *x1)
- 6 {
- 7   int r2;
- 8
- 9   WRITE_ONCE(*x0, 2);
-10   smp_mb();
-11   r2 = READ_ONCE(*x1);
-12 }
-13
-14
-15 P1(int *x0, int *x1)
-16 {
-17   int r2;
-18
-19   WRITE_ONCE(*x1, 2);
-20   smp_mb();
-21   r2 = READ_ONCE(*x0);
-22 }
-23
-24 exists (1:r2=0 /\ 0:r2=0)
+\begin{verbbox}[\LstLineNo]
+C C-SB+o-mb-o+o-mb-o
+{
+}
+
+P0(int *x0, int *x1)
+{
+  int r2;
+
+  WRITE_ONCE(*x0, 2);
+  smp_mb();
+  r2 = READ_ONCE(*x1);
+}
+
+
+P1(int *x0, int *x1)
+{
+  int r2;
+
+  WRITE_ONCE(*x1, 2);
+  smp_mb();
+  r2 = READ_ONCE(*x0);
+}
+
+exists (1:r2=0 /\ 0:r2=0)
 \end{verbbox}
 }
 \centering
@@ -589,32 +589,32 @@ loads and stores.

 \begin{figure}[tbp]
 { \scriptsize
-\begin{verbbox}
- 1 C C-MP+o-wmb-o+o-o.litmus
- 2
- 3 {
- 4 }
- 5
- 6
- 7 P0(int* x0, int* x1) {
- 8
- 9   WRITE_ONCE(*x0, 2);
-10   smp_wmb();
-11   WRITE_ONCE(*x1, 2);
-12
-13 }
-14
-15 P1(int* x0, int* x1) {
-16
-17   int r2;
-18   int r3;
-19
-20   r2 = READ_ONCE(*x1);
-21   r3 = READ_ONCE(*x0);
-22
-23 }
-24
-25 exists (1:r2=2 /\ 1:r3=0)
+\begin{verbbox}[\LstLineNo]
+C C-MP+o-wmb-o+o-o.litmus
+
+{
+}
+
+
+P0(int* x0, int* x1) {
+
+  WRITE_ONCE(*x0, 2);
+  smp_wmb();
+  WRITE_ONCE(*x1, 2);
+
+}
+
+P1(int* x0, int* x1) {
+
+  int r2;
+  int r3;
+
+  r2 = READ_ONCE(*x1);
+  r3 = READ_ONCE(*x0);
+
+}
+
+exists (1:r2=2 /\ 1:r3=0)
 \end{verbbox}
 }
 \centering
@@ -636,32 +636,32 @@ this~\cite{JadeAlglave2011ppcmem}.

 \begin{figure}[tbp]
 { \scriptsize
-\begin{verbbox}
- 1 C C-MP+o-wmb-o+o-rmb-o.litmus
- 2
- 3 {
- 4 }
- 5
- 6 P0(int* x0, int* x1) {
- 7
- 8   WRITE_ONCE(*x0, 2);
- 9   smp_wmb();
-10   WRITE_ONCE(*x1, 2);
-11
-12 }
-13
-14 P1(int* x0, int* x1) {
-15
-16   int r2;
-17   int r3;
-18
-19   r2 = READ_ONCE(*x1);
-20   smp_rmb();
-21   r3 = READ_ONCE(*x0);
-22
-23 }
-24
-25 exists (1:r2=2 /\ 1:r3=0)
+\begin{verbbox}[\LstLineNo]
+C C-MP+o-wmb-o+o-rmb-o.litmus
+
+{
+}
+
+P0(int* x0, int* x1) {
+
+  WRITE_ONCE(*x0, 2);
+  smp_wmb();
+  WRITE_ONCE(*x1, 2);
+
+}
+
+P1(int* x0, int* x1) {
+
+  int r2;
+  int r3;
+
+  r2 = READ_ONCE(*x1);
+  smp_rmb();
+  r3 = READ_ONCE(*x0);
+
+}
+
+exists (1:r2=2 /\ 1:r3=0)
 \end{verbbox}
 }
 \centering
@@ -677,29 +677,29 @@ Figure~\ref{fig:advsync:Enforcing Order of Message-Passing Litmus Test}.

 \begin{figure}[tbp]
 { \scriptsize
-\begin{verbbox}
- 1 C C-LB+o-o+o-o
- 2 {
- 3 }
- 4
- 5 P0(int *x0, int *x1)
- 6 {
- 7   int r2;
- 8
- 9   r2 = READ_ONCE(*x1);
-10   WRITE_ONCE(*x0, 2);
-11 }
-12
-13
-14 P1(int *x0, int *x1)
-15 {
-16   int r2;
-17
-18   r2 = READ_ONCE(*x0);
-19   WRITE_ONCE(*x1, 2);
-20 }
-21
-22 exists (1:r2=2 /\ 0:r2=2)
+\begin{verbbox}[\LstLineNo]
+C C-LB+o-o+o-o
+{
+}
+
+P0(int *x0, int *x1)
+{
+  int r2;
+
+  r2 = READ_ONCE(*x1);
+  WRITE_ONCE(*x0, 2);
+}
+
+
+P1(int *x0, int *x1)
+{
+  int r2;
+
+  r2 = READ_ONCE(*x0);
+  WRITE_ONCE(*x1, 2);
+}
+
+exists (1:r2=2 /\ 0:r2=2)
 \end{verbbox}
 }
 \centering
@@ -718,29 +718,29 @@ reordering~\cite{JadeAlglave2011ppcmem}.

 \begin{figure}[tbp]
 { \scriptsize
-\begin{verbbox}
- 1 C C-LB+o-r+a-o.litmus
- 2 {
- 3 }
- 4
- 5 P0(int *x0, int *x1)
- 6 {
- 7   int r2;
- 8
- 9   r2 = READ_ONCE(*x1);
-10   smp_store_release(x0, 2);
-11 }
-12
-13
-14 P1(int *x0, int *x1)
-15 {
-16   int r2;
-17
-18   r2 = smp_load_acquire(x0);
-19   WRITE_ONCE(*x1, 2);
-20 }
-21
-22 exists (1:r2=2 /\ 0:r2=2)
+\begin{verbbox}[\LstLineNo]
+C C-LB+o-r+a-o.litmus
+{
+}
+
+P0(int *x0, int *x1)
+{
+  int r2;
+
+  r2 = READ_ONCE(*x1);
+  smp_store_release(x0, 2);
+}
+
+
+P1(int *x0, int *x1)
+{
+  int r2;
+
+  r2 = smp_load_acquire(x0);
+  WRITE_ONCE(*x1, 2);
+}
+
+exists (1:r2=2 /\ 0:r2=2)
 \end{verbbox}
 }
 \centering
@@ -757,31 +757,31 @@ Figure~\ref{fig:advsync:Enforcing Ordering of Load-Buffering Litmus Test}.

 \begin{figure}[tbp]
 { \scriptsize
-\begin{verbbox}
- 1 C C-MP+o-o+o-rmb-o.litmus
- 2
- 3 {
- 4 }
- 5
- 6 P0(int* x0, int* x1) {
- 7
- 8   WRITE_ONCE(*x0, 2);
- 9   WRITE_ONCE(*x1, 2);
-10
-11 }
-12
-13 P1(int* x0, int* x1) {
-14
-15   int r2;
-16   int r3;
-17
-18   r2 = READ_ONCE(*x1);
-19   smp_rmb();
-20   r3 = READ_ONCE(*x0);
-21
-22 }
-23
-24 exists (1:r2=2 /\ 1:r3=0)
+\begin{verbbox}[\LstLineNo]
+C C-MP+o-o+o-rmb-o.litmus
+
+{
+}
+
+P0(int* x0, int* x1) {
+
+  WRITE_ONCE(*x0, 2);
+  WRITE_ONCE(*x1, 2);
+
+}
+
+P1(int* x0, int* x1) {
+
+  int r2;
+  int r3;
+
+  r2 = READ_ONCE(*x1);
+  smp_rmb();
+  r3 = READ_ONCE(*x0);
+
+}
+
+exists (1:r2=2 /\ 1:r3=0)
 \end{verbbox}
 }
 \centering
@@ -811,33 +811,33 @@ instruction.

 \begin{figure}[tbp]
 { \scriptsize
-\begin{verbbox}
- 1 C C-MP+o-wmb-o+o-ad-o.litmus
- 2
- 3 {
- 4 int y=1;
- 5 int *x1 = &y;
- 6 }
- 7
- 8 P0(int* x0, int** x1) {
- 9
-10   WRITE_ONCE(*x0, 2);
-11   smp_wmb();
-12   WRITE_ONCE(*x1, x0);
-13
-14 }
-15
-16 P1(int** x1) {
-17
-18   int *r2;
-19   int r3;
-20
-21   r2 = READ_ONCE(*x1);
-22   r3 = READ_ONCE(*r2);
-23
-24 }
-25
-26 exists (1:r2=x0 /\ 1:r3=1)
+\begin{verbbox}[\LstLineNo]
+C C-MP+o-wmb-o+o-ad-o.litmus
+
+{
+int y=1;
+int *x1 = &y;
+}
+
+P0(int* x0, int** x1) {
+
+  WRITE_ONCE(*x0, 2);
+  smp_wmb();
+  WRITE_ONCE(*x1, x0);
+
+}
+
+P1(int** x1) {
+
+  int *r2;
+  int r3;
+
+  r2 = READ_ONCE(*x1);
+  r3 = READ_ONCE(*r2);
+
+}
+
+exists (1:r2=x0 /\ 1:r3=1)
 \end{verbbox}
 }
 \centering
@@ -872,33 +872,33 @@ Section~\ref{sec:app:whymb:Alpha}.

 \begin{figure}[tbp]
 { \scriptsize
-\begin{verbbox}
- 1 C C-MP+o-wmb-o+ld-ad-o.litmus
- 2
- 3 {
- 4 int y=1;
- 5 int *x1 = &y;
- 6 }
- 7
- 8 P0(int* x0, int** x1) {
- 9
-10   WRITE_ONCE(*x0, 2);
-11   smp_wmb();
-12   WRITE_ONCE(*x1, x0);
-13
-14 }
-15
-16 P1(int** x1) {
-17
-18   int *r2;
-19   int r3;
-20
-21   r2 = lockless_dereference(*x1);
-22   r3 = READ_ONCE(*r2);
-23
-24 }
-25
-26 exists (1:r2=x0 /\ 1:r3=1)
+\begin{verbbox}[\LstLineNo]
+C C-MP+o-wmb-o+ld-ad-o.litmus
+
+{
+int y=1;
+int *x1 = &y;
+}
+
+P0(int* x0, int** x1) {
+
+  WRITE_ONCE(*x0, 2);
+  smp_wmb();
+  WRITE_ONCE(*x1, x0);
+
+}
+
+P1(int** x1) {
+
+  int *r2;
+  int r3;
+
+  r2 = lockless_dereference(*x1);
+  r3 = READ_ONCE(*r2);
+
+}
+
+exists (1:r2=x0 /\ 1:r3=1)
 \end{verbbox}
 }
 \centering
@@ -916,32 +916,32 @@ thereby forcing the required ordering on all platforms.

 \begin{figure}[tbp]
 { \scriptsize
-\begin{verbbox}
- 1 C C-S+o-wmb-o+o-ad-o.litmus
- 2
- 3 {
- 4 int y=1;
- 5 int *x1 = &y;
- 6 }
- 7
- 8 P0(int* x0, int** x1) {
- 9
-10   WRITE_ONCE(*x0, 2);
-11   smp_wmb();
-12   WRITE_ONCE(*x1, x0);
-13
-14 }
-15
-16 P1(int** x1) {
-17
-18   int *r2;
-19
-20   r2 = READ_ONCE(*x1);
-21   WRITE_ONCE(*r2, 3);
-22
-23 }
-24
-25 exists (1:r2=x0 /\ x0=2)
+\begin{verbbox}[\LstLineNo]
+C C-S+o-wmb-o+o-ad-o.litmus
+
+{
+int y=1;
+int *x1 = &y;
+}
+
+P0(int* x0, int** x1) {
+
+  WRITE_ONCE(*x0, 2);
+  smp_wmb();
+  WRITE_ONCE(*x1, x0);
+
+}
+
+P1(int** x1) {
+
+  int *r2;
+
+  r2 = READ_ONCE(*x1);
+  WRITE_ONCE(*r2, 3);
+
+}
+
+exists (1:r2=x0 /\ x0=2)
 \end{verbbox}
 }
 \centering
diff --git a/perfbook.tex b/perfbook.tex
index cda014c..7e201a6 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -80,6 +80,8 @@
 \renewcommand{\path}[1]{\nolinkurl{#1}} % workaround of interference with mathastext
 }{}

+\newcommand{\LstLineNo}{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}
+
 \usepackage{bm} % for bold math mode fonts --- should be after math mode font choice

 \IfLmttForCode{
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH 3/3] styleguide: Remove references to 'floatrow' and adjust context
  2017-08-05  3:41               ` [PATCH 0/3] Employ auto-numbering in litmus tests Akira Yokosawa
  2017-08-05  3:43                 ` [PATCH 1/3] Revert commits after "Localize floatrow.sty as floatrowpf.sty" Akira Yokosawa
  2017-08-05  3:44                 ` [PATCH 2/3] advsync: Employ auto-numbering in litmus tests Akira Yokosawa
@ 2017-08-05  3:46                 ` Akira Yokosawa
  2017-08-05 15:09                 ` [PATCH 0/3] Employ auto-numbering in litmus tests Paul E. McKenney
  3 siblings, 0 replies; 40+ messages in thread
From: Akira Yokosawa @ 2017-08-05  3:46 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From ba0af5ad755ab4e175b07abb71890077e4d54a20 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sat, 5 Aug 2017 12:20:00 +0900
Subject: [PATCH 3/3] styleguide: Remove references to 'floatrow' and adjust context

Also fix a typo (and -> nor).

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 appendix/styleguide/styleguide.tex | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/appendix/styleguide/styleguide.tex b/appendix/styleguide/styleguide.tex
index 72b8ca0..22ff2f4 100644
--- a/appendix/styleguide/styleguide.tex
+++ b/appendix/styleguide/styleguide.tex
@@ -128,7 +128,7 @@ be used as a prefix. An improper example:
 \label{sec:app:styleguide:Non-SI Unit Symbol}

 Although NIST style guide does not cover non-SI unit symbols
-such as ``KB'', ``MB'', and ``GB'', the same rule should be followed.
+such as ``KB'', ``MB'', nor ``GB'', the same rule should be followed.

 Example:

@@ -320,9 +320,9 @@ Line numbers are manually placed for ease of referencing them within
   number counter and the count can be displayed in the resulting
   listing. Leftmost line numbers in
   Figure~\ref{fig:app:styleguide:LaTeX Source of Sample Code Snippet}
-  are output by the feature. See the source of this Section
-  in \path{appendix/styleguide/styleguide.tex}
-  if you are interested.}
+  are output by the feature. The litmus tests in
+  Section~\ref{sec:advsync:Memory Barriers}
+  has been converted to use the auto-numbering feature.}

 The verbatim environment is used for listings with too many lines
 to fit in a column. It is also used to avoid overwhelming
@@ -411,8 +411,7 @@ The \qco{\\verb} macro can be used in running text if you
 need to use monospace font for a string which contains
 many characters to escape.\footnote{
   \co{\\verb} is not almighty though. For example, you can't use it
-  within a footnote nor table inside ``floatrow'' environment mentioned
-  later. If you do so, you will see a fatal latex error.
+  within a footnote. If you do so, you will see a fatal latex error.
   There are several workarounds of this problem, but as for perfbook,
   \co{\\co\{\}} should suffice.}

@@ -588,7 +587,10 @@ This section lists up such candidates.

 Strictly speaking, code snippets are \emph{not} figures.
 They deserve their own floating environment.
-The ``floatrow'' package would be of help.
+The ``float'' package would be of help.\footnote{
+  The ``floatrow'' package provides us even more flexible
+  control of floating objects. However, because of an issue
+  in two-column layout, we can not use it at the moment.}

 % TODO: Add example

@@ -602,7 +604,7 @@ top. You naturally look at the top of a table at first. Captions at
 the bottom of tables disturb this flow.
 The same can be said of code snippets, which are read from
 top to bottom.
-The floatrow package mentioned above also has the capability
+The float package mentioned above also has the capability
 to adjust layout of caption.

 % TODO: Add example
@@ -617,13 +619,11 @@ as the default for the environment.
 To prevent a pair of closely related figures or listings
 from being placed in different pages, it is desirable to group
 them into a single floating environment.
-The floatrow package provides the features to do so.\footnote{
+The ``subfig'' package provides the features to do so.\footnote{
   Note that the ``subfigure'' package currently declared in the
-  preamble is not used any more.
-  The floatrow package is the choice to group floating environments
-  these days.
-  One problem of grouping figures might be the learning curve
-  to do so.}
+  preamble is obsoleted by subfig package.
+  One problem of grouping figures might be the complexity in
+  \LaTeX\ source.}

 % TODO: Add example

-- 
2.7.4



^ permalink raw reply related	[flat|nested] 40+ messages in thread

* Re: [PATCH 0/3] Employ auto-numbering in litmus tests
  2017-08-05  3:41               ` [PATCH 0/3] Employ auto-numbering in litmus tests Akira Yokosawa
                                   ` (2 preceding siblings ...)
  2017-08-05  3:46                 ` [PATCH 3/3] styleguide: Remove references to 'floatrow' and adjust context Akira Yokosawa
@ 2017-08-05 15:09                 ` Paul E. McKenney
  2017-08-05 15:35                   ` Akira Yokosawa
  3 siblings, 1 reply; 40+ messages in thread
From: Paul E. McKenney @ 2017-08-05 15:09 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Sat, Aug 05, 2017 at 12:41:30PM +0900, Akira Yokosawa wrote:
> >From ba0af5ad755ab4e175b07abb71890077e4d54a20 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Sat, 5 Aug 2017 12:29:10 +0900
> Subject: [PATCH 0/3] Employ auto-numbering in litmus tests
> 
> Hi Paul,
> 
> As I mentioned earlier, we need to revert commits related to floatrow.
> Patch #1 does the revert.
> Patch #2 converts litmus tests in Memory Barriers section to use
> auto-numbering.
> Patch #3 updates style guide to reflect the removal of floatrow and
> a typo fix. 
> 
> I'm considering "subfig" package as an alternative to floatrow.
> It predates floatrow and has less capability.
> I'll see if it works in two-column layout, and update the style guide
> if it goes well.

Life is like that sometimes.  ;-)

Applied, thank you!  I did a couple of updates on 3/3 for "nor" and
for subject-verb agreement.

Do we want to "git rm" floatrowpf.sty?

							Thanx, Paul

>       Thanks, Akira 
> 
> Akira Yokosawa (3):
>   Revert commits after "Localize floatrow.sty as floatrowpf.sty"
>   advsync: Employ auto-numbering in litmus tests
>   styleguide: Remove references to 'floatrow' and adjust context
> 
>  advsync/memorybarriers.tex         |  502 ++++++------
>  appendix/styleguide/hello.c        |    9 -
>  appendix/styleguide/styleguide.tex |  205 +----
>  defer/rcuusage.tex                 |    6 +-
>  floatrowpf.sty                     | 1482 ------------------------------------
>  howto/howto.tex                    |    4 +-
>  perfbook.tex                       |    4 +-
>  7 files changed, 280 insertions(+), 1932 deletions(-)
>  delete mode 100644 appendix/styleguide/hello.c
>  delete mode 100644 floatrowpf.sty
> 
> -- 
> 2.7.4
> 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 0/3] Employ auto-numbering in litmus tests
  2017-08-05 15:09                 ` [PATCH 0/3] Employ auto-numbering in litmus tests Paul E. McKenney
@ 2017-08-05 15:35                   ` Akira Yokosawa
  2017-08-05 15:50                     ` Paul E. McKenney
  0 siblings, 1 reply; 40+ messages in thread
From: Akira Yokosawa @ 2017-08-05 15:35 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

On 2017/08/06 0:09, Paul E. McKenney wrote:
> On Sat, Aug 05, 2017 at 12:41:30PM +0900, Akira Yokosawa wrote:
>> >From ba0af5ad755ab4e175b07abb71890077e4d54a20 Mon Sep 17 00:00:00 2001
>> From: Akira Yokosawa <akiyks@gmail.com>
>> Date: Sat, 5 Aug 2017 12:29:10 +0900
>> Subject: [PATCH 0/3] Employ auto-numbering in litmus tests
>>
>> Hi Paul,
>>
>> As I mentioned earlier, we need to revert commits related to floatrow.
>> Patch #1 does the revert.
>> Patch #2 converts litmus tests in Memory Barriers section to use
>> auto-numbering.
>> Patch #3 updates style guide to reflect the removal of floatrow and
>> a typo fix. 
>>
>> I'm considering "subfig" package as an alternative to floatrow.
>> It predates floatrow and has less capability.
>> I'll see if it works in two-column layout, and update the style guide
>> if it goes well.
> 
> Life is like that sometimes.  ;-)
> 
> Applied, thank you!  I did a couple of updates on 3/3 for "nor" and
> for subject-verb agreement.

Thanks!
It is hard for me to choose "and" or "nor" in negative sentences...
So, "such as x, y, and z" is right in the negative sentence. Hmm.

Uh-oh, in the commit log, the line "Also fix a typo (and -> nor)." remains.

> 
> Do we want to "git rm" floatrowpf.sty?

I think it has been already removed by the reverting commit d03363ff3493,
hasn't it?

    Thanks, Akira


> 
> 							Thanx, Paul
> 
>>       Thanks, Akira 
>>
>> Akira Yokosawa (3):
>>   Revert commits after "Localize floatrow.sty as floatrowpf.sty"
>>   advsync: Employ auto-numbering in litmus tests
>>   styleguide: Remove references to 'floatrow' and adjust context
>>
>>  advsync/memorybarriers.tex         |  502 ++++++------
>>  appendix/styleguide/hello.c        |    9 -
>>  appendix/styleguide/styleguide.tex |  205 +----
>>  defer/rcuusage.tex                 |    6 +-
>>  floatrowpf.sty                     | 1482 ------------------------------------
>>  howto/howto.tex                    |    4 +-
>>  perfbook.tex                       |    4 +-
>>  7 files changed, 280 insertions(+), 1932 deletions(-)
>>  delete mode 100644 appendix/styleguide/hello.c
>>  delete mode 100644 floatrowpf.sty
>>
>> -- 
>> 2.7.4
>>
>>
> 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH 0/3] Employ auto-numbering in litmus tests
  2017-08-05 15:35                   ` Akira Yokosawa
@ 2017-08-05 15:50                     ` Paul E. McKenney
  0 siblings, 0 replies; 40+ messages in thread
From: Paul E. McKenney @ 2017-08-05 15:50 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Sun, Aug 06, 2017 at 12:35:36AM +0900, Akira Yokosawa wrote:
> On 2017/08/06 0:09, Paul E. McKenney wrote:
> > On Sat, Aug 05, 2017 at 12:41:30PM +0900, Akira Yokosawa wrote:
> >> >From ba0af5ad755ab4e175b07abb71890077e4d54a20 Mon Sep 17 00:00:00 2001
> >> From: Akira Yokosawa <akiyks@gmail.com>
> >> Date: Sat, 5 Aug 2017 12:29:10 +0900
> >> Subject: [PATCH 0/3] Employ auto-numbering in litmus tests
> >>
> >> Hi Paul,
> >>
> >> As I mentioned earlier, we need to revert commits related to floatrow.
> >> Patch #1 does the revert.
> >> Patch #2 converts litmus tests in Memory Barriers section to use
> >> auto-numbering.
> >> Patch #3 updates style guide to reflect the removal of floatrow and
> >> a typo fix. 
> >>
> >> I'm considering "subfig" package as an alternative to floatrow.
> >> It predates floatrow and has less capability.
> >> I'll see if it works in two-column layout, and update the style guide
> >> if it goes well.
> > 
> > Life is like that sometimes.  ;-)
> > 
> > Applied, thank you!  I did a couple of updates on 3/3 for "nor" and
> > for subject-verb agreement.
> 
> Thanks!
> It is hard for me to choose "and" or "nor" in negative sentences...
> So, "such as x, y, and z" is right in the negative sentence. Hmm.

Well, what is there is OK.  In more ambiguous cases, one approach is
to parenthesize the list, or to reverse the order: "these options,
which include x, y, and z, do not have capability c."

> Uh-oh, in the commit log, the line "Also fix a typo (and -> nor)." remains.

Good point, fixed.

> > Do we want to "git rm" floatrowpf.sty?
> 
> I think it has been already removed by the reverting commit d03363ff3493,
> hasn't it?

My confusion, ran "git diff" backwards, apologies!

							Thanx, Paul

>     Thanks, Akira
> 
> 
> > 
> > 							Thanx, Paul
> > 
> >>       Thanks, Akira 
> >>
> >> Akira Yokosawa (3):
> >>   Revert commits after "Localize floatrow.sty as floatrowpf.sty"
> >>   advsync: Employ auto-numbering in litmus tests
> >>   styleguide: Remove references to 'floatrow' and adjust context
> >>
> >>  advsync/memorybarriers.tex         |  502 ++++++------
> >>  appendix/styleguide/hello.c        |    9 -
> >>  appendix/styleguide/styleguide.tex |  205 +----
> >>  defer/rcuusage.tex                 |    6 +-
> >>  floatrowpf.sty                     | 1482 ------------------------------------
> >>  howto/howto.tex                    |    4 +-
> >>  perfbook.tex                       |    4 +-
> >>  7 files changed, 280 insertions(+), 1932 deletions(-)
> >>  delete mode 100644 appendix/styleguide/hello.c
> >>  delete mode 100644 floatrowpf.sty
> >>
> >> -- 
> >> 2.7.4
> >>
> >>
> > 
> > 
> 


^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2017-08-05 15:50 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28  9:53 [PATCH 00/10] Add style guide Akira Yokosawa
2017-07-28  9:55 ` [PATCH 01/10] appendix: " Akira Yokosawa
2017-07-28  9:57 ` [PATCH 02/10] Specify required revision of 'verbatimbox' Akira Yokosawa
2017-07-28  9:58 ` [PATCH 03/10] Localize floatrow.sty Akira Yokosawa
2017-07-31  3:26   ` Paul E. McKenney
2017-07-31  4:05     ` Akira Yokosawa
2017-07-31  5:01       ` Akira Yokosawa
2017-07-31 12:45         ` Paul E. McKenney
2017-07-28 10:00 ` [PATCH 04/10] Apply workaround to floatrow.sty and rename it floatrowpf.sty Akira Yokosawa
2017-07-28 10:01 ` [PATCH 05/10] Define 'listing' environment for style guide Akira Yokosawa
2017-07-28 10:02 ` [PATCH 06/10] styleguide: Add listing environment examples Akira Yokosawa
2017-07-28 10:03 ` [PATCH 07/10] Disable 'floatrow' layout in manually aligned code snippets Akira Yokosawa
2017-07-28 10:04 ` [PATCH 08/10] styleguide: Add example of grouping " Akira Yokosawa
2017-07-28 10:05 ` [PATCH 09/10] styleguide: Add example of preferred table layout using 'booktabs' Akira Yokosawa
2017-07-28 10:06 ` [PATCH 10/10] styleguide: Tweak layout of 'Limitation' table Akira Yokosawa
2017-07-31 14:43 ` [PATCH v2 0/8] Add style guide Akira Yokosawa
2017-07-31 14:44   ` [PATCH v2 1/8] Localize floatrow.sty as floatrowpf.sty Akira Yokosawa
2017-07-31 14:46   ` [PATCH v2 2/8] Apply workaround to floatrowpf.sty Akira Yokosawa
2017-07-31 14:47   ` [PATCH v2 3/8] Define 'listing' environment for style guide Akira Yokosawa
2017-07-31 14:49   ` [PATCH v2 4/8] styleguide: Add listing environment examples Akira Yokosawa
2017-07-31 14:50   ` [PATCH v2 5/8] Disable 'floatrow' layout in manually aligned code snippets Akira Yokosawa
2017-07-31 14:51   ` [PATCH v2 6/8] styleguide: Add example of grouping " Akira Yokosawa
2017-07-31 14:52   ` [PATCH v2 7/8] styleguide: Add example of preferred table layout using 'booktabs' Akira Yokosawa
2017-07-31 14:52   ` [PATCH v2 8/8] styleguide: Tweak layout of 'Limitation' table Akira Yokosawa
2017-07-31 15:24   ` [PATCH v2 0/8] Add style guide Akira Yokosawa
2017-07-31 15:55     ` Paul E. McKenney
2017-07-31 15:57   ` Paul E. McKenney
2017-08-01 20:40   ` Paul E. McKenney
2017-08-02 14:57     ` Akira Yokosawa
2017-08-02 16:29       ` Paul E. McKenney
2017-08-02 22:22         ` Akira Yokosawa
2017-08-02 22:48           ` Paul E. McKenney
2017-08-05  2:09             ` Akira Yokosawa
2017-08-05  3:41               ` [PATCH 0/3] Employ auto-numbering in litmus tests Akira Yokosawa
2017-08-05  3:43                 ` [PATCH 1/3] Revert commits after "Localize floatrow.sty as floatrowpf.sty" Akira Yokosawa
2017-08-05  3:44                 ` [PATCH 2/3] advsync: Employ auto-numbering in litmus tests Akira Yokosawa
2017-08-05  3:46                 ` [PATCH 3/3] styleguide: Remove references to 'floatrow' and adjust context Akira Yokosawa
2017-08-05 15:09                 ` [PATCH 0/3] Employ auto-numbering in litmus tests Paul E. McKenney
2017-08-05 15:35                   ` Akira Yokosawa
2017-08-05 15:50                     ` Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.