summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2007-04-08 18:18:21 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2007-04-08 18:18:21 +0000
commit2b0321dafd5d992f9fad9d473404b5108ddbc5c7 (patch)
tree21a9322d8d9ce642ecfb7f35e57313f8334fe297
parentf25dd24f847d44201cbb435d7473ee114a876241 (diff)
update flowfram to v1.07
git-svn-id: svn://tug.org/texlive/trunk@4132 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/CHANGES13
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/README82
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/ffuserguide.pdfbin237531 -> 381626 bytes
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/ffuserguide.tex395
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/flowfram.pdfbin262469 -> 377509 bytes
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdfbin65590 -> 63158 bytes
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex6
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/samples/egg.pngbin913 -> 930 bytes
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/samples/news.pdfbin31724 -> 29971 bytes
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/samples/news.tex1
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/samples/news2.pdfbin0 -> 36407 bytes
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/samples/news2.tex231
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/samples/poster.pdfbin19319 -> 79646 bytes
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/samples/poster.tex7
-rw-r--r--Master/texmf-dist/doc/latex/flowfram/samples/sheep.pngbin1721 -> 1199 bytes
-rw-r--r--Master/texmf-dist/source/latex/flowfram/flowfram.dtx514
-rw-r--r--Master/texmf-dist/source/latex/flowfram/flowfram.ins4
-rw-r--r--Master/texmf-dist/tex/latex/flowfram/flowfram.sty439
-rw-r--r--Master/texmf-dist/tpm/flowfram.tpm11
-rw-r--r--Master/texmf/lists/flowfram3
20 files changed, 1382 insertions, 324 deletions
diff --git a/Master/texmf-dist/doc/latex/flowfram/CHANGES b/Master/texmf-dist/doc/latex/flowfram/CHANGES
new file mode 100644
index 00000000000..98df6404a1c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/flowfram/CHANGES
@@ -0,0 +1,13 @@
+flowfram change log
+
+1.07 : fixed bug causing extra pages at the end of the document
+
+1.06 : fixed bug causing slight right shift of frames
+
+1.05 : fixed bug causing overfull hboxes on even pages.
+
+1.04 : fixed bug causing slight right shift of contents of all flow frames.
+
+1.03 : added shape and valign keys.
+
+1.02 : added facility for rotating frame contents.
diff --git a/Master/texmf-dist/doc/latex/flowfram/README b/Master/texmf-dist/doc/latex/flowfram/README
index c6e01577692..fd950895038 100644
--- a/Master/texmf-dist/doc/latex/flowfram/README
+++ b/Master/texmf-dist/doc/latex/flowfram/README
@@ -1,41 +1,41 @@
-LaTeX Package : flowfram v 1.02
-
-Last Modified : 24th November 2005
-
-Author : Nicola Talbot
-
-Files : flowfram.dtx - documented source file
- flowfram.ins - installation script
- ffuserguide.pdf - user manual
- ffuserguide.tex - source code for user manual
- samples/ - directory containiing sample files
-
-Create frames for posters, brochures or magazines
-
-The flowfram package is designed to enable you to create
-frames in a document such that the contents of the
-document environment flow from one frame to the next in the
-order in which they were defined. This is useful for creating
-posters or magazines or any other form of document that does not
-conform to the standard one or two column layout.
-
-To extract the code do:
-
-latex flowfram.ins
-
-To extract the documented code do:
-
-latex flowfram.dtx
-makeindex -s gind.ist flowfram
-makeglos.pl flowfram
-latex flowfram.dtx
-latex flowfram.dtx
-
-(The documentation requires at least version 2.2 of the
-glossary package.)
-
-This material is subject to the LaTeX Project Public License.
-See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license.
-
-http://theoval.cmp.uea.ac.uk/~nlct/
-
+LaTeX Package : flowfram v 1.07
+
+Last Modified : 9th March 2007
+
+Author : Nicola Talbot
+
+Files : flowfram.dtx - documented source file
+ flowfram.ins - installation script
+ ffuserguide.pdf - user manual
+ ffuserguide.tex - source code for user manual
+ samples/ - directory containiing sample files
+
+Create frames for posters, brochures or magazines
+
+The flowfram package is designed to enable you to create
+frames in a document such that the contents of the
+document environment flow from one frame to the next in the
+order in which they were defined. This is useful for creating
+posters or magazines or any other form of document that does not
+conform to the standard one or two column layout.
+
+To extract the code do:
+
+latex flowfram.ins
+
+To extract the documented code do:
+
+latex flowfram.dtx
+makeindex -s gind.ist flowfram
+makeglos.pl flowfram
+latex flowfram.dtx
+latex flowfram.dtx
+
+(The documentation requires at least version 2.2 of the
+glossary package.)
+
+This material is subject to the LaTeX Project Public License.
+See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license.
+
+http://theoval.cmp.uea.ac.uk/~nlct/
+
diff --git a/Master/texmf-dist/doc/latex/flowfram/ffuserguide.pdf b/Master/texmf-dist/doc/latex/flowfram/ffuserguide.pdf
index b52b237f70d..b3f1667d486 100644
--- a/Master/texmf-dist/doc/latex/flowfram/ffuserguide.pdf
+++ b/Master/texmf-dist/doc/latex/flowfram/ffuserguide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/flowfram/ffuserguide.tex b/Master/texmf-dist/doc/latex/flowfram/ffuserguide.tex
index 53cc01236b3..8ff2f6c9d2b 100644
--- a/Master/texmf-dist/doc/latex/flowfram/ffuserguide.tex
+++ b/Master/texmf-dist/doc/latex/flowfram/ffuserguide.tex
@@ -14,9 +14,10 @@
pdfauthor={Nicola Talbot},
pdftitle={Creating Flow Frames for Posters, Brochures or Magazines using flowfram.sty},
pdfkeywords={LaTeX;text frames;posters;brochures}]{hyperref}
-\usepackage[style=altlist,toc,number=none]{glossary}[2005/07/15]
+\usepackage[style=altlist,toc,number=none]{glossary}[2006/07/20]
\usepackage{pgf}
\usepackage[norotate,ttbnotitle,ttbnum]{flowfram}
+\usepackage{shapepar}
% Define some commands for consistency and indexing
\newcommand{\sty}[1]{\textsf{#1}\index{#1@\textsf{#1} package}}
@@ -48,6 +49,8 @@ explicitly changed.}}
in which text is fixed in place, but the contents are re-typeset
after each page.}}
+\newcommand*{\staticordynamic}{\useGlosentry{static}{static} or \gls{dynamic}}
+
\storeglosentry{frame}{name=frame,description={A rectangular
area of the page in which text can be placed (not to be
confused with a frame making command). There are three types:
@@ -122,6 +125,13 @@ refer to the frame by label instead of by its IDN.}}
\setflowframe*{main}{evenx=0.4\textwidth}
\setdynamicframe*{chaphead}{evenx=0pt,clear}
+% make a frames to illustrate shaped frames
+\newstaticframe[none]{0.38\textwidth}{0.55\textheight}{0.62\textwidth}{0.45\textheight}[shapedt]
+\setstaticframe*{shapedt}{evenx=0pt}
+
+\newstaticframe[none]{0.38\textwidth}{0.45\textheight}{0.62\textwidth}{0pt}[shapedb]
+\setstaticframe*{shapedb}{evenx=0pt}
+
% set the margins to appear on the spine side of the page
\setflowframe*{main}{margin=inner}
@@ -226,9 +236,12 @@ backcolor=blue,textcolor=white,style=footstyle,pages=none}
\setlength{\parindent}{0pt}%
\setlength{\parskip}{0pt plus .3pt}%
\let\item\@idxitem}{%
+\afterpage{%
\setflowframe*{main}{pages=all}%
\setflowframe{>1}{pages=none}%
-\finishthispage}
+}
+\finishthispage
+}
\makeatother
\begin{document}
@@ -237,9 +250,9 @@ backcolor=blue,textcolor=white,style=footstyle,pages=none}
\dfswapoddeven*{chaphead}
\title{Creating Flow Frames for Posters, Brochures or
-Magazines using flowfram.sty v 1.02}
+Magazines using flowfram.sty v 1.07}
\author{Nicola L. C. Talbot}
-\date{24th November 2005}
+\date{9th March 2007}
\pagenumbering{alph}
\maketitle
@@ -284,10 +297,10 @@ or magazines or any other form of document that does not
conform to the standard one or two column layout.
The \sty{flowfram} package provides three types of \gls{frame}:
-\gls{flow}s, \gls{static}s and \gls{dynamic}s, all rectangular
-in shape with dimensions and positions specified by the
+\gls{flow}s, \gls{static}s and \gls{dynamic}s with dimensions and
+positions specified by the
user\footnote{Can I have arbitrary shaped frames? See
-\autoref{itm:parshape} on page~\pageref{itm:parshape}}.
+\autoref{sec:parshape}}.
The main contents of the document environment flow from
one \gls{flow} to the next in the order of definition,
whereas the contents of the static and dynamic frames
@@ -323,12 +336,7 @@ of the arbitrary layout of the flow frames.}.
This package has only been tested with a limited number of
class files and packages. Since it modifies the output routine,
it is likely to conflict with any other package which also
-does this. The \sty{flowfram} package works fine with
-\appname{pdflatex}, \appname{latex} and \appname{dvips},
-however \appname{ps2pdf} and \appname{dvipdf} both seem to
-cause a slight left shift in the page which may result in a
-vertical white band on the right side of the page.
-This problem does not seem to occur with Acrobat Distiller.
+does this.
You should load \sty{flowfram} \emph{after} \sty{hyperref}
and any colour package (e.g.\ \sty{color}).
@@ -415,8 +423,7 @@ you have two or more overlapping frames, the text in each
\gls{frame} will not attempt to wrap around the other
frames, but will simply overwrite
them.\footnote{Can I have arbitrary
-shaped frames? See \autoref{itm:parshape} on
-page~\pageref{itm:parshape}.}
+shaped frames? See \autoref{sec:parshape}.}
\chapter{Defining New Frames}
@@ -437,7 +444,10 @@ a new \gls{flow} use:\\[10pt]
where \meta{width} is the width of the \gls{frame}, \meta{height}
is the height of the \gls{frame}, (\meta{x},\meta{y}) is the
position of the bottom left hand corner of the \gls{frame}
-relative to the bottom left hand corner of the \gls{typeblock}.
+relative to the bottom left hand corner of the
+\gls{typeblock}\footnote{See \autoref{itm:absval} on
+page~\pageref{itm:absval} if you want to convert from absolute
+page co-ordinates to co-ordinates relative to the typeblock}.
The first optional argument, \meta{page list}, indicates the
list of pages for which this \gls{frame} is defined.
@@ -488,8 +498,8 @@ defined in \autoref{sec:modattr}} (i.e.\ this one.)
You can force text to move immediately to the next defined
\gls{flow} using one of the commands: \cmdname{newpage},
-\cmdname{clearpage}, \cmdname{pagebreak} or \cmdname{framebreak}.
-The first three work in an analogous way to the way they
+\cmdname{pagebreak} or \cmdname{framebreak}.
+The first two work in an analogous way to the way they
work in standard two column mode. The latter,
\cmdname{framebreak}, is required
when a paragraph spans two \useGlosentry{flow}{flow frames}
@@ -500,7 +510,8 @@ result, the end of the paragraph at the beginning of the new
\gls{flow} retains the width of the previous \gls{flow}.
If you want to start a new page, rather than simply move to the
-next \gls{frame}, use the command \cmdname{finishthispage},
+next \gls{frame}, use the command \cmdname{finishthispage}
+or \cmdname{clearpage},
or for two-sided documents, to start on the next odd page
do \cmdname{cleardoublepage}.
@@ -517,6 +528,10 @@ explicitly changed. Thus, a \gls{static} can be used, for
example, to make a company logo appear in the same place on every
page.
+As from version 1.03 it is now possible to have
+\gls{static}s with non-rectangular contents, see
+\autoref{sec:parshape} for further details.
+
A new \gls{static} is defined using the command:\\[10pt]
\cmdname{newstaticframe}\verb/[/\meta{page list}\verb+]{+%
\meta{width}\verb/}{/%
@@ -570,6 +585,10 @@ are re-typeset on each page. (A \gls{static} stores its
contents in a savebox, whereas a \gls{dynamic} stores its
contents in a macro).
+As from version 1.03 it is now possible to have
+\gls{dynamic}s with non-rectangular contents, see
+\autoref{sec:parshape} for further details.
+
To create a new \gls{dynamic}, use the command:\\[10pt]
\cmdname{newdynamicframe}\verb/[/\meta{page list}\verb+]{+%
\meta{width}\verb/}{/%
@@ -631,6 +650,68 @@ create two \gls{dynamic}s with \IDL{}s \texttt{header} and
you can then move or resize the header and footer using
\cmdname{setdynamicframe} (described next).
+\section{Determining the Location of the Typeblock}
+\label{sec:typeblockloc}
+
+As mentioned above, when you create new \useGlosentry{frame}{frames},
+you must specify their location relative to the \gls{typeblock}, but
+what if you want to position a \gls{frame} a set distance from the
+edge of the paper? The \sty{flowfram} package provides the following
+commands that compute the distance from the \gls{typeblock} to the
+paper boundary:
+
+\begin{itemize}
+\item \cmdname{computeleftedgeodd}\verb"{"\meta{length}\verb"}"
+
+Compute the position of the left edge of the (odd) page, relative to
+the left side of the \gls{typeblock}, and store the result in
+\cmdname{length}.
+
+\item \cmdname{computeleftedgeeven}\verb"{"\meta{length}\verb"}"
+
+As above, but for even pages.
+
+\item \cmdname{computetopedge}\verb"{"\meta{length}\verb"}"
+
+Compute the top edge of the page, relative to the bottom of the
+\gls{typeblock}, and store the result in \meta{length}.
+
+\item \cmdname{computebottomedge}\verb"{"\meta{length}\verb"}"
+
+Compute the bottom edge of the page, relative to the bottom of the
+\gls{typeblock}, and store the result in \meta{length}
+
+\item \cmdname{computerightedgeodd}\verb"{"\meta{length}\verb"}"
+
+Compute the position of the right edge of the (odd) page, relative to
+the left side of the \gls{typeblock}, and store the result in
+\cmdname{length}.
+
+\item \cmdname{computerightedgeeven}\verb"{"\meta{length}\verb"}"
+
+As above, but for even pages.
+\end{itemize}
+
+Note that in all cases, \meta{length} should be a \LaTeX\ length
+command.
+
+For example, if you want to create a frame whose bottom
+left corner is one inch from the left edge of the page
+and half an inch from the bottom edge of the page (this
+assumes odd and even pages have the same margins):
+\begin{verbatim}
+% define two new lengths to represent the x and y coords
+\newlength{\myX}
+\newlength{\myY}
+% compute the distance from the typeblock to the paper edge
+\computeleftedgeodd{\myX}
+\computebottomedge{\myY}
+% Add the absolute co-ordinates to get co-ordinates
+% relative to the typeblock
+\addtolength{\myX}{1in}
+\addtolength{\myY}{0.5in}
+\end{verbatim}
+
\chapter{Modifying Frame Attributes}
\label{sec:modattr}
@@ -728,6 +809,13 @@ document is two-sided.
\gls{frame} for all odd pages on which it is defined,
if the document is two-sided.
+\item[\key{valign}=\meta{pos}] Change the vertical alignment
+of material inside a \staticordynamic. The value \meta{pos}
+may be one of: \texttt{c}, \texttt{t} or \texttt{b}.
+The default for \gls{static}s is \texttt{c}, the default
+for \gls{dynamic}s is \texttt{t}.
+This key is not available for \gls{flow}s.
+
\item[\key{label}=\meta{text}] Assign an IDL to the \gls{frame}.
(If you do not specify a label when you first define a \gls{frame}
it will be given a label identical to its \IDN.) This key is
@@ -863,8 +951,151 @@ This setting is only available for \gls{dynamic}s.
\gls{frame} by \meta{n} degrees (new to
version 1.02). Note that the \gls{bbox}es will not
appear rotated.
+
+\item[\key{shape}=\meta{shape command}] Define a shape for
+the contents of a \gls{static} or \gls{dynamic} (new
+to version 1.03). If \meta{specs} is \cmdname{relax}, it will be
+a standard rectangle. See \autoref{sec:parshape} for further
+details.
+\end{description}
+
+\section{Non-Rectangular Frames}
+\label{sec:parshape}
+
+As from version 1.03, it is now possible to specify
+non-rectangular \staticordynamic{}s (but not \gls{flow}s). Note
+that the
+\gls{bbox} will still appear as a rectangle despite the
+\gls{frame}'s shape setting. You may use either \TeX's
+\cmdname{parshape} command, or the \cmdname{shapepar}
+command defined in Donald~Arseneau's \sty{shapepar}
+package (if using \cmdname{shapepar}, remember to include
+the \sty{shapepar} package.)
+
+Note that it is better to use \cmdname{parshape} instead
+of \cmdname{shapepar} as the latter is more restrictive and
+requires more processing.
+\begin{description}
+\item[\cmdname{parshape}]
+With \cmdname{parshape} you can not have cut-outs in the middle,
+top or bottom of a frame, however it is possible to have cut-outs
+in the left or right side of the \gls{frame}. When used with the
+\key{shape} key for \staticordynamic{}s, the effects of
+\cmdname{par} and the sectioning commands are modified to allow
+the paragraph shape to extend beyond a single paragraph, and
+to allow sectioning commands (but not \cmdname{chapter}
+or \cmdname{part}).
+
+\item[\cmdname{shapepar}] With \cmdname{shapepar} you may
+have cut-outs, but you may not have any sectioning commands,
+paragraph breaks, vertical spacing or mathematics. You can
+simulate a paragraph break using \cmdname{simpar}, but this
+is not recommended. The size of the shape depends on the
+amount of text, so the shape will expand or contract as you
+add or delete text. See the \sty{shapepar} documentation for
+more details.
\end{description}
+To restore a \gls{frame} to its default rectangular setting use
+\key{shape}=\cmdname{relax}.
+
+For those unfamiliar with \TeX's \cmdname{parshape} command,
+the syntax is as follows:\\[10pt]
+\cmdname{parshape}=$n$ $i_1$ $l_1$ $i_2$ $l_2$ \ldots\ $i_n$ $l_n$\\[10pt]
+where $n$ is the number of ($i_j$ $l_j$) pairs and
+$i_j$ specifies the left indentation for the $j$th
+line and $l_j$ specifies the length of the $j$th line.
+
+The \gls{static} on the top left
+was assigned a zigzag shape using:
+\setstaticframe*{shapedb,shapedt}{pages=all}
+\begin{verbatim}
+\setstaticframe*{shapedb}{shape={\parshape=20
+0.6\linewidth 0.4\linewidth 0.5\linewidth 0.4\linewidth
+0.4\linewidth 0.4\linewidth 0.3\linewidth 0.4\linewidth
+0.2\linewidth 0.4\linewidth 0.1\linewidth 0.4\linewidth
+0pt 0.4\linewidth 0.1\linewidth 0.4\linewidth
+0.2\linewidth 0.4\linewidth 0.3\linewidth 0.4\linewidth
+0.4\linewidth 0.4\linewidth 0.5\linewidth 0.4\linewidth
+0.6\linewidth 0.4\linewidth 0.5\linewidth 0.4\linewidth
+0.4\linewidth 0.4\linewidth 0.3\linewidth 0.4\linewidth
+0.2\linewidth 0.4\linewidth 0.1\linewidth 0.4\linewidth
+0pt 0.4\linewidth 0.1\linewidth 0.4\linewidth
+}}
+\end{verbatim}
+\setstaticframe*{shapedt}{shape={\parshape=20
+0.6\linewidth 0.4\linewidth
+0.5\linewidth 0.4\linewidth
+0.4\linewidth 0.4\linewidth
+0.3\linewidth 0.4\linewidth
+0.2\linewidth 0.4\linewidth
+0.1\linewidth 0.4\linewidth
+0pt 0.4\linewidth
+0.1\linewidth 0.4\linewidth
+0.2\linewidth 0.4\linewidth
+0.3\linewidth 0.4\linewidth
+0.4\linewidth 0.4\linewidth
+0.5\linewidth 0.4\linewidth
+0.6\linewidth 0.4\linewidth
+0.5\linewidth 0.4\linewidth
+0.4\linewidth 0.4\linewidth
+0.3\linewidth 0.4\linewidth
+0.2\linewidth 0.4\linewidth
+0.1\linewidth 0.4\linewidth
+0pt 0.4\linewidth
+0.1\linewidth 0.4\linewidth
+}}
+
+\begin{staticcontents*}{shapedt}
+This is an example of a static frame with a non-rectangular
+shape. This zigzag shape was specified using the \key{shape}
+key setting in \cmdname{setstaticframe}. The \cmdname{parshape}
+command was used to set the shape.
+
+Using the \key{shape} key rather than explicitly using
+\cmdname{parshape} within the \env{staticcontents} environment
+means that I can have paragraph breaks, sectioning commands,
+and even some mathematics
+\begin{equation}
+E=mc^2
+\end{equation}
+whilst retaining the shape.
+\end{staticcontents*}
+
+The syntax for \cmdname{shapepar} is more complicated, see
+the \sty{shapepar} documentation for more details. In general:\\[10pt]
+\cmdname{shapepar}\{\meta{shape specs}\}\\[10pt]
+The \sty{shapepar} package has four predefined shapes:
+\cmdname{squareshape}, \cmdname{diamondshape},
+\cmdname{heartshape} and \cmdname{nutshape}.
+
+The \gls{static} on the bottom left was assigned a heart shape
+using the command:
+\begin{verbatim}
+\setstaticframe*{shapedb}{shape={\shapepar\heartshape}}
+\end{verbatim}
+To reset the frame back to its original rectangular shape
+do:
+\begin{verbatim}
+\setstaticframe*{shapedb}{shape=\relax}
+\end{verbatim}
+
+\afterpage{\setstaticframe*{shapedt,shapedb}{pages=none}}
+\setstaticframe*{shapedb}{shape={\shapepar\heartshape}}
+\begin{staticcontents*}{shapedb}
+This example has a more complicated shape that can not
+be generated using \TeX's \cmdname{parshape} command, so
+\cmdname{shapepar} was used instead. Note that this document
+must include the \sty{shapepar} package in this instance,
+whereas no extra packages are required to use \cmdname{parshape}.
+No mathematics or sectioning commands are allowed here.
+The shape will expand as more text is added to it.
+\end{staticcontents*}
+
+The \sty{flowfram} package currently does not support any other
+paragraph shape making commands. Any other commands would
+have to be used explicitly within the contents of the frame.
+
\chapter{Predefined Layouts}
\label{sec:layouts}
@@ -915,8 +1146,8 @@ A more general form of \cmdname{twocolumninarea} making
\section{Column Styles with an Additional Frame}
-As well as the column style of \gls{flow}s defined in
-the previous section, it is also possible to define
+As well as the column style of \gls{flow}s defined
+above, it is also possible to define
\meta{n} columns with an additional frame spanning either
above or below them. There will be a vertical gap of
approximately\footnote{It may not be exact, as the \gls{flow}s
@@ -1276,7 +1507,7 @@ To just change the settings for the thumbtab index, use
\cmdname{setthumbtabindex}\verb"{"\meta{n}\verb"}{"\meta{key value list}\verb"}". The \meta{key value list} for both these
commands is the same as that for \cmdname{setdynamicframe}.
-By default, the thumbtabs are given a grey background. In this
+By default, the thumbtabs have a grey background. In this
document, I have used:
\begin{verbatim}
\setthumbtab{1}{backcolor=[rgb]{0.15,0.15,1}}
@@ -1381,6 +1612,20 @@ This is the width of the \gls{frame}'s border, if using
a border given by a \useGlosentry{fcmd}{frame}
\useGlosentry{fcmd}{making command} that uses \cmdname{fboxsep}
to set its border width (e.g.\ \cmdname{fbox}).
+
+\item \cmdname{sdfparindent}
+This is the paragraph indentation within \staticordynamic{}s.
+The default value is 0pt.
+
+\item \cmdname{vcolumnsep}
+This is the approximate vertical distance between the top frame
+and the column frames when using \cmdname{Ncolumnhead} etc.
+(The height of the \gls{flow} may be adjusted to make it
+an integer multiple of \cmdname{baselineskip}.)
+
+\item \cmdname{columnsep}
+This is the horizontal distance between the column frames
+when using \cmdname{Ncolumn} or \cmdname{Ncolumnhead} etc
\end{itemize}
\chapter{Troubleshooting}
@@ -1428,16 +1673,18 @@ for some arbitrary format.
\item Can I have an arbitrarily shaped \gls{frame}?
\label{itm:parshape}
-No. All frames are rectangular, however within a frame
-you may use commands such as \TeX's \cmdname{parshape} to
-create a non rectangular paragraph. (See the sample file
-\texttt{news.tex} for an example.)
+You can assign certain irregular shapes to \staticordynamic{}s,
+using the \key{shape} key (see \autoref{sec:parshape}).
+Note that the \gls{bbox} will still appear as a rectangle with
+the dimensions of the given \gls{frame} which may not correspond
+to the assigned shape.
+This function is not available for \gls{flow}s.
\item Why has the text from my \gls{flow} appeared in a
\gls{static} or \gls{dynamic}?
Assuming you haven't inadvertently set that text as the contents
-of the static or dynamic frame, the frames are most likely
+of the \staticordynamic, the frames are most likely
overlapping (see \autoref{sec:stacking}).
In an attempt to clarify what's going on, suppose you have
defined a \gls{static}, a \gls{dynamic} and two \gls{flow}s. The
@@ -1482,6 +1729,26 @@ overfull hbox that's causing the text to poke out the side of the
\item Why do I get lots of overfull hbox messages?
Probably because you have narrow \gls{frame}s.
+
+\item What happens if I use a command or environment
+that switches to two-column mode (e.g. \env{theindex})?
+
+As from version 1.01, any \cmdname{onecolumn} or
+\cmdname{twocolumn} commands that occur outside of the
+preamble will print the contents of the optional argument,
+and issue a warning. It is recommended that you set up
+your own frames for use in the index.
+
+\item How do I change the vertical alignment
+of material inside a \staticordynamic?
+
+Use the \key{valign} key in \cmdname{setstaticframe} or
+\cmdname{setdynamicframe} (new to version 1.03).
+
+\item\label{itm:absval} How do I compute the distance from the edge
+of the page instead of the typeblock?
+
+See \autoref{sec:typeblockloc}.
\end{enumerate}
\section{Unexpected Output}
@@ -1510,8 +1777,18 @@ offset using the \texttt{offset} key (see \autoref{sec:modattr}).
\item I have a vertical white strip along the right hand side
of every page.
-This occurs if you use \appname{ps2pdf} of \appname{dvipdf}.
-Try using \appname{pdflatex} instead.
+This can happen if you have, say, an A4 document, and ghostscript
+has letter as the default paper size. You can change the default
+paper size by editing the file \verb|gs_init.ps|. Change:
+\begin{verbatim}
+% Optionally choose a default paper size other than U.S. letter.
+% (a4)
+\end{verbatim}
+to:
+\begin{verbatim}
+% Optionally choose a default paper size other than U.S. letter.
+(a4)
+\end{verbatim}
\item I don't have any output.
@@ -1520,7 +1797,8 @@ frames onto the page until it has finished putting text
into the \gls{flow}s. So if there is no text to go in the
\gls{flow}s it won't output the page. If you only want the
\gls{static}s or \gls{dynamic}s filled in, and nothing
-outside of them, just do \verb|\mbox{}|. This will put
+outside of them, just do \verb|\mbox{}\finishthispage|.
+This will put
an invisible something with zero area into your
\gls{flow}, but it's enough to convince \TeX\ that the
document contains some text.
@@ -1529,6 +1807,36 @@ document contains some text.
See the previous answer.
+\item There is no paragraph indentation inside my
+\staticordynamic{}s.
+
+The paragraph indentation in \staticordynamic{}s is governed
+by the length \cmdname{sdfparindent} which is set to 0pt by
+default. To make the indentation the same as that used by
+\gls{flow}s place the following in the preamble:
+\begin{verbatim}
+\setlength{\sdfparindent}{\parindent}
+\end{verbatim}
+
+\item My section numbering is in the wrong order
+
+Remember that the contents of the \gls{dynamic}s are not set
+until the page is shipped out, and the contents will be set
+in the order of \IDN, so if you have any sectioning commands
+occuring within \gls{dynamic}s, they may not be set in the same
+order as they are in your input file.
+
+\item The contents of my \staticordynamic\ have shifted
+to the left when I used \cmdname{parshape}
+
+This will happen if your \cmdname{parshape} specification
+exceeds the linewidth. For example:
+\begin{verbatim}
+\parshape=1 0.4\linewidth 0.7\linewidth
+\end{verbatim}
+This specifies a line with overall length
+\verb"1.1\linewidth" which is too long.
+
\end{enumerate}
\section{Error Messages}
@@ -1583,8 +1891,7 @@ or \texttt{false}.
\item \verb/Key 'clear' not available/
-The \texttt{clear} key is only available for static
-and dynamic \gls{frame}s.
+The \texttt{clear} key is only available for \staticordynamic{}s.
\item \verb/Key 'style' not available/
@@ -1594,6 +1901,10 @@ The \texttt{style} key is only available for \gls{dynamic}s.
The \texttt{margin} key is only available for \gls{flow}s.
+\item \verb/Key 'shape' not available/
+
+The \texttt{shape} key is only available for \staticordynamic{}s.
+
\item \verb/Dynamic frame style '/\meta{style}\verb+' not defined+
The specified style \meta{style} must be the name of a command
@@ -1609,8 +1920,8 @@ the initial backslash.
\item \verb/Not in outer par mode/
You can not have floats (such as figures, tables or marginal
-notes) in \gls{static}s or \gls{dynamic}s. If you want
-a figure or table within a \gls{static} or \gls{dynamic}
+notes) in \staticordynamic{}s. If you want
+a figure or table within a \staticordynamic\
use \env{staticfigure} or \env{statictable}.
\item \verb/Somethings wrong---maybe missing \item/
@@ -1621,22 +1932,6 @@ wrong with the toc (table of contents), ttb (thumbtab)
or aux (auxiliary) files in the previous run. Try deleting
them, and try again.
-\item \verb/Undefined control sequence/
-\begin{verbatim}
-\color ...vevmode \csname fi\endcsname }\@ldc@l@r
-\end{verbatim}
-
-This seems to happen when the \texttt{draft} option is used without
-a colour package, in conjunction with PDF\LaTeX. It
-doesn't seem to happen with \LaTeX. For some reason with
-PDF\LaTeX\ the \cmdname{color} command is defined in the
-begin document hook, but not the command
-\cmdname{@ldc@l@r} which is the cause of this error
-message. You can avoid this error message by including
-the \sty{color} package. You can use the
-\texttt{monochrome} option if you don't want any colour
-in your document.
-
\end{enumerate}
\disablethumbtabs
diff --git a/Master/texmf-dist/doc/latex/flowfram/flowfram.pdf b/Master/texmf-dist/doc/latex/flowfram/flowfram.pdf
index 16c8158c4f4..e2996344b57 100644
--- a/Master/texmf-dist/doc/latex/flowfram/flowfram.pdf
+++ b/Master/texmf-dist/doc/latex/flowfram/flowfram.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdf b/Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdf
index 20e7a020554..f02e4cb97b4 100644
--- a/Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdf
+++ b/Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex b/Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex
index 4bb569993dc..f5f1fdedd18 100644
--- a/Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex
+++ b/Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex
@@ -81,8 +81,10 @@ or magazines or any other form of document that does not
conform to the standard one or two column layout.
This is a modified version of the manual for the \textsl{flowfram} package.
-It is intended to illustrated what can be done. See the full manual for
-a comprehensive description.
+It is intended to illustrated what can be done. See the full
+manual (ffuserguide.pdf) for
+a comprehensive description, as some parts of this document
+may now be out of date.
If the columns are very narrow, it may be better to
use \cmdname{raggedright}, otherwise \TeX\ may have a
problem working out the line breaks.
diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/egg.png b/Master/texmf-dist/doc/latex/flowfram/samples/egg.png
index 0f12191056a..f67b013c345 100644
--- a/Master/texmf-dist/doc/latex/flowfram/samples/egg.png
+++ b/Master/texmf-dist/doc/latex/flowfram/samples/egg.png
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/news.pdf b/Master/texmf-dist/doc/latex/flowfram/samples/news.pdf
index 1d33cec89ca..2a9dd9cc99d 100644
--- a/Master/texmf-dist/doc/latex/flowfram/samples/news.pdf
+++ b/Master/texmf-dist/doc/latex/flowfram/samples/news.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/news.tex b/Master/texmf-dist/doc/latex/flowfram/samples/news.tex
index 0c2c6f341b8..bb2d8192f5a 100644
--- a/Master/texmf-dist/doc/latex/flowfram/samples/news.tex
+++ b/Master/texmf-dist/doc/latex/flowfram/samples/news.tex
@@ -115,6 +115,7 @@
\onecolumn[>1] % for any text that falls off the last page
\setcounter{secnumdepth}{0}
+\pagestyle{empty}
\begin{document}
diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/news2.pdf b/Master/texmf-dist/doc/latex/flowfram/samples/news2.pdf
new file mode 100644
index 00000000000..22223c09857
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/flowfram/samples/news2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/news2.tex b/Master/texmf-dist/doc/latex/flowfram/samples/news2.tex
new file mode 100644
index 00000000000..c5e404241d9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/flowfram/samples/news2.tex
@@ -0,0 +1,231 @@
+\documentclass[12pt]{article}
+
+\usepackage{graphicx}
+\usepackage{color}
+\usepackage{flowfram}
+\usepackage[a4paper,margin=20mm]{geometry}
+
+% define lengths to help compute positions
+\newlength\leftX
+\newlength\leftY
+\newlength\leftH
+\newlength\leftW
+
+\newlength\rightX
+\newlength\rightY
+\newlength\rightH
+\newlength\rightW
+
+% Create a static frame to put title in
+\setlength{\leftH}{3cm}
+\setlength{\leftY}{\textheight}
+\addtolength{\leftY}{-\leftH}
+
+\newstaticframe[1]{\textwidth}{\leftH}{0pt}{\leftY}[title]
+
+% Create left hand frame. This will have an L shape
+
+\setlength{\leftH}{13cm}
+\adjustheight{\leftH}
+\addtolength{\leftY}{-\leftH}
+
+\newstaticframe[1]{\textwidth}{\leftH}{0pt}{\leftY}[L]
+\setstaticframe*{L}{shape={\parshape=24
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt 0.5\linewidth
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+}}
+
+% egg picture
+
+\addtolength{\rightY}{\leftY}
+\addtolength{\rightY}{73mm}
+\setlength{\rightW}{1.1in}
+\setlength{\rightH}{1.5in}
+\setlength{\rightX}{\textwidth}
+\addtolength{\rightX}{-\rightW}
+\newstaticframe[1]{\rightW}{\rightH}{\rightX}{\rightY}[egg]
+
+% set contents
+\setstaticcontents*{egg}{\includegraphics[scale=2]{egg}}
+
+% Right hand static frame
+
+\setlength{\rightX}{0.5\textwidth}
+\addtolength{\rightX}{\columnsep}
+\setlength{\rightW}{\textwidth}
+\addtolength{\rightW}{-\rightX}
+\setlength{\rightY}{\leftY}
+\addtolength{\rightY}{2.8cm}
+\setlength{\rightH}{\leftH}
+\addtolength{\rightH}{-2.8cm}
+
+\newstaticframe[1]{\rightW}{\rightH}{\rightX}{\rightY}[right]
+
+\setstaticframe*{right}{shape={\parshape=15
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+0pt 0.75\linewidth
+0pt 0.65\linewidth
+0pt 0.75\linewidth
+0pt 0.8\linewidth
+0pt 0.8\linewidth
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+0pt \linewidth
+}}
+
+% insert vertical and horizontal rules, can't use
+% \insertrule as left hand
+% frame is actually the width of the typeblock
+\addtolength{\rightX}{-0.5\columnsep}
+\newstaticframe[1]{0pt}{\rightH}{\rightX}{\rightY}[Lrule]
+\setstaticcontents*{Lrule}{\makebox[0pt][l]{%
+\rule{\columnseprule}{\rightH}\rule{\rightW}{\columnseprule}}}
+
+% middle heading
+
+\setlength{\leftH}{2cm}
+\addtolength{\leftY}{-\leftH}
+
+\newstaticframe[1]{\textwidth}{\leftH}{0pt}{\leftY}[midhead]
+
+% insert horizontal rule
+\inserthrule*{static}{L}{static}{midhead}
+
+% flow frames
+\twocolumninarea{\textwidth}{\leftY}{0pt}{0pt}
+
+% static frame for sheep picture
+
+\newstaticframe[1]{1.6in}{1.6in}{0pt}{0pt}[sheep]
+
+% set contents
+\setstaticcontents*{sheep}{\includegraphics[scale=2]{sheep}}
+
+\setcounter{secnumdepth}{0}
+\setlength{\sdfparindent}{\parindent}
+
+\begin{document}
+\begin{staticcontents*}{title}
+\begin{center}
+\bfseries\Huge
+Fairy Tale Times
+\end{center}
+\hfill Issue 2. 7 December 2005.
+\end{staticcontents*}
+
+\begin{staticcontents*}{L}
+\section{Killer Wolf on the Loose}
+
+The authorites are warning of a killer wolf on the
+loose. He has so far devoured an old grandmother and
+two pig brothers. He is described as being furry with
+big eyes and big teeth.
+
+On Monday this week he broke into a house, and devoured
+an old lady. He then disguised himself as the old lady
+in order to deceive her granddaughter. Luckily for the little
+girl a woodsman arrived in time to rescue her. Parents are
+being cautioned not to let their children wander about on
+their own, and to remind them not to talk to strangers.
+
+The next day the wolf struck again, this time targeting two
+pig brothers who had most incautiously made their dwellings
+on the cheap using inadequate materials. The wolf also made
+an attempt on the third pig brother, but was unable to break
+into his house.
+
+Police are appealing to the public for witnesses, and remind
+people to keep their doors securely fastened at all times.
+``Always ask to see identification,'' said one police advisor,
+``and invest in improving the general security of your property.''
+\end{staticcontents*}
+
+\begin{staticcontents*}{right}
+\section{Tragic Wall Accident}
+
+An egg person tragically fell from a six foot wall yesterday
+afternoon and was smash\-ed to pieces. The king's cavalry rushed
+to the scene, but regretted that they were unable to help him.
+
+Humpty Dumpty was believed to be sitting on the wall when he fell. Police have ruled out foul play, but
+are advising people not to play on high walls, particularly
+those vulnerable members of the population suffering from
+eggshell syndrome.
+
+\small\em
+%Wall related incidents this year: page 3
+%
+Exclusive interview with one of the King's men on page 6
+\end{staticcontents*}
+
+\begin{staticcontents*}{midhead}
+\section{Relief as Missing Sheep Finally Return Home}
+\end{staticcontents*}
+
+There was much celebration yesterday morning when Little Bo
+Peep's sheep finally returned home. They had been missing
+for more than a week.
+
+``I just didn't know where to find them,'' the shepherdess
+stated, ``but I was told to leave them alone and they'd come
+home.''
+
+\parshape=8
+0pt \linewidth
+0pt \linewidth
+0.3\linewidth 0.7\linewidth
+0.3\linewidth 0.7\linewidth
+0.25\linewidth 0.75\linewidth
+0.25\linewidth 0.75\linewidth
+0pt \linewidth
+0pt \linewidth
+Unusual advice perhaps, but it seems to have worked
+as they did indeed come home. Eye witnesses reported that their
+tails were wagging behind them.
+``I'm just so happy they've come home,'' Little Bo Peep said
+in a press conference yesterday afternoon.
+The sheep themselves made no comment, and police are%
+\framebreak\parshape=0
+still trying to determine what happened to them.
+The big bad wolf is reportedly helping them with their inquiries.
+
+\noindent\hrulefill
+
+This is a sample document illustrating the
+flowfram package. It uses \TeX's \verb|\parshape| command
+to create irregularly shaped paragraphs. This can be a complicated
+and somewhat tiresome task, and is generally not recommended.
+Using the shapepar package provides you with more intricate
+shapes, but as its documentation says, it is not intended
+for use in large documents.
+
+\hfill Nicola Talbot
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/poster.pdf b/Master/texmf-dist/doc/latex/flowfram/samples/poster.pdf
index d482fe71644..f17725bcfea 100644
--- a/Master/texmf-dist/doc/latex/flowfram/samples/poster.pdf
+++ b/Master/texmf-dist/doc/latex/flowfram/samples/poster.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/poster.tex b/Master/texmf-dist/doc/latex/flowfram/samples/poster.tex
index 84354f43019..05fe2131f7d 100644
--- a/Master/texmf-dist/doc/latex/flowfram/samples/poster.tex
+++ b/Master/texmf-dist/doc/latex/flowfram/samples/poster.tex
@@ -90,9 +90,10 @@
\end{staticfigure}
\end{staticcontents*}
-This is a modified version of the manual for the \sty{flowfram} package.
-It is intended to illustrated what can be done. See the full manual for
-a comprehensive description. The commands used to define the frames for
+This is a modified version of the manual for the \sty{flowfram}
+package. It is intended to illustrated what can be done. See the
+full manual (ffuserguide.pdf) for
+a comprehensive description, as this may now be out of date. The commands used to define the frames for
this document are shown in Figure~\ref{fig:thisdoc}.
If the columns are very narrow, it may be better to
use \cmdname{raggedright}, otherwise \TeX\ may have a
diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/sheep.png b/Master/texmf-dist/doc/latex/flowfram/samples/sheep.png
index 297c6ce77b5..d7cb3517613 100644
--- a/Master/texmf-dist/doc/latex/flowfram/samples/sheep.png
+++ b/Master/texmf-dist/doc/latex/flowfram/samples/sheep.png
Binary files differ
diff --git a/Master/texmf-dist/source/latex/flowfram/flowfram.dtx b/Master/texmf-dist/source/latex/flowfram/flowfram.dtx
index 2cc5a42fe35..644416a095f 100644
--- a/Master/texmf-dist/source/latex/flowfram/flowfram.dtx
+++ b/Master/texmf-dist/source/latex/flowfram/flowfram.dtx
@@ -1,12 +1,12 @@
%\iffalse
-% flowfram.dtx generated using makedtx version 0.9b (c) Nicola Talbot
+% flowfram.dtx generated using makedtx version 0.91b (c) Nicola Talbot
% Command line args:
% -src "flowfram.sty\Z=>flowfram.sty"
% -doc "docstub.tex"
% -author "Nicola Talbot"
% -dir "source"
% flowfram
-% Created on 2005/11/24 14:42
+% Created on 2007/3/9 11:23
%\fi
%\iffalse
%<*package>
@@ -29,23 +29,36 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2005 Nicola Talbot, all rights reserved.
+% Copyright (C) 2007 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
\documentclass{ltxdoc}
-\CheckSum{7647}
+\CheckSum{8125}
\PageIndex
\usepackage{url}
+\usepackage[colorlinks,hyperindex=false,
+pdfauthor={Nicola L C Talbot},
+pdftitle={Documented Source Code for flowfram.sty}]{hyperref}
\usepackage[style=altlist,toc,number=none]{glossary}[2005/07/15]
+\MakeShortVerb"
+\DeleteShortVerb|
+
\newcommand{\sty}[1]{\textsf{#1}}
\newcommand{\env}[1]{\textsf{#1}}
\newcommand{\cmdname}[1]{\texttt{\symbol{92}#1}}
-\MakeShortVerb"
+\renewcommand{\usage}[1]{\textit{\hyperpage{#1}}}
+\renewcommand{\main}[1]{\hyperpage{#1}}
+\newcommand{\see}[2]{\emph{see} #1}
+\makeatletter
+\def\index@prologue{\section*{Index}
+\addcontentsline{toc}{section}{Index}}
+\makeatother
+
\storeglosentry{typeblock}{name=typeblock,description={The
area of the page where the main body of the text goes.
@@ -110,10 +123,10 @@ refer to the frame by label instead of by its IDN.}}
\end{document}
%</driver>
%\fi
-%\def\filedate{24th November 2005}
-%\def\fileversion{1.02}
+%\def\filedate{9th March 2007}
+%\def\fileversion{1.07}
%\def\filename{flowfram.dtx}
-%\def\docdate{24th November 2005}
+%\def\docdate{9th March 2007}
%
%\title{Documented Source Code for flowfram.sty v\fileversion}
%\author{Nicola L. C. Talbot}
@@ -131,14 +144,16 @@ refer to the frame by label instead of by its IDN.}}
%
%
%\section{The Code}
+%\iffalse
% \begin{macrocode}
%<*flowfram.sty>
% \end{macrocode}
+%\fi
% \subsection{Package Initialisation}
% Declare package, and identify it as a \LaTeXe\ package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{flowfram}[2005/11/24 v1.02]
+\ProvidesPackage{flowfram}[2007/03/09 v1.07]
% \end{macrocode}
% Load packages needed by this package
% \begin{macrocode}
@@ -146,6 +161,7 @@ refer to the frame by label instead of by its IDN.}}
\RequirePackage{keyval}
\RequirePackage{graphics}
\RequirePackage{afterpage}
+\@ifundefined{@ldc@l@r}{\RequirePackage{color}}{}
% \end{macrocode}
% The colour of the \gls{bbox} borders when the draft
% option is specified is given by the commands:
@@ -322,10 +338,8 @@ refer to the frame by label instead of by its IDN.}}
% \begin{macrocode}
\@ifundefined{chapter}{}{%
\newcommand{\chapterfirstpagestyle}{plain}
-
\let\@ff@OLD@chapter\@chapter
\let\@ff@OLD@schapter\@schapter
-
\renewcommand{\@chapter}{%
\thispagestyle{\chapterfirstpagestyle}\@ff@OLD@chapter}
\renewcommand{\@schapter}{%
@@ -361,6 +375,12 @@ refer to the frame by label instead of by its IDN.}}
\newlength\@ff@tmp@x@even
\newlength\@ff@tmp@y
% \end{macrocode}
+% Define a length to govern paragraph indentation within
+% static and dynamic frames\DescribeMacro{\sdfparindent}.
+% This is 0pt by default.
+% \begin{macrocode}
+\newlength\sdfparindent
+% \end{macrocode}
% \subsection{Flow Frames}
% Set up default lengths. The gap between the text and the
% border is given by:\DescribeMacro{\flowframesep}
@@ -396,20 +416,20 @@ refer to the frame by label instead of by its IDN.}}
\usedframebreaktrue
{\parfillskip=0pt\pagebreak[#1]\parskip=0pt\par\noindent}}
% \end{macrocode}
-% The commands "\newpage", "\clearpage" and
+% The commands "\newpage" and
% "\pagebreak" can be used to move on to the next
% \gls{flow}, but to finish the entire page, use
% "\finishthispage".\DescribeMacro{\finishthispage}
% \begin{macrocode}
\newcommand{\finishthispage}{%
\@colN=\c@thisframe
-\clearpage
+\newpage
\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax
\@ff@chckifthispg{\c@page}{\@colN}%
\if@notthiscol\else
-\mbox{}\vfill\clearpage%
-\fi}
-}
+\mbox{}\newpage%
+\fi
+}}
% \end{macrocode}
% Modify the definition of "\cleardoublepage". This may
% or may not be defined so use "\def".
@@ -501,21 +521,24 @@ refer to the frame by label instead of by its IDN.}}
% \begin{macrocode}
\newcommand{\@n@wflowframe}{%
\global\advance\c@maxflow by 1\relax
-\expandafter\global\expandafter\newif\csname ifcolumnframe\romannumeral\c@maxflow\endcsname
+\expandafter\global\expandafter
+\newif\csname ifcolumnframe\romannumeral\c@maxflow\endcsname
\@ifstar\@snewflowframe\@newflowframe
}
% \end{macrocode}
% Starred version sets boolean flag to indicate a border
% \begin{macrocode}
\newcommand{\@snewflowframe}{%
-\expandafter\global\expandafter\let\csname ifcolumnframe\romannumeral\c@maxflow\endcsname\iftrue
+\expandafter\global\expandafter
+\let\csname ifcolumnframe\romannumeral\c@maxflow\endcsname\iftrue
\@@newflowframe}
% \end{macrocode}
% The unstarred version unsets boolean flag to indicate
% no border.
% \begin{macrocode}
\newcommand{\@newflowframe}{%
-\expandafter\global\expandafter\let\csname ifcolumnframe\romannumeral\c@maxflow\endcsname\iffalse
+\expandafter\global\expandafter
+\let\csname ifcolumnframe\romannumeral\c@maxflow\endcsname\iffalse
\@@newflowframe}
% \end{macrocode}
% Now get on with initialising the \gls{flow}. By default, it
@@ -523,27 +546,49 @@ refer to the frame by label instead of by its IDN.}}
% can override this.
% \begin{macrocode}
\newcommand{\@@newflowframe}[5][all]{%
-\expandafter\global\expandafter\newbox\csname column\romannumeral\c@maxflow\endcsname
-\expandafter\global\expandafter\newlength\csname colwidth\romannumeral\c@maxflow\endcsname
-\expandafter\global\expandafter\newlength\csname colheight\romannumeral\c@maxflow\endcsname
-\expandafter\global\expandafter\newlength\csname col@\romannumeral\c@maxflow @posx\endcsname
-\expandafter\global\expandafter\newlength\csname col@\romannumeral\c@maxflow @posy\endcsname
-\expandafter\global\expandafter\setlength\csname colwidth\romannumeral\c@maxflow\endcsname{#2}
-\expandafter\global\expandafter\setlength\csname colheight\romannumeral\c@maxflow\endcsname{#3}
-\expandafter\global\expandafter\setlength\csname col@\romannumeral\c@maxflow @posx\endcsname{#4}
-\expandafter\global\expandafter\setlength\csname col@\romannumeral\c@maxflow @posy\endcsname{#5}
-\expandafter\global\expandafter\newlength\csname col@\romannumeral\c@maxflow @evenx\endcsname
-\expandafter\global\expandafter\newlength\csname col@\romannumeral\c@maxflow @eveny\endcsname
-\expandafter\global\expandafter\setlength\csname col@\romannumeral\c@maxflow @evenx\endcsname{#4}
-\expandafter\global\expandafter\setlength\csname col@\romannumeral\c@maxflow @eveny\endcsname{#5}
-\expandafter\gdef\csname @ff@frametype@\romannumeral\c@maxflow\endcsname{fbox}%
-\expandafter\gdef\csname @ff@col@\romannumeral\c@maxflow\endcsname{\flowframecol}
-\expandafter\gdef\csname @ff@txtcol@\romannumeral\c@maxflow\endcsname{\flowframetextcol}
-\expandafter\gdef\csname @ff@backcol@\romannumeral\c@maxflow\endcsname{{none}}
-\expandafter\gdef\csname @ff@pages@\romannumeral\c@maxflow\endcsname{#1}
-\expandafter\gdef\csname @ff@offset@\romannumeral\c@maxflow\endcsname{compute}
-\expandafter\gdef\csname @ff@angle@\romannumeral\c@maxflow\endcsname{0}%
-\expandafter\gdef\csname @ff@margin@\romannumeral\c@maxflow\endcsname{right}
+\expandafter\global\expandafter
+\newbox\csname column\romannumeral\c@maxflow\endcsname
+\expandafter\global\expandafter
+\newlength\csname colwidth\romannumeral\c@maxflow\endcsname
+\expandafter\global\expandafter
+\newlength\csname colheight\romannumeral\c@maxflow\endcsname
+\expandafter\global\expandafter
+\newlength\csname col@\romannumeral\c@maxflow @posx\endcsname
+\expandafter\global\expandafter
+\newlength\csname col@\romannumeral\c@maxflow @posy\endcsname
+\expandafter\global\expandafter
+\setlength\csname colwidth\romannumeral\c@maxflow\endcsname{#2}
+\expandafter\global\expandafter
+\setlength\csname colheight\romannumeral\c@maxflow\endcsname{#3}
+\expandafter\global\expandafter
+\setlength\csname col@\romannumeral\c@maxflow @posx\endcsname{#4}
+\expandafter\global\expandafter
+\setlength\csname col@\romannumeral\c@maxflow @posy\endcsname{#5}
+\expandafter\global\expandafter
+\newlength\csname col@\romannumeral\c@maxflow @evenx\endcsname
+\expandafter\global\expandafter
+\newlength\csname col@\romannumeral\c@maxflow @eveny\endcsname
+\expandafter\global\expandafter
+\setlength\csname col@\romannumeral\c@maxflow @evenx\endcsname{#4}
+\expandafter\global\expandafter
+\setlength\csname col@\romannumeral\c@maxflow @eveny\endcsname{#5}
+\expandafter
+\gdef\csname @ff@frametype@\romannumeral\c@maxflow\endcsname{fbox}%
+\expandafter
+\gdef\csname @ff@col@\romannumeral\c@maxflow\endcsname{\flowframecol}
+\expandafter
+\gdef\csname @ff@txtcol@\romannumeral\c@maxflow\endcsname{%
+\flowframetextcol}
+\expandafter
+\gdef\csname @ff@backcol@\romannumeral\c@maxflow\endcsname{{none}}
+\expandafter
+\gdef\csname @ff@pages@\romannumeral\c@maxflow\endcsname{#1}
+\expandafter
+\gdef\csname @ff@offset@\romannumeral\c@maxflow\endcsname{compute}
+\expandafter
+\gdef\csname @ff@angle@\romannumeral\c@maxflow\endcsname{0}%
+\expandafter
+\gdef\csname @ff@margin@\romannumeral\c@maxflow\endcsname{right}
\ifnum\c@thisframe=0\relax
\ifthenelse{\equal{#1}{all}\TE@or\equal{#1}{odd}}{%
\c@thisframe=\c@maxflow
@@ -562,7 +607,8 @@ refer to the frame by label instead of by its IDN.}}
\fi
}}}%
\fi
-\@ifnextchar[{\@s@tflowframeid{\c@maxflow}}{\@s@tflowframeid{\c@maxflow}[\number\c@maxflow]}}
+\@ifnextchar[{\@s@tflowframeid{\c@maxflow}}{%
+\@s@tflowframeid{\c@maxflow}[\number\c@maxflow]}}
% \end{macrocode}
% If square brackets occur after "\newflowframe", take
% the contents to be the label, otherwise the label will be
@@ -571,7 +617,8 @@ refer to the frame by label instead of by its IDN.}}
\def\@s@tflowframeid#1[#2]{%
\edef\ff@label{#2}%
\@ff@checkuniqueidl{#1}{\ff@label}%
-\expandafter\xdef\csname @col@id@\romannumeral#1\endcsname{\ff@label}%
+\expandafter
+\xdef\csname @col@id@\romannumeral#1\endcsname{\ff@label}%
}
% \end{macrocode}
% Check \IDL{} "#2" for \gls{flow} "#1" is unique
@@ -582,7 +629,8 @@ refer to the frame by label instead of by its IDN.}}
\advance\@colN by 1\relax
\ifnum\@colN=#1\relax
\else
-\ifthenelse{\equal{#2}{\csname @col@id@\romannumeral\@colN\endcsname}}{%
+\ifthenelse{\equal{#2}{%
+\csname @col@id@\romannumeral\@colN\endcsname}}{%
\PackageError{flowfram}{Flow frame IDL '#2' already defined}{%
You can't assign this label, as it is already defined
for flow frame \number\@colN}}{}%
@@ -749,6 +797,18 @@ boolean}{You can only specify the values 'true' or 'false'}}}
\PackageError{flowfram}{Missing value for 'style' key}{}}{}%
\ifthenelse{\equal{#1}{none}}{\def\ff@style{relax}}{\def\ff@style{#1}}}
% \end{macrocode}
+% This key is only for \gls{static}s and \gls{dynamic}s.
+% \begin{macrocode}
+\define@key{flowframe}{shape}{\def\ff@shape{#1}%
+}
+% \end{macrocode}
+% This key is only for \gls{static}s and \gls{dynamic}s.
+% \begin{macrocode}
+\define@key{flowframe}{valign}{\ifthenelse{\equal{#1}{c} \or
+\equal{#1}{t} \or \equal{#1}{b}}{\def\ff@valign{#1}}{%
+\PackageError{flowfram}{Invalid value for 'valign' key}{You
+may only specify 'c', 't' or 'b'}}}
+% \end{macrocode}
% Provide a command to change the settings for all flow
% frames. This just iterates through all the \gls{flow}s,
% and sets each one in turn.
@@ -809,10 +869,11 @@ boolean}{You can only specify the values 'true' or 'false'}}}
% \begin{macrocode}
\newcommand{\@@setflowframe}[2]{%
\def\ff@frame{}\def\ff@width{}\def\ff@height{}\def\ff@margin{}%
-\def\ff@x{}\def\ff@y{}\def\ff@frametype{}\def\ff@col{}\def\ff@style{}%
+\def\ff@x{}\def\ff@y{}\def\ff@frametype{}\def\ff@col{}%
+\def\ff@valign{}\def\ff@style{}%
\def\ff@txtcol{}\def\ff@clear{}\def\ff@offset{}\def\ff@pages{}%
\def\ff@label{}\def\ff@backcol{}\def\ff@evenx{}\def\ff@eveny{}%
-\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}%
+\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}\def\ff@shape{\empty}%
\setkeys{flowframe}{#2}%
\ifthenelse{\equal{\ff@frame}{}}{}{%
\setboolean{columnframe\romannumeral#1}{\ff@frame}}%
@@ -873,6 +934,14 @@ boolean}{You can only specify the values 'true' or 'false'}}}
\ifthenelse{\equal{\ff@style}{}}{}{%
\PackageError{flowfram}%
{Key 'style' not available for flow frames}{}}%
+\if\ff@shape\empty
+\else
+\PackageError{flowfram}%
+{Key 'shape' not available for flow frames}{}%
+\fi
+\ifthenelse{\equal{\ff@valign}{}}{}{%
+\PackageError{flowfram}%
+{Key 'valign' not available for flow frames}{}}%
}
% \end{macrocode}
%\DescribeMacro{\ffswapoddeven}
@@ -1058,6 +1127,8 @@ compute}%
\expandafter
\gdef\csname @sf@angle@\romannumeral\c@maxstatic\endcsname{0}%
\expandafter
+\gdef\csname @sf@shape@\romannumeral\c@maxstatic\endcsname{\relax}%
+\expandafter
\def\csname @sf@frametype@\romannumeral\c@maxstatic\endcsname{%
fbox}%
\newboolean{@sf@clear@\romannumeral\c@maxstatic}%
@@ -1184,9 +1255,11 @@ id '#1'}{}\fi}
\@ff@getstaticpos\csname @sf@dim@\romannumeral#1\endcsname
\def\ff@frame{}\edef\ff@width{\the\@ff@tmp@x}\def\ff@angle{}%
\edef\ff@height{\the\@ff@tmp@y}\def\ff@style{}\def\ff@frametype{}%
-\def\ff@x{}\def\ff@y{}\def\ff@col{}\def\ff@txtcol{}\def\ff@backcol{}%
+\def\ff@x{}\def\ff@y{}\def\ff@col{}\def\ff@txtcol{}%
+\def\ff@backcol{}\def\ff@shape{0}%
\def\ff@clear{}\def\ff@margin{}\def\ff@offset{}\def\ff@pages{}%
-\def\ff@label{}\def\ff@evenx{}\def\ff@eveny{}\def\ff@oddx{}\def\ff@oddy{}%
+\def\ff@label{}\def\ff@evenx{}\def\ff@eveny{}%
+\def\ff@oddx{}\def\ff@oddy{}%
\setkeys{flowframe}{#2}%
\ifthenelse{\equal{\ff@frame}{}}{}{%
\setboolean{staticframe\romannumeral#1}{\ff@frame}}%
@@ -1222,7 +1295,7 @@ id '#1'}{}\fi}
{\ff@oddy}}%
\expandafter
\xdef\csname @sf@dim@\romannumeral#1\endcsname{%
-[c][\ff@height][c]{\ff@width}}%
+[c][\ff@height][\ff@valign]{\ff@width}}%
\ifthenelse{\equal{\ff@frametype}{}}{}{%
\expandafter
\xdef\csname @sf@frametype@\romannumeral#1\endcsname{%
@@ -1241,6 +1314,11 @@ id '#1'}{}\fi}
\ifthenelse{\equal{\ff@angle}{}}{}{%
\expandafter
\xdef\csname @sf@angle@\romannumeral#1\endcsname{\ff@angle}}%
+\if0\ff@shape
+\else
+\expandafter\global\expandafter
+\let\csname @sf@shape@\romannumeral#1\endcsname\ff@shape
+\fi
\ifthenelse{\equal{\ff@pages}{}}{}{%
\expandafter
\xdef\csname @sf@pages@\romannumeral#1\endcsname{\ff@pages}}%
@@ -1254,6 +1332,107 @@ static frames}{Static frames don't have marginal notes}}%
static frames}{}}%
}
% \end{macrocode}
+% Simulate paragraph break inside "\shapepar"
+% \begin{macrocode}
+%\newcommand*{\simpar}{\hfil\vadjust{\vskip\parskip}\break\indent}
+\newcommand*{\simpar}{\hfill\\\indent\mbox{}}
+% \end{macrocode}
+% Provide means to allow parshape to be carried over a paragraph
+% break.
+% \begin{macrocode}
+\let\orgpar\par
+\newcommand{\ffpshpar}{\edef\next{\hangafter=\the\hangafter
+\hangindent=\the\hangindent}\orgpar\next
+\edef\next{\prevgraf=\the\prevgraf}\@ff@parshape\indent\mbox{}\next}
+% \end{macrocode}
+% Provide a means to have section headings within "\parshape".
+% \begin{macrocode}
+\def\@ff@parshape{\parshape=0}
+
+\newcommand{\@ff@sectionhead}[1]{%
+\def\ff@sechead{#1}%
+\ffpshpar
+\@ifstar{\@s@ff@heading}{\@dblarg\@ff@heading}}
+
+\def\@s@ff@heading#1{%
+\@ifundefined{@ff@old\ff@sechead}{\PackageError{flowfram}{Unknown
+heading command '\ff@sechead'}{}}{%
+\begingroup
+\edef\next{\hangafter=\the\hangafter
+\hangindent=\the\hangindent}\orgpar\next
+\let\par=\orgpar
+\edef\next{\prevgraf=\the\prevgraf}%
+\csname @ff@old\ff@sechead\endcsname*{\@ff@parshape\next
+#1}%
+\xdef\next{\@ff@parshape
+\prevgraf=\the\prevgraf}%
+\endgroup
+}%
+\mbox{}\next\let\next\undefined}
+
+\def\@ff@heading[#1]#2{%
+\@ifundefined{@ff@old\ff@sechead}{\PackageError{flowfram}{Unknown
+heading command '\ff@sechead'}{}}{%
+\begingroup
+\edef\next{\hangafter=\the\hangafter
+\hangindent=\the\hangindent}\orgpar\next
+\let\par=\orgpar
+\edef\next{\prevgraf=\the\prevgraf}%
+\csname @ff@old\ff@sechead\endcsname[#1]{\@ff@parshape\next
+#2}%
+\xdef\next{\@ff@parshape
+\prevgraf=\the\prevgraf}%
+\endgroup}%
+\mbox{}\next\let\next\undefined}
+% \end{macrocode}
+% Define command to switch to adjusted section headings:
+% \begin{macrocode}
+\newcommand*{\@ff@setsecthead}{%
+\let\@ff@oldsection=\section
+\let\@ff@oldsubsection=\subsection
+\let\@ff@oldsubsubsection=\subsubsection
+\let\@ff@oldparagraph=\paragraph
+\let\@ff@oldsubparagraph=\subparagraph
+\def\section{\@ff@sectionhead{section}}%
+\def\subsection{\@ff@sectionhead{subsection}}%
+\def\subsubsection{\@ff@sectionhead{subsubsection}}%
+\def\paragraph{\@ff@sectionhead{paragraph}}%
+\def\subparagraph{\@ff@sectionhead{subparagraph}}%
+}
+% \end{macrocode}
+% Determine what shape command is being used:
+% \begin{macrocode}
+\def\@ff@getshape#1#2\relax{%
+\ifx#1\parshape
+\def\ff@shape{1}%
+\else
+\ifx#1\shapepar
+\def\ff@shape{2}%
+\else
+\ifx#1\relax
+\def\ff@shape{0}%
+\else
+\PackageError{flowfram}{Unknown shape \string#1}{}%
+\def\ff@shape{2}%
+\fi
+\fi
+\fi}
+% \end{macrocode}
+% Disable sectioning commands
+% \begin{macrocode}
+\newcommand*{\@ff@disablesec}{%
+\def\section{\PackageError{flowfram}{You can't have
+sectioning commands within a \string\shapepar}{}}%
+\def\subsection{\PackageError{flowfram}{You can't have
+sectioning commands within a \string\shapepar}{}}%
+\def\subsubsection{\PackageError{flowfram}{You can't have
+sectioning commands within a \string\shapepar}{}}%
+\def\paragraph{\PackageError{flowfram}{You can't have
+sectioning commands within a \string\shapepar}{}}%
+\def\subparagraph{\PackageError{flowfram}{You can't have
+sectioning commands within a \string\shapepar}{}}%
+}
+% \end{macrocode}
% Set the contents of the \gls{static} given by its \IDN{}.
% Synatax: "\begin{staticcontents}{n}".
%\DescribeEnv{staticcontents}
@@ -1262,15 +1441,45 @@ static frames}{}}%
\newenvironment{staticcontents}[1]{%
\@ifundefined{@staticframe@\romannumeral#1}{%
\PackageError{flowfram}{Static frame '#1' not defined}{}}{}%
+\expandafter\let\expandafter\@ff@parshape\csname @sf@shape@\romannumeral#1\endcsname
+\expandafter\@ff@getshape\@ff@parshape\relax
+\ifcase\ff@shape
+% no shape
\edef\@sf@mpg{%
\noexpand
-\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname}%
+\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname
+\noexpand\begingroup
+\noexpand\let\noexpand\orgpar=\noexpand\par
+}%
+\or
+% \parshape
+\edef\@sf@mpg{%
+\noexpand
+\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname
+\@ff@parshape
+\noexpand\begingroup
+\noexpand\let\noexpand\orgpar=\noexpand\par
+\noexpand\let\noexpand\par=\noexpand\ffpshpar
+\noexpand\@ff@setsecthead
+}%
+\or
+% \shapepar
+\edef\@sf@mpg{%
+\noexpand
+\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname
+\noexpand\begingroup
+\noexpand\@ff@disablesec
+\noexpand\@ff@parshape
+}%
+\fi
\edef\@sf@thisframe{\csname @staticframe@\romannumeral#1\endcsname}%
\begin{lrbox}{\staticframe}%
\edef\ff@txtcol{\csname @sf@txtcol@\romannumeral#1\endcsname}%
-\@s@tfftextcol
+\@s@tfftextcol\noindent
\@sf@mpg
-}{\end{minipage}\end{lrbox}%
+\setlength\parindent\sdfparindent
+}{\ifnum\ff@shape=2\par
+\else\orgpar\fi\endgroup\end{minipage}\end{lrbox}%
\expandafter\global\expandafter\sbox\@sf@thisframe{%
\usebox\staticframe}\ignorespaces
}
@@ -1431,6 +1640,8 @@ fbox}%
\gdef\csname @df@offset@\romannumeral\c@maxdynamic\endcsname{compute}%
\expandafter
\gdef\csname @df@angle@\romannumeral\c@maxdynamic\endcsname{0}%
+\expandafter
+\gdef\csname @df@shape@\romannumeral\c@maxdynamic\endcsname{\relax}%
\newboolean{@df@clear@\romannumeral\c@maxdynamic}%
\setboolean{@df@clear@\romannumeral\c@maxdynamic}{false}%
\@ifnextchar[{\@s@tdynamicframeid{\c@maxdynamic}}%
@@ -1548,13 +1759,14 @@ id '#1'}{}\fi}
% Change the setting for the \gls{dynamic} given by its \IDN{}.
% \begin{macrocode}
\newcommand{\@@setdynamicframe}[2]{%
-\expandafter\expandafter\expandafter\@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname
+\expandafter\expandafter\expandafter
+\@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname
\def\ff@frame{}\edef\ff@width{\the\@ff@tmp@x}%
\edef\ff@height{\the\@ff@tmp@y}\def\ff@style{}\def\ff@frametype{}%
\def\ff@x{}\def\ff@y{}\def\ff@col{}\def\ff@txtcol{}\def\ff@backcol{}%
\def\ff@clear{}\def\ff@margin{}\def\ff@offset{}\def\ff@pages{}%
\def\ff@label{}\def\ff@evenx{}\def\ff@eveny{}%
-\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}%
+\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}\def\ff@shape{0}%
\setkeys{flowframe}{#2}%
\ifthenelse{\equal{\ff@frame}{}}{}{%
\setboolean{dynamicframe\romannumeral#1}{\ff@frame}}%
@@ -1581,7 +1793,7 @@ id '#1'}{}\fi}
\expandafter\global\expandafter\setlength
\csname @df@\romannumeral#1@posy\endcsname{\ff@oddy}}%
\expandafter\xdef\csname @df@dim@\romannumeral#1\endcsname{%
-[c][\ff@height][t]{\ff@width}}%
+[c][\ff@height][\ff@valign]{\ff@width}}%
\ifthenelse{\equal{\ff@label}{}}{}{%
\@s@tdynamicframeid{#1}[\ff@label]}
\ifthenelse{\equal{\ff@frametype}{}}{}{%
@@ -1600,6 +1812,11 @@ id '#1'}{}\fi}
\ifthenelse{\equal{\ff@angle}{}}{}{%
\expandafter
\xdef\csname @df@angle@\romannumeral#1\endcsname{\ff@angle}}%
+\if0\ff@shape
+\else
+\expandafter\global\expandafter
+\let\csname @df@shape@\romannumeral#1\endcsname\ff@shape
+\fi
\ifthenelse{\equal{\ff@pages}{}}{}{%
\expandafter\xdef\csname @df@pages@\romannumeral#1\endcsname{%
\ff@pages}}%
@@ -1622,14 +1839,14 @@ frames}{dynamic frames don't have marginal notes}}%
% \begin{macrocode}
\newcommand{\@@dynamicframeswapcoords}[1]{%
\setlength{\@ff@tmp@x}%
-{\csname @df@\romannumeral#1@evenx\endcsname}
+{\csname @df@\romannumeral#1@evenx\endcsname}%
\expandafter\setlength
\csname @df@\romannumeral#1@evenx\endcsname
{\csname @df@\romannumeral#1@posx\endcsname}%
\expandafter\setlength
\csname @df@\romannumeral#1@posx\endcsname{\@ff@tmp@x}%
\setlength{\@ff@tmp@y}%
-{\csname @df@\romannumeral#1@eveny\endcsname}
+{\csname @df@\romannumeral#1@eveny\endcsname}%
\expandafter\setlength
\csname @df@\romannumeral#1@eveny\endcsname
{\csname @df@\romannumeral#1@posy\endcsname}%
@@ -1695,7 +1912,7 @@ frames}{dynamic frames don't have marginal notes}}%
% \begin{macrocode}
\newcommand{\@setdynamiccontents}[2]{%
\ifnum#1>\c@maxdynamic
-\PackageError{flowfram}{Dynamic frame \number#1 does not exist}{%
+\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
@@ -1731,9 +1948,10 @@ but there are only
% \end{macrocode}
% Append "#2" onto the end of "#1".
% \begin{macrocode}
-\toksdef\ta=0 \toksdef\tb=2
-\long\def\@ff@addtolist#1\entry#2{\ta={{#2}}\tb=\expandafter{#1}%
-\xdef#1{\the\tb\the\ta}}
+\toksdef\flf@ta=0 \toksdef\flf@tb=2
+\long\def\@ff@addtolist#1\entry#2{\flf@ta={{#2}}%
+\flf@tb=\expandafter{#1}%
+\xdef#1{\the\flf@tb\the\flf@ta}}
% \end{macrocode}
%\subsection{Initialise Flow Frames}
%\DescribeMacro{\setinitialframe}
@@ -1763,7 +1981,7 @@ Attempting to find the first page with a flow frame}%
\advance\c@curpg by -1\relax
\whiledo{\c@curpg>0}{\advance\c@curpg by -1\relax
\setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}%
-\@outputpage}
+\@outputpage}%
\c@thisframe=\@nxtcol
\fi
\@setcol{\c@thisframe}\relax
@@ -1781,13 +1999,13 @@ Attempting to find the first page with a flow frame}%
\finishthispage
\setallflowframes{pages=none}%
\settoheight{\@ff@staticH}{#1}%
-\settodepth{\@ff@tmp@y}{#1}
+\settodepth{\@ff@tmp@y}{#1}%
\addtolength{\@ff@staticH}{\@ff@tmp@y}%
-\ifdim\@ff@staticH>0pt
-\twocolumnStop[\c@page]{\@ff@staticH}
+\ifdim\@ff@staticH>0pt\relax
+\twocolumnStop[\c@page]{\@ff@staticH}%
\c@thisframe=\c@maxflow
\advance\c@thisframe by -1\relax
-\@twocolumn[>\c@page]
+\@twocolumn[>\c@page]%
\setstaticcontents{\c@maxstatic}{#1}%
\else
\@twocolumn
@@ -1805,13 +2023,13 @@ Attempting to find the first page with a flow frame}%
\finishthispage
\setallflowframes{pages=none}%
\settoheight{\@ff@staticH}{#1}%
-\settodepth{\@ff@tmp@y}{#1}
+\settodepth{\@ff@tmp@y}{#1}%
\addtolength{\@ff@staticH}{\@ff@tmp@y}%
-\ifdim\@ff@staticH>0pt
-\onecolumnStop[\c@page]{\@ff@staticH}
+\ifdim\@ff@staticH>0pt\relax
+\onecolumnStop[\c@page]{\@ff@staticH}%
\c@thisframe=\c@maxflow
\advance\c@thisframe by -1\relax
-\@onecolumn[>\c@page]
+\@onecolumn[>\c@page]%
\setstaticcontents{\c@maxstatic}{#1}%
\else
\@twocolumn
@@ -1842,14 +2060,14 @@ Frames must be defined in the preamble}#1}%
% page, need to finish off to ensure the final page is
% shipped out, otherwise the text on the last page will be lost.
% \begin{macrocode}
-\AtEndDocument{\finishthispage}
+%\AtEndDocument{\finishthispage}
% \end{macrocode}
%\subsection{Output Routine}
% Set up the output box so it has the correct dimensions for
% specified \gls{flow}. This is used by the output routine.
% \begin{macrocode}
\newcommand{\@setcol}[1]{%
-\ifnum\c@maxflow<#1
+\ifnum\c@maxflow<#1\relax
\PackageError{flowfram}{Can't set frame '\number#1', doesn't
exist}{}%
\else
@@ -2009,11 +2227,15 @@ or text might not appear correctly}%
\renewcommand{\@dothefoot}{}%
\renewcommand{\@dodynamicthehead}{%
\@dynamicframeid{header}%
-\expandafter\def\csname @dynamicframe@\romannumeral\ff@id\endcsname{\vfill\@thehead\vfill}
+\expandafter
+\def\csname @dynamicframe@\romannumeral\ff@id\endcsname{%
+\vfill\@thehead\vfill}%
}%
\renewcommand{\@dodynamicthefoot}{%
\@dynamicframeid{footer}%
-\expandafter\def\csname @dynamicframe@\romannumeral\ff@id\endcsname{\vfill\@thefoot\vfill}
+\expandafter
+\def\csname @dynamicframe@\romannumeral\ff@id\endcsname{%
+\vfill\@thefoot\vfill}%
}%
}
% \end{macrocode}
@@ -2079,18 +2301,31 @@ or text might not appear correctly}%
\newif\if@ff@moreframes
\newcommand{\@ff@checkifmoreframes}{%
\@ff@moreframesfalse
-\@colN=0\relax
+\@colN=\c@thisframe
\whiledo{\@colN<\c@maxflow}{%
\advance\@colN by 1\relax
\edef\ff@pages{\csname @ff@pages@\romannumeral\@colN\endcsname}%
-\@ff@checkpages{\ff@pages}}}
+\@ff@checkpages{\ff@pages}%
+}%
+\if@ff@moreframes
+\else
+\@ff@tmpN=\c@page
+\advance\@ff@tmpN by 1\relax
+\@colN=0\relax
+\whiledo{\@colN<\c@thisframe}{%
+\advance\@colN by 1\relax
+\edef\ff@pages{\csname @ff@pages@\romannumeral\@colN\endcsname}%
+\@ff@checkpages[\@ff@tmpN]{\ff@pages}%
+}%
+\fi
+}
% \end{macrocode}
% Check to see if the current page lies in the \gls{pglist}
% given by "#1".
% \begin{macrocode}
-\newcommand{\@ff@checkpages}[1]{%
-\@for \@ff@pp:=#1\do{%
-\@ff@checkthispage{\@ff@pp}}}
+\newcommand{\@ff@checkpages}[2][\c@page]{%
+\@for\@ff@pp:=#2\do{%
+\@ff@checkthispage{#1}{\@ff@pp}}}
% \end{macrocode}
% Check to see if the current page lies in the \gls{pgrange}
% given by "#1". If the \gls{pgrange} is specified by
@@ -2099,11 +2334,11 @@ or text might not appear correctly}%
% lies within the number range. If the \gls{pgrange} is "none",
% ignore it.
% \begin{macrocode}
-\newcommand{\@ff@checkthispage}[1]{%
-\ifthenelse{\equal{#1}{all}\or\equal{#1}{even}\or\equal{#1}{odd}}{%
+\newcommand{\@ff@checkthispage}[2]{%
+\ifthenelse{\equal{#2}{all}\or\equal{#2}{even}\or\equal{#2}{odd}}{%
\@ff@moreframestrue}{%
-\ifthenelse{\equal{#1}{none}}{}{%
-\@ff@checknumrange{#1}}}}
+\ifthenelse{\equal{#2}{none}}{}{%
+\@ff@checknumrange{#1}{#2}}}}
% \end{macrocode}
% The number range could be a single number, a closed range
% (e.g.\ "2-6") or an open range (e,g.\ "<4" or ">10").
@@ -2112,12 +2347,15 @@ or text might not appear correctly}%
% If the current page is less than or equal to the maximum,
% there are still more \gls{flow}s available.
% \begin{macrocode}
-\newcommand{\@ff@checknumrange}[1]{%
+\newcommand{\@ff@checknumrange}[2]{%
\def\@ff@numstart{0}\def\@ff@numend{10000}%
-\@ff@getrange{#1}%
-\ifnum\@ff@numend>\c@page
+\@ff@getrange{#2}%
+\ifnum\@ff@numend>#1\relax
\@ff@moreframestrue
\else
+\ifnum\@ff@numend=#1\relax
+\@ff@moreframestrue
+\fi
\fi
}
% \end{macrocode}
@@ -2179,7 +2417,7 @@ or text might not appear correctly}%
% value, otherwise it is a range.
% \begin{macrocode}
\def\@@ff@getrange#1-#2\end{%
-\ifx\relax#2
+\ifx\relax#2\relax
\def\@ff@numstart{#1}\def\@ff@numend{#1}%
\else
\def\@ff@numstart{#1}%
@@ -2214,9 +2452,12 @@ adding new one}%
\@colN=#1\relax
\c@curpg=\c@page
\loop
-\ifnum\@colN=\c@maxflow\@colN=1\@ff@nwpgtrue
-\advance\c@curpg by 1\relax
-\else\advance\@colN by 1\fi
+\ifnum\@colN=\c@maxflow
+ \@colN=1\@ff@nwpgtrue
+ \advance\c@curpg by 1\relax
+\else
+ \advance\@colN by 1\relax
+\fi
\@ff@chckifthispg{\c@curpg}{\@colN}%
\if@notthiscol
\repeat
@@ -2290,7 +2531,7 @@ adding new one}%
\edef\ff@txtcol{\csname @ff@txtcol@\romannumeral#1\endcsname}%
\edef\ff@backcol{\csname @ff@backcol@\romannumeral#1\endcsname}%
\@ff@setoffset{#1}%
-\rotateframe{\csname @ff@angle@\romannumeral#1\endcsname}{
+\rotateframe{\csname @ff@angle@\romannumeral#1\endcsname}{%
\ifthenelse{\boolean{columnframe\romannumeral#1}}{%
\@ff@fbox{\csname colwidth\romannumeral#1\endcsname}%
{\csname colheight\romannumeral#1\endcsname}{%
@@ -2570,7 +2811,8 @@ adding new one}%
% specified in the form "[c][height][?]{width}"
% \begin{macrocode}
\def\@ff@getstaticpos[#1][#2][#3]#4{\@ff@tmp@x=#4\relax
-\@ff@tmp@y=#2}
+\@ff@tmp@y=#2\relax
+\def\ff@valign{#3}}
% \end{macrocode}
% Display the savebox associated with \gls{static} "#1"
% \begin{macrocode}
@@ -2677,6 +2919,43 @@ adding new one}%
\expandafter\global\expandafter
\gdef\csname @dynamicframe@\romannumeral\@colN\endcsname{}}{}}}
% \end{macrocode}
+% Display contents of dynamic box (contents stored in
+% "\ff@contents", style given by "\ff@style"):
+% \begin{macrocode}
+\newcommand{\@dodfparbox}[1]{%
+\expandafter\let\expandafter
+\@ff@parshape\csname @df@shape@\romannumeral#1\endcsname
+\expandafter\@ff@getshape\@ff@parshape\relax
+\ifcase\ff@shape
+% no shape
+\expandafter\expandafter\expandafter
+\parbox\csname @df@dim@\romannumeral#1\endcsname
+{%
+\setlength\parindent\sdfparindent
+\csname\ff@style\endcsname{\ff@contents}}%
+\or
+% \parshape
+\expandafter\expandafter\expandafter
+\parbox\csname @df@dim@\romannumeral#1\endcsname
+{%
+\setlength\parindent\sdfparindent
+\csname\ff@style\endcsname{{%
+\let\oldpar=\par
+\let\par=\ffpshpar
+\@ff@setsecthead
+\@ff@parshape
+\ff@contents\oldpar}}}%
+\or
+% \shapepar
+\expandafter\expandafter\expandafter
+\parbox\csname @df@dim@\romannumeral#1\endcsname
+{%
+\setlength\parindent\sdfparindent
+\csname\ff@style\endcsname{{\@ff@disablesec\@ff@parshape
+\ff@contents\par}}}%
+\fi
+}
+% \end{macrocode}
% Typeset the dynamic box with its associated border.
% \begin{macrocode}
\newcommand{\@dodynamicbox}[1]{%
@@ -2693,15 +2972,11 @@ adding new one}%
\rotateframe{\csname @df@angle@\romannumeral#1\endcsname}{%
\ifthenelse{\boolean{dynamicframe\romannumeral#1}}{%
\@ff@fbox{\@ff@tmp@x}{\@ff@tmp@y}%
-{\expandafter\expandafter\expandafter
-\parbox\csname @df@dim@\romannumeral#1\endcsname
-{\csname\ff@style\endcsname{\ff@contents}}}%
+{\@dodfparbox{#1}}%
{\csname\ff@frametype\endcsname}%
}{%
\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}{%
-\expandafter\expandafter\expandafter
-\parbox\csname @df@dim@\romannumeral#1\endcsname
-{\csname \ff@style\endcsname{\ff@contents}}}%
+\@dodfparbox{#1}}%
}}}
% \end{macrocode}
% Now for the \gls{bbox}:
@@ -2854,14 +3129,18 @@ adding new one}%
% \begin{macrocode}
\newlength\ffevenoffset
\newcommand{\@ff@do@allframes}{%
+\ffevenoffset=0pt\relax
\if@twoside
\ifodd\c@page
\else
-\ffevenoffset=-\oddsidemargin
-\advance\ffevenoffset by \evensidemargin
-\kern\ffevenoffset
+\ffevenoffset=-\oddsidemargin\relax
+\advance\ffevenoffset by \evensidemargin\relax
+\kern\ffevenoffset\relax
\fi
\fi
+\setlength{\@ff@tmp@x}{\textwidth}%
+\advance\@ff@tmp@x by -\ffevenoffset\relax
+\makebox[\@ff@tmp@x][l]{%
\@s@tfr@mes{%
\@ff@doallstatics
\@@doheader
@@ -2879,7 +3158,7 @@ adding new one}%
\ifshowmargins
\@ff@drawmargins
\fi
-}}
+}}}
% \end{macrocode}
% This was modified from the output routine for standard
% two column format. After "\@g@tnextcol", the register
@@ -2899,7 +3178,7 @@ adding new one}%
\@setcolbox\c@thisframe
\if@specialpage
\global\@specialpagefalse
- \@nameuse{ps@\@specialstyle}
+ \@nameuse{ps@\@specialstyle}\relax
\fi
\if@twoside
\ifodd\count\z@
@@ -3075,7 +3354,7 @@ adding new one}%
\ifcase#2
\PackageError{flowfram}{%
You have requested 0 flowframes!}{%
-It does not make much sense to ask to create 0 flow frames}
+It does not make much sense to ask to create 0 flow frames}%
\or
\onecolumninarea[#1]{#3}{#4}{#5}{#6}%
\or
@@ -3655,7 +3934,7 @@ which really doesn't make sense}%
\if@twoside
\computeleftedgeeven{\@ff@tmp@x@even}%
\else
-\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}
+\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}%
\fi
\computebottomedge{\@ff@tmp@y}%
\addtolength{\@ff@tmp@x}{#1}%
@@ -3955,7 +4234,9 @@ which really doesn't make sense}%
\ifthenelse{\equal{#5}{}}{%
\newstaticframe[#1]{#2}{\@ff@staticH}{\@ff@tmp@x}{\@ff@tmp@y}}%
{\newstaticframe[#1]{#2}{\@ff@staticH}{\@ff@tmp@x}{\@ff@tmp@y}[#5]}%
-\expandafter\global\expandafter\setlength\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname{\@ff@tmp@x@even}%
+\expandafter\global\expandafter
+\setlength\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname{%
+\@ff@tmp@x@even}%
\@setframecol#4\end{\c@maxstatic}{backcol}{sf}%
\addtolength{\@ff@tmp@y}{\@ff@staticH}%
}
@@ -3971,7 +4252,8 @@ which really doesn't make sense}%
\advance\@thisstrip by -1\relax
\next}
-\newcommand{\@@nexthNband}[3]{\@nexthband{\ff@pages}{\@ff@staticW}{#1}{#2}{#3}\@nexthNband}
+\newcommand{\@@nexthNband}[3]{%
+\@nexthband{\ff@pages}{\@ff@staticW}{#1}{#2}{#3}\@nexthNband}
% \end{macrocode}
%\DescribeMacro{\makebackgroundframe}
% Make one big \gls{static} that covers the entire page.
@@ -4750,7 +5032,7 @@ Unknown section type '#3'}{}}{%
\@ff@tmpN=0\relax
\whiledo{\@ff@tmpN<\c@maxthumbtabs}{%
\advance\@ff@tmpN by 1\relax
-\@greyscale=\@ff@tmpN
+\@greyscale=\@ff@tmpN\relax
\multiply\@greyscale by 60\relax
\divide\@greyscale by \c@maxthumbtabs
\advance\@greyscale by 25\relax
@@ -5042,11 +5324,11 @@ ttb file may not be up-to-date}}{%
}%
\fi
\@ifundefined{@toc@\romannumeral#2}{%
-\ta=\expandafter{#1}%
-\expandafter\xdef\csname @toc@\romannumeral#2\endcsname{\the\ta}}{%
-\ta=\expandafter{#1}%
-\tb=\expandafter\expandafter\expandafter{\csname @toc@\romannumeral#2\endcsname}%
-\expandafter\xdef\csname @toc@\romannumeral#2\endcsname{\the\tb\the\ta}}%
+\flf@ta=\expandafter{#1}%
+\expandafter\xdef\csname @toc@\romannumeral#2\endcsname{\the\flf@ta}}{%
+\flf@ta=\expandafter{#1}%
+\flf@tb=\expandafter\expandafter\expandafter{\csname @toc@\romannumeral#2\endcsname}%
+\expandafter\xdef\csname @toc@\romannumeral#2\endcsname{\the\flf@tb\the\flf@ta}}%
% now do minitoc stuff. If the sectioning type is unknown,
% assume it comes last
\if@minitoc
@@ -5059,9 +5341,9 @@ ttb file may not be up-to-date}}{%
\expandafter\gdef\csname @minitoc@\romannumeral\c@maxminitoc\endcsname{}\relax
\else
\ifnum\@ttb@level>\@ttb@minitoclevel
- \ta=\expandafter{#1}\relax
- \tb=\expandafter\expandafter\expandafter{\csname @minitoc@\romannumeral\c@maxminitoc\endcsname}\relax
- \expandafter\xdef\csname @minitoc@\romannumeral\c@maxminitoc\endcsname{\the\tb\the\ta}
+ \flf@ta=\expandafter{#1}\relax
+ \flf@tb=\expandafter\expandafter\expandafter{\csname @minitoc@\romannumeral\c@maxminitoc\endcsname}\relax
+ \expandafter\xdef\csname @minitoc@\romannumeral\c@maxminitoc\endcsname{\the\flf@tb\the\flf@ta}
\fi
\fi
\fi
@@ -5287,8 +5569,10 @@ ttb file may not be up-to-date}}{%
\dominitoc{\c@minitoc}\@afterheading}{}%
}}
% \end{macrocode}
+%\iffalse
% \begin{macrocode}
%</flowfram.sty>
% \end{macrocode}
+%\fi
%\Finale
\endinput
diff --git a/Master/texmf-dist/source/latex/flowfram/flowfram.ins b/Master/texmf-dist/source/latex/flowfram/flowfram.ins
index 2d7240a1103..f5015dc0edf 100644
--- a/Master/texmf-dist/source/latex/flowfram/flowfram.ins
+++ b/Master/texmf-dist/source/latex/flowfram/flowfram.ins
@@ -1,8 +1,8 @@
-% flowfram.ins generated using makedtx version 0.9b 2005/11/24 14:42
+% flowfram.ins generated using makedtx version 0.91b 2007/3/9 11:23
\input docstrip
\preamble
-Copyright (C) 2005 Nicola Talbot, all rights reserved.
+Copyright (C) 2007 Nicola Talbot, all rights reserved.
If you modify this file, you must change its name first.
You are NOT ALLOWED to distribute this file alone. You are NOT
ALLOWED to take money for the distribution or use of either this
diff --git a/Master/texmf-dist/tex/latex/flowfram/flowfram.sty b/Master/texmf-dist/tex/latex/flowfram/flowfram.sty
index 06a2a252751..8335fc36430 100644
--- a/Master/texmf-dist/tex/latex/flowfram/flowfram.sty
+++ b/Master/texmf-dist/tex/latex/flowfram/flowfram.sty
@@ -5,7 +5,7 @@
%% The original source files were:
%%
%% flowfram.dtx (with options: `flowfram.sty,package')
-%% Copyright (C) 2005 Nicola Talbot, all rights reserved.
+%% Copyright (C) 2007 Nicola Talbot, all rights reserved.
%% If you modify this file, you must change its name first.
%% You are NOT ALLOWED to distribute this file alone. You are NOT
%% ALLOWED to take money for the distribution or use of either this
@@ -27,11 +27,12 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{flowfram}[2005/11/24 v1.02]
+\ProvidesPackage{flowfram}[2007/03/09 v1.07]
\RequirePackage{ifthen}
\RequirePackage{keyval}
\RequirePackage{graphics}
\RequirePackage{afterpage}
+\@ifundefined{@ldc@l@r}{\RequirePackage{color}}{}
\newcommand{\setffdraftcolor}{\color[gray]{0.8}}
\newcommand{\setffdrafttypeblockcolor}{\color[gray]{0.9}}
\newlength\fflabelsep
@@ -109,10 +110,8 @@
\fi
\@ifundefined{chapter}{}{%
\newcommand{\chapterfirstpagestyle}{plain}
-
\let\@ff@OLD@chapter\@chapter
\let\@ff@OLD@schapter\@schapter
-
\renewcommand{\@chapter}{%
\thispagestyle{\chapterfirstpagestyle}\@ff@OLD@chapter}
\renewcommand{\@schapter}{%
@@ -133,6 +132,7 @@
\newlength\@ff@tmp@x
\newlength\@ff@tmp@x@even
\newlength\@ff@tmp@y
+\newlength\sdfparindent
\newlength\flowframesep
\flowframesep=\fboxsep
\newlength\flowframerule
@@ -146,13 +146,13 @@
{\parfillskip=0pt\pagebreak[#1]\parskip=0pt\par\noindent}}
\newcommand{\finishthispage}{%
\@colN=\c@thisframe
-\clearpage
+\newpage
\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax
\@ff@chckifthispg{\c@page}{\@colN}%
\if@notthiscol\else
-\mbox{}\vfill\clearpage%
-\fi}
-}
+\mbox{}\newpage%
+\fi
+}}
\def\cleardoublepage{\finishthispage
\if@twoside
\ifodd\c@page
@@ -193,37 +193,62 @@
\@onlypreamble{\newflowframe}
\newcommand{\@n@wflowframe}{%
\global\advance\c@maxflow by 1\relax
-\expandafter\global\expandafter\newif\csname ifcolumnframe\romannumeral\c@maxflow\endcsname
+\expandafter\global\expandafter
+\newif\csname ifcolumnframe\romannumeral\c@maxflow\endcsname
\@ifstar\@snewflowframe\@newflowframe
}
\newcommand{\@snewflowframe}{%
-\expandafter\global\expandafter\let\csname ifcolumnframe\romannumeral\c@maxflow\endcsname\iftrue
+\expandafter\global\expandafter
+\let\csname ifcolumnframe\romannumeral\c@maxflow\endcsname\iftrue
\@@newflowframe}
\newcommand{\@newflowframe}{%
-\expandafter\global\expandafter\let\csname ifcolumnframe\romannumeral\c@maxflow\endcsname\iffalse
+\expandafter\global\expandafter
+\let\csname ifcolumnframe\romannumeral\c@maxflow\endcsname\iffalse
\@@newflowframe}
\newcommand{\@@newflowframe}[5][all]{%
-\expandafter\global\expandafter\newbox\csname column\romannumeral\c@maxflow\endcsname
-\expandafter\global\expandafter\newlength\csname colwidth\romannumeral\c@maxflow\endcsname
-\expandafter\global\expandafter\newlength\csname colheight\romannumeral\c@maxflow\endcsname
-\expandafter\global\expandafter\newlength\csname col@\romannumeral\c@maxflow @posx\endcsname
-\expandafter\global\expandafter\newlength\csname col@\romannumeral\c@maxflow @posy\endcsname
-\expandafter\global\expandafter\setlength\csname colwidth\romannumeral\c@maxflow\endcsname{#2}
-\expandafter\global\expandafter\setlength\csname colheight\romannumeral\c@maxflow\endcsname{#3}
-\expandafter\global\expandafter\setlength\csname col@\romannumeral\c@maxflow @posx\endcsname{#4}
-\expandafter\global\expandafter\setlength\csname col@\romannumeral\c@maxflow @posy\endcsname{#5}
-\expandafter\global\expandafter\newlength\csname col@\romannumeral\c@maxflow @evenx\endcsname
-\expandafter\global\expandafter\newlength\csname col@\romannumeral\c@maxflow @eveny\endcsname
-\expandafter\global\expandafter\setlength\csname col@\romannumeral\c@maxflow @evenx\endcsname{#4}
-\expandafter\global\expandafter\setlength\csname col@\romannumeral\c@maxflow @eveny\endcsname{#5}
-\expandafter\gdef\csname @ff@frametype@\romannumeral\c@maxflow\endcsname{fbox}%
-\expandafter\gdef\csname @ff@col@\romannumeral\c@maxflow\endcsname{\flowframecol}
-\expandafter\gdef\csname @ff@txtcol@\romannumeral\c@maxflow\endcsname{\flowframetextcol}
-\expandafter\gdef\csname @ff@backcol@\romannumeral\c@maxflow\endcsname{{none}}
-\expandafter\gdef\csname @ff@pages@\romannumeral\c@maxflow\endcsname{#1}
-\expandafter\gdef\csname @ff@offset@\romannumeral\c@maxflow\endcsname{compute}
-\expandafter\gdef\csname @ff@angle@\romannumeral\c@maxflow\endcsname{0}%
-\expandafter\gdef\csname @ff@margin@\romannumeral\c@maxflow\endcsname{right}
+\expandafter\global\expandafter
+\newbox\csname column\romannumeral\c@maxflow\endcsname
+\expandafter\global\expandafter
+\newlength\csname colwidth\romannumeral\c@maxflow\endcsname
+\expandafter\global\expandafter
+\newlength\csname colheight\romannumeral\c@maxflow\endcsname
+\expandafter\global\expandafter
+\newlength\csname col@\romannumeral\c@maxflow @posx\endcsname
+\expandafter\global\expandafter
+\newlength\csname col@\romannumeral\c@maxflow @posy\endcsname
+\expandafter\global\expandafter
+\setlength\csname colwidth\romannumeral\c@maxflow\endcsname{#2}
+\expandafter\global\expandafter
+\setlength\csname colheight\romannumeral\c@maxflow\endcsname{#3}
+\expandafter\global\expandafter
+\setlength\csname col@\romannumeral\c@maxflow @posx\endcsname{#4}
+\expandafter\global\expandafter
+\setlength\csname col@\romannumeral\c@maxflow @posy\endcsname{#5}
+\expandafter\global\expandafter
+\newlength\csname col@\romannumeral\c@maxflow @evenx\endcsname
+\expandafter\global\expandafter
+\newlength\csname col@\romannumeral\c@maxflow @eveny\endcsname
+\expandafter\global\expandafter
+\setlength\csname col@\romannumeral\c@maxflow @evenx\endcsname{#4}
+\expandafter\global\expandafter
+\setlength\csname col@\romannumeral\c@maxflow @eveny\endcsname{#5}
+\expandafter
+\gdef\csname @ff@frametype@\romannumeral\c@maxflow\endcsname{fbox}%
+\expandafter
+\gdef\csname @ff@col@\romannumeral\c@maxflow\endcsname{\flowframecol}
+\expandafter
+\gdef\csname @ff@txtcol@\romannumeral\c@maxflow\endcsname{%
+\flowframetextcol}
+\expandafter
+\gdef\csname @ff@backcol@\romannumeral\c@maxflow\endcsname{{none}}
+\expandafter
+\gdef\csname @ff@pages@\romannumeral\c@maxflow\endcsname{#1}
+\expandafter
+\gdef\csname @ff@offset@\romannumeral\c@maxflow\endcsname{compute}
+\expandafter
+\gdef\csname @ff@angle@\romannumeral\c@maxflow\endcsname{0}%
+\expandafter
+\gdef\csname @ff@margin@\romannumeral\c@maxflow\endcsname{right}
\ifnum\c@thisframe=0\relax
\ifthenelse{\equal{#1}{all}\TE@or\equal{#1}{odd}}{%
\c@thisframe=\c@maxflow
@@ -242,11 +267,13 @@
\fi
}}}%
\fi
-\@ifnextchar[{\@s@tflowframeid{\c@maxflow}}{\@s@tflowframeid{\c@maxflow}[\number\c@maxflow]}}
+\@ifnextchar[{\@s@tflowframeid{\c@maxflow}}{%
+\@s@tflowframeid{\c@maxflow}[\number\c@maxflow]}}
\def\@s@tflowframeid#1[#2]{%
\edef\ff@label{#2}%
\@ff@checkuniqueidl{#1}{\ff@label}%
-\expandafter\xdef\csname @col@id@\romannumeral#1\endcsname{\ff@label}%
+\expandafter
+\xdef\csname @col@id@\romannumeral#1\endcsname{\ff@label}%
}
\newcommand{\@ff@checkuniqueidl}[2]{%
{\@colN=0\relax
@@ -254,7 +281,8 @@
\advance\@colN by 1\relax
\ifnum\@colN=#1\relax
\else
-\ifthenelse{\equal{#2}{\csname @col@id@\romannumeral\@colN\endcsname}}{%
+\ifthenelse{\equal{#2}{%
+\csname @col@id@\romannumeral\@colN\endcsname}}{%
\PackageError{flowfram}{Flow frame IDL '#2' already defined}{%
You can't assign this label, as it is already defined
for flow frame \number\@colN}}{}%
@@ -335,6 +363,12 @@ boolean}{You can only specify the values 'true' or 'false'}}}
\define@key{flowframe}{style}{\ifthenelse{\equal{#1}{}}{%
\PackageError{flowfram}{Missing value for 'style' key}{}}{}%
\ifthenelse{\equal{#1}{none}}{\def\ff@style{relax}}{\def\ff@style{#1}}}
+\define@key{flowframe}{shape}{\def\ff@shape{#1}%
+}
+\define@key{flowframe}{valign}{\ifthenelse{\equal{#1}{c} \or
+\equal{#1}{t} \or \equal{#1}{b}}{\def\ff@valign{#1}}{%
+\PackageError{flowfram}{Invalid value for 'valign' key}{You
+may only specify 'c', 't' or 'b'}}}
\newcommand{\setallflowframes}[1]{%
\@colN=0\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax
\@@setflowframe{\@colN}{#1}}}
@@ -368,10 +402,11 @@ boolean}{You can only specify the values 'true' or 'false'}}}
}}}}}
\newcommand{\@@setflowframe}[2]{%
\def\ff@frame{}\def\ff@width{}\def\ff@height{}\def\ff@margin{}%
-\def\ff@x{}\def\ff@y{}\def\ff@frametype{}\def\ff@col{}\def\ff@style{}%
+\def\ff@x{}\def\ff@y{}\def\ff@frametype{}\def\ff@col{}%
+\def\ff@valign{}\def\ff@style{}%
\def\ff@txtcol{}\def\ff@clear{}\def\ff@offset{}\def\ff@pages{}%
\def\ff@label{}\def\ff@backcol{}\def\ff@evenx{}\def\ff@eveny{}%
-\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}%
+\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}\def\ff@shape{\empty}%
\setkeys{flowframe}{#2}%
\ifthenelse{\equal{\ff@frame}{}}{}{%
\setboolean{columnframe\romannumeral#1}{\ff@frame}}%
@@ -432,6 +467,14 @@ boolean}{You can only specify the values 'true' or 'false'}}}
\ifthenelse{\equal{\ff@style}{}}{}{%
\PackageError{flowfram}%
{Key 'style' not available for flow frames}{}}%
+\if\ff@shape\empty
+\else
+\PackageError{flowfram}%
+{Key 'shape' not available for flow frames}{}%
+\fi
+\ifthenelse{\equal{\ff@valign}{}}{}{%
+\PackageError{flowfram}%
+{Key 'valign' not available for flow frames}{}}%
}
\newcommand{\@@flowframeswapcoords}[1]{%
\setlength{\@ff@tmp@x}%
@@ -550,6 +593,8 @@ compute}%
\expandafter
\gdef\csname @sf@angle@\romannumeral\c@maxstatic\endcsname{0}%
\expandafter
+\gdef\csname @sf@shape@\romannumeral\c@maxstatic\endcsname{\relax}%
+\expandafter
\def\csname @sf@frametype@\romannumeral\c@maxstatic\endcsname{%
fbox}%
\newboolean{@sf@clear@\romannumeral\c@maxstatic}%
@@ -628,9 +673,11 @@ id '#1'}{}\fi}
\@ff@getstaticpos\csname @sf@dim@\romannumeral#1\endcsname
\def\ff@frame{}\edef\ff@width{\the\@ff@tmp@x}\def\ff@angle{}%
\edef\ff@height{\the\@ff@tmp@y}\def\ff@style{}\def\ff@frametype{}%
-\def\ff@x{}\def\ff@y{}\def\ff@col{}\def\ff@txtcol{}\def\ff@backcol{}%
+\def\ff@x{}\def\ff@y{}\def\ff@col{}\def\ff@txtcol{}%
+\def\ff@backcol{}\def\ff@shape{0}%
\def\ff@clear{}\def\ff@margin{}\def\ff@offset{}\def\ff@pages{}%
-\def\ff@label{}\def\ff@evenx{}\def\ff@eveny{}\def\ff@oddx{}\def\ff@oddy{}%
+\def\ff@label{}\def\ff@evenx{}\def\ff@eveny{}%
+\def\ff@oddx{}\def\ff@oddy{}%
\setkeys{flowframe}{#2}%
\ifthenelse{\equal{\ff@frame}{}}{}{%
\setboolean{staticframe\romannumeral#1}{\ff@frame}}%
@@ -666,7 +713,7 @@ id '#1'}{}\fi}
{\ff@oddy}}%
\expandafter
\xdef\csname @sf@dim@\romannumeral#1\endcsname{%
-[c][\ff@height][c]{\ff@width}}%
+[c][\ff@height][\ff@valign]{\ff@width}}%
\ifthenelse{\equal{\ff@frametype}{}}{}{%
\expandafter
\xdef\csname @sf@frametype@\romannumeral#1\endcsname{%
@@ -685,6 +732,11 @@ id '#1'}{}\fi}
\ifthenelse{\equal{\ff@angle}{}}{}{%
\expandafter
\xdef\csname @sf@angle@\romannumeral#1\endcsname{\ff@angle}}%
+\if0\ff@shape
+\else
+\expandafter\global\expandafter
+\let\csname @sf@shape@\romannumeral#1\endcsname\ff@shape
+\fi
\ifthenelse{\equal{\ff@pages}{}}{}{%
\expandafter
\xdef\csname @sf@pages@\romannumeral#1\endcsname{\ff@pages}}%
@@ -697,19 +749,127 @@ static frames}{Static frames don't have marginal notes}}%
\PackageError{flowfram}{Key 'style' not available for
static frames}{}}%
}
+\newcommand*{\simpar}{\hfill\\\indent\mbox{}}
+\let\orgpar\par
+\newcommand{\ffpshpar}{\edef\next{\hangafter=\the\hangafter
+\hangindent=\the\hangindent}\orgpar\next
+\edef\next{\prevgraf=\the\prevgraf}\@ff@parshape\indent\mbox{}\next}
+\def\@ff@parshape{\parshape=0}
+
+\newcommand{\@ff@sectionhead}[1]{%
+\def\ff@sechead{#1}%
+\ffpshpar
+\@ifstar{\@s@ff@heading}{\@dblarg\@ff@heading}}
+
+\def\@s@ff@heading#1{%
+\@ifundefined{@ff@old\ff@sechead}{\PackageError{flowfram}{Unknown
+heading command '\ff@sechead'}{}}{%
+\begingroup
+\edef\next{\hangafter=\the\hangafter
+\hangindent=\the\hangindent}\orgpar\next
+\let\par=\orgpar
+\edef\next{\prevgraf=\the\prevgraf}%
+\csname @ff@old\ff@sechead\endcsname*{\@ff@parshape\next
+#1}%
+\xdef\next{\@ff@parshape
+\prevgraf=\the\prevgraf}%
+\endgroup
+}%
+\mbox{}\next\let\next\undefined}
+
+\def\@ff@heading[#1]#2{%
+\@ifundefined{@ff@old\ff@sechead}{\PackageError{flowfram}{Unknown
+heading command '\ff@sechead'}{}}{%
+\begingroup
+\edef\next{\hangafter=\the\hangafter
+\hangindent=\the\hangindent}\orgpar\next
+\let\par=\orgpar
+\edef\next{\prevgraf=\the\prevgraf}%
+\csname @ff@old\ff@sechead\endcsname[#1]{\@ff@parshape\next
+#2}%
+\xdef\next{\@ff@parshape
+\prevgraf=\the\prevgraf}%
+\endgroup}%
+\mbox{}\next\let\next\undefined}
+\newcommand*{\@ff@setsecthead}{%
+\let\@ff@oldsection=\section
+\let\@ff@oldsubsection=\subsection
+\let\@ff@oldsubsubsection=\subsubsection
+\let\@ff@oldparagraph=\paragraph
+\let\@ff@oldsubparagraph=\subparagraph
+\def\section{\@ff@sectionhead{section}}%
+\def\subsection{\@ff@sectionhead{subsection}}%
+\def\subsubsection{\@ff@sectionhead{subsubsection}}%
+\def\paragraph{\@ff@sectionhead{paragraph}}%
+\def\subparagraph{\@ff@sectionhead{subparagraph}}%
+}
+\def\@ff@getshape#1#2\relax{%
+\ifx#1\parshape
+\def\ff@shape{1}%
+\else
+\ifx#1\shapepar
+\def\ff@shape{2}%
+\else
+\ifx#1\relax
+\def\ff@shape{0}%
+\else
+\PackageError{flowfram}{Unknown shape \string#1}{}%
+\def\ff@shape{2}%
+\fi
+\fi
+\fi}
+\newcommand*{\@ff@disablesec}{%
+\def\section{\PackageError{flowfram}{You can't have
+sectioning commands within a \string\shapepar}{}}%
+\def\subsection{\PackageError{flowfram}{You can't have
+sectioning commands within a \string\shapepar}{}}%
+\def\subsubsection{\PackageError{flowfram}{You can't have
+sectioning commands within a \string\shapepar}{}}%
+\def\paragraph{\PackageError{flowfram}{You can't have
+sectioning commands within a \string\shapepar}{}}%
+\def\subparagraph{\PackageError{flowfram}{You can't have
+sectioning commands within a \string\shapepar}{}}%
+}
\newbox\staticframe
\newenvironment{staticcontents}[1]{%
\@ifundefined{@staticframe@\romannumeral#1}{%
\PackageError{flowfram}{Static frame '#1' not defined}{}}{}%
+\expandafter\let\expandafter\@ff@parshape\csname @sf@shape@\romannumeral#1\endcsname
+\expandafter\@ff@getshape\@ff@parshape\relax
+\ifcase\ff@shape
\edef\@sf@mpg{%
\noexpand
-\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname}%
+\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname
+\noexpand\begingroup
+\noexpand\let\noexpand\orgpar=\noexpand\par
+}%
+\or
+\edef\@sf@mpg{%
+\noexpand
+\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname
+\@ff@parshape
+\noexpand\begingroup
+\noexpand\let\noexpand\orgpar=\noexpand\par
+\noexpand\let\noexpand\par=\noexpand\ffpshpar
+\noexpand\@ff@setsecthead
+}%
+\or
+\edef\@sf@mpg{%
+\noexpand
+\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname
+\noexpand\begingroup
+\noexpand\@ff@disablesec
+\noexpand\@ff@parshape
+}%
+\fi
\edef\@sf@thisframe{\csname @staticframe@\romannumeral#1\endcsname}%
\begin{lrbox}{\staticframe}%
\edef\ff@txtcol{\csname @sf@txtcol@\romannumeral#1\endcsname}%
-\@s@tfftextcol
+\@s@tfftextcol\noindent
\@sf@mpg
-}{\end{minipage}\end{lrbox}%
+\setlength\parindent\sdfparindent
+}{\ifnum\ff@shape=2\par
+\else\orgpar\fi\endgroup\end{minipage}\end{lrbox}%
\expandafter\global\expandafter\sbox\@sf@thisframe{%
\usebox\staticframe}\ignorespaces
}
@@ -822,6 +982,8 @@ fbox}%
\gdef\csname @df@offset@\romannumeral\c@maxdynamic\endcsname{compute}%
\expandafter
\gdef\csname @df@angle@\romannumeral\c@maxdynamic\endcsname{0}%
+\expandafter
+\gdef\csname @df@shape@\romannumeral\c@maxdynamic\endcsname{\relax}%
\newboolean{@df@clear@\romannumeral\c@maxdynamic}%
\setboolean{@df@clear@\romannumeral\c@maxdynamic}{false}%
\@ifnextchar[{\@s@tdynamicframeid{\c@maxdynamic}}%
@@ -894,13 +1056,14 @@ id '#1'}{}\fi}
\advance\@colN by 1\relax
}}}}}
\newcommand{\@@setdynamicframe}[2]{%
-\expandafter\expandafter\expandafter\@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname
+\expandafter\expandafter\expandafter
+\@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname
\def\ff@frame{}\edef\ff@width{\the\@ff@tmp@x}%
\edef\ff@height{\the\@ff@tmp@y}\def\ff@style{}\def\ff@frametype{}%
\def\ff@x{}\def\ff@y{}\def\ff@col{}\def\ff@txtcol{}\def\ff@backcol{}%
\def\ff@clear{}\def\ff@margin{}\def\ff@offset{}\def\ff@pages{}%
\def\ff@label{}\def\ff@evenx{}\def\ff@eveny{}%
-\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}%
+\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}\def\ff@shape{0}%
\setkeys{flowframe}{#2}%
\ifthenelse{\equal{\ff@frame}{}}{}{%
\setboolean{dynamicframe\romannumeral#1}{\ff@frame}}%
@@ -927,7 +1090,7 @@ id '#1'}{}\fi}
\expandafter\global\expandafter\setlength
\csname @df@\romannumeral#1@posy\endcsname{\ff@oddy}}%
\expandafter\xdef\csname @df@dim@\romannumeral#1\endcsname{%
-[c][\ff@height][t]{\ff@width}}%
+[c][\ff@height][\ff@valign]{\ff@width}}%
\ifthenelse{\equal{\ff@label}{}}{}{%
\@s@tdynamicframeid{#1}[\ff@label]}
\ifthenelse{\equal{\ff@frametype}{}}{}{%
@@ -946,6 +1109,11 @@ id '#1'}{}\fi}
\ifthenelse{\equal{\ff@angle}{}}{}{%
\expandafter
\xdef\csname @df@angle@\romannumeral#1\endcsname{\ff@angle}}%
+\if0\ff@shape
+\else
+\expandafter\global\expandafter
+\let\csname @df@shape@\romannumeral#1\endcsname\ff@shape
+\fi
\ifthenelse{\equal{\ff@pages}{}}{}{%
\expandafter\xdef\csname @df@pages@\romannumeral#1\endcsname{%
\ff@pages}}%
@@ -964,14 +1132,14 @@ frames}{dynamic frames don't have marginal notes}}%
}
\newcommand{\@@dynamicframeswapcoords}[1]{%
\setlength{\@ff@tmp@x}%
-{\csname @df@\romannumeral#1@evenx\endcsname}
+{\csname @df@\romannumeral#1@evenx\endcsname}%
\expandafter\setlength
\csname @df@\romannumeral#1@evenx\endcsname
{\csname @df@\romannumeral#1@posx\endcsname}%
\expandafter\setlength
\csname @df@\romannumeral#1@posx\endcsname{\@ff@tmp@x}%
\setlength{\@ff@tmp@y}%
-{\csname @df@\romannumeral#1@eveny\endcsname}
+{\csname @df@\romannumeral#1@eveny\endcsname}%
\expandafter\setlength
\csname @df@\romannumeral#1@eveny\endcsname
{\csname @df@\romannumeral#1@posy\endcsname}%
@@ -1016,7 +1184,7 @@ frames}{dynamic frames don't have marginal notes}}%
\@dynamicframeid{#1}\@setdynamiccontents{\ff@id}{#2}}
\newcommand{\@setdynamiccontents}[2]{%
\ifnum#1>\c@maxdynamic
-\PackageError{flowfram}{Dynamic frame \number#1 does not exist}{%
+\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
@@ -1037,9 +1205,10 @@ but there are only
\expandafter\@ff@addtolist
\csname @dynamicframe@\romannumeral#1\endcsname\entry{#2}%
\fi}
-\toksdef\ta=0 \toksdef\tb=2
-\long\def\@ff@addtolist#1\entry#2{\ta={{#2}}\tb=\expandafter{#1}%
-\xdef#1{\the\tb\the\ta}}
+\toksdef\flf@ta=0 \toksdef\flf@tb=2
+\long\def\@ff@addtolist#1\entry#2{\flf@ta={{#2}}%
+\flf@tb=\expandafter{#1}%
+\xdef#1{\the\flf@tb\the\flf@ta}}
\newcommand{\setinitialframe}[1]{\c@thisframe=#1%
\global\usedframebreaktrue
\global\setlength{\hsize}{%
@@ -1057,7 +1226,7 @@ Attempting to find the first page with a flow frame}%
\advance\c@curpg by -1\relax
\whiledo{\c@curpg>0}{\advance\c@curpg by -1\relax
\setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}%
-\@outputpage}
+\@outputpage}%
\c@thisframe=\@nxtcol
\fi
\@setcol{\c@thisframe}\relax
@@ -1070,13 +1239,13 @@ Attempting to find the first page with a flow frame}%
\finishthispage
\setallflowframes{pages=none}%
\settoheight{\@ff@staticH}{#1}%
-\settodepth{\@ff@tmp@y}{#1}
+\settodepth{\@ff@tmp@y}{#1}%
\addtolength{\@ff@staticH}{\@ff@tmp@y}%
-\ifdim\@ff@staticH>0pt
-\twocolumnStop[\c@page]{\@ff@staticH}
+\ifdim\@ff@staticH>0pt\relax
+\twocolumnStop[\c@page]{\@ff@staticH}%
\c@thisframe=\c@maxflow
\advance\c@thisframe by -1\relax
-\@twocolumn[>\c@page]
+\@twocolumn[>\c@page]%
\setstaticcontents{\c@maxstatic}{#1}%
\else
\@twocolumn
@@ -1089,13 +1258,13 @@ Attempting to find the first page with a flow frame}%
\finishthispage
\setallflowframes{pages=none}%
\settoheight{\@ff@staticH}{#1}%
-\settodepth{\@ff@tmp@y}{#1}
+\settodepth{\@ff@tmp@y}{#1}%
\addtolength{\@ff@staticH}{\@ff@tmp@y}%
-\ifdim\@ff@staticH>0pt
-\onecolumnStop[\c@page]{\@ff@staticH}
+\ifdim\@ff@staticH>0pt\relax
+\onecolumnStop[\c@page]{\@ff@staticH}%
\c@thisframe=\c@maxflow
\advance\c@thisframe by -1\relax
-\@onecolumn[>\c@page]
+\@onecolumn[>\c@page]%
\setstaticcontents{\c@maxstatic}{#1}%
\else
\@twocolumn
@@ -1117,9 +1286,8 @@ Frames must be defined in the preamble}#1}%
Ignoring \string\twocolumn\space found in document environment.
Frames must be defined in the preamble}#1}%
}
-\AtEndDocument{\finishthispage}
\newcommand{\@setcol}[1]{%
-\ifnum\c@maxflow<#1
+\ifnum\c@maxflow<#1\relax
\PackageError{flowfram}{Can't set frame '\number#1', doesn't
exist}{}%
\else
@@ -1246,11 +1414,15 @@ or text might not appear correctly}%
\renewcommand{\@dothefoot}{}%
\renewcommand{\@dodynamicthehead}{%
\@dynamicframeid{header}%
-\expandafter\def\csname @dynamicframe@\romannumeral\ff@id\endcsname{\vfill\@thehead\vfill}
+\expandafter
+\def\csname @dynamicframe@\romannumeral\ff@id\endcsname{%
+\vfill\@thehead\vfill}%
}%
\renewcommand{\@dodynamicthefoot}{%
\@dynamicframeid{footer}%
-\expandafter\def\csname @dynamicframe@\romannumeral\ff@id\endcsname{\vfill\@thefoot\vfill}
+\expandafter
+\def\csname @dynamicframe@\romannumeral\ff@id\endcsname{%
+\vfill\@thefoot\vfill}%
}%
}
\@onlypreamble{\makedfheaderfooter}
@@ -1294,25 +1466,41 @@ or text might not appear correctly}%
\newif\if@ff@moreframes
\newcommand{\@ff@checkifmoreframes}{%
\@ff@moreframesfalse
-\@colN=0\relax
+\@colN=\c@thisframe
\whiledo{\@colN<\c@maxflow}{%
\advance\@colN by 1\relax
\edef\ff@pages{\csname @ff@pages@\romannumeral\@colN\endcsname}%
-\@ff@checkpages{\ff@pages}}}
-\newcommand{\@ff@checkpages}[1]{%
-\@for \@ff@pp:=#1\do{%
-\@ff@checkthispage{\@ff@pp}}}
-\newcommand{\@ff@checkthispage}[1]{%
-\ifthenelse{\equal{#1}{all}\or\equal{#1}{even}\or\equal{#1}{odd}}{%
+\@ff@checkpages{\ff@pages}%
+}%
+\if@ff@moreframes
+\else
+\@ff@tmpN=\c@page
+\advance\@ff@tmpN by 1\relax
+\@colN=0\relax
+\whiledo{\@colN<\c@thisframe}{%
+\advance\@colN by 1\relax
+\edef\ff@pages{\csname @ff@pages@\romannumeral\@colN\endcsname}%
+\@ff@checkpages[\@ff@tmpN]{\ff@pages}%
+}%
+\fi
+}
+\newcommand{\@ff@checkpages}[2][\c@page]{%
+\@for\@ff@pp:=#2\do{%
+\@ff@checkthispage{#1}{\@ff@pp}}}
+\newcommand{\@ff@checkthispage}[2]{%
+\ifthenelse{\equal{#2}{all}\or\equal{#2}{even}\or\equal{#2}{odd}}{%
\@ff@moreframestrue}{%
-\ifthenelse{\equal{#1}{none}}{}{%
-\@ff@checknumrange{#1}}}}
-\newcommand{\@ff@checknumrange}[1]{%
+\ifthenelse{\equal{#2}{none}}{}{%
+\@ff@checknumrange{#1}{#2}}}}
+\newcommand{\@ff@checknumrange}[2]{%
\def\@ff@numstart{0}\def\@ff@numend{10000}%
-\@ff@getrange{#1}%
-\ifnum\@ff@numend>\c@page
+\@ff@getrange{#2}%
+\ifnum\@ff@numend>#1\relax
\@ff@moreframestrue
\else
+\ifnum\@ff@numend=#1\relax
+\@ff@moreframestrue
+\fi
\fi
}
\newcount\c@ffrangenum
@@ -1340,7 +1528,7 @@ or text might not appear correctly}%
\edef\@ff@numstart{\number\c@ffrangenum}%
\def\@ff@numend{10000}}
\def\@@ff@getrange#1-#2\end{%
-\ifx\relax#2
+\ifx\relax#2\relax
\def\@ff@numstart{#1}\def\@ff@numend{#1}%
\else
\def\@ff@numstart{#1}%
@@ -1366,9 +1554,12 @@ adding new one}%
\@colN=#1\relax
\c@curpg=\c@page
\loop
-\ifnum\@colN=\c@maxflow\@colN=1\@ff@nwpgtrue
-\advance\c@curpg by 1\relax
-\else\advance\@colN by 1\fi
+\ifnum\@colN=\c@maxflow
+ \@colN=1\@ff@nwpgtrue
+ \advance\c@curpg by 1\relax
+\else
+ \advance\@colN by 1\relax
+\fi
\@ff@chckifthispg{\c@curpg}{\@colN}%
\if@notthiscol
\repeat
@@ -1415,7 +1606,7 @@ adding new one}%
\edef\ff@txtcol{\csname @ff@txtcol@\romannumeral#1\endcsname}%
\edef\ff@backcol{\csname @ff@backcol@\romannumeral#1\endcsname}%
\@ff@setoffset{#1}%
-\rotateframe{\csname @ff@angle@\romannumeral#1\endcsname}{
+\rotateframe{\csname @ff@angle@\romannumeral#1\endcsname}{%
\ifthenelse{\boolean{columnframe\romannumeral#1}}{%
\@ff@fbox{\csname colwidth\romannumeral#1\endcsname}%
{\csname colheight\romannumeral#1\endcsname}{%
@@ -1633,7 +1824,8 @@ adding new one}%
}%
}
\def\@ff@getstaticpos[#1][#2][#3]#4{\@ff@tmp@x=#4\relax
-\@ff@tmp@y=#2}
+\@ff@tmp@y=#2\relax
+\def\ff@valign{#3}}
\newcommand{\@dostaticbox}[1]{%
\edef\ff@frametype{%
\csname @sf@frametype@\romannumeral#1\endcsname}%
@@ -1718,6 +1910,36 @@ adding new one}%
\ifthenelse{\boolean{@df@clear@\romannumeral\@colN}}{%
\expandafter\global\expandafter
\gdef\csname @dynamicframe@\romannumeral\@colN\endcsname{}}{}}}
+\newcommand{\@dodfparbox}[1]{%
+\expandafter\let\expandafter
+\@ff@parshape\csname @df@shape@\romannumeral#1\endcsname
+\expandafter\@ff@getshape\@ff@parshape\relax
+\ifcase\ff@shape
+\expandafter\expandafter\expandafter
+\parbox\csname @df@dim@\romannumeral#1\endcsname
+{%
+\setlength\parindent\sdfparindent
+\csname\ff@style\endcsname{\ff@contents}}%
+\or
+\expandafter\expandafter\expandafter
+\parbox\csname @df@dim@\romannumeral#1\endcsname
+{%
+\setlength\parindent\sdfparindent
+\csname\ff@style\endcsname{{%
+\let\oldpar=\par
+\let\par=\ffpshpar
+\@ff@setsecthead
+\@ff@parshape
+\ff@contents\oldpar}}}%
+\or
+\expandafter\expandafter\expandafter
+\parbox\csname @df@dim@\romannumeral#1\endcsname
+{%
+\setlength\parindent\sdfparindent
+\csname\ff@style\endcsname{{\@ff@disablesec\@ff@parshape
+\ff@contents\par}}}%
+\fi
+}
\newcommand{\@dodynamicbox}[1]{%
\edef\ff@frametype{%
\csname @df@frametype@\romannumeral#1\endcsname}%
@@ -1732,15 +1954,11 @@ adding new one}%
\rotateframe{\csname @df@angle@\romannumeral#1\endcsname}{%
\ifthenelse{\boolean{dynamicframe\romannumeral#1}}{%
\@ff@fbox{\@ff@tmp@x}{\@ff@tmp@y}%
-{\expandafter\expandafter\expandafter
-\parbox\csname @df@dim@\romannumeral#1\endcsname
-{\csname\ff@style\endcsname{\ff@contents}}}%
+{\@dodfparbox{#1}}%
{\csname\ff@frametype\endcsname}%
}{%
\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}{%
-\expandafter\expandafter\expandafter
-\parbox\csname @df@dim@\romannumeral#1\endcsname
-{\csname \ff@style\endcsname{\ff@contents}}}%
+\@dodfparbox{#1}}%
}}}
\newcommand{\@dodynamicbbox}[1]{%
\edef\ff@col{}%
@@ -1850,14 +2068,18 @@ adding new one}%
\vbox to \textheight{\hbox to \textwidth{}}}{}}}
\newlength\ffevenoffset
\newcommand{\@ff@do@allframes}{%
+\ffevenoffset=0pt\relax
\if@twoside
\ifodd\c@page
\else
-\ffevenoffset=-\oddsidemargin
-\advance\ffevenoffset by \evensidemargin
-\kern\ffevenoffset
+\ffevenoffset=-\oddsidemargin\relax
+\advance\ffevenoffset by \evensidemargin\relax
+\kern\ffevenoffset\relax
\fi
\fi
+\setlength{\@ff@tmp@x}{\textwidth}%
+\advance\@ff@tmp@x by -\ffevenoffset\relax
+\makebox[\@ff@tmp@x][l]{%
\@s@tfr@mes{%
\@ff@doallstatics
\@@doheader
@@ -1875,7 +2097,7 @@ adding new one}%
\ifshowmargins
\@ff@drawmargins
\fi
-}}
+}}}
\newcount\@nxtcol
\def\@outputdblcol{%
\@nxtcol=\c@thisframe
@@ -1886,7 +2108,7 @@ adding new one}%
\@setcolbox\c@thisframe
\if@specialpage
\global\@specialpagefalse
- \@nameuse{ps@\@specialstyle}
+ \@nameuse{ps@\@specialstyle}\relax
\fi
\if@twoside
\ifodd\count\z@
@@ -1974,7 +2196,7 @@ adding new one}%
\ifcase#2
\PackageError{flowfram}{%
You have requested 0 flowframes!}{%
-It does not make much sense to ask to create 0 flow frames}
+It does not make much sense to ask to create 0 flow frames}%
\or
\onecolumninarea[#1]{#3}{#4}{#5}{#6}%
\or
@@ -2268,7 +2490,7 @@ which really doesn't make sense}%
\if@twoside
\computeleftedgeeven{\@ff@tmp@x@even}%
\else
-\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}
+\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}%
\fi
\computebottomedge{\@ff@tmp@y}%
\addtolength{\@ff@tmp@x}{#1}%
@@ -2473,7 +2695,9 @@ which really doesn't make sense}%
\ifthenelse{\equal{#5}{}}{%
\newstaticframe[#1]{#2}{\@ff@staticH}{\@ff@tmp@x}{\@ff@tmp@y}}%
{\newstaticframe[#1]{#2}{\@ff@staticH}{\@ff@tmp@x}{\@ff@tmp@y}[#5]}%
-\expandafter\global\expandafter\setlength\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname{\@ff@tmp@x@even}%
+\expandafter\global\expandafter
+\setlength\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname{%
+\@ff@tmp@x@even}%
\@setframecol#4\end{\c@maxstatic}{backcol}{sf}%
\addtolength{\@ff@tmp@y}{\@ff@staticH}%
}
@@ -2486,7 +2710,8 @@ which really doesn't make sense}%
\advance\@thisstrip by -1\relax
\next}
-\newcommand{\@@nexthNband}[3]{\@nexthband{\ff@pages}{\@ff@staticW}{#1}{#2}{#3}\@nexthNband}
+\newcommand{\@@nexthNband}[3]{%
+\@nexthband{\ff@pages}{\@ff@staticW}{#1}{#2}{#3}\@nexthNband}
\newcommand{\makebackgroundframe}[1][all]{%
\ifnum\c@maxstatic>0\relax
\PackageWarning{flowfram}{Background frame is not
@@ -2985,7 +3210,7 @@ Unknown section type '#3'}{}}{%
\@ff@tmpN=0\relax
\whiledo{\@ff@tmpN<\c@maxthumbtabs}{%
\advance\@ff@tmpN by 1\relax
-\@greyscale=\@ff@tmpN
+\@greyscale=\@ff@tmpN\relax
\multiply\@greyscale by 60\relax
\divide\@greyscale by \c@maxthumbtabs
\advance\@greyscale by 25\relax
@@ -3182,11 +3407,11 @@ ttb file may not be up-to-date}}{%
}%
\fi
\@ifundefined{@toc@\romannumeral#2}{%
-\ta=\expandafter{#1}%
-\expandafter\xdef\csname @toc@\romannumeral#2\endcsname{\the\ta}}{%
-\ta=\expandafter{#1}%
-\tb=\expandafter\expandafter\expandafter{\csname @toc@\romannumeral#2\endcsname}%
-\expandafter\xdef\csname @toc@\romannumeral#2\endcsname{\the\tb\the\ta}}%
+\flf@ta=\expandafter{#1}%
+\expandafter\xdef\csname @toc@\romannumeral#2\endcsname{\the\flf@ta}}{%
+\flf@ta=\expandafter{#1}%
+\flf@tb=\expandafter\expandafter\expandafter{\csname @toc@\romannumeral#2\endcsname}%
+\expandafter\xdef\csname @toc@\romannumeral#2\endcsname{\the\flf@tb\the\flf@ta}}%
\if@minitoc
\if@contsline
\@ifundefined{\@ttb@contstype}{\@ttb@level=6}{%
@@ -3197,9 +3422,9 @@ ttb file may not be up-to-date}}{%
\expandafter\gdef\csname @minitoc@\romannumeral\c@maxminitoc\endcsname{}\relax
\else
\ifnum\@ttb@level>\@ttb@minitoclevel
- \ta=\expandafter{#1}\relax
- \tb=\expandafter\expandafter\expandafter{\csname @minitoc@\romannumeral\c@maxminitoc\endcsname}\relax
- \expandafter\xdef\csname @minitoc@\romannumeral\c@maxminitoc\endcsname{\the\tb\the\ta}
+ \flf@ta=\expandafter{#1}\relax
+ \flf@tb=\expandafter\expandafter\expandafter{\csname @minitoc@\romannumeral\c@maxminitoc\endcsname}\relax
+ \expandafter\xdef\csname @minitoc@\romannumeral\c@maxminitoc\endcsname{\the\flf@tb\the\flf@ta}
\fi
\fi
\fi
diff --git a/Master/texmf-dist/tpm/flowfram.tpm b/Master/texmf-dist/tpm/flowfram.tpm
index 0a57804bc02..25c39cccf23 100644
--- a/Master/texmf-dist/tpm/flowfram.tpm
+++ b/Master/texmf-dist/tpm/flowfram.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/flowfram.zip">
<TPM:Name>flowfram</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/10/04 08:43:01</TPM:Date>
+ <TPM:Date>2007/03/09 12:30:00</TPM:Date>
<TPM:Version></TPM:Version>
<TPM:Creator>karl</TPM:Creator>
<TPM:Title>
@@ -22,11 +22,12 @@ layout.
<TPM:Size>1015203</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="109317">
+ <TPM:RunFiles size="114753">
texmf-dist/tex/latex/flowfram/flowfram.sty
texmf-dist/tpm/flowfram.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="727296">
+ <TPM:DocFiles size="1096618">
+texmf-dist/doc/latex/flowfram/CHANGES
texmf-dist/doc/latex/flowfram/README
texmf-dist/doc/latex/flowfram/ffuserguide.pdf
texmf-dist/doc/latex/flowfram/ffuserguide.tex
@@ -37,12 +38,14 @@ texmf-dist/doc/latex/flowfram/samples/egg.eps
texmf-dist/doc/latex/flowfram/samples/egg.png
texmf-dist/doc/latex/flowfram/samples/news.pdf
texmf-dist/doc/latex/flowfram/samples/news.tex
+texmf-dist/doc/latex/flowfram/samples/news2.pdf
+texmf-dist/doc/latex/flowfram/samples/news2.tex
texmf-dist/doc/latex/flowfram/samples/poster.pdf
texmf-dist/doc/latex/flowfram/samples/poster.tex
texmf-dist/doc/latex/flowfram/samples/sheep.eps
texmf-dist/doc/latex/flowfram/samples/sheep.png
</TPM:DocFiles>
- <TPM:SourceFiles size="178590">
+ <TPM:SourceFiles size="185701">
texmf-dist/source/latex/flowfram/flowfram.dtx
texmf-dist/source/latex/flowfram/flowfram.ins
</TPM:SourceFiles>
diff --git a/Master/texmf/lists/flowfram b/Master/texmf/lists/flowfram
index 6adcd85b16e..21093995c0f 100644
--- a/Master/texmf/lists/flowfram
+++ b/Master/texmf/lists/flowfram
@@ -1,3 +1,4 @@
+texmf-dist/doc/latex/flowfram/CHANGES
texmf-dist/doc/latex/flowfram/README
texmf-dist/doc/latex/flowfram/ffuserguide.pdf
texmf-dist/doc/latex/flowfram/ffuserguide.tex
@@ -8,6 +9,8 @@ texmf-dist/doc/latex/flowfram/samples/egg.eps
texmf-dist/doc/latex/flowfram/samples/egg.png
texmf-dist/doc/latex/flowfram/samples/news.pdf
texmf-dist/doc/latex/flowfram/samples/news.tex
+texmf-dist/doc/latex/flowfram/samples/news2.pdf
+texmf-dist/doc/latex/flowfram/samples/news2.tex
texmf-dist/doc/latex/flowfram/samples/poster.pdf
texmf-dist/doc/latex/flowfram/samples/poster.tex
texmf-dist/doc/latex/flowfram/samples/sheep.eps