Add style guide
cover Add style guide
From cdfca8b81a7d4ee194272359d1775c0c343e0fbe Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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
Signature · 1 line
2.7.4
PATCH 1/10 appendix: Add style guide
From e0403ba8882761c59d52e8d65e5c65ab6e85ca29 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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.
--- 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
appendix/appendix.tex +1 -0
@@ -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{
appendix/styleguide/samplecodesnippet.tex new file +19 -0
@@ -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}
appendix/styleguide/styleguide.tex new file +682 -0
682 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 2/10 Specify required revision of 'verbatimbox'
In reply to Akira YokosawaFrom a77121a7bba9c9df9c6cc92acea88e31b3f5f594 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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.
--- perfbook.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
perfbook.tex +1 -1
@@ -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}
Signature · 1 line
2.7.4
PATCH 3/10 Localize floatrow.sty
In reply to Akira YokosawaFrom 53ff86011be07a62dba37a5bef56f04f25531dd1 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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/
--- floatrow.sty | 1472 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1472 insertions(+) create mode 100644 floatrow.sty
floatrow.sty new file +1472 -0
@@ -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{[email protected]}{}\endinput}}% + {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak + The latter will be skipped}{}% + \@namedef{[email protected]}{}\endinput} +\@namedef{[email protected]}{2001/11/08 v1.3d (excerpt) + Float enhancements (AL)} +\@namedef{[email protected]}{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'.
Signature · 1 line
2.7.4
Re: [PATCH 03/10] Localize floatrow.sty
Quoted 11 lines · Akira Yokosawa
Quoted 1 line
From
53ff86011be07a62dba37a5bef56f04f25531dd1Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Thu, 20 Jul 2017 23:34:58 +0900
Subject: [PATCH 03/10] Localize floatrow.styThe "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.
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
Quoted 1,488 lines
Signed-off-by Akira Yokosawa <[email protected]>--- floatrow.sty | 1472 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1472 insertions(+) create mode 100644 floatrow.styfloatrow.sty new file +1472
-0@@ -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{[email protected]}{}\endinput}}% + {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak + The latter will be skipped}{}% + \@namedef{[email protected]}{}\endinput} +\@namedef{[email protected]}{2001/11/08 v1.3d (excerpt) + Float enhancements (AL)} +\@namedef{[email protected]}{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'.Signature · 1 line
2.7.4
Re: [PATCH 03/10] Localize floatrow.sty
2017/07/31 12:26、Paul E. McKenney <[email protected]> のメッセージ:
Quoted 11 lines · Akira Yokosawa
Quoted 10 lines
Quoted 1 line
From
53ff86011be07a62dba37a5bef56f04f25531dd1Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Thu, 20 Jul 2017 23:34:58 +0900
Subject: [PATCH 03/10] Localize floatrow.styThe "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.
Quoted 4 lines
Quoted 1 line
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?
Quoted 2 lines
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.
Quoted 2 lines
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)
Quoted 1,494 lines
(I applied the first two, thank you!)
Thanx, Paul
Quoted 1,488 lines
Signed-off-by Akira Yokosawa <[email protected]>---
floatrow.sty | 1472 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++1 file changed, 1472 insertions(+)create mode 100644 floatrow.sty
floatrow.sty new file +1472
-0@@ -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{[email protected]}{}\endinput}}% + {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak + The latter will be skipped}{}% + \@namedef{[email protected]}{}\endinput} +\@namedef{[email protected]}{2001/11/08 v1.3d (excerpt) + Float enhancements (AL)} +\@namedef{[email protected]}{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'.Signature · 1 line
2.7.4
Re: [PATCH 03/10] Localize floatrow.sty
2017/07/31 13:05、Akira Yokosawa <[email protected]> のメッセージ:
Quoted 17 lines
2017/07/31 12:26、Paul E. McKenney <[email protected]> のメッセージ:
Quoted 11 lines · Akira Yokosawa
Quoted 10 lines
Quoted 1 line
From
53ff86011be07a62dba37a5bef56f04f25531dd1Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Thu, 20 Jul 2017 23:34:58 +0900
Subject: [PATCH 03/10] Localize floatrow.styThe "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.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
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)
Quoted 20 lines
Or, do we need to keep the trailing blanks at this point?
Quoted 2 lines
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.
Quoted 2 lines
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)Quoted 4 lines
(I applied the first two, thank you!)
Thanx, Paul
[...]
Re: [PATCH 03/10] Localize floatrow.sty
Quoted 28 lines · Akira Yokosawa
2017/07/31 13:05、Akira Yokosawa <[email protected]> のメッセージ:
Quoted 17 lines
2017/07/31 12:26、Paul E. McKenney <[email protected]> のメッセージ:
Quoted 11 lines · Akira Yokosawa
Quoted 10 lines
Quoted 1 line
From
53ff86011be07a62dba37a5bef56f04f25531dd1Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Thu, 20 Jul 2017 23:34:58 +0900
Subject: [PATCH 03/10] Localize floatrow.styThe "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.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
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.
Quoted 5 lines
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
Quoted 29 lines
Thanks, Akira
(from mobile, might be QP encoded)Quoted 9 lines
Or, do we need to keep the trailing blanks at this point?
Quoted 2 lines
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.
Quoted 11 lines
Quoted 2 lines
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)Quoted 4 lines
(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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 4/10 Apply workaround to floatrow.sty and rename it floatrowpf.sty
In reply to Akira YokosawaFrom 5e41dffa203a6c85d5af80a468e3dac33946567d Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Thu, 20 Jul 2017 23:35:31 +0900
Subject: [PATCH 04/10] Apply workaround to floatrow.sty and rename it floatrowpf.sty
--- floatrow.sty | 1472 ------------------------------------------------------- floatrowpf.sty | 1480 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1480 insertions(+), 1472 deletions(-) delete mode 100644 floatrow.sty create mode 100644 floatrowpf.sty
floatrow.sty deleted +0 -1472
@@ -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{[email protected]}{}\endinput}}% - {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak - The latter will be skipped}{}% - \@namedef{[email protected]}{}\endinput} -\@namedef{[email protected]}{2001/11/08 v1.3d (excerpt) - Float enhancements (AL)} -\@namedef{[email protected]}{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'.
floatrowpf.sty new file +1480 -0
1,480 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 5/10 Define 'listing' environment for style guide
In reply to Akira YokosawaFrom c73dfa97f5d383073fece910d9d0ede8bdab6e18 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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).
--- perfbook.tex | 3 +++ 1 file changed, 3 insertions(+)
perfbook.tex +3 -0
@@ -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{
Signature · 1 line
2.7.4
PATCH 6/10 styleguide: Add listing environment examples
In reply to Akira YokosawaFrom ccc648b55d760931fa49d1dc8a24a9312b0cb5c2 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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.
--- appendix/styleguide/hello.c | 9 +++++++ appendix/styleguide/styleguide.tex | 48 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 appendix/styleguide/hello.c
appendix/styleguide/hello.c new file +9 -0
@@ -0,0 +1,9 @@ +/* +* Sample Code Snippet +*/ +#include <stdio.h> +int main (void ) +{ +printf ("Hello world!\n" ); +return 0 ; +}
appendix/styleguide/styleguide.tex +46 -2
62 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 7/10 Disable 'floatrow' layout in manually aligned code snippets
In reply to Akira YokosawaFrom 5867a50f61759b67220b3dfdec72d7b9691f6b09 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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.
--- defer/rcuusage.tex | 6 +++--- howto/howto.tex | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
defer/rcuusage.tex +3 -3
@@ -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)
howto/howto.tex +2 -2
@@ -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}
Signature · 1 line
2.7.4
PATCH 8/10 styleguide: Add example of grouping code snippets
In reply to Akira YokosawaFrom 6ded852056ccbac9537fff8230bec667062c9d49 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Fri, 21 Jul 2017 22:15:05 +0900
Subject: [PATCH 08/10] styleguide: Add example of grouping code snippets
--- appendix/styleguide/styleguide.tex | 79 +++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-)
appendix/styleguide/styleguide.tex +78 -1
@@ -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}
Signature · 1 line
2.7.4
PATCH 9/10 styleguide: Add example of preferred table layout using 'booktabs'
In reply to Akira YokosawaFrom 34bcfe5d4ead90d2bec9373e5f5352c5530183c2 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Fri, 21 Jul 2017 22:31:43 +0900
Subject: [PATCH 09/10] styleguide: Add example of preferred table layout using 'booktabs'
--- appendix/styleguide/styleguide.tex | 35 ++++++++++++++++++++++++++++++++++- perfbook.tex | 1 + 2 files changed, 35 insertions(+), 1 deletion(-)
appendix/styleguide/styleguide.tex +34 -1
@@ -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}
perfbook.tex +1 -0
@@ -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
Signature · 1 line
2.7.4
PATCH 10/10 styleguide: Tweak layout of 'Limitation' table
In reply to Akira YokosawaFrom cdfca8b81a7d4ee194272359d1775c0c343e0fbe Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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".
--- appendix/styleguide/styleguide.tex | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
appendix/styleguide/styleguide.tex +10 -5
@@ -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,
Signature · 1 line
2.7.4
v2 cover Add style guide
In reply to Akira YokosawaFrom e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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
Signature · 1 line
2.7.4
PATCH v2 1/8 Localize floatrow.sty as floatrowpf.sty
From d4ae1407d79c7f4ea498735e26c0df4160876272 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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/
--- floatrowpf.sty | 1472 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1472 insertions(+) create mode 100644 floatrowpf.sty
floatrowpf.sty new file +1472 -0
@@ -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{[email protected]}{}\endinput}}% + {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak + The latter will be skipped}{}% + \@namedef{[email protected]}{}\endinput} +\@namedef{[email protected]}{2001/11/08 v1.3d (excerpt) + Float enhancements (AL)} +\@namedef{[email protected]}{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'.
Signature · 1 line
2.7.4
PATCH v2 2/8 Apply workaround to floatrowpf.sty
In reply to Akira YokosawaFrom 709e5350e4b9ca4435142c67fa3e05fe0748365c Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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.
--- floatrowpf.sty | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-)
floatrowpf.sty +24 -14
@@ -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{[email protected]}{}\endinput}}% - {\PackageError{floatrow}{Do not use float package with floatrow.\MessageBreak + \@namedef{[email protected]}{}\endinput}}% + {\PackageError{floatrowpf}{Do not use float package with floatrowpf.\MessageBreak The latter will be skipped}{}% - \@namedef{[email protected]}{}\endinput} + \@namedef{[email protected]}{}\endinput} \@namedef{[email protected]}{2001/11/08 v1.3d (excerpt) Float enhancements (AL)} \@namedef{[email protected]}{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'.
Signature · 1 line
2.7.4
PATCH v2 3/8 Define 'listing' environment for style guide
In reply to Akira YokosawaFrom 461d28b39c4d2ea05cda3fe4a256ee27677576fe Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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).
--- perfbook.tex | 3 +++ 1 file changed, 3 insertions(+)
perfbook.tex +3 -0
@@ -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{
PATCH v2 4/8 styleguide: Add listing environment examples
In reply to Akira YokosawaFrom 33da9b7a0ee4c525b7cd7079722d5a40d5079f37 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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.
--- appendix/styleguide/hello.c | 9 +++++++ appendix/styleguide/styleguide.tex | 48 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 appendix/styleguide/hello.c
appendix/styleguide/hello.c new file +9 -0
@@ -0,0 +1,9 @@ +/* +* Sample Code Snippet +*/ +#include <stdio.h> +int main (void ) +{ +printf ("Hello world!\n" ); +return 0 ; +}
appendix/styleguide/styleguide.tex +46 -2
62 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 5/8 Disable 'floatrow' layout in manually aligned code snippets
In reply to Akira YokosawaFrom b6806967d9ffbac1c992769e62e67c86134e2630 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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.
--- defer/rcuusage.tex | 6 +++--- howto/howto.tex | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
defer/rcuusage.tex +3 -3
@@ -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)
howto/howto.tex +2 -2
@@ -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}
Signature · 1 line
2.7.4
PATCH v2 6/8 styleguide: Add example of grouping code snippets
In reply to Akira YokosawaFrom 8a66ba5902d512e0e5e9a2bea27b4542ff74b57d Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Fri, 21 Jul 2017 22:15:05 +0900
Subject: [PATCH v2 6/8] styleguide: Add example of grouping code snippets
--- appendix/styleguide/styleguide.tex | 79 +++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-)
appendix/styleguide/styleguide.tex +78 -1
@@ -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}
Signature · 1 line
2.7.4
PATCH v2 7/8 styleguide: Add example of preferred table layout using 'booktabs'
In reply to Akira YokosawaFrom 5845c0f3d977aa65f167bba16ceace693e47764a Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Fri, 21 Jul 2017 22:31:43 +0900
Subject: [PATCH v2 7/8] styleguide: Add example of preferred table layout using 'booktabs'
--- appendix/styleguide/styleguide.tex | 35 ++++++++++++++++++++++++++++++++++- perfbook.tex | 1 + 2 files changed, 35 insertions(+), 1 deletion(-)
appendix/styleguide/styleguide.tex +34 -1
@@ -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}
perfbook.tex +1 -0
@@ -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
Signature · 1 line
2.7.4
PATCH v2 8/8 styleguide: Tweak layout of 'Limitation' table
In reply to Akira YokosawaFrom e35b5bc0c56f255caee91054f05a5dd7b824b5fa Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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".
--- appendix/styleguide/styleguide.tex | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
appendix/styleguide/styleguide.tex +10 -5
@@ -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,
Signature · 1 line
2.7.4
Quoted 11 lines · Akira Yokosawa
Quoted 1 line
From
e35b5bc0c56f255caee91054f05a5dd7b824b5faMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Mon, 31 Jul 2017 23:20:57 +0900
Subject: [PATCH v2 0/8] Add style guideHi 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.
Quoted 5 lines
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".
Quoted 23 lines
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' tableappendix/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
Quoted 12 lines · Akira Yokosawa
Quoted 11 lines · Akira Yokosawa
Quoted 1 line
From
e35b5bc0c56f255caee91054f05a5dd7b824b5faMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Mon, 31 Jul 2017 23:20:57 +0900
Subject: [PATCH v2 0/8] Add style guideHi 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.
Quoted 8 lines
Quoted 5 lines
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
Quoted 23 lines
Quoted 22 lines
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' tableappendix/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
Quoted 11 lines · Akira Yokosawa
Quoted 1 line
From
e35b5bc0c56f255caee91054f05a5dd7b824b5faMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Mon, 31 Jul 2017 23:20:57 +0900
Subject: [PATCH v2 0/8] Add style guideHi 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.
Quoted 5 lines
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
Quoted 26 lines
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' tableappendix/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.stySignature · 1 line
2.7.4
Quoted 10 lines · Akira Yokosawa
Quoted 1 line
From
e35b5bc0c56f255caee91054f05a5dd7b824b5faMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Mon, 31 Jul 2017 23:20:57 +0900
Subject: [PATCH v2 0/8] Add style guideHi 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!!!
Quoted 5 lines
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
Quoted 26 lines
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' tableappendix/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.stySignature · 1 line
2.7.4
Quoted 12 lines · Paul E. McKenney
Quoted 10 lines · Akira Yokosawa
Quoted 1 line
From
e35b5bc0c56f255caee91054f05a5dd7b824b5faMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Mon, 31 Jul 2017 23:20:57 +0900
Subject: [PATCH v2 0/8] Add style guideHi 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.
Quoted 5 lines
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!
Quoted 13 lines
Quoted 6 lines
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:
Quoted 7 lines
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??? ;-)
Quoted 9 lines
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
Quoted 3 lines
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.
Quoted 8 lines
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.
Quoted 4 lines
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.
Quoted 9 lines
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.
Quoted 35 lines
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
Quoted 7 lines
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.
Quoted 12 lines
% 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:
Quoted 7 lines
% \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
Quoted 31 lines
Thanx, Paul
Quoted 26 lines
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' tableappendix/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.stySignature · 1 line
2.7.4
Quoted 39 lines · Akira Yokosawa
Quoted 12 lines · Paul E. McKenney
Quoted 10 lines · Akira Yokosawa
Quoted 1 line
From
e35b5bc0c56f255caee91054f05a5dd7b824b5faMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Mon, 31 Jul 2017 23:20:57 +0900
Subject: [PATCH v2 0/8] Add style guideHi 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.Quoted 5 lines
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!
Quoted 18 lines
Quoted 5 lines
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.
Quoted 3 lines
Quoted 1 line
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. ;-)
Quoted 9 lines
Quoted 8 lines
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.
Quoted 6 lines
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.
Quoted 7 lines
Now, I have toyed with
Quoted 3 lines
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?
Quoted 11 lines
Quoted 7 lines
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!
Quoted 9 lines
Quoted 3 lines
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.)
Quoted 11 lines
Quoted 8 lines
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.
Quoted 37 lines
Quoted 37 lines
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-5IBM's preferences have changed over time, so I end up importing whatever was the style at the time of publication. :-/
Quoted 8 lines
Quoted 4 lines
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. ;-)
Quoted 19 lines
Quoted 11 lines
% 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:Quoted 7 lines
% \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.
Quoted 8 lines
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
Quoted 39 lines
Thanks, Akira
Quoted 31 lines
Thanx, Paul
Quoted 26 lines
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' tableappendix/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.stySignature · 1 line
2.7.4--
To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 102 lines · Paul E. McKenney
Quoted 39 lines · Akira Yokosawa
Quoted 12 lines · Paul E. McKenney
Quoted 10 lines · Akira Yokosawa
Quoted 1 line
From
e35b5bc0c56f255caee91054f05a5dd7b824b5faMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Mon, 31 Jul 2017 23:20:57 +0900
Subject: [PATCH v2 0/8] Add style guideHi 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.Quoted 5 lines
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!
Quoted 18 lines
Quoted 5 lines
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.Quoted 3 lines
Quoted 1 line
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. ;-)
Quoted 9 lines
Quoted 8 lines
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.Quoted 6 lines
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.shandutilities/latex2c.sh.) Though I do admit that auto-numbering would make trivial edits easier.The win is the prettier format.
Quoted 7 lines
Now, I have toyed with
Quoted 3 lines
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?
Quoted 11 lines
Quoted 7 lines
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!
Quoted 8 lines
Quoted 3 lines
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".
Quoted 6 lines
Quoted 1 line
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
Quoted 138 lines
Quoted 6 lines
Quoted 6 lines
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. ;-)Quoted 6 lines
Quoted 3 lines
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.
Quoted 37 lines
Quoted 37 lines
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-5IBM's preferences have changed over time, so I end up importing whatever was the style at the time of publication. :-/
Quoted 8 lines
Quoted 4 lines
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. ;-)
Quoted 19 lines
Quoted 11 lines
% 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:Quoted 7 lines
% \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.
Quoted 8 lines
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
Quoted 39 lines
Thanks, Akira
Quoted 31 lines
Thanx, Paul
Quoted 26 lines
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' tableappendix/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.stySignature · 1 line
2.7.4--
To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 115 lines · Akira Yokosawa
Quoted 102 lines · Paul E. McKenney
Quoted 39 lines · Akira Yokosawa
Quoted 12 lines · Paul E. McKenney
Quoted 10 lines · Akira Yokosawa
Quoted 1 line
From
e35b5bc0c56f255caee91054f05a5dd7b824b5faMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Mon, 31 Jul 2017 23:20:57 +0900
Subject: [PATCH v2 0/8] Add style guideHi 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.Quoted 5 lines
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!
Quoted 18 lines
Quoted 5 lines
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.Quoted 3 lines
Quoted 1 line
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. ;-)
Quoted 9 lines
Quoted 8 lines
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.Quoted 6 lines
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.shandutilities/latex2c.sh.) Though I do admit that auto-numbering would make trivial edits easier.The win is the prettier format.
Quoted 7 lines
Now, I have toyed with
Quoted 3 lines
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?
Quoted 11 lines
Quoted 7 lines
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!
Quoted 8 lines
Quoted 3 lines
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".
Quoted 6 lines
Quoted 1 line
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.
Quoted 5 lines
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
Quoted 146 lines
Thanks, Akira
Quoted 90 lines
Quoted 6 lines
Quoted 6 lines
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. ;-)Quoted 6 lines
Quoted 3 lines
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.
Quoted 37 lines
Quoted 37 lines
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-5IBM's preferences have changed over time, so I end up importing whatever was the style at the time of publication. :-/
Quoted 8 lines
Quoted 4 lines
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. ;-)
Quoted 26 lines
Quoted 11 lines
% 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:Quoted 7 lines
% \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.Quoted 48 lines
Quoted 1 line
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
Quoted 39 lines
Thanks, Akira
Quoted 31 lines
Thanx, Paul
Quoted 26 lines
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' tableappendix/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.stySignature · 1 line
2.7.4--
To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 120 lines · Paul E. McKenney
Quoted 119 lines · Akira Yokosawa
Quoted 102 lines · Paul E. McKenney
Quoted 39 lines · Akira Yokosawa
Quoted 12 lines · Paul E. McKenney
Quoted 10 lines · Akira Yokosawa
Quoted 1 line
From
e35b5bc0c56f255caee91054f05a5dd7b824b5faMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Mon, 31 Jul 2017 23:20:57 +0900
Subject: [PATCH v2 0/8] Add style guideHi 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.Quoted 5 lines
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!
Quoted 18 lines
Quoted 5 lines
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.Quoted 3 lines
Quoted 1 line
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. ;-)
Quoted 9 lines
Quoted 8 lines
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.Quoted 6 lines
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.shandutilities/latex2c.sh.) Though I do admit that auto-numbering would make trivial edits easier.The win is the prettier format.
Quoted 7 lines
Now, I have toyed with
Quoted 3 lines
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?
Quoted 11 lines
Quoted 7 lines
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!
Quoted 8 lines
Quoted 3 lines
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".
Quoted 6 lines
Quoted 1 line
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.
Quoted 8 lines
Quoted 1 line
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
Quoted 151 lines
Thanx, Paul
Quoted 146 lines
Thanks, Akira
Quoted 90 lines
Quoted 6 lines
Quoted 6 lines
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. ;-)Quoted 6 lines
Quoted 3 lines
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.
Quoted 37 lines
Quoted 37 lines
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-5IBM's preferences have changed over time, so I end up importing whatever was the style at the time of publication. :-/
Quoted 8 lines
Quoted 4 lines
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. ;-)
Quoted 26 lines
Quoted 11 lines
% 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:Quoted 7 lines
% \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.Quoted 48 lines
Quoted 1 line
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
Quoted 39 lines
Thanks, Akira
Quoted 31 lines
Thanx, Paul
Quoted 26 lines
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' tableappendix/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.stySignature · 1 line
2.7.4--
To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
cover Employ auto-numbering in litmus tests
From ba0af5ad755ab4e175b07abb71890077e4d54a20 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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
Signature · 1 line
2.7.4
PATCH 1/3 Revert commits after "Localize floatrow.sty as floatrowpf.sty"
From 0303dcbf121ba63c855d59ef98864f4bcc3fe108 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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")
--- 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
appendix/styleguide/hello.c deleted +0 -9
@@ -1,9 +0,0 @@ -/* -* Sample Code Snippet -*/ -#include <stdio.h> -int main (void ) -{ -printf ("Hello world!\n" ); -return 0 ; -}
appendix/styleguide/styleguide.tex +9 -168
213 lines not on this page · raw message
defer/rcuusage.tex +3 -3
@@ -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)
floatrowpf.sty deleted +0 -1482
1,482 lines not on this page · raw message
howto/howto.tex +2 -2
@@ -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}
perfbook.tex +0 -4
@@ -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{
Signature · 1 line
2.7.4
PATCH 2/3 advsync: Employ auto-numbering in litmus tests
In reply to Akira YokosawaFrom afc9bca87eff357ed51a49e8933a1006071d8b39 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Thu, 3 Aug 2017 21:37:34 +0900
Subject: [PATCH 2/3] advsync: Employ auto-numbering in litmus tests
--- advsync/memorybarriers.tex | 502 ++++++++++++++++++++++----------------------- perfbook.tex | 2 + 2 files changed, 253 insertions(+), 251 deletions(-)
advsync/memorybarriers.tex +251 -251
@@ -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
perfbook.tex +2 -0
@@ -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{
Signature · 1 line
2.7.4
PATCH 3/3 styleguide: Remove references to 'floatrow' and adjust context
In reply to Akira YokosawaFrom ba0af5ad755ab4e175b07abb71890077e4d54a20 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
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).
--- appendix/styleguide/styleguide.tex | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
appendix/styleguide/styleguide.tex +14 -14
@@ -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
Signature · 1 line
2.7.4
Paul E. McKenney
AppliedRe: [PATCH 0/3] Employ auto-numbering in litmus tests
In reply to Akira YokosawaQuoted 14 lines · Akira Yokosawa
Quoted 1 line
From
ba0af5ad755ab4e175b07abb71890077e4d54a20Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Sat, 5 Aug 2017 12:29:10 +0900
Subject: [PATCH 0/3] Employ auto-numbering in litmus testsHi 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.
Quoted 4 lines
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
Quoted 22 lines
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 contextadvsync/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.stySignature · 1 line
2.7.4
Re: [PATCH 0/3] Employ auto-numbering in litmus tests
Quoted 20 lines · Paul E. McKenney
Quoted 14 lines · Akira Yokosawa
Quoted 1 line
From
ba0af5ad755ab4e175b07abb71890077e4d54a20Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Sat, 5 Aug 2017 12:29:10 +0900
Subject: [PATCH 0/3] Employ auto-numbering in litmus testsHi 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.Quoted 4 lines
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.
Quoted 4 lines
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.
Quoted 2 lines
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
Quoted 27 lines
Thanx, Paul
Quoted 22 lines
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 contextadvsync/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.stySignature · 1 line
2.7.4
Re: [PATCH 0/3] Employ auto-numbering in litmus tests
Quoted 21 lines · Akira Yokosawa
Quoted 20 lines · Paul E. McKenney
Quoted 18 lines · Akira Yokosawa
Quoted 1 line
From
ba0af5ad755ab4e175b07abb71890077e4d54a20Mon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Sat, 5 Aug 2017 12:29:10 +0900
Subject: [PATCH 0/3] Employ auto-numbering in litmus testsHi 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.
Quoted 8 lines
Quoted 4 lines
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."
Quoted 1 line
Uh-oh, in the commit log, the line "Also fix a typo (and -> nor)." remains.
Good point, fixed.
Quoted 4 lines
Quoted 1 line
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
Quoted 31 lines
Thanks, Akira
Quoted 27 lines
Thanx, Paul
Quoted 22 lines
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 contextadvsync/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.stySignature · 1 line
2.7.4