diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-08 15:58:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-08 15:58:47 +0000 |
commit | ba8058f661bc514c2d960695ddb21d5501abbf97 (patch) | |
tree | 3ed20232ad39107bf24cde0e6795db6da5ee7e38 /Master/texmf-dist/source/latex/floatrow | |
parent | 3ed1ea28cc76e0634ad44d87ef6d963bf25f376e (diff) |
float 0.2a (7sep07)
git-svn-id: svn://tug.org/texlive/trunk@4910 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/floatrow')
-rw-r--r-- | Master/texmf-dist/source/latex/floatrow/floatrow.dtx | 6559 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/floatrow/floatrow.ins | 6 |
2 files changed, 4349 insertions, 2216 deletions
diff --git a/Master/texmf-dist/source/latex/floatrow/floatrow.dtx b/Master/texmf-dist/source/latex/floatrow/floatrow.dtx index 3b1c2bed19c..7f4c2684946 100644 --- a/Master/texmf-dist/source/latex/floatrow/floatrow.dtx +++ b/Master/texmf-dist/source/latex/floatrow/floatrow.dtx @@ -1,6 +1,6 @@ % \iffalse % floatrow.dtx - The float row package (extension of float package) -% (c) 2004-2006 Olga Lapko (Lapko.O@g23.relcom.ru) +% (c) 2004-2007 Olga Lapko (Lapko.O@g23.relcom.ru) % % This package borrowed code (core parts) from: % float package 2001/11/08 v1.3d, @@ -9,7 +9,7 @@ % Copyright (c) 1995-2002 Axel Sommerfeldt % % During creation of floatsetup stuff there was borrowed code structure -% from caption package v3.x ((c) 1994-2006 Axel Sommerfeldt) +% from caption package v3.x ((c) 1994-2007 Axel Sommerfeldt) % % This program is provided under the terms of the % LaTeX Project Public License distributed from CTAN @@ -18,89 +18,130 @@ %<*dtx> \ProvidesFile{floatrow.dtx} %</dtx> -%<floatrow,frfancy,floatpagestyle,listpen>\NeedsTeXFormat{LaTeX2e}[1995/06/01] +%<floatrow,frfancy,floatpagestyle,listpen,frforsubfig,forlongtable>\NeedsTeXFormat{LaTeX2e}[1995/06/01] %<floatrow>\ProvidesPackage{floatrow} %<frfancy>\ProvidesPackage{fr-fancy} %<floatpagestyle>\ProvidesPackage{floatpagestyle} %<listpen>\ProvidesPackage{listpen} +%<frforsubfig>\ProvidesPackage{fr-subfig} +%<forlongtable>\ProvidesPackage{fr-longtable} % % \ProvidesFile{floatrow.dtx} -%<floatrow> [2006/07/24 v0.1j floatrow: float package extension] -%<frfancy> [2005/07/15 v0.1g floatrow: fancy boxes] +%<floatrow> [2007/08/24 v0.2a floatrow: float package extension] +%<frfancy> [2005/05/24 v0.1h floatrow: fancy boxes] %<floatpagestyle> [2005/10/02 v0.1h floating page style] -%<listpen> [2005/02/07 v0.1a list penalty managing] +%<listpen> [2007/05/24 v0.1b list penalty managing] +%<frforsubfig> [2007/08/24 v0.1f (beta) floatrow: additions for subfig] +%<forlongtable> [2007/05/24 v0.1a (beta) floatrow: additions for longtable] % %<*driver> \input pictures -\listfiles \documentclass[twoside]{ltxdoc} +\makeatletter%^^A ----------------------- + \usepackage{calc} \usepackage{tabularx,array} +\ifx\pdfoutput\undefined \else + \ifcase\pdfoutput \else + \usepackage{mathptm}\def\ttdefault{pxtt} + \usepackage[scaled=0.90]{helvet} + \fi +\fi +\settowidth\marginparwidth{\texttt{0DeclareFloatFootnoterule}} + \IfFileExists{titlesec.sty}{\usepackage[raggedright]{titlesec}}{} \IfFileExists{footmisc.sty}{\usepackage[perpage]{footmisc}}{} -\usepackage{floatpagestyle,flafplins} +\IfFileExists{fancyhdr.sty}{\usepackage{fancyhdr} +\pagestyle{fancy} +\fancyhead{}\fancyfoot{} +\fancyhead[LE]{\setlength{\dimen@}{\marginparwidth+\marginparsep}%^^A + \leavevmode\hbox to\dimen@{\normalsize\bfseries\thepage\hfil} + \ignorespaces{\nouppercase\leftmark}\hfil\strut} +\fancyhead[LO]{\setlength{\dimen@}{\marginparwidth+\marginparsep}%^^A + \leavevmode\hbox to\dimen@{} + \ignorespaces{\nouppercase\rightmark}\hfill\hbox to2em{\hfil\normalsize\bfseries\thepage}\strut} +\fancyheadoffset[L]{\marginparwidth+\marginparsep} +}{} \usepackage[font=small,labelfont=bf,labelsep=period, justification=centerlast] - {caption}[2004/11/28] + {caption}[2007/04/11] + \usepackage[format=default,justification=centerlast, - labelfont=up] + labelfont=up,captionskip=5pt] {subfig}[2005/06/28] \IfFileExists{rotating.sty}{\usepackage[figuresright]{rotating}}{} +\usepackage{longtable} \usepackage{wrapfig} +%\usepackage{psfrag} \usepackage[vflt]{floatflt} \usepackage{picins} %^^A\RequirePackage[writefile]{listings}[2004/09/07] -\usepackage[style=plain,font=small,footskip=.5\skip\footins, - footnoterule=fullsize,margins=centering,objectset=centering, - floatrowsep=qquad,captionskip=5pt,capbesidesep=quad, - facing=yes,capbesideposition=inside]{floatrow} +\usepackage[font=small,captionskip=5pt,objectset=centering,margins=centering, + footskip=.5\skip\footins,footnoterule=fullsize, + floatrowsep=qquad,capbesidesep=quad, + facing=yes,capbesideposition=inside,floatHaslist=yes,doublefloataswide=yes]{floatrow} + +\usepackage{floatpagestyle,listpen} +\allowprelistbreaks[-4] \usepackage{fr-fancy} -\IfFileExists{hyperref.sty}{\usepackage{hyperref} +\IfFileExists{hyperref.sty}{\usepackage[ + linktocpage, + hyperindex,% + plainpages=false,% + bookmarksopenlevel=1,% + bookmarksnumbered=false,% + pdfview=FitH, + pdfstartview=FitH, + ]{hyperref} \IfFileExists{hypcap.sty}{\usepackage{hypcap}}{} }{} + \ifx\pdftexversion\undefined + \IfFileExists{pstricks.sty}{\usepackage{pstricks,pst-eps}}{} +\else\ifcase\pdfoutput \IfFileExists{pstricks.sty}{\usepackage{pstricks}}{} +\or +%^^A \IfFileExists{pdftricks.sty}{ +%^^A \usepackage{pdftricks} +%^^A }{} +\fi\fi +\ifx\pdfdisplay\undefined\else + \begin{psinputs} + \usepackage{pstricks} + \end{psinputs} \fi + \IfFileExists{makecell.sty}{\usepackage{makecell}}{} -\makeatletter + \@ifundefined{thead}% {\newcommand\thead[1]{\footnotesize\raisebox {0pt}[\height+\jot][\depth+\jot]{\begin{tabular}{@{}c@{}} #1\end{tabular}}} %^^A For this documentation only \def\multirowthead#1[#2]#3{\raisebox{-1.5ex}{\thead{#3}}}}{} -\makeatother \IfFileExists{multirow.sty}{\usepackage{multirow}}{} \IfFileExists{lscape.sty}{\usepackage{lscape}}{} +\IfFileExists{color.sty}{\usepackage{color}\definecolor{gray}{gray}{.5}}{\let\color\@gobble} \floatsetup[table]{style=Plaintop,footnoterule=none} +%^^A ----------------------- \floatstyle{ruled} \newfloat{Program}{tbp}{lop}[section] -\DeclareFloatStyle{MyBoxed}{style=Boxed, - captionskip=5pt,frameset={\fboxrule1pt\fboxsep12pt}} -\DeclareFloatVCode{lowthickrule}{\kern2pt\hrule height.8ptdepth0pt} - \DeclareNewFloatType{Example}% {placement=tb,within=section,fileext=lox} -%^^A for Appendix----------- -\DeclareFloatSeparators{none}{} -\DeclareFloatSeparators{cicero}{\hskip1cc} -\DeclareFloatSeparators{enskip}{\hskip.5em} -\DeclareFloatSeparators{mcapwidth}{\hskip-\FCwidth} - \newfloatcommand{fcapsideleft}{figure}[{\capbeside \captionsetup[capbesidefigure]{format=break,labelsep=none, justification=raggedleft}% @@ -109,27 +150,59 @@ \captionsetup[capbesidefigure]{format=break,labelsep=none, justification=raggedright}% \thisfloatsetup{capbesideposition=right}}][\FBwidth] + +\DeclareFloatStyle{MyBoxed}{style=Boxed, + captionskip=5pt,frameset={\fboxrule1pt\fboxsep12pt}} + +\DeclareFloatVCode{lowthickrule}{\par\vskip2pt\rule{\hsize}{.8pt}\par} +\DeclareFloatVCode{grayruleabove}{{\color{gray}\par\rule\hsize{2.8pt}\vskip4pt\par}} +\DeclareFloatVCode{grayrulebelow}{{\color{gray}\par\vskip4pt\rule\hsize{2.8pt}}} + +\DeclareObjectSet{colorred}{\parskip2pt\parindent15pt\color{red}} + +\DeclareMarginSet{hangleft}% + {\setfloatmargins + {\hskip-\marginparwidth\hskip-\marginparsep}{\hfil}} +\DeclareMarginSet{hangtoheads}% + {\setfloatmargins + {\hfil}{\hskip-.7\headheight\hskip-\headsep}} + +\DeclareFloatSeparators{colorsep}% + {\begingroup\color{blue}% + \floatfacing{\hskip6pt\vrule width4.8pt\hskip6pt}% + {\hskip6pt\vrule width4.8pt\hskip6pt}% + \endgroup} +\DeclareFloatSeparators{none}{} +\DeclareFloatSeparators{cicero}{\hskip1cc} +\DeclareFloatSeparators{enskip}{\hskip.5em} +\DeclareFloatSeparators{mcapwidth}{\hskip-\FCwidth} + %^^A ----------------------- +%^^A\DeclareCaptionFormat{labelonly}{#1} +\DeclareCaptionLabelFormat{numonly}{#2)} +\DeclareCaptionLabelFormat{list}{\bothIfFirst{#1}{ }#2)} +\DeclareCaptionListOfFormat{comma-separated}{#1,\,#2} + +\DeclareCaptionFont{green}{\color{green}} +\DeclareCaptionFont{magenta}{\color{magenta}} \def\rightlast{\leftskip0ptplus1fil \rightskip0ptplus-1fil\parfillskip0ptplus1fil} \def\leftlast{\leftskip0pt\rightskip0pt\parfillskip0ptplus1fil} + %^^A for all versions of caption 3.x? -\DeclareCaptionFormat{flushrightlabel}{\leavevmode\rightline{#1}#2\par#3\par} -\DeclareCaptionJustification{togglelast} - {\floatfacing*\rightlast\leftlast} -\DeclareCaptionStyle{capbesidefigure}{justification=togglelast} -\captionsetup[table] - {format=flushrightlabel,textfont=bf,labelsep=none, - labelfont=sl,captionskip=5pt} +\DeclareCaptionLabelFormat{rightline}{\rightline{\bothIfFirst{#1}{ }#2}} +\DeclareCaptionJustification{togglelast}{\floatfacing*\rightlast\leftlast} + +\captionsetup[table]{labelformat=rightline,textfont=bf,labelfont={md,sl},labelsep=newline} \captionsetup[capbesidefigure]{justification=togglelast} \captionsetup[floatfoot]{format=default} -%^^A for Appendix----------- \DeclareCaptionFormat{break}{#1#2\par#3\par} + %^^A ----------------------- -\makeatletter +\advance\oddsidemargin.25\marginparwidth \evensidemargin\oddsidemargin \@mparswitchfalse \widowpenalty10000 @@ -144,14 +217,15 @@ \def\l@subsubsection{\@dottedtocline {3}{4.2em}{3.6em}} \newcommand\Resizebox[5]{\setbox0\hbox{\setlength\unitlength{#1/#3}%^^A - \ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi{#5}}%^^A - \@tempdima\ht0\advance\@tempdima\dp0%^^A - \ifdim\@tempdima>#2\setlength\unitlength{#2/#4}\ifx\pspicture\undefined - \else\psset{unit=\unitlength}\fi - {#5}\else\box0\fi} + \ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi{#5}}%^^A + \@tempdima\ht0\advance\@tempdima\dp0%^^A + \ifdim\@tempdima>#2 + \setlength\unitlength{#2/#4}\ifx\pspicture\undefined + \else\psset{unit=\unitlength}\fi + {#5}\else\box0\fi} \providecommand*{\file}[1]{\texttt{#1}} -\providecommand*{\pkg}[1]{\textsf{#1}} +\providecommand*{\package}[1]{\textsf{#1}} \providecommand*{\cls}[1]{\textsf{#1}} \providecommand*{\env}[1]{\texttt{#1}} \providecommand*{\meta}[1]{$\langle$\textit{#1}$\rangle$} @@ -165,6 +239,8 @@ \setlength{\parsep}{0pt}% }}% {\endlist} + +\newenvironment{Quote}{\par\RestoreSpaces\small\begin{quote}\obeylines\parskip0pt}{\end{quote}\par\@endpetrue} \def\OptionLabel{RaggedRight} \DeclareRobustCommand\La{L\kern-.36em% @@ -176,7 +252,27 @@ \vss}% }% } -\makeatother + +%maybe there is better solution? +\def\DescribeMacro{\let\outer@nobreak\@nobreaktrue + \leavevmode\everypar{\@nobreakfalse}\@bsphack + \begingroup\MakePrivateLetters\Describe@Macro} +\def\DescribeEnv{\let\outer@nobreak\@nobreaktrue + \leavevmode\everypar{\@nobreakfalse}\@bsphack + \begingroup\MakePrivateLetters\Describe@Env} +\def\RestoreSpaces{\@nobreakfalse} + +\newcommand\FRmpar{\@ifstar{\@nobreaktrue\xFRmpar}{\xFRmpar}} + +\newcommand\xFRmpar[2]{\label{#2}\marginpar{\footnotesize + \raggedleft\advance\leftskip.3\hsize#1}} + +\providecommand\sectionname{section} +\def\SpecialUsageIndex#1{} +\def\SpecialEnvIndex#1{} +\newcommand\seeIntro{\hyperref[sec:intro]{Intro}} + +\makeatother%^^A--------------------------------- \OnlyDescription \let\PrintChanges\relax @@ -185,12 +281,12 @@ \RecordChanges \begin{document} \DocInput{floatrow.dtx} - \PrintChanges +\PrintChanges \end{document} %</driver> % \fi % -% \CheckSum{4187} +% \CheckSum{5209} % % % \changes{v0.1e}{2005/03/22}{The user documentation loaded inside @@ -200,9 +296,9 @@ % % \ifx\pspicture\undefined\else\psset{unit=1pt}\fi % -% \def\fileversion{v0.1j} -% \def\filedate{2006/07/24} -% \title{The \pkg{floatrow} package\thanks{This +% \def\fileversion{v0.2a} +% \def\filedate{2007/08/24} +% \title{The \package{floatrow} package\thanks{This % file has version number \fileversion, last revised % \filedate.}} % @@ -212,98 +308,292 @@ % \date{\filedate} % \maketitle % -% \begin{abstract} -% This package was created like extension or addition of \pkg{float} -% package. The \pkg{floatrow} borrows core code from -% \pkg{float}\footnote{\pkg{float} package, version v1.3d dated +% \begin{abstract}\openup.5pt +% This package was created as extension of the \package{float} +% package. The \package{floatrow} package borrows core code from +% the \package{float}\footnote{\package{float} package, version v1.3d dated % 2001/11/08, \copyright{} 1991-2000 Anselm Lingnau.} and -% \pkg{rotfloat}\footnote{\pkg{rotfloat} package, version v1.2 +% \package{rotfloat}\footnote{\package{rotfloat} package, version v1.2 % dated 2004/01/04, \copyright{} 1995--2004 Axel -% Sommerfeldt.} packages, so you must not load these packages. +% Sommerfeldt.} packages, so you \emph{must not} load these packages. % -% The \pkg{float} package has good mechanism for creation (and easy +% The \package{float} package has a~good mechanism for the creation (and easy % modification) of common layout for all floats without -% adding any repeated code in document; unfortunately it deals only -% with alone (plain) object---caption combinations. -% -% Current package extends this mechanism and allows: +% adding any repeated code in the document; besides, this package allows to +% create new float type; it deals only +% with alone (plain) combinations ``object (float contents)---caption''. +% The \package{rotfloat} +% package changes environments of rotated floats (\package{rotating} package) +% to adapt them to \package{float}'s settings. +% +% Current package extends these possibilities and, at last, it allows: % \begin{itemize}\itemsep0pt\parskip0pt -% \item% -% to change width of float box; -% \item% +% \item +% to use mechanism, borrowed from \package{float} package, for +% creation of new float type; +% \item +% to change width of float box, also % to set width for float box, which equals to the width of object; -% \item% +% \item % to put caption beside object; -% \item% +% \item % to put a few floats side by side on the row; -% \item% +% \item % to put footnotes inside float box (using \env{minipage}-like mode); % and also put legend-like text; -% \item% -% to create or modify special layout for each type of float and -% for different positioning of float and its components -% (two-column or rotated float). +% \item +% to create and/or modify special layout for each type of float and +% for different positioning of float and its components, e.g. +% two-column or rotated float. % \end{itemize} % -% The \pkg{floatrow} package is cooperated with \pkg{caption} package -% (version 3.0 and later). Also the \pkg{floatrow} package (like -% \pkg{caption} one) uses \pkg{keyval} package mechanism for layout +% The \package{floatrow} package is cooperated with \package{caption} package +% (\textit{needs version} 3.0\textbf{q} \textit{and later}). +% Also the \package{floatrow} package (like +% \package{caption} one) uses \package{keyval} package mechanism for layout % settings. % \medskip % % \begingroup % \slshape -% I think I did my best to follow this idea and I hope that someone +% I think I did my best to follow these ideas and I hope that someone % likes this idea: helps to maintain this idea anyway, or finds bugs % and absurdities in this package or documentation. % \endgroup % \medskip % -% {Document terminology}: +% \centerline{\textbf{Document Terminology}\nopagebreak\vspace{1ex}} % \begin{description}\itemsep0pt\parskip0pt -% \item[float] could include \emph{object}, \emph{caption}, and +% \item[float] +% could include \emph{object}, \emph{caption}, and % \emph{foot material}; \emph{float} is created by \env{figure} or -% \env{table} environments (\emph{plain float}), or in |\floatbox| -% command; +% \env{table} environments (\emph{plain float}), or by |\floatbox| +% command and its modifications; +% +% \item[float type] +% means standard environments \env{figure} and \env{table}, +% also their subtypes, like e.g.~\env{wrapfigure} (\package{wrapfig} package), +% \env{sidewaysfigure} (\package{rotating} and \package{rotfloat} packages), +% \env{longtable} (\package{longtable} package) etc.; % % \item[object]\env{tabular} or graphics, as contents of table -% (\env{figure}) or figure (\env{table}) or other type of float; +% (\env{table}) or figure (\env{figure}) or other type of float; % % \item[caption]text in |\caption|; % % \item[foot material]explications, legends and/or footnotes inside -% \emph{float} box (|\footnote|/|\mpfootnotemark|/|\footnotetext|, +% \emph{float} box (|\footnote|/\allowbreak|\mpfootnotemark|/\allowbreak|\footnotetext|, % and |\floatfoot| macros). % \end{description} % \end{abstract} % +% \begingroup\small +% \vspace{2ex}\pdfbookmark[1]{Frequently Appeared Design}{FAD}\nopagebreak\centerline{\textbf{Frequently Appeared Design}\nopagebreak} +% \begin{multicols}{2}\raggedright\advance\rightskip1em +% \makeatletter\let\item\@idxitem\ignorespaces\makeatother +% \def\sectionname{sec.} +%^^A% \item{``Anchored'' float (option~\texttt{H})} +%^^A% \strut\pfill +%^^A% \textsl{\sectionname}~\ref{sec:floatborrowII} +% +% \item{Caption} +% \subitem{above float (\env{table}'s object, |\ttabbox|)\kern-1em\allowbreak} +% \strut\pfill +% \textsl{{\seeIntro}},~%^^A +% \textsl{\sectionname}~\ref{sec:floatbox}%^^A; +% %^^A\pageref{FAD:CaptionAbove}, +% %^^A\pageref{FAD:CaptionAboveTable}, +% %^^A\pageref{FAD:CaptionAboveTableII}, +% %^^A\pageref{FAD:CaptionAboveIII} +% +% \subitem{beside float (\env{figure}'s object, |\fcapside|)} +% \strut\pfill +% \textsl{{\seeIntro}},~%^^A +% \textsl{\sectionname}~\ref{sec:floatbox}%^^A;~ +% %^^A\pageref{FAD:BesideCaptionII}, +% %^^A\pageref{ssec:ffigbox:etc}, +% %^^A\pageref{fig:subfig:catsI}, +% +% \subitem{width equals to \env{longtable}'s (|LTcapwidth=| key)} +% \strut\pfill +% \pageref{FAD:LTcapwidth} +% +% \subitem{width equals to object's} +% \emph{see}~{float box width equals to object's}{} +% +% \item{Creation of new float type (|\DeclareNewFloatType|)} +% \strut\pfill +% \textsl{\sectionname}~\ref{sec:newfloat}%;~^^A +% %^^A\pageref{FAD:newfloattype} +% +% \item{Layout of Float types (|\floatsetup|)} +% \strut\pfill +% \textsl{\sectionname}~\ref{sec:floatsetup}\nopagebreak +% +% \item{Float}\nopagebreak +% \subitem{box (|\floatbox|)} +% \strut\pfill +% \textsl{\sectionname}~\ref{sec:floatbox}; +% \subsubitem{figure box (|\ffigbox|)} +% \strut\pfill +% \textsl{{\seeIntro}},~%^^A +% \textsl{\sectionname}~\ref{sec:floatbox}; +% +% \subsubitem{table box (|\ttabbox|)} +% \strut\pfill +% \textsl{{\seeIntro}},~%^^A +% \textsl{\sectionname}~\ref{sec:floatbox}; +% +% \subitem{rotated (|sideways..|~env.)}\nopagebreak +% \strut\pfill +% \textsl{\sectionname}~\ref{ssec:rotating}%^^A--\ref{ssec:lscape} +% \subsubitem{empty (special) page style (|\emptyfloatpage|)} +% \strut\pfill +% \pageref{FAD:emptyfloatpage} +% +% \subsubitem{placing on the facing pages} +% \strut\pfill +% \pageref{FAD:ContRotated} +% +% \subitem{\textbf{here!} (option \texttt{H})} +% \strut\pfill +% \textsl{\sectionname}~\ref{sec:floatborrowII} +% +% \subitem{row (|floatrow| env.)} +% \strut\pfill +% \textsl{{\seeIntro}},~%^^A +% \textsl{\sectionname}~\ref{sec:floatrow}%^^A; +% %^^A\pageref{FAD:BesideFloat}, +% %^^A\pageref{ssec:app:besidestart}--\pageref{ssec:app:besidefinish} +% +% \subsubitem{float(box) in the row occupies the rest space} +% \emph{see}~{float width, the rest space of the row} +% +% \subsubitem{floats of different types side by side} +% \strut\pfill +% \pageref{FAD:MixedRow}, +% \pageref{FAD:MixedRowII}%^^A%, +% %^^A\pageref{FAD:Mixrow} +% +%^^A%^^A% \subsubitem{floats of one type side by side} +%^^A%^^A% \strut\pfill +%^^A%^^A% \pageref{FAD:floatrow} +% +% \subitem{like in plain \LaTeX\ (|\RawFloats|)} +% \strut\pfill +% \textsl{\sectionname}~\ref{sec:rawfloats}%^^A; +% %^^A\pageref{FAD:PlainFloat}, +% %^^A\pageref{FAD:PlainFloatII} +% +% \subitem{width} +%^^A% \subsubitem{|floatwidth=| key etc.} +%^^A% \strut\pfill +%^^A% \textsl{\sectionname}~\ref{sec:wd:object} +% +% \subsubitem{option in |\floatbox| commands} +% \strut\pfill +% \textsl{\sectionname}~\ref{sec:floatbox}%^^A; +% %^^A\pageref{FAD:FBwidthI}, +% %^^A\pageref{FAD:FBwidthII} +% +% \subsubitem{equals to object's (option |\FBwidth| (|\floatbox|))} +% \strut\pfill +% \textsl{{\seeIntro}},~%^^A +% \textsl{\sectionname}~\ref{sec:floatbox}%^^A; +% %^^A\pageref{FAD:FBwidthI}, +% %^^A\pageref{FAD:FBwidth}, +% %^^A\pageref{FAD:FBwidthII} +% +% \subsubitem{the rest space in the row +% (option |\Xhsize| (|\floatbox|))} +% \strut\pfill +% \pageref{FAD:floatfillspace} +% +% \subitem{wrapped} +% \strut\pfill +% \textsl{\sectionname}~\ref{ssec:wrapfig}--\ref{ssec:picins} +% +% \item{Footnote inside float} +% \strut\pfill +% \textsl{\sectionname}~\ref{sec:floatfootnote}%^^A; +% %^^A\pageref{FAD:FnoteInsideFloat} +% +%^^A%^^A% \subitem{footnote text (|\footnotetext|)} +%^^A%^^A% \strut\pfill +%^^A%^^A% \textsl{\sectionname}~\ref{sec:floatfootnote}; +%^^A%^^A% \pageref{FAD:FnoteInsideFloat} +% +% \subitem{footnote mark +% (|\mpfootnotemark|)\kern-1em\allowbreak} +% \strut\pfill +% \pageref{FAD:FnoteInsideFloat} +% +% \item{Legend-like macro (|\floatfoot|)} +% \strut\pfill +% \textsl{\sectionname}~\ref{subsec:floatfoot} +% +% \item{Subfloat} +% \strut\pfill +% \subitem{subcaption above} +% \strut\pfill +% \pageref{FAD:subcapabove} +% \subitem{subfloat label beside} +% \strut\pfill +% \pageref{FAD:sublabelbeside} +% \end{multicols}% +% \endgroup +% % \clearpage % \begingroup -% \small -% \tableofcontents -% \listoffigures -% \listoftables +% \small\openup-.75pt +% \pdfbookmark[1]{Contents}{TOC}\nopagebreak\tableofcontents +% \pdfbookmark[1]{List of Figures}{LOF}%^^A\setcounter{lofdepth}2 +% \nopagebreak\listoffigures +% \pdfbookmark[1]{List of Tables}{LOT}%^^A\setcounter{lotdepth}2 +% \nopagebreak\listoftables % \endgroup +% % \clearpage % \suppressfloats[t] % -% \section{Introduction} +% \section{Macros for Building Floats} +% +% \subsection{Introduction}\label{sec:intro} % % One of the first macros of package, created for float contents, -% is a macro which builds contents of table environment with caption +% is a macro which builds contents of the table environment with caption % above. The width of caption equals to the width of contents, e.g. -% of tabular (see table~\ref{intro:table}). -%\begin{verbatim} -%\begin{table} -%\ttabbox -% {\caption{A table ...}\label{...}} -% {\begin{tabular}...\end{tabular}} -%\end{table} -%\end{verbatim} -% \begin{table}[h] +% of tabular (see table~\ref{intro:table}).%^^A +% \FRmpar{Caption above table object}{FAD:CaptionAbove}%^^A +%^^A% \footnote{The table caption in current documentation use a~special layout, +%^^A% popular in Russian typographic publications, look for +%^^A% \texttt{flushrightlabel} key of \cs{captionsetup} in the preamble of +%^^A% source file of this documentation and in sample files +%^^A% ({\sectionname}~\ref{sec:samples}).} +%\begin{Quote}\openup-.65pt +%\meta{preamble} +% |\usepackage[|\hyperref[setup:font]{\texttt{font}}|=small,|%^^A +% \hyperref[setup:captionskip]{\texttt{captionskip}}|=5pt,|%^^A +% \hyperref[setup:objectset]{\texttt{objectset}}|=centering,| +% | |\hyperref[setup:margins]{\texttt{margins}}|=centering,...]{floatrow}[2007/08/24]| +% |\|\hyperref[sec:floatsetup]{\texttt{floatsetup}}|[table]{|%^^A +% \hyperref[setup:style]{\texttt{style}}|=Plaintop}| +% |\usepackage[font=small,labelfont=bf,labelsep=period,| +% | justification=centerlast]{caption}[2007/04/11]| +% |\DeclareCaptionLabelFormat{rightline}{\rightline{\bothIfFirst{#1}{ }#2}}| +% |\captionsetup[table]{labelformat=rightline,textfont=bf,| +% | labelfont={md,sl},labelsep=newline}| +%\meta{preamble} +%|\begin{table}| +%|\|\hyperref[floatbox:ttabbox]{\texttt{ttabbox}} +%| {\caption{A small table ...}\label{...}}| +%| {\begin{tabular}...\end{tabular}}| +%|\end{table}| +%\end{Quote} +% \begin{table}[H] % \ttabbox -% {\caption{A table with caption above}\label{intro:table}} -% {\begin{tabular}{|c|c|c|} +% {\caption{A small table with caption text above (\cmd{\ttabbox})}\label{intro:table}} +% {\jot2pt\begin{tabular}{|c|c|c|} % \hline % \thead{First data} & \thead{Second data} & \thead{Third data} \\ % \hline @@ -315,371 +605,1224 @@ % % The pair of this command, which creates figures---|\ffigbox|---puts % caption below contents and default width of caption equals -% to the width of main text. The default -% layout of |\ffigbox| is similar to plain \env{figure} environment; -% this macro will be useful for creation of beside floats (see -% example with figures~\ref{intro:leftfig} and~\ref{intro:rightfig}) +% to the width of main text or predefined |\hsize|. +%\begin{Quote}\openup-.65pt +%|...| +%|\begin{figure}| +%|\|\hyperref[floatbox:ffigbox]{\texttt{ffigbox}} +%| {\caption{A figure...}\label{...}}| +%| {...}| +%|\end{figure}| +%\end{Quote} +%\begingroup +% \begin{figure}[H] +% \ffigbox +% {\caption[A simple figure box (\cmd{\ffigbox})] {A plain figure box +% with long long long long long long long long +% long long long long long long long long long long multilined caption}\label{intro:figure}} +% {\unitlength.88\unitlength\input{Doll.picture}} +% \end{figure}%^^A +%\endgroup +% The default +% layout of |\ffigbox| (figure~\ref{intro:figure}) is similar to the plain +% \env{figure} environment. But if you set option |[\FBwidth]| like below: +% \FRmpar{Caption's width equals to object}{FAD:FBwidthI} +%\begin{Quote} +%|...| +%|\begin{figure}|\nopagebreak +%|\ffigbox[\|\hyperref[floatbox:FBwidth]{\texttt{FBwidth}}|]| +%| {\caption{A figure}\label{...}}| +%| {...}| +%|\end{figure}| +%\end{Quote} +% \begin{figure}[H] +% \ffigbox[\FBwidth] +% {\caption[A figure box (\cmd{\ffigbox}) with the width equal to graphics]{A figure with +% the width equal to graphics with long +% long long long long multilined +% caption}\label{intro:figure:FBwidth}} +% {\unitlength1.78\unitlength\input{Horse.picture}} +% \end{figure}%^^A +% You get caption width equal to the width of picture +% (figure~\ref{intro:figure:FBwidth}). % % The third macro---|\fcapside| (figure~\ref{intro:beside})---puts % caption beside: -% -%\begin{verbatim} -%\begin{figure} -%\fcapside -% {\caption[Beside caption]{Beside caption ...}\label{...}} -% {...} -%\end{figure} -%\end{verbatim} -% \begin{figure}[h] +%\begin{Quote} +%\meta{preamble} +% |\usepackage[...|\hyperref[setup:capbesidesep]{\texttt{capbesidesep}}|=quad,|%^^A +% \hyperref[setup:facing]{\texttt{facing}}|=yes,| +% | |\hyperref[setup:capbesideposition]{\texttt{capbesideposition}}|=inside,...]{floatrow}[2007/06/24]| +%|...| +%\meta{preamble} +%|\begin{figure}| +%|\|\hyperref[floatbox:fcapside]{\texttt{fcapside}} +%| {\caption{...}\label{...}}| +%| {...}| +%|\end{figure}| +%\end{Quote} +% \begin{figure}[H] % \fcapside % {\caption[Beside caption (`one-column' width)]{Beside caption % (width of caption equals to the width of object) and more text % and some more text and a bit more text and -% a little more text and a little peace of text to fill +% a little more text and a little piece of text to fill % space}\label{intro:beside}} -% {{\setlength\unitlength{4cm/58}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi +% {{\setlength\unitlength{3.68cm/100}%^^A +% \input{Bear.picture}}} +% \end{figure} +% The width of main text or predefined value of |\hsize| before |\fcapside| command, +% by default, divided into two columns, their width equals to the half of current |\hsize| +% (figure~\ref{intro:beside}) excluding float margins and +% separation material between float and caption. +% One column is occupied by object, another---by caption and foot material (explications +% or legends and footnotes). +% +% +% If you set the |[\FBwidth]| option: +% \FRmpar{Caption's width equals to object}{FAD:FBwidthII} +%\begin{Quote} +%|...| +%|\fcapside[\FBwidth]| +%|...| +%\end{Quote} +% \begin{figure}[H] +% \fcapside[\FBwidth] +% {\caption[Beside caption (occupies rest space of defined width beside float object)]{Beside caption +% (the caption text occupies the rest space of \cs{hsize}) and more text +% and some more text and a bit more text and +% a little more text and a little piece of text to fill +% space}\label{intro:beside:FBwidth}} +% {{\setlength\unitlength{3.68cm/100}%^^A +% \input{Bear.picture}}} +% \end{figure} +% The graphic column width will be equal to the graphics and caption occupies the rest space +% (see figure~\ref{intro:beside:FBwidth}).\medskip +% +% \subsection{The \cs{floatbox} Macro}\label{sec:floatbox} +% +% \DescribeMacro{\floatbox} +% This package offers macro, which creates necessary layout of float +% object contents and caption (see also the Introduction). +% The main macro looks like: +% \begin{Quote} +% |\floatbox[|\meta{preamble}|]{|\meta{captype}|}[|^^A +% \meta{width}|][|\meta{height}|][|\meta{vert pos}|]| +% | {|\meta{caption}|}{|\meta{object}|}|\footnotemark +% \end{Quote}%^^A +% \footnotetext{The +% order of mandatory arguments and their contents makes not +% difference during building of float box. This macro +% historically needs two mandatory arguments, but they could +% be filled freely.} +% where\label{floatboxsets}: +% \begin{description}\itemsep0pt +% \item[\meta{preamble}]there could be |\capbeside|\label{floatbox:capbeside} command which +% places caption beside float contents; +% |\nocapbeside|\label{floatbox:nocapbeside} +% (to put caption above/below, accordingly +% to float type's style); +% |\captop|\label{floatbox:captop} +% (to put caption above); +% or another systematic command +% (even with usage of |\captionsetup| +% and |\|\hyperref[setup:thisfloatsetup]{\texttt{thisfloatsetup}} +% see examples in documentation and appendix). +% \item[\meta{captype}]the type of float this command created for; +% \item[\meta{width}]the width of object---caption box +% (in case of caption above or below object), +% or width of object box (if caption stays beside object). +% Empty width option, |[]|, and option |[\hsize]| mean the same.\par +% The option |[\FBwidth]|\label{floatbox:FBwidth}%^^A +% \FRmpar{Caption's width\\ equals to object}{FAD:FBwidthIII} +% in~the \meta{width} argument +% allows usage of natural width of float contents: \qquad for full float box in the case of caption +% above/\allowbreak below; \qquad in~the case of beside caption natural width of float object expands to +% object box only.\par +% \emph{Note}. If you use the \verb|\FBwidth| command in the \meta{width} +% optional argument, please be sure that object contents can be placed +% in |\hbox| command (you only allowed to use |\vspace| (not |\vskip|!) +% command at the very +% beginning and very end of object contents for fine tuning +% of vertical spaces and position of contents); +% \item[\meta{height}]the height of object---caption box +% (in case of caption above or below object), +% or height of object box (if caption stays beside object); +% \item[\meta{vert pos}]vertical alignment of object contents in +% object's box in case of \meta{height} argument has larger value than +% height of object contents, float placed inside \env{floatrow}. +% \item[\meta{caption}]text of caption and legends (you may use +% |\floatfoot| command (see page~\pageref{subsec:floatfoot}); you +% may also use |\footnote|/|\mpfootnotemark|/|\footnotetext| stuff +% for footnotes inside float, or |\floatfoot| command; +% \item[\meta{object}]Contents of float; you may use +% |\footnote|/|\mpfootnotemark|/|\footnotetext| stuff or +% |\floatfoot| command. +% \end{description} +% +% The commands |\ttabbox|, |\ffigbox|, and |\fcapside|, used in Introduction, abbreviate |\floatbox| command, which creates +% float boxes: +% \begin{itemize}\itemsep0pt\parskip0pt +% \item[--] the |\ttabbox| command we can replace with the code\\ +% | \floatbox[\captop]{table}[\FBwidth]|; +% \item[--] the |\ffigbox| one---with |\floatbox{figure}| (simplest definition); and +% \item[--] the |\fcapside| one---with |\floatbox[\capbeside]{figure}|. +% \end{itemize}% +% +% You see in example with figure~\ref{intro:figure:FBwidth} that you can change width +% for |\ffigbox| command to get caption (and also full float box) width equal to the width +% of object. Also you may create your own command based on |\floatbox| command +% and set float box's width equal to object's, +% see {\sectionname}~\ref{ssec:ffigbox:etc} about this. +% +% \begingroup +% The three examples of float placing. First simplest example: +%\begin{Quote} +%|\begin{figure}| +%|\floatbox{figure}[4cm]| +%| {\caption{The simple example ...}%| +%| \label{fig:WcatI}}| +%| {...}| +%|\end{figure}| +%\end{Quote} +% created the picture in the figure~\ref{fig:WcatI}. The width of box equals to 4cm. +% \begin{figure}[H] +% \floatbox{figure}[4cm] +% {\caption{The simple example of \cmd{\floatbox}}% +% \label{fig:WcatI}} +% {\unitlength1.24\unitlength\input{TheCat.picture}} +% \end{figure}% +% \endgroup +% +% The more preferable way for usage of |\floatbox| is to put table +% caption \emph{above} table contents and set caption width equal +% to table width. +%\begin{Quote} +%|\begin{table}|\nopagebreak +%|\floatbox[\captpop]{table}[\FBwidth]| +%| {\caption{Simple tabular ...}\label{...}}| +%| {\begin{tabular}{|l|c|c|}| +%| ...}| +%|\end{table}| +%\end{Quote} +% \DeleteShortVerb{\|}% +% \begingroup +% \floatsetup[table]{style=plain} +% \begin{table}[H] +% \floatbox[\captop]{table}[\FBwidth] +% {\caption{Simple tabular with caption +% above (\cmd{\floatbox} with \cmd{\captop} in preamble argument)}\label{tab:tabII}} +% {\begin{tabular}{|l|c|c|} +% \hline +% \thead{Column head} & \thead{Data I} & \thead{Data II} \\ +% \hline +% First row & 1 & 2 \\ +% Second row & 3 & 4 \\ +% Third row & 6 & 8 \\ +% Fourth row & \llap{1}0 & \llap{1}6 \\ +% \hline +% \end{tabular}} +% \end{table}% +% \endgroup +% \MakeShortVerb{\|}% +% as shown in table~\ref{tab:tabII}. To fit size of caption (i.e full +% float box) to size of \env{tabular} environment there was used +% |\FBwidth| command in \meta{width} argument. +% +% The next example shows \env{figure} environment with beside caption. +% In this example \meta{preamble} argument consists of rather complex definition, +% and |\FBwidth| in \meta{width} argument. The caption +% occupies the rest space of float box's width, |\hsize| (in current +% example the width float box equals to main text width---|\textwidth|). +% +%\begin{Quote} +%|\begin{figure}| +%|\floatbox[{\capbeside| +%| \captionsetup[capbesidefigure]{format=break,labelsep=none,| +%| justification=raggedleft}%| +%| \|\hyperref[setup:thisfloatsetup]{\texttt{thisfloatsetup}}%^^A +% |{|\hyperref[setup:capbesideposition]{\texttt{capbesideposition}}|=left}}]{figure}[\FBwidth]| +%| {\caption{...}\label{...}}| +%| {...}| +%|\end{figure}| +%\end{Quote} +% \begin{figure}[H] +% \floatbox[{\capbeside +% \captionsetup[capbesidefigure]{format=break,labelsep=none, +% justification=raggedleft}% +% \thisfloatsetup{capbesideposition=left}}]{figure}[\FBwidth] +% {\caption[Beside caption (example width complex preamble in \cmd{\floatbox})]{Beside caption and more text +% and some more text and a bit more text and +% a little more text and a little peace of text to fill +% space}\label{fig:beside:mouse}} +% {{\setlength\unitlength{4cm/58}%^^A % \input{Mouse.picture}}} % \end{figure} +% Please note that complex preamble, with more than one command option must be placed in group. +% (See {\sectionname}~\ref{sec:floatsetup} about settings for floats.) % -% These three commands abbreviate |\floatbox| command, which creates -% float boxes (see section~\ref{sec:floatbox}). +% \RestoreSpaces +% \subsubsection{Creation of Personal Commands for Float Boxes}\label{ssec:ffigbox:etc} % -% The \env{floatrow} environment allows to put floats side by side, -% like figures~\ref{intro:leftfig} and~\ref{intro:rightfig}. -% By default \env{floatrow} creates necessary number of ``columns'' -% (usually two) where floats are placed: -%\begin{verbatim} -%\begin{figure} -% \begin{floatrow} -% \ffigbox -% {...}{\caption{...}\label{...}} -% -% \ffigbox -% {...}{\caption{...}\label{...}} -% \end{floatrow} -%\end{figure} -%\end{verbatim} -% \begin{figure}[h] +% The usage of |\floatbox| command with options (which could be cumbersome) sometimes is rather complex. +% The Introduction demonstrates commands-abbreviations of this commands. +% You may define commands-abbreviations (or redefine existing) for your own purposes and +% include there some additional style definitions and settings. +% +% The definition of new float abbreviation looks like: +% \begin{Quote} +% |\newfloatcommand|\marg{command}%^^A\\\strut\qquad +% \marg{captype}\oarg{preamble}\oarg{default width} +% \end{Quote} +% where: +% \begin{description}\itemsep0pt\parskip1ptplus1pt +% \item[\meta{command}]the user's command name (without backslash); +% \item[\meta{captype}]the name of float environment +% this command is created for; +% \item[\meta{preamble}] +% you may use commands, mentioned in page~\pageref{floatboxsets} +% and other layout commands, like was shown in examples; +% you may try to add any other regular command (e.g. |\captionsetup| +% or |\thisfloatsetup| stuff); +% \item[\meta{default width}]the first reason of usage of this option is +% to put |\FBwidth| command: \qquad in case of +% caption above or below object (there could be defined +% |\nocapbeside| in \meta{preamble} option) this command defines width of +% full float (object---caption) box (see figure~\ref{intro:figure:FBwidth}); \qquad in the case of caption +% beside object (there must be defined |\capbeside| in \meta{preamble} +% option) this command defines +% width of object (caption occupies the rest space, see figure~\ref{intro:beside:FBwidth}).\par +% You may put also any dimension like |6cm| +% or |.75\textwidth| but usage of option by +% this way is much less reasonable. +% \end{description} +% +% Let's repeat three already defined commands-abbreviations:\label{abbrcom}%^^A +% \begin{Quote} +% |\newfloatcommand{ffigbox}{figure}[\nocapbeside]|\label{floatbox:ffigbox}\nopagebreak +% |\newfloatcommand{fcapside}{figure}[\capbeside]|\label{floatbox:fcapside}\nopagebreak +% |\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]|\label{floatbox:ttabbox} +% \end{Quote} +% First two defined for figures and last one---for table. You may +% redefine existing macros using |\renewfloatcommand| command (it uses +% the same arguments as |\newfloatcommand| one).\medskip +% +% Your defined commands you may use in following way (example for |\ffigbox|): +% \begin{Quote} +% |\ffigbox|\oarg{width}\oarg{height}\oarg{vert pos} +% \end{Quote} +% first option, \oarg{width}, cancels the default width settings, which were +% used during (re)definition of current command. The other two options +% are analogous to the |\floatbox|'s ones (see page~\pageref{sec:floatbox}). +% +% \par\RestoreSpaces +% \subsection{Building Float Row}\label{sec:floatrow} +% +% If you need to put two or more floats of one type side by side,%^^A +% \FRmpar{Floats of one type\\ side by side}{FAD:floatrow} +% you may use \env{floatrow} environment. +% +% \par\RestoreSpaces +% This environment looks like: +% \begin{Quote} +% |\begin{floatrow}[|\meta{number of beside floats}|]|\nopagebreak +% |\floatbox...|\nopagebreak +% |\floatbox...|\nopagebreak +% |...|\nopagebreak +% |\end{floatrow}| +% \end{Quote} +% +% The \env{floatrow} environment allows to put floats side by side. +% This environment creates necessary number of ``columns'' +% (usually two), where floats are placed. You may redefine the width of each float box, +% e.g. the table boxes~\ref{tab:row:tabIII} and~\ref{tab:row:tabIV} have the width of their contents +% (remember, the |[\FBwidth]| is default option of |\ttabbox|). +% +% Please note that \emph{for each float box} inside \env{floatrow} you must use |\floatbox|, |\ffigbox|, +% |\ttabbox| or your own command, created with |\newfloatcommand| macro: +%\begin{Quote} +%\meta{preamble} +%| \usepackage[...|\hyperref[setup:floatrowsep]{\texttt{floatrowsep}}|=qquad,...]{floatrow}| +%| \|\hyperref[sec:floatsetup]{\texttt{floatsetup}}|[table]{|%^^A +% \hyperref[setup:style]{\texttt{style}}|=Plaintop}| +%\meta{preamble} +%|\begin{figure}| +%| \begin{table}| +%| \ttabbox| +%| {\caption{...}\label{...}}| +%| {...}| +%| | +%| \ttabbox| +%| {\caption{...}\label{...}}| +%| {...}| +%| \end{floatrow}| +%|\end{table}| +%\end{Quote} +% \DeleteShortVerb{\|}% +% \begin{table}[H] +% \begin{floatrow} +% \extrarowheight1pt +% \ttabbox +% {\caption[Beside table~I long header]%^^A +% {Beside table~I with long long long long long long and top aligned caption}%^^A +% \label{tab:row:tabIII}}%^^A +% {\begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|} +% \hline +% \multirowthead{2}[-1ex]{Left Column Head} +% & \multicolumn{2}{c|}{\thead{Data}} \\ +% \cline{2-3} +% & \multicolumn{1}{c|}{\thead{I}} +% & \multicolumn{1}{c|}{\thead{II}} +% \\\hline +% First row & 1 & 2 \\ +% Second row & 3 & 4 \\ +% Third row & 6 & 8 \\ +% Fourth row & \llap{1}0 & \llap{1}6 \\ +% \hline +% \end{tabular}} +% +% \ttabbox +% {\caption{Beside table~II with top aligned +% caption}\label{tab:row:tabIV}}%^^A +% {\begin{tabular}{|l|c|c|c|} +% \hline +% \multirowthead{2}[-1ex]{Column Head} +% & \multicolumn{3}{c|}{\thead{Data}} \\ +% \cline{2-4} +% & \thead{I} & \thead{II} & \thead{III} \\ +% \hline +% First row & 1 & 2 & \phantom01 \\ +% Second row & 3 & 4 & \phantom06 \\ +% Third row & 6 & 8 & 28 \\ +% \hline +% \end{tabular}} +% \end{floatrow} +% \end{table} +% \MakeShortVerb{\|}% +% Since |\ttabbox| uses |\FBwidth| as default option, the caption width equals to tabular contents. +% +% The next example with figures uses |[\FBwidth]| for the left float and |[\Xhsize]| for the right. +%\begin{Quote} +%|...|\nopagebreak +%|\begin{figure}|\nopagebreak +%| \begin{floatrow}|\nopagebreak +%| \ffigbox[\FBwidth]| +%| {...}| +%| {\caption{...}\label{...}}| +%| | +%| \ffigbox[\Xhsize]|%^^A +% \FRmpar{Float occupies the rest space in the row}{FAD:floatfillspace} +%| {...}| +%| {\caption{...}\label{...}}| +%| \end{floatrow}|\nopagebreak +%|\end{figure}| +%\end{Quote} +% \begin{figure}[H] % \begin{floatrow} -% \ffigbox -% {\input{BlackDog.picture}} -% {\caption{Left beside figure of simple row}% -% \label{intro:leftfig}}% +% \ffigbox[\FBwidth] +% {\caption[Left beside figure (\env{floatrow}), the float box has width of graphic]{Left beside figure, +% the width of graphic}% +% \label{intro:leftfig:FBwidth}}% +% {\unitlength1.12\unitlength\input{Bear.picture}} % +% \ffigbox[\Xhsize] +% {\caption[Right beside figure (\env{floatrow}), occupies the rest space of row]{Beside figure at the right side of simple figure row, +% the box width occupies the rest space of row}%^^A +% \label{intro:rightfig:Xhsize}} +% {\unitlength1.44\unitlength\input{Doll.picture}} +% \end{floatrow} +% \end{figure}%^^A +% +% \emph{Note}. Usually the command |\Xhsize| is used for the last float +% box. But if you use \package{calc} package you may try to use |\Xhsize| +% earlier, if the \emph{absolute} value of the width of float boxes to +% the right in float row is known, or set something in \meta{width} +% argument like |\Xhsize/2| and then |\Xhsize| for two last +% |\floatbox|'es---the next example just uses it. +% +% And here is more complex example. The first float (used |\ffigbox|) has default +% width equal to ``column'' width, the next uses width of included +% graphic (uses command |\FBwidth| in optional argument \meta{width}), +% the last two occupy the rest horizontal space of page which was +% counted with command |\Xhsize| and \package{calc} package.%^^A +%\begin{Quote} +%\meta{preamble} +% |\DeclareMarginSet{hangleft}{\setfloatmargins| +% | {\hskip-\marginparwidth\hskip-\marginparsep}{\hfil}}| +% |\floatsetup[|\hyperref[setup:widefigure]{\texttt{widefigure}}|]{|%^^A +% \hyperref[setup:margins]{\texttt{margins}}|=hangleft}| +%\meta{preamble} +%|\begin{figure*}| +%|\begin{floatrow}[4]| +%| \ffigbox| +%| {\caption{Beside figure~I...}...}| +%| {...}| +%| | +%| \ffigbox[\FBwidth]| +%| {\caption{Beside figure~II...}...}| +%| {...}| +%| | +%| \ffigbox[\Xhsize]| +%| {\caption{Beside figure~III...}...}| +%| {...}| +%|\end{floatrow}| +%|\end{figure*}| +%\end{Quote} +% \floatsetup[widefloat]{margins=hangleft} +% \begin{figure*}% +% \begin{floatrow}[4] % \ffigbox -% {\caption{Beside figure at the right side of simple figure row}%^^A -% \label{fig:rotrow:FcatI}} -% {\input{TheCat.picture}\label{intro:rightfig}} +% {\caption{Figure~I in the row (\env{floatrow}), ``column'' width}% +% \label{fig:row:Dog}} +% {\input{TheDog.picture}} +% +% \ffigbox[\FBwidth] +% {\caption{Figure~II in the row (\env{floatrow}), graphics width}% +% \label{fig:row:WcatI}} +% {\input{TheCat.picture}} +% +% \ffigbox[\Xhsize/2] +% {\caption{Figure~III in the row, float's width box has the +% half of the rest space of row}% +% \label{fig:row:BcatI}} +% {{\setlength\unitlength{\hsize/58}%^^A +% {\input{Mouse.picture}}}} +% +% \ffigbox[\Xhsize] +% {\caption{Figure~IV in the row, +% occupies the rest space of row}% +% \label{fig:row:mouseI}} +% {\input{Cheese.picture}} +% \end{floatrow} +% \end{figure*}% +% The result you see in the row of +% figures~\ref{fig:row:Dog}--\ref{fig:row:mouseI}. Please note that in all examples the vertical +% alignment of floats lays on the bottom of upper part (here: objects) +% of float and the top of lower part (captions). +% +% \RestoreSpaces +% \subsubsection{Mixed Row}\label{sec:mixrow} +% +% The problem in mixed row is that you must put different types of float in +% one float environment, which sets its own layout for included float +% box(es). For creation of right layouts write +% |\|\hyperref[setup:killfloatstyle]{\texttt{killfloatstyle}} command at the beginning of \env{floatrow} +% environment or just before first ``foreign'' |\floatbox| macro (in +% current example---before |\ttabbox|; the |\ffigbox| macro is +% ``native'' for \env{figure} environment). +% +% Another problem is that figures usually have captions below +% graphics, but tables could have caption \emph{above} their contents. +% The alignment of all floats is similar: the bottom of upper part and +% top of lower part. In this case if you want to put such beside figure +% and table you'll get undesirable result. For such situations you may +% use one of the following commands: +%\begin{Quote} +%|\CenterFloatBoxes|\label{floatbox:CenterFloatBoxes} +%|\TopFloatBoxes|\label{floatbox:TopFloatBoxes} +%|\BottomFloatBoxes|\label{floatbox:BottomFloatBoxes} +%\end{Quote} +% which align \emph{full} float boxes by center, top or bottom lines. +% These macros were created by |\buildFBBOX|\label{floatbox:buildFBBOX} macro. +% There is also |\PlainFloatBoxes|\label{floatbox:PlainFloatBoxes} which restores standard behavior of +% |\floatbox|'es. +% +% The usage of |\CenterFloatBoxes| and |\killfloatstyle| you'll see in +% mixed float row with figure~\ref{fig:rowmixspec:WcatI} and +% table~\ref{tab:rowmixspec:tabI}\label{mixrow}: +%\begin{Quote}\openup-.5pt +%|\begin{figure}\CenterFloatBoxes|\nopagebreak +%|\begin{floatrow}| +%| \ffigbox[\FBwidth]| +%| ...| +%| \killfloatstyle\ttabbox| +%| ...| +%\end{Quote} +% \DeleteShortVerb{\|}% +% \begingroup +% \begin{figure}[H]\CenterFloatBoxes +% \begin{floatrow} +% \ffigbox[\FBwidth] +% {\unitlength1.86\unitlength\input{Horse.picture}} +% {\caption{A figure in the mixed row}\label{fig:rowmixspec:WcatI}}% +% \extrarowheight1pt +% \killfloatstyle +% \ttabbox +% {\caption{A table in the mixed row}\label{tab:rowmixspec:tabI}} +% {\tabcolsep5\tabcolsep\begin{tabular}{|c|c|}\hline A & B \\ C & D \\ \hline\end{tabular}} +% \end{floatrow} +% \end{figure} +% \endgroup +% \MakeShortVerb{\|}% +% \par\RestoreSpaces +% +% \emph{Note.} Both figure and table boxes have got width equal to +% contents of objects. The |\ffigbox| command has optional argument +% |[\FBwidth]|, but |\ttabbox| have not any option---it uses +% |[\FBwidth]| option as default (see definitions on page +% \pageref{abbrcom}).\label{FAD:MixedRowII} +% +% \subsection{Running Floats In The Raw \LaTeX\ mode}\label{sec:rawfloats} +% +% The\label{FAD:PlainFloat} +% \package{floatrow} package redefines float environments for the case +% of creation of common layout for all floats. This redefinition creates +% some limitations for source document file, which were mentioned in +% introduction. If you still need a raw behavior of float environment, +% you may do that by one of three ways. +% +% 1.\enskip If you want \LaTeX\ behavior for \emph{just for one environment}, +% input a |\RawFloats| command \emph{inside} environment: +%\begin{Quote}\openup-.5pt +%|\begin{figure}\RawFloats|\nopagebreak +%|\captionsetup[table]{position=top}| +%|\begin{minipage}{0.45\textwidth}| +%| \centering ...| +%| \caption{...}\label{...}| +%|\end{minipage}| +%|\begin{minipage}{0.45\textwidth}| +%| \captionof{table}{...}\label{...}| +%| \centering ...| +%|\end{minipage}|\nopagebreak +%|\end{figure}| +%\end{Quote} +% And you'll get figure~\ref{Right:expect:fig} +% and table~\ref{Right:expect:tab}\nopagebreak\footnote{That could work correct if +% you do not use any fancy float layout at least for one of floats.}. +% \begin{figure}[H]\RawFloats +% \captionsetup[table]{position=top} +% \begin{minipage}{0.45\textwidth} +% \centering {\unitlength1.86\unitlength\input{Horse.picture}} +% \caption{A figure in raw \LaTeX's mode}\label{Right:expect:fig} +% \end{minipage}\quad\hfill +% \killfloatstyle\begin{minipage}{0.45\textwidth} +% \captionof{table}{A table in raw \LaTeX's mode}\label{Right:expect:tab} +% \centering\tabcolsep5\tabcolsep +% \begin{tabular}{|c|c|}\hline A & B \\ C & D \\ \hline\end{tabular} +% \end{minipage} +% \end{figure} +% Compare this example with example in the {\sectionname}~\ref{sec:mixrow} and the following example. +%\begin{Quote}\openup-.5pt +%|\begin{figure}\RawFloats\CenterFloatBoxes|\nopagebreak +%|\begin{floatrow}| +%| \ffigbox[\FBwidth]|\nopagebreak +%| {...}|\nopagebreak +%| {\caption{...}\label{...}}| +%| | +%| \ttabbox|\nopagebreak +%| {...}|\nopagebreak +%| {\caption{...}\label{...}}| +%|\end{floatrow}|\nopagebreak +%|\end{figure}| +%\end{Quote} +% \begin{figure}[H]\RawFloats\CenterFloatBoxes +% \begin{floatrow} +% \ffigbox[\FBwidth] +% {\unitlength1.86\unitlength\input{Horse.picture}} +% {\caption{A figure in \cmd{\floatbox} and inside \env{floatrow} in raw \LaTeX's mode}% +% \label{intro:leftfig:raw}}% +% +% \ttabbox +% {\caption{A table in \cmd{\floatbox} and inside \env{floatrow} in raw +% \LaTeX's mode}\label{intro:righttab:raw}} +% {\tabcolsep5\tabcolsep +% \begin{tabular}{|c|c|}\hline A & B \\ C & D \\ \hline +% \end{tabular}} % \end{floatrow} % \end{figure}%^^A -% Please note that inside \env{floatrow} you must use |\ffigbox| -% or |\ttabbox| macros for each float box. (See also -% sections~\ref{sec:floatbox} for more information about commands -% used in introduction and |\floatbox| command; -% and \ref{sec:floatrow} about \env{floatrow} environment.) % -% \subsection{Do not write that with \pkg{floatrow} package} +% 2.\enskip Canceling of \package{floatrow}'s behavior of \emph{all floats of one type} +% is set outside any float environment, these settings are better for +% preamble. In this case the |\RawFloats| command needs optional +% argument with name(s) of float type. You may set that by two ways: +% \begin{Quote} +% |\RawFloats|\oarg{type,type,\ldots}\quad or\nopagebreak +% |\RawFloats|\oarg{type}\oarg{subtype,subtype,\ldots} +% \end{Quote} +% So, if you set |\RawFloats[figure]|, that will return to all figures +% in all subtype environments (\texttt{figure}, \texttt{figure*}, +% \texttt{sidewaysfigure}, etc.) plain \LaTeX{} mode. If there is also a table, +% |\RawFloats[figure,table]|, you also will set the same for all table +% subtypes. +% +% The second way, with second optional argument, cancels \package{floatrow}'s +% behavior for mentioned float ``subtype(s)'' of \emph{one} float type +% in second optional argument you may use \texttt{float}, \texttt{widefloat}, +% \texttt{rotfloat}, \texttt{widerotfloat}---the meaning of this options +% analogous to options of |\floatsetup| macro +% (see {\sectionname}~\ref{sec:floatsetup}) but you may use here only options which +% include ``float'' word\label{FAD:PlainFloatII}%^^A +% %^^A(or short variants without ``float'', like +% %^^A\texttt{rot} or \texttt{widerot})%^^A +% .%^^A +% +% \DescribeMacro{rawfloats}\label{setup:rawfloats}%^^A +% 3.\enskip This option stores the plain \LaTeX{} mode (i.e. stores usage of standard +% \LaTeX{} float macros) for all standard and new +% user defined float types. This option can be used only in +% |\usepackage| line. % -% The \pkg{floatrow} package creates some features or limitations -% of float layout building. If you'll write something like -%\begin{verbatim} -%\begin{figure} -%\caption{A figure caption} -%\centering \input{Mouse.picture} -%\end{figure} -%\end{verbatim} -% please do not expect that caption appears at the top of figure. If -% you want, e.g. to put figure captions above its contents, you must -% write in preamble |\floatsetup[figure]{style=plaintop}| (see also -% section~\ref{sec:floatsetup} about |\floatsetup| mechanism). +% The \env{floatrow} environment ({\sectionname}~\ref{sec:floatrow}) +% and commands of |\floatbox| stuff ({\sectionname}~\ref{sec:floatbox}) +% still work after |\RawFloats|' and |rawfloats=| settings +% (see example width figure~\ref{intro:leftfig:raw} +% and table~\ref{intro:righttab:raw})\label{FAD:MixedRow}%^^A +% +% \RestoreSpaces +% \subsection{Usage of Footnotes Inside Float Environment} +% \label{sec:floatfootnote} +% +% Sometimes table +% or figure contents have material, which authors mark +% and then write some explanation like footnotes. Current package has +% mechanism which allows to put footnotes inside float environment, in +% the same way as is in \env{minipage} environment. +% +% In the case of few elements have the same footnote, we cannot +% use standard |\footnotemark|---|\footnotetext| combination, because +% of |\footnotemark| in standard \LaTeX\ always creates the sign of main text footnote. +% For these cases current package offers |\mpfootnotemark|%^^A +% \FRmpar{Footnotemark \\inside float}{FAD:FnoteInsideFloat} +% macro instead of |\footnotemark|%^^A% +% \footnote{The same macro also is defined in \package{footmisc} package, +% version 4.10, dated 2003/01/20.}. +% \begin{Quote}\openup-.35pt% +% \meta{preamble} +% |\floatsetup{...,|\hyperref[setup:footnoterule]{\texttt{footnoterule}}|=limited,|%^^A +% \hyperref[setup:footskip]{\texttt{footskip}}|=\skip\footins,...}| +% \meta{preamble} +% |\begin{table}| +% |\ttabbox| +% | {\caption{...}\label{...}}%| +% \verb+ {\begin{tabular}{...}+ +% | \hline| +% | First row & \phantom01 & 2\mpfootnotemark[1] \\| +% | Second row & \phantom06\mpfootnotemark[1] & 4\mpfootnotemark[1] \\| +% | ...| +% | \hline| +% | \end{tabular}%| +% | \footnotetext[1]{Even numbers.}}| +% |\end{table}| +% \end{Quote}% +% \DeleteShortVerb{\|}% +% \begin{table}[H]\floatsetup{footnoterule=limited,footskip=\skip\footins} +% \ttabbox +% {\caption{Table with footnote}%^^A +% \label{tab:floatfnote}}%^^A +% {\extrarowheight1pt +% \begin{tabular}{|l|c|c|} +% \hline +% \thead{Column head} & \thead{Data I} & \thead{Data II} \\ +% \hline +% First row & \phantom01 & 2\mpfootnotemark[1] \\ +% Second row & \phantom06\mpfootnotemark[1] & 4\mpfootnotemark[1] \\ +% Third row & 28\mpfootnotemark[1] & 8\mpfootnotemark[1] \\ +% \hline +% \end{tabular}%^^A +% \footnotetext[1]{Even numbers.}} +% \end{table}% +% \MakeShortVerb{\|}% +% +% The |\floatbox| macro uses special own definition of footnote rule +% (the \hyperref[setup:footnoterule]{\texttt{footnoterule}}|=| key) and skip before footnotes and +% explications or legends (\hyperref[setup:footskip]{\texttt{footskip}}|=|). (See also +% page~\pageref{sec:footnotestyle} for variants of footnote rule.) +% +% \RestoreSpaces +% \subsubsection{The Legend-Like Macro}\label{subsec:floatfoot} +% +% In the case of table or figure have some additional explanations +% which could not put in caption contents and they are definitely not +% a footnote you may use |\floatfoot|\label{FAD:Legend} +% command. The |\floatfoot| is +% build by usage of |\caption| stuff and uses caption's text justification, +% but star form (|\floatfoot*|) prints its contents as plain unindented +% paragraph (see table~\ref{tab:floatfoot}). +% +% For defining of explication font use \hyperref[setup:footfont]{\texttt{footfont=}} option +% (page~\pageref{setup:footfont}) in |\floatsetup|. You may try to +% define special settings for float foot using +% \cmd{\captionsetup[floatfoot]}. +%\begin{Quote} +%|\begin{table}| +%|\ttabbox| +%| {\caption{...}\label{...}}| +% \verb+ {\begin{tabular}{...}+ +%| ...| +%| \end{tabular}%| +%| \floatfoot*{`Data I' column ...}}| +%|\end{table}| +%\end{Quote} +% \DeleteShortVerb{\|}% +% \begin{table}[H] +% \ttabbox +% {\caption[Table with foot material (e.g. legend)]{Table with foot material}%^^A +% \label{tab:floatfoot}}%^^A +% {\extrarowheight1pt%^^A\tabcolsep2\tabcolsep +% \begin{tabular}{|l|c|c|} +% \hline +% \thead{Column head} & \thead{Data I} & \thead{Data II} \\ +% \hline +% First row & \phantom01 & 2 \\ +% Second row & \phantom06 & 4 \\ +% Third row & 28 & 8 \\ +% \hline +% \end{tabular}%^^A +% \floatfoot*{`Data I' column---numbers which equal to sum of all +% their divisors; `Data II' column---$2^n$ values}} +% \end{table}% +% \MakeShortVerb{\|}% +% +% \emph{Notes.} 1)\enskip The \package{float} package defines additional +% optional argument after main caption text, possibly for explications. +% Since this possibility +% didn't declared in user part of documentation the current version of +% \package{caption} (3.0 and later), and also \package{float\-row} package, +% doesn't support this possibility. You may use |\floatfoot| and +% |\footnote|/\allowbreak|\footnotemark|/\allowbreak|\footnotetext| stuffs instead. +% +% 2)\enskip If you use both commands |\floatfoot| and |\footnote| +% inside one float box, the |\floatfoot| appears above |\footnote| +% contents. +% +% 3)\enskip Foot material (footnotes and text in floatfoot) can be placed +% in several variants: at the very bottom of float box, below caption +% (even if caption is above float object). See page \pageref{setup:footposition} +% and sample file \file{frsample01.tex}. In case of caption beside +% float object, footnotes and foot text always placed below caption. +% +% +% \RestoreSpaces +% \subsection{Fine Tuning of Vertical Spaces of Float} +% \label{sec:FBabskips} +% +% At the final variant of document you may need to correct vertical +% spaces between float and main text, between float object and +% caption. +% +% To change space between float box and main text there you may use +% two simple commands |\FBaskip| and |\FBbskip|. For example define +% \begin{verse} +% |\renewcommand\FBaskip{-4pt}| +% \end{verse} +% to move up float box up (or reduce space above) by 4pt. In current +% document the |\FBaskip| command was necessary for moving up +% some of wrapped figures.\nopagebreak +% +% Use |\vspace| command for vertical space correction around float +% object\footnote{The plain float environment allows usage of +% \cmd{\vskip} command. But \cmd{\floatbox} stuff +% (\cmd{\floatbox} itself, \cmd{\ffigbox} etc.) in case +% of usage of the \cmd{\FBwidth} option, gets error message +% when \cmd{\vskip} appears.}. % -%^^A \begin{figure} -%^^A \caption{A figure caption}\label{Wrong:expect} -%^^A \centering \input{Mouse.picture} -%^^A \end{figure} +% \RestoreSpaces +% \subsection{Do not write that with \package{floatrow} package} +% +% The \package{floatrow} package creates some features or limitations +% of float building. If you'll write something like +%\begin{Quote} +%\meta{preamble} +%|\usepackage{floatrow}| +%\meta{preamble} +%|\begin{figure}| +%| \caption{A table caption...}| +%| \centering \begin{tabular}{cc} A & B \\ C & D \end{tabular}| +%|\end{figure}| +%\end{Quote} +% please do not expect that caption appears at the top of table. +% +% \begingroup\clearfloatsetup{table} +% \begin{table}[H] +% \caption{A table caption must be placed above, wrong expect}\label{Wrong:expect} +% \centering \begin{tabular}{cc} A & B \\ C & D \end{tabular} +% \end{table} +% \endgroup % +% If +% you want, e.g. to put table captions above its contents, you must +% write |\floatsetup[figure]{style=plaintop}| in the preamble +% (see also {\sectionname}~\ref{sec:floatsetup} about |\floatsetup| mechanism). % Another example. If you put beside floats by following way: -%\begin{verbatim} -%\begin{figure} +%\begin{Quote} +%\meta{preamble} +%|\usepackage{floatrow}| +%\meta{preamble} +%|\begin{figure}|\nopagebreak\parskip0pt +%|\begin{minipage}{0.5\textwidth}| +%| \centering ...| +%| \caption{A figure caption, disappeared, wrong expected row}| +%|\end{minipage}| +%|\begin{minipage}{0.5\textwidth}| +%| \captionof{table}{A table caption, wrong expected row}}| +%| \centering | +%| \begin{tabular}{cc}| +%| A & B \\ C & D | +%| \end{tabular}| +%|\end{minipage}|\nopagebreak +%|\end{figure}| +%\end{Quote} +% you also won't get expected result. +%\begin{figure}[H] %\begin{minipage}{0.5\textwidth} -%\centering \input{Mouse.picture} -%\caption{A figure caption} +%\centering \input{Horse.picture} +%\caption{A figure caption, disappeared, wrong expected row} %\end{minipage} %\begin{minipage}{0.5\textwidth} -%\captionof{table}{A table caption} +%\captionof{table}{A table caption, wrong expected row} %\centering \begin{tabular}{cc} A & B \\ C & D \end{tabular} %\end{minipage} %\end{figure} -%\end{verbatim} -% you also won't get expected result. Use \env{floatrow}, like in -% example with figures~\ref{intro:leftfig} and~\ref{intro:rightfig} -% to get correct result\footnote{See also the page~\pageref{mixrow} -% about mixed float rows}. +% Read back the {\sectionname}s~\ref{sec:mixrow} and~\ref{sec:rawfloats} and correct the error. % +% \clearpage % \section{Float Layout Settings}\label{sec:floatsetup} % -% The idea of \pkg{floatrow} package is to avoid a lot of repeated code -% inside document for creation of desired layout for floats (which also -% lowers readability of document), and make layout modification easier +% The idea of \package{floatrow} package is to avoid a lot of repeated code +% inside document for creation of desired layout for floats +% and make layout modification easier % if you ought to change book layout. In this case you could think only % about \emph{markup} of floats and their contents. % -% The easy modification of common layout of all float of for one type of -% float is possible because of the borrowed code from the \pkg{float} +% The easy modification of common layout of all float or for one type of +% float is possible because of the borrowed code from the \package{float} % package, which allows to modify layout of float boxes as a whole. % -% The common layout and its modification for captions and special +% The common layout and modification for captions and special % settings for -% each type of float supported by \pkg{caption} package, version~3.x. +% each type of float is supported by \package{caption} package, version~3.x. % -% The layout settings of \pkg{floatrow} package are built similarly -% to \pkg{caption} ones and use |\floatsetup|\footnote{Some key and +% The layout settings of \package{floatrow} package are built similarly +% to the settings from the \package{caption}~3.x package and use |\floatsetup|\footnote{Some key and % option names were changed from version 0.1d, the reason was % to arrange and make names more memorable, and, sometimes, reduction -% of their names (see section~\ref{sec:changed}).} mechanism which is -% analog to |\captionsetup| one\footnote{Look also at \pkg{caption} +% of their names (see {\sectionname}~\ref{sec:changed}).} mechanism which is +% analog to |\captionsetup| one\footnote{Look also at \package{caption} % documentation (version 3.0 and later)}. % % \DescribeMacro{\floatsetup} -% You may use layout settings stuff as \pkg{floatrow} option in -% |\usepackage| line. -% \begin{quote} -% |\usepackage[|\meta{options}|]{floatrow}| -% \end{quote} +% You may use layout settings stuff as \package{floatrow} option in +% the |\usepackage| line. +% \begin{Quote} +% |\usepackage[|\meta{options}|]{floatrow}|\quad. +% \end{Quote} % You may write -% \begin{quote} -% |\usepackage[style=boxed,font=small]{floatrow}| -% \end{quote} -% The same result you get with -% \begin{quote} -% |\floatsetup{style=boxed,font=small}| -% \end{quote} -% The lines above declare \texttt{boxed} style and |\small| font for +% \begin{Quote} +% |\usepackage[style=boxed,font=small]{floatrow}|\quad. +% \end{Quote} +% The same result you get with the |\floatsetup| command: +% \begin{Quote} +% |\floatsetup{style=boxed,font=small}|\quad. +% \end{Quote} +% The lines above declare the \texttt{boxed} style and the |\small| font for % float contents. These settings were loaded for \emph{all} float types. % % The |\floatsetup| command has following form: -% \begin{quote} -% |\floatsetup|\oarg{float type}\marg{options} -% \end{quote} +% \begin{Quote} +% |\floatsetup|\oarg{float type}\marg{options}\quad. +% \end{Quote} % -% For defining of a special style for float of one type use optional +% For defining of a special style for the floats of one type, you can use optional % argument with name of necessary float type. The following command -% \begin{quote} +% \begin{Quote} % |\floatsetup[table]{style=Plaintop}| -% \end{quote} -% sets a special float style for tables (captions are placed above -% float objects; in the case of beside floats inside \env{floatrow} -% environment captions aligned by top line)\footnote{The keys, -% used in special settings for float of one type, are always -% ``stronger'' than synonym keys in common setting. In other words, -% if you want after example above to redefine float style for all -% floats with \cmd{\floatsetup\{style={\normalfont \meta{option}}\}} -% you won't change tables---use -% \cmd{\floatsetup[table]}\allowbreak -% \texttt{\{style={\normalfont \meta{option}}\}} again.}. +% \end{Quote} +% sets a special float style for floating tables: captions are placed above +% float objects; in the case of floats are placed in one row, inside the \env{floatrow} +% environment, text of captions is aligned by the top lines.%^^A +% %^^A \footnote{The keys, +% %^^A used in special settings for float of one type, are always +% %^^A ``stronger'' than synonym keys in common setting. In other words, +% %^^A if you want after example above to redefine float style for all +% %^^A floats with \cmd{\floatsetup\{style={\normalfont \meta{option}}\}} +% %^^A you won't change tables---use +% %^^A \cmd{\floatsetup[table]}\allowbreak +% %^^A \texttt{\{style={\normalfont \meta{option}}\}} again.} % % There are also special options of |\floatsetup| for settings for floats % in different positioning: two-column floats (starred environment, like % \env{figure*}, you may also use, for example, for wide floats) rotated -% floats etc. The ``strength'' of options in the lists below decreases +% floats, wrapped floats. The ``strength'' of options in the lists below decreases % from previous item to next one (examples based on \env{figure} -% environment): +% environment)\footnote{In the case of the boolean key \texttt{rawfloats=} is switched to \texttt{true}, +% the options below for float layout are canceled.}: % \begin{itemize}\label{stsetorder}\itemsep0pt\parskip0pt -% \item Wide or two-column floats (e.g. \env{figure*}, +% \item +% Wide or two-column floats (e.g. \env{figure*}: % you may load special -% settings for starred environments even in one-column document): +% settings for starred environments even in one-column document; that could be different margins for +% floats, different alignment of captions): % \begin{itemize} -% \item |\floatsetup[widefigure]|---the ``strongest'' settings; +% \item +% |\floatsetup[widefigure]|\label{setup:widefigure}---the ``strongest'' settings; % if they absent, package uses settings from next item; -% \item |\floatsetup[widefloat]|---these settings ``stronger'' +% \item +% |\floatsetup[widefloat]|\label{setup:widefloat}---these settings ``stronger'' % than settings from next item (|\floatsetup[figure]|); % if they absent, package uses settings from next item; -% \item |\floatsetup[figure]|; +% \item +% |\floatsetup[figure]|; % if they absent, package uses settings from % optional argument in |\usepackage| line or |\floatsetup{...}| % command; if they absent---default package settings % (see page~\pageref{sec:default}); % \end{itemize} -% \item Wrapped floats (\env{wrapfigure}): -% \begin{itemize}\itemsep0pt\parskip.5\parskip -% \item |\floatsetup[wrapfigure]|; -% \item |\floatsetup[wrapfloat]|; +% \item +% Wrapped floats (\env{wrapfigure}, used width \package{wrapfig} package): +% \begin{itemize}%\itemsep0pt\parskip.5\parskip +% \item |\floatsetup[wrapfigure]|\label{setup:wrapfigure}; +% \item |\floatsetup[wrapfloat]|\label{setup:wrapfloat}; % \item |\floatsetup[figure]|; % \end{itemize} -% \item Rotated floats (in environments, like \env{sidewaysfigure}): -% \begin{itemize}\itemsep0pt\parskip.5\parskip -% \item |\floatsetup[rotfigure]|; -% \item |\floatsetup[rotfloat]|; +% \item +% Rotated floats (in environments, like \env{sidewaysfigure}, +% used width \package{rotating} package): +% \begin{itemize}%\itemsep0pt\parskip.5\parskip +% \item |\floatsetup[rotfigure]|\label{setup:rotfigure}; +% \item |\floatsetup[rotfloat]|\label{setup:rotfloat}; % \item |\floatsetup[figure]|; % \end{itemize} -% \item Wide rotated floats +% \item +% Wide or two-column rotated floats % (\env{sidewaysfigure*})\footnote{The settings % for wide float (\texttt{widefloat}, \texttt{widefigure}) % removed---use settings for \texttt{widerotfloat} % and---here---\texttt{widerotfigure}}: -% \begin{itemize}\itemsep0pt\parskip.5\parskip -% \item |\floatsetup[widerotfigure]|; -% \item |\floatsetup[widerotfloat]|; +% \begin{itemize}%\itemsep0pt\parskip.5\parskip +% \item |\floatsetup[widerotfigure]|\label{setup:widerotfigure}; +% \item |\floatsetup[widerotfloat]|\label{setup:widerotfloat}; % \item |\floatsetup[rotfigure]|; % \item |\floatsetup[rotfloat]|; % \item |\floatsetup[figure]|; % \end{itemize} -% \item Floats with beside captions: -% \begin{itemize}\itemsep0pt -% \item |\floatsetup[capbesidefigure]|; -% \item |\floatsetup[capbesidefloat]|; -% \item setting of outer environments from previous items: -% \env{sidewaysfigure*}, \env{sidewaysfigure}, and \env{figure*}. +% \item +% Floats with beside captions (please note, that settings in these options are limited, see below): +% \begin{itemize}%\itemsep0pt +% \item |\floatsetup[capbesidefigure]|\label{setup:capbesidefigure}; +% \item |\floatsetup[capbesidefloat]|\label{setup:capbesidefloat}; +% \item +% setting of outer environments from previous items: +% \env{sidewaysfigure*}, \env{sidewaysfigure}, \env{figure*} and \env{figure}. % \end{itemize} -% Please note, that usage of \texttt{style=} key (see beginning of next -% section) cancels settings for beside position of caption. % \end{itemize} % You can also create and change special settings for captions, using -% the same \meta{float~type} options in |\captionsetup| stuff. +% the same \meta{float~type} options in |\captionsetup| stuff.\nopagebreak % % The next few sections describe keys of |\floatsetup| macro. % -% \subsection{Floatsetup Keys}\label{sec:floatsetup} +% \subsection{Floatsetup Keys}\label{sec:floatkeys} % % \subsubsection{Float Style} % -% \DescribeMacro{style=} -% The \emph{float style} is specified by -% following way: -% \begin{quote} -% |style=|\meta{float style name}\quad , -% \end{quote} -% the \meta{float style name} you may take from +% \DescribeMacro{style}\label{setup:style}%^^A +% The \emph{float style} could include alignment of float contents, margins, boxes or lines, +% if necessary, and other options. +% The \emph{float style} is specified by following way: +% \par\RestoreSpaces +% \begin{Options}{style=float style name } +% \item[style=\rmfamily\mdseries\meta{float style name} ,] +% the name of the \meta{float style name} option you may take from % table~\ref{tab:floatlayouts}. +% \item[...] +% You may create your own options with \\|\DeclareFloatStyle| command, +% see page~\pageref{ssec:declstyle}. +% \end{Options} % +% As you may see in the table~\ref{tab:floatlayouts}, there are included all float styles +% which emulate co-named ones from the \package{float} package. % -% The caption's \texttt{ruled} style is the only one from \pkg{float} -% package, which was predefined in \pkg{caption} package. To use it, +% Please note, that usage of \texttt{style=} key for floats with beside captions, +% i.e.~using |\floatsetup| settings with options like, e.g., +% |[capbesidefigure]| or |[capbesidefloat]| +% cancels settings for beside position of caption. Usually the floats with beside captions +% can set different alignment of captions, so the radical changes for float layout +% with beside caption in current version could get wrong results (see +% {\sectionname}~\ref{page:killfloatstyle} how to solve this problem).\medskip +% +% The \package{caption} package uses its own settings and names for caption layout styles. +% The caption's \texttt{ruled} style is the only one from \package{float} +% package, which was predefined in \package{caption} package. To use it, % write -% \begin{quote} +% \begin{Quote} % |\captionsetup[figure]{style=ruled}|\quad . -% \end{quote} -% -% \begin{sidewaystable}%[p]% -% \extrarowheight1pt\tabcolsep.5\tabcolsep -% \newcommand\leftcell[2][16.5mm]{\extrarowheight0pt\def\arraystretch{.75} -% \hspace*{-\tabcolsep}\begin{tabular}[t]{>{\footnotesize -% \ttfamily\noindent -% \vphantom{\small()\mpfootnotemark[1]}}p{#1}}#2\end{tabular}% -% \hspace*{-\tabcolsep}\ignorespaces} -% \emptyfloatpage -% \begin{tabularx}\hsize{|@{}l@{}|@{}l@{}|X|} +% \end{Quote} +% +% \begingroup\vfill +% \jot3pt\tabcolsep1.5\tabcolsep +% \newlengthtocommand\settowidth\Icolumn{\small\texttt{wshadowboxx}} +% \newlengthtocommand\settowidth\IIcolumn{\small\texttt{framestyle=wshadowbox}} +% \newlengthtocommand\setlength\IIIcolumn{\textwidth-\Icolumn-\IIcolumn +% -6\tabcolsep-1.6pt} +% \newcommand\leftcell[2][16.5mm]{%^^A% +% \hspace*{-\tabcolsep}\begin{tabular}[t]{>{% +% \noindent +% \vphantom{\small()\mpfootnotemark[1]}} +% p{\hsize}} +% #2\unskip\botstrut\end{tabular}\hspace*{-\tabcolsep}% +% } +% \begin{longtable}{|>{\extrarowheight0pt\def\arraystretch{.75}\ttfamily}p{\Icolumn} +% |>{\extrarowheight0pt\def\arraystretch{.75}\ttfamily}p{\IIcolumn} +% |>{\parindent1em\topstrut}p{\IIIcolumn}<{\botstrut}|} +% \caption{Float layout styles}\label{tab:floatlayouts}\\ % \hline % \hfil\thead{Style} & % \hfil\thead{\cmd{\floatsetup} keys} & % \hfil\thead{Description} \\ % \hline -% \multicolumn{3}{|c|}{Offered by \pkg{floatrow} package}\\ -% \hline \leftcell{\texttt{plain}{\mpfootnotemark[1]}} +% \endfirsthead +% \caption[]{Float layout styles \textmd{(\emph{Continued})}}\\ +% \hline +% \hfil\thead{Style} & +% \hfil\thead{\cmd{\floatsetup} keys} & +% \hfil\thead{Description} \\ +% \hline +% \endhead +% \caption[]{Float layout styles \textmd{(\emph{Finished})}}\\ +% \hline +% \hfil\thead{Style} & +% \hfil\thead{\cmd{\floatsetup} keys} & +% \hfil\thead{Description} \\ +% \hline +% \endlasthead +% \multicolumn{3}{r@{}}{\topstrut\emph{Continued on next page}} +% \endfoot +% \multicolumn{3}{r@{}}{\topstrut\emph{Finished on next page}} +% \endprelastfoot +% \endlastfoot +% \multicolumn{3}{|c|}{Offered by \package{floatrow} package\botstrut\topstrut}\\ +% \hline \leftcell{\texttt{plain}\label{setup:plain}{\mpfootnotemark[1]\mpfootnotemark[2]\mpfootnotemark[3]}} % & \leftcell{\meta{none}} -% &Standard \LaTeX's layout +% &The style \texttt{plain} is standard \LaTeX's layout. Put captions always below float object's contents. % \\\hline % \leftcell{\texttt{plaintop}{\mpfootnotemark[1]} -% \\\hline\texttt{Plaintop}{\mpfootnotemark[2]}} -% & \leftcell[50mm]{capposition=top\\\hline +% \botstrut\\ \hline\topstrut\texttt{Plaintop}} +% & \leftcell[50mm]{capposition=top\botstrut\\ \hline\topstrut % capposition=TOP} -% &The same as \texttt{plain} but puts caption at the top---analog of -% \pkg{float} package style. Capitalized form aligns captions above -% object by top line in \env{floatrow} environment -% \\\hline -% \leftcell{\texttt{ruled}{\mpfootnotemark[1]} -% \\ \\ \\\hline\texttt{Ruled}} -% & \leftcell[50mm]{capposition=top,precode=thickrule,\\ -% midcode=rule,postcode=lowrule,\\ -% heightadjust=all\\\hline -% style=ruled,capposition=TOP} -% &The first one emulates \pkg{float} package's co-named style. -% Capitalized form aligns captions above object by top line in -% \env{floatrow} environment +% &The style \texttt{plaintop} is the same as \texttt{plain} style, but puts captions above float object's contents---%^^A +% this style is analog of +% the co-named style from the \package{float} package.\par Capitalized form, |Plaintop|, +% aligns captions of the floats, which were placed in the one row +% (in the \env{floatrow} environment), +% by top line (see example on the page~\pageref{tab:row:tabIII}) % \\\hline -% \leftcell{\texttt{boxed}\smash{\mpfootnotemark[1]\mpfootnotemark[2]} -% \\ \\ \\\hline\texttt{Boxed} -% \\\hline\texttt{BOXED}} -% & \leftcell[50mm]{captionskip=2pt,framestyle=fbox,\\ -% heightadjust=object,\\framearound=object\\\hline -% style=boxed,framefit=yes\\\hline -% framestyle=fbox,framefit=yes,\\ -% heightadjust=all,framearound=all} -% &The first one emulates \pkg{float} package's style: -% object's width equals to \cmd{\hsize} or -% predefined width of float box; frame climbs out to the right and -% left sides. In capitalized form frame fits the -% \cmd{\hsize} or predefined width; width of -% object reduced to fit inside frame. Uppercase form -% draws frame which fits to current \cmd{\hsize} or predefined width, -% but around full float: caption, object and foot material. +% \leftcell{\texttt{ruled}\label{setup:ruled}{\mpfootnotemark[1]\mpfootnotemark[3]} +% \\ \\ \\ \\ \botstrut\\ \hline\topstrut\texttt{Ruled}\smash{\mpfootnotemark[2]}} +% & \leftcell[50mm]{capposition=top,\\ precode=thickrule,\\ +% midcode=rule,\\ postcode=lowrule,\\ +% heightadjust=all\botstrut\\ \hline\topstrut +% style=ruled,\\ capposition=TOP} +% &The first style, \texttt{ruled}, emulates co-named style from the \package{float} package. +% It places thick rule +% above float box, and thin rules between caption and object and below float. Rules are separated +% from contents by small 2pt skip.\par +% Capitalized form, |Ruled|, aligns captions of the floats, which were placed +% in the one row (in the \env{floatrow} environment), +% by top line (see example on the page~\pageref{example:ruledcapposTOP}) % \\\hline -% \multicolumn{3}{|c|}{Offered by \pkg{fr-fancy} package. -% They also need \pkg{fancybox} package.}\\ -% \hline \leftcell{\texttt{shadowbox}\smash{\mpfootnotemark[2]} -% \\\hline\texttt{Shadowbox} -% \\\hline\texttt{SHADOWBOX}} -% & \leftcell[50mm]{style=boxed,framestyle=shadowbox\\ \hline -% style=Boxed,framestyle=shadowbox\\ \hline -% style=BOXED,framestyle=shadowbox} +% \leftcell{\texttt{boxed}\smash{\mpfootnotemark[1]\mpfootnotemark[2]\mpfootnotemark[3]\mpfootnotemark[4]} +% \\ \\ \\ \botstrut\\ \hline\topstrut\texttt{Boxed}\label{setup:Boxed}\smash{\mpfootnotemark[2]\mpfootnotemark[3]} +% \\ \botstrut\\ \hline\topstrut\texttt{BOXED}\smash{\mpfootnotemark[2]}\mpfootnotemark[3]} +% & \leftcell[50mm]{captionskip=2pt,\\framestyle=fbox,\\ +% heightadjust=object,\\framearound=object\botstrut\\ \hline\topstrut +% style=boxed,\\ framefit=yes\botstrut\\ \hline\topstrut +% framestyle=fbox,\\ framefit=yes,\\ +% heightadjust=all,\\ framearound=all} +% &The first style, \texttt{boxed}, emulates (again) co-named style from the \package{float} package. +% The width of object equals to the |\textwidth|, predefined \cmd{\hsize}, or +% the width in |\floatbox|'s option; +% frame climbs out to the right and left sides (see example on the page~\pageref{fig:setup:boxed}). +% Frame separation and rule width equal to current \cmd{\fboxsep} and \cmd{\fboxrule} settings. (Default values +% are \texttt{3pt} and \texttt{.4pt} consequently.)\par +% In capitalized form, |Boxed|, the frame around object fits the +% \cmd{\textwidth}, predefined \cmd{\hsize}, or the width in |\floatbox|'s option; the width of object +% is reduced to fit inside frame (see example on the page~\pageref{fig:plain:MyBoxed}).\par +% Uppercase form, |BOXED|, +% draws frame which fits to current \cmd{\textwidth}, predefined \cmd{\hsize}, or the width in |\floatbox|'s option, +% but around all float elements: caption, object and foot material +% (see example on the page~\pageref{fig:wrapfig:WcatII}) +% \\ \hline +% \multicolumn{3}{|c|}{Offered by \package{fr-fancy} package. +% They also need \package{fancybox} package.\botstrut\topstrut}\\* +% \hline \leftcell{\texttt{shadowbox}\smash{\mpfootnotemark[4]} +% \\ \botstrut\\ \hline\topstrut\texttt{Shadowbox} +% \\ \botstrut\\ \hline\topstrut\texttt{SHADOWBOX}} +% & \leftcell[50mm]{style=boxed,\\framestyle=shadowbox\botstrut\\ \hline\topstrut +% style=Boxed,\\framestyle=shadowbox\botstrut\\ \hline\topstrut +% style=BOXED,\\framestyle=shadowbox} % &The same as \texttt{boxed}, \texttt{Boxed} and \texttt{BOXED} % consequently. The \cmd{\fbox} frame changed to \cmd{\shadowbox} -% from \pkg{fancybox} package. -% \\\hline -% \leftcell{\texttt{doublebox}\smash{\mpfootnotemark[2]} -% \\\hline\texttt{Doublebox}\\\hline\texttt{DOUBLEBOX}} -% & \leftcell[50mm]{style=boxed,framestyle=doublebox\\\hline -% style=Boxed,framestyle=doublebox\\\hline -% style=BOXED,framestyle=doublebox} +% from \package{fancybox} package (see example on the page~\pageref{fig:subfig:catsI}). +% Besides \cmd{\fboxsep} and \cmd{\fboxrule}, there is added parameter +% \cmd{\shadowsize}---the width of shadow, +% default is \texttt{4pt} +% \\ \hline +% \leftcell{\texttt{doublebox}\smash{\mpfootnotemark[4]} +% \\ \botstrut\\ \hline\topstrut\texttt{Doublebox}\\ +% \botstrut\\ \hline\topstrut\texttt{DOUBLEBOX}} +% & \leftcell[50mm]{style=boxed,\\ framestyle=doublebox\botstrut\\ \hline\topstrut +% style=Boxed,\\ framestyle=doublebox\botstrut\\ \hline\topstrut +% style=BOXED,\\ framestyle=doublebox} % &The same as \texttt{boxed}, \texttt{Boxed} and \texttt{BOXED} % consequently. The \cmd{\fbox} frame changed to \cmd{\doublebox} -% from \pkg{fancybox} package. -% \\\hline -% \multicolumn{3}{|c|}{Additional float style. It also needs -% \pkg{fancybox} package.}\\\hline -% \leftcell{\texttt{wshadowbox}\smash{\mpfootnotemark[2]} -% \\\hline\texttt{Wshadowbox} -% \\\hline\texttt{WSHADOWBOX}} -% & \leftcell[50mm]{style=boxed,framestyle=wshadowbox\\\hline -% style=Boxed,framestyle=wshadowbox\\\hline -% style=BOXED,framestyle=wshadowbox} +% from \package{fancybox} package. The frame shape control \cmd{\fboxrule} and \cmd{\fboxsep} parameters +% \\ \hline\noalign{\penalty-500} +% \multicolumn{3}{|c|}{Additional float styles. They also need +% \package{fancybox} package.\botstrut\topstrut}\\* \hline +% \leftcell{\texttt{wshadowbox}\smash{\mpfootnotemark[4]} +% \\ \botstrut\\ \hline\topstrut\texttt{Wshadowbox} +% \\ \botstrut\\ \hline\topstrut\texttt{WSHADOWBOX}} +% & \leftcell[50mm]{style=boxed,\\framestyle=wshadowbox\botstrut\\ \hline\topstrut +% style=Boxed,\\framestyle=wshadowbox\botstrut\\ \hline\topstrut +% style=BOXED,\\framestyle=wshadowbox} % &The same as \texttt{boxed}, \texttt{Boxed} and \texttt{BOXED} % consequently. The \cmd{\fbox} frame changed to \cmd{\wshadowbox}, % based on \cmd{\shadowbox} (but drops white shade from frame, or -% draws edges of ``second copy'') from \pkg{fancybox} package. +% draws edges of ``second copy'') from \package{fancybox} package +% (see example on the page~\pageref{fig:floatflt:WcatI}), you may use the same frame parameters like +% \texttt{shadowbox} style. % \\\hline -% \end{tabularx} -% -% \caption{Float layout styles}\label{tab:floatlayouts}% -% -% \floatfoot{When there is set float style with frame around object of -% fitted to the text width (like \texttt{Boxed}, etc.), and +% %^^A \multicolumn3{@{}p{\hsize}@{}} +% \noalign +% {\floatfoot*{When there is set float style with frame around object is +% fitted to the box width (like \texttt{Boxed}, etc.), and % \cmd{\floatbox} macro uses \cmd{\FBwidth} command as \meta{width} % option, which sets box width equal to float object's width (see % page~\pageref{sec:floatbox}), the width of all float other elements -% in this case enlarged to get width of framed object.} +% in this case enlarged to get width of framed object.\vspace{-3pt}\par +% \rule{1in}{.4pt}\vspace{2pt}\parindent15pt +% +% \mpfootnotemark[1]{The styles co-named and analogous to \package{float} package style.} % -% \footnotetext[1]{The styles analogous to \pkg{float} package style.} -% \footnotetext[2]{During usage of these styles in +% \mpfootnotemark[2]{This style used in the sample file \file{frsmaple01.tex}} +% +% \mpfootnotemark[3]{This style used in the sample file \file{frsmaple02.tex}} +% +% \mpfootnotemark[4]{During usage of these styles in % \env{floatrow} environment you ought to enlarge -% space between floats, using key \texttt{floatrowsep}).} -% \end{sidewaystable} -% \label{setup:start} +% space between floats, using key \texttt{floatrowsep}.} +% }} +% \end{longtable} +% +% +% \endgroup +% +% +% +% \RestoreSpaces % %^^A\pagebreak[4] % -% \subsubsection{Font settings} +% \subsubsection{Font settings}\label{setup:start} % -% \DescribeMacro{font=} +% \DescribeMacro{font}\label{setup:font}%^^A % Defines font for float object contents. Option -% analogous to |font| key in |\captionsetup| stuff.\nopagebreak +% analogous to |font=| key in |\captionsetup| stuff.\nopagebreak % % Available font setting options: % % \begin{Options}{\OptionLabel} -% \item[scriptsize] {\scriptsize Very small size} -% \item[footnotesize] {\footnotesize The size usually used for footnotes} +% \item[scriptsize] {\scriptsize Very small size}\allowitembreaks[-4] +% \item[footnotesize] {\footnotesize The size usually used for footnotes}\allowitembreaks % \item[small] {\small Small size} % \item[normalsize] {\normalsize Normal size} % \item[large] {\large Large size} @@ -688,62 +1831,77 @@ % \item[up] {\upshape Upright shape} % \item[it] {\itshape Italic shape} % \item[sl] {\slshape Slanted shape} -% \item[sc] {\scshape Small Caps shape} +% \item[sc] {\scshape Small Caps shape}\pagebreak[2] % -% \item[md] {\mdseries Medium series} -% \item[bf] {\bfseries Bold series} +% \item[md] {\mdseries Medium series}\pagebreak[2] +% \item[bf] {\bfseries Bold series}\pagebreak[2] % % \item[rm] {\rmfamily Roman family} % \item[sf] {\sffamily Sans Serif family} % \item[tt] {\ttfamily Typewriter family} +% \item[...] +% You may create your own options with |\DeclareFloatFont| command, +% see page~\pageref{ssec:declfont}. % \end{Options} % % You may set font for float object like -% \begin{quote} +% \begin{Quote} % |font=small| -% \end{quote} -% or -% \begin{quote} +% \end{Quote} +% this option is used in current documentation, or +% \begin{Quote} % |font={small,sf}|\quad . -% \end{quote} +% \end{Quote} % -% \DescribeMacro{footfont=}\label{sec:setfloatfoot}%^^A -% Defines font for legends or explications. This macro +% \addvspace\medskipamount\noindent +% \DescribeMacro{footfont}\label{setup:footfont}%^^A +% Defines font for legends or explications (defined by |\floatfoot| command, +% see~\textsl{\sectionname}~\ref{subsec:floatfoot}). This macro % uses |\captionsetup| mechanism (because |\floatfoot| macro -% uses \pkg{caption} mechanism). By default the font size +% uses \package{caption} mechanism). By default the font size % of float foot text equals to footnote text: |footfont=footnotesize|. % +% \RestoreSpaces % \subsubsection{Position of Caption and of Other Elements} % -% \DescribeMacro{capposition=} +% \DescribeMacro{capposition}\label{setup:capposition}%^^A % Defines position of captions. It is similar to \texttt{position=} -% key in \pkg{caption} package, but it has two additional +% key in \package{caption} package, but it has two additional % options\footnote{The option \texttt{auto} isn't used by -% \texttt{capposition=}.}: \texttt{TOP}, if you prefer to align captions +% \texttt{capposition=}.}: \texttt{TOP}%^^A +% \FRmpar{Caption above\\ table object}{FAD:CaptionAboveTableII}, if you prefer to align captions % above objects, in the case of beside floats (in \env{floatrow} % environment), by the top line; and \texttt{beside} to put caption % beside object (this option could be more preferable in settings % for one environment, see about |\thisfloatsetup| on the % page~\pageref{thisfloatsetup}): +% \par\RestoreSpaces % \begin{Options}{\OptionLabel} -% \item[top] caption above object (equals to |\captop| command); +% \item[top] caption above object; % \item[TOP] caption above object and also aligned by top line in float -% row (equals to |\CAPTOP| command). +% row. % For example the \texttt{Plaintop} style is the variant of % \texttt{plaintop} where used |capposition=TOP| settings, -% see tables~\ref{tab:row:tabIII}--\ref{tab:row:tabIV}; -% \item[bottom] caption below object (equals to |\capbot| command); -% \item[beside] caption beside object (equals to |\capbeside| command). +% see tables~\ref{tab:row:tabIII:CAPTOP}--\ref{tab:row:tabIV:CAPTOP}; +% \item[bottom] caption below object; +% \item[beside] caption beside object.%^^A +%^^A% \FRmpar{Beside caption and float object}{FAD:BesideCaptionII} % \end{Options} % +% Compare two examples: +% \begin{Quote} +% |\floatsetup[table]{|\hyperref[setup:style]{\texttt{style}}%^^A +% |=plain,capposition=top}%|${}\equiv\texttt{style=plaintop}$ +% \end{Quote} % \DeleteShortVerb{\|}% -% \begin{table}[h] -% \begin{floatrow} +% \begingroup +% \floatsetup[table]{style=plain,capposition=top} +% \begin{table}[H] +% \begin{floatrow}\tabcolsep2\tabcolsep % \extrarowheight1pt % \ttabbox -% {\caption[Beside table~I long header]%^^A -% {Beside table~I with long long long top aligned caption}%^^A -% \label{tab:row:tabIII}}%^^A +% {\caption[Long caption of table~I with key \texttt{capposition=top}]%^^A +% {The table~I in the row with long, long, long, long, long, long caption}\label{tab:row:tabIII:captop}}%^^A % {\begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|} % \hline % \multirowthead{2}[-1ex]{Left Column Head} @@ -760,12 +1918,62 @@ % \end{tabular}} % % \ttabbox -% {\caption{Beside table~II with top aligned -% caption}\label{tab:row:tabIV}}%^^A +% {\caption[Table~II in the row with caption with key \texttt{capposition=top}]%^^A +% {Table~II in the row with caption}\label{tab:row:tabIV:captop}}%^^A % {\begin{tabular}{|l|c|c|c|} % \hline % \multirowthead{2}[-1ex]{Column Head} -% & \multicolumn{3}{c|}{\thead{Data}} \\ +% & \multicolumn{3}{c|}{Data} \\ +% \cline{2-4} +% & \thead{I} & \thead{II} & \thead{III} \\ +% \hline +% First row & 1 & 2 & \phantom01 \\ +% Second row & 3 & 4 & \phantom06 \\ +% Third row & 6 & 8 & 28 \\ +% \hline +% \end{tabular}} +% \end{floatrow} +% \end{table} +% \endgroup +% \MakeShortVerb{\|}% +% +% \begin{Quote} +% |\floatsetup[table]{|\hyperref[setup:style]{\texttt{style}}%^^A +% |=plain,capposition=TOP}%|${}\equiv\texttt{style=Plaintop}$ +% \end{Quote} +% \DeleteShortVerb{\|}% +% \begingroup +% \floatsetup[table]{style=plain,capposition=TOP} +% \begin{table}[H] +% \begin{floatrow}\tabcolsep2\tabcolsep +% \extrarowheight1pt +% \ttabbox +% {\caption[Long top-aligned caption of table~I key \texttt{capposition=TOP}]%^^A +% {The table~I in the row with long, long, long, long, long, long caption, +% aligned by the top line}\label{tab:row:tabIII:CAPTOP}}%^^A +% {\begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|} +% \hline +% \multirowthead{2}[-1ex]{Left Column Head} +% & \multicolumn{2}{c|}{\thead{Data}} \\ +% \cline{2-3} +% & \multicolumn{1}{c|}{\thead{I}} +% & \multicolumn{1}{c|}{\thead{II}} +% \\\hline +% First row & 1 & 2 \\ +% Second row & 3 & 4 \\ +% Third row & 6 & 8 \\ +% Fourth row & \llap{1}0 & \llap{1}6 \\ +% \hline +% \end{tabular}} +% +% \ttabbox +% {\caption[Table~II in the row with caption, aligned +% at the top line with key \texttt{capposition=TOP}]{Table~II in the row with caption, aligned +% at the top line}\label{tab:row:tabIV:CAPTOP}}%^^A +% {\begin{tabular}{|l|c|c|c|} +% \hline +% \multirowthead{2}[-1ex]{Column Head} +% & \multicolumn{3}{c|}{Data} \\ % \cline{2-4} % & \thead{I} & \thead{II} & \thead{III} \\ % \hline @@ -776,16 +1984,19 @@ % \end{tabular}} % \end{floatrow} % \end{table} +% \endgroup % \MakeShortVerb{\|}% % % \emph{Note}. The option \texttt{TOP} uses |\label|---|\ref| -% mechanism, so to get necessary result with it you must run \LaTeX{} +% mechanism, so, to get necessary result with it, you need to run \LaTeX{} % twice (when you make changes in contents which could change number -% of lines you get correct result also on the second run). +% of lines you get correct result also on the second run).\pagebreak[3] % -% \DescribeMacro{capbesideposition=} +% \medskip\noindent +% \DescribeMacro{capbesideposition}\label{setup:capbesideposition}%^^A % Defines position of beside captions: vertical and horizontal. % For horizontal position there are defined four options: +% \par\RestoreSpaces % \begin{Options}{\OptionLabel} % \item[left] % caption is printed to the left side of object; @@ -810,38 +2021,100 @@ % caption aligned to the center of float contents. % \end{Options} % You may define position of beside caption by following: -% \begin{quote} +% \begin{Quote} % |capbesideposition={top,outside}|\quad. -% \end{quote} +% \end{Quote} +% See examples in file \file{frsample02.tex} with all variants of +% position of captions beside float objects. % -% \noindent -% \DescribeMacro{capbesidewidth=} -% Defines width of beside caption (this option could be more preferable +% \medskip\noindent +% \DescribeMacro{capbesidewidth}\label{setup:capbesidewidth}%^^A +% Defines width of beside caption. This option could be more preferable % in settings for one environment, see about |\thisfloatsetup| on the -% page~\pageref{thisfloatsetup}). You may set: -% \begin{quote} +% page~\pageref{thisfloatsetup}. You may set: +% \begin{Quote} % |capbesidewidth=4cm|\quad. -% \end{quote} +% \end{Quote} % If you'll write \texttt{capbesidewidth=none} or -% \texttt{capbesidewidth=sidefill} (this is default key setting), the +% \texttt{capbesidewidth=sidefil} (this is default key setting), the % width of caption will be counted by usual way, accordingly % to float width (i.e. occupies the rest width of float box, see -% figure~\ref{fig:beside:mouse} on the page~\pageref{fig:beside:mouse}). +% figure~\ref{intro:beside:FBwidth} on the page~\pageref{intro:beside:FBwidth}). % -% \noindent -% \DescribeMacro{capbesideframe=} -% This boolean key declares whether beside caption stays near framed object +% \medskip\noindent +% \DescribeMacro{capbesideframe}\label{setup:capbesideframe}%^^A +% This boolean key declares whether the beside caption stays near the framed object % (\texttt{capbesideframe=yes}) in this case caption lines aligned by top % or bottom of frame; otherwise caption lines will be aligned with top or % bottom of framed object's \emph{contents} (\texttt{capbesideframe=no}). +% This key was switched on in the example on the page~\pageref{fig:subfig:catsI}. +% \newcommand\TEXTBOX[1][]{\par +% Here goes first line of text \text\par +% There goes second line of text#1\par +% Thence goes third line of text \text\par +% Hence goes fourth line of text} +% \def\text{{\mdseries And more text and some more text and a bit more text and +% a little more text and a little piece of text to fill space}} +%\begingroup +% \begin{Quote} +% \meta{preamble} +% |\floatsetup[figure]{|\hyperref[setup:style]{\texttt{style}}|=Boxed,|%^^A +% \hyperref[setup:frameset]{\texttt{frameset}}|={\fboxsep8pt},| +% | |\hyperref[setup:objectset]{\texttt{objectset}}|=justified,|%^^A +% |capbesideframe=no,capbesideposition={right,top}}| +% |\captionsetup[figure]{...,strut=no}| +% \meta{preamble} +% |\|\hyperref[setup:thisfloatsetup]{\texttt{thisfloatsetup}}%^^A +% |{|\hyperref[setup:capposition]{\texttt{capposition}}|=beside,| +% | |\hyperref[setup:floatwidth]{\texttt{floatwidth}}|=sidefil,|%^^A +% \hyperref[setup:capbesidewidth]{\texttt{capbesidewidth}}|=4cm}| +% |\begin{figure}| +% | ...| +% | \caption{...}\label{...}| +% |\end{figure}| +% \end{Quote}% +% \floatsetup[figure]{style=Boxed,frameset={\fboxsep8pt},capbesideframe=no,objectset=justified, +% capbesideposition={right,top},footnoterule=limited} +% \captionsetup[figure]{strut=no} +% \thisfloatsetup{capposition=beside,floatwidth=sidefil,capbesidewidth=4cm} +% \begin{figure}[H] +% {\TEXTBOX} +% {\caption{Caption beside framed object, (caption has width 4\,cm), aligned by top of object contents}%%^^A +% \label{capbesideframeI}}% +% \end{figure} +% \begin{Quote} +% \meta{preamble} +% |\floatsetup[figure]{...,capbesideframe=yes,...}| +% |...| +% \meta{preamble} +% |\|\hyperref[setup:thisfloatsetup]{\texttt{thisfloatsetup}}%^^A +% |{|\hyperref[setup:capposition]{\texttt{capposition}}|=beside,| +% | |\hyperref[setup:floatwidth]{\texttt{floatwidth}}|=9cm,|%^^A +% \hyperref[setup:capbesidewidth]{\texttt{capbesidewidth}}|=sidefil}| +% \end{Quote}% +% \floatsetup[figure]{capbesideframe=yes} +% \thisfloatsetup{capposition=beside,floatwidth=9cm,capbesidewidth=sidefil} +% \captionsetup{strut=no} +% \begin{figure}[H] +% {\TEXTBOX} +% {\caption{Caption beside framed object, (object has width 9cm), aligned by top of frame}% +% \label{row:text:I}}% +% \end{figure} +%\endgroup +% +% \emph{Floatrow note.} For examples above was also used |\captionsetup{strut=no}| sentence, +% which cancels struts at the beginning and end of caption (|\strut|: the rules with height +% and depth, which are set accordingly to current |\baselineskip|). % % \penalty-5000 +% \RestoreSpaces % \subsubsection{Defining Float Foot Position (Legends and Footnotes)}% % \label{sec:footposition} % -% \DescribeMacro{footposition=}\label{foot:pos}%^^A +% \DescribeMacro{footposition}\label{setup:footposition}%^^A % Defines position of |\footnote|'s and |\floatfoot|'s in float box % with above/below captions. +% \par\RestoreSpaces % \begin{Options}{\OptionLabel} % \item[default] % if caption above float object foot material is placed below float @@ -857,18 +2130,19 @@ % % \subsubsection{Defining Vertical Alignment}\label{sec:heightadjust} % -% \DescribeMacro{heightadjust=} +% \DescribeMacro{heightadjust}\label{setup:heightadjust}%^^A % Defines whether the common maximum height of objects -% or/and captions in \env{floatrow} will be used. It has +% or/and captions in the \env{floatrow} environment will be used. It has % following options +% \par\RestoreSpaces % \begin{Options}{\OptionLabel}\samepage % \item[all] % adjust both caption and object heights (e.g. for styles % \texttt{Ruled} and \texttt{BOXED}); % \item[caption] -% adjust caption heights (e.g. for styles \texttt{Plaintop}); +% adjust caption heights (e.g. for \texttt{Plaintop} style); % \item[object] -% adjust object heights (e.g. for styles \texttt{Boxed}); +% adjust object heights (e.g. for \texttt{Boxed} style); % \item[none] % nothing to be adjusted; % \item[nocaption] @@ -877,12 +2151,12 @@ % no adjusting for objects; % \end{Options} % You may define height adjustment even as followed: -% \begin{quote} +% \begin{Quote} % |heightadjust={caption,noobject}|\quad. -% \end{quote} +% \end{Quote} % -% \noindent -% \DescribeMacro{valign=} +% \addvspace\medskipamount\noindent +% \DescribeMacro{valign}\label{setup:valign}%^^A % Defines vertical alignment of % float objects in \env{floatrow} if |heightadjust=all| or % |heightadjust=object|, or |\floatbox| stuff uses \meta{height} @@ -890,7 +2164,8 @@ % The options of this key analogous to vertical % alignment option in \env{minipage} environment and |\parbox| % command. Default option is |c| (centered vertical alignment). -% \begin{Options}{\OptionLabel}\samepage +% \par\RestoreSpaces +% \begin{Options}{cc}\samepage % \item[t] % aligns objects by top line; % \item[c] @@ -901,102 +2176,196 @@ % stretches objects by full height (if it is possible). % \end{Options} % +% The settings |heightadjust=object,valign=c| were used +% in the example with figures \ref{intro:leftfig:valigned} +% and \ref{intro:rightfig:valigned}. (Please look at the width options of |\ffigbox| commands: +% you may set the widths in this way with \package{calc} package.) +%\begin{Quote}% +%\meta{preamble}\nopagebreak +%|\floatsetup{...,heightadjust=object,valign=c,...}|\nopagebreak +%\meta{preamble} +% |\begin{figure}| +% |\begin{floatrow}| +% | \ffigbox[\FBwidth+2cm]| +% | {...}| +% | {\caption{The left ...}\label{...}}%| +%| | +% | \ffigbox[\FBwidth+2cm]| +% | {\caption{The beside ...}\label{...}}| +% | {...}| +% |\end{floatrow}| +% |\end{figure}| +%\end{Quote}% +% \begin{figure}[h!]\floatsetup{heightadjust=object,valign=c}\killfloatstyle +% \begin{floatrow} +% \ffigbox[\FBwidth+2cm] +% {\input{BlackCat.picture}} +% {\caption{The left beside figure uses settings for vertical centering}% +% \label{intro:leftfig:valigned}}% +% +% \ffigbox[\FBwidth+2cm] +% {\caption{The beside figure at the right side uses settings for vertical centering}%^^A +% \label{intro:rightfig:valigned}} +% {\unitlength1.25\unitlength\input{Cat.picture}} +% \end{floatrow} +% \end{figure}%^^A +% % \subsubsection{Facing Layout} % -% \DescribeMacro{facing=} This key defines whether facing layout used +% \DescribeMacro{facing}\label{setup:facing}%^^A +% This key defines whether facing layout is used % for floats. This key works if |twoside| option switched on in -% document class. +% document class. The combination of settings |facing=yes,|\allowbreak +% |capbesideposition=inside| (see above) is used in current documentation. % +% The most popular usage of |facing| key is in the case, when beside captions are placed to the inner sides +% of pages. The figures~\ref{intro:beside} and~\ref{intro:beside:FBwidth} at beginning of the document +% illustrate these options---%^^A +% \texttt{facing=yes,\allowbreak capbesideposition=inside}. +% +% \RestoreSpaces % \subsubsection{Defining Float Margins and Object Settings} % \label{sec:set:box} % -% \DescribeMacro{margins=} +% \DescribeMacro{margins}\label{setup:margins}%^^A % Defines margins of alone float boxes with % captions above/below, of float boxes with beside captions, and of % \env{floatrow} environments. It has following three predefined % options: +% \par\RestoreSpaces % \begin{Options}{\OptionLabel} % \item[centering] % float box centered; % \item[raggedright] -% float flushed to the left; +% float box flushed to the left; % \item[raggedleft] -% float flushed to the right. -% \end{Options} -% You may create your own alignment settings, see +% float box flushed to the right. +% \item[...] +% You may create your own alignment settings with \\|\DeclareMarginSet| command, see % page~\pageref{ssec:decl:marg}. +% \end{Options} % % \noindent -% \DescribeMacro{objectset=}\DescribeMacro{justification=} +% \DescribeMacro{objectset}\DescribeMacro{justification}\label{setup:objectset}%^^A % Defines justification of float object % (float contents). Predefined options are similar to % \texttt{justification=} key in |\captionsetup|. -% \begin{Options}{\OptionLabel} +% \par\RestoreSpaces +% \begin{Options}{RaggedRigh} % \item[justified] -% Typesets the object text as a normal paragraph. (This is the default.) +% Blocks (in the case of a~picture or text box) +% moved to the left, the text aligned as a normal paragraph (without indentation). (This is the default.) % % \item[centering] -% Each line of the object text will be centered. +% Blocks centered, each line of the object text will be centered. % % \item[raggedright] -% Each line of the object text will be moved to the left margin. +% Blocks moved to the left, each line of the text shoved to the left margin. % % \item[RaggedRight] -% Each line of the object text will be moved to the left margin, too. -% But this time the command |\RaggedRight| of the \pkg{ragged2e} package +% As in previous item, each line of the text shoved to the +% left margin, too. +% But this time the command |\RaggedRight| of the \package{ragged2e} package % will be used to achieve this. This difference is that this time -% the word breaking algorithm of \TeX\ will work inside the object text. +% the word breaking algorithm of \TeX\ will work inside the text. % % \item[raggedleft] -% Each line of the object text will be moved to the right margin. +% Blocks moved to the right, +% each line of the text shoved to the right margin. % % \item[RaggedLeft] % Analogous to |RaggedRight|. % +% \item[...] +% You may also create your own settings with |\DeclareObjectSet| command (see +% page~\pageref{ssec:decl:oset}) % \end{Options} -% You may also create your own settings (see -% page~\pageref{ssec:decl:rule}) +% +% \RestoreSpaces +% \subsubsection{Defining Width of Object}\label{sec:wd:object} % % \noindent -% \DescribeMacro{floatwidth=} -% You may use this key for redefinition of width of floats below. -% You may use -% \begin{quote} -% |floatwidth=.6\hsize| -% \end{quote} +% \DescribeMacro{floatwidth}\label{setup:floatwidth}%^^A +% It is used for redefinition of width of objects. +% This key, similar to |captionwidth=|, page~\pageref{setup:capbesidewidth}, +% could be used at first +% for settings of one float environment: +% \begin{Quote} +% |floatwidth=.3\hsize| +% \end{Quote} % or -% \begin{quote} +% \begin{Quote} % |floatwidth=7cm| -% \end{quote} -% This key could be useful in settings for one float -% environment (see about |\thisfloatsetup| on the page -% \pageref{thisfloatsetup}). +% \end{Quote} +% (see page~\pageref{thisfloatsetup} about settings for current float environment and |\thisfloatsetup|).\pagebreak[1] +% +% \begingroup +% \begin{Quote}\openup-.65pt +% \meta{preamble}\nopagebreak +% |\floatsetup[figure]{|\hyperref[setup:capposition]{\texttt{capposition}}|=bottom}|\nopagebreak +% \meta{preamble} +% |\|\hyperref[setup:thisfloatsetup]{\texttt{thisfloatsetup}}%^^A +% |[figure]{floatwidth=.3\hsize,capposition=bottom}|\nopagebreak +% |\begin{figure}| +% | \includegraphics[width=\hsize]{Bear}| +% | \caption{...}\label{...}| +% |\end{figure}| +% \end{Quote}% +% +% \floatsetup[figure]{capposition=bottom} +% \thisfloatsetup{floatwidth=.3\hsize} +% \begin{figure}[H] +% \setlength\unitlength{\hsize/100}\input{Bear.picture}%^^A +% \caption{Graphics with \texttt{floatwidth=0.3}\cmd{\hsize}}% +% \label{fig:rot} +% \end{figure}% +% \endgroup +% +% \begingroup +% \begin{Quote}% +% |\|\hyperref[setup:thisfloatsetup]{\texttt{thisfloatsetup}}%^^A +% |{floatwidth=.3\hsize,|\hyperref[setup:capbesidewidth]{\texttt{capbesidewidth}}|=sidefil,| +% | capposition=beside}| +% \end{Quote}% +% +% \thisfloatsetup{floatwidth=.3\hsize,capbesidewidth=sidefil, +% capposition=beside} +% \begin{figure}[H] +% \setlength\unitlength{\hsize/100}\input{Bear.picture}%^^A +% \caption{Caption beside graphics with \texttt{floatwidth=0.3}\cmd{\hsize}}%^^A +% \label{fig:bear} +% \end{figure}% +% \endgroup % -% If you use option \texttt{floatwidth=sidefill} for objects with beside -% captions (in the case of key \texttt{capbesidewidth=} uses absolute -% value, like \texttt{4cm}) the object (instead of caption) occupies the -% rest space of float box (see appendix, figure~\ref{fig:capbeside:trick} -% on the page~\pageref{fig:capbeside:trick}) +% If you use option \texttt{floatwidth=sidefil} for objects with beside +% captions (in the case of key \texttt{capbesidewidth=}, +% \DescribeMacro{capbesidewidth}%^^A +% uses absolute +% value, like \texttt{capbesidewidth=4cm}) the object contents (instead of caption) +% occupy the rest space of float box (see +% figure~\ref{capbesideframeI} on the page~\pageref{capbesideframeI} and appendix, figure~\ref{fig:capbeside:trick} on the +% page~\pageref{fig:capbeside:trick}) % +% \RestoreSpaces % \subsubsection{Defining Float Separators}\label{sec:set:sep} % % \noindent -% \DescribeMacro{floatrowsep=} -% Sets separation material between beside float boxes (defined -% by |\floatbox| macro etc., see page~\pageref{sec:floatbox}) +% \DescribeMacro{floatrowsep}\label{setup:floatrowsep}%^^A +% Sets separation material between beside float boxes in one row % inside \env{floatrow} environment (see page~\pageref{sec:floatrow}). % -% \noindent -% \DescribeMacro{capbesidesep=} +% \addvspace\smallskipamount\noindent +% \DescribeMacro{capbesidesep}\label{setup:capbesidesep}%^^A % Sets separation material between object and beside caption. % +% \RestoreSpaces % Both key settings work similarly to |labelsep=| key % from |\captionsetup|. -% +%^^A % They use following predefined options: % \begin{Options}{\OptionLabel} % \item[columnsep] -% horizontal skip${}={}$|\columnsep|; +% horizontal skip${}={}$|\columnsep| (default); % \item[quad] % horizontal skip${}={}1$\,em; % \item[qquad] @@ -1007,36 +2376,42 @@ % horizontal skip${}={}1$\,fill (like |\hfill|); % \item[none] % empty separator. +% \item[...] +% You may also create your own settings with\\ |\DeclareFloatSeparators| command (see +% page~\pageref{setup:DeclareFloatSeparators}) % \end{Options} +% This documentation uses settings |floatrowsep=qquad| for separation of +% beside floats and\allowbreak\ |capbesidesep=quad| +% for floats with beside captions. % % \subsubsection{Defining Float Rules/Skips}\label{sec:set:rule} % -% \DescribeMacro{precode=} +% \DescribeMacro{precode}\label{setup:precode}%^^A % Defines skip, rule or other analogous code above float box. % -% \noindent -% \DescribeMacro{rowprecode=} +% \addvspace\smallskipamount\noindent +% \DescribeMacro{rowprecode}\label{setup:rowprecode}%^^A % Defines skip, rule or other analogous code above alone float box, % or, in the case of beside floats inside \env{floatrow} environment, % above float row (see page~\pageref{fig:rotrow:WcatI}). % -% \noindent -% \DescribeMacro{midcode=} +% \addvspace\smallskipamount\noindent +% \DescribeMacro{midcode}\label{setup:midcode}%^^A % Defines skip, rule or other analogous code between % caption above/below and float object. % -% \noindent -% \DescribeMacro{postcode=} +% \addvspace\smallskipamount\noindent +% \DescribeMacro{postcode}\label{setup:postcode}%^^A % Defines skip, rule or other analogous code below float box. % -% \noindent -% \DescribeMacro{rowpostcode=} +% \addvspace\smallskipamount\noindent +% \DescribeMacro{rowpostcode}\label{setup:rowpostcode}%^^A % Defines skip, rule or other analogous code below alone float box, or, % in the case of beside floats inside \env{floatrow} environment, % below float row (see page~\pageref{fig:rotrow:WcatI}). % % For all these keys there are predefined following options (settings -% were taken from styles created in \pkg{float} package): +% were taken from styles created in \package{float} package): % \begin{Options}{\OptionLabel}\makeatletter\@itempenalty10000\makeatother % \item[none] % absent code; @@ -1050,37 +2425,50 @@ % rule of default thickness (.4pt), with 2pt vertical skip above---rule % below float box in \texttt{ruled} style; % \item[captionskip] -% vertical skip equal to value, defined in |captionskip=| key. +% vertical skip equal to value, defined in |captionskip=| key (default). +% \item[...] +% You may create your own options with |\DeclareFloatVCode| command, +% see page~\pageref{ssec:decl:rule}. % \end{Options} -% You may create your own options, see page~\pageref{ssec:decl:rule}. % % \subsubsection{Defining Float Frames} % -% \DescribeMacro{framestyle=} +% \DescribeMacro{framestyle}\label{setup:framestyle}%^^A % Defines type of frame; the -% \pkg{floatrow} package offers only one type of frame: +% \package{floatrow} package offers only one type of frame: +% \par\RestoreSpaces % \begin{Options}{\OptionLabel} % \item[fbox] % Standard frame. % \end{Options} -% There are options for additional frames, offered by \pkg{fr-fancy} +% There are options for additional frames, offered by \package{fr-fancy} % package, installed with \env{floatrow}: % \begin{Options}{\OptionLabel} % \item[colorbox] -% colored frame, needs also \pkg{color} package; +% colored frame, needs also \package{color} package; % if not defined, there is used |\fbox|; % \item[doublebox] -% double frame, needs also \pkg{fancybox} package; +% double frame, needs also \package{fancybox} package; % \item[shadowbox] -% frame with shadow, needs also \pkg{fancybox} package; +% frame with shadow, needs also \package{fancybox} package; % \item[wshadowbox] % modified \texttt{shadowbox} frame (frame with ``white shadow''), -% needs also \pkg{fancybox} package; +% needs also \package{fancybox} package; % \end{Options} % +% \enlargethispage{\baselineskip} +% \addvspace\medskipamount\noindent +% \DescribeMacro{frameset}\label{setup:frameset}%^^A +% The parameters for chosen frame; there are no options +% for this key, just write something like: +% \begin{Quote} +% |frameset={\fboxrule1pt\fboxsep12pt}|\quad. +% \end{Quote} +% % \noindent -% \DescribeMacro{framearound=} +% \DescribeMacro{framearound}\label{setup:framearound}%^^A % Declares element of float box to be framed: +% \par\RestoreSpaces % \begin{Options}{\OptionLabel} % \item[object] % float object contents; @@ -1088,78 +2476,108 @@ % full float box including object, caption, and any foot text. % \end{Options} % -% \noindent -% \DescribeMacro{framefit=} +% \addvspace\medskipamount\noindent +% \DescribeMacro{framefit}\label{setup:framefit}%^^A % Boolean which sets whether the \textit{frame width} will % be equal to current |\hsize| or predefined width of -% float box (\texttt{framefit=yes}), in this case object size reduced; +% float box (\texttt{framefit=yes}), in this case object size reduced +% (see~page~\pageref{fig:plain:MyBoxed} and all boxed figures in current +% documentation); % or the frame climbs out in the left and % right sides, and \textit{width of object} has current % |\hsize| or predefined width of float box (\texttt{framefit=no}). -% -% \noindent -% \DescribeMacro{frameset=} -% The parameters for chosen frame; there are no options -% for this key, just write something like: -% \begin{quote} -% |frameset={\fboxrule1pt\fboxsep12pt}|\quad. -% \end{quote} -% -% \noindent -% \DescribeMacro{colorframeset=} -% Offered by \pkg{fr-fancy} package\footnote{Use -% \texttt{fancyboxes=yes} option in \cmd{\usepackage} line.}: defines +% \begingroup +% \begin{Quote}% +% |\floatsetup[figure]{framestyle=fbox,|\hyperref[setup:heightadjust]{\texttt{heightadjust}}|=object,|\nopagebreak +% | framearound=object,frameset={\fboxrule1pt\fboxsep10pt},| +% | framefit=no}%|$\approx\texttt{style=boxed}$ +% |\begin{figure}| +% |\ffigbox[4cm]| +% | {...}{\caption{...}}| +% |\end{figure}| +% \end{Quote}% +% \floatsetup[figure]{framestyle=fbox,heightadjust=object, +% framearound=object,frameset={\fboxrule1pt\fboxsep10pt},framefit=no}%^^A$\equiv\texttt{style=boxed}$ +% \begin{figure}[H]% +% \ffigbox[4cm] +% {\input{Cat.picture}}{\caption{The frame around graphics climbs out to the right and left sides}\label{fig:setup:boxed}} +% \end{figure}% +% \begin{Quote}% +% |\floatsetup[figure]{...,framefit=yes}%|$\approx\texttt{style=Boxed}$ +% |\begin{figure}|% +% |\ffigbox[4cm]| +% | {...}{\caption{...}}|\nopagebreak +% |\end{figure}|% +% \end{Quote}% +% \floatsetup[figure]{framestyle=fbox,heightadjust=object, +% framearound=object,frameset={\fboxrule1pt\fboxsep10pt},framefit=yes}%%^^A$\equiv\texttt{style=Boxed}$ +% \begin{figure}[H]% +% \ffigbox[4cm] +% {\input{Cat.picture}}{\caption{The frame around graphics fits to the width of float box (here: caption)}} +% \end{figure}% +% \endgroup +% +% \addvspace\medskipamount\noindent +% \DescribeMacro{colorframeset}\label{setup:colorframeset}%^^A +% Offered by \package{fr-fancy} package\footnote{Use +% \texttt{fancyboxes=yes} option in \cmd{\usepackage} line, also you ought to load \package{color} package.} +% and also needs +% \package{color} package: defines % concrete color box (default is standard |\fbox|). -% In current version you may use only |\fcolorbox| as color box. You +% You may use |\fcolorbox| as color box. You % may define your color box like -% \begin{quote} +% \begin{Quote} % |colorframeset={\fcolorbox{white}{yellow}}|\quad. -% \end{quote} +% \end{Quote} % % \subsubsection{Defining Float Skips} % -% \DescribeMacro{captionskip=} +% \DescribeMacro{captionskip}\label{setup:captionskip}%^^A % Defines vertical space between caption and float object % in case of |midcode| key defined as |midcode=captionskip|; % or in case of usage of float styles (\texttt{style=} % key) \texttt{plain}, \texttt{plaintop} or \texttt{Plaintop}: -% \begin{quote} +% \begin{Quote} % |captionskip=10pt|\quad. -% \end{quote} +% \end{Quote} +% The settings above are default. +% The settings of current documentation: |captionskip=5pt|. % -% \noindent -% \DescribeMacro{footskip=} +% \addvspace\medskipamount\noindent +% \DescribeMacro{footskip}\label{setup:footskip}%^^A % Defines vertical space before foot material and footnotes. -% \begin{quote} +% \begin{Quote} % |footskip=4pt|\quad, -% \end{quote} +% \end{Quote} % or -% \begin{quote} +% \begin{Quote} % |footskip=\skip\footins|\quad. -% \end{quote} +% \end{Quote} % -% \penalty-5000 % \subsubsection{Defining Float Footnote Rule's Style} % \label{sec:footnotestyle} % -% \DescribeMacro{footnoterule=} +% \DescribeMacro{footnoterule}\label{setup:footnoterule}%^^A % Defines type of footnote rule for footnotes inside float environment. +% \par\RestoreSpaces % \begingroup -% \makeatletter\@beginparpenalty10000\makeatother % \begin{Options}{\OptionLabel} % \item[normal] % standard \LaTeX{} definition, used in \env{minipage} environments, the -% width of it equals to 0.4 of current with of text (|\columnwidth|); +% width of it equals to 0.4 of current width of text (|\columnwidth|); % \item[limited] % like previous one but max width of footnote rule equals to the value % defined by |\frulemax| command, like: -% \begin{quote} +% \begin{Quote} % |\newcommand\frulemax{1in}| -% \end{quote} +% \end{Quote} % \item[fullsize] % rule to full current text width. % \item[none] % Absent rule. +% \item[...] +% You may create your own options with |\DeclareFloatFootnoterule| command, +% see page~\pageref{ssec:fnoterule}. % \end{Options} % \endgroup % @@ -1168,13 +2586,30 @@ % %^^A ???needed? % \subsubsection{Loading Style for Fancy Boxes} % -% \DescribeMacro{fancyboxes=} -% This boolean key loads \pkg{fr-fancy} package. This key you may use +% \DescribeMacro{fancyboxes}\label{setup:fancyboxes}%^^A +% This boolean key loads \package{fr-fancy} package. This key you may use % only in optional argument in |\usepackage| line. % -% \subsection{Settings for One Float} +% \RestoreSpaces +% \subsubsection{Managing Floats with \texttt{[H]} placement option} +% +% \DescribeMacro{doublefloataswide}\label{setup:doublefloataswide}%^^A +% This boolean key redefines starred float in onecolumn layout +% like non-starred ones. (In this case the \texttt{[H]} option works +% in starred environments also; layout settings from |\floatsetup| +% as \texttt{widefloat} still work.) +% +% \medskip\noindent +% \DescribeMacro{floatHaslist}%^^A +% This boolean key adds values of penalties before and after +% this ``anchored'' float like in the list environment and cancels +% paragraph indentation, if no blank line appears after environment +% (see also section~\pageref{sec:listpen}). +% +% \RestoreSpaces +% \subsection{Settings for Current Float Environment} % -% \DescribeMacro{\thisfloatsetup}\label{thisfloatsetup}%^^A +% \DescribeMacro{\thisfloatsetup}\label{thisfloatsetup}\label{setup:thisfloatsetup}%^^A % You may define some settings only for one float just % before necessary environment. Command |\thisfloatsetup| could % contain the same keys and options as in |\floatsetup|. It has @@ -1190,25 +2625,48 @@ %^^A in |\floatsetup| stuff. % % -% \subsection{Clearing of Previous Float Type Settings} +% \RestoreSpaces +% \subsection{Clearing of Settings for Current Float Type} % -% \DescribeMacro{\clearfloatsetup} +% \DescribeMacro{\clearfloatsetup}\label{setup:clearfloatsetup}%^^A % If you want to get rid of parameters marked % for an automatic use within a particular environment -% you can use the command\footnote{See also documentation -% of \pkg{caption} package about \cmd{\clearcaptionsetup} command}: -% \begin{quote} -% |\clearfloatsetup|\marg{Typ}\quad. -% \end{quote} +% you can use the command\footnote{Created as additional macro for +% \cs{clearcaptionsetup} macro, see also documentation +% of \package{caption} package about \cmd{\clearcaptionsetup} command}: +% \begin{Quote} +% |\clearfloatsetup|\marg{float type}\quad. +% \end{Quote} +% where \marg{float type}---types as \texttt{figure}, \texttt{widefloat} etc. +% +% \subsection{Temporary Clearing of All Float Settings}\label{page:killfloatstyle} +% +% \DescribeMacro{\killfloatstyle}\label{setup:killfloatstyle}%^^A +% In some cases like mixed rows of floats where figure stays beside table +% you need to cancel layout of ``foreign'' float (see page~\pageref{mixrow}). +% The |\killfloatstyle| command is used before any +% command of |\floatbox| stuff (see {\sectionname}~\ref{sec:floatbox}). +% Other situation---layout with beside captions is quite different from other subtypes: +% |[figure]| option of +% floatsetup defined with \texttt{style=plain} and +% |[cabesidefigure]| defined with \texttt{style=boxed}. +% In this case you may define your command, based on predefined +% |\fcapside|: +% \begin{Quote} +% |\newcommand\myfcapside{\killfloatstyle| +% | \floatsetup[figure]{style=Boxed}\fcapside}|\quad. +% \end{Quote} +% The option |[figure]| is necessary if you defined settings for this option +% globally in the preamble. % % %^^A !!!for footnotes! % %^^A \newpage % % \subsection{The Default Float Type Settings}\label{sec:default} % -% The following keys and options are switched on when \pkg{floatrow} +% The following keys and options are switched on when \package{floatrow} % package loaded. They equal to \texttt{plain} style: -% \begin{Options}{\OptionLabel} +% \begin{Options}{\OptionLabel}\par\small\openup-.5pt % \item[font=normalsize] % \item[footfont=footnotesize] % \item[capposition=bottom] @@ -1218,7 +2676,7 @@ % \item[heightadjust=none] % \item[facing=no] % \item[margins=centering] -% \item[objectset=centering] %^^A($\equiv$\texttt{justification=centering}, \pkg{caption}) +% \item[objectset=centering] %^^A($\equiv$\texttt{justification=centering}, \package{caption}) % \item[floatrowsep=columnsep] % \item[capbesidesep=columnsep] % \item[precode=none] @@ -1230,29 +2688,29 @@ % \end{Options} % % -% \subsection{Defining new options} +% \subsection{Defining new options (Do it yourself!)} % -% In the next few sections goes a small list of commands, which -% define key options for |\floatsetup|. The examples of option -% definitions were taken mainly from \pkg{floatrow} definitions. +% In the next few sections goes a list of commands, which +% define key options for |\floatsetup|. % -% \subsubsection{Float Style} +% \subsubsection{Float Style option (\texttt{style=})}\label{ssec:declstyle} % -% \DescribeMacro{\DeclareFloatStyle} +% \DescribeMacro{\DeclareFloatStyle}\label{setup:DeclareFloatStyle}%^^A % Defines new float style. Example shows definition of new float % style \texttt{MyBoxed}. The figures~\ref{fig:plain:MyBoxed}, and % some others in current documentation show result. -%\begin{verbatim} -%\DeclareFloatStyle{MyBoxed}{style=Boxed,captionskip=5pt, -% frameset={\fboxrule1pt\fboxsep12pt}} -%\floatsetup[figure]{style=MyBoxed} -%\end{verbatim} +% \par\RestoreSpaces +%\begin{Quote} +%|\DeclareFloatStyle{MyBoxed}{|\hyperref[setup:style]{style}|=Boxed,|\hyperref[setup:captionskip]{captionskip}|=5pt,| +%| |\hyperref[setup:frameset]{frameset}|={\fboxrule1pt\fboxsep12pt}}| +%|\floatsetup[figure]{style=MyBoxed}| +%\end{Quote} % % \begingroup % % \floatsetup[figure]{style=MyBoxed} -% \begin{figure}[!t] -% {\input{BlackCat.picture}}% +% \begin{figure}[H] +% {\unitlength1.44\unitlength\input{Horse.picture}}% % \caption{%^^A % Plain figure in \texttt{MyBoxed} style}% % \label{fig:plain:MyBoxed}% @@ -1261,78 +2719,155 @@ % \end{figure} % % The same result you get with: -%\begin{verbatim} -%\floatsetup[figure]{style=Boxed,captionskip=5pt, -% frameset={\fboxsep12pt\fboxrule1pt}} -%\end{verbatim} +% \par\RestoreSpaces +%\begin{Quote} +%|\floatsetup[figure]{style=Boxed,captionskip=5pt,| +%| frameset={\fboxsep12pt\fboxrule1pt}}| +%\end{Quote} % \endgroup % -% \subsubsection{Defining Float Rules/Skips}\label{ssec:decl:rule} +% \subsubsection{Option for Float Rules/Skips (\texttt{precode=} etc.)} +% \label{ssec:decl:rule} % -% \DescribeMacro{\DeclareFloatVCode} +% \DescribeMacro{\DeclareFloatVCode}\label{setup:DeclareFloatVCode}%^^A % This command defines the skip, rule or other analogous code above % and below full float box and between caption above/below and % object. The defined option you may use in \texttt{rowprecode}, % \texttt{precode}, \texttt{midcode}, \texttt{postcode}, and % \texttt{rowpostcode} keys. -% \begin{quote} -% |\DeclareFloatVCode{thickrule}{\hrule height.8ptdepth0pt%|\\ -% \strut\qquad|\kern2pt}| -% \end{quote} +% \begin{Quote}\openup.5pt +% \meta{preamble} +% |\DeclareFloatVCode{grayruleabove}%| +% | {{\color{gray}\hrule height2.8ptdepth0pt\vskip4pt}}| +% |\DeclareFloatVCode{grayrulebelow}%| +% | {{\color{gray}\vskip4pt\hrule height2.8ptdepth0pt}}| +% |\floatsetup{...,| +% | |\hyperref[setup:rowprecode]{rowprecode}|=grayruleabove,|%^^A +% \hyperref[setup:rowpostcode]{rowpostcode}|=grayrulebelow}| +% \meta{preamble} +% |\begin{figure}| +% |\begin{floatrow}| +% | \ffigbox| +% | {...}{\caption{The left ...}\label{...}}%| +%| | +% | \ffigbox|\nopagebreak +% | {...}{\caption{The beside ...}\label{...}}| +% | \end{floatrow}|\nopagebreak +% |\end{figure}| +%| | +%| | +% |\begin{figure}| +% | ...| +% | \caption{The figure ...}\label{...}%| +% |\end{figure}| +% \end{Quote} +%\begingroup +% \advance\intextsep-.5\intextsep +% \begin{figure}[H]\floatsetup{heightadjust=object,valign=c,rowprecode=grayruleabove, +% rowpostcode=grayrulebelow}\killfloatstyle +% \begin{floatrow} +% \ffigbox +% {\unitlength.65\unitlength\input{BlackCat.picture}} +% {\caption{The left beside figure inside float row with defined row rules above and below}% +% \label{intro:leftfig:row}}% % -% \subsubsection{Float Object Justification}\label{ssec:decl:marg} +% \ffigbox +% {\caption{The beside figure at the right inside float row with defined row rules above and below}%^^A +% \label{intro:rightfig:row}} +% {\unitlength.85\unitlength\input{Cat.picture}} +% \end{floatrow} +% \end{figure}%^^A +% \begin{figure}[H]\floatsetup{heightadjust=object,valign=c,rowprecode=grayruleabove, +% rowpostcode=grayrulebelow}\killfloatstyle +% \ffigbox +% {\caption{Alone figure with defined row rules above and below}%^^A +% \label{intro:alone:row}} +% {\unitlength.85\unitlength\input{TheCat.picture}} +% \end{figure}%^^A +% \begin{Quote}\openup-.65pt +% \meta{preamble}\nopagebreak +% |...|\nopagebreak +% |\floatsetup{...,|\hyperref[setup:precode]{precode}|=grayruleabove,|%^^A +% \hyperref[setup:postcode]{postcode}|=grayrulebelow}| +% \meta{preamble} +% |...| +% \end{Quote}%^^A +% \advance\intextsep-.5\intextsep +% \begin{figure}[H]\floatsetup{heightadjust=object,valign=c, +% precode=grayruleabove,postcode=grayrulebelow}\killfloatstyle +% \begin{floatrow} +% \ffigbox +% {\unitlength.65\unitlength\input{BlackCat.picture}} +% {\caption{The left beside figure inside float row with defined rules for float box}% +% \label{intro:leftfig:box}}% % -% \DescribeMacro{\DeclareObjectSet} +% \ffigbox +% {\caption{The beside figure at the right inside float row with defined rules for float box}%^^A +% \label{intro:rightfig:box}} +% {\unitlength.85\unitlength\input{Cat.picture}} +% \end{floatrow}% +% \end{figure}\kern-\lastskip%^^A +% \begin{figure}[H]\floatsetup{heightadjust=object,valign=c, +% precode=grayruleabove,postcode=grayrulebelow}\killfloatstyle +% \ffigbox +% {\caption{Alone figure with defined rules above and below for float box}%^^A +% \label{intro:alone:box}} +% {\unitlength.85\unitlength\input{TheCat.picture}} +% \end{figure}%^^A +%\endgroup +% \RestoreSpaces +% \subsubsection{Object Justification Option (\texttt{objectset=})}\label{ssec:decl:oset} +% +% \DescribeMacro{\DeclareObjectSet}\label{setup:DeclareObjectSet}%^^A % You may define justification for \texttt{objectset=} key like\nopagebreak: -% \begin{quote} +% \begin{Quote} % |\DeclareObjectSet{centering}{\centering}| -% \end{quote} +% \end{Quote} % In option's definition you may try to include any regular commands % which you need to put before each object contents in float % environment\footnote{You may also use key options declared by -% \cmd{\DeclareCaptionJustification} command of \pkg{caption} package +% \cmd{\DeclareCaptionJustification} command of \package{caption} package % as options for \texttt{objectset=} key.}.\par % \strut\par\kern-\baselineskip % -% \subsubsection{Float Box Alignment (and Some Other Settings)} +% \subsubsection{Option for Float Box Alignment/Settings (\texttt{margins=})} % \label{ssec:decl:marg} % -% \DescribeMacro{\DeclareMarginSet}\label{fsetup:besmarg}%^^A +% \DescribeMacro{\DeclareMarginSet}\label{setup:DeclareMarginSet}%^^A % You may define box alignment for float box (\texttt{margins=} key) like: -% \begin{quote} -% |\DeclareMarginSet{center}{%|\\ +% \begin{Quote} +% |\DeclareMarginSet{center}{%| % | \setfloatmargins{\hfil}{\hfil}}| -% \end{quote} +% \end{Quote} % or like (see also sample files) -% \begin{quote} -% |\DeclareMarginSet{outside}{%|\\ +% \begin{Quote} +% |\DeclareMarginSet{outside}{%| % | \setfloatmargins*{\hfil}{}}| -% \end{quote} +% \end{Quote} % % Non-starred form of |\setfloatmargins| defines left and right % margin. -% \begin{quote} +% \begin{Quote} % |\setfloatmargins{|\meta{left margin}|}{|\meta{right margin}|}| -% \end{quote} +% \end{Quote} % % Starred form, |\setfloatmargins*|, defines facing layout: inside and % outside margin. -% \begin{quote} +% \begin{Quote} % |\setfloatmargins*{|\meta{inside margin}|}{|\meta{outside margin}|}| -% \end{quote} +% \end{Quote} % % You may set even much more complex definition: -% \begin{quote}\leftmargin0pt -% |\DeclareObjectSet{facingrule}{%| -% |\setfloatmargins*{%|\\ -% | \floatfacing{\hskip-12pt\vrule width4pt\hskip8pt\hfill}%|\\ +% \begin{Quote}\leftmargin0pt +% |\DeclareMarginSet{facingrule}{%| +% |\setfloatmargins*{%| +% | \floatfacing{\hskip-12pt\vrule width4pt\hskip8pt\hfill}%| % | {\hfill\hskip8pt\vrule width4pt\hskip-12pt}}{}}| -% \end{quote} +% \end{Quote} % the |\floatfacing| defines following -% \begin{quote} -% |\floatfacing{|\meta{odd page definition}|}{|\meta{even -% page definition}|}| -% \end{quote} +% \begin{Quote} +% |\floatfacing{|\meta{odd page definition}|}{|\meta{even page definition}|}| +% \end{Quote} % This macro has also starred form |\floatfacing*|, % which you can use in key options for |\captionsetup| stuff. % @@ -1350,94 +2885,132 @@ % |\setfloatmargins|. The settings which use |\floatfacing| command % work only in the case when key \texttt{facing=yes} used. % -% \emph{Notes}. 1)\enskip The \pkg{floatrow} expands some settings of table layout +% \emph{Notes}. 1)\enskip The \package{floatrow} expands some settings of table layout % to the \env{longtable} environment, so you may set |\LTleft| and -% |\LTright| parameters inside |\setfloatmargins| command. For example, +% |\LTright| parameters inside |\DeclareMarginSet| settings. For example, % \texttt{centering} option was defined like: -% \begin{quote} -% |\DeclareMarginSet{centering}{\setfloatmargins{\hfill}{\hfill}%|\\ +% \begin{Quote} +% |\DeclareMarginSet{centering}{\setfloatmargins{\hfill}{\hfill}%| % | \LTleft=\fill \LTright=\fill}| -% \end{quote} +% \end{Quote} % % 2)\enskip The font settings loaded in |\floatsetup| % in \env{longtable} environment expand to captions. % In this case, when you write something like -% \begin{quote} -% |\floatsetup{font={sf,scriptsize,it}| -% \end{quote} +% \begin{Quote} +% |\floatsetup{font={sf,scriptsize,it}...| +% \end{Quote} % or -% \begin{quote} -% |\floatsetup[longtable]{font={sf,scriptsize,it}| -% \end{quote} -% for floats (or for [long]tables only), you must restore correct -% font size, family, and shape for caption contents and write: -% \begin{quote} -% |\captionsetup{font={rm,small,up}| -% \end{quote} +% \begin{Quote} +% |\floatsetup[longtable]{font={sf,scriptsize,it}...| +% \end{Quote} +% for floats (or for [long]tables only), you ought to restore correct +% font size, family, shape (here) and series for caption contents and write\footnote +% {The version 3.1 of \package{caption} package will correct that.}: +% \begin{Quote} +% |\captionsetup{font={rm,small,up}...| +% \end{Quote} % or -% \begin{quote} -% |\captionsetup[longtable]{font={rm,small,up}| -% \end{quote} +% \begin{Quote} +% |\captionsetup[longtable]{font={rm,small,up}...| +% \end{Quote} % % -% \subsubsection{Defining Float Separators} +% \subsubsection{Float Separators Options (\texttt{floatrowsep=}, \texttt{capbesidesep=})} % -% \DescribeMacro{\DeclareFloatSeparators}\label{decl:sep}%^^A +% \DescribeMacro{\DeclareFloatSeparators}\label{setup:DeclareFloatSeparators}%^^A % You may to define separator -% between float boxes, or float object and beside caption, for example: -% \begin{quote} +% between float boxes, or float object and beside caption: +% \begin{Quote} % |\DeclareFloatSeparators{columnsep}{\hskip\columnsep}| -% \end{quote} -% or more complex, using \pkg{color} package, and |\floatfacing| macro -% (do not forget the \texttt{facing=yes} key): -% \begin{quote} -% |\DeclareFloatSeparators{colorsep}%|\\ -% | {\begingroup\color{blue}%|\\ -% | \floatfacing{\hskip14pt\vrule width1.8pt\hskip2pt}%|\\ -% | {\hskip2pt\vrule width1.8pt\hskip14pt}%|\\ -% | \endgroup}| -% \end{quote} -% +% \end{Quote} +% or more complex, using \package{color} package, and |\floatfacing| macro +% (do not forget the \texttt{facing=yes} key). % You may use defined option by both \texttt{floatrowsep=} and % \texttt{capbesidesep=} keys\footnote{You may use key options declared -% by \cmd{\DeclareCaptionLabelSeparator} command.}.\par\strut\par -% \kern-\baselineskip +% by \cmd{\DeclareCaptionLabelSeparator} command.}.\par +% \begin{Quote} +% \meta{preamble} +% |\DeclareObjectSet{colorred}{\parskip2pt\parindent15pt\color{red}}| +% |\DeclareMarginSet{hangleft}%| +% | {\setfloatmargins| +% | {\hskip-\marginparwidth\hskip-\marginparsep}{\hfil}}| +% |\DeclareFloatSeparators{colorsep}%| +% | {\begingroup\color{blue}%| +% | \floatfacing{\hskip6pt\vrule width4.8pt\hskip6pt}%| +% | {\hskip6pt\vrule width4.8pt\hskip6pt}%| +% | \endgroup}| +% |\floatsetup[|\hyperref[setup:widefigure]{\texttt{widefigure}}|]{|%^^A +% \hyperref[setup:margins]{\texttt{margins}}|=hangleft,|%^^A +% \hyperref[setup:capbesidesep]{\texttt{capbesidesep}}|=colorsep,| +% \hyperref[setup:objectset]{\texttt{objextset}}|=colorred,| +% | |\hyperref[setup:floatwidth]{\texttt{floatwidth}}|=\textwidth,|%^^A +% \hyperref[setup:facing]{\texttt{facing}}|=yes}| +% |\captionsetup[figure]{justification=justified,| +% | labelfont={magenta,bf},textfont=green,labelsep=newline}| +% \meta{preamble} +% |\begin{figure*}|\nopagebreak +% |...|\nopagebreak +% |\end{figure*}| +% \end{Quote} +% \begingroup +% \floatsetup[widefigure]{margins=hangleft,capbesidesep=colorsep,objectset=colorred, +% floatwidth=\textwidth,facing=yes,capposition=beside,capbesideposition=left} +% \captionsetup[figure]{justification=justified, +% labelfont={magenta,bf},textfont=green,labelsep=newline} +% \begin{figure*}[H]% +% {\TEXTBOX}{\caption[Multi-colored figure and beside caption]{Multi-colored figure with beside caption. And A bit more text, and some more text}} +% \end{figure*}% +% \endgroup % -% \subsubsection{Float font} +% \subsubsection{Float Font Option (\texttt{font=})}\label{ssec:declfont} % -% \DescribeMacro{\DeclareFloatFont} +% \DescribeMacro{\DeclareFloatFont}\label{setup:DeclareFloatFont}%^^A % With this macro you may define new option % for font (\texttt{font=} key) of float contents. This macro works -% like |\DeclareCaptionFont| in \pkg{caption} package. (You may also -% use key options declared by |\DeclareCaptionFont| command.)\par -% \strut\par\kern-\baselineskip +% like |\DeclareCaptionFont| in \package{caption} package. (You may also +% use key options declared by |\DeclareCaptionFont| command.) % -% \subsubsection{Defining Float Footnote Rule's Style} +% To get red color for text in the example above, you may define the red color by following way: +% \begin{Quote}% +% |\DeclareFloatFont{red}{\color{red}}| +% \end{Quote}% +% and then +% \begin{Quote}% +% |\floatsetup[figure]{font={small,red},...}|\quad. +% \end{Quote}% +% +% +% \subsubsection{Option for Footnote Rule's Style (\texttt{footnoterule=})} +% \label{ssec:fnoterule} % -% \DescribeMacro{\DeclareFloatFootnoterule} +% \DescribeMacro{\DeclareFloatFootnoterule}\label{setup:DeclareFloatFootnoterule}%^^A % You may define new footnoterule (\texttt{footnoterule=} key) like: -% \begin{quote} -% |\DeclareFloatFootnoterule{fullsize}{%|\\ -% | \kern-3\p@|\\ -% | \hrule \@width\hsize\kern 2.6\p@}| -% \end{quote} +% \begin{Quote} +% |\DeclareFloatFootnoterule{limited}{\kern-3pt| +% | \@tempdima.4\columnwidth| +% | \ifdim\@tempdima>\frulemax\@tempdima=\frulemax\fi| +% | \hrule width\@tempdima\kern2.6pt}| +% \end{Quote} % Remember, that summary vertical height for footnote rule must be % equal to~0pt. % -% \section{Creation of New Float Type} +%\newpage +% \section{Creation of New Float Type}\label{sec:newfloat} % -% \DescribeMacro{\DeclareNewFloatType} +% \DescribeMacro{\DeclareNewFloatType}\label{setup:DeclareNewFloatType}%^^A % For creation of new float type there was created -% |\DeclareNewFloatType| command which also uses +% |\DeclareNewFloatType|\label{FAD:newfloattype} +% command which also uses % \meta{key}${}=\nobreak {}$\meta{value} mechanism: -% \begin{quote} -% |\DeclareNewFloatType{|\meta{type}|}{|\meta{options}|}| -% \end{quote} +% \begin{Quote} +% |\DeclareNewFloatType|\marg{type}\marg{options} +% \end{Quote} % The \meta{type} argument includes the new float environment name.\\ % The \meta{options} could include following keys: % % \noindent -% \DescribeMacro{placement=} +% \DescribeMacro{placement}\label{setup:placement}%^^A % The option of this key could have any combination of letters % \texttt{t}, \texttt{b}, \texttt{h}, and \texttt{p}, which % define placement of current float type on the page in @@ -1445,63 +3018,80 @@ % (As default is declared \texttt{placement=tbp}.) % % \noindent -% \DescribeMacro{name=} +% \DescribeMacro{name}\label{setup:name}%^^A % Defines the name of environment in the caption % label. (As default for caption label is declared the % name of environment.) % % \noindent -% \DescribeMacro{fileext=} +% \DescribeMacro{fileext}\label{setup:fileext}%^^A % Defines the file extension from which -% gathered list of floats. (As default, captions -% are gathered in \texttt{lox}-file). +% gathered list of floats. (As default, new captions +% are gathered in \texttt{lox}-file). This option is required in the case of +% creation of a~separate float lists. % % \noindent -% \DescribeMacro{within=} +% \DescribeMacro{within}\label{setup:within}%^^A % Declares the section head of document, by which % current float resets its numbering to zero. If this key absent, % float increases during whole documentation. % % \noindent -% \DescribeMacro{relatedcapstyle=} -% In \pkg{float} package the non-starred +% \DescribeMacro{relatedcapstyle}\label{setup:relatedcapstyle}%^^A +% In \package{float} package the non-starred % \cmd{\newfloat}/\cmd{\restylefloat} macros attach related -% caption style for float styles (see section \ref{sec:floatst}). +% caption style for float styles (see {\sectionname} \ref{sec:floatst}). % If you use |\DeclareNewFloatType| mechanism and exists (you created % it by |\captionsetup|) co-named, i.e. related, caption style % you may attach this style with key \texttt{relatedcapstyle=yes}. -% %^^A \begin{quote} +% %^^A \begin{Quote} % %^^A |\captionsetup[figure]{style=ruled}| -% %^^A \end{quote} +% %^^A \end{Quote} % % The |\DeclareNewFloatType| was used for defining of \env{Example} % environment (see page \pageref{exa1.1}). It consists of following % code: -% \begin{quote} -% |\DeclareNewFloatType{Example}%|\\ +% \begin{Quote} +% |\DeclareNewFloatType{Example}%| % | {placement=t,within=section,fileext=lox}| -% \end{quote} +% \end{Quote} +% +% \subsection{How to replace \cmd{\newfloat} with +% \cmd{\DeclareNewFloatType}}\label{sec:oldtonew} +% +% The |\newfloat| command takes three required and +% one optional argument: +% \begin{Quote} +% |\newfloat|\marg{type}^^A +% \marg{placement}\marg{ext}\oarg{within} +% \end{Quote} +% which could be replaced with +% \begin{Quote} +% |\DeclareNewFloatType|\marg{type}|%| +% | {placement=|\meta{placement}|,fileext=|\marg{ext}|,widthin=|\oarg{within}|}| +% \end{Quote} % -% \section{Borrowed code} +% \clearpage +% \section{Borrowed code}\label{sec:borrow} % -% \subsection{\pkg{float} Package: Compatibility}\label{sec:floatst} +% \subsection{\package{float} Package: Compatibility}\label{sec:floatst} % -% The \pkg{floatrow} package includes some macros of \pkg{float} +% The \package{floatrow} package includes some macros of \package{float} % (version v1.3d, dated 2001/11/08) -% with necessary modifications. In the case of loaded \pkg{float} -% package before \pkg{floatrow} you'll get error message. +% with necessary modifications. In the case of loaded \package{float} +% package before \package{floatrow} you'll get error message. % % \emph{Note}. % In the case of some packages -% could call \pkg{float} package\footnote{I'm aware about \pkg{algorithm} -% package.} the \pkg{floatrow} package loads code which emulates -% already loaded \pkg{float} package v1.3, so next requests for -% \pkg{float} are ignored. This will help to avoid strange error messages -% in the case of these packages loaded \emph{after} \pkg{floatrow}. -% Please note that packages, which load \pkg{float} must be loaded -% \emph{after} \pkg{floatrow}. -% -% I hope that old documents could work with \pkg{floatrow}. The first +% could call \package{float} package\footnote{I'm aware about \package{algorithm} +% package.} the \package{floatrow} package loads code which emulates +% already loaded \package{float} package v1.3, so next requests for +% \package{float} are ignored. This will help to avoid strange error messages +% in the case of these packages loaded \emph{after} \package{floatrow}. +% Please note that packages, which load \package{float} must be loaded +% \emph{after} \package{floatrow}. +% +% I hope that old documents could work with \package{floatrow}. The first % limitation or feature is---if you didn't use any |\restylefloat| % command---all figures and tables appear in \texttt{plain} float style % with bottomed captions. Another limitation---you ought to put all @@ -1509,193 +3099,66 @@ % preamble, before |\begin{document}|. The commands |\restylefloat|, % |\newfloat| and |\floatstyle| are obsolete but % supported\footnote{The better -% way is to use \cmd{\floatsetup} macros. The \pkg{floatrow} package -% supports obsolete macros but there is no guarantee.}. See also +% way is to use \cmd{\floatsetup} macros. The \package{floatrow} package +% supports obsolete macros but there is no guarantee. See also % section~\ref{float-obs} about translation of these commands -% into |\floatsetup| command. -% -% Sections, signed with ``[\pkg{float}]'' were borrowed from -% \pkg{float}'s documentation. -% -% \subsubsection{The User Interface---New Floats [\pkg{float}]} -% \label{sec:floatborrowI} -% -% \DescribeMacro{\newfloat} -% The most important command in \pkg{float} -% is the |\newfloat| command\footnote{It doubles the -% \cmd{\DeclareNewFloatType} command.}. It is patterned on -% |\newtheorem|. The |\newfloat| command takes three required and -% one optional argument; it is of the form -% \begin{quote} -% \hspace*{\MacroIndent}|\newfloat{|\meta{type}|}{|^^A -% \meta{placement}|}{|\meta{ext}|}[|\meta{within}{\tt]} -% \end{quote} -% \begin{itemize} -% \item \marg{type} is the `type' of the new class of floats, like -% \texttt{program} or \texttt{algorithm}. After the appropriate -% |\newfloat|, commands like |\begin{program}| or |\end{algorithm*}| -% will be available. -% \item \marg{placement} gives the default placement -% parameters for this class of floats. The placement parameters are -% the same as in standard \LaTeX, i.e., \texttt{t}, \texttt{b}, -% \texttt{p} and \texttt{h} for `top', `bottom', `page' and `here', -% respectively. -% \item \marg{ext} When \LaTeX\ writes the captions to an auxiliary file -% for the list of figures (or whatever), it'll use the job name -% followed by \marg{ext} as a file name. -% \item \oarg{within} Finally, the optional -% argument \meta{within} determines whether floats of this class will -% be numbered within some sectional unit of the document. For example, -% if \oarg{within}${}={}$\texttt{chapter}, the floats will be numbered -% within chapters. (In standard \LaTeX, this happens with figures and -% tables in the \cls{report} and \cls{book} document styles.) As an -% example, Program~\ref{prog1.1} was created by a command sequence -% similar to that shown in the following -% Example\footnote{Settings for Example float -% environment were created by \cmd{\DeclareNewFloatType} macro stuff.}. -% \end{itemize} -% \emph{Floatrow note.} -% There is also created a |\newfloat*| pair, which works similar to -% |\restylefloat*| command (see below). -% \begin{Program} -%\begin{verbatim} -%#include <stdio.h> -% -%int main(int argc, char **argv) { -% int i; -% for (i = 0; i < argc; ++i) -% printf("argv[%d] = %s\n", i, argv[i]); -% return 0; -%} -%\end{verbatim} -% \caption{The first program. This hasn't got anything to do with the -% package but is included as an example. -% Note the \texttt{ruled} float style.% -% \label{prog1.1}} -% \end{Program} -% \begin{Example}[H] -% \begin{verse} -% |\floatstyle{ruled}|\\ -% |\newfloat{Program}{tbp}{lop}[section]|\\ -% \dots\ loads o' stuff \dots\\ -% |\begin{Program}|\\ -% |\begin{verbatim}|\\ -% \dots\ program text \dots\\ -% |\end{verbatim}|\\ -% |\caption{|\dots\ caption \dots|}|\\ -% |\end{Program}| -% \end{verse} -% \caption{This is another silly floating Example. Except -% that this one doesn't actually float -% because it uses the {\tt[H]} optional parameter -% to appear \textbf{Here}. (Gotcha.)}\label{exa1.1} -% \end{Example} +% into \cmd{\floatsetup} command.}. % -% \DescribeMacro{\floatstyle} -% The |\floatstyle| command sets a default -% float style. This float style will be used for all the floats that -% are subsequently defined using |\newfloat|, until another -% |\floatstyle| command appears. The |\floatstyle| command takes one -% argument, the name of a float style. For instance, -% |\floatstyle{ruled}|. Specifying a string that does not name a valid -% float style is an error. +% Sections, signed with ``[\package{float}]'' were borrowed from +% \package{float}'s documentation. The section about commands which +% describes setting commands of \package{float} package was moved +% in the section~\ref{sec:changed} +% (subsection~\ref{sec:floatborrowI}, ``The User Interface---New +% Floats [\package{float}]''). % -% \DescribeMacro{\floatname} -% The |\floatname| command lets you define -% the \emph{float name} that \LaTeX\ uses in the caption of a float, -% i.e., `Figure' for a figure and so on. For example, -% |\floatname{program}{Program}|. The |\newfloat| command sets the -% float name to its argument \meta{type} if no other name has been -% specified before. % -% \DescribeMacro{\floatplacement} -% The |\floatplacement| command resets -% the default placement specifier of a class of floats. E.g., -% |\floatplacement{figure}{tp}|. +% \RestoreSpaces +% \subsubsection{How macros from \package{float} package +% work in \package{floatrow}}\label{float-obs} % -% \DescribeMacro{\restylefloat}\nopagebreak -% The |\restylefloat| command is necessary -% to change styles for the standard float types -% \texttt{figure} and \texttt{table}. Since these aren't usually -% defined via |\newfloat|, they don't have a style associated with -% them. Thus you have to say, for example, -% \begin{quote} -% \hspace*{\MacroIndent}|\floatstyle{ruled}|\\ -% \hspace*{\MacroIndent}|\restylefloat{table}| -% \end{quote} -% to have tables come out \texttt{ruled}. The command also lets you -% change style for floats that you define via |\newfloat|, although -% this is, typographically speaking, not a good idea. See -% table~\ref{table1} for an example\footnote{The \pkg{float} package -% created special caption style with bold label for \texttt{boxed} -% style. Please note that \texttt{plain} and \texttt{boxed} float -% styles have not any special settings in \pkg{caption} 3.x package. -% To emulate \texttt{boxed} style from \pkg{float} documentation there -% were: cleared all special caption settings for tables, and restored -% default colon separator after label.}. There is a |\restylefloat*| -% command which will restyle an existing float type but will keep the -% new float style from taking over the |\caption| command. In this -% case the user is responsible for handling their own captions. -% \DeleteShortVerb{\|} -% %^^AEmulation of float's documentation settings -% %^^A\floatstyle{boxed} -% %^^A\restylefloat{table} -% \begingroup -% \clearcaptionsetup{table} -% \captionsetup{labelsep=default,labelfont=bf} -% \floatsetup[table]{style=boxed} -% \begin{table} \def\B#1{$\displaystyle{n\choose#1}$} -% \begin{center} \begin{tabular}{c|cccccccc} -% $n$&\B0&\B1&\B2&\B3&\B4&\B5&\B6&\B7\\ \hline -% 0 & 1\\ -% 1 & 1&1\\ -% 2 & 1&2&1\\ -% 3 & 1&3&3&1\\ -% 4 & 1&4&6&4&1\\ -% 5 & 1&5&10&10&5&1\\ -% 6 & 1&6&15&20&15&6&1\\ -% 7 & 1&7&21&35&35&21&7&1 -% \end{tabular} \end{center} -% \caption{Pascal's triangle. This is a re-styled \LaTeX\ -% \texttt{table}.\label{table1}} -% \end{table} -% \endgroup -% \MakeShortVerb{\|} -% -% \subsubsection{How macros from \pkg{float} package -% work in \pkg{floatrow}}\label{float-obs} -% -% The combination of |\floatstyle|\marg{style} and any of -% \cmd{\newfloat}\marg{float} or -% \cmd{\restylefloat}\marg{float} commands in \pkg{floatrow} package -% set float layout in the way: -% \begin{quote} +% The combination of commands |\floatstyle|\marg{style} and any of +% \cmd{\newfloat}\marg{float} or\allowbreak\ +% \cmd{\restylefloat}\marg{float} commands in \package{floatrow} package +% set float layout in the following way: +% \begin{Quote} % |\floatsetup|\oarg{float}|{style=|\meta{style}|}| -% \end{quote} -% Please note that co-named keys from |\floatsetup|\oarg{float}|{...}| -% will overwrite the |\floatsetup{...}| settings. That means that if you -% set float layout with these obsolete commands, the next layout tuning -% you ought to do with |\floatsetup|\oarg{float}|{...}| stuff only. +% \end{Quote} +% Please note that there is used |\floatsetup|\oarg{float}|{...}| +% settings for current type of float, but not |\floatsetup{...}|. % -% \subsubsection{Printing of Float List [\pkg{float}]} +% The |\floatname| command replaces the |name=| key of |\DeclareNewFlotaType| +% command. The |\floatplacement|---|placement=| key. +% +% \subsubsection{Printing of Float List [\package{float}]} % \label{sec:floatborrowIa} % % \nobreak\DescribeMacro{\listof} % \nopagebreak % The |\listof| command produces a list of all the floats -% of a given class. Its syntax~is\\[2pt] -% \hspace*{\MacroIndent}|\listof{|\meta{type}|}{|\meta{title}^^A -% |}|\\[2pt] +% of a given class. Its syntax~is +% \begin{Quote} +% \hspace*{\MacroIndent}|\listof{|\meta{type}|}{|\meta{title}|}|^^A +% \end{Quote} % \meta{type} is the float type given in the |\newfloat| command. % \meta{title} is used for the title of the list as well as the % headings if the current page style includes them. Otherwise, the % |\listof| command is analogous to the built-in \LaTeX\ commands % |\listoffigures| and |\listoftables|. % +% \noindent\emph{Floatrow note}. +% Please remember that for each float type list +% you must set file extension where the entries of each float type gathered. +% Use key \texttt{fileext=...} in |\DeclareNewFloatType|. +% If two or more float types will have the same file +% for list of floats, you will get all floats in the +% first appeared |\listof|, and all next will be empty. +% % \subsubsection{The User Interface---\texttt{[H]} -% Placement Specifier [\pkg{float}]}\label{sec:floatborrowII} +% Placement Specifier [\package{float}]}\label{sec:floatborrowII} % -% Many people find \LaTeX's float placement specifiers too +% Many%^^A +% \FRmpar{Anchored float}{FAD:AnchoredFloat} +% people find \LaTeX's float placement specifiers too % restrictive. A Commonly Uttered Complaint (CUC) calls for a way to % place a float exactly at the spot where it occurs in the input file, % i.e., to \emph{not} have it float at all. It seems that the @@ -1705,8 +3168,9 @@ % to actually do that. This situation can be improved by judicious % manipulation of float style parameters. % +% \RestoreSpaces % The same effect can be achieved by changing the actual method of -% placing floats. David Carlisle's \pkg{here} option introduces a new +% placing floats. David Carlisle's \package{here} option introduces a new % float placement specifier, namely \texttt{[H]}, which, when added to % a float, tells \LaTeX\ to ``put it HERE, period''. If there isn't % enough space left on the page, the float is carried over to the next @@ -1714,7 +3178,7 @@ % be room left for some of that. This style option provides the % \texttt{[H]} specifier for newly defined classes of floats as well % as the predefined \texttt{figure}s and \texttt{table}s, thereby -% superseding \pkg{here}. David suggests that the \pkg{here} option be +% superseding \package{here}. David suggests that the \package{here} option be % withdrawn from the archives in due course. % % The {\tt[H]} specifier may simply be added to the float as an @@ -1723,20 +3187,21 @@ % {\tt[Hhtbp]} is illegal. Neither may it be used as the default % placement specifier for a whole class of floats. The following table % is defined like this: -% \begin{verse} -% |\begin{table}[H]| \\* -% |\begin{tabular}{cl}|\\ -% |\tt t & Top of the page\\|\\* +% \begin{Quote} +% |\begin{table}|\nopagebreak +% |\begin{tabular}{cl}| +% |\tt t & Top of the page\\| % \dots\ more stuff \dots\\ % |\end{tabular}| -% \end{verse} +% \end{Quote} % (It seems that I have to add some extraneous chatter here just so % that the float actually comes out right in the middle of a printed -% page. When I \LaTeX ed the documentation\footnote{For \pkg{float} +% page. When I \LaTeX ed the documentation\footnote{For \package{float} % package.} just now it turned out that there was a page break that % fell exactly between the ``So now'' line and the float. This % wouldn't Prove Anything. Bother.) So now we have the following float -% placement specifiers: +% placement specifiers:\nopagebreak +% \par\RestoreSpaces % \begin{table}[H] % \begin{tabular}{cl} % \tt t & Top of the page\\ @@ -1748,6 +3213,20 @@ % ^^A\caption{Could it be that this just needs a caption?} % \end{table} % +% \emph{Floatrow note}. Please don't mix meaning of +% \texttt{[H]} and \texttt{[h]} options. +% Float with \texttt{[h]} and \texttt{[!h]} option, if succeed, appears +% \emph{after completing line} of text, +% where it was appeared in the source file. That could be visible if you +% put float environment at the middle of paragraph. +% +% The [H] option places the float just \emph{at the point} where it appeared +% in the source file, it is used (\emph{but that in books strongly +% not recommended}!) for floats after text like ``\dots{}shown in this +% \textbf{figure:}'', i.e. the \texttt{[H]} float continues current +% paragraph. +% +% \RestoreSpaces % \subsubsection{The {[H]} % Placement Specifier---Managing of Page Breaks}\label{sec:listpen} % @@ -1758,19 +3237,20 @@ % page breaking of lists in the book. % % To follow the idea of |\allowdisplaybreaks| command from -% \pkg{amsmath} package there is created a beta-temp\footnote{I suppose -% that there will be created such support in \pkg{paralist} package -% and think it is better to follow one grammar for similar -% situations.} version -% of \pkg{listpen} package, which offers following commands: +% \package{amsmath} package there is created a \emph{beta-temp}\footnote{I +% hope that such support sooner or later could appear in +% \package{paralist} package and think it is better to follow +% grammar of master-package for similar situations.} version +% of \package{listpen} package, which offers following commands: % \begin{Options}{\OptionLabel} % \item[\cmd{\allowprelistbreaks}]sets penalty before lists % (and also ``anchored'' floats); % \item[\cmd{\allowpostlistbreaks}]sets penalty after lists; -% \item[\cmd{\allowitembreaks}]sets penalty between list items. +% \item[\cmd{\allowitembreaks}]sets penalty between list items +% (surely, this command not for floats!). % \end{Options} % All they set globally, inside group or inside -% environments the penalties accordingly to digits +% environments. These penalties are set accordingly to digits % from |[-4]| (never break) to |[4]| (always break). The positive % values of optional argument in these commands analogous to values % of optional arguments in |\pagebreak| command. The negative @@ -1779,532 +3259,135 @@ % to settings of standard \LaTeX{} classes: \cls{book}, \cls{article} % etc. (|[-1]| option equal to |-\@lowpenalty| value). % -% \subsection{\pkg{rotfloat} Package} -% -% Code of \pkg{rotfloat} package was also borrowed by \pkg{floatrow} -% package. In the case of loaded \pkg{rotfloat} package before -% \pkg{floatrow} you will get error message. +% \DescribeMacro{floatHaslist}\label{setup:floatHaslist}%^^A +% This is the late attempts of backwards compatibility. The key, if true, +% uses list penalties, otherwise anchored float works without any penalty, i.e. like +% defined in \package{float} package and in \package{floatrow}'s version 0.0g +% and earlier. (I hope there could not much difference, +% unless you redefined penalties of lists.) +% +% Also (added in version 0.1k with current key): +% since list environments do \emph{not make indentation} in following +% paragraph, in the case of \emph{no blank} line after environment, +% the ``anchored'' float environment does +% the same, if this option is true. Default value of \texttt{floatHaslist} +% is \texttt{false} +% (for backward compatibility with previous version 0.1j). +% +% \DescribeMacro{\floatHpenalties}\label{setup:floatHpenalties}%^^A +% This macro, defined with |\renewcommand| can include settings for +% list penalties around anchored float. If you define +% \begin{Quote} +% |\renewcommand\floatHpenalties{\@beginparpenalty\@M}| +% \end{Quote} +% or, with \package{listpen} package +% \begin{Quote} +% |\renewcommand\floatHpenalties{\allowprelistbreaks[-4]}|\quad, +% \end{Quote} +% you'll never get page breaks before anchored float. % -% The \pkg{floatrow} package loads code which pretends that -% \pkg{rotfloat} already loaded, so next loads are ignored. -% The \pkg{rotfloat} allowed in the |\usepackage| -% line with \pkg{rotating} package, which could have options. It is -% necessary to delete \pkg{rotfloat} package from |\usepackage| line -% where also \pkg{rotating} package loaded with options: otherwise +% \medskip\noindent +% \DescribeMacro{\RestoreSpaces} +% There was added one simple command, the external alias +% of internal command |\@nobreakfalse|. +% It switches off |\if@nobreak| flag. +% The main (and most visible) usage of this flag---managing of +% vertical spaces between two sectioning commands (it cancels the space before for next +% section command of the pair); spaces before list environments (cancels the space +% before list just after sectioning command) and other similar cases. +% +% Usually this flag turned off at the next paragraph (or |\par| command), +% but in some cases this ``turn off'' cannot be happen in necessary point. +% The |\RestoreSpaces| command would help. +% +% \subsection{The \package{rotfloat} Package} +% +% Code of \package{rotfloat} package was also borrowed by \package{floatrow} +% package. In the case of loaded \package{rotfloat} package before +% \package{floatrow} you will get error message. +% +% The \package{floatrow} package loads code which pretends that +% \package{rotfloat} already loaded, so next loads are ignored. +% The \package{rotfloat} allowed in the |\usepackage| +% line with \package{rotating} package, which could have options. It is +% necessary to delete \package{rotfloat} package from |\usepackage| line +% where also \package{rotating} package loaded with options: otherwise % you may get `option clash' error message. % -% \section{Macros for Building Floats} -% -% \subsection{The Floatbox Macro}\label{sec:floatbox} -% -% This package offers macro, which creates necessary layout of float -% object contents and caption (see also the introduction). -% The main macro looks like: -% \begin{quote} -% |\floatbox[|\meta{preamble}|]{|\meta{captype}|}[|^^A -% \meta{width}|][|\meta{height}|][|\meta{vert pos}|]|\\ -% | {|\meta{caption}|}{|\meta{object}|}|\footnote{The -% order of mandatory arguments and their contents makes not -% difference during building of float box. This macro -% historically needs two mandatory arguments, but they could -% be filled freely.} -% \end{quote} -% where\label{floatboxsets}: -% \begin{description}\itemsep0pt -% \item[\meta{preamble}]there could be |\capbeside| command which -% places caption beside float contents; |\nocapbeside| -% (to put caption above/below, accordingly -% to float type's style); or another systematic command -% (even with usage of |\captionsetup| and |\thisfloatsetup|---see -% examples in documentation and appendix). -% \item[\meta{captype}]the type of float this command created for; -% \item[\meta{width}]the width of object---caption box -% (in case of caption above or below object), -% or width of object box (if caption stays beside object). -% The command |\FBwidth| in the \meta{width} argument -% allows usage of natural width of float contents.\par -% \emph{Note}. If you use \verb|\FBwidth| in \meta{width} -% argument be sure that object contents can be placed in |\hbox| -% (you only allowed to use |\vspace| command at the very -% beginning and very end of object contents for fine tuning -% of vertical spaces); -% \item[\meta{height}]the height of object---caption box -% (in case of caption above or below object), -% or height of object box (if caption stays beside object); -% \item[\meta{vert pos}]vertical alignment of object contents in -% object's box in case of \meta{height} argument has larger value than -% height of object contents, float placed inside \env{floatrow}. -% \item[\meta{caption}]text of caption and legends (you may use -% |\floatfoot| command (see page~\pageref{subsec:floatfoot}); you -% may also use |\footnote|/|\mpfootnotemark|/|\footnotetext| stuff -% for footnotes inside float, or |\floatfoot| command; -% \item[\meta{object}]Contents of float; you may use -% |\footnote|/|\mpfootnotemark|/|\footnotetext| stuff or -% |\floatfoot| command. -% \end{description} -% -% \begingroup -% First simplest example: -%\begin{verbatim} -%\begin{figure} -%\floatbox{figure}[4cm] -%{\caption{The simple example ...}% -%\label{fig:WcatI}} -%{\input{TheCat.picture}} -%\end{figure} -%\end{verbatim} -% created the picture in the figure~\ref{fig:WcatI}.\pagebreak[3] -% \begin{figure} -% \floatbox{figure}[4cm] -% {\caption{The simple example of \cmd{\floatbox}}% -% \label{fig:WcatI}} -% {\unitlength1.28\unitlength\input{TheCat.picture}} -% \end{figure}% -% \endgroup -% -% The more preferable way for usage of |\floatbox| is to put table -% caption \emph{above} table contents and set caption width equal -% to table width. Caption position was defined in document preamble -% by command |\floatsetup[table]{style=Plaintop}| -%\begin{verbatim} -%\begin{table} -%\floatbox{table}[\FBwidth] {\caption{Simple tabular in -%\cmd{\floatbox} -% with caption above}\label{tab:tabII}} -%{\begin{tabular}{|l|c|c|} -% \hline -% Column head & Data I & Data II \\ -% \hline -% First row & 1 & 2 \\ -%... -% \hline -%\end{tabular}} -%\end{table} -%\end{verbatim} -% \DeleteShortVerb{\|}% -% \begin{table} -% \floatbox{table}[\FBwidth] -% {\caption{Simple tabular with caption -% above}\label{tab:tabII}} -% {\begin{tabular}{|l|c|c|} -% \hline -% \thead{Column head} & \thead{Data I} & \thead{Data II} \\ -% \hline -% First row & 1 & 2 \\ -% Second row & 3 & 4 \\ -% Third row & 6 & 8 \\ -% Fourth row & \llap{1}0 & \llap{1}6 \\ -% \hline -% \end{tabular}} -% \end{table}% -% \MakeShortVerb{\|}% -% as shown in table~\ref{tab:tabII}. To fit size of caption (i.e full -% float box) to size of \env{tabular} environment there was used -% |\FBwidth| command in \meta{width} argument. -% -% The next example shows \env{figure} environment with beside caption. -% In this example only |\capbeside| command used in \meta{preamble} -% argument, and |\FBwidth| in \meta{width} argument. The caption -% occupies the rest space of float box's width, |\hsize| (in current -% example the width float box equals to main text width---|\textwidth|). -% -%\begin{verbatim} -%\begin{figure} -%\floatbox[\capbeside]{figure}[\FBwidth] -% {\caption[Beside caption]{Beside caption ...}\label{...}} -% {...} -%\end{figure} -%\end{verbatim} -% \begin{figure}[h] -% \floatbox[\capbeside]{figure}[\FBwidth] -% {\caption[Beside caption]{Beside caption and more text -% and some more text and a bit more text and -% a little more text and a little peace of text to fill -% space}\label{fig:beside:mouse}} -% {{\setlength\unitlength{4cm/58}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{Mouse.picture}}} -% \end{figure} -% -% The default width of beside object and caption are equal to one -% ``column'' width, i.e. half of current |\hsize| -% (figure~\ref{intro:beside}) width excluding float margins and -% separation material between float and caption. (See more examples -% with float and beside captions in appendix, page~\pageref{fig:Idog:w}.) -% -% -% \subsubsection{User Commands for Float Boxes} -% -% The usage of plain |\floatbox| command sometimes is rather complex. -% You may define commands-abbreviations for your own purposes and -% define there some additional style settings. -% -% The definition of new float abbreviation looks like: -% \begin{quote} -% |\newfloatcommand|\marg{command}%^^A\\\strut\qquad -% \marg{captype}\oarg{preamble}\oarg{default width} -% \end{quote} -% where: -% \begin{description} -% \item[\meta{command}]the user's command name (without backslash); -% \item[\meta{captype}]the name of float environment -% this command is created for; -% \item[\meta{preamble}] -% you may use commands, mentioned in page~\pageref{floatboxsets} -% and other layout commands, like was shown in examples; -% you may try to add any other regular command (e.g. |\captionsetup| -% or |\thisfloatsetup| stuff); -% \item[\meta{default width}]here you put any dimension like |6cm| -% or |.75\textwidth|\footnote{There is also exists possibility to set -% common width for current float type of float using -% \texttt{floatwidth} key in \cmd{\floatsetup} stuff.}; if you -% put |\FBwidth| command the width of object---caption box (in case of -% caption above or below object---there could be defined -% |\nocapbeside| in \meta{preamble}) or width of object box (if caption -% stays beside object---|\capbeside| in \meta{preamble}) will be equal -% to width of object. -% \end{description} -% -% There are three already defined commands-abbreviations:\label{abbrcom} -% \begin{quote} -% |\newfloatcommand{ffigbox}{figure}[\nocapbeside]|\\* -% |\newfloatcommand{fcapside}{figure}[\capbeside]|\\* -% |\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]| -% \end{quote} -% First two defined for figures and last one---for table. You may -% redefine existing macros using |\renewfloatcommand| command (it uses -% the same arguments as |\newfloatcommand| one). -% -% -% \subsection{Building Float Row}\label{sec:floatrow} -% -% If you need to put two or more floats of one type side by side, you -% may use \env{floatrow} environment. -% -% This environment looks like: -% \begin{quote} -% |\begin{floatrow}[|\meta{number of beside floats}|]|\\ -% |\floatbox...|\\ -% |...|\\ -% |\floatbox...|\\ -% |...|\\ -% |\end{floatrow}| -% \end{quote} -% -% And here is example. The first float (used |\ffigbox|) has default -% width equal to ``column'' width, the next uses width of included -% graphic (uses command |\FBwidth| in optional argument \meta{width}), -% third one occupies the rest horizontal space of page which was -% counted with command |\Xhsize|. -% -% \emph{Note}. Usually the command |\Xhsize| is used for the last float -% box. But if you use \pkg{calc} package you may try to use |\Xhsize| -% earlier, if the \emph{absolute} value of the width of float boxes to -% the right in float row is known, or set something in \meta{width} -% argument like |\Xhsize/2| and then |\Xhsize| for two last -% |\floatbox|'es, see sample files~\file{frsample10}--\file{frsample12}, -% and also sample file \file{fr-sample.tex}. -%\begin{verbatim} -%\begin{floatrow}[3] -%\ffigbox -%{\caption{Beside figure~I...}...} -%{...} -% -%\ffigbox[\FBwidth] -%{\caption{Beside figure~II...}...} -%{...} -% -%\ffigbox[\Xhsize] -%{\caption{Beside figure~III...}...} -%{...} -%\end{floatrow} -%\end{figure} -%\end{verbatim} -% \begin{figure} -% \begin{floatrow}[3] -% \ffigbox -% {\caption{Beside figure~I, ``column'' width}% -% \label{fig:row:WcatI}} -% {\unitlength1.25\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{TheCat.picture}} -% -% \ffigbox[\FBwidth] -% {\caption{Beside figure~II in \env{floatrow}, float box has the -% width of graphic}% -% \label{fig:row:BcatI}} -% {\unitlength1.25\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{TheBlackCat.picture}} -% -% \ffigbox[\Xhsize] -% {\caption{Beside figure~III in \env{floatrow}, -% occupies the rest of row}% -% \label{fig:row:mouseI}} -% {{\setlength\unitlength{\hsize/58}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{Mouse.picture}}} -% \end{floatrow} -% \end{figure}% -% The result you see in the row of -% figures~\ref{fig:row:WcatI}--\ref{fig:row:mouseI}. The vertical -% alignment of floats lays on the bottom of upper part (here: objects) -% of float and the top of lower part (captions). -% -% \subsection{Usage of Footnotes Inside Float Environment} -% \label{sec:floatfootnote} -% -% Sometimes table or figure contents have material, which authors mark -% and then write some explanation like footnotes. Current package has -% mechanism which allows to put footnotes inside float environment, in -% the same way as is in \env{minipage} environment. -% -% In the case of few elements have the same footnote, we cannot -% use standard |\footnotemark|---|\footnotetext| combination, because -% of |\footnotemark| creates the sign of main text footnote. -% For these cases current package offers |\mpfootnotemark| macro -% instead of |\footnotemark|% -% \footnote{The same macro also is defined in \pkg{footmisc} package, -% version 4.10, dated 2003/01/20.}. -% -% The |\floatbox| macro uses special own definition of footnote rule -% (the |\FBfootnoterule| command) and skip before footnotes and -% explications or legends (|footskip=|). (See also -% page~\pageref{sec:footnotestyle} for variants of footnote rule.) -% -% \subsubsection{The Legend-Like Macro}\label{subsec:floatfoot} -% -% In the case of table or figure have some additional explanations -% which could not put in caption contents and they are definitely not -% a footnote you may use |\floatfoot| command. The |\floatfoot| is -% build by usage of |\caption| stuff and uses caption's justification, -% but star form (|\floatfoot*|) prints its contents as plain unindented -% paragraph (see table~\ref{tab:floatfoot}). -% -% For defining of explication font use \texttt{footfont=} key -% (page~\pageref{sec:setfloatfoot}) in |\floatsetup|. You may try to -% define special settings for float foot using -% \cmd{\captionsetup[floatfoot]} setup. -%\begin{verbatim} -%\begin{table} -%\ttabbox -%{\caption{Table with additional foot material}% -%\label{tab:floatfoot}} -%{\extrarowheight1pt -% \tabcolsep2\tabcolsep -% \begin{tabular}{|l|c|c|} -% \hline -% ... -% \end{tabular}% -% \floatfoot*{`Data I' column ...}} -%\end{table} -%\end{verbatim} -% \DeleteShortVerb{\|}% -% \begin{table} -% \ttabbox -% {\caption{Table with additional foot material}%^^A -% \label{tab:floatfoot}}%^^A -% {\extrarowheight1pt\tabcolsep2\tabcolsep -% \begin{tabular}{|l|c|c|} -% \hline -% \thead{Column head} & \thead{Data I} & \thead{Data II} \\ -% \hline -% First row & \phantom01 & 2 \\ -% Second row & \phantom06 & 4 \\ -% Third row & 28 & 8 \\ -% \hline -% \end{tabular}%^^A -% \floatfoot*{`Data I' column---numbers which equal to sum of all -% their divisors; `Data II' column---$2^n$ values}} -% \end{table}% -% \MakeShortVerb{\|}% -% -% \emph{Notes.} 1)\enskip The \pkg{float} package defines additional -% optional argument after main caption text. Since this possibility -% didn't declared in user part of documentation the current version of -% \pkg{caption} (3.0 and later), and also \pkg{float\-row} package, -% doesn't support this possibility. You may use |\floatfoot| and -% |\footnotemark|/|\footnotetext| stuffs instead. -% -% 2)\enskip If you use both |\floatfoot| command and |\footnote| -% inside one float box, the |\floatfoot| appears above |\footnote| -% contents. -% -% 3)\enskip Foot material (footnotes and text in floatfoot) can be placed -% in several variants: at the very bottom of float box, below caption -% (even if caption is above float object). See page \pageref{foot:pos} -% and sample file \file{frsample01.tex}. In case of caption beside -% float object, footnotes and foot text always placed below caption. -% -% -% \subsection{Fine Tuning of Vertical Spaces of Float} -% \label{sec:FBabskips} -% -% At the final variant of document you may need to correct vertical -% spaces between float and main text, between float object and -% caption. -% -% To change space between float box and main text there you may use -% two simple commands |\FBaskip| and |\FBbskip|. For example define -% \begin{verse} -% |\renewcommand\FBaskip{-4pt}| -% \end{verse} -% to move up float box up (or reduce space above) by 4pt. In current -% document the |\FBaskip| command was necessary for moving up -% some of wrapped figures. -% -% Use |\vspace| command for vertical space correction around float -% object\footnote{The plain float environment allows usage of -% \cmd{\vskip} command. But \cmd{\floatbox} stuff -% (\cmd{\floatbox} itself, \cmd{\ffigbox} etc.) in case -% of usage of the \cmd{\FBwidth} option, gets error message -% when \cmd{\vskip} appears.}. -% -% \subsection{Running Raw \LaTeX\ Floats} -% -% The \pkg{floatrow} package redefines float environments for the case -% of creation of common layout for all floats. This redefinition creates -% some limitations for source document file, which were mentioned in -% introduction. If you still need a raw behavior of float environment, -% you may input a |\RawFloats| command \emph{inside} environment: -%\begin{verbatim} -%\begingroup -%\captionsetup[table]{position=top} -%\begin{figure}\RawFloats -%\begin{minipage}{0.45\textwidth} -%\centering ... -%\caption{...}\label{...} -%\end{minipage} -%\begin{minipage}{0.45\textwidth} -%\captionof{table}{...}\label{...} -%\centering ... -%\end{minipage} -%\end{figure} -%\endgroup -%\end{verbatim} -% And you'll get figure~\ref{Right:expect:fig} -% and table~\ref{Right:expect:tab}\footnote{That could work correct if -% you do not use any fancy float layout.}. -% \begingroup -% \captionsetup[table]{position=top} -% \begin{figure}\RawFloats -% \begin{minipage}{0.45\textwidth} -% \centering \input{Mouse.picture} -% \caption{A figure caption in raw \LaTeX}\label{Right:expect:fig} -% \end{minipage} -% \begin{minipage}{0.45\textwidth} -% \captionof{table}{A table caption in raw \LaTeX}\label{Right:expect:tab} -% \centering\tabcolsep3\tabcolsep -% \begin{tabular}{|c|c|} A & B \\ C & D \end{tabular} -% \end{minipage} -% \end{figure} -% \endgroup -% -% You may see that \env{floatrow} environment and |\floatbox| commands -% still work after |\RawFloats| (figure~\ref{intro:leftfig:raw} and -% table~\ref{intro:righttab:raw}) -%\begin{verbatim} -%\begin{figure}\RawFloats\CenterFloatBoxes -% \begin{floatrow} -% \floatbox{figure} -% {...}{\caption{...}\label{...}} -% -% \floatbox{table}[\FBwidth] -% {...}{\caption{...}\label{...}} -% \end{floatrow} -%\end{figure} -%\end{verbatim} -% \begin{figure}\RawFloats\CenterFloatBoxes -% \begin{floatrow} -% \floatbox{figure} -% {\input{Mouse.picture}} -% {\caption{A figure caption in \cmd{\floatbox} in raw \LaTeX}% -% \label{intro:leftfig:raw}}% -% -% \floatbox{table}[\FBwidth] -% {\caption{A table caption in \cmd{\floatbox} in raw -% \LaTeX}\label{intro:righttab:raw}} -% {\tabcolsep3\tabcolsep -% \begin{tabular}{|c|c|} A & B \\ C & D -% \end{tabular}} -% \end{floatrow} -% \end{figure}%^^A -% See also page~\pageref{mixrow} about how to set and align different -% float types like figure~\ref{intro:leftfig:raw} and -% table~\ref{intro:righttab:raw} in one row (\env{floatrow} environment). -% -% +%\clearpage % \section{Style Tandems} % % The next few sections show examples and explain some noticed -% features with usage of \pkg{floatrow} and another package. There is not +% features with usage of \package{floatrow} and another package. There is not % the full list of style compatibilities. You may succeed with other % versions of mentioned packages, and maybe with not mentioned % packages too. % -% \subsection{The \pkg{caption} Package} +% \subsection{The \package{caption} Package}\label{ssec:caption} % -% Tested with versions v3.0a--v3.0i. +% Tested (and compatible) with version v3.0q. % -% The \pkg{caption} package has strong mechanism of creating of -% caption layout, so \pkg{floatrow} addresses the creation of new -% caption styles to this package (see documentation for \pkg{caption} +% The \package{caption} package has strong mechanism of creating of +% caption layout, so \package{floatrow} addresses the creation of new +% caption styles to this package (see documentation for \package{caption} % package). % -% The \pkg{floatrow} adds possibility to create a variations of captions +% The \package{floatrow} adds possibility to create a variations of captions % for floats in different positions or layouts (e.g. like wide or % two-column floats or rotated floats) using optional argument of % |\captionsetup|. % % For example you want to create special caption layout for wide or % two-column floats. In this case you may use -% \begin{quote} +% \begin{Quote} % |\captionsetup[widefloat]|\marg{options} -% \end{quote} +% \end{Quote} % or for wide or two-column figures: -% \begin{quote} +% \begin{Quote} % |\captionsetup[widefigure]|\marg{options} -% \end{quote} +% \end{Quote} % The priority of |\captionsetup| optional arguments is similar to % |\floatsetup| ones. In current examples |\captionsetup[widefigure]| % will be stronger than |\captionsetup[widefloat]|. The priority % and usage of ``\meta{float subtypes}'' in optional arguments % see on the page~\pageref{stsetorder}\label{cap:beside:order}). % +% \subsection{The \package{subfig} Package}\label{ssec:subfig} % -% \subsection{The \pkg{subfig} Package} +% Tested (and compatible) with version 1.3, +% dated 2005/06/28. For the \package{subfig} package there are additional +% macros in \package{floatrow} which create of row of subfloats; +% put subcaption label beside contents of subfloat; put alone +% subcaption label. % -% Tested with version 1.2 dated 2004/01/28 and 1.3. -% dated 2005/06/28.\nopagebreak +% \subsubsection{Additions in \package{floatrow}} % % The example with \cmd{\subfloat}'s (table~\ref{tab:tabIII}). The -% setting command in preamble |\floatsetup[table]{style=Plaintop}| +% setting command in preamble |\floatsetup[table]{style=Plaintop}|%^^A +% \FRmpar{Subcaption above subtable}{FAD:subcapabove} % includes also settings for subcaption positions used with -% \pkg{subfloat} package (like |\captionsetup[table]{position=top}| in -% \pkg{caption} package): -%\begin{verbatim} -%\begin{table}\extrarowheight1pt -% \floatbox{table}[\FBwidth] -% {\caption{Two ...}\label{...}} -% {\begin{subfloatrow} -% \subfloat[First subtable] -% {\begin{tabular}{...} -% ... -% \end{tabular}} -% -% \subfloat[Second subtable with long long long subcaption] -% {\begin{tabular}{...} -% ... -% \end{tabular}}% -% \end{subfloatrow}} -%\end{table} -%\end{verbatim} +% \package{subfloat} package (like |\captionsetup[table]{position=top}| in +% \package{caption} package): +%\begin{Quote}\obeylines\parskip-.15pt +%|\begin{table}\extrarowheight1pt|\nopagebreak +%| \floatbox{table}[\FBwidth]| +%| {\caption{Two ...}\label{...}}| +%| {\begin{subfloatrow}| +%| \subfloat[First table]| +%\verb+ {\begin{tabular}{|l|c|c|}+ +%| ...\end{tabular}}| +%| \subfloat[Second table...]| +%\verb+ {\begin{tabular}{|l|c|c|}+ +%| ...\end{tabular}%| +%| \end{subfloatrow}}}| +%|\end{table}| +%\end{Quote} % \DeleteShortVerb{\|}% % \captionsetup[subtable]{textfont=md} -% \begin{table}[h]\extrarowheight1pt +% \begin{table}[h]\extrarowheight1pt\tabcolsep1.25\tabcolsep % \floatbox{table}[\FBwidth] % {\caption{Two \cmd{\subtable}'s -% (created with \pkg{subfig} package)}\label{tab:tabIII}} +% (created with \package{subfig} package)}\label{tab:tabIII}} % {\begin{subfloatrow} % \subfloat[First subtable] % {\begin{tabular}{|l|>{\phantom0}c|>{\phantom0}c|} @@ -2340,20 +3423,19 @@ % \end{table}% % \MakeShortVerb{\|}% % -% \emph{Note.} There was used \env{subfloatrow} environment in current -% example. This is simplified \env{floatrow} environment, which +% The \env{subfloatrow} is simplified \env{floatrow} environment, which % expands vertical alignment of float contents to subfloats and % puts horizontal separator, defined by \texttt{subfloatrowsep=} % key. This key and uses the same options % as \texttt{floatrowsep=} and \texttt{capbesidesep=} keys (options of % these keys defined by |\DeclareFloatSeparators| command, -% page~\pageref{decl:sep}). +% page~\pageref{setup:DeclareFloatSeparators}). % %^^A To use \env{subfloatrow} environment load -%^^A \pkg{fr-subfig}\footnote{This package could have only beta-status, -%^^A because of it redefines two macros of \pkg{subfig} package for +%^^A \package{fr-subfig}\footnote{This package could have only beta-status, +%^^A because of it redefines two macros of \package{subfig} package for %^^A creation of subcaption and subfloat boxes.} package installed -%^^A together with \pkg{floatrow}.\pagebreak[3] +%^^A together with \package{floatrow}.\pagebreak[3] % % See examples with \env{subfloatrow} environment in sample files % \file{frsample03.tex}, \file{frsample05.tex}; and also @@ -2362,41 +3444,239 @@ % % The next goes example with beside caption (see % figure~\ref{fig:subfig:catsI}).%^^A -% \footnote{In version 1.2 the beside boxed and non-boxed subfloat -% contents (like in figure~\ref{fig:subfig:catsI}) could not get aligned -% bottom (top) subcaptions. In this example I ought to use following -% lines for subfigure~\ref{subfig:b}, when \pkg{pstricks} package is -% loaded:\\[2ex]\ttfamily -% \cmd{\raisebox}\{\cmd{\depth}\}\{\cmd{\input}\{\texttt -% {TheBlackCat.picture}\}\}} -%\begin{verbatim} -%\floatsetup{style=Shadowbox,capbesidesep=columnsep, -% capbesideframe=yes,capbesideposition={top,inside}} -%\fcapside[\FBwidth] -% {\begin{subfloatrow} -% \subfloat[White cat\label{subfig:w}]{% -% {\input{TheCat.picture}}} -% -% \subfloat[Black cat\label{subfig:b}]{\input{TheBlackCat.picture}}% -% \end{subfloatrow}} -%{\caption{...}} -%\end{verbatim} +%^^A% \footnote{In version 1.2 the beside boxed and non-boxed subfloat +%^^A% contents (like in figure~\ref{fig:subfig:catsI}) could not get aligned +%^^A% bottom (top) subcaptions. In this example I ought to use following +%^^A% lines for subfigure~\ref{subfig:b}, when \package{pstricks} package is +%^^A% loaded:\\[2ex]\ttfamily +%^^A% \cmd{\raisebox}\{\cmd{\depth}\}\{\cmd{\input}\{\texttt +%^^A% {Cat.picture}\}\}} +%\begin{Quote} +%\meta{preamble}\nopagebreak +%|\floatsetup[figure]{|\hyperref[setup:style]{\texttt{style}}|=Shadowbox,|%^^A +% \hyperref[setup:capbesidesep]{\texttt{capbesidesep}}|=columnsep,| +%| |\hyperref[setup:capbesideframe]{\texttt{capbesideframe}}|=yes,|%^^A +% \hyperref[setup:capbesideposition]{\texttt{capbesideposition}}|={left,top}}| +%|\floatsetup[subfigure]{|\hyperref[setup:style]{\texttt{style}}|=plain}| +%|\DeclareCaptionLabelFormat{list}{\bothIfFirst{#1}{ }#2)}| +%|\captionsetup[subfigure]{labelformat=list,justification=centerlast,| +%| strut=no}|\nopagebreak +%\meta{preamble} +%|\fcapside[\FBwidth]| +%| {\begin{subfloatrow}| +%| \subfloat[...\label{...}]{...}| +%| \subfloat[...\label{...}]{...}%| +%| \end{subfloatrow}}| +%|{\caption{...}}| +%\end{Quote} % \floatsetup[figure]{style=Shadowbox,capbesidesep=columnsep, -% capbesideframe=yes,capbesideposition={top,inside}} +% capbesideframe=yes,capbesideposition={left,top}} +% \floatsetup[subfigure]{style=plain} +% \captionsetup[subfigure]{labelformat=list,justification=centerlast,strut=no} % \begin{figure}[h] % \fcapside[\FBwidth] % {\begin{subfloatrow} -% \subfloat[White cat\label{subfig:w}]{% -% {\input{TheCat.picture}}} +% \subfloat[One cat\label{subfig:w}]{% +% {\input{Cat.picture}}} +% \subfloat[Another cat\label{subfig:b}]{\input{TheCat.picture}}% +% \end{subfloatrow}} +% {\caption[Subfloat row]{Beside +% caption vertically top aligned; fancy +% \texttt{Shadowbox} layout. There are two subfigures: +% \protect\ref{subfig:w} and \protect\ref{subfig:b}}\label{fig:subfig:catsI}} +% \end{figure} +% +% \DescribeMacro{\sidesubfloat} +% Another addition in \package{floatrow} for subfloats is command,%^^A +% \FRmpar{Subcaption beside subfloat}{FAD:sublabelbeside} +% which puts subcaption label beside subfloat. The subcaption label always +% appears on the left side. The key |subcapbesideposition=| +% \DescribeMacro{subcapbesideposition}\label{setup:subcapbesideposition}%^^A +% sets vertical alignment of beside subcaption and subfloat. +% The options analogous to options for |capbesideposition=| key: +% \par\RestoreSpaces +% \begin{Options}{\OptionLabel}\samepage +% \item[top] +% subcaption label aligned to the top of object; +% \item[bottom] +% subcaption label aligned to the bottom of object; +% \item[center] +% subcaption label aligned to the center of float contents. +% \end{Options} +% +% The figure~\ref{fig:subfig:catsII} shows layout with subfloat labels beside. +% \begingroup +% \begin{Quote}% +%\meta{preamble}\nopagebreak +%|...| +%|\floatsetup[figure]{|\hyperref[setup:style]{\texttt{style}}|=plain,|%^^A +% \hyperref[setup:subcapbesideposition]{\texttt{subcapbesideposition}}|=top}| +%\meta{preamble} +% |\begin{figure}[H]| +% | \ffigbox[\FBwidth]| +% | {\begin{subfloatrow}| +% | \sidesubfloat[]{...\label{...}}%| +% | | +% | \sidesubfloat[]{...\label{...}}%| +% | \end{subfloatrow}}| +% |{\caption[...]{...}\label{...}}| +% |\end{figure}| +% \end{Quote} +% \floatsetup[figure]{style=plain,subcapbesideposition=top} +% \begin{figure}[h] +% \ffigbox[\FBwidth] +% {\begin{subfloatrow} +% \sidesubfloat[]{% +% {\input{Cat.picture}\label{subfig:wI}}} % -% \subfloat[Black cat\label{subfig:b}]{\input{TheBlackCat.picture}}% +% \sidesubfloat[]{\input{TheCat.picture}\label{subfig:bI}}% % \end{subfloatrow}} -% {\caption{Beside caption vertically top aligned with fancy -% \texttt{Shadowbox} layout}\label{fig:subfig:catsI}} +% {\caption[Subfloat row (labels beside)]{Beside caption vertically centered. +% There are two subfigures: +% \protect\ref{subfig:wI} and \protect\ref{subfig:bI}}\label{fig:subfig:catsII}} % \end{figure} +% \endgroup +% +% \DescribeMacro{\subfloatlabel} +% There are cases when usage of something like |\subfloat[]{\label{..}}| +% is needed. The first case shows the figure~\ref{fig:subfig:catsIII}---the +% funny \env{picture} environment where subfloat labels were |\put| +% as a part of subfigures. +% Other---when you use mechanism of \package{psfrag} package and replace text entries +% from PostScript file with \LaTeX{} ones. Unfortunately, the \package{subfig} package +% creates unnecessary spaces around alone subfloat label in the +% |\subfloat[]{\label{..}}| combination. The \package{fr-subfig} tries to fix this problem. +% +% This command based on |\subfloat[]{\label{..}}| sentence and +% puts alone subcaption label with necessary number. The full variant +% of |\subfloatlabel| +% \begin{Quote} +% |\subfloatlabel|\oarg{subfloat number}\oarg{label entry} +% \end{Quote} +% is the abbreviation of the following: +% \begin{Quote} +% |\setcounter|\marg{sub{\upshape\texttt{\char`\\@captype}}}\marg{subfloat number-1} +% |\subfloat[]{\label{|\meta{label entry}|}}| +% \end{Quote} % -% \newpage -% \subsection{The \pkg{wrapfig} Package} +% +% \begingroup +% \begin{Quote}% +%\meta{preamble}\nopagebreak +%|...| +%|\floatsetup[figure]{|\hyperref[setup:style]{\texttt{style}}|=plain}| +%|\DeclareCaptionListOfFormat{comma-separated}{#1,\,#2}| +%|\captionsetup[subfigure]{listofformat=comma-separated}| +%\meta{preamble} +% |\begin{figure}[h]| +% |\fcapside[\FBwidth]| +% | {\unitlength2\unitlength\fboxsep-.4pt| +% | \begin{picture}(90,30)(0,0)| +% | \put(0,0){\framebox(40,30)[bl]{}}| +%|...| +% \end{Quote} +% \floatsetup[figure]{style=plain} +% \captionsetup[subfigure]{listofformat=comma-separated} +% \begin{figure}[h] +% \fcapside[\FBwidth] +% {\unitlength2\unitlength\fboxsep-.4pt +% \begin{picture}(90,30)(0,0) +% \put(0,0){\framebox(40,30)[bl]{}} +% \put(2,2){\makebox(0,0)[bl]{\subfloat[]{\label{subfig:wII}}}} +% \put(0,0){ +% \put(8,10){\put(4.5,4.5){\oval(9,9)[t]} +% \put(4.5,4.5){\line(0,1){4.5}} +% \put(0,4.5){\line(1,0){9}}} +% \put(23,10){\put(4.5,4.5){\oval(9,9)[t]} +% \put(4.5,4.5){\line(0,1){4.5}} +% \put(0,4.5){\line(1,0){9}}}} +% +% \put(50,0){\framebox(40,30)[bl]{}} +% \put(52,2){\makebox(0,0)[bl]{\subfloatlabel[3][subfig:bII]{}%^^A +% }}%^^A\label{} +% \put(50,0){ +% \put(6,18){\put(0,0){\line(2,3){5}} +% \put(10,0){\line(-2,3){5}}} +% \put(24,18){\put(0,0){\line(2,3){5}} +% \put(10,0){\line(-2,3){5}}}} +% \end{picture}} +% {\caption[The graphic with subfloat labels]{%^^A +% Here are two simple subfigures. +% First shows cat's eyes (\protect\ref{subfig:wII}), labeled with +% \cs{subfloat}\texttt{[]\char`\{\char`\}} macro; +% with \cs{subfloatlabel}\texttt{[3][subfig:bII]} sentence were labeled the cat's ears +% (\protect\subref{subfig:bII})}%^^A +% \label{fig:subfig:catsIII}} +% \end{figure} +% Please look at the definition of reference to the subfigure, key |listofformat=|. +% This format is used, in particular, by |\subref| command: the |\subref{subfig:bII}| gives +% reference to the subfigure \subref{subfig:bII}. +% \endgroup +% +% \clearpage +% \par\RestoreSpaces +% \subsection{The \package{longtable} Package}\label{ssec:longtable} +% +% Tested with version v4.11, dated 2004/02/01. +% +% \subsubsection{Additions in \package{floatrow}} +% \label{ssec:LTcapwidth} +% +% There was added a patch to the |\LT@array| macro (\package{longtable} +% package)\footnote{Thanks to A. Sommerfeldt for help to make this +% code compact.}: this patch adds the same font settings +% as for \env{table} environments, and adds code which helps +% to get width of \env{longtable} caption equal to the +% width of table. For settings of caption width there was created a key. +% +% \DescribeMacro{LTcapwidth}\label{setup:LTcapwidth}%^^A +% \FRmpar{Caption width equals to longtable's}{FAD:LTcapwidth} +% This key could have any value, like |5cm| or |\hsize|. In this cases this +% key does work of |\LTcapwidth| command. If you'll write +% \texttt{LTcapwidth=table} or \texttt{LTcapwidth=contents}, you will get +% caption width equal to the width of table. In this case settings for +% width of caption use information from \texttt{aux}-file, so you'll get +% correct caption width at the time when the width of full table become +% stable. +% +% The \env{longtable} environment uses layout settings from +% |\floatsetup[table]| and |\floatsetup[longtable]| macros. +% The |\floatsetup[longtable]| will be ``strongest'' in this pair.\medskip +% +% \emph{The addition with version 0.1k}. There is added a +% \textrm{beta-temp}\footnote{Again, like with \package{listpen} package, I +% hope that such support sooner or later could appear in +% \package{longtable} and think it is better to follow +% grammar of master-package for similar situations.} package +% with simple additions, which allow creation of special head for last +% page of longtable environment and special foot for pages before last. +% +%^^A% \DescribeMacro{\LTlastpage} +% \DescribeMacro{\endlasthead} +% \DescribeMacro{\endprelastfoot} +%^^A% The command |\LTlastpage|, defined by hand, tells to \package{longtable}'s +%^^A% redefined macro the number of pages in longtable environment. +% The |\endlasthead| command defined for last head of longtable; second command, +% |\endprelastfoot|, defined for foot on the page before last. +% Since these names of commands ``intrude'' in the \package{longtable} naming +% territory they defined if they are still unknown, i.e. the main, +% \package{longtable}, package didn't defined them. +% The syntax also analogous as for commands |\endhead|, |\endfirsthead| etc. +% (See examples and additional explanation in the sample file +% \texttt{sample-longtable.tex} file.) +% +%^^A% \DescribeMacro{\floatfoot} +% The footnote stuff inside \env{longtable} works like in main +% text and put text of footnotes +% at the bottom of page\footnote{See also \env{longtable} documentation.}. +% The command for legends or explications, |\floatfoot|, in current version +% inside \env{longtable} has emulation mode, and needs stuff, +% similar to |\noalign{\floatfoot{...}}|. Since default font definition for explications (|\floatfoot|) also +% set to |\footnotesize|, like for footnotes, you may put footnotes-emulations at this +% explication block, using |\mpfootnotemark| commands. +% +% \clearpage +% \subsection{The \package{wrapfig} Package}\label{ssec:wrapfig} % % \begingroup % \def\FBaskip{-12pt} @@ -2404,25 +3684,24 @@ % footposition=caption} % \begin{wrapfigure}[10]{O}{40mm} %^^A \ffigbox[40mm] -% {\caption{Wrapped plain figure (\pkg{wrapfig} package)}% +% {\caption{Wrapped plain figure (\package{wrapfig} package)}% % \floatfoot{Plain figure fails with package version % 3.3}\label{fig:wrapfig:WcatI}} -% {\unitlength1.2\unitlength -% \ifx\pspicture\undefined\else\psset{unit=\unitlength}\fi +% {\unitlength1.095\unitlength % \input{TheCat.picture}} % \end{wrapfigure} % -% Tested with version 3.3 dated 1999/10/12 (style from \pkg{ltxmisc} +% Tested with version 3.3 dated 1999/10/12 (style from \package{ltxmisc} % bundle) and 3.6 dated 2003/01/31 (the separate \LaTeX\ package). % % Options for environment (text borrowed from package comments): -% \begin{quote} -% |\begin{wrapfigure}%|\\* -% \strut\quad\oarg{number}\marg{placement}|%|\\* -% \strut\quad\oarg{overhang}\marg{width of figure}\\ -% |...|\\* +% \begin{Quote} +% |\begin{wrapfigure}%|\nopagebreak +% \strut\quad\oarg{number}\marg{placement}|%|\nopagebreak +% \strut\quad\oarg{overhang}\marg{width of figure} +% |...| % |\end{wrapfigure}| -% \end{quote} +% \end{Quote} % \meta{Placement} is one of \texttt{r}, \texttt{l}, \texttt{i}, % \texttt{o}, \texttt{R}, \texttt{L}, \texttt{I}, \texttt{O}, for % right, left, inside, outside. Lowercase letters set unfloated @@ -2431,33 +3710,33 @@ % |\wrapoverhang|, which is normally zero. The \meta{number} of % wrapped text lines is normally calculated from the height of the % figure, but may be specified manually, e.g. -% \begin{quote} -% |\begin{wrapfigure}[10]{r}[34pt]{5cm}|\\* \meta{figure}\\* +% \begin{Quote} +% |\begin{wrapfigure}[10]{r}[34pt]{5cm}|\nopagebreak +% \meta{figure}\nopagebreak % |\end{wrapfigure}| -% \end{quote} +% \end{Quote} % \endgroup % % \begingroup % \def\FBaskip{-12pt} % \floatsetup[figure]{style=BOXED,frameset={\fboxsep12pt}} -% \begin{wrapfigure}[14]{O}{0mm} -% \ffigbox[40mm] -% {\par{\setlength\unitlength{\hsize/64}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{TheCat.picture}}} -% {\caption{Wrapped figure in \cmd{\ffigbox} (\pkg{wrapfig} package)}% +% \par\begin{wrapfigure}[12]{o}{0mm} +% \ffigbox[44mm] +% {\par{\setlength\unitlength{.75\hsize/48}%^^A +% \input{Cat.picture}}} +% {\caption{Wrapped figure in \cmd{\ffigbox} (\package{wrapfig} package)}% % \label{fig:wrapfig:WcatII}} % \end{wrapfigure} % % \emph{Floatrow note.} % For figure, placed in \env{wrap...} environment you must set width % in mandatory argument. If you'll write \texttt{0mm} as \marg{width -% of figure} argument, \pkg{wrapfig} package will count natural width +% of figure} argument, \package{wrapfig} package will count natural width % of float contents. % % Sometimes above (below) float box in \env{wrap...} environment % appears unwanted space. To correct vertical position, use |\FBaskip| -% (|\FBbskip|) commands (see section~\ref{sec:FBabskips}). +% (|\FBbskip|) commands (see {\sectionname}~\ref{sec:FBabskips}). % % \emph{Special settings}. % @@ -2468,29 +3747,29 @@ % \begin{itemize}\itemsep0pt % \item % % if exists |\floatsetup[wrap|\meta{captype}|]{...}| -% \pkg{floatrow} uses these settings---they are the ``strongest'' +% \package{floatrow} uses these settings---they are the ``strongest'' % settings; if they absent---uses settings of next item; %^^A \end{itemize} % %^^A \begin{itemize} % \item % if exists |\floatsetup[wrapfloat]{...}| -% \pkg{floatrow} uses these settings---these settings ``stronger'' +% \package{floatrow} uses these settings---these settings ``stronger'' % than next ones; if they absent---settings of current % float\\[\medskipamount] % |\floatsetup[|\meta{captype}|]{...}|\,;\\[\medskipamount] % if they absent---uses default settings -% (|\floatsetup{...}| or package settings). +% (|\floatsetup{...}| or package settings inside |\usepackage| command). % \end{itemize} % % -% \emph{Founded limitations}. +% \emph{Founded limitations}.\nopagebreak % % The usage of plain float environment in version 3.3 will -% not succeed with current version of \pkg{floatrow}---use |\floatbox| +% not succeed with current version of \package{floatrow}---use |\floatbox| % stuff. The version 3.6 allows usage of plain \env{wrap...} -% environment with \texttt{plain} (or \texttt{ruled}) styles, but -% the framed styles, like \texttt{Boxed} (where text inside frames +% environment with \hyperref[setup:plain]{\texttt{plain}} (or \hyperref[setup:ruled]{\texttt{ruled}}) styles, but +% the framed styles, like \texttt{Boxed} (which use key |framefit=yes|, where text inside frames % changes its |\hsize| to fit frames, fitted to defined |\hsize|) % could work only with |\floatbox| macro, otherwise you'll get % incorrect widths and layout. @@ -2498,16 +3777,15 @@ % % \begingroup % \floatsetup[figure]{style=WSHADOWBOX,captionskip=8pt} -% \subsection{The \pkg{floatflt} package} +% \subsection{The \package{floatflt} package}\label{ssec:floatflt} % -% \begin{floatingfigure}[v]{40mm}\def\FBaskip{-2.5pt} -% \ffigbox[42mm] -% {\setlength\unitlength{.85\hsize/60}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi +% \begin{floatingfigure}[v]{44mm}\def\FBaskip{-2.5pt} +% \ffigbox[44mm] +% {\setlength\unitlength{\hsize/60}%%^^A % \input{BlackDog.picture}} % {\caption{\hyphenpenalty-100\pretolerance-1% % Wrapped figure inside \env{floating\-figure} environment -% (\pkg{floatflt})}\label{fig:floatflt:WcatI}} +% (\package{floatflt})}\label{fig:floatflt:WcatI}} % \end{floatingfigure}%\FBbuildtrue % % \noindent Tested with version v\kern-1pt.1.3 dated @@ -2518,10 +3796,10 @@ % environments need usage of |\floatbox| in any case, you can use % either \env{floatingfigure} or \env{floatingtable} and put % necessary float type in |\floatbox| argument (or use necessary -% macro-abbreviation). +% macro abbreviation, like |\ffigbox|). % % -% The next limitations could not tied with \pkg{floatrow} package. +% The next limitations could not tied with \package{floatrow} package. % % 2)\enskip If you put \env{floatingfigure} environment just after % |\...section| command you need (if you do not indentation after @@ -2535,30 +3813,28 @@ % |\makeatletter\@nobreakfalse\makeatother| (as was made in just % before next section). % -% \makeatletter\@nobreakfalse\makeatother +% \RestoreSpaces % -% %^^A \penalty-10000 +% %^^A\newpage % -% \subsection{The \pkg{picins} Package} +% \subsection{The \package{picins} Package}\label{ssec:picins} % % \floatsetup[figure]{style=ruled} % % \parpic[l]{{%\def\floatrowsep{}\let\FBiffloatrow\iftrue -% \def\FBbskip{14pt} +% \def\FBaskip{6pt}\def\FBbskip{14pt} % \ffigbox[42mm] -% {{\setlength\unitlength{18mm/61}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{BlackCat.picture}}} +% {{\setlength\unitlength{20mm/72}%^^A +% \input{TheDog.picture}}} % {\caption{Wrap\-ped figure (\cmd{\parpic}); -% \cmd{\floatbox} -% with \cmd{\FBwidth} option}\label{fig:parpic:BcatI}}% +% \cmd{\floatbox}}\label{fig:parpic:BcatI}}% % }} % % \noindent Tested with version v\,3.0 dated 1999/10/12. % % This package produces pictures inside paragraph. This package % supports usage of captions with command |\piccaption|. It also allows -% the \pkg{caption} package settings. +% the \package{caption} package settings. % % The \cmd{\parpic} macro usually allows usage of |\floatbox| macro % inside of its mandatory argument. @@ -2566,21 +3842,22 @@ %^^A \emph{Founded limitations}.\nopagebreak % %^^A 1)\enskip In |\parpic| argument you ought to put before |\floatbox| -%^^A following commands:\\[\medskipamount] +%^^A following commands: +%^^A \begin{Quote}% %^^A |\def\floatrowsep{}|\allowbreak -%^^A |\let\FBiffloatrow\iftrue|\\[\medskipamount] +%^^A |\let\FBiffloatrow\iftrue| +%^^A \end{Quote}% %^^A to get correct layout. % -% The next limitations could not tied with \pkg{floatrow} package. +% The next limitations could not tied with \package{floatrow} package. % %^^A \floatsetup[figure]{style=DOUBLEBOX} % %^^A \parpic[r]{{%\def\floatrowsep{}\let\FBiffloatrow\iftrue %^^A \hsize36mm %^^A \ffigbox[\hsize] -%^^A {{\setlength\unitlength{16mm/61}\ifx\pspicture\undefined -%^^A \else\psset{unit=\unitlength}\fi -%^^A \input{BlackCat.picture}}} +%^^A {{\setlength\unitlength{16mm/61}%^^A +%^^A \input{TheDog.picture}}} %^^A {\caption{Wrapped figure (\cmd{\parpic})}\label{fig:parpic:BcatII}}% %^^A }} % @@ -2599,33 +3876,36 @@ % % \endgroup % -% \subsection{The \pkg{rotating} Package and \env{sideways\ldots} -% Environment} +% \subsection{The \package{rotating} Package and \env{sideways\ldots} +% Environment}\label{ssec:rotating} % % Tested with version v2.13 dated Sep. 1992. % % There is example (figure~\ref{fig:rot}) with rotated float, using % \env{sidewaysfigure}. -%\begin{verbatim} -%\floatsetup[figure]{style=WSHADOWBOX} -%\begin{sidewaysfigure}\emptyfloatpage -%\ffigbox[\FBwidth] -%{\includegraphics[width=4in]{pslearn.eps}} -%{\caption{Figure inside \env{sidewaysfigure} environment}% -%\label{fig:rot}} -%\end{sidewaysfigure}% -%\end{verbatim} -% \floatsetup[figure]{style=WSHADOWBOX} +%\begin{Quote} +%\meta{preamble} +%|\floatsetup[|\hyperref[setup:rotfigure]{\texttt{rotfigure}}|]{|%^^A +% \hyperref[setup:style]{\texttt{style}}|=WSHADOWBOX}| +%\meta{preamble} +%|\begin{sidewaysfigure}\emptyfloatpage| +%|\ffigbox[\FBwidth]| +%| {...}| +%| {\caption{Figure ...}%| +%| \label{...}}| +%|\end{sidewaysfigure}%| +%\end{Quote} +% \floatsetup[rotfigure]{style=WSHADOWBOX} % \begin{sidewaysfigure}\emptyfloatpage % \ffigbox[\FBwidth] {\includegraphics[width=4in]{pslearn}} % {\caption{Figure inside \env{sidewaysfigure} environment}% -% \label{fig:rot}} +% \label{fig:rot:ii}} % \end{sidewaysfigure}% % %^^A For rotating floats on right side (like in % %^^A current documentation) put in preamble -% %^^A \begin{quote} +% %^^A \begin{Quote} % %^^A |\usepackage[figuresright]{rotating}| -% %^^A \end{quote} +% %^^A \end{Quote} % % % \emph{Special settings}.\nopagebreak @@ -2634,6 +3914,7 @@ % \env{sideways...} environment (see page \pageref{stsetorder}). % % For one-column rotated float +% \par\RestoreSpaces % \begin{itemize} % \item % % if exists |\floatsetup[rot|\meta{captype}|]{...}| @@ -2645,7 +3926,7 @@ % ones; if they absent---settings for current float % (|\floatsetup[|\meta{captype}|]{...}|); % if they absent---uses default settings -% (|\floatsetup{...}| or package settings). +% (command |\floatsetup{...}| or package settings). % \end{itemize} % % For two-column or wide rotated float (starred environment) @@ -2681,31 +3962,36 @@ % % \emph{Notes}.\nopagebreak % -% 1)\enskip If you place two continued rotated floats on facing pages, +% 1)\enskip If you place two continued rotated floats%^^A +% \FRmpar{Continued rotated floats}{FAD:ContRotated} on facing pages, % the better way is to gather them to binder margin. For this reason you -% may define\footnote{In case \pkg{rotating} package has |[figuresright]| +% may define\footnote{In case of \package{rotating} package has |[figuresright]| % option, see also files \file{frsample10.tex}--\file{frsample12.tex} % and code in \file{fr-sample.tex}.} before first float -% \begin{quote} +% \begin{Quote} % |\buildFBBOX{\vbox to\rottextwidth\bgroup\vss}{\egroup}| -% \end{quote} +% \end{Quote} % and before second one -% \begin{quote} +% \begin{Quote} % |\buildFBBOX{\vbox to\rottextwidth\bgroup}{\vss\egroup}| -% \end{quote} +% \end{Quote} % \medskip -% The |\rottextwidth| dimension---here is saved |\textwidth| of +% The |\rottextwidth| dimension---here is saved parameter |\textwidth| of the % document---the |\columnwidth| and |\textwidth| inside % \texttt{sideways...} environment are redefined and equal to % |\textheight|. % -% 2)\enskip In current example you may see command |\emptyfloatpage|. -% It is offered by \pkg{floatpagestyle} package, (installed with -% \pkg{floatrow} package). Macro |\emptyfloatpage| is abbreviation of +% 2)\enskip In current example you may see command |\emptyfloatpage|.%^^A +% \FRmpar{Empty page style for rotated floats}{FAD:emptyfloatpage} +% It is offered by \package{floatpagestyle} package, (installed with +% \package{floatrow} package). Macro |\emptyfloatpage| is abbreviation of % |\floatpagestyle{empty}|. The last macro redefines page style for % the page where \emph{current} float environment appears. % -% The version 0.1h patches the core \LaTeX{} macro |\@outputpage| +% The version 0.1h patches the core \LaTeX{} macro +% |\@outputpage|\footnote{At the start of document +% \package{floatpagestyle} package puts additional code at the very beginning +% of this output routine.} % and I hope that it could work.\footnote{If you know more honest % way to get the same result---the redefinition of \emph{alone} % \emph{float} page style (in the case when this page can \emph{float} @@ -2713,23 +3999,28 @@ % |\label|---|\ref| mechanism, the |\floatpagestyle| command works % after \emph{second} \LaTeX{} run. % -% \subsection{The \pkg{lscape} Package and \env{landscape} Environment} +% \RestoreSpaces +% \subsection{The \package{lscape} Package and \env{landscape} +% Environment}\label{ssec:lscape} % % Tested with version v3.0a dated 1999/02/16.\nopagebreak % %\ifx\landscape\undefined\else % \ifx\landscape\relax\else % The example with usage of \env{landscape} environment from -% \pkg{lscape} package on the page~\pageref{fig:rotrow:WcatI}, figures +% \package{lscape} package on the page~\pageref{fig:rotrow:WcatI}, figures % \ref{fig:rotrow:WcatI}--\ref{fig:rotrow:FcatI}): -%\begin{verbatim} -%\DeclareFloatVCode{lowthickrule}{\kern2pt\hrule height.8ptdepth0pt} -%\floatsetup[figure]{style=ruled,rowprecode=thickrule, -% rowpostcode=lowthickrule,capposition=TOP} -%\begin{landscape} -%\begin{figure}\emptyfloatpage -%... -%\end{verbatim} +% \par\RestoreSpaces +%\begin{Quote} +%\meta{preamble} +%|\DeclareFloatVCode{lowthickrule}{\kern2pt\rule{\hsize}{.8pt}}| +%|\floatsetup[figure]{style=ruled,rowprecode=thickrule,| +%| rowpostcode=lowthickrule,capposition=TOP}| +%\meta{preamble} +%|\begin{landscape}| +%|\begin{figure}\emptyfloatpage| +%|...| +%\end{Quote} % |\floatsetup| code sets \texttt{ruled} float style, % then settings for above and below material are redefined: % \texttt{rowprecode=} and \texttt{rowpostcode=} keys define thick @@ -2738,96 +4029,64 @@ %\fi\fi % % The \env{landscape} environment creates a new page. It would be -% useful to start new section of document, e.g., appendix. (In current +% useful to rotate the whole new section of document, e.g., appendix. (In current % document it was placed just before appendix) % %^^A \emph{Founded limitations}.\nopagebreak %^^A The tested version works incorrect (does not rotates contents) -%^^A with \pkg{hypcap} package. +%^^A with \package{hypcap} package. % -% \subsection{The \pkg{listings} Package} +% \subsection{The \package{listings} Package}\label{ssec:listings} % % Tested with version v1.3 dated 2004/09/07.\nopagebreak % % This package has its strong layout mechanism for creation for floating -% algorithms itself. The usage of |\lstset| command and \pkg{caption} +% algorithms itself. The usage of |\lstset| command and \package{caption} % package settings gives you necessary result\footnote{Please note and read -% \pkg{caption} documentation: the co-operation of \pkg{caption}3.x and -% \pkg{listings} succeeds with version of last one not older than 1.2.} +% \package{caption} documentation: the co-operation of \package{caption}3.x and +% \package{listings} succeeds with version of last one not older than 1.2.} % for algorithm type of float. % -% \iffalse -% For the cases of appearance of listings inside of other float -% environments e.g. inside \env{figure} environments with boxed styles -% like \texttt{Boxed} and \texttt{BOXED} and with predefined float -% width, you ought to set: -% \begin{quote} -% |\lstset{linewidth=\hsize}| -% \end{quote} -% in the preamble, or just before \env{lstlisting} environment. Or in -% optional argument of \env{lstlisting} environment---here you must set -% width like: -% \begin{quote} -% |\begin{lstlisting}[linewidth=\hsize]| -% \end{quote} -% \fi -% % For the cases of appearance of listings inside of other float -% environments, which get settings from \pkg{floatrow}package, +% environments, which get settings from \package{floatrow} package, % there is a limitation: you can't put \env{lstlisting} inside % |\floatbox| contents. % -% \subsection{The \pkg{longtable} Package} +% \subsection{The \package{hyperref} and \package{hypcap} Packages} % -% There was added a patch to the |\LT@array| macro (\pkg{longtable} -% package)\footnote{Thanks to A. Sommerfeldt for help to make this -% code compact.}: this patch adds the same font settings -% as for \env{table} environments, and adds code which helps -% to get width of \env{longtable} caption equal to the -% width of table. For settings of caption width there was created a key. -% -% \DescribeMacro{LTcapwidth=} -% This key could have any value, like |5cm| or |\hsize|. If you'll write -% \texttt{LTcapwidth=table} or \texttt{LTcapwidth=contents}, you will get -% caption width equal to the width of table. In this case settings for -% width of caption use information from \texttt{aux}-file, so you'll get -% correct caption width at the time when the width of full table become -% stable. -% -% The \env{longtable} environment uses layout settings from -% |\floatsetup[table]| and |\floatsetup[longtable]| macros. -% The |\floatsetup[longtable]| will be ``strongest'' in this pair. -% -% \subsection{The \pkg{hyperref} and \pkg{hypcap} Packages} +% There were tested versions v6.74i (\package{hyperref}) +% and v1.3 (\package{hypcap}). % -% There were tested versions v6.74i (\pkg{hyperref}) -% and v1.3 (\pkg{hypcap}). -% -% The \pkg{floatrow} tries not to expand its code to |\caption| stuff. -% I hope that environments supported by \pkg{floatrow} won't -% make harm to \pkg{caption}---\pkg{hyperref}/\pkg{hypcap} tandem. +% The \package{floatrow} tries not to expand its code to |\caption| stuff. +% I hope that environments supported by \package{floatrow} won't +% make harm to \package{caption}---\package{hyperref}/\package{hypcap} tandem. % % \subsection{The Incompatibilities} % % The incompatibilities at first could follow the incompatibilities of -% \pkg{caption} 3.x package: -% \begin{quote} -% \pkg{ccaption}, \pkg{hvfloat}, \pkg{nonfloat} -% \end{quote} -% -% The known incompatibilities of \pkg{floatrow} package itself -% is \pkg{sidecap} package\footnote{Despite that I'm trying -% to follow offered layouts of this package. Great thanks for -% Rolf Niepraschk and Hubert G\"{a}\ss{}lein for package with +% \package{caption} 3.x package: +% \begin{Quote} +% \package{ccaption}, \package{hvfloat}, \package{nonfloat}, \package{captcont}, \package{ccaption}, +% \package{ftcapt}, (\package{hvfloat}), \package{multicap}, \package{topcapt}, \package{nonfloat} +% \end{Quote} +% +% The known incompatibilities of \package{floatrow} package itself: +% \quad 1)\nobreak\enskip \package{sidecap} package\footnote{Despite that +% I'm trying to follow all offered layouts of this package. Great thanks +% for Rolf Niepraschk and Hubert G\"{a}\ss{}lein for package with % rich implementation of such float -% layouts.}: the \pkg{floatrow} package doesn't expands its +% layouts.}: the \package{floatrow} package doesn't expands its % layouts to \env{SCfigure} and \env{SCtable} environments. +% \quad 2)\nobreak\enskip \package{ctable} package; if you used to use +% \package{ctable}'s tools, e.g. for tables, please set |\RawFloats[table]| +% in the preamble, and remember that commands like |\ttabbox| won't +% loose its strength (see also {\sectionname}~\ref{sec:rawfloats}). % % \addtocontents{toc}{\string\pagebreak[3]} % \section{Limitations} % % There are known limitations, which were found during usage of -% \pkg{floatrow}: +% \package{floatrow}: % \begin{itemize} % %^^A \item % % %^^A Limitations for boxed and ruled styles in beside floats: be @@ -2840,7 +4099,7 @@ % You cannot use |\floatbox| stuff for floats with \texttt{verbatim} % environment and/or |\verb|. % \item % -% This limitation was mentioned above: the package uses +% This limitation was mentioned above: some tools of the package use % |\label|---|\ref| mechanism, thus, if you use float layout which % demands common height of objects and/or captions in float row, % you'll get correct result after second or more runs. If you change @@ -2850,8 +4109,8 @@ % Beside captions and other facing layout will appears correctly only % after second \LaTeX's run (sometimes you need to run more times). % \item % -% The version 3.0a (and newer) of \pkg{caption} package and -% \pkg{floatrow} package do not support optional argument \emph{after} +% The \package{caption} and +% \package{floatrow} package do not support optional argument \emph{after} % caption ``title''. You may use |\floatfoot| % macro after main caption argument. % \item % @@ -2902,7 +4161,7 @@ % % Thanks for Steven Cochran and Axel Sommerfeldt for all their advices % and spirit. Special thanks for Axel for the patient answering, code, and -% help in \emph{all} my questions and problems in \pkg{floatrow} package. +% help in \emph{all} my questions and problems in \package{floatrow} package. % % \medskip\noindent % Thanks for \emph{all} involuntary (\La)\TeX{} teachers, who teaches @@ -2917,11 +4176,11 @@ % \emph{Thanks for \emph{all} authors of second edition of \LaTeX{} % Companion for this book.} % -%\ifx\landscape\undefined\else +%\ifx\landscape\undefined\else\begingroup % \ifx\landscape\relax\else % \clearfloatsetup{figure} % \floatsetup[figure]{style=ruled,rowprecode=thickrule, -% rowpostcode=lowthickrule,capposition=TOP, +% rowpostcode=lowthickrule,capposition=TOP,margins=hangtoheads, % footposition=caption} % \newlength\Mylen\Mylen\textwidth % @@ -2929,40 +4188,39 @@ % % \begin{figure}\emptyfloatpage % -% \begin{floatrow}[4] +% \begin{floatrow}[4]\label{example:ruledcapposTOP}%^^A % \ffigbox[][][t] % {{\input{TheCat.picture}}%^^A % \footnotetext[1]{The % picture was created with \cmd{\qbezier} % macro}}% -% {\caption[Beside figure~I, top of object box]% -% {Beside figure~I, top of object box\protect\mpfootnotemark}% +% {\caption[Figure in the row~I, top of object box]% +% {Figure in the row~I, top of object box\protect\mpfootnotemark}% % \label{fig:rotrow:WcatI}}% % % \floatbox{figure}[2\FBwidth][][b] -% {\caption{Beside figure~II, bottom of object box}% +% {\caption{Figure in the row~II, bottom of object box}% % \label{fig:rotrow:BcatI}% % \floatfoot{There are all \cmd{\qbezier} macros and only % two vertical lines}}% % {\input{BlackCat.picture}}% % % \ffigbox[\FBwidth] -% {{\unitlength2.5\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{Mouse.picture}}\footnote[2]% +% {{\unitlength2.5\unitlength +% \input{Cat.picture}}\footnote[2]% % {Look at funny footnotemark!}} -% {\caption{Beside figure~III, center of object box}% +% {\caption{Figure in the row~III, center of object box}% % \label{fig:rotrow:mouseI}\floatfoot{The Mouse-animal image}}% % % \floatbox{figure}[\Xhsize][\Mylen] -% {\caption{Beside figure~IV}\label{fig:rotrow:FcatI}} +% {\caption{Figure in the row~IV}\label{fig:rotrow:FcatI}} % {\Resizebox\hsize\vsize{35}{136}{\input{BlackCat2.picture}}} % \end{floatrow} % % \end{figure} % % \end{landscape} -%\fi\fi +%\endgroup\fi\fi % % \clearpage % \suppressfloats[t] @@ -2970,106 +4228,25 @@ % % \subsection{Miscellaneous} % -% \subsubsection{Mixed Row} -% -% \floatsetup[figure]{style=Boxed,midcode=captionskip, -% frameset={\fboxsep12pt\fboxrule1pt}} -% Sometimes author (or designer) wants to put different types of floats, -% e.g., table and figure beside in one row. This situation creates -% some problems. -% -% The first problem is that you must put different types of float in -% one float environment, which sets its own layout for included float -% box(es). For creation of right layouts write -% |\killfloatstyle| command at the beginning of \env{floatrow} -% environment or just before first ``foreign'' |\floatbox| macro (in -% current example---before |\ttabbox|; the |\ffigbox| macro is -% ``native'' for \env{figure} environment). -% -% The second problem is that figures usually have captions below -% graphics, but tables could have caption \emph{above} their contents. -% The alignment of all floats is similar: the bottom of upper part and -% top of lower part. In this case if you want to put such beside figure -% and table you'll get undesirable result. For such situations you may -% use one of following commands: -%\begin{verbatim} -%\CenterFloatBoxes -%\TopFloatBoxes -%\BottomFloatBoxes -%\end{verbatim} -% which align \emph{full} float boxes by center, top or bottom lines. -% These macros were created by |\buildFBBOX| macro. -% There is also |\PlainFloatBoxes| which restores standard behavior of -% |\floatbox|'es. -% -% The usage of |\CenterFloatBoxes| and |\killfloatstyle| you'll see in -% mixed float row with figure~\ref{fig:rowmixspec:WcatI} and -% table~\ref{tab:rowmixspec:tabI}\label{mixrow}: -% \DeleteShortVerb{\|}% -% \begin{figure} -% \begin{floatrow} -% \CenterFloatBoxes \killfloatstyle -% \ffigbox[\FBwidth] -% {{\unitlength1.15\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{TheCat.picture}}} -% {\caption{Figure (\texttt{Boxed} style) beside table -% (vertical centering)}\label{fig:rowmixspec:WcatI}}% -% \extrarowheight1pt -% \ttabbox -% {\caption{Table beside \texttt{Boxed}-styled figure -% (vertical centering)}\label{tab:rowmixspec:tabI}} -% {\begin{tabular}{|l|c|c|c|} -% \hline -% \multirowthead{2}[-1ex]{Column Head} -% & \multicolumn{3}{c|}{\thead{Data}} \\ -% \cline{2-4} -% & \thead{I} & \thead{II} & \thead{III} \\ -% \hline -% First row & 1 & 2 & \phantom01 \\ -% Second row & 3 & 4 & \phantom06 \\ -% Third row & 6 & 8 & 28 \\ -% \hline -% \end{tabular}} -% \end{floatrow} -% \end{figure} -% \MakeShortVerb{\|}% -%\begin{verbatim} -%\begin{figure} -%\begin{floatrow} -%\CenterFloatBoxes\killfloatstyle -%\ffigbox[\FBwidth] -% ... -%\ttabbox -% ... -%\end{verbatim} -% -% \emph{Note.} Both figure and table boxes have got width equal to -% contents of objects. The |\ffigbox| command has optional argument -% |[\FBwidth]|, but |\ttabbox| have not any option---it uses -% |[\FBwidth]| option as default (see definitions on page -% \pageref{abbrcom}). -% -% -% \subsubsection{Usage of Captionsetup and Thisfloatsetup -% Inside Floatbox Stuff} +% \subsubsection{Usage of Captionsetup +% Inside Floatbox Stuff}\label{ssec:app:besidestart} % % Example of figures in row (figures~\ref{floatbox:FR:lfig} and % \ref{floatbox:FR:fig}). There were used predefined float commands % |\fcapsideleft| and |\fcapsideright| with added |\captionsetup| and % |\thisfloatsetup|: -%\begin{verbatim} -%\newfloatcommand{fcapsideleft}{figure}[{\capbeside -% \captionsetup[capbesidefigure]{format=break,labelsep=none, -% justification=raggedleft}% -% \thisfloatsetup{capbesideposition=left}}]% -% [\FBwidth] -%\newfloatcommand{fcapsideright}{figure}[{\capbeside -% \captionsetup[capbesidefigure]{format=break,labelsep=none, -% justification=raggedright}% -% \thisfloatsetup{capbesideposition=right}}]% -% [\FBwidth] -%\end{verbatim} +%\begin{Quote} +%|\newfloatcommand{fcapsideleft}{figure}[{\capbeside| +%| \captionsetup[capbesidefigure]{format=break,labelsep=none,| +%| justification=raggedleft}%| +%| \thisfloatsetup{capbesideposition=left}}]%| +%| [\FBwidth]| +%|\newfloatcommand{fcapsideright}{figure}[{\capbeside| +%| \captionsetup[capbesidefigure]{format=break,labelsep=none,| +%| justification=raggedright}%| +%| \thisfloatsetup{capbesideposition=right}}]%| +%| [\FBwidth]| +%\end{Quote} % % \clearfloatsetup{figure} % \floatsetup[figure] @@ -3081,35 +4258,33 @@ % \begin{figure}[b!] % \begin{floatrow} % \fcapsideleft -% {\unitlength1.44\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{TheCat.picture}} -% {\caption{%^^A +% {\unitlength1.44\unitlength +% \input{Cat.picture}} +% {\caption[Float in the row with beside caption (graphic box has width of its contents)]{%^^A % Float box (\cmd{\fcapsideleft}) % width of graphics}\label{floatbox:FR:lfig}}% % \hsize\Xhsize \fcapsideright[\hsize] -% {\setlength\unitlength{\hsize/61}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi +% {\setlength\unitlength{\hsize/61}%^^A % \input{BlackCat.picture}}% -% {\caption{%^^A +% {\caption[Float in the row with beside caption (occupies rest space)]{%^^A % Float box (\cmd{\fcapsideright}) % width of rest float row space}\label{floatbox:FR:fig}}% % \end{floatrow}% % \end{figure}% % The caption format \texttt{break} was defined by following way: -%\begin{verbatim} -%\DeclareCaptionFormat{break}{#1#2\par#3\par} -%\end{verbatim} +%\begin{Quote} +%|\DeclareCaptionFormat{break}{#1#2\par#3\par}| +%\end{Quote} % % For these figures created following \verb|\floatsetup| settings: -%\begin{verbatim} -%\floatsetup[figure] -% {style=Boxed,capposition=beside, -% objectset=centering,floatwidth=\columnwidth, -% capbesidewidth=5.75cc,capbesidesep=cicero,margins=centering, -% capbesideframe=yes,floatwidth=sidefil} -%\end{verbatim} -% The key \texttt{floatwidth=sidefill} means that in the case of +%\begin{Quote} +%|\floatsetup[figure]| +%| {style=Boxed,capposition=beside,| +%| objectset=centering,floatwidth=\columnwidth,| +%| capbesidewidth=5.75cc,capbesidesep=cicero,margins=centering,| +%| capbesideframe=yes,floatwidth=sidefil}| +%\end{Quote} +% The key \texttt{floatwidth=sidefil} means that in the case of % caption has predefined width, object occupies the rest space of % \verb|\hsize| (in the case of no \meta{width} option used, or used % \verb|\hsize| option). @@ -3117,9 +4292,9 @@ % Left figure uses width of graphics, left one occupies the rest of % float row---for this reason just before \verb|\fcapsideright| % command was written tricky setting: -%\begin{verbatim} -%\hsize\Xhsize -%\end{verbatim} +%\begin{Quote} +%|\hsize\Xhsize| +%\end{Quote} % which, in case of caption placed beside float object defines width % of full float box. % @@ -3145,56 +4320,53 @@ % float environment.}). The object---caption box in this case aligned % using alignment settings from |margins| key (its options defined % by |\setfloatmargins| or |\floatcapbesidemargins| macro). In this -% documentation they are centered (see page~\pageref{fsetup:besmarg}). -%\begin{verbatim} -%\begin{figure} -%\floatbox[\capbeside\useFCwidth]{figure}[\FBwidth] -% ... -%\end{figure} -%\end{verbatim} +% documentation they are centered (see page~\pageref{setup:DeclareMarginSet}). +%\begin{Quote} +%\meta{preamble} +%|\floatsetup[figure]{style=plain}| +%\meta{preamble} +%|\begin{figure}| +%|\floatbox[\capbeside\useFCwidth]{figure}[\FBwidth]| +%| ...| +%|\end{figure}| +%\end{Quote} % \clearfloatsetup{figure} % \floatsetup[figure]{style=plain} % -% \begin{figure}[h] +% \begin{figure}[H] % \floatbox[\capbeside\useFCwidth]{figure}[\FBwidth] % {\caption[Beside % caption, width equals to caption's text]{Beside % caption}\label{fig:Idog:w}} -% {{\setlength\unitlength{{4cm}/60}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi +% {{\setlength\unitlength{{4cm}/60}%^^A % \input{BlackDog.picture}}} % \end{figure}% % -% The settings for current float: -%\begin{verbatim} -%\floatsetup[figure]{style=plain} -%\end{verbatim} % % \subsubsection{Predefined Beside Caption Width with -% The Rest Space for Object} +% The Rest Space for Object}\label{FAD:RestSpaceforObject} % % The figure \ref{fig:capbeside:trick} uses following float style:%^^A %^^A \footnote{There are also addition settings for captions: %^^A \cmd{\captionsetup[capbesidefigure]}\allowbreak %^^A \texttt{\{format=default,}\allowbreak\texttt{labelsep=none\}} -%^^A which is necessary for current documentation: the \pkg{hyperref} +%^^A which is necessary for current documentation: the \package{hyperref} %^^A creates unwanted result with empty argument of caption title. The %^^A same settings used for figures~\ref{floatrow:pre:figI} and %^^A \ref{floatrow:pre:figII}} -%\begin{verbatim} -%\floatsetup[figure] -% {style=Boxed,capposition=beside,objectset=centering, -% floatwidth=\columnwidth,capbesidewidth=\Mylen, -% capbesideposition=left,capbesidesep=cicero, -% margins=centering,capbesideframe=yes, -% floatwidth=sidefil} -%\end{verbatim} -% The \verb|\Mylen| dimension was defined as width of caption label: -%\begin{verbatim} -%\newdimen\Mylen -%\settowidth\Mylen{\captionfont\captionlabelfont -% \figurename\ \thefigure} -%\end{verbatim} +%\begin{Quote} +%\meta{preamble} +%|\renewlengthtocommand\settowidth\Mylen{\captionfont\captionlabelfont| +%| \figurename\ \thefigure}| +%\meta{preamble} +%|\floatsetup[figure]| +%| {style=Boxed,capposition=beside,objectset=centering,| +%| floatwidth=\columnwidth,capbesidewidth=\Mylen,| +%| capbesideposition=left,capbesidesep=cicero,| +%| margins=centering,capbesideframe=yes,| +%| floatwidth=sidefil}| +%\end{Quote} +% The \verb|\Mylen| dimension was defined as width of caption label. % % \clearfloatsetup{figure} % \floatsetup[figure] @@ -3202,41 +4374,40 @@ % floatwidth=\columnwidth,capbesidewidth=\Mylen, % capbesideposition=left,capbesidesep=cicero, % margins=centering,capbesideframe=yes,floatwidth=sidefil} -% \newdimen\Mylen\settowidth\Mylen{\captionfont\captionlabelfont +% \renewlengthtocommand\settowidth\Mylen{\captionfont\captionlabelfont % \figurename\ \thefigure} % -% \begin{figure} +%\begingroup +% \begin{figure}[H] %^^A \captionsetup[capbesidefigure]{format=default,labelsep=none} % \fcapside -% {\unitlength1.1\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{TheCat.picture}} -% {\caption{}\label{fig:capbeside:trick}} +% {\unitlength1.44\unitlength +% \input{Horse.picture}} +% {\caption[The box of beside caption has width of caption contents (here: caption label)]{}\label{fig:capbeside:trick}} % \end{figure}% +%\endgroup % % -% \subsubsection{Caption Beside with Centered Object} +% \subsubsection{Caption Beside with Centered Object}\label{FAD:CapandCenterObj} % % The figure \ref{fig:plain:trick} uses tricky float style: -%\begin{verbatim} -%\floatsetup[figure] -% {style=plain,capposition=beside,objectset=centering, -% floatwidth=\columnwidth,capbesidewidth=6cc, -% capbesideposition=left,capbesidesep=mcapwidth, -% margins=centering,capbesideframe=yes, -% floatwidth=sidefil} -%\end{verbatim} -% the \texttt{mcapwidth} option is a negative skip equal to caption -% width: -%\begin{verbatim} -%\DeclareFloatSeparators{mcapwidth}{\hskip-\FCwidth} -%\end{verbatim} +%\begin{Quote} +%\meta{preamble} +%|\DeclareFloatSeparators{mcapwidth}{\hskip-\FCwidth}| +%\meta{preamble} +%|\floatsetup[figure]| +%| {style=plain,capposition=beside,objectset=centering,| +%| floatwidth=\columnwidth,capbesidewidth=6cc,| +%| capbesideposition=left,capbesidesep=mcapwidth,| +%| margins=centering,capbesideframe=yes,| +%| floatwidth=sidefil}| +%\end{Quote} % I this case all figures with beside captions centered accordingly to % text \verb|\hsize|. Usage of such float layout supposes that all % float objects are narrower than |\textwidth| by at least 2~caption % widths. % -% \clearfloatsetup{figure} \floatsetup[figure] +% \clearfloatsetup{figure}\floatsetup[figure] % {style=plain,capposition=beside,objectset=centering, % floatwidth=\columnwidth,capbesidewidth=6cc, % capbesideposition=left,capbesidesep=mcapwidth, @@ -3244,21 +4415,21 @@ % \begingroup % \captionsetup[capbesidefigure]{format=break,labelsep=none, % justification=raggedright} -% \begin{figure}[!b] -% \unitlength1.1\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{TheCat.picture} -% \caption{%^^A +% \begin{figure}[H] +% \unitlength1.1\unitlength +% \input{Doll.picture} +% \caption[Beside caption with ``hidden'' width (\texttt{=6cc}), object is centered at the full hsize]{%^^A % Plain figure}\label{fig:plain:trick} % \end{figure}% % \endgroup % % There were also temporarily, in group, changed settings for caption -% in figure~\ref{fig:plain:trick}: -%\begin{verbatim} -%\captionsetup[capbesidefigure]{format=break,labelsep=none, -% justification=raggedright} -%\end{verbatim} +% in figure~\ref{fig:plain:trick}:\label{ssec:app:besidefinish} +% \par\RestoreSpaces +%\begin{Quote} +%|\captionsetup[capbesidefigure]{format=break,labelsep=none,| +%| justification=raggedright}| +%\end{Quote} % % \subsubsection{Width Definition for Beside % Caption---Object Box in Float Row} @@ -3267,55 +4438,55 @@ % boxes (figures~\ref{floatrow:pre:figI} and % \ref{floatrow:pre:figII}): just define before \verb|\fcapside| % command something like -%\begin{verbatim} -%\setlength\hsize{1.098\hsize}% -%\end{verbatim} +%\begin{Quote} +%|\setlength\hsize{1.2\hsize}%| +%\end{Quote} % as was defined for first figure, or -%\begin{verbatim} -%\setlength\hsize\Xhsize -%\end{verbatim} +%\begin{Quote} +%|\setlength\hsize\Xhsize| +%\end{Quote} % before second (here is clear that you can set -% |\setlength\hsize{.902\hsize}|). +% |\setlength\hsize{.8\hsize}|). % % Since there were used \verb|\fcapside| commands at the beginning of % \env{floatrow} environment the \verb|\FCwidth| command was defined % as \verb|\relax|---in this case the width of caption equals to the % width of their contents. % +%\begingroup % \clearfloatsetup{figure} % \floatsetup[figure] % {style=plain,capposition=beside,objectset=centering, % capbesideposition=left,capbesidesep=enskip, % margins=centering,capbesideframe=yes,floatwidth=sidefil} -% \begin{figure}[h]\useFCwidth +% \begin{figure}[H]\useFCwidth %^^A \captionsetup[capbesidefigure]{format=default,labelsep=none} % \begin{floatrow} -% \setlength\hsize{1.098\hsize}% +% \setlength\hsize{1.2\hsize}% % \fcapside -% {\setlength\unitlength{\hsize/64}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{TheCat.picture}} -% {\caption{%^^A +% {\setlength\unitlength{\hsize/100}%^^A +% \input{Bear.picture}} +% {\caption[Left figure with beside caption in the row]{%^^A % }\label{floatrow:pre:figI}} % \setlength\hsize\Xhsize % \fcapside -% {\setlength\unitlength{\hsize/58}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{Mouse.picture}} -% {\caption{%^^A +% {\setlength\unitlength{\hsize/44}%^^A +% \input{Doll.picture}} +% {\caption[Right figure with beside caption in the row]{%^^A % }\label{floatrow:pre:figII}} % \end{floatrow}% % \end{figure}% +%\endgroup % There was used following setup for figures: -%\begin{verbatim} -%\floatsetup[figure] -% {style=plain,capposition=beside,objectset=centering, -% capbesideposition=left,capbesidesep=enskip, -% margins=centering,capbesideframe=yes,floatwidth=sidefil} -%\end{verbatim} +%\begin{Quote} +%|\floatsetup[figure]| +%| {style=plain,capposition=beside,objectset=centering,| +%| capbesideposition=left,capbesidesep=enskip,| +%| margins=centering,capbesideframe=yes,floatwidth=sidefil}| +%\end{Quote} % -% \subsubsection{Caption Above/Below Float and Caption Beside Float at -% The One Float Row} +% \subsubsection{Caption Above/Below and Caption Beside at +% The Float Row}\label{FAD:CapBesideandBelow} % % The float row with object and beside caption combined with object % and caption below (figures~\ref{flrow:mix:figI} and @@ -3326,37 +4497,36 @@ % you may use each of these three commands. Unfortunately you must set % height of such beside floats by hand. The lines which create % described float row: -%\begin{verbatim} -%\begin{figure}\CenterFloatBoxes -%\begin{floatrow} -%\hsize1.098\hsize -% \fcapside[\FBwidth][4cm] -% ... -% -% \ffigbox[\Xhsize][4cm] -% ... -%\end{floatrow}% -%\end{figure} -%\end{verbatim} +%\begin{Quote} +%|\begin{figure}\CenterFloatBoxes| +%|\begin{floatrow}| +%|\hsize1.098\hsize| +%| \fcapside[\FBwidth][3.6cm]| +%| ...| +%| | +%| \ffigbox[\Xhsize][3.6cm]| +%| ...| +%|\end{floatrow}%| +%|\end{figure}| +%\end{Quote} % -% \clearfloatsetup{figure} \floatsetup[figure] +% \clearfloatsetup{figure} +% \floatsetup[figure] % {style=Boxed,frameset={\fboxsep6pt},captionskip=5pt,capposition=bottom, % objectset=centering,capbesidewidth=none,capbesideposition=inside, % capbesidesep=enskip,margins=centering,capbesideframe=yes} % -% \begin{figure}\CenterFloatBoxes +% \begin{figure}[H]\CenterFloatBoxes % \begin{floatrow} -% \hsize1.098\hsize \fcapside[\FBwidth][4cm] -% {\unitlength1.44\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{TheCat.picture}} -% {\caption{%^^A +% \hsize1.098\hsize \fcapside[\FBwidth][3.6cm] +% {\unitlength1.44\unitlength +% \input{Cat.picture}} +% {\caption[Float box \cmd{\fcapside} in float row beside \cmd{\ffigbox}]{%^^A % Float box (\cmd{\fcapside}) with beside caption in float row % width float with caption below}\label{flrow:mix:figI}}% % -% \ffigbox[\Xhsize][4cm] -% {\unitlength1.44\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi +% \ffigbox[\Xhsize][3.6cm] +% {\unitlength1.44\unitlength % \input{BlackDog.picture}} % {\caption{%^^A % Float box (\cmd{\ffigbox}) width of rest float row @@ -3365,35 +4535,34 @@ % \end{figure} % % The ``mirror layout'' (but not identical) looks like: -%\begin{verbatim} -%\begin{figure}\CenterFloatBoxes -%\begin{floatrow} -% \ffigbox[1.2\FBwidth][4cm] -% ... -% -% \hsize\Xhsize -% \fcapside[\FBwidth][4cm] -% ... -%\end{floatrow}% -%\end{figure} -%\end{verbatim} -% -% \begin{figure}[!b]\CenterFloatBoxes +% \allowprelistbreaks[-4]\par\RestoreSpaces +%\begin{Quote} +%|\begin{figure}\CenterFloatBoxes|\nopagebreak +%|\begin{floatrow}| +%| \ffigbox[1.2\FBwidth][3.6cm]| +%| ...| +%| | +%| \hsize\Xhsize| +%| \fcapside[\FBwidth][3.6cm]| +%| ...| +%|\end{floatrow}%| +%|\end{figure}| +%\end{Quote} +% +% \begin{figure}[H]\CenterFloatBoxes % \begin{floatrow} -% \ffigbox[1.2\FBwidth][4cm] -% {\unitlength1.44\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi +% \ffigbox[1.2\FBwidth][3.6cm] +% {\unitlength1.44\unitlength % \input{BlackDog.picture}} % {\caption{%^^A -% Float box (\cmd{\ffigbox}) width of rest float row -% space}\label{floatrow:mirrmix:figII}}% +% Float box (\cmd{\ffigbox}) +% in mirror float row}\label{floatrow:mirrmix:figII}}% % \hsize\Xhsize % -% \fcapside[\FBwidth][4cm] -% {\unitlength1.44\unitlength\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi -% \input{TheCat.picture}} -% {\caption{%^^A +% \fcapside[\FBwidth][3.6cm] +% {\unitlength1.44\unitlength +% \input{Cat.picture}} +% {\caption[Float box (\cmd{\fcapside}) in mirror float row]{%^^A % Float box with beside caption (\cmd{\fcapside}) in mirror float row % width float with caption below}\label{floatrow:mirrmix:figI}} % \end{floatrow}% @@ -3401,13 +4570,14 @@ % % The figures~\ref{floatrow:mirrmix:figII}--\ref{floatrow:mirrmix:figI} % use following float style settings: -%\begin{verbatim} -%\floatsetup[figure] -% {style=Boxed,frameset={\fboxsep4pt},captionskip=5pt, -% capposition=bottom,objectset=centering,capbesidewidth=none, -% capbesideposition=inside,capbesidesep=enskip,margins=centering, -% capbesideframe=yes} -%\end{verbatim} +% \par\RestoreSpaces +%\begin{Quote} +%|\floatsetup[figure]| +%| {style=Boxed,frameset={\fboxsep4pt},captionskip=5pt,| +%| capposition=bottom,objectset=centering,capbesidewidth=none,| +%| capbesideposition=inside,capbesidesep=enskip,margins=centering,| +%| capbesideframe=yes}| +%\end{Quote} % % \subsubsection{Photo-Album-like Layouts} % @@ -3416,73 +4586,74 @@ % and, ``mirror layout''---^^A % \ref{floatrow:threemirr:figI}--\ref{floatrow:threemirr:figIII}) were % created by following lines: -%\begin{verbatim} -%\begin{figure}[t]\BottomFloatBoxes -%\begin{floatrow} -%\hsize1.2\hsize \ffigbox[][6.7cm] -% ... -% -%\vbox to6.7cm -% {\floatsetup[figure]{floatrowsep=none}\killfloatstyle -% \ffigbox[.8\hsize] -% ... -% \vss -% \ffigbox[.8\hsize] -% ...% -% }% -%\end{floatrow}% -%\end{figure} -%\end{verbatim} +%\begin{Quote} +%|\begin{figure}\BottomFloatBoxes| +%|\begin{floatrow}| +%|\hsize1.2\hsize \ffigbox[][6.7cm]| +%| ...| +%| | +%|\vbox to6.7cm| +%| {\floatsetup[figure]{floatrowsep=none}\killfloatstyle| +%| \ffigbox[.8\hsize]| +%| ...| +%| \vss| +%| \ffigbox[.8\hsize]| +%| ...%| +%| }%| +%|\end{floatrow}%| +%|\end{figure}| +%\end{Quote} % % \floatsetup[figure]{heightadjust=none} -% \begin{figure}[b!]\BottomFloatBoxes +% \begin{figure}[H]\BottomFloatBoxes % \begin{floatrow} % \hsize1.2\hsize % \ffigbox[][6.7cm] -% {\setlength\unitlength{\hsize/58}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi +% {\setlength\unitlength{\hsize/58}%^^A % \input{Mouse.picture}}% -% {\caption{Float box in photo-album-like layout: +% {\caption[Photo-album-like layout: left float]{Float +% box in photo-album-like layout: % alone in left column}\label{flrow:three:figIII}}% % % \vbox to6.7cm {\floatsetup[figure]{floatrowsep=none}\killfloatstyle % \ffigbox[.8\hsize] % {\input{TheCat.picture}} -% {\caption{%^^A +% {\caption[Photo-album-like layout: upper right float]{%^^A % Float box in photo-album-like layout: upper float in right % column}\label{floatrow:three:figI}} \vss \ffigbox[.8\hsize] % {\input{BlackDog.picture}}% -% {\caption{%^^A +% {\caption[Photo-album-like layout: lower right float]{%^^A % Lower float in right column}% % \label{floatrow:threemirr:figII}}}% % \end{floatrow}% % \end{figure} % % The ``mirror'' layout created by following commands: -%\begin{verbatim} -%\begin{figure}[t]\TopFloatBoxes -%\begin{floatrow} -%\vtop to7cm -% {\floatsetup[figure]{floatrowsep=none}\killfloatstyle -% \ffigbox[.8\hsize] -% ... -% \vss -% \ffigbox[.8\hsize] -% ...% -% \vskip0pt}\floatrowsep -% -%\ffigbox[\Xhsize][7cm-11pt] -% ... -%\end{floatrow}% -%\end{figure} -%\end{verbatim} +% \par\RestoreSpaces +%\begin{Quote} +%|\begin{figure}[t]\TopFloatBoxes| +%|\begin{floatrow}| +%|\vtop to7cm| +%| {\floatsetup[figure]{floatrowsep=none}\killfloatstyle| +%| \ffigbox[.8\hsize]| +%| ...| +%| \vss| +%| \ffigbox[.8\hsize]| +%| ...%| +%| \vskip0pt}\floatrowsep| +%| | +%|\ffigbox[\Xhsize][7cm-11pt]| +%| ...| +%|\end{floatrow}%| +%|\end{figure}| +%\end{Quote} % Note that in second example with ``mirror'' layout there was used % trick with \meta{height} definition---caption of float in the left % column is one line longer, so for the right column height of float % was reduced by 11pt---|\baselineskip| for |\small| % size\footnote{You get correct height with such calculations for -% beside floats with \pkg{caption}'s version not older than 3.0d.} -% (here were used \pkg{calc} package possibilities). The |\vtop| of +% beside floats with \package{caption}'s version not older than 3.0d.} +% (here were used \package{calc} package possibilities). The |\vtop| of % left column ends with |\vskip0pt|, otherwise you get fanny unwanted % layout. % @@ -3492,19 +4663,18 @@ % \vtop to7cm {\floatsetup[figure]{floatrowsep=none}\killfloatstyle % \ffigbox[.8\hsize] % {\input{TheCat.picture}} -% {\caption{%^^A +% {\caption[Photo-album-like layout, mirror: upper left float]{%^^A % Float box in photo-album-like layout: upper float in left % column}\label{floatrow:threemirr:figI}} \vss \ffigbox[.8\hsize] % {\input{BlackDog.picture}}% -% {\caption{%^^A -% Float box in photo-album-like layout: lower float in left column}% +% {\caption[Photo-album-like layout, mirror: lower left float]{%^^A +% Float box in photo-album-like layout: lower float in the left column}% % \label{floatrow:three:figII}}\vskip0pt}\floatrowsep % % \ffigbox[\Xhsize][7cm-11pt] -% {\setlength\unitlength{\hsize/58}\ifx\pspicture\undefined -% \else\psset{unit=\unitlength}\fi +% {\setlength\unitlength{\hsize/58}%^^A % \input{Mouse.picture}}% -% {\caption{%^^A +% {\caption[Photo-album-like layout, mirror: right float]{%^^A % Float box in photo-album-like layout: alone in right % column}\label{floatrow:threemirr:figIII}} % \end{floatrow}% @@ -3522,7 +4692,9 @@ % photo-album-like layout is rather rare in technical literature (It % isn't?). % -% \subsection{Sample files} +% \clearpage +% \par\RestoreSpaces +% \subsection{Sample files}\label{sec:samples} % % The \env{floatrow} package distribution offers a few files with % examples, which show settings, not covered by current document (some @@ -3538,12 +4710,12 @@ % % \begin{Options}{\OptionLabel} % \item[frsample01.tex] all possible combinations of predefined -% \pkg{floatrow} styles for captions above/below floats with foot +% \package{floatrow} styles for captions above/below floats with foot % material; there were created plain float environments and % \env{floatrow}s, also there were created boxes with % alone objects and alone captions; % \item[frsample02.tex] all possible combinations of predefined -% \pkg{floatrow} styles for beside captions and all possible +% \package{floatrow} styles for beside captions and all possible % caption positions; % \item[frsample03.tex] different tests with tables; % \item[frsample04.tex] sample with fancy layout with usage of @@ -3567,19 +4739,169 @@ % colored float styles. % \end{Options} % -% There is also added [temporary] sample file \file{sample-longtable.tex} -% with \env{longtable} test of defined command |\endlasthead| which +% There is also added sample file \file{sample-longtable.tex} which +% uses \emph{beta-temp} package-patch \package{fr-longtable} +% with defined commands |\endlasthead| and |\endprelastfoot| which % defines captions for continued and last pages of long table in three % possible ways. %\vfil % -% \section{Obsolete Commands}\label{sec:changed} +% \subsection{Obsolete Commands}\label{sec:changed} +% +% \begin{small} +% \subsubsection{The User Interface---New Floats [\package{float}]} +% \label{sec:floatborrowI} +% +% \DescribeMacro{\newfloat} +% The most important command in \package{float} +% is the |\newfloat| command\footnote{It doubles the +% \cmd{\DeclareNewFloatType} command.}. It is patterned on +% |\newtheorem|. The |\newfloat| command takes three required and +% one optional argument; it is of the form +% \begin{Quote} +% \hspace*{\MacroIndent}|\newfloat{|\meta{type}|}{|^^A +% \meta{placement}|}{|\meta{ext}|}[|\meta{within}{\tt]} +% \end{Quote} +% \begin{itemize}\advance\itemsep2ptplus2pt +% \item \marg{type} is the `type' of the new class of floats, like +% \texttt{program} or \texttt{algorithm}. After the appropriate +% |\newfloat|, commands like |\begin{program}| or |\end{algorithm*}| +% will be available. +% \item \marg{placement} gives the default placement +% parameters for this class of floats. The placement parameters are +% the same as in standard \LaTeX, i.e., \texttt{t}, \texttt{b}, +% \texttt{p} and \texttt{h} for `top', `bottom', `page' and `here', +% respectively. +% \item \marg{ext} When \LaTeX\ writes the captions to an auxiliary file +% for the list of figures (or whatever), it'll use the job name +% followed by \marg{ext} as a file name. +% \item \oarg{within} Finally, the optional +% argument \meta{within} determines whether floats of this class will +% be numbered within some sectional unit of the document. For example, +% if \oarg{within}${}={}$\texttt{chapter}, the floats will be numbered +% within chapters. (In standard \LaTeX, this happens with figures and +% tables in the \cls{report} and \cls{book} document styles.) As an +% example, Program~\ref{prog1.1} was created by a command sequence +% similar to that shown in the following +% Example\footnote{Settings for Example float +% environment were created by \cmd{\DeclareNewFloatType} macro stuff.}. +% \end{itemize} +% \emph{Floatrow note.} +% There is also created a |\newfloat*| pair, which works similar to +% |\restylefloat*| command (see below).\pagebreak[2] +% \begin{Example}[H] +% \begin{Quote}\openup-.5pt +% |\floatstyle{ruled}| +% |\newfloat{Program}{tbp}{lop}[section]|\pagebreak[3] +% \dots\ loads o' stuff \dots +% |\begin{Program}| +% |\begin{verbatim}| +% \dots\ program text \dots +% |\end{verbatim}| +% |\caption{|\dots\ caption \dots|}| +% |\end{Program}| +% \end{Quote} +% \caption{This is another silly floating Example. Except +% that this one doesn't actually float +% because it uses the {\tt[H]} optional parameter +% to appear \textbf{Here}. (Gotcha.)}\label{exa1.1} +% \end{Example}\pagebreak[3] +% \begin{Program} +%\begin{verbatim} +%#include <stdio.h> +% +% +%int main(int argc, char **argv) { +% int i; +% for (i = 0; i < argc; ++i) +% printf("argv[%d] = %s\n", i, argv[i]); +% return 0; +%} +%\end{verbatim} +% \caption{The first program. This hasn't got anything to do with the +% package but is included as an example. +% Note the \texttt{ruled} float style.% +% \label{prog1.1}} +% \end{Program} +% +% \DescribeMacro{\floatstyle} +% The |\floatstyle| command sets a default +% float style. This float style will be used for all the floats that +% are subsequently defined using |\newfloat|, until another +% |\floatstyle| command appears. The |\floatstyle| command takes one +% argument, the name of a float style. For instance, +% |\floatstyle{ruled}|. Specifying a string that does not name a valid +% float style is an error. +% +% \DescribeMacro{\floatname} +% The |\floatname| command lets you define +% the \emph{float name} that \LaTeX\ uses in the caption of a float, +% i.e., `Figure' for a figure and so on. For example, +% |\floatname{program}{Program}|. The |\newfloat| command sets the +% float name to its argument \meta{type} if no other name has been +% specified before. +% +% \DescribeMacro{\floatplacement} +% The |\floatplacement| command resets +% the default placement specifier of a class of floats. E.g., +% |\floatplacement{figure}{tp}|. +% +% \DescribeMacro{\restylefloat}\nopagebreak +% The |\restylefloat| command is necessary +% to change styles for the standard float types +% \texttt{figure} and \texttt{table}. Since these aren't usually +% defined via |\newfloat|, they don't have a style associated with +% them. Thus you have to say, for example, +% \begin{Quote} +% \hspace*{\MacroIndent}|\floatstyle{ruled}| +% \hspace*{\MacroIndent}|\restylefloat{table}| +% \end{Quote} +% to have tables come out \texttt{ruled}. The command also lets you +% change style for floats that you define via |\newfloat|, although +% this is, typographically speaking, not a good idea. See +% table~\ref{table1} for an example\footnote{The \package{float} package +% created special caption style with bold label for \texttt{boxed} +% style. Please note that \texttt{plain} and \texttt{boxed} float +% styles have not any special settings in \package{caption} 3.x package. +% To emulate \texttt{boxed} style from \package{float} documentation there +% were: cleared all special caption settings for tables, and restored +% default colon separator after label.}. There is a |\restylefloat*| +% command which will restyle an existing float type but will keep the +% new float style from taking over the |\caption| command. In this +% case the user is responsible for handling their own captions. +% \DeleteShortVerb{\|} +% %^^AEmulation of float's documentation settings +% %^^A\floatstyle{boxed} +% %^^A\restylefloat{table} +% \begingroup +% \clearcaptionsetup{table} +% \captionsetup{labelsep=default,labelfont=bf} +% \floatsetup[table]{style=boxed} +% \begin{table}[h] \def\B#1{$\displaystyle{n\choose#1}$} +% \begin{center} \begin{tabular}{c|cccccccc} +% $n$&\B0&\B1&\B2&\B3&\B4&\B5&\B6&\B7\\ \hline +% 0 & 1\\ +% 1 & 1&1\\ +% 2 & 1&2&1\\ +% 3 & 1&3&3&1\\ +% 4 & 1&4&6&4&1\\ +% 5 & 1&5&10&10&5&1\\ +% 6 & 1&6&15&20&15&6&1\\ +% 7 & 1&7&21&35&35&21&7&1 +% \end{tabular} \end{center} +% \caption{Pascal's triangle. This is a re-styled \LaTeX\ +% \texttt{table}.\label{table1}} +% \end{table} +% \endgroup +% \MakeShortVerb{\|} % -% |\floatsetup|, renamed or deleted after version 0.1b. +% \end{small}\pagebreak[2] +%\RestoreSpaces +% \begingroup\extrarowheight1.75pt\small\openup-.5pt\tabcolsep.5\tabcolsep\LTpre=0ptplus3pt\LTpost\LTpre +% \subsubsection{The \cmd{\floatsetup} keys, renamed or deleted after version 0.1b} % -% \begingroup\extrarowheight1.75pt\small\tabcolsep.5\tabcolsep -% \medskip\parindent0pt -% \begin{tabular*}\hsize{@{\extracolsep{-.3ptplus1fill}}| +% \parindent0pt +% \begin{longtable}{@{\extracolsep{-.3ptplus1fill}}| % >{\rightskip0ptplus1fil}p{.35\hsize}| % >{\rightskip0ptplus1fil}p{.6\hsize}|} % \multicolumn{2}{c}{Removed or changed commands} @@ -3588,6 +4910,7 @@ % & % \thead{Changed to} % \\\hline +% \endhead % \extrarowheight0pt\begin{tabular}[t]{@{}l} % \cmd{\renewfloatstyle},\\ % \cmd{\newfloatstyle},\\ @@ -3602,10 +4925,10 @@ % \\\hline % \cmd{\floatfootskip} & command, not a skip % \\\hline -% \end{tabular*}\pagebreak +% \end{longtable} % % \vskip1pt -% \begin{tabular*}\hsize{@{\extracolsep{-.3ptplus1fill}}| +% \begin{longtable}{@{\extracolsep{-.3ptplus1fill}}| % >{\rightskip0ptplus1fil}p{.35\hsize}| % >{\rightskip0ptplus1fil}p{.6\hsize}|} % \multicolumn{2}{c}{Commands, replaced by keys} @@ -3614,6 +4937,7 @@ % & % \thead{Key Analog} % \\\hline +% \endhead % \cmd{\floatobjectset} & % in current version \emph{do not used for definition of object % settings}, use key @@ -3644,7 +4968,7 @@ % \end{tabular}& % in current version \emph{do not used for definition of separation % material}, use keys\par \extrarowheight0pt -% \begin{tabular}[t]{@{}l} +% \extrarowheight0pt\begin{tabular}[t]{@{}l} % \texttt{floatrowsep=}\\ % \texttt{capbesidesep=} % \end{tabular} @@ -3662,7 +4986,7 @@ % \\\hline % \cmd{\setfloatstyle} & \texttt{style=} % \\\hline -% \begin{tabular}[t]{@{}l} +% \extrarowheight0pt\begin{tabular}[t]{@{}l} % \cmd{\Setframe}\\ % \cmd{\setframe} % \end{tabular} @@ -3672,11 +4996,11 @@ % & use \texttt{precode=}, \texttt{postcode=}, \texttt{midcode=} (also % \texttt{rowpercode} and \texttt{rowpostcode}) keys % \\\hline -% \end{tabular*} +% \end{longtable} % -% \vskip1pt +% \RestoreSpaces\vskip1pt\pagebreak[3] % -% \begin{tabular*}\hsize{@{\extracolsep{-.3ptplus1fill}}| +% \begin{longtable}{@{\extracolsep{-.3ptplus1fill}}| % >{\rightskip0ptplus1fil}p{.35\hsize}| % >{\rightskip0ptplus1fil}p{.6\hsize}|} % \multicolumn{2}{c}{Renamed keys} @@ -3685,6 +5009,7 @@ % & % \thead{Changed to} % \\\hline +% \endhead % \texttt{attachedcapstyle=} & \texttt{relatedcapstyle=} % \\\hline % \texttt{floatstyle=} & \texttt{style=} @@ -3716,12 +5041,12 @@ % \end{tabular} & % \extrarowheight0pt\begin{tabular}[t]{@{}l@{}} % \vphantom{(}options of \texttt{objectset=} and \texttt{margins=} -% (for unification\\\quad with analogous key options in \pkg{caption} +% (for unification\\\quad with analogous key options in \package{caption} % package)\\ % \texttt{raggedright},\\ \texttt{raggedleft},\\ \texttt{centering} % \end{tabular} % \\\hline -% \end{tabular*} +% \end{longtable} % \endgroup % \MakeShortVerb{\|}% % @@ -3735,11 +5060,11 @@ % \changes{v0.1a}{2004/09/28}{Since the changes of version 0.1a touched % a lot of package all entries of changing messages deleted.} % \changes{v0.1d}{2005/02/07}{Removed info, error, command macros---used -% standard instead} The first step is to check whether \pkg{float} and -% \pkg{rotfloat} are loaded or not. If yes, there go error messages. -% \changes{v0.1d}{2005/02/07}{Added test for \pkg{rotfloat} package} +% standard instead} The first step is to check whether \package{float} and +% \package{rotfloat} are loaded or not. If yes, there go error messages. +% \changes{v0.1d}{2005/02/07}{Added test for \package{rotfloat} package} % \changes{v0.1j}{2006/03/12}{Try to say `good bye' -% in the case of \pkg{float} or/and \pkg{rotfloat} loaded before} +% in the case of \package{float} or/and \package{rotfloat} loaded before} % \begin{macrocode} %<*floatrow> %\@ifundefined{float@caption}{}% @@ -3754,27 +5079,27 @@ \@namedef{opt@floatrow.sty}{}\endinput} % \end{macrocode} % -% The next lines emulate already loaded \pkg{float} and \pkg{rotfloat} +% The next lines emulate already loaded \package{float} and \package{rotfloat} % packages. % -% If in preamble, after loading of \pkg{floatrow} package is used -% |\usepackage| with \pkg{float} package (the \pkg{float} package +% If in preamble, after loading of \package{floatrow} package is used +% |\usepackage| with \package{float} package (the \package{float} package % doesn't support any options), the defining of command |\ver@float.sty|, % which emulates loading of package will do not any harm. % -% Unfortunately the \pkg{rotfloat} package allows to transfer options of -% \pkg{rotating} package in the case of appearance +% Unfortunately the \package{rotfloat} package allows to transfer options of +% \package{rotating} package in the case of appearance % of both packages in one |\usepackage| line. Thus, if someone loads -% options in \pkg{rotating}---\pkg{rotfloat} line, he will get +% options in \package{rotating}---\package{rotfloat} line, he will get % `option clash' error. A followed help gives a simple solution of such % problem---moving options in |\documentclass| line and make them global. % I hope, that moving option in this way will do not harm % to document, but now you aware of ``non-necessity'' of loading -% of \pkg{rotfloat} package. +% of \package{rotfloat} package. % \changes{v0.1e}{2005/03/22}{Restoring code of emulation of loading -% for \pkg{float} and \pkg{rotfloat} packages.} +% for \package{float} and \package{rotfloat} packages.} % \changes{v0.1f}{2005/06/14}{The version, date and description of -% \pkg{float} and \pkg{floatrow} borrowed from originals (AS).} +% \package{float} and \package{floatrow} borrowed from originals (AS).} % \begin{macrocode} %\expandafter\let\csname ver@float.sty\expandafter\endcsname % \csname ver@floatrow.sty\endcsname @@ -3786,26 +5111,37 @@ Combining float+rotating package (AS)} % \end{macrocode} % -% Here goes request for \pkg{keyval} package. -% \changes{v0.1c}{2004/10/22}{Bug fix: added request for \pkg{keyval} +% Here goes request for \package{keyval} package. +% \changes{v0.1c}{2004/10/22}{Bug fix: added request for \package{keyval} % package.} % \begin{macrocode} \RequirePackage{keyval} % \end{macrocode} % -% Here goes request for \file{caption3} file, core part of \pkg{caption} +% Here goes request for \file{caption3} file, core part of \package{caption} % package. -% \changes{v0.1f}{2005/06/14}{Added request for \pkg{caption3} package.} -% \changes{v0.1j}{2006/06/18}{Added date request for \pkg{caption3} package.} -% \begin{macrocode} -\RequirePackage{caption3}[2006/01/12] +% \changes{v0.1f}{2005/06/14}{Added request for \package{caption3} package.} +% \changes{v0.1j}{2006/06/18}{Added date request for \package{caption3} +% package.} +% \changes{v0.2a}{2007/08/24}{Added check and error message for version older 3.0q} +% The |\caption@keydepth| is used as test for \package{caption}'s version 3.0q. +% \begin{macrocode} +\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} +\providecommand*\caption@fnum[1]{% + \caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}} % \end{macrocode} % % \subsection{Storing of \LaTeX's Internal Macros} % % \begin{macro}{\FR@flboxreset} -% First goes storage of \LaTeX's macro |\@floatboxreset| from bundle of float -% definitions. +% First goes storage of \LaTeX's macro |\@floatboxreset| from bundle of +% float definitions. % \begin{macrocode} \@ifdefinable\FR@flboxreset{\let\FR@flboxreset\@floatboxreset} \@ifdefinable\FR@makecaption{\let\FR@makecaption\@makecaption} @@ -3833,16 +5169,17 @@ % \begin{macro}{\float@caption} % The |\float@caption| used as flag for caption package. % \changes{v0.1f}{2005/06/14}{Saves \cmd{\@caption}: used as flag -% for \pkg{caption}, \pkg{hyperref}, (\pkg{pdfpages}) packages.} +% for \package{caption}, \package{hyperref}, (\package{pdfpages}) packages.} % \begin{macrocode} \@ifdefinable\float@caption{\let\float@caption\@caption} % \end{macrocode} % \end{macro} % -% \subsection{Borrowed Code (with original comment) from \pkg{float} package} +% \subsection{Borrowed Code (with original comment) from \package{float} +% package} % -% From this point starts \pkg{float} package's core code (version 1.3). -% The necessary explanation of macro code also borrowed from \pkg{float} +% From this point starts \package{float} package's core code (version 1.3). +% The necessary explanation of macro code also borrowed from \package{float} % package and typed with slanted font. Some macros % were skipped or edited (see \emph{floatrow notes}). % @@ -3871,21 +5208,41 @@ % is unknown, and we call |\float@error{|\meta{arg}|}| for the % error message. % -% {\em \textit{Floatrow note.} \pkg{float}'s error message +% \begin{macro}{\flrow@package} +% {\em \textit{Floatrow note.} \package{float}'s error message % (the command \cmd{\float@error}\meta{arg}) changed to -% \pkg{floatrow}'s one (\cmd{\flrow@error}\meta{arg}).} +% \package{floatrow}'s one (\cmd{\flrow@error}\meta{arg}).} +% \changes{v0.1k}{2007/01/20}{Added +% macro analogous to \cmd{\caption@package}.} +% \begin{macrocode} +\newcommand\flrow@package{floatrow} +% \end{macrocode} +% \end{macro} % % \begin{macro}{\flrow@error} -% Here's the error message. |\@eha| is the help message that says -% `Your command was ignored.' +% \changes{v0.1k}{2007/01/20}{Created more +% universal macro for all \cmd{\PackageError}s.} % \begin{macrocode} -\newcommand\flrow@error[1]{\PackageError{floatrow}{% - Unknown float style `#1'}{\@eha}} +\newcommand*\flrow@error[1]{% + \PackageError\flrow@package{#1}\flrow@eh} % \end{macrocode} % \end{macro} +% +% \begin{macro}{\flrow@eh} +% The |\caption@eh|-analog. +% \changes{v0.1k}{2007/01/20}{Added +% special help for \cmd{\PackageError}s.} +% \begin{macrocode} +\newcommand*\flrow@eh{% + If you do not understand this error, please take look\MessageBreak + at `floatrow' and `caption' package documentations.\MessageBreak + \@ehc} +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} \newcommand\floatstyle[1]{\@ifundefined{flrow@sty@#1}% - {\flrow@error{#1}}{\edef\float@style{#1}}} + {\flrow@error{Unknown float style `#1'}}{\edef\float@style{#1}}} % \end{macrocode} % \end{macro} % @@ -3893,16 +5250,19 @@ % \begin{macro}{\floatplacement} % The next two commands are even simpler. \LaTeX\ says that % |\fps@|\meta{float} contains the default placement specifier for -% the class of floats \meta{float}. |\fname@|\meta{float} expands +% the class of floats \meta{float}. |\|\meta{float}|name| expands % to the name that appears in \meta{float} captions, e.g., `Figure'. % (This is our own definition.) +% and |\@floatboxreset| macros. +% \changes{v0.1p}{2007/06/24}{The \cmd{\fname@}\meta{floatname} changed to +% \cs{}\meta{floatname}\texttt{name} macros redefined locally (AS).} % \begin{macrocode} -\newcommand\floatname[2]{\@namedef{fname@#1}{#2}} +\newcommand\floatname[2]{\@namedef{#1name}{#2}} \newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}} % \end{macrocode} % \emph{\textit{Floatrow note.} Here was stuff of undocumented command % \cmd{\floatevery} which, I suppose, allows to set special settings for -% current type of float. In \pkg{floatrow} package it was deleted. +% current type of float. In \package{floatrow} package it was deleted. % Use \cmd{\floatsetup} stuff instead.} % \end{macro} % \end{macro} @@ -3946,7 +5306,7 @@ % \changes{v0.1f}{2005/06/14}{The \cmd{\@caption} redefinitions % transformed to \cmd{\@makecaption} ones.} % \changes{v0.1f}{2005/06/14}{The \cmd{\FBc@wd}\cmd{\z@} works like -% flag (for \pkg{wrapfig}'s floats).} +% flag (for \package{wrapfig}'s floats).} % \changes{v0.1h}{2005/10/02}{Added setting for \cmd{\linewidth}} % \begin{macrocode} \newcommand\flrow@makecaption[2]{\global\setbox\@floatcapt @@ -3970,31 +5330,102 @@ % The third one allows to define again float layout style: it could be % necessary in mixed float rows. % \changes{v0.1g}{2005/07/15}{The macro-flag \cmd{\FR@ifflenv} removed.} +% \changes{v0.1k}{2007/01/18}{Deleted \cmd{\global}---it could make macro universal for multilevel usage.} % \begin{macrocode} \newcommand\killfloatstyle{\FBbuildtrue - \if@@FS\hsize\FB@wd\fi\global\@@FSfalse} + \if@@FS\hsize\FB@wd\fi\@@FSfalse} % \end{macrocode} % \end{macro} % % \begin{macro}{\RawFloats} -% This macro restores core-\LaTeX-float-environment's behavior. +% This macro restores plain \LaTeX{} mode for floats. i.e. returns core +% macros for commands of float environment. +% Non-optional variant can be used inside environments only. +% Variant with option better to be used in preamble. (Option allow +% to restore plain \LaTeX{} mode for necessary float type.) % \changes{v0.1f}{2005/06/14}{Added Macro which restores raw float % behavior.} % \changes{v0.1g}{2005/07/15}{Added \cmd{\@parboxrestore} macro.} +% \changes{v0.1k}{2007/01/18}{Added optional arguments which +% allow usage of macro outside any float.} +% \begin{macrocode} +\newcommand\RawFloats{\@ifnextchar[%] + \flrow@rawfloatschk\flrow@rawfloats} +\newcommand\flrow@rawfloats{\killfloatstyle\@parboxrestore + \let\@makecaption\FR@makecaption + \expandafter\ifx\csname end\@captype\endcsname\float@endH + \@namedef{end\@captype}{\FBbuildfalse\float@endH}% + \else + \@namedef{end\@captype}{\end@float}% + \fi + \@namedef{end\@captype*}{\end@dblfloat}% + \@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{} +\def\flrow@RawFloats[#1][#2]{\flrow@RawFloats@[#1]#2,;} +\def\flrow@RawFloats@[#1]#2,{% + \caption@ifinlist{#2}{float}{\@namedef{#1}{\@float{#1}}% + }{\caption@ifinlist{#2}{widefloat,wide}{\@namedef{#1*}{% + \let\@xdblfloat\@xfloat\@dblfloat{#1}}% + }{\caption@ifinlist{#2}{rotfloat,rot}{% + \@ifundefined{@rotfloat}{}{\@namedef{sideways#1}{\@rotfloat{#1}}}% + }{\caption@ifinlist{#2}{widerotfloat,widerot}{% + \@ifundefined{@rotfloat}{}{\@namedef{sideways#1*}{\@rotdblfloat{#1}}}% + }{\caption@ifinlist{#2}{wrapfloat,wrap}{% + \@ifundefined{wrapfloat}{}{\@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,{% + \@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 +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\flrow@Raw@restyle} +% \changes{v0.1k}{2007/05/24}{The key-val support for raw float mode. +% Macro \cmd{\flrow@Raw@restyle} replaces \cmd{\flrow@restyle}}. +% This macro is used by |rawfloats=| key. % \begin{macrocode} -\newcommand\RawFloats[1][\@captype]{\killfloatstyle - \@parboxrestore - \let\@makecaption\FR@makecaption - \@namedef{end#1}{\end@float}% - \@namedef{end#1*}{\end@dblfloat}% - \@namedef{endsideways#1}{\end@rotfloat}% - \@namedef{endsideways#1*}{\end@rotdblfloat}% +\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}% + }% } % \end{macrocode} % \end{macro} % % \begin{macro}{\FB@capsetup} -% This only additional definition which is used with \pkg{caption} package +% This only additional definition which is used with \package{caption} package % version 3.0. With this macro you may (re)define some layout settings % for captions. % \begin{macrocode} @@ -4021,7 +5452,7 @@ % \end{macro} % % \begin{macro}{\restylefloat} -% The redefined \pkg{float} package macros to follow |\floatsetup| stuff. +% The redefined \package{float} package macros to follow |\floatsetup| stuff. % % This macro starts to work at the beginning of document, so it has tests % for loaded packages. @@ -4042,9 +5473,9 @@ % \begin{macrocode} %\newcommand\float@restyle{} % \end{macrocode} -% To avoid redefinition of this macro by other packages (e.g. \pkg{wrapfig}, -% which uses |\float@restyle| as recognition of \pkg{float} v1.3 package) -% \pkg{floatrow} package uses other name. +% To avoid redefinition of this macro by other packages (e.g. \package{wrapfig}, +% which uses |\float@restyle| as recognition of \package{float} v1.3 package) +% \package{floatrow} package uses other name. % \changes{v0.1f}{2005/06/14}{Added \cmd{\FR@redefs} command for local % redefinitions.} % \changes{v0.1f}{2005/06/14}{The \cmd{\xdef}\cmd{\FBB@wd} changed to @@ -4073,13 +5504,21 @@ % \end{macrocode} % {\sl The standard |\@xdblfloat| macro changes |\hsize| to |\textwidth|. % This way is not correct so use |\@xfloat| instead.} -% \begin{macrocode} - \let\@xdblfloat\@xfloat\@dblfloat{#1}}% +% Here added flag which, if true, allows redefinition of starred float +% environment like non-starred but with special layout. This redefinition +% allows usage of |[H]| option. +% \changes{v0.1k}{2007/01/18}{Added \cmd{\FR@ifdoubleaswide} flag: +% starred floats could be used for wide alternative layout} +% \begin{macrocode} + \let\@xdblfloat\@xfloat\relax + \FR@ifdoubleaswide + \if@twocolumn\else\let\@dblfloat\@float\fi\fi + \@dblfloat{#1}}% \expandafter\let\csname end#1\endcsname\float@end \expandafter\let\csname end#1*\endcsname\float@dblend % \end{macrocode} % One-column rotated float environment. -% The code contents of |\rotfloat@float| macro (\pkg{rotfloat} package) +% The code contents of |\rotfloat@float| macro (\package{rotfloat} package) % moved here. % \begin{macrocode} \@ifundefined{@rotfloat}{}{% @@ -4095,13 +5534,13 @@ % Two-column rotated float environment without support. % (The style ``support'' for non-rotated two column or wide float % \texttt{widefloat} and \texttt{wide}\meta{captype} was removed.) -% \changes{v0.1d}{2005/02/07}{Restored \pkg{rotfloat}'s definition form +% \changes{v0.1d}{2005/02/07}{Restored \package{rotfloat}'s definition form % for wide rotated float} % \begin{macrocode} \ifx\@rotdblfloat\undefined \@namedef{sideways#1*}{% - \PackageError{floatrow}{% - You need rotating version 2.10 or newer to do this}{\@ehd}% + \flrow@error{% + You need rotating version 2.10 or newer to do this}% \@nameuse{sideways#1}}% \else % \end{macrocode} @@ -4117,7 +5556,7 @@ % {\sl The standard |\@xdblfloat| macro changes |\hsize| to |\textwidth|. % This way is not correct so use |\@xfloat| instead.} % -% The code contents of |\rotfloat@dblfloat| macro (\pkg{rotfloat} +% The code contents of |\rotfloat@dblfloat| macro (\package{rotfloat} % package) moved here. % \begin{macrocode} \let\@xdblfloat\@xfloat @@ -4127,7 +5566,7 @@ \fi \@namedef{endsideways#1*}{\FBbuildtrue\float@dblend}} % \end{macrocode} -% Wrapped float environment from \pkg{wrapfig} package. +% Wrapped float environment from \package{wrapfig} package. % \begin{macrocode} \@ifundefined{wrapfloat}{}{% \@ifundefined{flrow@WF@rapt}{\let\flrow@WF@rapt\WF@rapt @@ -4137,17 +5576,19 @@ \edef\FBB@wd{\the\dimen@}\FB@fs@wd\dimen@\FBo@wd \fi \flrow@WF@rapt[##1]{\dimen@}% - \@ifundefined{capstart}{}{\capstart}% +% \end{macrocode} +% \changes{v0.1k}{2007/05/24}{Commented \cmd{\capstart} for a while} +% \begin{macrocode} +% \@ifundefined{capstart}{}{\capstart}% \the\FR@everyfloat\ignorespaces}% }{}% \@namedef{wrap#1}{\killfloatstyle\def\@captype{#1}% % \end{macrocode} -% ^^A The \cmd{\FloatHBarrier} for \pkg{flafplins}. +% ^^A The \cmd{\FloatHBarrier} for \package{flafplins}. % ^^A \changes{v0.1j}{2006/03/12}{Added \cmd{\FloatHBarrier} in wrapfloat} % \begin{macrocode} \FR@redefs\FBc@wd\z@ - \flrow@setlist{{#1}{wrapfloat}{wrap#1}{tmpset}}% - \global\let\flrow@typ@tmpset\undefined + \flrow@setlist{{#1}{wrapfloat}{wrap#1}}% % \end{macrocode} % Here repeated code from |\float@end| and |\float@dblend|: check whether % |\floatbox| stuff appeared or not. @@ -4163,6 +5604,7 @@ %^^A \adj@dim\hsize+\FBo@wadj=\hsize \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[]}}%] @@ -4173,14 +5615,16 @@ %^^A \@namedef{endwrap#1}{\ifdim\hsize>\z@ %^^A \adj@dim\hsize+\FBo@wadj=\hsize\fi\endwrapfloat}} % \end{macrocode} -% At last definitions for new subfloat numeration for \pkg{subfig} package. +% At last definitions for new subfloat numeration for \package{subfig} package. % The subfloats for figures and tables (|\c@subfigure| and |\c@subtable|) % already defined: so at first goes check, whether defined this command for % subfloat (suggestions of Steven Cochran ). % \changes{v0.1f}{2005/06/14}{Added check/filter for already created % subfigures and subtables (SC).} +% \changes{v0.1k}{2007/05/24}{The check macro for subfig package +% changed.} % \begin{macrocode} - \@ifundefined{subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}} + \@ifundefined{sf@@@subfloat}{}{\@ifundefined{c@sub#1}{\newsubfloat{#1}}{}}} % \end{macrocode} % \end{macro} % \end{em} @@ -4216,12 +5660,12 @@ % counter, was removed. It was replaced by |\DeclareNewFloatType| stuff.} % \end{macro} % -% \subsubsection{The \pkg{float} Package: Adapting \LaTeX\ Internals} +% \subsubsection{The \package{float} Package: Adapting \LaTeX\ Internals} % % We have to adapt some of \LaTeX's internal macros to our needs. % There are several things that have to be changed around -% in order to provide the functionality of David Carlisle's \pkg{here}. -% The following is thus lifted from \pkg{here}, with changes and with +% in order to provide the functionality of David Carlisle's \package{here}. +% The following is thus lifted from \package{here}, with changes and with % David's permission: % % \begin{macro}{\@float@Hx} @@ -4240,7 +5684,7 @@ \def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}} % \end{macrocode} % \end{macro} -% {\em\textit{Floatrow note}. Since \pkg{floatrow} always uses float style, +% {\em\textit{Floatrow note}. Since \package{floatrow} always uses float style, % the stuff of flag \cmd{\@flstyle} (which sets whether use or not any % predefined float style) moved out.} % @@ -4257,14 +5701,18 @@ \def\@float@HH#1[H]{% % \end{macrocode} %^^A {\em\textit{Floatrow note}. If we want to put barrier -%^^A (i.e. use beta-package \pkg{flafplins}).} +%^^A (i.e. use beta-package \package{flafplins}).} % \changes{v0.1j}{2006/03/12}{Added \cmd{\FloatHBarrier}} % \begin{macrocode} \@ifundefined{FloatHBarrier}{}\FloatHBarrier % \end{macrocode} % Locally redefine the end of the environment. +% \changes{v0.1k}{2007/05/24}{Added \cmd{\FR@ifdoubleaswide} to allow usage of [H] option in wide floats} % \begin{macrocode} \expandafter\let\csname end#1\endcsname\float@endH + \FR@ifdoubleaswide + \expandafter\let\csname end#1*\endcsname\float@endH + \fi % \end{macrocode} % We don't get a |\@currbox| if we don't actually use the float mechanism. % Therefore we fake one using the |\float@box| defined above. @@ -4281,16 +5729,20 @@ % \texttt{[h]} option. % % \emph{Floatrow note. -% Since \pkg{floatrow} always uses preloaded style +% Since \package{floatrow} always uses preloaded style % the stuff of flag \cmd{\@flstyle} moved out.} +% Here added zeroing of list margins in the case of appearance of |\floatbox| +% inside list environment. % \changes{v0.1h}{2005/10/02}{Added setting for \cmd{\linewidth}} +% \changes{v0.1k}{2007/05/24}{Margins zeroed for the case of appearance +% of \cmd{\floatbox} inside list environment.} % \begin{macrocode} \def\@captype{#1}\setbox\@floatcapt=\vbox{}% \setbox\@currbox\color@vbox\normalcolor \vbox\bgroup \hsize\columnwidth \linewidth\columnwidth - \@parboxrestore + \@parboxrestore\leftmargin\z@\rightmargin\z@ \@floatboxreset \@setnobreak % \end{macrocode} % The final |\ignorespaces| is needed to gobble any spaces or new lines @@ -4307,7 +5759,7 @@ % At first goes original \LaTeX's macro |\@floatboxreset| saved as % |\FR@flboxreset| at the beginning of package. % Then goes flag for facing layout and command which inputs references from -% \texttt{aux}-file and temporary settings. At last \pkg{floatrow} looks +% \texttt{aux}-file and temporary settings. At last \package{floatrow} looks % whether caption stays above/below object, or beside and chooses necessary % macro of width counting. % \changes{v0.1d}{2005/02/07}{Added flag for float box layout building} @@ -4319,7 +5771,6 @@ \@ifundefined{capstart}{}{\capstart}% \FB@facing\@tempswafalse\FBiffacing\@tempswatrue\fi \if@tempswa\FB@readaux{\relax}\fi - \flrow@settype{tmpset}\global\let\flrow@typ@tmpset\undefined \global\let\FBcheight\relax\global\let\FBoheight\relax \global\let\FBfheight\relax \FBifcapbeside\FC@fs@wd\else\FB@fs@wd\fi @@ -4374,8 +5825,8 @@ % \begin{macrocode} \FC@ifc@wd \ifx\FCwidth\relax - \PackageError{You didn't define width of caption\MessageBreak - for plain float environment.}{\flrow@eh}% + \flrow@error{You didn't define width of caption\MessageBreak + for plain float environment.}% \else \global\FBc@wd=\FCwidth % \end{macrocode} @@ -4418,7 +5869,7 @@ % \textit{Floatrow note.} % Macro |\float@makebox| was redefined to fit more float object---caption % combinations. There was created the |\float@makebox| stuff. -% First goes changed \pkg{float} |\float@makebox| which loads necessary +% First goes changed \package{float} |\float@makebox| which loads necessary % layout macro for above/below or beside captions. % % The |\float@makebox| stuff includes |\FB@foot| macro @@ -4443,12 +5894,17 @@ % \begin{macro}{\flrow@FB} % The macro of |\float@makebox| stuff which builds float box with % above/below caption. +% Here added zeroing of list margins in the case of appearance of |\floatbox| +% inside list environment. % \changes{v0.1f}{2005/06/14}{The argument used for defining of -% dimension---restored for (\pkg{float}) compatibility with -% \pkg{hyperref} package.} +% dimension---restored for (\package{float}) compatibility with +% \package{hyperref} package.} +% \changes{v0.1k}{2007/05/24}{Margins zeroed for the case of appearance +% of \cmd{\floatbox} inside list environment.} % \begin{macrocode} \newcommand\flrow@FB[1]{\vbox{\@tempdima=#1\vskip\FBaskip - \@parboxrestore\hbox to\@tempdima{\def\FB@zskip{\vskip\z@}% + \@parboxrestore\leftmargin\z@\rightmargin\z@ + \hbox to\@tempdima{\def\FB@zskip{\vskip\z@}% \FBleftmargin\flrow@FB@\FBrightmargin}% \FBiffacing\FB@writeaux{\string\global\string\c@FBcnt\thepage}\fi \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}% @@ -4459,11 +5915,15 @@ % \begin{macro}{\flrow@FC} % Definition of float with beside caption. % \changes{v0.1f}{2005/06/14}{The argument used for defining of -% dimension---restored for (\pkg{float}) compatibility with -% \pkg{hyperref} package.} +% dimension---restored for (\package{float}) compatibility with +% \package{hyperref} package.} +% \changes{v0.1k}{2007/05/24}{Margins zeroed for the case of appearance +% of \cmd{\floatbox} inside list environment.} +% Here added zeroing of list margins in the case of appearance of |\floatbox| +% inside list environment. % \begin{macrocode} \newcommand\flrow@FC[1]{\vbox{\@tempdima=#1\@parboxrestore - \flrow@FClist\vskip\FBaskip + \leftmargin\z@\rightmargin\z@\flrow@FClist\vskip\FBaskip \hbox to\@tempdima{\FCleftmargin\flrow@FC@\FCrightmargin}% \FBiffacing\FB@writeaux{\string\global\string\c@FBcnt\thepage}\fi \nocapbeside\global\let\FCwidth\relax @@ -4509,13 +5969,21 @@ % \changes{v0.1f}{2005/06/14}{New design implementation for % \cmd{\captionof}-like stuff?} % \begin{macrocode} -\newcommand\flrow@FB@{\FB@frame{\begin@FBBOX +\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\@@FBabove +% \end{macrocode} +% Here added zeroing of list margins in the case of appearance of |\floatbox| +% inside list environment. +% \changes{v0.1k}{2007/05/24}{Margins zeroed for the case of appearance +% of \cmd{\floatbox} inside list environment.} +% \begin{macrocode} + \@parboxrestore\leftmargin\z@\rightmargin\z@ + \@@FBabove \FBifcaptop % \end{macrocode} % If needed and exists---caption box above float object. @@ -4571,10 +6039,18 @@ % separate parameters for building of beside caption layout and float % environment margins.} % \begin{macrocode} -\newcommand\flrow@FC@{\FB@frame{\begin@FBBOX +\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\@@FBabove +% \end{macrocode} +% \changes{v0.1k}{2007/05/24}{Margins zeroed for the case of appearance +% of \cmd{\floatbox} inside list environment.} +% Here added zeroing of list margins in the case of appearance of |\floatbox| +% inside list environment. +% \begin{macrocode} + \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}% @@ -4619,7 +6095,7 @@ % Added flag |\ifFBbuild| for float box layout building. % This flag stops repeated usage of |\float@makebox| after |\floatbox| % in |\float@end|, |\float@endH| and -% |\float@dblend| macros and, if \pkg{rotating} used, +% |\float@dblend| macros and, if \package{rotating} used, % in replaces usage of |\float@makebox| to \LaTeX's standard box |\@currbox| % |\rotfloat@makebox| and |\rotfloat@dblmakebox| commands.} % \changes{v0.1d}{2005/02/07}{Added flag for float box layout building} @@ -4632,7 +6108,7 @@ % \end{macro} % % \begin{macro}{\float@endH} -% The |\float@endH| command is, again, derived from \pkg{here}. It'll +% The |\float@endH| command is, again, derived from \package{here}. It'll % deal correctly with a non-floating float, inserting the proper amounts % of white space above and below. % @@ -4642,11 +6118,21 @@ % \changes{v0.1d}{2005/02/07}{Added flag for float box layout building} % \changes{v0.1h}{2005/10/25}{Added penalties \cmd{\@beginparpenalty} % and \cmd{\@endparpenalty}} +% \changes{v0.1k}{2007/01/14}{Added \cmd{\floatHpenalties} settings and flag for +% usage of list penalties} +% There is also added flag for loading of list penalties around anchored float. % \begin{macrocode} +\newcommand\floatHpenalties{} \newcommand\float@endH{\@endfloatbox\par - \addpenalty\@beginparpenalty\vskip\intextsep + \FR@iffloatHaslist + \floatHpenalties\relax + \addpenalty\@beginparpenalty + \fi + \vskip\intextsep \ifFBbuild\setbox\@currbox\float@makebox\columnwidth\fi - \box\@currbox\par\addpenalty\@endparpenalty\vskip\intextsep\relax} + \box\@currbox\par + \FR@iffloatHaslist\addpenalty\@endparpenalty\@endpetrue\fi + \vskip\intextsep\relax} % \end{macrocode} % \end{macro} % @@ -4666,7 +6152,7 @@ % \end{macrocode} % \end{macro} % -% \subsubsection{\pkg{float} package: Captions and lists of floats} +% \subsubsection{\package{float} package: Captions and lists of floats} % % Now for the caption routines. % We use a box, |\@floatcapt|, to hold the caption while the float @@ -4677,9 +6163,9 @@ % % \begin{macro}{\caption} % This is the only \LaTeX\ macro that this document style supersedes. -% {\em[\dots]} the caption routines from \pkg{float} are used {\em[\dots]}. -% {\em \textit{Floatrow note.} The \pkg{float}'s caption layout stuff -% replaced by \pkg{caption}'s |\captionsetup|. In \pkg{floatrow} +% {\em[\dots]} the caption routines from \package{float} are used {\em[\dots]}. +% {\em \textit{Floatrow note.} The \package{float}'s caption layout stuff +% replaced by \package{caption}'s |\captionsetup|. In \package{floatrow} % package redefined |\@makecaption| command (\LaTeX's definition % of |\caption| commented).} % \changes{v0.1f}{2005/06/14}{The definition of \cmd{\caption} commented.} @@ -4700,7 +6186,7 @@ % the appropriate listing. It also controls the typesetting of the caption % itself, although a style-dependent macro |\@fs@capt| is called to handle % the specifics. {\em \textit{Floatrow note}. The command |\@fs@capt| -% removed---\pkg{floatrow} package uses \pkg{caption} 3.0 possibilities and +% removed---\package{floatrow} package uses \package{caption} 3.0 possibilities and % its own definitions.} % % Note that because the caption is saved in a box @@ -4752,7 +6238,7 @@ % |\flrow@error|)}. % \begin{macrocode} \newcommand*{\listof}[2]{% - \@ifundefined{ext@#1}{\flrow@error{#1}}{% + \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{% % \end{macrocode} % All's well until now. We define the |\l@|\meta{float} command % that \LaTeX\ needs for formatting the list, and then typeset the @@ -4806,14 +6292,14 @@ % \end{macrocode} % \end{macro} % -% {\em \textit{Floatrow note.} Here goes \pkg{floatrow} message about -% finishing of loading of \pkg{float} package's corrected code.} +% {\em \textit{Floatrow note.} Here goes \package{floatrow} message about +% finishing of loading of \package{float} package's corrected code.} % \begin{macrocode} \PackageInfo{floatrow}{Modified float package code loaded} % \end{macrocode} % % \subsection{Borrowed Code (with original comment) -% from \pkg{rotfloat} package} +% from \package{rotfloat} package} % % \begin{macrocode} \IfFileExists{rotating.sty}{\@tempswatrue}{\@tempswafalse} @@ -4823,8 +6309,8 @@ % {\em \textit{Floatrow note.} Here goes code of revised and adapted package % to floatrow. With documentation. % -% The main redefinitions for \pkg{rotfloat} (|\flrow@restyle| stuff) purposes -% were made above (in \pkg{float} part).\\{}[\dots] +% The main redefinitions for \package{rotfloat} (|\flrow@restyle| stuff) purposes +% were made above (in \package{float} part).\\{}[\dots] % % Code contents of |\rotfloat@float| and |\rotfloat@dblfloat| moved up % inside |\flrow@restyle| macro.} @@ -4853,7 +6339,7 @@ % \begin{macro}{\rotfloat@makebox} % \begin{macro}{\rotdblfloat@makebox} % |\float@makebox| has a parameter here which will be set to |\columnwidth| -% or |\textwidth|. (In the \pkg{float} package $v1.2$ the |\columnwidth| was +% or |\textwidth|. (In the \package{float} package $v1.2$ the |\columnwidth| was % hard wired into |\float@makebox|.) So we have to pass this parameter % through the original version of |\float@makebox| which we have saved to % |\rotfloat@@makebox| within |\rotfloat@float|.) @@ -4873,8 +6359,8 @@ % \end{macro} % % That's all folks\dots {\em \textit{Floatrow note:} of borrowed -% \pkg{rotfloat} package. And here goes message about loading of -% \pkg{rotfloat} package's code.} +% \package{rotfloat} package. And here goes message about loading of +% \package{rotfloat} package's code.} % \begin{macrocode} \PackageInfo{floatrow}{Modified rotfloat package code loaded} \fi @@ -4941,8 +6427,8 @@ % There is the definition of |\footnotemark| which creates the same mark as % |\footnote| inside \texttt{minipage} environment. That could be useful in % multiple footnote marks in tables. Since the same definition was loaded -% in \pkg{footmisc} v5.3, these macros are defined at the beginning of -% document in the case only if \pkg{footmisc} was not loaded. +% in \package{footmisc} v5.3, these macros are defined at the beginning of +% document in the case only if \package{footmisc} was not loaded. % \begin{macrocode} \AtBeginDocument{\providecommand\mpfootnotemark{\@ifnextchar[%] \@xmpfootnotemark{\stepcounter\@mpfn @@ -4957,14 +6443,24 @@ % \subsection{Macro for Legends, Explications, etc.} % % \begin{macro}{\floatfoot} -% This command made for the same reasons as \pkg{ccaption}'s |\legend| +% This command made for the same reasons as \package{ccaption}'s |\legend| % macro and uses its style. It uses |\caption| mechanism. +% \changes{v0.1p}{2007/06/24}{The creation of float foot contents extracted +% for usage in longtable.} % \begin{macrocode} +\captionsetup[floatfoot]{labelformat=empty,labelsep=none} \newcommand\floatfoot{\@ifstar - {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}% - {\def\FR@tmp{\captionfootfont}\floatfoot@}} + {\def\FR@tmp{\@parboxrestore\captionfootfont}\floatfoot@}% + {\def\FR@tmp{\captionfootfont}\floatfoot@}} \newcommand\floatfoot@[1]{% \global\setbox\flrow@foot\vbox{% + \floatfoot@box{#1}}}% +% \end{macrocode} +% For the case of usage outside of |\floatbox| and float environments. E.g. +% inside \env{longtable} environment. +% \begin{macrocode} +\newcommand\floatfoot@box[1]{% + \@ifundefined{@captype}{\def\@captype{floatfoot}}{}% % \end{macrocode} % The |\if@@FS| flag stored for \env{wrap...} environments. % \changes{v0.1h}{2005/10/02}{Added setting for \cmd{\linewidth}} @@ -4974,17 +6470,16 @@ % \end{macrocode} % Apply current float settings. % \begin{macrocode} - \caption@settype{\@captype}% + \caption@setoptions{\@captype}% % \end{macrocode} % Apply floatfoot settings. % \begin{macrocode} - \caption@settype{floatfoot}% + \caption@setoptions{floatfoot}% % \end{macrocode} % No captionlabel. % \begin{macrocode} - \captionsetup{labelformat=empty,labelsep=none}% \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}% - \color@endgroup}}% + \color@endgroup} % \end{macrocode} % \end{macro} % @@ -5020,9 +6515,11 @@ % \begin{macro}{\renewfloatcommand} % The following macros allow to define user commands-abbreviations: % they have common unchanged preamble and setting for default width of -% float box. Usage:\\[\medskipamount] +% float box. Usage: +% \begin{Quote}% % |\newfloatcommand{|\meta{command}|}{|\meta{captype}|}|^^A -% |[|\meta{preamble}|][|\meta{default width}|]|\\[\medskipamount] +% |[|\meta{preamble}|][|\meta{default width}|]| +% \end{Quote}% % where: % \begin{description} % \item[\meta{command}]the new command name without backslash; @@ -5034,18 +6531,18 @@ % will be equal to width of object. % \end{description} % Examples: -% \begin{verse} -% |\newfloatcommand{ffigbox}{figure}|\\ +% \begin{Quote} +% |\newfloatcommand{ffigbox}{figure}| % |\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]| -% \end{verse} +% \end{Quote} % % The definition of command for new float command. % \changes{v0.1f}{2005/06/14}{Bug fix: corrected \cmd{\@latex@error} % command code.} -% \begin{macrocode} +% \begin{macrocode}% \newcommand\newfloatcommand[2]{% \@ifundefined{#1}{}% - {\PackageError{floatrow}{\string#1 already defined}{\@ehd}}% + {\flrow@error{\string#1 already defined}}% \@ifnextchar[{\FB@nc{#1}{#2}}{\FB@nc{#1}{#2}[]}} \newcommand\renewfloatcommand[2]{% \@ifundefined{#1}{}% @@ -5056,7 +6553,11 @@ \@ifnextchar[{\FB@@nc{#1}{#2}[#3]}{\FB@@nc{#1}{#2}[#3][]}} \def\FB@@nc#1#2[#3][#4]{% \@namedef{#1}{\begingroup - #3\def\@captype{#2}% +% \end{macrocode} +% \changes{v0.1k}{2007/05/24}{The option with settings for float +% box saved to temporary command} +% \begin{macrocode}% + \def\FB@tmpset{#3}\def\@captype{#2}% \@ifnextchar[{\@floatbox}{\@floatbox[#4]}}} % \end{macrocode} % \end{macro} @@ -5149,18 +6650,23 @@ % Gobbling of caption label and localization of counter change. % \changes{v0.1h}{2005/10/25}{The \cmd{\refstepcounter} and % \cmd{\refsteponlycounter} localized (for \cmd{\ContinuedFloat} -% with \pkg{subfig}).} +% with \package{subfig}).} +% \changes{v0.1p}{2007/06/24}{The \cmd{\stepcounter} also +% localized (for \cmd{\ContinuedFloat} +% with \package{subfig} and \package{caption}).} % \begin{macrocode} \newcommand\FR@loc@{\let\label\@gobble - \let\refstepcounter\FR@loc@refcnt\let\refsteponlycounter\FR@loc@refcnt + \let\refstepcounter\FR@loc@refcnt + \let\stepcounter\FR@loc@refcnt + \let\refsteponlycounter\FR@loc@refcnt % \end{macrocode} -% The |\cl@@ckpt| is macro which ``globalizes'' all counter. It is used by +% The |\cl@@ckpt| is macro which ``globalizes'' all counters. It is used by % \env{tabularx} environment. Here it is emptied during local creation of % caption box. % \changes{v0.1d}{2005/02/07}{Advanced redefinition of global recount % (for \env{tabularx} environment)} % \changes{v0.1f}{2005/06/14}{Added `gobbling' redefinition for -% \cmd{\sf@updatecaptionlist} macro (\pkg{subfig}).} +% \cmd{\sf@updatecaptionlist} macro (\package{subfig}).} % \begin{macrocode} \let\cl@@ckpt\empty\let\addtocounter\FR@loc@addcnt \def\sf@updatecaptionlist##1##2##3##4{}} @@ -5168,11 +6674,13 @@ % The macro for temporary redefinition for counting of caption width. % \changes{v0.1h}{2005/10/31}{The \cmd{\caption@lfmt} used instead of % \cmd{\fnum@}\cmd{\@captype}.} +% \changes{v0.1p}{2007/06/24}{Added \cmd{\relax} for compatibility with +% caption 3.1.} % \begin{macrocode} \def\FBtmp@cap#1[#2]#3{\sbox\@tempboxa % {\caption@@@make{\csname fnum@\@captype \endcsname}{#3}}% {\caption@@@make{\caption@lfmt{\@nameuse{\@captype name}}% - {\@nameuse{the\@captype}}}{#3}}% + {\@nameuse{the\@captype}}\relax}{#3}}% \global\@tempdimb\wd\@tempboxa} % \end{macrocode} % \end{macro} @@ -5183,7 +6691,7 @@ % This macro counts widths and heights of caption and % object boxes accordingly to \meta{width} and \meta{height} % arguments of |\floatbox| macro. -% \label{FBwidth} +% \label{code:FBwidth} % \begin{macrocode} \newcommand\FBget@box[3]{% % \end{macrocode} @@ -5324,7 +6832,7 @@ % \cmd{\refstepcounter}.} % \changes{v0.1h}{2005/10/30}{The \cmd{\refstepcounter} and % \cmd{\refsteponlycounter} localized (for \cmd{\ContinuedFloat} -% with \pkg{subfig}).} +% with \package{subfig}).} % \begin{macrocode} \ifx\FCwidth\relax \setbox1\vbox{\FR@loc@ @@ -5350,7 +6858,8 @@ % % There is na\u\i{}ve check of existence of |\FBwidth| and/or % |\FBheight| commands in optional arguments. I hope it could work -% unless you are manipulating with metre dimensions or set more than +% unless you are manipulating with metre dimensions (I hope you're not +% preparing a metre book!) or set more than % |5\FBwidth| (|5\FBheight|) in \meta{width} (\meta{height}) option. % \changes{v0.1f}{2005/06/14}{The \texttt{4}\cmd{\textwidth} changed % to absolute value.} @@ -5536,13 +7045,18 @@ % The start of main macro of object---caption box building. % % The preparation of optional arguments. +% \changes{v0.1k}{2007/05/24}{The option with settings for float +% box saved to temporary command} +% \changes{v0.1p}{2007/06/24}{Added \cmd{\floatbox@depth} counter for possible +% multilevel including box in box} % \begin{macrocode} \newcommand\floatbox[2][]{\begingroup - #1\def\@captype{#2}% + \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][]}}%] % \end{macrocode} @@ -5551,7 +7065,7 @@ % Building object---caption box. % \begin{macrocode} \@ifdefinable\@@@floatbox{} -\long\def\@@@floatbox[#1][#2][#3]#4#5{% +\long\def\@@@floatbox[#1][#2][#3]#4#5{\advance\floatbox@depth\@ne \@FB@vpos{#3}% % \end{macrocode} % If object---caption stays alone here go @@ -5564,18 +7078,30 @@ % \changes{v0.1f}{2005/06/14}{The \cmd{\capstart} stuff loaded here.} % \begin{macrocode} \if@@FS\else\FR@redefs - \flrow@setlist{{\@captype}}\FRifFBOX\@@setframe\fi\@@FStrue + \ifcase\floatbox@depth\or + \flrow@setlist{{\@captype}}\or + \flrow@setlist{{subfloat}{subtype}{sub\@captype}}\fi + \FRifFBOX\@@setframe\fi\@@FStrue \fi % \end{macrocode} +% \changes{v0.1k}{2007/05/24}{Put temporary command with option settings +% for float box} +% \begin{macrocode} + \FB@tmpset +% \end{macrocode} % Then load settings for beside captions, in the case we use this % layout---the beside caption could use a bit different layout. % \begin{macrocode} \FBifcapbeside\flrow@FClist\fi - \flrow@settype{tmpset}\global\let\flrow@typ@tmpset\undefined % \end{macrocode} % Restoring standard justified paragraph settings${{}+{}}$|\parindent\z@|. +% \changes{v0.1f}{2005/06/14}{Added zeroed \cmd{\leftmargin} and +% \cmd{\rightmargin} in the case +% of appearance inside list environment. Canceling \package{caption} +% of package calculations?} % \begin{macrocode} - \@parboxrestore\floatobjectset\floatfont + \@parboxrestore\leftmargin\z@\rightmargin\z@ + \floatobjectset\floatfont % \end{macrocode} % Here is called macro which counts widths and heights of caption % and object. Before it starts group to localize |\hsize| settings. @@ -5604,14 +7130,16 @@ % \changes{v0.1f}{2005/06/14}{The \cmd{\capstart} added as % b)~\cmd{\FBsetbox@obj} argument (in float row).} % \changes{v0.1h}{2005/10/02}{Added setting for \cmd{\linewidth}} +% \changes{v0.1k}{2007/05/24}{Added \cmd{\relax} for \cmd{\FBB@wd} to allow multilevel boxes} % \begin{macrocode} \adj@dim\FB@wd+\FB@wadj=\hsize\linewidth\hsize \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi - \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}#4#5}\FBbuildtrue + \FBsetbox@obj{\@ifundefined{capstart}{}{\capstart}\let\FBB@wd\relax + #4#5}\FBbuildtrue \FBifcapbeside\flrow@FC\FBB@wd\else\flrow@FB\FBB@wd\fi \global\FBbuildfalse % \global\FB@wd\hsize - \fi + \fi\advance\floatbox@depth\m@ne % \end{macrocode} % \changes{v0.1b}{2004/10/22}{Bug fix: grouping restored\ldots} % \changes{v0.1d}{2005/02/07}{\ldots for all cases.} @@ -5675,7 +7203,7 @@ % \end{macrocode} % The macro for storing float object in box in the same way as % in plain environment. There is added code for possible usage of -% \pkg{color} package and color boxes. +% \package{color} package and color boxes. % \begin{macrocode} \newcommand\FBsetbox@obj[1]{% \setbox\float@box\color@vbox\normalcolor @@ -5728,12 +7256,19 @@ % First go counter of floats in row, then the settings for float layout. % \changes{v0.1d}{2005/02/07}{Added vertical skips (\cmd{\FBaskip}, % \cmd{\FBbskip}) for layout fine tuning} +% \changes{v0.1k}{2007/01/18}{IF \cmd{\FBB@wd} still not defined, +% here it equals to \cmd{\hsize}} +% \changes{v0.2a}{2007/08/24}{Redefined boxes for building of above and below +% material} % \begin{macrocode} \newcommand\floatrow[1][2]{\setcounter{FRobj}{#1}\FB@facing \@tempswafalse\FBiffacing\@tempswatrue\fi \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi \if@tempswa\FB@readaux{\relax}\fi - \vbox\bgroup\vskip\FBaskip\hsize\FBB@wd\@@FRabove + \ifx\FBB@wd\relax\edef\FBB@wd{\the\hsize}\fi + \vbox\bgroup\vskip\FBaskip\hsize\FBB@wd + \hb@xt@\hsize{\vbox{\settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}{\advance\hsize-\@tempdima + \settowidth\leftskip\FRleftmargin\@@FRabove}}\hss}\unskip \hb@xt@\hsize\bgroup\let\FBiffloatrow\iftrue\FRleftmargin\begingroup % \end{macrocode} % Here starts trick with redefinition of |\hsize| inside float row. @@ -5754,14 +7289,50 @@ % Macro for float row end. % \begin{macrocode} \def\endfloatrow{\ifdim\lastskip>\z@\unskip\fi - \endgroup\FRrightmargin\egroup%h box - \global\let\FBiffloatrow\iffalse\@@FRbelow - \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}\egroup%v box + \endgroup\FRrightmargin\egroup%h box + \global\let\FBiffloatrow\iffalse + \hb@xt@\hsize{\vbox{\settowidth\@tempdima{{\FRleftmargin}{\FRrightmargin}}{\advance\hsize-\@tempdima + \settowidth\leftskip\FRleftmargin\@@FRbelow}}\hss}% + \vskip\FBbskip\gdef\FBaskip{\z@}\gdef\FBbskip{\z@}\egroup%v box \global\FBf@max\z@\global\FBo@max\z@\global\FBc@max\z@ \gdef\begin@FBBOX{\vbox\bgroup}\gdef\end@FBBOX{\egroup}} % \end{macrocode} % \end{environment} % +% \begin{environment}{subfloatrow}\label{subfloatrow} +% Environment for placing beside subfloats. It is simpler than +% \env{floatrow}. First go counter of floats (here it is local) +% in row, then the settings for float layout. +% \changes{v0.2a}{2007/08/24}{The \cmd{\subfloatrow} moved in main package body} +% \begin{macrocode} +\newcommand\subfloatrow[1][2]{\c@FRobj=#1%local + \ifdim\parindent<\z@\leavevmode\else\noindent\fi\hbox\bgroup + \let\FBiffloatrow\iftrue + \Xhsize\hsize\count@#1\advance\count@-1% + \settowidth\@tempdima{\subfloatrowsep}\let\floatrowsep\subfloatrowsep + \advance\Xhsize-\count@\@tempdima + \@tempdimb\Xhsize\divide\@tempdimb#1% + \hsize\@tempdimb\ignorespaces\killfloatstyle} +% \end{macrocode} +% Macro for sub float row end. +% \begin{macrocode} +\def\endsubfloatrow{\ifdim\lastskip>\z@\unskip\fi + \egroup\@ifundefined{adjustsubfloats}{}\adjustsubfloats + } +% \end{macrocode} +% \end{environment} +% +% The definition of subfloat separator. +% \begin{macrocode} +\newcommand\subfloatrowsep{\hskip\columnsep} +% \end{macrocode} +% +% The caption label only. Commented +% \begin{macrocode} +%\newcommand\captionlabel[1]{% +% \def\@makecaption##1##2{\hbox{\caption@@@make{##1}{##2}}}\caption{#1}} +% \end{macrocode} +% % \subsection{Aligning Float Boxes} % % \begin{macro}{\CenterFloatBoxes} @@ -5807,6 +7378,39 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\newdimentocommand} +% \begin{macro}{\renewdimentocommand} +% \begin{macro}{\newskiptocommand} +% \begin{macro}{\renewskiptocommand} +% \begin{macro}{\newlengthtocommand} +% \begin{macro}{\renewlengthtocommand} +% \changes{v0.1p}{2007/06/24}{Added substitution commands for usage instead skip +% or dimension parameters.} +% These macros substitute usage of \LaTeX's macro |\newlength| and \TeX's +% macros |\newdimen| and |\newskip|. These commands are are placed as prefix +% before \LaTeX's commands |\settowidth|/\allowbreak|\settoheght|/\allowbreak +% |\settodepth|, |\setlength| and |\addtolength|. +% \begin{macrocode} +\providecommand\newdimentocommand [3]{% + #1\@tempdima{#3}\@ifdefinable#2{\xdef#2{\the\@tempdima}}} +\providecommand\renewdimentocommand[3]{% + #1\@tempdima{#3}\xdef#2{\the\@tempdima}} +\providecommand\newskiptocommand [3]{% + #1\@tempskipa{#3}\@ifdefinable#2{\xdef#2{\the\@tempskipa}}} +\providecommand\renewskiptocommand[3]{% + #1\@tempskipa{#3}\xdef#2{\the\@tempskipa}} +% \end{macrocode} +% \begin{macrocode} +\providecommand\newlengthtocommand{\newskiptocommand} +\providecommand\renewlengthtocommand{\renewskiptocommand} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% % \begin{macrocode} %</floatrow> % \end{macrocode} @@ -5817,9 +7421,9 @@ % % \subsection{Float settings stuff} % -% \subsubsection{Definitions analogous to \pkg{caption}'s ones} +% \subsubsection{Definitions analogous to \package{caption}'s ones} % -% The next bundle of definitions follow \pkg{caption} package macros +% The next bundle of definitions follow \package{caption} package macros % to organize analogous mechanism of settings. % % \changes{v0.1f}{2005/06/14}{The macro \cmd{\flrow@ifinlist} @@ -5831,13 +7435,13 @@ \newcommand\flrow@setbool[2]{% \caption@ifinlist{#2}{1,true,yes,on}{\let#1\iftrue }{\caption@ifinlist{#2}{0,false,no,off}{\let#1\iffalse - }{\PackageError{floatrow}{Undefined boolean value `#2'}{\flrow@eh}% + }{\flrow@error{Undefined boolean value `#2'}% }}} % \end{macrocode} % \end{macro} % % \changes{v0.1f}{2005/06/14}{The macro \cmd{\l@addto@macro} -% deleted---it repeats \pkg{caption} package's definition.} +% deleted---it repeats \package{caption} package's definition.} % % \subsubsection{Defining Stuff for Float Layout Settings} % @@ -5855,13 +7459,26 @@ % \end{macrocode} % \end{macro} % +% \changes{v0.1k}{2007/01/20}{\cmd{\caption@setkeys[floatrow]} instead of +% \cmd{\setkeys} (AS).} % \begin{macro}{\flrow@setup} % \begin{macro}{\flrow@esetup} % \begin{macro}{\flrow@settype} % Macros analogous to |\caption@setup|, |\caption@esetup| and -% |\caption@settype|. -% \begin{macrocode} -\def\flrow@setup{\setkeys{floatrow}} +% |\caption@setoptions|. +% \begin{macrocode} +%\@ifundefined{caption@keydepth}{\@tempswatrue}{\@tempswafalse}% +%\if@tempswa +% \def\flrow@setup{\setkeys{floatrow}}% +% \@ifundefined{caption@setkeys}{}% +% {\let\flrow@caption@setkeys\caption@setkeys}% +% \def\caption@setkeys[#1]#2{\setkeys{#2}}% +% \AtEndOfPackage{\@ifundefined{flrow@caption@setkeys}{}% +% {\def\caption@setkeys\flrow@caption@setkeys +% \let\flrow@caption@setkeys\undefined}}% +%\else + \def\flrow@setup{\caption@setkeys[floatrow]{floatrow}} +%\fi \def\flrow@esetup#1{% \edef\FR@tmp{\noexpand\flrow@setup{#1}}\FR@tmp} \def\flrow@settype#1{\@ifundefined{flrow@typ@#1}{}% @@ -5879,17 +7496,18 @@ % \changes{v0.1f}{2005/06/14}{The \cmd{\caption@setposition} settings % moved here (AS).} % \begin{macrocode} -\newcommand\flrow@setlist[1]{\@flrow@setlist#1;% +\newcommand\flrow@setlist[1]{\@flrow@setlist#1{tmpset};% \FR@ifCST\flrow@capsetup\fi\@cap@setlist#1;% \caption@setposition{\FBifcaptop t\else b\fi}} \newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble \@flrow@setlist} % \end{macrocode} % \changes{v0.1f}{2005/06/14}{The \cmd{\@cap@setlist} redefined (AS).} -% The code of |\@cap@setlist| co-operated with \pkg{caption} package +% The code of |\@cap@setlist| co-operated with \package{caption} package % (code suggestions of Axel Sommerfeldt). % \begin{macrocode} -\newcommand\@cap@setlist[1]{\caption@settype{#1}% +\@ifundefined{caption@setoptions}{\let\caption@setoptions\caption@settype}{} +\newcommand\@cap@setlist[1]{\caption@setoptions{#1}% \@ifnextchar;{\let\caption@setfloattype\@gobble\@gobble}\@cap@setlist} % \end{macrocode} % This macro adds list of possible settings for beside captions. @@ -5903,7 +7521,7 @@ % \begin{macro}{\@nameundef} % \begin{macro}{\clearfloatsetup} % \changes{v0.1f}{2005/06/14}{The macro \cmd{\@nameundef} -% deleted---it repeats \pkg{caption} package's definition.} +% deleted---it repeats \package{caption} package's definition.} % Removes all settings for chosen type of float. % \begin{macrocode} \newcommand*\clearfloatsetup[1]{\@nameundef{flrow@typ@#1}} @@ -5911,16 +7529,6 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\flrow@eh} -% The |\caption@eh|-analog. -% \begin{macrocode} -\newcommand\flrow@eh{% - If you do not understand this error, please take look\MessageBreak - at `floatrow' and `caption' package documentations.\MessageBreak - \@ehc} -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\DeclareFROpt} % The |\DeclareCaptionOption|-analog.\\ % Since this command has internal usage (before end of package) it has @@ -5948,6 +7556,45 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{rawfloats} +% The default behavior of floats is like in \package{float}-like mode after +% |\restylefloat|. +% \changes{v0.1k}{2007/05/24}{Key for raw float mode added.} +% \begin{macrocode} +\let\FR@ifrawfloats\iffalse +% \end{macrocode} +% The boolean key which defines, whether floats run in plain \LaTeX{} mode. +% \begin{macrocode} +\DeclareFROpt*{rawfloats}[0]{\flrow@setbool{\FR@ifrawfloats}{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{doublefloataswide} +% Starred environments work like non-starred with special |\floatsetup| settings. +% \begin{macrocode} +\let\FR@ifdoubleaswide\iffalse +% \end{macrocode} +% The boolean key which defines, whether starred non-rotated float in onecolumn +% layout work like non-starred one but with special |\floatsetup| settings +% for wide floats. +% \begin{macrocode} +\DeclareFROpt{doublefloataswide}[0]{\flrow@setbool{\FR@ifdoubleaswide}{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{floatHaslist} +% The anchored float has list penalties around. If there are not blank line or +% |\par| command, next paragraph starts without indentation. +% \begin{macrocode} +\let\FR@iffloatHaslist\iffalse +% \end{macrocode} +% The boolean key which defines, whether anchored float +% uses the same penalties before and after environment as list environments. +% \begin{macrocode} +\DeclareFROpt{floatHaslist}[0]{\flrow@setbool{\FR@iffloatHaslist}{#1}} +% \end{macrocode} +% \end{macro} +% % \subsubsection{Declaring of float styles} % % \begin{macro}{\DeclareFloatStyle} @@ -5961,20 +7608,22 @@ \@onlypreamble\DeclareFloatStyle % \end{macrocode} % The definition of command which defines settings for new float style. -% \changes{v0.1f}{2005/06/14}{Added \cmd{\caption@settype} in definition +% \changes{v0.1f}{2005/06/14}{Added \cmd{\caption@setoptions} in definition % of \cmd{\flrow@capsetup} (AS).} +% \changes{v0.2a}{2007/08/24}{Added star to \cmd{\caption@setstyle} +% (AS).} % \begin{macrocode} \newcommand*\flrow@setstyle[1]{% \@ifundefined{flrow@sty@#1}% - {\PackageError{floatrow}{Undefined float style `#1'}{\flrow@eh}}% + {\flrow@error{Undefined float style `#1'}}% {\FBstyle@reset \def\flrow@capsetup{% - \@ifundefined{caption@sty@#1}{}{\caption@setstyle{#1}}% - \caption@settype {#1}}% + \@ifundefined{caption@sty@#1}{}{\caption@setstyle*{#1}}% + \caption@setoptions {#1}}% \flrow@esetup{\csname flrow@sty@#1\endcsname}}} % \end{macrocode} -% Declarations of \pkg{float} package's emulating styles and new -% \pkg{floatrow} styles. +% Declarations of \package{float} package's emulating styles and new +% \package{floatrow} styles. % \changes{v0.1f}{2005/06/14}{The bottom caption position moved in % \cmd{\FBstyle@reset} as default.} % \begin{macrocode} @@ -5991,7 +7640,7 @@ framefit=yes,heightadjust=all,framearound=all} % \end{macrocode} % -% \begin{macro}{style=} +% \begin{macro}{style} % Declaring of key for float styles. % \begin{macrocode} \DeclareFROpt{style}{\flrow@setstyle{#1}} @@ -5999,13 +7648,13 @@ % \end{macro} % % The flag, which loads related caption style (if exists), to chosen float -% style. The \pkg{caption} 3.0 package defines only one related caption -% style to \pkg{float} package's style---\texttt{ruled}. +% style. The \package{caption} 3.0 package defines only one related caption +% style to \package{float} package's style---\texttt{ruled}. % \begin{macrocode} \let\FR@ifCST\iftrue % \end{macrocode} % \end{macro} -% \begin{macro}{relatedcapstyle=} +% \begin{macro}{relatedcapstyle} % The boolean key which defines, whether to use caption style, related % to chosen float style. % \begin{macrocode} @@ -6015,11 +7664,11 @@ % % \subsubsection{Defining Font} % -% \begin{macro}{font=} -% \begin{macro}{footfont=} +% \begin{macro}{font} +% \begin{macro}{footfont} % Fonts for object and |\floatfoot| contents. The settings of font for % |\floatfoot| use |\captionsetup| mechanism, so its name follows -% \pkg{caption} package's rules (|\captionfootfont|). +% \package{caption} package's rules (|\captionfootfont|). % \changes{v0.1f}{2005/06/14}{Removed \texttt{footfont} key.} % \changes{v0.1f}{2005/06/14}{Removed \cmd{\AtBeginDocument}'s check---the % \cmd{\captionsetup} is always known.} @@ -6041,8 +7690,8 @@ % % \begin{macro}{\captionfootfont} % Font for |\legend|-like command |\floatfoot|. This font is used inside -% macro which uses \pkg{caption} package mechanism, so the name of this -% font follows rules of font naming in \pkg{caption} package. +% macro which uses \package{caption} package mechanism, so the name of this +% font follows rules of font naming in \package{caption} package. % \begin{macrocode} \newcommand*\captionfootfont{\normalfont\footnotesize} % \end{macrocode} @@ -6067,21 +7716,26 @@ % |\flrow@setfont{|\meta{command}|}{|\meta{keyval-list of names}|}|. % \changes{v0.1f}{2005/06/14}{The code of \cmd{\flrow@setfont} uses % caption's key-val settings.} +% \changes{v0.1p}{2007/06/24}{Changed definition of \cmd{\flrowsetfont} +% for compatibility with caption (AS).} % \begin{macrocode} +%\newcommand*\flrow@setfont[2]{% +% \let\caption@tempa\@empty +% \begingroup\caption@setkeys[floatrow]{caption@fnt}{#2}\endgroup +% \expandafter\let\csname float#1\endcsname\caption@tempa} \newcommand*\flrow@setfont[2]{% - \let\caption@tempa\@empty - \begingroup\setkeys{caption@fnt}{#2}\endgroup - \expandafter\let\csname float#1\endcsname\caption@tempa} + \caption@setfont{@tempa}{#2}% + \expandafter\let\csname float#1\endcsname\caption@tempa} % \end{macrocode} % \end{macro} % \changes{v0.1f}{2005/06/14}{\cmd{\DeclareFloatFont} bundle -% removed---\pkg{floatrow} package uses \file{caption3} settings.} +% removed---\package{floatrow} package uses \file{caption3} settings.} % % \subsubsection{Declaring of Caption Position} % -% \begin{macro}{capposition=} +% \begin{macro}{capposition} % Keys for defining caption position in float box. -% \changes{v0.1f}{2005/06/14}{Added \texttt{position=} key as analog name +% \changes{v0.1f}{2005/06/14}{Added \texttt{position} key as analog name % to the same key in \cmd{\captionsetup} stuff.} % \begin{macrocode} \DeclareFROpt{capposition}{\flrow@cappos{#1}} @@ -6099,7 +7753,7 @@ }{\caption@ifinlist{#1}{T,TOP,ABOVE}{\CAPTOP\nocapbeside }{\caption@ifinlist{#1}{b,bottom,below,default}{\capbot\nocapbeside }{\caption@ifinlist{#1}{beside,side}{\caption@setposition{a}\capbeside - }{\PackageError{floatrow}{Undefined caption position `#1'}{\flrow@eh}% + }{\flrow@error{Undefined caption position `#1'}% }}}}} % \end{macrocode} % \end{macro} @@ -6140,10 +7794,11 @@ % \begin{macro}{\capbeside} % \begin{macro}{\nocapbeside} % There is flag and commands for printing caption and object beside. +% \changes{v0.2a}{2007/08/24}{Removed \cmd{\global}.} % \begin{macrocode} \let\FBifcapbeside\iffalse -\newcommand\capbeside{\global\let\FBifcapbeside\iftrue} -\newcommand\nocapbeside{\global\let\FBifcapbeside\iffalse} +\newcommand\capbeside{\let\FBifcapbeside\iftrue} +\newcommand\nocapbeside{\let\FBifcapbeside\iffalse} % \end{macrocode} % \end{macro} % \end{macro} @@ -6151,7 +7806,7 @@ % % \subsubsection{Defining for Beside Captions} % -% \begin{macro}{capbesideframe=} +% \begin{macro}{capbesideframe} % This boolean key declares whether near beside caption stays framed % object. % \changes{v0.1f}{2005/06/14}{Removed \texttt{besidecapframe} key.} @@ -6160,7 +7815,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{capbesidewidth=} +% \begin{macro}{capbesidewidth} % This key defines width of beside caption. % \changes{v0.1f}{2005/06/14}{Removed \texttt{besidecapwidth} key.} % \changes{v0.1f}{2005/06/14}{Bug fix: the \cmd{\FCwidth} command defined @@ -6171,12 +7826,12 @@ \newcommand\useFCwidth{\let\FC@ifc@wd\iftrue\let\FCwidth\relax} \@ifdefinable\FCwidth{\let\FCwidth\relax} \newcommand\flrow@FCc@wd[1]{% - \caption@ifinlist{#1}{none,sidefill}{\let\FC@ifc@wd\iffalse + \caption@ifinlist{#1}{none,sidefil}{\let\FC@ifc@wd\iffalse }{\useFCwidth\def\FCwidth{#1}}} % \end{macrocode} % \end{macro} % -% \begin{macro}{capbesideposition=} +% \begin{macro}{capbesideposition} % Declares position of beside caption in document. % \changes{v0.1f}{2005/06/14}{Removed \texttt{besidecapposition} key.} % \begin{macrocode} @@ -6194,7 +7849,7 @@ \define@key{flrow@scpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}} \newcommand*\flrow@scpos[1]{% \let\FR@tmp\@empty - \begingroup\setkeys{flrow@scpos}{#1}\endgroup + \begingroup\caption@setkeys[floatrow]{flrow@scpos}{#1}\endgroup \FR@tmp} \@onlypreamble\DeclareSCPos % \end{macrocode} @@ -6228,7 +7883,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{footposition=} +% \begin{macro}{footposition} % Keys for defining foot text position. % \begin{macrocode} \DeclareFROpt{footposition}{\flrow@ftpos{#1}} @@ -6244,7 +7899,7 @@ \define@key{flrow@ftpos}{#1}[]{\g@addto@macro\FR@tmp{#2}}} \newcommand*\flrow@ftpos[1]{% \let\FR@tmp\@empty - \begingroup\setkeys{flrow@ftpos}{#1}\endgroup + \begingroup\caption@setkeys[floatrow]{flrow@ftpos}{#1}\endgroup \FR@tmp} \@onlypreamble\DeclareFtPos % \end{macrocode} @@ -6258,7 +7913,7 @@ % \end{macro} % \end{macro} % -% \begin{macro}{heightadjust=} +% \begin{macro}{heightadjust} % Keys for vertical adjustment and alignment. % \begin{macrocode} \DeclareFROpt{heightadjust}{\flrow@htadj{#1}} @@ -6274,7 +7929,7 @@ \newcommand\DeclareHtAdj[2]{% \define@key{flrow@htadj}{#1}[]{\g@addto@macro\FR@tmp{#2}}} \newcommand*\flrow@htadj[1]{\let\FR@tmp\@empty - \begingroup\setkeys{flrow@htadj}{#1}\endgroup + \begingroup\caption@setkeys[floatrow]{flrow@htadj}{#1}\endgroup \FR@tmp} \@onlypreamble\DeclareHtAdj % \end{macrocode} @@ -6301,7 +7956,7 @@ % \end{macro} % \end{macro} % -% \begin{macro}{valign=} +% \begin{macro}{valign} % Keys for vertical alignment. % \begin{macrocode} \DeclareFROpt{valign}{\@FB@vpos{#1}} @@ -6323,7 +7978,7 @@ % % \subsubsection{Facing Pages} % -% \begin{macro}{facing=} +% \begin{macro}{facing} % Defines, if necessary, flag for facing pages. % \begin{macrocode} \DeclareFROpt{facing}[1]{\flrow@setbool{\FBiffacing}{#1}} @@ -6342,7 +7997,7 @@ % % \subsubsection{Float Box and Float Object Settings} % -% \begin{macro}{margins=} +% \begin{macro}{margins} % \begin{macro}{\flrow@FBAlign} % Declaring of option for |\floatbox| alignment and margins material. % \changes{v0.1f}{2005/06/14}{Removed \texttt{floatmarginsset} key.} @@ -6353,7 +8008,7 @@ % \begin{macrocode} \newcommand*\flrow@FBAlign[1]{% \@ifundefined{flrow@mj@#1}% - {\PackageError{floatrow}{Undefined float alignment `#1'}{\flrow@eh}}% + {\flrow@error{Undefined float alignment `#1'}}% {\@nameuse{flrow@mj@#1}}} % \end{macrocode} % \end{macro} @@ -6371,7 +8026,7 @@ % % Declaring of float box alignment. % \changes{v0.1g}{2005/07/15}{Added settings for \cmd{\LTleft} and -% \cmd{\LTright} commands from \pkg{longtable} package.} +% \cmd{\LTright} commands from \package{longtable} package.} % \begin{macrocode} \newskip\LTleft\newskip\LTright \DeclareMarginSet{centering}{\setfloatmargins{\hfill}{\hfill}% @@ -6451,8 +8106,8 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{objectset=} -% \begin{macro}{justification=} +% \begin{macro}{objectset} +% \begin{macro}{justification} % Declaring of option for float object contents' alignment. % \changes{v0.1f}{2005/06/14}{Added key \texttt{justification} % as analog to \cmd{\captionsetup} stuff.} @@ -6475,7 +8130,7 @@ % \end{macrocode} % \end{macro} % \changes{v0.1f}{2005/06/14}{\cmd{\DeclareObjectSet} bundle -% removed---\pkg{floatrow} +% removed---\package{floatrow} % package uses \file{caption} settings.} % % \begin{macro}{\flrow@FBoAlign} @@ -6486,7 +8141,7 @@ % \begin{macrocode} \newcommand*\flrow@FBoAlign[1]{% \@ifundefined{caption@hj@#1}% - {\PackageError{floatrow}{Undefined object setting `#1'}{\flrow@eh}}% + {\flrow@error{Undefined object setting `#1'}}% {\expandafter\let\expandafter\floatobjectset \csname caption@hj@#1\endcsname}} % \end{macrocode} @@ -6503,7 +8158,7 @@ % % \subsubsection{Defining Float Width} % -% \begin{macro}{floatwidth=} +% \begin{macro}{floatwidth} % The float width settings mainly for plain float environments. % \changes{v0.1f}{2005/06/14}{Removed \texttt{besidecapsep} key.} % \begin{macrocode} @@ -6522,24 +8177,28 @@ % \end{macro} % \end{macro} % \begin{macro}{\flrow@FBo@wd} -% \changes{v0.1f}{2005/06/14}{Macro uses \pkg{caption} macros.} +% \changes{v0.1f}{2005/06/14}{Macro uses \package{caption} macros.} % \begin{macrocode} \newcommand\flrow@FBo@wd[1]{% - \caption@ifinlist{#1}{sidefil}{\filFCOhsize + \caption@ifinlist{#1}{none,sidefil}{\filFCOhsize }{\nofilFCOhsize\def\flrow@setwd{\@tempdima=#1}}} % \end{macrocode} % \end{macro} % % \subsubsection{Defining Float Separators} % -% \begin{macro}{floatrowsep=} -% \begin{macro}{capbesidesep=} +% \begin{macro}{floatrowsep} +% \begin{macro}{capbesidesep} % Option |floatrowsep| sets separations for beside float boxes % in float row. % \changes{v0.1f}{2005/06/14}{Removed \texttt{besidecapsep} key.} % \begin{macrocode} \DeclareFROpt{floatrowsep}{\flrow@setFRsep\floatrowsep{#1}} % \end{macrocode} +% Option |subfloatrowsep| sets separations for beside captions. +% \begin{macrocode} +\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}} +% \end{macrocode} % Option |capbesidesep| sets separations for beside captions. % \begin{macrocode} \DeclareFROpt{capbesidesep}{\flrow@setFRsep\floatcapbesidesep{#1}} @@ -6566,16 +8225,16 @@ % The |\caption@setlabelseparator|-analog.\\ % Command which defines settings for separators in float row, and % between beside caption and float object. -% \changes{v0.1f}{2005/06/14}{Macro uses \pkg{caption} macros.} +% \changes{v0.1f}{2005/06/14}{Macro uses \package{caption} macros.} % \begin{macrocode} \newcommand*\flrow@setFRsep[2]{% \@ifundefined{caption@lsep@#2}% - {\PackageError{floatrow}{Undefined float separator `#2'}{\flrow@eh}}% + {\flrow@error{Undefined float separator `#2'}}% {\expandafter\let\expandafter#1\csname caption@lsep@#2\endcsname}} % \end{macrocode} % A few options define possible separators. % \changes{v0.1f}{2005/06/14}{The \texttt{quad} and \texttt{none} -% deleted (repeated from \pkg{caption}).} +% deleted (repeated from \package{caption}).} % \begin{macrocode} \DeclareFloatSeparators{columnsep}{\hskip\columnsep} %\DeclareFloatSeparators{quad}{\quad} @@ -6601,11 +8260,11 @@ % % \subsubsection{Defining Float Rules/Skips} % -% \begin{macro}{precode=} -% \begin{macro}{rowprecode=} -% \begin{macro}{midcode=} -% \begin{macro}{postcode=} -% \begin{macro}{rowpostcode=} +% \begin{macro}{precode} +% \begin{macro}{rowprecode} +% \begin{macro}{midcode} +% \begin{macro}{postcode} +% \begin{macro}{rowpostcode} % Keys for building of float style (rules). % \changes{v0.1f}{2005/06/14}{Removed \texttt{Precode} and % \texttt{Postcode} keys.} @@ -6643,7 +8302,7 @@ % \begin{macrocode} \newcommand*\flrow@FBrule[3]{% \@ifundefined{flrow@FBr@#3}% - {\PackageError{floatrow}{Undefined rule `#3'}{\flrow@eh}}% + {\flrow@error{Undefined rule `#3'}}% {\let#1\empty \expandafter\let\expandafter#2\csname flrow@FBr@#3\endcsname}} % \end{macrocode} @@ -6651,7 +8310,7 @@ % \begin{macrocode} \newcommand*\flrow@FRrule[3]{% \@ifundefined{flrow@FBr@#3}% - {\PackageError{floatrow}{Undefined rule `#3'}{\flrow@eh}}% + {\flrow@error{Undefined rule `#3'}}% {\def#2{\FBiffloatrow\else\@nameuse{flrow@FBr@#3}\fi}% \expandafter\let\expandafter#1\csname flrow@FBr@#3\endcsname}} % \end{macrocode} @@ -6659,7 +8318,7 @@ % \begin{macrocode} \newcommand*\flrow@FBskip[1]{% \@ifundefined{flrow@FBr@#1}% - {\PackageError{floatrow}{Undefined rule `#1'}{\flrow@eh}}% + {\flrow@error{Undefined rule `#1'}}% {\expandafter\let\expandafter\@@FBskip\csname flrow@FBr@#1\endcsname}} % \end{macrocode} % \end{macro} @@ -6669,9 +8328,9 @@ % Declared options for keys for building of float style (rules). % \begin{macrocode} \DeclareFloatVCode{none}{} -\DeclareFloatVCode{thickrule}{\hrule height.8ptdepth0pt\kern2pt} -\DeclareFloatVCode{rule}{\kern2pt\hrule\kern2pt} -\DeclareFloatVCode{lowrule}{\kern2pt\hrule} +\DeclareFloatVCode{thickrule}{\par\rule{\hsize}{.8pt}\vskip2pt\par} +\DeclareFloatVCode{rule}{\vskip2pt\hrule\vskip2pt} +\DeclareFloatVCode{lowrule}{\par\vskip2pt\rule\hsize\@wholewidth\par} \DeclareFloatVCode{captionskip}{\vskip\captionskip} % \end{macrocode} % @@ -6683,12 +8342,13 @@ % Reset of all used layout settings. % \changes{v0.1f}{2005/06/14}{Added \cmd{\captop} macro as default caption % position.} +% \changes{v0.2a}{2007/08/24}{Removed \cmd{\gdef}.} % \begin{macrocode} \newcommand\FBstyle@reset{\let\FRifFBOX\iffalse\OADJfalse\CADJfalse\capbot \def\@@FBskip{\vskip\captionskip}\def\@@FRabove{}\def\@@FRbelow{}% \def\@@FBabove{}\def\@@FBbelow{}% - \def\FB@Bset{}\gdef\FB@frame{}\gdef\FBo@frame{}% - \gdef\FBo@wadj{}\gdef\FBo@hadj{}\gdef\FB@wadj{}\gdef\FB@hadj{}} + \def\FB@Bset{}\def\FB@frame{}\def\FBo@frame{}% + \def\FBo@wadj{}\def\FBo@hadj{}\def\FB@wadj{}\def\FB@hadj{}} \newcommand\@@FRabove{}\newcommand\@@FRbelow{} \newcommand\@@FBabove{}\newcommand\@@FBbelow{} \newcommand\@@FBskip{\vskip\captionskip} @@ -6703,7 +8363,7 @@ % % Keys for building of float style (boxes). % -% \begin{macro}{framestyle=} +% \begin{macro}{framestyle} % This key defines style of frame. % \begin{macrocode} \DeclareFROpt{framestyle}{\@ifundefined{FB@#1@frame}% @@ -6711,7 +8371,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{framearound=} +% \begin{macro}{framearound} % This key defines object to be framed. % \begin{macrocode} \DeclareFROpt{framearound}{\flrow@fr@round{#1}} @@ -6719,8 +8379,8 @@ % \end{macro} % % \begin{macro}{\flrow@fr@round} -% Command for \texttt{framearound=}. -% \changes{v0.1f}{2005/06/14}{Macro uses \pkg{caption} macro +% Command for \texttt{framearound}. +% \changes{v0.1f}{2005/06/14}{Macro uses \package{caption} macro % \cmd{\caption@ifinlist}.} % \begin{macrocode} \newcommand*\flrow@fr@round[1]{% @@ -6729,13 +8389,13 @@ }{\caption@ifinlist{#1}{floatbox,all}{\let\FRifFBOX\iftrue \def\FB@BO@{FB}% }{\caption@ifinlist{#1}{none}{\let\FRifFBOX\iffalse - }{\PackageError{floatrow}{Undefined framed object `#1'}{\flrow@eh}% + }{\flrow@error{Undefined framed object `#1'}% }}}} % \end{macrocode} % \end{macro} % -% \begin{macro}{framefit=} -% \begin{macro}{frameset=} +% \begin{macro}{framefit} +% \begin{macro}{frameset} % This boolean key defines whether frame size fits to current |\hsize|. % \changes{v0.1f}{2005/06/14}{Removed \texttt{framereduce} key.} % \begin{macrocode} @@ -6800,13 +8460,13 @@ % % \subsubsection{Defining Float Skips} % -% \begin{macro}{captionskip=} -% \begin{macro}{footskip=} +% \begin{macro}{captionskip} +% \begin{macro}{footskip} % The following options define skips: first---between float object and % caption (if it used in float style); second---before foot material % (footnote or other foot text). % \changes{v0.1f}{2005/06/14}{Defining also standard \cmd{\abovecaptionskip} -% for compatibility with \pkg{caption}'s \cmd{\captionof}.} +% for compatibility with \package{caption}'s \cmd{\captionof}.} % \begin{macrocode} \DeclareFROpt{captionskip}{\def\captionskip{#1}% \setlength\abovecaptionskip{#1}} @@ -6832,7 +8492,7 @@ % % \subsubsection{Defining Float Footnote Rule} % -% \begin{macro}{footnoterule=} +% \begin{macro}{footnoterule} % \begin{macro}{\flrow@footrule} % The definitions of |\footnoterule| inside float environment. % This macro is allowed only in preamble. @@ -6842,7 +8502,7 @@ \long\@namedef{flrow@fnrule@#1}{#2}} \newcommand*\flrow@footrule[1]{% \@ifundefined{flrow@fnrule@#1}% - {\PackageError{floatrow}{Undefined footnoterule `#1'}{\flrow@eh}}% + {\flrow@error{Undefined footnoterule `#1'}}% {\let\@@FRabove\empty \expandafter\let\expandafter\FBfootnoterule\csname flrow@fnrule@#1\endcsname}} @@ -6906,28 +8566,34 @@ \@onlypreamble\DeclareFNOpt % \end{macrocode} % \begin{macrocode} -\newcommand\flnew@setdefault{\setkeys{newfloat} +\newcommand\flnew@setdefault{\caption@setkeys[floatrow]{newfloat} {placement=tbp,fileext=lox}} % \end{macrocode} % The |\newtoks| for defining of float environments (using % |\flrow@restyle| command) at the end of preamble. (Took a leaf with -% settings for lists of floats from \pkg{float} package's book.) +% settings for lists of floats from \package{float} package's book.) +% \changes{v0.1p}{2007/06/24}{Double code with \texttt{ftype@}\meta{captype} +% deleted.} +% \changes{v0.1p}{2007/06/24}{The \cmd{\fname@}\meta{floatname} changed to +% \cs{}\meta{floatname}\texttt{name} macros redefined locally.} +% \changes{v0.2a}{2007/08/24}{Corrected bug with \texttt{ftype@} definition (AS).} % \begin{macrocode} \@ifdefinable\flrow@types{\newtoks\flrow@types} \newcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}% - \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}% - \addtocounter{float@type}{\value{float@type}} - \@namedef{fname@#1}{#1}\newcounter{#1}% + \expandafter\edef\csname 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 fname@#1\endcsname\ + {\expandafter\noexpand\csname #1name\endcsname\ \expandafter\noexpand\csname the#1\endcsname}% \@namedef{the#1}{\arabic{#1}}% - \flnew@setdefault\setkeys{newfloat}{#2}% + \flnew@setdefault\caption@setkeys[floatrow]{newfloat}{#2}% \let\FR@tmp=\relax \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}% \@tempa - \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}% - \addtocounter{float@type}{\value{float@type}}} +% \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}% +% \addtocounter{float@type}{\value{float@type}} + } \@onlypreamble\DeclareNewFloatType % \end{macrocode} % Key for placement defining. @@ -6939,9 +8605,11 @@ % \end{macrocode} % Key for float label name defining. % This macro is allowed only in preamble. +% \changes{v0.1p}{2007/06/24}{The \cmd{\fname@}\meta{floatname} changed to +% \cs{}\meta{floatname}\texttt{name} macros redefined locally.} % \begin{macrocode} \DeclareFNOpt*{name}{\flnew@fname{#1}} -\newcommand\flnew@fname[1]{\@namedef{fname@\FB@captype}{#1}} +\newcommand\flnew@fname[1]{\@namedef{\FB@captype name}{#1}} \@onlypreamble\flnew@fname % \end{macrocode} % Key for extension of ``toc''-file. @@ -6973,141 +8641,11 @@ % \end{macrocode} % \end{macro} % -% \subsection{Building Subfloatrow} -% -% \begin{macrocode} -%<*frforsubfig> -% \end{macrocode} -% \changes{v0.1f}{2005/06/14}{The subfloatrow support became a part of a -% \pkg{floatrow} package.} -% At first defined dimension for maximal height of subcaption. Then macro -% for defining height of subcaption box. -% \begin{macrocode} -\newlength\FBsc@max -\newlength\FBso@max -\@ifdefinable\FBsubcheight{\let\FBsubcheight\relax} -\@ifdefinable\FBsuboheight{\let\FBsuboheight\relax} -% \end{macrocode} -% -% \begin{macro}{\adjustsubfloats} -% The user command which loaded at the end of row of subcaptions. -% \changes{v0.1f}{2005/06/14}{Removed \cmd{\FB@subfloat} and -% \cmd{\FB@subcaption} definitions: the code for \env{subfloatrow} -% support placed in \pkg{subfig}'s definitions.} -% \changes{v0.1f}{2005/06/14}{The \cmd{\xdef} changed to local -% \cmd{\edef}.} -% \begin{macrocode} -\newcommand\adjustsubfloats{\@tempswafalse - \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi - \if@tempswa\FB@writeaux{% - \string\global\string\c@FBcnt\thepage - \ifCADJ\string\edef\string\FBsubcheight{\the\FBsc@max}\fi - \ifOADJ\string\edef\string\FBsuboheight{\the\FBso@max}\fi - }\fi - \global\let\FBsubcheight\relax\global\let\FBsuboheight\relax - \global\FBso@max\z@\global\FBsc@max\z@} -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{subfloatrow}\label{subfloatrow} -% Environment for placing beside subfloats. It is simpler than -% \env{floatrow}. First go counter of floats (here it is local) -% in row, then the settings for float layout. -% \begin{macrocode} -\newcommand\subfloatrow[1][2]{\c@FRobj=#1%local - \ifdim\parindent<\z@\leavevmode\else\noindent\fi\hbox\bgroup - \Xhsize\hsize\count@#1\advance\count@-1% - \settowidth\@tempdima{\subfloatrowsep}% - \advance\Xhsize-\count@\@tempdima - \@tempdimb\Xhsize\divide\@tempdimb#1% - \hsize\@tempdimb\ignorespaces} -% \end{macrocode} -% Macro for sub float row end. -% \begin{macrocode} -\def\endsubfloatrow{\ifdim\lastskip>\z@\unskip\fi - \egroup\adjustsubfloats} -% \end{macrocode} -% \end{environment} -% -% The definition of subfloat separator. -% \begin{macrocode} -\newcommand\subfloatrowsep{\hskip\columnsep} -\DeclareFROpt{subfloatrowsep}{\flrow@setFRsep\subfloatrowsep{#1}} -% \end{macrocode} -% -% \begin{macrocode} -%</frforsubfig> -% \end{macrocode} -% -% \begin{macrocode} -%<*frforlongtbl> -% \end{macrocode} -% -% \subsection{Support for \pkg{longtable} Package} -% -% \changes{v0.1g}{2005/07/15}{The \pkg{longtable} support moved inside -% \pkg{floatrow} package.} -% To follow layout for tables which need size of caption equal to width -% of table, here added a code which catches width of table from -% \file{aux}-file and sets to |\LTcapwidth| parameter (great thanks -% A. Sommerfeldt for compact code created as patch of |\LT@array| command). -% -% At first we save macro |\LT@array| under name |\flrow@LT@array|. -% Then start redefinition. -% \begin{macrocode} -\AtBeginDocument{\@ifundefined{LT@array}{}{\let\flrow@oriLT@array\LT@array - \let\LT@array\flrow@LT@array}} -\newcommand\flrow@LT@array{% -% \end{macrocode} -% Here are added settings for table font (similar to other table -% environments). -% \changes{v0.1j}{2006/07/24}{The \cmd{\belowcaptionskip} is set -% equal to \cmd{\captionskip}.} -% \begin{macrocode} - \flrow@setlist{{table}{longtable}}\normalfont\floatfont - \belowcaptionskip\captionskip -% \end{macrocode} -% Here goes safe and redefinition of |\LT@make@row| macro in the way -% of managing of counting of table width. -% \begin{macrocode} - \FBifLTcapwidth - \let\flrow@LT@make@row\LT@make@row - \def\LT@make@row{% - \let\LT@make@row\flrow@LT@make@row - \LT@make@row -% \end{macrocode} -% The |\LT@entry| here used for width calculation. -% \begin{macrocode} - \ifx\LT@save@row\relax\else\begingroup - \LTcapwidth\z@ - \def\LT@entry####1####2{\advance\LTcapwidth####2}\LT@save@row - \ifdim\LTcapwidth=\z@\else\global\LTcapwidth\LTcapwidth\fi - \endgroup\fi}% - \fi -% \end{macrocode} -% At last goes \pkg{longtable}'s macro itself. -% \begin{macrocode} - \flrow@oriLT@array} -% \end{macrocode} -% -% The definition of subfloat separator. -% \begin{macrocode} -\let\FBifLTcapwidth\iffalse -\DeclareFROpt{LTcapwidth}{\flrow@LTcapwd{#1}} -\newcommand*\flrow@LTcapwd[1]{% - \caption@ifinlist{#1}{table,contents}{\let\FBifLTcapwidth\iftrue - }{\let\FBifLTcapwidth\iffalse\setlength\LTcapwidth{#1}}} -% \end{macrocode} -% -% \begin{macrocode} -%</frforlongtbl> -% \end{macrocode} -% % \subsubsection{Processing of floatsetup options} % % \begin{macro}{\ProcessOptionsWithKV} % As in caption style options are processed with usage of the -% \pkg{keyval} package. +% \package{keyval} package. % \changes{v0.1j}{2006/02/24}{Edited by suggestions of A.Sommerfeldt} % \begin{macrocode} \def\ProcessOptionsWithKV#1{% @@ -7150,7 +8688,7 @@ }% }% \edef\FR@tmp{% - \noexpand\setkeys{#1}{% + \noexpand\caption@setkeys[floatrow]{#1}{% \FR@tmp\@ptionlist{\@currname.\@currext}% }% }% @@ -7161,15 +8699,24 @@ \FR@iffancy\RequirePackage{fr-fancy}\fi \let\ProcessOptionsWithKV\undefined % \end{macrocode} +% \end{macro} +% % At beginning of document there are loaded macros |\flrow@restyle| % for table and figure floats. (Any new float type gets this command % when |\newfloat| macro of |\DeclareNewFloatType| are used.) +% \changes{v0.1k}{2007/05/24}{The support for raw float mode added.} % \begin{macrocode} -\AtBeginDocument{\flrow@restyle{table}\flrow@restyle{figure}% - \let\FR@tmp\flrow@restyle \the\flrow@types - \@onlypreamble\flrow@restyle\flrow@types{}} +\AtBeginDocument{ + \FR@ifrawfloats + \let\FR@tmp\flrow@Raw@restyle + \else + \flrow@restyle{table}\flrow@restyle{figure}% + \let\FR@tmp\flrow@restyle + \fi + \the\flrow@types + \@onlypreamble\flrow@restyle\@onlypreamble\flrow@Raw@restyle + \flrow@types={}} % \end{macrocode} -% \end{macro} % % \begin{macrocode} %</floatsetup> @@ -7178,13 +8725,13 @@ % \changes{v0.1f}{2005/06/14}{The support for non-caption usage deleted.} % \changes{v0.1f}{2005/06/14}{The support for obsolete macros deleted.} % -% \subsection{Additional Definitions for Fancy Frames} -% % \begin{macrocode} %<*frfancy> \RequirePackage{fancybox} % \end{macrocode} % +% \subsection{Additional Definitions for Fancy Frames} +% % \subsection{Macros for Color Frame} % % \begin{macro}{\FB@colorbox@frame} @@ -7217,12 +8764,12 @@ \DeclareFROpt{colorframeset}{\flrow@fcolorbox{#1}} \newcommand*\flrow@fcolorbox[1]{% \@ifundefined{flrow@fcolorbox@#1}% - {\PackageError{floatrow}{Undefined color box `#1'}{\flrow@eh}}% + {\flrow@error{Undefined color box `#1'}}% {\expandafter\let\expandafter\FB@fcolorbox \csname flrow@fcolorbox@#1\endcsname}} \newcommand*\DeclareColorBox[2]{% - \@ifundefined{color}{\PackageError{floatrow}% - {For usage of colored frames\MessageBreak load color package}{}}% + \@ifundefined{color}{\flrow@error + {For usage of colored frames\MessageBreak load color package}}% {\long\@namedef{flrow@fcolorbox@#1}{#2}}} % \end{macrocode} % @@ -7269,7 +8816,7 @@ % \begin{macro}{\FB@wshadowbox@adj} % \begin{macro}{\FB@wshadowbox@reset} % The definition for frame \texttt{wshadowbox}---similar to -% \texttt{shadowbox} from \pkg{fancybox}. +% \texttt{shadowbox} from \package{fancybox}. % First macro is the definition of frame style (here is |\wshadowbox|); % second defines compensating material to get frame fitted to current % |\hsize|; third defines default values of compensating material. @@ -7347,6 +8894,13 @@ %</frfancy> % \end{macrocode} % +% +% +% +% \begin{macrocode} +%<*floatpagestyle> +% \end{macrocode} +% % \subsection{Empty Floating page} % % Here goes small sneaky-tricky style to put desired page style @@ -7356,7 +8910,6 @@ % First goes macro which defines desired page style for page with % current float. % \begin{macrocode} -%<*floatpagestyle> \newcommand\floatpagestyle[1]{\@ifundefined{ps@#1}\undefinedpagestyle {\begingroup \let\thepage\relax\let\protect\@unexpandable@protect @@ -7409,13 +8962,16 @@ %</floatpagestyle> % \end{macrocode} % +% +% +% % \begin{macrocode} %<*listpen> % \end{macrocode} % % \subsection{List Penalties Managing} % -% The package \pkg{listpen} is a beta-temp package, which +% The package \package{listpen} is a beta-temp package, which % offers commands |\allowprelistbreaks|, % |\allowpostlistbreaks| and |\allowitembreaks| which help % to manage page breaking at the beginning and the end of @@ -7430,7 +8986,7 @@ % These commands set penalties before lists, after lists and between items. % They set globally or inside group or (also list!) % environment\footnote{Look also at \cmd{\allowdisplaybreaks} -% macro from \pkg{amsmath} package.} penalties accordingly to digits +% macro from \package{amsmath} package.} penalties accordingly to digits % from |[-4]| (never break) to |[4]| (always break). The values of optional % argument in these commands analogous to values of optional arguments % in, e.g., |\pagebreak| command. The default value of all three commands @@ -7484,9 +9040,584 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\RestoreSpaces} +% \changes{v0.1b}{2007/05/24}{Adding definition of \cmd{\RestoreSpaces} command} +% A simple command to turn off |\if@nobreak| flag. +% \begin{macrocode} +\providecommand\RestoreSpaces{\@nobreakfalse} +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} %</listpen> % \end{macrocode} % +% +% +% +% \begin{macrocode} +%<*floatrow> +\AtBeginDocument{% +\@ifundefined{sf@@@subfloat}{\@tempswafalse}{\@tempswatrue} +\if@tempswa\RequirePackage{fr-subfig}\fi} +%</floatrow> +% \end{macrocode} +% +% \begin{macrocode} +%<*frforsubfig> +% \end{macrocode} +% +% \subsection{Support for \package{subfig} Package} +% +% \changes{v0.2a}{2007/08/24}{Added compatibility check.} +% \begin{macrocode} +\def\@tempb{2005/06/28 ver: 1.3 subfig package} +\expandafter\let\csname @tempa\expandafter\endcsname + \csname ver@subfig.\@pkgextension\endcsname +\ifx\@tempa\@tempb\else + \PackageWarning{fr-subfig}{The additions cooperated with \MessageBreak + version `2005/06/28 ver: 1.3' of package subfig,\MessageBreak + but only version\MessageBreak + \csname ver@subfig.\@pkgextension\endcsname'\MessageBreak + is available}\relax + \fi +% \end{macrocode} +% +% \subsubsection{Building Subfloatrow} +% +% At first defined dimension for maximal height of subcaption. Then macro +% for defining height of subcaption box. +% \begin{macrocode} +\newlength\FBsc@max +\newlength\FBso@max +\@ifdefinable\FBsubcheight{\let\FBsubcheight\relax} +\@ifdefinable\FBsuboheight{\let\FBsuboheight\relax} +% \end{macrocode} +% +% \begin{macro}{\adjustsubfloats} +% The user command which loaded at the end of row of subcaptions. +% \changes{v0.1f}{2005/06/14}{Removed \cmd{\FB@subfloat} and +% \cmd{\FB@subcaption} definitions: the code for \env{subfloatrow} +% support placed in \package{subfig}'s definitions.} +% \changes{v0.1f}{2005/06/14}{The \cmd{\xdef} changed to local +% \cmd{\edef}.} +% \begin{macrocode} +\newcommand\adjustsubfloats{\@tempswafalse + \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi + \if@tempswa\FB@writeaux{% + \string\global\string\c@FBcnt\thepage + \ifCADJ\string\edef\string\FBsubcheight{\the\FBsc@max}\fi + \ifOADJ\string\edef\string\FBsuboheight{\the\FBso@max}\fi + }\fi + \global\let\FBsubcheight\relax\global\let\FBsuboheight\relax + \global\FBso@max\z@\global\FBsc@max\z@} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Small Correction of \package{subfig} Macro} +% +% There is a \package{subfig}'s macro with corrections to put +% alone subfloat label. +% \begin{macrocode} +\long\def\sf@@@subfloat#1[#2][#3]#4{% + \@ifundefined{FBsc@max}{}% + {\FB@readaux{\let\FBsuboheight\relax}}% + \@tempcnta=\@ne + \if@minipage + \@tempcnta=\z@ + \else\ifdim \lastskip=\z@ \else + \@tempcnta=\tw@ + \fi\fi + \ifmaincaptiontop + \sf@top=\sf@nearskip + \sf@bottom=\sf@farskip + \else + \sf@top=\sf@farskip + \sf@bottom=\sf@nearskip + \fi + \leavevmode + \setbox\@tempboxa \hbox{#4}% +% \end{macrocode} +% In the case of empty contents of subfloat all vertical spaces zeroed. +% subcaption label created like oneline |\vtop|. +% \begin{macrocode} + \ifdim\wd\@tempboxa=\z@\ht\@tempboxa\z@\dp\@tempboxa\z@ + \setbox\z@\hbox{{\caption@@@make + {\caption@lfmt{\@nameuse{sub\@captype name}}% + {\@nameuse{thesub\@captype}}\relax}{}}}\@tempdima=\wd\z@ + \sf@top=\z@ + \sf@bottom=\z@ + \sf@capskip\z@ + \sf@captopadj\z@ + \let\sf@ifpositiontop\@firstoftwo + \else + \@tempdima=\wd\@tempboxa + \@ifundefined{FBsc@max}{}% + {\global\advance\Xhsize-\wd\@tempboxa + \dimen@=\ht\@tempboxa + \advance\dimen@\dp\@tempboxa + \ifdim\dimen@>\FBso@max + \global\FBso@max\dimen@ + \fi}% + \fi + \vtop\bgroup + \vbox\bgroup + \ifcase\@tempcnta + \@minipagefalse + \or + \vskip\sf@top + \or + \ifdim \lastskip=\z@ \else + \@tempskipb\sf@top\relax\@xaddvskip + \fi + \fi +% \end{macrocode} +% In the case of empty contents there is used only first variant. +% \begin{macrocode} + \sf@ifpositiontop{% + \ifx \@empty#3\relax \else + \sf@subcaption{#1}{#2}{#3}% + \vskip\sf@capskip + \vskip\sf@captopadj + \fi\egroup +% \end{macrocode} +% In the case of empty contents the |\@tempboxa| box skipped . +% \begin{macrocode} + \hrule width0pt height0pt depth0pt + \box\@tempboxa + }{% + \@ifundefined{FBsc@max}% + {\box\@tempboxa}% + {\ifx\FBsuboheight\relax + \box\@tempboxa + \else + \vbox to \FBsuboheight{\FBafil\box\@tempboxa\FBbfil}% + \fi}% + \egroup + \ifx \@empty#3\relax \else + \vskip\sf@capskip + \hrule width0pt height0pt depth0pt + \sf@subcaption{#1}{#2}{#3}% + \fi + }% + \vskip\sf@bottom + \egroup + \@ifundefined{FBsc@max}{}% + {\addtocounter{FRobj}{-1}% +% \end{macrocode} +% Here is the small correction: +% |\ifnum\c@FRobj>0| instead of |\ifnum\c@FRobj=0\else|. +% \begin{macrocode} + \ifnum\c@FRobj>0% bugfix + \subfloatrowsep + \fi}% + \ifmaincaptiontop\else + \global\advance\@nameuse{c@\@captype}\m@ne + \fi + \endgroup\ignorespaces} +% \end{macrocode} +% +% \subsubsection{Beside Labels for Subfloats} +% +% New key for beside caption of subfloat label. Beside label of subfloat +% always on the left side. +% \begin{macrocode} +\DeclareFROpt{subcapbesideposition}{\flrow@SFbesidealign{#1}} +\newcommand*\flrow@SFbesidealign[1]{% + \caption@ifinlist{#1}{t,top}{% + \let\flrow@SFBalign\TopFloatBoxes + }{\caption@ifinlist{#1}{b,bottom,default}{% + \let\flrow@SFBalign\BottomFloatBoxes + }{\caption@ifinlist{#1}{c,center}{% + \let\flrow@SFBalign\CenterFloatBoxes + }{\PackageError{floatrow}% + {Undefined sublabel position `#1'}{\flrow@eh}% + }}}} +\newcommand\flrow@SFBalign{\BottomFloatBoxes} +% \end{macrocode} +% +% Macro for beside float label. Labels always placed on the left side. +% \begin{macrocode} +\newcommand\sidesubfloat{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\subfloat outside float}\@ehd + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi + {\flrow@sidesubfloat}} +% \end{macrocode} +% +% \begin{macrocode} +\def\flrow@sidesubfloat{\flrow@SFBalign + \begingroup + \@ifundefined{caption@setfloattype}% + \caption@settype + \caption@setfloattype + \@captype +% \caption@setoptions\@captype + \sf@ifpositiontop{% + \maincaptiontoptrue + }{% + \maincaptiontopfalse + }% + \caption@setoptions{subfloat}% + \caption@setoptions{sub\@captype}% + \let\sf@oldlabel=\label + \let\label=\subfloat@label +% \end{macrocode} +% +% Next, a decision (based on the \texttt{\char`\\ ifmaincaptiontop} +% flag) is made of how to advance the float counter; then the +% sub-float counter is advanced and saved and a check is made if an +% optional argument is present (if not, one is supplied). +% +% \begin{macrocode} + \ifmaincaptiontop\else + \advance\@nameuse{c@\@captype}\@ne + \fi + \refstepcounter{sub\@captype}% + \setcounter{sub\@captype @save}{\value{sub\@captype}}% + \@ifnextchar [% %] match left bracket + {\flrow@@sidesubfloat}% + {\flrow@@sidesubfloat[\@empty]}} +% \end{macrocode} +% +% \begin{macrocode} +\long\def\flrow@@sidesubfloat[#1]{% + \@ifnextchar [% %] match left bracket + {\flrow@@@sidesubfloat{sub\@captype}[{#1}]}% + {\flrow@@@sidesubfloat{sub\@captype}[\@empty{#1}][{#1}]}} +% \end{macrocode} +% +% \begin{macrocode} +\long\def\flrow@@@sidesubfloat#1[#2][#3]#4{% + \@ifundefined{FBsc@max}{}% + {\FB@readaux{\let\FBsuboheight\relax}}% + \@tempcnta=\@ne + \if@minipage + \@tempcnta=\z@ + \else\ifdim \lastskip=\z@ \else + \@tempcnta=\tw@ + \fi\fi + \sf@bottom=\z@ + \sf@top=\z@ + \leavevmode + \setbox\@tempboxa \hbox{#2}% + \@tempdima\wd\@tempboxa + \setbox\@tempboxa \hbox{#4}% + \advance\@tempdima\wd\@tempboxa + \advance\@tempdima\labelsep + \@ifundefined{FBsc@max}{}% + {\global\advance\Xhsize-\wd\@tempboxa + \dimen@=\ht\@tempboxa + \advance\dimen@\dp\@tempboxa + \ifdim\dimen@>\FBso@max + \global\FBso@max\dimen@ + \fi}% + \begin@FBBOX + \ifcase\@tempcnta + \@minipagefalse + \or + \vskip\sf@top + \or + \ifdim \lastskip=\z@ \else + \@tempskipb\sf@top\relax\@xaddvskip + \fi + \fi + \hbox{% + \begin@FBBOX + \ifx \@empty#3\relax \else + \hbox{\caption@@@make + {\caption@lfmt{\@nameuse{sub\@captype name}}% + {\@nameuse{thesub\@captype}}\relax}{}}% + \fi + \end@FBBOX\hskip\labelsep\ignorespaces + \begin@FBBOX + \box\@tempboxa + \end@FBBOX + }% + \vskip\sf@bottom + \end@FBBOX + \@ifundefined{FBsc@max}{}% + {\addtocounter{FRobj}{-1}% + \ifnum\c@FRobj>0 + \subfloatrowsep + \fi}% + \ifmaincaptiontop\else + \global\advance\@nameuse{c@\@captype}\m@ne + \fi + \endgroup\ignorespaces} +% \end{macrocode} +% +% \subsubsection{Alone Labels for Subfloats} +% +% Macro for creation of subfloat label only. That could be useful +% for usage with \package{psfrag} package, placing labels inside +% \env{picture} environment, using in tabulars etc. +% \begin{macrocode} +\newcommand\subfloatlabel{\@ifnextchar[%] + {\flrow@subfloatlabel}{\subfloat[]{}}} +\@ifdefinable\flrow@subfloatlabel{} +\def\flrow@subfloatlabel[#1]{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\subfloat outside float}\@ehd + \fi + \begingroup + \count@#1\advance\count@\m@ne + \csname c@sub\@captype\endcsname\count@\relax + \@ifnextchar[%] + {\flrow@@subfloatlabel[#1]}% + {\subfloat[]{}\endgroup}} +\@ifdefinable\flrow@@subfloatlabel{} +\def\flrow@@subfloatlabel[#1][#2]{% + \subfloat[]{\label{#2}}\endgroup} +% \end{macrocode} +% +% \begin{macrocode} +%</frforsubfig> +% \end{macrocode} +% +% +% +% +% \begin{macrocode} +%<*floatrow> +\AtBeginDocument{% +\@ifundefined{LT@array}{\@tempswafalse}{\@tempswatrue} +\if@tempswa\RequirePackage{fr-longtable}\fi} +%</floatrow> +% \end{macrocode} +% +% \begin{macrocode} +%<*forlongtable> +% \end{macrocode} +% +% \subsection{Support for \package{longtable} Package} +% +% First goes requirement of necessary packages. +% \begin{macrocode} +\RequirePackage{longtable}[2004/02/01] +%\RequirePackage{floatrow}[2007/05/24] +% \end{macrocode} +% +% \subsubsection{Caption Width Settings} +% +% \changes{v0.1g}{2005/07/15}{The \package{longtable} support moved inside +% \package{floatrow} package.} +% To follow layout for tables which need size of caption equal to width +% of table, here added a code which catches width of table from +% \file{aux}-file and sets to |\LTcapwidth| parameter (great thanks +% A.~Sommerfeldt for compact code created as patch of |\LT@array| command). +% +% At first we save macro |\LT@array| under name |\flrow@LT@array|. +% Then start redefinition. +% \begin{macrocode} +\let\flrow@oriLT@array\LT@array +\renewcommand\LT@array{% +% \end{macrocode} +% Here are added settings for table font (similar to other table +% environments). +% \changes{v0.1j}{2006/07/24}{The \cmd{\belowcaptionskip} is set +% equal to \cmd{\captionskip}.} +% \changes{v0.1p}{2006/07/24}{Definition for table foot +% material: \cmd{\floatfoot}.} +% \begin{macrocode} + \flrow@setlist{{table}{longtable}}\flrow@useLTcapwidth\normalfont\floatfont + \belowcaptionskip\captionskip +% \end{macrocode} +% Here goes safe and redefinition of |\LT@make@row| macro in the way +% of managing of counting of table width. +% \begin{macrocode} + \FBifLTcapwidth + {\let\flrow@LT@make@row\LT@make@row + \def\LT@make@row{% + \let\LT@make@row\flrow@LT@make@row + \LT@make@row +% \end{macrocode} +% The |\LT@entry| here used for width calculation. +% \begin{macrocode} + \ifx\LT@save@row\relax\else\begingroup + \LTcapwidth\z@ + \def\LT@entry####1####2{\advance\LTcapwidth####2}\LT@save@row\relax + \ifdim\LTcapwidth=\z@\else\global\LTcapwidth\LTcapwidth\fi + \endgroup\fi}}% + \def\floatfoot@{%\par\kern-\normalbaselineskip\kern-\normallineskip + \vskip\floatfootskip\def\@captype{table}\floatfoot@box}% +% \end{macrocode} +% At last goes \package{longtable}'s macro itself. +% \begin{macrocode} + \flrow@oriLT@array} +% \end{macrocode} +% +% \begin{macrocode} +\providecommand\floatfont{} +\providecommand\floatfootskip{\skip\@mpfootins} +\providecommand\captionskip{10\p@} +\providecommand\floatfoot@box[1]{% +% \end{macrocode} +% The |\if@@FS| flag stored for \env{wrap...} environments. +% \changes{v0.1h}{2005/10/02}{Added setting for \cmd{\linewidth}} +% \begin{macrocode} +% \hsize\columnwidth\linewidth\columnwidth + \@parboxrestore\reset@font\color@begingroup +% \end{macrocode} +% Apply current float settings. +% \begin{macrocode} + \caption@setoptions{\@captype}% +% \end{macrocode} +% Apply floatfoot settings. +% \begin{macrocode} + \caption@setoptions{floatfoot}% +% \end{macrocode} +% No captionlabel. +% \changes{v0.1k}{2007/05/24}{Added settings for emptied caption label} +% \begin{macrocode} + \captionsetup{labelformat=empty,labelsep=none}% + \caption@@make{}{\FR@tmp#1\@finalstrut\strutbox}% + \color@endgroup} +% \end{macrocode} +% +% The definition of caption width for \env{longtable} environment. +% \begin{macrocode} +\let\FBifLTcapwidth\@gobble +\providecommand\caption@ifinlist[2]{% + \let\next\@secondoftwo + \edef\caption@tempa{#1}% + \@for\caption@tempb:={#2}\do{% + \ifx\caption@tempa\caption@tempb + \let\next\@firstoftwo + \fi}% + \next} +\newcommand*\flrow@useLTcapwidth{} +\newcommand*\setLTcapwidth[1]{% + \caption@ifinlist{#1}{table,contents,LTcapwidthtotable}{\def\flrow@useLTcapwidth + {\let\FBifLTcapwidth\@firstofone}}{\def\flrow@useLTcapwidth + {\let\FBifLTcapwidth\@gobble\setlength\LTcapwidth{#1}}}} +\@ifpackageloaded{floatrow} + {\DeclareFROpt{LTcapwidth}{\setLTcapwidth{#1}} + \DeclareOption{LTcapwidthtotable}{\setLTcapwidth{table}} + \ProcessOptions + } + {\DeclareOption{LTcapwidthtotable}{\setLTcapwidth{table}} + \ProcessOptions + \let\flrow@setlist\@gobble} +% \end{macrocode} +% +% \subsubsection{Additional Settings for Last Head and Pre-last Foot} +% +% The box for last head. Defined in the same way as analog macros in +% \package{longtable} package. +% \begin{macrocode} +\newbox\flrow@LT@lasthead +\newbox\flrow@LT@prelastfoot +% \end{macrocode} +% This counter register is used for checking of last longtable page. +% \begin{macrocode} +\newcounter{FBLTpage} +% \end{macrocode} +% +% This command defines number of pages in current longtable. +% In current version defined by hand for +% each table. The default number is~2. +% \begin{macrocode} +%\newcommand\LTlastpage{2} +% \end{macrocode} +% +% Storing of original definition of |\longtable| macro. +% In new definition was is added counting of longtable's pages +% with \texttt{FBLTpage} counter defined before. +% \begin{macrocode} +\@ifdefinable\FB@ori@longtable{\let\FB@ori@longtable\longtable} +\def\longtable{% + \setcounter{FBLTpage}\@ne + \FB@ori@longtable} +% \end{macrocode} +% +% Storing original definition of |\LT@ouput| macro. +% Here, in new definition, added increasing of \texttt{FBLTpage}. +% In the case of defined |\lasthead| contents and last page was +% checked, the contents of last head loaded. +% \begin{macrocode} +\@ifdefinable\FB@ori@LT@output{\let\FB@ori@LT@output\LT@output} +\def\LT@output{% + \@ifundefined{FBLTpage@\romannumeral\c@LT@tables}% + {\gdef\flrow@LTlastpage{2}}{\@nameuse{FBLTpage@\romannumeral\c@LT@tables}}% + \addtocounter{FBLTpage}\@ne + \ifvoid\flrow@LT@lasthead\else + \ifnum\value{FBLTpage}=\flrow@LTlastpage + \let\LT@head\flrow@LT@lasthead + \fi + \fi +% \end{macrocode} +% Switching on of the |\LT@prelastfoot| also needs the real value of +% |\flrow@LTlastpage| (why???). +% \begin{macrocode} + \ifvoid\flrow@LT@prelastfoot\else + \count@\flrow@LTlastpage\relax%\advance\count@\m@ne\relax + \ifnum\value{FBLTpage}=\count@ + \let\LT@foot\flrow@LT@prelastfoot + \fi + \fi + \FB@ori@LT@output} +% \end{macrocode} +% +% The definition of last head box and foot of the page before last. +% They are defined in the same way as other commands in \package{longtable} +% package, like |\endlastfoot|. +% Here was used |\def| as for all |\end..| commands. I hope if \package{longtable} +% will use these synonyms it will use also synonyms for +% || and || box register commands at the very beginning of package. +% Use command names with the analogous names +% in the hope that their synonyms will appear in the ``host''-package +% and in this case current package stops interfere. +% \begin{macrocode} +\@tempswafalse +\ifx\endlasthead\undefined\@tempswatrue\else + \ifx\endlasthead\relax\@tempswatrue +\fi\fi +\if@tempswa + \def\endlasthead{\LT@end@hd@ft\flrow@LT@lasthead} +\else +\PackageError{fr-longtable}{The command \string\endlasthead\MessageBreak + already defined by longtable package} +\fi +\@tempswafalse +\ifx\endprelastfoot\undefined\@tempswatrue\else + \ifx\endprelastfoot\relax\@tempswatrue +\fi\fi +\if@tempswa + \def\endprelastfoot{\LT@end@hd@ft\flrow@LT@prelastfoot} +\else +\PackageError{fr-longtable}{The command \string\endprelastfoot\MessageBreak + already defined by longtable package} +\fi +% \end{macrocode} +% +% Redefined |\endlongtable| command---added code which writes +% the number of pages of long table. +% \begin{macrocode} +\@ifdefinable\FB@ori@endlongtable{\let\FB@ori@endlongtable\endlongtable} +\def\endlongtable{% + \FB@ori@endlongtable +% \end{macrocode} +% Here is additional code. +% Why it is necessary to reduce counter of pages by~1? +% \begin{macrocode} + \if@filesw + {\advance\c@FBLTpage\m@ne + \immediate\write\@auxout{% + \gdef\expandafter\noexpand + \csname FBLTpage@\romannumeral\c@LT@tables\endcsname + {\string\gdef\string\flrow@LTlastpage{\the\c@FBLTpage}} + }} + \fi + } +% \end{macrocode} +% \begin{macrocode} +%</forlongtable> +% \end{macrocode} +% +% % \Finale \endinput diff --git a/Master/texmf-dist/source/latex/floatrow/floatrow.ins b/Master/texmf-dist/source/latex/floatrow/floatrow.ins index 532f02946dc..2c209bc6594 100644 --- a/Master/texmf-dist/source/latex/floatrow/floatrow.ins +++ b/Master/texmf-dist/source/latex/floatrow/floatrow.ins @@ -30,12 +30,14 @@ You are NOT ALLOWED to change this file. \askonceonly \keepsilent -%%%\askforoverwritefalse +%\askforoverwritefalse %%%\nopreamble \generate{ - \file{floatrow.sty}{\from{floatrow.dtx}{floatrow,frforsubfig,frforlongtbl,floatsetup}} + \file{floatrow.sty}{\from{floatrow.dtx}{floatrow,floatsetup}} \file{fr-fancy.sty}{\from{floatrow.dtx}{frfancy}} \file{floatpagestyle.sty}{\from{floatrow.dtx}{floatpagestyle}} \file{listpen.sty}{\from{floatrow.dtx}{listpen}} + \file{fr-longtable.sty}{\from{floatrow.dtx}{forlongtable}} + \file{fr-subfig.sty}{\from{floatrow.dtx}{frforsubfig}} } \endbatchfile |