summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/flowfram/flowfram.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/flowfram/flowfram.sty')
-rw-r--r--Master/texmf-dist/tex/latex/flowfram/flowfram.sty902
1 files changed, 766 insertions, 136 deletions
diff --git a/Master/texmf-dist/tex/latex/flowfram/flowfram.sty b/Master/texmf-dist/tex/latex/flowfram/flowfram.sty
index fb175646edc..149e8e7f238 100644
--- a/Master/texmf-dist/tex/latex/flowfram/flowfram.sty
+++ b/Master/texmf-dist/tex/latex/flowfram/flowfram.sty
@@ -7,7 +7,7 @@
%% flowfram.dtx (with options: `flowfram.sty,package')
%%
%% flowfram.dtx
-%% Copyright 2007 Nicola Talbot
+%% Copyright 2008 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{flowfram}[2007/08/21 v1.10]
+\ProvidesPackage{flowfram}[2008/06/27 v1.11]
\RequirePackage{ifthen}
\RequirePackage{keyval}
\RequirePackage{graphics}
@@ -131,9 +131,19 @@
\thispagestyle{\chapterfirstpagestyle}\@ff@OLD@schapter}
}
\newcounter{maxflow}
-\newcounter{thisframe}
\c@maxflow=0\relax
+\newcounter{thisframe}
\c@thisframe=0\relax
+\@ifpackageloaded{hyperref}{%
+\def\theHthisframe{\thepage.\arabic{thisframe}}}{}
+\newcommand*{\labelflowidn}[1]{%
+{\def\@currentlabel{\thethisframe}\label{#1}}}
+\newcounter{displayedframe}
+\c@displayedframe=0
+\@ifpackageloaded{hyperref}{%
+\def\theHdisplayedframe{\thepage.\arabic{displayedframe}}}{}
+\newcommand*{\labelflow}[1]{%
+{\def\@currentlabel{\thedisplayedframe}\label{#1}}}
\newcounter{maxstatic}
\c@maxstatic=0\relax
\newcounter{maxdynamic}
@@ -301,6 +311,10 @@ You can't assign this label, as it is already defined
for flow frame \number\@colN}}{}%
\fi
}}}
+\newcommand*{\getflowlabel}[1]{%
+\csname @col@id@\romannumeral#1\endcsname}
+\newcommand*{\getflowid}[2]{%
+\@flowframeid{#2}\edef#1{\number\ff@id}}
\newcommand*{\@flowframeid}[1]{\@colN=0\relax
\ff@id=0\relax
\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax
@@ -405,10 +419,10 @@ may only specify 'c', 't' or 'b'}}}
\ifnum\@ff@numstart=0\relax
\def\@ff@numstart{1}%
\fi
-\ifnum\@ff@numend>\c@maxflow
+\ifnum\@ff@numend>\c@maxflow\relax
\def\@ff@numend{\c@maxflow}%
\fi
-\@colN=\@ff@numstart
+\@colN=\@ff@numstart\relax
\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{%
\@@setflowframe{\@colN}{#2}%
\advance\@colN by 1\relax
@@ -438,26 +452,26 @@ may only specify 'c', 't' or 'b'}}}
\expandafter\setlength\csname col@\romannumeral#1@posy\endcsname
{\ff@y}%
\expandafter\setlength\csname col@\romannumeral#1@eveny\endcsname
-{\ff@y}}
+{\ff@y}}%
\ifthenelse{\equal{\ff@evenx}{}}{}{%
\expandafter\setlength\csname col@\romannumeral#1@evenx\endcsname
-{\ff@evenx}}
+{\ff@evenx}}%
\ifthenelse{\equal{\ff@eveny}{}}{}{%
\expandafter\setlength\csname col@\romannumeral#1@eveny\endcsname
-{\ff@eveny}}
+{\ff@eveny}}%
\ifthenelse{\equal{\ff@oddx}{}}{}{%
\expandafter\setlength\csname col@\romannumeral#1@posx\endcsname
-{\ff@oddx}}
+{\ff@oddx}}%
\ifthenelse{\equal{\ff@oddy}{}}{}{%
\expandafter\setlength\csname col@\romannumeral#1@posy\endcsname
-{\ff@oddy}}
+{\ff@oddy}}%
\ifthenelse{\equal{\ff@label}{}}{}{%
-\@s@tflowframeid{#1}[\ff@label]}
+\@s@tflowframeid{#1}[\ff@label]}%
\ifthenelse{\equal{\ff@frametype}{}}{}{%
\expandafter\edef\csname @ff@frametype@\romannumeral#1\endcsname
-{\ff@frametype}}
+{\ff@frametype}}%
\ifthenelse{\equal{\ff@col}{}}{}{%
-\expandafter\@setframecol\ff@col\end{#1}{col}{ff}}
+\expandafter\@setframecol\ff@col\end{#1}{col}{ff}}%
\ifthenelse{\equal{\ff@txtcol}{}}{}{%
\expandafter\@setframecol\ff@txtcol\end{#1}{txtcol}{ff}}%
\ifthenelse{\equal{\ff@backcol}{}}{}{%
@@ -632,6 +646,10 @@ You can't assign this label, as it is already defined
for static frame \number\@colN}}{}%
\fi
}}
+\newcommand*{\getstaticlabel}[1]{%
+\csname @sf@id@\romannumeral#1\endcsname}
+\newcommand*{\getstaticid}[2]{%
+\@staticframeid{#2}\edef#1{\number\ff@id}}
\newcommand*{\@staticframeid}[1]{\@colN=0\relax
\ff@id=0\relax
\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax
@@ -673,10 +691,10 @@ id '#1'}{}\fi}
\ifnum\@ff@numstart=0\relax
\def\@ff@numstart{1}%
\fi
-\ifnum\@ff@numend>\c@maxstatic
+\ifnum\@ff@numend>\c@maxstatic\relax
\def\@ff@numend{\c@maxstatic}%
\fi
-\@colN=\@ff@numstart
+\@colN=\@ff@numstart\relax
\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{%
\@@setstaticframe{\@colN}{#2}%
\advance\@colN by 1\relax
@@ -843,6 +861,18 @@ sectioning commands within a \string\shapepar}{}}%
}
\newbox\staticframe
\newenvironment{staticcontents}[1]{%
+\let\continueonframe=\@staticcontinueonframe
+\@beginstaticcontents{#1}%
+}{%
+\@endstaticcontents
+\ignorespaces}
+\newenvironment{staticcontents*}[1]{\@staticframeid{#1}%
+\let\continueonframe=\@staticscontinueonframe
+\@beginstaticcontents{\ff@id}%
+}{%
+\@endstaticcontents
+\ignorespaces}
+\newcommand{\@beginstaticcontents}[1]{%
\@ifundefined{@staticframe@\romannumeral#1}{%
\PackageError{flowfram}{Static frame '#1' not defined}{}}{}%
\expandafter\let\expandafter\@ff@parshape\csname @sf@shape@\romannumeral#1\endcsname
@@ -879,17 +909,16 @@ sectioning commands within a \string\shapepar}{}}%
\@s@tfftextcol\noindent
\@sf@mpg
\setlength\parindent\sdfparindent
-}{\ifnum\ff@shape=2\par
+}
+\newcommand*{\@endstaticcontents}{%
+\ifnum\ff@shape=2\par
\else\FLForgpar\fi\endgroup\end{minipage}\end{lrbox}%
\expandafter\global\expandafter\sbox\@sf@thisframe{%
-\usebox\staticframe}\ignorespaces
-}
-\newenvironment{staticcontents*}[1]{\@staticframeid{#1}%
-\begin{staticcontents}{\ff@id}}{\end{staticcontents}}
+\usebox\staticframe}}
\newcommand{\setstaticcontents}{%
\@ifstar\@sstaticconts\@staticconts}
-\newcommand{\@sstaticconts}[1]{\@staticframeid{#1}%
-\@staticconts{\ff@id}}
+\newcommand{\@sstaticconts}[2]{\begin{staticcontents*}{#1}%
+#2\end{staticcontents*}}
\newcommand{\@staticconts}[2]{\begin{staticcontents}{#1}%
#2\end{staticcontents}}
\newcommand*{\@@staticframeswapcoords}[1]{%
@@ -1019,6 +1048,10 @@ You can't assign this label, as it is already defined
for dynamic frame \number\@colN}}{}%
\fi
}}
+\newcommand*{\getdynamiclabel}[1]{%
+\csname @df@id@\romannumeral#1\endcsname}
+\newcommand*{\getdynamicid}[2]{%
+\@dynamicframeid{#2}\edef#1{\number\ff@id}}
\newcommand*{\@dynamicframeid}[1]{\@colN=0\relax
\ff@id=0\relax
\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax
@@ -1028,6 +1061,10 @@ for dynamic frame \number\@colN}}{}%
\@colN=\c@maxdynamic}{}}%
\ifnum\ff@id=0\PackageError{flowfram}{Can't find dynamic frame
id '#1'}{}\fi}
+\newcommand*{\@getframeid}[2]{%
+\@ifdefined{@#1frameid}{\csname @#1frameid\endcsname{#2}}{%
+\PackageError{flowfram}{Unknown frame type `#1'}{Frame types can
+be one of: flow, static or dynamic}}}
\newcommand*{\dynamicframex}[1]{%
\csname @df@\romannumeral#1@posx\endcsname}
\newcommand*{\dynamicframey}[1]{%
@@ -1060,10 +1097,10 @@ id '#1'}{}\fi}
\ifnum\@ff@numstart=0\relax
\def\@ff@numstart{1}%
\fi
-\ifnum\@ff@numend>\c@maxdynamic
+\ifnum\@ff@numend>\c@maxdynamic\relax
\def\@ff@numend{\c@maxdynamic}%
\fi
-\@colN=\@ff@numstart
+\@colN=\@ff@numstart\relax
\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{%
\@@setdynamicframe{\@colN}{#2}%
\advance\@colN by 1\relax
@@ -1105,7 +1142,7 @@ id '#1'}{}\fi}
\expandafter\xdef\csname @df@dim@\romannumeral#1\endcsname{%
[c][\ff@height][\ff@valign]{\ff@width}}%
\ifthenelse{\equal{\ff@label}{}}{}{%
-\@s@tdynamicframeid{#1}[\ff@label]}
+\@s@tdynamicframeid{#1}[\ff@label]}%
\ifthenelse{\equal{\ff@frametype}{}}{}{%
\expandafter
\xdef\csname @df@frametype@\romannumeral#1\endcsname{%
@@ -1137,7 +1174,7 @@ id '#1'}{}\fi}
\expandafter
\xdef\csname @df@style@\romannumeral#1\endcsname{\ff@style}}}%
\ifthenelse{\equal{\ff@clear}{}}{}{%
-\setboolean{@df@clear@\romannumeral\c@maxdynamic}{true}%
+\setboolean{@df@clear@\romannumeral#1}{\ff@clear}%
}%
\ifthenelse{\equal{\ff@margin}{}}{}{%
\PackageError{flowfram}{Key 'margin' not available for dynamic
@@ -1191,38 +1228,85 @@ frames}{dynamic frames don't have marginal notes}}%
\@@dynamicframeswapcoords{\@colN}%
\advance\@colN by 1\relax
}}}}}
-\def\dynamiccontents#1{%
-\edef\@flf@{\@currenvir}%
+\newenvironment{dynamiccontents}[1]{%
+\def\@flf@{dynamiccontents}%
+\xdynamiccontents{#1}}{%
+\endxdynamiccontents
+}
+\newtoks\@dynamictok
+\def\xdynamiccontents#1{%
\def\@flf@idn{#1}%
-\toks@{}\@flf@get@body
+\@dynamictok{}\@flf@get@body
+}
+\long\def\@flf@get@body#1\end{%
+\@flf@checkcontinued#1\continueonframe\@nil
+\ifdfcontinued
+ \expandafter\flf@ta\expandafter{\@flf@tmpa}%
+ \edef\@flf@tmp{\the\@dynamictok\the\flf@ta}%
+ \@dynamictok\expandafter{\@flf@tmp}%
+\else
+ \@dynamictok\expandafter{\the\@dynamictok#1}%
+\fi
+\@flf@find@end}
+\newif\ifdfcontinued
+\long\def\@flf@checkcontinued#1\continueonframe#2\@nil{%
+\long\def\@flf@tmpa{#1}\long\def\@flf@tmpb{#2}%
+\ifx\@flf@tmpb\@lempty
+ \dfcontinuedfalse
+\else
+ \dfcontinuedtrue
+ \flf@getcontargs#2\@ff@text\@ff@nextid\@ff@rest
+\fi
+}
+\long\def\@lempty{}
+\def\flf@getcontargs{%
+\@ifnextchar[{\@flf@getcontargs}{\@flf@getcontargs[]}}
+\long\def\@flf@getcontargs[#1]#2#3\continueonframe#4#5#6{%
+\def#4{#1}\def#5{#2}\def#6{#3}%
}
-\long\def\@flf@get@body#1\end
- {\toks@\expandafter{\the\toks@#1}\@flf@find@end}
\def\@flf@find@end#1{%
\def\@tempa{#1}%
-\ifx\@tempa\@flf@
-\expandafter\@flf@enddynamiccontents
+\global\let\flf@next=\relax
+\ifdfcontinued
+ \@dynamictok\expandafter
+ {\the\@dynamictok\ffcontinuedtextlayout}%
+ \protected@edef\@tmpa{\the\@dynamictok{\@ff@text}}%
+ \@dynamictok\expandafter{\@tmpa}%
+ \toks@\expandafter{\@ff@rest}%
+ \edef\flf@next{\noexpand\@flf@get@body\noexpand\end{#1}%
+ \noexpand\begin{#1}{\@ff@nextid}\noexpand\par
+ \noexpand\noindent\noexpand\ignorespaces
+ \the\toks@\noexpand\end{#1}}%
\else
-\toks@\expandafter
- {\the\toks@\end{#1}}\expandafter\@flf@get@body\fi
+ \ifx\@tempa\@flf@
+ \let\flf@next=\@flf@endxdynamiccontents
+ \else
+ \@dynamictok\expandafter
+ {\the\@dynamictok\end{#1}}%
+ \let\flf@next=\@flf@get@body
+ \fi
+\fi
+\flf@next
}
-\let\enddynamiccontents\relax
-\def\@flf@enddynamiccontents{%
+\let\endxdynamiccontents\relax
+\def\@flf@endxdynamiccontents{%
\ifnum\@flf@idn>\c@maxdynamic
-\PackageError{flowfram}{Dynamic frame \number\@flf@idn\ does not exist}{%
-You have specified dynamic frame number \number\@flf@idn, but there are
-only \number\c@maxdynamic\space dynamic frames currently defined}%
+ \PackageError{flowfram}{Dynamic frame \number\@flf@idn\ does not exist}{%
+ You have specified dynamic frame number \number\@flf@idn, but there are
+ only \number\c@maxdynamic\space dynamic frames currently defined}%
\else
-\expandafter
-\xdef\csname @dynamicframe@\romannumeral\@flf@idn\endcsname{\the\toks@}%
-\expandafter
+ \expandafter
+ \xdef\csname @dynamicframe@\romannumeral\@flf@idn\endcsname{%
+ \the\@dynamictok}%
+ \expandafter
\fi
-\expandafter\end\expandafter{\@flf@}}
-\expandafter\def\csname dynamiccontents*\endcsname#1{%
-\edef\@flf@{\@currenvir}%
+\expandafter\end\expandafter{\@flf@}%
+}
+\newenvironment{dynamiccontents*}[1]{%
+\def\@flf@{dynamiccontents*}%
\@dynamicframeid{#1}%
-\edef\@flf@idn{\number\ff@id}%
-\toks@{}\@flf@get@body
+\xdynamiccontents{\ff@id}}{%
+\enddynamiccontents
}
\newcommand{\setdynamiccontents}{%
\@ifstar\@ssetdynamiccontents\@setdynamiccontents}
@@ -1243,18 +1327,34 @@ only \number\c@maxdynamic\space dynamic frames currently defined}%
\@dynamicframeid{#1}\@appenddynamic{\ff@id}{#2}}
\newcommand{\@appenddynamic}[2]{%
\ifnum#1>\c@maxdynamic
-\PackageError{flowfram}{Dynamic frame \number#1 does not exist}{%
-You have specified dynamic frame number \number#1,
-but there are only
-\number\c@maxdynamic\space dynamic frames currently defined}%
+ \PackageError{flowfram}{Dynamic frame \number#1 does not exist}{%
+ You have specified dynamic frame number \number#1,
+ but there are only
+ \number\c@maxdynamic\space dynamic frames currently defined}%
\else
-\expandafter\@ff@addtolist
-\csname @dynamicframe@\romannumeral#1\endcsname\entry{#2}%
+ \expandafter\@ff@addtolist
+ \csname @dynamicframe@\romannumeral#1\endcsname\entry{#2}%
\fi}
\newtoks\flf@ta \newtoks\flf@tb
\long\def\@ff@addtolist#1\entry#2{\flf@ta={{#2}}%
\flf@tb=\expandafter{#1}%
\xdef#1{\the\flf@tb\the\flf@ta}}
+\newcommand{\continueonframe}{\PackageError{flowfram}{Can't continue
+to new frame: not in static or dynamic frame}{%
+\string\continueonframe\space may only
+be used inside `staticcontents' or `dynamiccontents' environments
+(of their starred versions)}}
+\newcommand*{\@staticscontinueonframe}[2][]{%
+\ffcontinuedtextlayout{#1}%
+\end{staticcontents*}%
+\begin{staticcontents*}{#2}\par\noindent\ignorespaces}
+\newcommand*{\@staticcontinueonframe}[2][]{%
+\ffcontinuedtextlayout{#1}%
+\end{staticcontents}%
+\begin{staticcontents}{#2}\par\noindent\ignorespaces}
+\newcommand{\ffcontinuedtextlayout}[1]{%
+\parfillskip=0pt\par\hfill\ffcontinuedtextfont{#1}}
+\newcommand*{\ffcontinuedtextfont}[1]{\emph{\small #1}}
\newcommand*{\computeleftedgeodd}[1]{%
\setlength{#1}{-1in}%
\addtolength{#1}{-\hoffset}%
@@ -1348,68 +1448,587 @@ but there are only
\setlength{#2}{\@ff@tmp@x}}
\newcommand*{\@ff@getdim}[2]{%
\ifnum#2<1\relax
-\PackageError{flowfram}{Frame IDNs start from 1}{%
-You have specified a frame IDN of '\number#2'}%
+ \PackageError{flowfram}{Frame IDNs start from 1}{%
+ You have specified a frame IDN of '\number#2'}%
\fi
-\ifcase#1
-\PackageError{flowfram}{Unknown frame ID type '#1'}{%
-Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)}
+\ifcase#1\relax
+ \PackageError{flowfram}{Unknown frame ID type '#1'}{%
+ Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)}%
\or
-\ifnum#2>\c@maxflow
-\PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{%
-Flow frame IDNs go from 1 to \number\c@maxflow}
-\else
-\setlength{\ffareax}{\flowframex{#2}}
-\setlength{\ffareay}{\flowframey{#2}}
-\setlength{\ffareawidth}{\flowframewidth{#2}}
-\setlength{\ffareaheight}{\flowframeheight{#2}}
-\fi
+ \ifnum#2>\c@maxflow\relax
+ \PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{%
+ Flow frame IDNs go from 1 to \number\c@maxflow}%
+ \else
+ \setlength{\ffareax}{\flowframex{#2}}%
+ \setlength{\ffareay}{\flowframey{#2}}%
+ \setlength{\ffareawidth}{\flowframewidth{#2}}%
+ \setlength{\ffareaheight}{\flowframeheight{#2}}%
+ \fi
\or
-\ifnum#2>\c@maxstatic
-\PackageError{flowfram}{Invalid static frame IDN '\number#2'}{%
-Static frame IDNs go from 1 to \number\c@maxstatic}
-\else
-\setlength{\ffareax}{\staticframex{#2}}
-\setlength{\ffareay}{\staticframey{#2}}
-\expandafter\expandafter\expandafter
-\@ff@getstaticpos
-\csname @sf@dim@\romannumeral#2\endcsname
-\setlength{\ffareawidth}{\@ff@tmp@x}%
-\setlength{\ffareaheight}{\@ff@tmp@y}%
-\fi
+ \ifnum#2>\c@maxstatic\relax
+ \PackageError{flowfram}{Invalid static frame IDN '\number#2'}{%
+ Static frame IDNs go from 1 to \number\c@maxstatic}%
+ \else
+ \setlength{\ffareax}{\staticframex{#2}}%
+ \setlength{\ffareay}{\staticframey{#2}}%
+ \expandafter\expandafter\expandafter
+ \@ff@getstaticpos
+ \csname @sf@dim@\romannumeral#2\endcsname
+ \setlength{\ffareawidth}{\@ff@tmp@x}%
+ \setlength{\ffareaheight}{\@ff@tmp@y}%
+ \fi
\or
-\ifnum#2>\c@maxdynamic
-\PackageError{flowfram}{Invalid dynamic frame IDN '\number#2'}{%
-Dynamic frame IDNs go from 1 to \number\c@maxdynamic}
+ \ifnum#2>\c@maxdynamic\relax
+ \PackageError{flowfram}{Invalid dynamic frame IDN '\number#2'}{%
+ Dynamic frame IDNs go from 1 to \number\c@maxdynamic}%
+ \else
+ \setlength{\ffareax}{\dynamicframex{#2}}%
+ \setlength{\ffareay}{\dynamicframey{#2}}%
+ \expandafter\expandafter\expandafter
+ \@ff@getstaticpos
+ \csname @df@dim@\romannumeral#2\endcsname
+ \setlength{\ffareawidth}{\@ff@tmp@x}%
+ \setlength{\ffareaheight}{\@ff@tmp@y}%
+ \fi
\else
-\setlength{\ffareax}{\dynamicframex{#2}}
-\setlength{\ffareay}{\dynamicframey{#2}}
-\expandafter\expandafter\expandafter
-\@ff@getstaticpos
-\csname @df@dim@\romannumeral#2\endcsname
-\setlength{\ffareawidth}{\@ff@tmp@x}%
-\setlength{\ffareaheight}{\@ff@tmp@y}%
+ \PackageError{flowfram}{Unknown frame ID type '#1'}{%
+ Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)}%
\fi
+}
+\newcommand*{\@ff@getevendim}[2]{%
+\ifnum#2<1\relax
+ \PackageError{flowfram}{Frame IDNs start from 1}{%
+ You have specified a frame IDN of '\number#2'}%
+\fi
+\ifcase#1\relax
+ \PackageError{flowfram}{Unknown frame ID type '#1'}{%
+ Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)}
+\or
+ \ifnum#2>\c@maxflow
+ \PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{%
+ Flow frame IDNs go from 1 to \number\c@maxflow}%
+ \else
+ \setlength{\ffareax}{\flowframeevenx{#2}}%
+ \setlength{\ffareay}{\flowframeeveny{#2}}%
+ \setlength{\ffareawidth}{\flowframewidth{#2}}%
+ \setlength{\ffareaheight}{\flowframeheight{#2}}%
+ \fi
+\or
+ \ifnum#2>\c@maxstatic\relax
+ \PackageError{flowfram}{Invalid static frame IDN '\number#2'}{%
+ Static frame IDNs go from 1 to \number\c@maxstatic}%
+ \else
+ \setlength{\ffareax}{\staticframeevenx{#2}}%
+ \setlength{\ffareay}{\staticframeeveny{#2}}%
+ \expandafter\expandafter\expandafter
+ \@ff@getstaticpos
+ \csname @sf@dim@\romannumeral#2\endcsname
+ \setlength{\ffareawidth}{\@ff@tmp@x}%
+ \setlength{\ffareaheight}{\@ff@tmp@y}%
+ \fi
+\or
+ \ifnum#2>\c@maxdynamic\relax
+ \PackageError{flowfram}{Invalid dynamic frame IDN '\number#2'}{%
+ Dynamic frame IDNs go from 1 to \number\c@maxdynamic}%
+ \else
+ \setlength{\ffareax}{\dynamicframeevenx{#2}}%
+ \setlength{\ffareay}{\dynamicframeeveny{#2}}%
+ \expandafter\expandafter\expandafter
+ \@ff@getstaticpos
+ \csname @df@dim@\romannumeral#2\endcsname
+ \setlength{\ffareawidth}{\@ff@tmp@x}%
+ \setlength{\ffareaheight}{\@ff@tmp@y}%
+ \fi
\else
-\PackageError{flowfram}{Unknown frame ID type '#1'}{%
-Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)}
+ \PackageError{flowfram}{Unknown frame ID type '#1'}{%
+ Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)}
\fi
}
\newcommand*{\getstaticbounds}{%
\@ifstar\@sgetstaticbounds\@getstaticbounds}
\newcommand*{\@sgetstaticbounds}[1]{%
\@staticframeid{#1}\@getstaticbounds{\ff@id}}
-\newcommand*{\@getstaticbounds}[1]{\@ff@getdim{1}{#1}}
+\newcommand*{\@getstaticbounds}[1]{\@ff@getdim{2}{#1}}
+\newcommand*{\getstaticevenbounds}{%
+\@ifstar\@sgetstaticevenbounds\@getstaticevenbounds}
+\newcommand*{\@sgetstaticevenbounds}[1]{%
+\@staticframeid{#1}\@getstaticevenbounds{\ff@id}}
+\newcommand*{\@getstaticevenbounds}[1]{\@ff@getevendim{2}{#1}}
\newcommand*{\getflowbounds}{%
\@ifstar\@sgetflowbounds\@getflowbounds}
\newcommand*{\@sgetflowbounds}[1]{%
\@flowframeid{#1}\@getflowbounds{\ff@id}}
-\newcommand*{\@getflowbounds}[1]{\@ff@getdim{2}{#1}}
+\newcommand*{\@getflowbounds}[1]{\@ff@getdim{1}{#1}}
+\newcommand*{\getflowevenbounds}{%
+\@ifstar\@sgetflowevenbounds\@getflowevenbounds}
+\newcommand*{\@sgetflowevenbounds}[1]{%
+\@flowframeid{#1}\@getflowevenbounds{\ff@id}}
+\newcommand*{\@getflowevenbounds}[1]{\@ff@getevendim{1}{#1}}
\newcommand*{\getdynamicbounds}{%
\@ifstar\@sgetdynamicbounds\@getdynamicbounds}
\newcommand*{\@sgetdynamicbounds}[1]{%
\@dynamicframeid{#1}\@getdynamicbounds{\ff@id}}
\newcommand*{\@getdynamicbounds}[1]{\@ff@getdim{3}{#1}}
+\newcommand*{\getdynamicevenbounds}{%
+\@ifstar\@sgetdynamicevenbounds\@getdynamicevenbounds}
+\newcommand*{\@sgetdynamicevenbounds}[1]{%
+\@dynamicframeid{#1}\@getdynamicevenbounds{\ff@id}}
+\newcommand*{\@getdynamicevenbounds}[1]{\@ff@getevendim{3}{#1}}
+\newif\ifFLFabove
+\newif\ifFLFbelow
+\newif\ifFLFleft
+\newif\ifFLFright
+\newcommand*{\checkifframeabove}{%
+\@ifstar\@scheckifframeabove\@checkifframeabove}
+\newcommand*{\@scheckifframeabove}[4]{%
+\ifodd\c@page
+ \@soddcheckifframeabove{#1}{#2}{#3}{#4}%
+\else
+ \@sevencheckifframeabove{#1}{#2}{#3}{#4}%
+\fi}
+\newcommand*{\@checkifframeabove}[4]{%
+\ifodd\c@page
+ \@oddcheckifframeabove{#1}{#2}{#3}{#4}%
+\else
+ \@evencheckifframeabove{#1}{#2}{#3}{#4}%
+\fi}
+\newcommand*{\oddcheckifframeabove}{%
+\@ifstar\@soddcheckifframeabove\@oddcheckifframeabove}
+\newcommand*{\@soddcheckifframeabove}[4]{%
+\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#1bounds\endcsname{#2}%
+\edef\@ff@check{\the\ffareay}%
+\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#3bounds\endcsname{#4}%
+\advance\ffareay by \ffareaheight\relax
+\expandafter\ifdim\@ff@check>\ffareay
+ \FLFabovetrue
+\else
+ \FLFabovefalse
+\fi
+}
+\newcommand*{\@oddcheckifframeabove}[4]{%
+\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#1bounds\endcsname{#2}%
+\edef\@ff@check{\the\ffareay}%
+\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#3bounds\endcsname{#4}%
+\advance\ffareay by \ffareaheight\relax
+\expandafter\ifdim\@ff@check>\ffareay
+ \FLFabovetrue
+\else
+ \FLFabovefalse
+\fi
+}
+\newcommand*{\checkifframebelow}{%
+\@ifstar\@scheckifframebelow\@checkifframebelow}
+\newcommand*{\@scheckifframebelow}[4]{%
+\ifodd\c@page
+ \@soddcheckifframebelow{#1}{#2}{#3}{#4}%
+\else
+ \@sevencheckifframebelow{#1}{#2}{#3}{#4}%
+\fi}
+\newcommand*{\@checkifframebelow}[4]{%
+\ifodd\c@page
+ \@oddcheckifframebelow{#1}{#2}{#3}{#4}%
+\else
+ \@evencheckifframebelow{#1}{#2}{#3}{#4}%
+\fi}
+\newcommand*{\oddcheckifframebelow}{%
+\@ifstar\@soddcheckifframebelow\@oddcheckifframebelow}
+\newcommand*{\@soddcheckifframebelow}[4]{%
+\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#1bounds\endcsname{#2}%
+\advance\ffareay by \ffareaheight\relax
+\edef\@ff@check{\the\ffareay}%
+\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#3bounds\endcsname{#4}%
+\expandafter\ifdim\@ff@check<\ffareay
+ \FLFbelowtrue
+\else
+ \FLFbelowfalse
+\fi
+}
+\newcommand*{\@oddcheckifframebelow}[4]{%
+\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#1bounds\endcsname{#2}%
+\advance\ffareay by \ffareaheight\relax
+\edef\@ff@check{\the\ffareay}%
+\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#3bounds\endcsname{#4}%
+\expandafter\ifdim\@ff@check<\ffareay
+ \FLFbelowtrue
+\else
+ \FLFbelowfalse
+\fi
+}
+\newcommand*{\checkifframeleft}{%
+\@ifstar\@scheckifframeleft\@checkifframeleft}
+\newcommand*{\@scheckifframeleft}[4]{%
+\ifodd\c@page
+ \@soddcheckifframeleft{#1}{#2}{#3}{#4}%
+\else
+ \@sevencheckifframeleft{#1}{#2}{#3}{#4}%
+\fi}
+\newcommand*{\@checkifframeleft}[4]{%
+\ifodd\c@page
+ \@oddcheckifframeleft{#1}{#2}{#3}{#4}%
+\else
+ \@evencheckifframeleft{#1}{#2}{#3}{#4}%
+\fi}
+\newcommand*{\oddcheckifframeleft}{%
+\@ifstar\@soddcheckifframeleft\@oddcheckifframeleft}
+\newcommand*{\@soddcheckifframeleft}[4]{%
+\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#1bounds\endcsname{#2}%
+\advance\ffareax by \ffareawidth\relax
+\edef\@ff@check{\the\ffareax}%
+\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#3bounds\endcsname{#4}%
+\expandafter\ifdim\@ff@check<\ffareax
+ \FLFlefttrue
+\else
+ \FLFleftfalse
+\fi
+}
+\newcommand*{\@oddcheckifframeleft}[4]{%
+\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#1bounds\endcsname{#2}%
+\advance\ffareax by \ffareawidth\relax
+\edef\@ff@check{\the\ffareax}%
+\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#3bounds\endcsname{#4}%
+\expandafter\ifdim\@ff@check<\ffareax
+ \FLFlefttrue
+\else
+ \FLFleftfalse
+\fi
+}
+\newcommand*{\checkifframeright}{%
+\@ifstar\@scheckifframeright\@checkifframeright}
+\newcommand*{\@scheckifframeright}[4]{%
+\ifodd\c@page
+ \@soddcheckifframeright{#1}{#2}{#3}{#4}%
+\else
+ \@sevencheckifframeright{#1}{#2}{#3}{#4}%
+\fi}
+\newcommand*{\@checkifframeright}[4]{%
+\ifodd\c@page
+ \@oddcheckifframeright{#1}{#2}{#3}{#4}%
+\else
+ \@evencheckifframeright{#1}{#2}{#3}{#4}%
+\fi}
+\newcommand*{\oddcheckifframeright}{%
+\@ifstar\@soddcheckifframeright\@oddcheckifframeright}
+\newcommand*{\@soddcheckifframeright}[4]{%
+\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#1bounds\endcsname{#2}%
+\edef\@ff@check{\the\ffareax}%
+\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#3bounds\endcsname{#4}%
+\advance\ffareax by \ffareawidth\relax
+\expandafter\ifdim\@ff@check>\ffareax
+ \FLFrighttrue
+\else
+ \FLFrightfalse
+\fi
+}
+\newcommand*{\@oddcheckifframeright}[4]{%
+\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#1bounds\endcsname{#2}%
+\edef\@ff@check{\the\ffareax}%
+\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#3bounds\endcsname{#4}%
+\advance\ffareax by \ffareawidth\relax
+\expandafter\ifdim\@ff@check>\ffareax
+ \FLFrighttrue
+\else
+ \FLFrightfalse
+\fi
+}
+\newcommand*{\evencheckifframeabove}{%
+\@ifstar\@sevencheckifframeabove\@evencheckifframeabove}
+\newcommand*{\@sevencheckifframeabove}[4]{%
+\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#1evenbounds\endcsname{#2}%
+\edef\@ff@check{\the\ffareay}%
+\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#3evenbounds\endcsname{#4}%
+\advance\ffareay by \ffareaheight\relax
+\expandafter\ifdim\@ff@check>\ffareay
+ \FLFabovetrue
+\else
+ \FLFabovefalse
+\fi
+}
+\newcommand*{\@evencheckifframeabove}[4]{%
+\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#1evenbounds\endcsname{#2}%
+\edef\@ff@check{\the\ffareay}%
+\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#3evenbounds\endcsname{#4}%
+\advance\ffareay by \ffareaheight\relax
+\expandafter\ifdim\@ff@check>\ffareay
+ \FLFabovetrue
+\else
+ \FLFabovefalse
+\fi
+}
+\newcommand*{\evencheckifframebelow}{%
+\@ifstar\@sevencheckifframebelow\@evencheckifframebelow}
+\newcommand*{\@sevencheckifframebelow}[4]{%
+\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#1evenbounds\endcsname{#2}%
+\advance\ffareay by \ffareaheight\relax
+\edef\@ff@check{\the\ffareay}%
+\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#3evenbounds\endcsname{#4}%
+\expandafter\ifdim\@ff@check<\ffareay
+ \FLFbelowtrue
+\else
+ \FLFbelowfalse
+\fi
+}
+\newcommand*{\@evencheckifframebelow}[4]{%
+\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#1evenbounds\endcsname{#2}%
+\advance\ffareay by \ffareaheight\relax
+\edef\@ff@check{\the\ffareay}%
+\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#3evenbounds\endcsname{#4}%
+\expandafter\ifdim\@ff@check<\ffareay
+ \FLFbelowtrue
+\else
+ \FLFbelowfalse
+\fi
+}
+\newcommand*{\evencheckifframeleft}{%
+\@ifstar\@sevencheckifframeleft\@evencheckifframeleft}
+\newcommand*{\@sevencheckifframeleft}[4]{%
+\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#1evenbounds\endcsname{#2}%
+\advance\ffareax by \ffareawidth\relax
+\edef\@ff@check{\the\ffareax}%
+\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#3evenbounds\endcsname{#4}%
+\expandafter\ifdim\@ff@check<\ffareax
+ \FLFlefttrue
+\else
+ \FLFleftfalse
+\fi
+}
+\newcommand*{\@evencheckifframeleft}[4]{%
+\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#1evenbounds\endcsname{#2}%
+\advance\ffareax by \ffareawidth\relax
+\edef\@ff@check{\the\ffareax}%
+\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#3evenbounds\endcsname{#4}%
+\expandafter\ifdim\@ff@check<\ffareax
+ \FLFlefttrue
+\else
+ \FLFleftfalse
+\fi
+}
+\newcommand*{\evencheckifframeright}{%
+\@ifstar\@sevencheckifframeright\@evencheckifframeright}
+\newcommand*{\@sevencheckifframeright}[4]{%
+\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#1evenbounds\endcsname{#2}%
+\edef\@ff@check{\the\ffareax}%
+\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @sget#3evenbounds\endcsname{#4}%
+\advance\ffareax by \ffareawidth\relax
+\expandafter\ifdim\@ff@check>\ffareax
+ \FLFrighttrue
+\else
+ \FLFrightfalse
+\fi
+}
+\newcommand*{\@evencheckifframeright}[4]{%
+\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#1'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#1evenbounds\endcsname{#2}%
+\edef\@ff@check{\the\ffareax}%
+\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame
+type `#3'}{Frame types may only be one of: static, dynamic or
+flow}}{}%
+\csname @get#3evenbounds\endcsname{#4}%
+\advance\ffareax by \ffareawidth\relax
+\expandafter\ifdim\@ff@check>\ffareax
+ \FLFrighttrue
+\else
+ \FLFrightfalse
+\fi
+}
+\newcommand*{\FFaboveleft}{above left}
+\newcommand*{\FFaboveright}{above right}
+\newcommand*{\FFbelowleft}{below left}
+\newcommand*{\FFbelowright}{below right}
+\newcommand*{\FFleft}{on the left}
+\newcommand*{\FFright}{on the right}
+\newcommand*{\FFabove}{above}
+\newcommand*{\FFbelow}{below}
+\newcommand*{\FFoverlap}{overlap}
+\DeclareRobustCommand*{\relativeframelocation}{%
+\@ifstar\@srelativeframelocation\@relativeframelocation}
+\newcommand*{\@srelativeframelocation}[4]{%
+\@scheckifframeabove{#1}{#2}{#3}{#4}%
+\@scheckifframebelow{#1}{#2}{#3}{#4}%
+\@scheckifframeleft{#1}{#2}{#3}{#4}%
+\@scheckifframeright{#1}{#2}{#3}{#4}%
+\ifFLFabove
+ \ifFLFleft
+ \FFaboveleft
+ \else
+ \ifFLFright
+ \FFaboveright
+ \else
+ \FFabove
+ \fi
+ \fi
+\else
+ \ifFLFbelow
+ \ifFLFleft
+ \FFbelowleft
+ \else
+ \ifFLFright
+ \FFbelowright
+ \else
+ \FFbelow
+ \fi
+ \fi
+ \else
+ \ifFLFleft
+ \FFleft
+ \else
+ \ifFLFright
+ \FFright
+ \else
+ \FFoverlap
+ \fi
+ \fi
+ \fi
+\fi
+}
+\newcommand*{\@relativeframelocation}[4]{%
+\@checkifframeabove{#1}{#2}{#3}{#4}%
+\@checkifframebelow{#1}{#2}{#3}{#4}%
+\@checkifframeleft{#1}{#2}{#3}{#4}%
+\@checkifframeright{#1}{#2}{#3}{#4}%
+\ifFLFabove
+ \ifFLFleft
+ \FFaboveleft
+ \else
+ \ifFLFright
+ \FFaboveright
+ \else
+ \FFabove
+ \fi
+ \fi
+\else
+ \ifFLFbelow
+ \ifFLFleft
+ \FFbelowleft
+ \else
+ \ifFLFright
+ \FFbelowright
+ \else
+ \FFbelow
+ \fi
+ \fi
+ \else
+ \ifFLFleft
+ \FFleft
+ \else
+ \ifFLFright
+ \FFright
+ \else
+ \FFoverlap
+ \fi
+ \fi
+ \fi
+\fi
+}
+\DeclareRobustCommand*{\reldynamicloc}{%
+\@ifstar\@sreldynamicloc\@reldynamicloc}
+\newcommand*{\@sreldynamicloc}[2]{
+\@srelativeframelocation{dynamic}{#1}{dynamic}{#2}}
+\newcommand*{\@reldynamicloc}[2]{
+\@relativeframelocation{dynamic}{#1}{dynamic}{#2}}
+\DeclareRobustCommand*{\relstaticloc}{%
+\@ifstar\@srelstaticloc\@relstaticloc}
+\newcommand*{\@srelstaticloc}[2]{
+\@srelativeframelocation{static}{#1}{static}{#2}}
+\newcommand*{\@relstaticloc}[2]{
+\@relativeframelocation{static}{#1}{static}{#2}}
+\DeclareRobustCommand*{\relflowloc}{%
+\@ifstar\@srelflowloc\@relflowloc}
+\newcommand*{\@srelflowloc}[2]{
+\@srelativeframelocation{flow}{#1}{flow}{#2}}
+\newcommand*{\@relflowloc}[2]{
+\@relativeframelocation{flow}{#1}{flow}{#2}}
\newcommand*{\setinitialframe}[1]{\c@thisframe=#1%
\global\usedframebreaktrue
\global\setlength{\hsize}{%
@@ -1489,29 +2108,30 @@ Frames must be defined in the preamble}#1}%
}
\newcommand{\@setcol}[1]{%
\ifnum\c@maxflow<#1\relax
-\PackageError{flowfram}{Can't set frame '\number#1', doesn't
-exist}{}%
-\else
-\expandafter\global\expandafter\columnwidth
-\csname colwidth\romannumeral#1\endcsname
-\ifdim\hsize=\columnwidth
-\else
- \ifusedframebreak
- \else
- \PackageWarning{flowfram}{Moving to flow frame of unequal
-width,\MessageBreak use of \string\framebreak\space advised,
-or text might not appear correctly}%
- \fi
-\fi
-\global\usedframebreakfalse
-\global\hsize\columnwidth
-\expandafter\global
-\expandafter\vsize\csname colheight\romannumeral#1\endcsname
-\global\@colht\vsize
-\global\@colroom\@colht
-\global\linewidth\columnwidth
-\setmargin
+ \PackageError{flowfram}{Can't set frame '\number#1', doesn't
+ exist}{}%
+\else
+ \expandafter\global\expandafter\columnwidth
+ \csname colwidth\romannumeral#1\endcsname
+ \ifdim\hsize=\columnwidth
+ \else
+ \ifusedframebreak
+ \else
+ \PackageWarning{flowfram}{Moving to flow frame of unequal
+ width,\MessageBreak use of \string\framebreak\space advised,
+ or text might not appear correctly}%
+ \fi
+ \fi
+ \global\usedframebreakfalse
+ \global\hsize\columnwidth
+ \expandafter\global
+ \expandafter\vsize\csname colheight\romannumeral#1\endcsname
+ \global\@colht\vsize
+ \global\@colroom\@colht
+ \global\linewidth\columnwidth
+ \setmargin
\fi
+\stepcounter{displayedframe}%
}
\output={\let\par\@@par
\ifnum\outputpenalty <-\@M
@@ -1587,24 +2207,27 @@ or text might not appear correctly}%
\global\let\@@if@newlist\if@newlist
\global\@newlistfalse\@parboxrestore
\shipout\vbox{\set@typeset@protect
- \aftergroup
- \endgroup
- \aftergroup
- \set@typeset@protect
- \reset@font\normalsize\normalsfcodes
- \let\label\@gobble
- \let\index\@gobble
- \let\glossary\@gobble
- \baselineskip\z@skip
- \lineskip\z@skip
- \lineskiplimit\z@
+ \aftergroup
+ \endgroup
+ \aftergroup
+ \set@typeset@protect
+ \reset@font\normalsize\normalsfcodes
+ \let\label\@gobble
+ \let\index\@gobble
+ \let\glossary\@gobble
+ \baselineskip\z@skip
+ \lineskip\z@skip
+ \lineskiplimit\z@
\vskip\topmargin\moveright\@themargin
\vbox{%
- \vskip\headheight
- \vskip\headsep
- \box\@outputbox
- }}\global\let\if@newlist\@@if@newlist
- \stepcounter{page}\let\firstmark\botmark}
+ \vskip\headheight
+ \vskip\headsep
+ \box\@outputbox
+ }}%
+ \global\let\if@newlist\@@if@newlist
+ \stepcounter{page}%
+ \setcounter{displayedframe}{0}%
+ \let\firstmark\botmark}
\newcommand*{\makedfheaderfooter}{%
\setlength{\@ff@tmp@y}{\textheight}%
\addtolength{\@ff@tmp@y}{\headsep}%
@@ -2563,7 +3186,7 @@ Available frame types are: 'flow', 'static' and 'dynamic'}}}}}
\newcommand*{\NcolumnDtopinarea}[7][all]{%
\Ncolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}{#7}}
\newcommand*{\onecolumnbottom}[3][all]{%
-\onecolumnSbottominarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}}
+\onecolumnbottominarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}}
\@onlypreamble{\onecolumnbottom}
\newcommand*{\onecolumnSbottom}[2][all]{%
\onecolumnbottom[#1]{static}{#2}}
@@ -2923,6 +3546,7 @@ Available frame types are: 'flow', 'static' and 'dynamic'}}}}}
{\@ff@tmp@x@even}}
\newlength\ffcolumnseprule
\setlength{\ffcolumnseprule}{2pt}
+\newcommand*{\ffruledeclarations}{}
\newcommand*{\insertvrule}{\@ifstar\@sinsertvrule\@insertvrule}
\newcommand*{\@insertvrule}[1][0pt]{%
\@ifnextchar[{\@@insertvrule[#1]}{\@@insertvrule[#1][0pt]}}
@@ -2983,8 +3607,9 @@ or 'dynamic'}}}}%
{\@ff@tmp@x}{\@ff@tmp@y}%
\addtolength{\@ff@staticH}{#1}%
\addtolength{\@ff@staticH}{#2}%
-\setstaticcontents{\c@maxstatic}{\hfill
-\rule[-#2]{\ffcolumnseprule}{\@ff@staticH}\hfill\mbox{}}%
+\setstaticcontents{\c@maxstatic}{%
+\ffruledeclarations
+\ffvrule{#2}{\ffcolumnseprule}{\@ff@staticH}}%
\ifcase#3\relax
\or \edef\@ff@pages{\csname @ff@pages@\romannumeral#4\endcsname}%
\or \edef\@ff@pages{\csname @sf@pages@\romannumeral#4\endcsname}%
@@ -2997,6 +3622,8 @@ or 'dynamic'}}}}%
\addtolength{\@ff@tmp@y}{-\@ff@left@y}%
\setstaticframe{\c@maxstatic}{evenx=\@ff@tmp@x,eveny=\@ff@tmp@y}%
}
+\newcommand*{\ffvrule}[3]{%
+\hfill \rule[-#1]{#2}{#3}\hfill\mbox{}}
\newcommand*{\@sinsertvrule}[1][0pt]{%
\@ifnextchar[{\@@sinsertvrule[#1]}{\@@sinsertvrule[#1][0pt]}}
\def\@@sinsertvrule[#1][#2]#3#4#5#6{%
@@ -3074,7 +3701,8 @@ or 'dynamic'}}}}%
\addtolength{\@ff@staticW}{#1}%
\addtolength{\@ff@staticW}{#2}%
\setstaticcontents{\c@maxstatic}{%
-\hspace*{-#1}\rule{\@ff@staticW}{\ffcolumnseprule}}%
+\ffruledeclarations
+\ffhrule{#1}{\@ff@staticW}{\ffcolumnseprule}}%
\ifcase#3\relax
\or \edef\@ff@pages{\csname @ff@pages@\romannumeral#4\endcsname}%
\or \edef\@ff@pages{\csname @sf@pages@\romannumeral#4\endcsname}%
@@ -3087,6 +3715,8 @@ or 'dynamic'}}}}%
\addtolength{\@ff@tmp@y}{-\@ff@left@y}%
\setstaticframe{\c@maxstatic}{evenx=\@ff@tmp@x,eveny=\@ff@tmp@y}%
}
+\newcommand*{\ffhrule}[3]{%
+\hspace*{-#1}\rule{#2}{#3}}
\newcommand*{\@sinserthrule}[1][0pt]{%
\@ifnextchar[{\@@sinserthrule[#1]}{\@@sinserthrule[#1][0pt]}}
\def\@@sinserthrule[#1][#2]#3#4#5#6{%