diff options
author | Karl Berry <karl@freefriends.org> | 2009-08-05 13:29:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-08-05 13:29:06 +0000 |
commit | 150c17a368ab6cf13dad8ccedf13a0bd4dd4ac25 (patch) | |
tree | 7a55f2c74e1b3e44df86ffdcb48238d0a3c51940 /Master/texmf-dist/source/latex | |
parent | ee03b9da50173f49e8224ca79e2e6a99db620923 (diff) |
float 0.3b (3aug09)
git-svn-id: svn://tug.org/texlive/trunk@14535 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/floatrow/floatrow.dtx | 133 |
1 files changed, 68 insertions, 65 deletions
diff --git a/Master/texmf-dist/source/latex/floatrow/floatrow.dtx b/Master/texmf-dist/source/latex/floatrow/floatrow.dtx index bee497c1e00..904d61654c2 100644 --- a/Master/texmf-dist/source/latex/floatrow/floatrow.dtx +++ b/Master/texmf-dist/source/latex/floatrow/floatrow.dtx @@ -1,10 +1,6 @@ % \iffalse % floatrow.dtx - The floatrow package (extension of float package) -% (c) 2004-2007 Olga Lapko -% (Lapko.O@g23.relcom.ru -% tr-paw@yandex.ru -% tr-paw@mail.ru -% http://www.ru.net/~Lapko.O/) +% (c) 2004-2007 Olga Lapko (Lapko.O@g23.relcom.ru http://www.ru.net/~Lapko.O/) % % This package borrowed code (core parts) from: % float package 2001/11/08 v1.3d, @@ -31,7 +27,7 @@ %<forlongtable>\ProvidesPackage{fr-longtable} % % \ProvidesFile{floatrow.dtx} -%<floatrow> [2009/06/20 v0.3a floatrow: float package extension] +%<floatrow> [2008/08/02 v0.3b floatrow: float package extension] %<frfancy> [2007/11/28 v0.1i floatrow: fancy boxes] %<floatpagestyle> [2005/10/02 v0.1h floating page style] %<listpen> [2007/10/28 v0.1d list penalty managing] @@ -319,7 +315,6 @@ \EnableCrossrefs \RecordChanges %\makeindex -\raggedbottom \begin{document} \DocInput{floatrow.dtx} \PrintChanges @@ -333,12 +328,10 @@ % \changes{v0.1e}{2005/03/22}{The user documentation loaded inside % \file{floatrow.dtx}.} % -% \GetFileInfo{floatrow.dtx} -% % \ifx\pspicture\undefined\else\psset{unit=1pt}\fi % -% \def\fileversion{v0.2c} -% \def\filedate{2008/03/28} +% \def\fileversion{v0.3b} +% \def\filedate{2009/08/02} % \title{The \package{floatrow} package\thanks{This % file has version number \fileversion, last revised % \filedate.}} @@ -1329,7 +1322,7 @@ % For example, definition of |\CenterFloatBoxes| % looks almost like following: %\begin{Quote} -%%^^A|\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse| +%^^A%|\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse| %|\newcommand\CenterFloatBoxes{%| %| \buildFBBOX{\hbox\bgroup$\vcenter\bgroup\vskip0pt}%| %| {\vskip0pt\egroup$\egroup}}| @@ -1538,9 +1531,9 @@ % \end{Quote}\enlargethispage\baselineskip %\floatsetup{style=plain} %\begin{figure}[H]\unitlength1.28\unitlength\lineskip0pt -%\framebox(70,60){\input{TheCat.picture}}\hspace{2\unitlength}%%^^A +%\framebox(70,60){\input{TheCat.picture}}\hspace{2\unitlength}%^^A% %\framebox(70,60){\unitlength.5\unitlength\input{TheCat.picture}}\vspace{2\unitlength}\par -%\framebox(70,60){\unitlength.25\unitlength\input{TheCat.picture}}\hspace{2\unitlength}%%^^A +%\framebox(70,60){\unitlength.25\unitlength\input{TheCat.picture}}\hspace{2\unitlength}%^^A% %\parbox[b][60\unitlength]{70\unitlength}{\RawCaption{\caption % [Caption in raw \LaTeX{} mode, placed in the free corner of figure]{Caption in raw \LaTeX{} mode, placed in the free corner of figure}\label{rawcaption:plain}}} %\end{figure}% @@ -2535,7 +2528,7 @@ % \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 frame}%%^^A +% {\caption{Caption beside framed object, (caption has width 4\,cm), aligned by top of frame}%^^A% % \label{capbesideframeI}}% % \end{figure} % \begin{Quote} @@ -3595,7 +3588,7 @@ % and \ref{intro:rightfig:box}, which could be placed in one row, you need to % set |heightadjust=all| key. % -%\begingroup\enlargethispage{2\baselineskip}% +%\begingroup % The examples with unfill rows.\RemoveSpaces\vspace*{\topsep} % \begin{Quote}\openup.5pt % \begin{preamble} @@ -4439,7 +4432,7 @@ % \verb| \end{subfloatrow}}| % \verb| {\caption{... \Fref{...} and \Fref{...}}\label{...}}|\nopagebreak % \verb|\end{figure}| -% \end{Quote}\par +% \end{Quote}\par\kern-\textfloatsep\kern-\baselineskip %\begingroup % \captionsetup[subfigure]{labelformat=brace,justification=centerlast,strut=no} % \floatsetup[figure]{style=Shadowbox,capbesidesep=columnsep, @@ -4457,7 +4450,7 @@ % caption vertically bottom aligned; fancy % \texttt{Shadowbox} layout. There are two parts: % \Fref{subcapfig:w} and \Fref{subcapfig:b}}\label{fig:subcap:catsI}} -% \end{figure} +% \end{figure}\kern-\lastskip %\endgroup % % In the next example the main caption will be placed below, but labels of figure parts were @@ -5329,7 +5322,7 @@ % \subsection{The \package{floatflt} package}\label{ssec:floatflt} % \begin{floatingfigure}[v]{50mm}\def\FBaskip{-2.5pt} % \ffigbox[50mm] -% {\setlength\unitlength{\hsize/72}%%^^A +% {\setlength\unitlength{\hsize/72}%^^A% % \input{BlackDog.picture}} % {\caption{\hyphenpenalty-100\pretolerance-1% % Wrapped figure inside floating\-figure environment @@ -5681,10 +5674,15 @@ % % \subsection{The \package{setspace} Package} % There was bug during usage of \package{setspace} package---this package redefines -% font size to |\normalsize|. The version 0.2d of \package{floatrow} tries to fix it. -% The default stretch is equal to~1. The version 3.1 of \package{caption} package offers -% special font settings (see \package{caption} documentation) for captions. You may try the -% same for the float font: +% \LaTeX's command |\@xfloat|, adding definition of font size to |\normalsize| +% which appears after \package{floatrow} settings. +% The version 0.2d of \package{floatrow} tried to fix it but this was incorrect +% and destroyed interaction between \package{hyperref} and \package{caption} packages. +% In the version 0.3b the code was changed to restore this interaction\footnote +% {By suggestions of A.\,Sommerfeldt.} with hope that it will work. +% The default baseline stretch is equal to~1. The version 3.1 of \package{caption} +% package offers special font settings (see \package{caption} documentation) +% for captions. You may try the same for the float font: %\begin{Quote}% %|\floatsetup{font=onehalfspacing}| %\end{Quote}% @@ -6254,7 +6252,7 @@ % photo-album-like layout is rather rare in technical literature (It % isn't?).\RestoreSpaces % -% \subsubsection{Photo-Album-Like Layouts: Common Height for Beside Photos in Filled Row} +% \subsubsection{Photo-Album-Like Layouts: Common Height for Beside Photos} % \captionsetup[subfigure]{labelformat=brace,font=footnotesize} % This section shows example which allows to set common height for rectangular graphics, % i.e. photos and fill full width of this row. To emulate the rectangular photos here, @@ -6268,15 +6266,6 @@ %\end{Quote}% % with supposed value of height in the optional argument, % which could be near the necessary common height. -% The default value is controlled by the |\DefaultCommonHeight| command. -% It was defined -%\begin{Quote}% -%|\newcommand\DefaultCommonHeight{25pt}| -%\end{Quote}% -% It seems that |\DefaultCommonHeight| could differ from one documentation to another, -% but inside one documentation the value in this command which once succeed in the row will gives -% the same correct result in other rows also. -% % The second argument---the contents of the |floatrow| environment. % \emph{All} float boxes in this row must use the |[\FBwidth]| option. %\begin{Quote}% @@ -6307,17 +6296,17 @@ % {\caption{Figure~I in the row with common heights}%^^A% % \label{fig:CH:Dog}}%^^A % {\resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A -%%^^A +%^^A% % \ffigbox[\FBwidth]%^^A % {\caption{Figure~II in the row with common heights}%^^A% % \label{fig:CH:WcatI}}%^^A % {\resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A -%%^^A +%^^A% % \ffigbox[\FBwidth]%^^A % {\caption{Figure~III in the row with common heights}%^^A% % \label{fig:CH:mouse}}%^^A % {\resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A -%%^^A +%^^A% % \ffigbox[\FBwidth]%^^A % {\caption{Figure~IV in the row with common heights}%^^A% % \label{fig:CH:cheese}}%^^A @@ -6356,17 +6345,17 @@ % {\caption{Part~I in the row with common heights}%^^A% % \label{fig:CHI:Dog}}%^^A % {\resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A -%%^^A +%^^A% % \ffigbox[\FBwidth]%^^A % {\caption{Part~II in the row with common heights}%^^A% % \label{fig:CHI:WcatI}}%^^A % {\resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A -%%^^A +%^^A% % \ffigbox[\FBwidth]%^^A % {\caption{Part~III in the row with common heights}%^^A% % \label{fig:CHI:mouse}}%^^A % {\resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A -%%^^A +%^^A% % \ffigbox[\FBwidth]%^^A % {\caption{Part~IV in the row with common heights}%^^A% % \label{fig:CHI:cheese}}%^^A @@ -6406,17 +6395,17 @@ % {\caption{}%^^A% % \label{fig:CHII:Dog}}%^^A % {\resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A -%%^^A +%^^A% % \fcapside[\FBwidth]%^^A % {\caption{}%^^A% % \label{fig:CHII:WcatI}}%^^A % {\resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A -%%^^A +%^^A% % \fcapside[\FBwidth]%^^A % {\caption{}%^^A% % \label{fig:CHII:mouse}}%^^A % {\resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A -%%^^A +%^^A% % \fcapside[\FBwidth]%^^A % {\caption{}%^^A% % \label{fig:CHII:cheese}}%^^A @@ -6458,16 +6447,16 @@ % {\begin{subfloatrow}\useFCwidth % \fcapside[\FBwidth]{}{\caption{}%^^A% % \label{fig:CHs:Dog}\resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A -%%^^A +%^^A% % \fcapside[\FBwidth]{}{\caption{}%^^A% % \label{fig:CHs:WcatI}\resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A % \end{subfloatrow}\caption{Common caption~I in a~multilevel row with common height of graphics}}%^^A -%%^^A +%^^A% % \ffigbox[\FBwidth]{}%^^A% % {\begin{subfloatrow}\useFCwidth % \fcapside[\FBwidth]{}{\caption{}%^^A% % \label{fig:CHs:mouse}\resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A -%%^^A +%^^A% % \fcapside[\FBwidth]{}{\caption{}%^^A% % \label{fig:CHs:cheese}\resizebox!{\CommonHeight}{\fbox{\input{Cheese.picture}}}}%^^A % \end{subfloatrow}\caption{Common caption~II in a~multilevel row with common height of graphics}}%^^A @@ -6504,16 +6493,16 @@ % {\begin{subfloatrow}%^^A% % \ffigbox[\FBwidth]{}{\caption{Part~I in the row with common heights}%^^A% % \label{fig:CHsI:Dog}\resizebox!{\CommonHeight}{\fbox{\input{BlackDog.picture}}}}%^^A -%%^^A +%^^A% % \ffigbox[\FBwidth]{}{\caption{Part~II in the row with common heights}%^^A% % \label{fig:CHsI:WcatI}\resizebox!{\CommonHeight}{\fbox{\input{TheCat.picture}}}}%^^A % \end{subfloatrow}\caption{Common caption~I in a~row with common height of graphics}}%^^A -%%^^A +%^^A% % \ffigbox[\FBwidth]{}%^^A% % {\begin{subfloatrow}%^^A% % \ffigbox[\FBwidth]{}{\caption{Part~III in the row with common heights}%^^A% % \label{fig:CHsI:mouse}\resizebox!{\CommonHeight}{\fbox{\input{Mouse.picture}}}}%^^A -%%^^A +%^^A% % \ffigbox[\FBwidth]{}{\caption{Part~IV in the row with common heights}%^^A% % \label{fig:CHsI:cheese}\resizebox!{\CommonHeight}{\fbox{\input{Cheese.picture}}}}%^^A % \end{subfloatrow}\caption{Common caption~II in a~row with common height of graphics}}%^^A @@ -7599,17 +7588,14 @@ % % {\em[floatrow] In the case of loaded \package{setspace} package, the |\@xfloat| % definition ought to be fixed.} +% \changes{v0.3b}{2009/08/02}{The fixation re-fixed by suggestions of A.Sommerfeldt} % \begin{macrocode} -\AtBeginDocument -{\@ifundefined{latex@xfloat}{}{\let\@xfloat\setspace@xfloat -}\let\setspace@xfloat\relax} -\@ifdefinable\setspace@xfloat{} -\def\setspace@xfloat #1[#2]{% - \latex@xfloat #1[#2]% - \def\baselinestretch{\setspace@singlespace}% - \normalsize - \floatfont -} +\AtBeginDocument{% + \@ifundefined{latex@xfloat}{}{% + \let\floatrow@ORI@xfloat\@xfloat + \def\@xfloat#1[#2]{% + \floatrow@ORI@xfloat{#1}[#2]% + \floatfont}}}% % \end{macrocode} % % Later on we'll need a box to save a |[H]| float. @@ -7640,9 +7626,10 @@ % 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. % {\em[floatrow] The special settings for H-floats |floatH| were added.} +% \changes{v0.3b}{2009/08/02}{Fixed bug of \cs{thisfloatsetup} usage} % \begin{macrocode} \let\@currbox\float@box - \flrow@setlist{{floatH}{#1H}}% + \flrow@setlist*{{floatH}{#1H}}% % \end{macrocode} % Now we save the current float class name for use in constructing the % |\caption|. The caption box (defined below) is initialized to an empty @@ -9081,10 +9068,11 @@ \newbox\flrow@rowbox \newcommand\floatrow[1][2]{\c@FRobj=#1\relax % \end{macrocode} -% If depth of row more than 0 the subfloatrow settings are switched. +% If depth of row more than~0 the subfloatrow settings are switched. +% \changes{v0.3b}{2009/08/02}{Fixed bug of \cs{thisfloatsetup} usage} % \begin{macrocode} \ifcase\floatbox@depth - \flrow@setlist{{floatrow}{\@captype row}}% + \flrow@setlist*{{floatrow}{\@captype row}}% \or % \end{macrocode} % The |\caption| stuff catches |sub\@captype| settings by itself. The other reason to skip @@ -9095,7 +9083,7 @@ \flrow@settype{subfloat}\flrow@settype{subtype}\flrow@settype{sub\@captype}% \flrow@settype{subfloatrow}\flrow@settype{sub\@captype row}% \ifx\flrow@to\empty\def\flrow@boxset##1{}\fi - \fi + \fi% % \end{macrocode} % Settings for facing/non-facing layout, common/non-common heights of captions and objects. % \begin{macrocode} @@ -9370,9 +9358,24 @@ % \begin{macro}{\flrow@setlist} % \begin{macro}{\flrow@FClist} % This macro declares list of float and caption settings (like |widefloat|, -% {rotfloat} etc.) -% \begin{macrocode} -\newcommand\flrow@setlist[1]{\@flrow@setlist#1{tmpset};% +% {rotfloat} etc.); the temporary settings created by |\thisfloatsetup| +% command are added at very end of the float +% settings list. The contents of temporary settings are emptied immediately after +% their first usage, so the second usage of emptied settings discard +% previously defined temporary definitions. +% But there are two points where the additional list of special settings is loaded: +% the floats with the option |[H]| and at the start of |floatrow| +% environment. In this cases is used starred form of |\flrow@setlist| +% without temporary settings (since they always will be loaded +% when floating environment is loaded or, in the case of usage +% outside floating environment, the |\floatbox| command is loaded). +% \changes{v0.3b}{2009/08/02}{Fixed bug of \cs{thisfloatsetup} usage} +% \begin{macrocode} +\newcommand\flrow@setlist{\@ifstar\flrow@setlist@@\flrow@setlist@} +\newcommand\flrow@setlist@[1]{\@flrow@setlist#1{tmpset};% + \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;% + \caption@setposition{\FBifcaptop tb}} +\newcommand\flrow@setlist@@[1]{\@flrow@setlist#1;% \FR@ifCST{\flrow@capsetup}\relax\@cap@setlist#1;% \caption@setposition{\FBifcaptop tb}} \newcommand\@flrow@setlist[1]{\flrow@settype{#1}\@ifnextchar;\@gobble |