diff options
author | Karl Berry <karl@freefriends.org> | 2008-07-02 17:45:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-07-02 17:45:30 +0000 |
commit | b6814aa29ce2bd0832caa067247b509b8fc566aa (patch) | |
tree | ca636f4cb0e0f8f9c85de4d9cb1dfd6f4dd5757c /Master/texmf-dist/doc/latex | |
parent | 34b50d3efdaccd76772cd114b3aab830c4cf95b1 (diff) |
flowfram update (1jul08)
git-svn-id: svn://tug.org/texlive/trunk@9166 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
31 files changed, 21822 insertions, 661 deletions
diff --git a/Master/texmf-dist/doc/latex/flowfram/CHANGES b/Master/texmf-dist/doc/latex/flowfram/CHANGES index 32b1200bb6a..17229b62e91 100644 --- a/Master/texmf-dist/doc/latex/flowfram/CHANGES +++ b/Master/texmf-dist/doc/latex/flowfram/CHANGES @@ -1,5 +1,35 @@ flowfram change log +1.11 (2008/06/28) : + * fixed bugs in \@getstaticbounds and \@getflowbounds that used + wrong frame types. (Bug reported by Lutz Goldmann.) + + * added : + \ffruledeclarations + \ffvrule + \ffhrule + \labelflowidn + displayedframe counter + \labelflow + \getflowlabel + \getflowid + \getstaticlabel + \getstaticid + \getdynamiclabel + \getdynamicid + \getstaticevenbounds + \getflowevenbounds + + * added relative location commands + + * removed unwanted spaces from \setflowframe + + * removed unwanted space from \setdynamicframe + + * fixed 'clear' key bug in \setdynamicframe + + * added flowfram.perl + 1.10 : * fixed license text * made some long commands short diff --git a/Master/texmf-dist/doc/latex/flowfram/README b/Master/texmf-dist/doc/latex/flowfram/README index 6a0e1555adc..b485a0ea21c 100644 --- a/Master/texmf-dist/doc/latex/flowfram/README +++ b/Master/texmf-dist/doc/latex/flowfram/README @@ -1,14 +1,16 @@ -LaTeX Package : flowfram v 1.10 +LaTeX Package : flowfram v 1.11 -Last Modified : 21st Aug 2007 +Last Modified : 28th June 2008 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 containing sample files +Files : flowfram.dtx - documented source file + flowfram.ins - installation script + flowfram.perl - LaTeX2HTML style file (see below) + ffuserguide.pdf - user manual + ffuserguide.html - user manual + ffuserguide.tex - source code for user manual + samples/ - directory containing sample files Create frames for posters, brochures or magazines @@ -31,6 +33,16 @@ makeindex -s flowfram.ist -o flowfram.sgi -t flowfram.slg flowfram.sgo latex flowfram.dtx latex flowfram.dtx +LATEX2HTML +========== + +This package also supplies the LaTeX2HTML style file flowfram.perl. +Note however that this is not intended to emulate the flowfram +package. Most of the flowfram related commands are simply ignored +(along with their arguments) to provide a simple HTML version of the +document. The resulting HTML document will not contain any HTML +frames unless other packages (such as frames.perl) are used. + 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. diff --git a/Master/texmf-dist/doc/latex/flowfram/README.flowfram b/Master/texmf-dist/doc/latex/flowfram/README.flowfram new file mode 100644 index 00000000000..b485a0ea21c --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/README.flowfram @@ -0,0 +1,50 @@ +LaTeX Package : flowfram v 1.11 + +Last Modified : 28th June 2008 + +Author : Nicola Talbot + +Files : flowfram.dtx - documented source file + flowfram.ins - installation script + flowfram.perl - LaTeX2HTML style file (see below) + ffuserguide.pdf - user manual + ffuserguide.html - user manual + ffuserguide.tex - source code for user manual + samples/ - directory containing 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 +makeindex -s flowfram.ist -o flowfram.sgi -t flowfram.slg flowfram.sgo +latex flowfram.dtx +latex flowfram.dtx + +LATEX2HTML +========== + +This package also supplies the LaTeX2HTML style file flowfram.perl. +Note however that this is not intended to emulate the flowfram +package. Most of the flowfram related commands are simply ignored +(along with their arguments) to provide a simple HTML version of the +document. The resulting HTML document will not contain any HTML +frames unless other packages (such as frames.perl) are used. + +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/TDS_READY b/Master/texmf-dist/doc/latex/flowfram/TDS_READY new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/TDS_READY diff --git a/Master/texmf-dist/doc/latex/flowfram/brochure.pdf b/Master/texmf-dist/doc/latex/flowfram/brochure.pdf Binary files differindex e6fad4b7b11..7c9b9a491c6 100644 --- a/Master/texmf-dist/doc/latex/flowfram/brochure.pdf +++ b/Master/texmf-dist/doc/latex/flowfram/brochure.pdf diff --git a/Master/texmf-dist/doc/latex/flowfram/brochure.tex b/Master/texmf-dist/doc/latex/flowfram/brochure.tex index f5f1fdedd18..d0434139854 100644 --- a/Master/texmf-dist/doc/latex/flowfram/brochure.tex +++ b/Master/texmf-dist/doc/latex/flowfram/brochure.tex @@ -3,6 +3,7 @@ \usepackage[landscape,margin=1in]{geometry} \usepackage{color} \usepackage{flowfram} +\usepackage[colorlinks]{hyperref} % Use sans-serif font as default font \renewcommand{\familydefault}{cmss} @@ -51,7 +52,7 @@ \setdynamiccontents*{footer}{% School of Computing Sciences, University of East Anglia\hfill http://www.cmp.uea.ac.uk/\hfill -page \thepage\ of \pageref{lastpage}} +page \thepage\ of \pageref*{lastpage}} \newcommand{\env}[1]{\texttt{#1}} @@ -89,14 +90,26 @@ 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. +This is column~\thedisplayedframe. + +The main type of frame is the flow frame. This is described on +column~\ref{flow:flowframe} on page~\pageref{flow:flowframe}. +The order used to draw the contents of each frame on the page +is described in column~\ref{flow:stacking} on +page~\pageref{flow:stacking}. Floats are describe in +column~\ref{flow:floats} on page~\pageref{flow:floats}. + \chapter{Setting up Frames} +This is column~\thedisplayedframe. + The \textsl{flowfram} package provides three types of frame: {flow frames}, {static frames} and {dynamic frames}. \section*{Flow Frames} +\labelflow{flow:flowframe} The flow frame is the principle type of frame. The text of the \env{document} environment will flow from one frame to the next in order of definition. Each @@ -128,6 +141,8 @@ are re-typeset on each page. (A static frame stores its contents in a savebox, whereas a dynamic frame stores its contents in a macro). +This is column~\thedisplayedframe. + \chapter{Frame Attributes} \label{sec:modattr} @@ -230,6 +245,7 @@ be shown in draft mode), according to the format given by \section*{Frame Stacking Order} +\labelflow{flow:stacking} The material on each page is placed in the following order: \begin{enumerate} \item Each static frame defined for that page in ascending @@ -269,6 +285,7 @@ next frame, use the command\newline \section*{Floats} +\labelflow{flow:floats} Since floats (such as figures and tables) can only go in {flow frames}, this package provides the additional environments: diff --git a/Master/texmf-dist/doc/latex/flowfram/ffuserguide.html b/Master/texmf-dist/doc/latex/flowfram/ffuserguide.html new file mode 100644 index 00000000000..d2458c991e9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/ffuserguide.html @@ -0,0 +1,4881 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> + +<!--Converted with LaTeX2HTML 2002 (1.67) +original version by: Nikos Drakos, CBLU, University of Leeds +* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan +* with significant contributions from: + Jens Lippmann, Marek Rouchal, Martin Wilck and others --> +<HTML> +<HEAD> +<TITLE>Creating Flow Frames for Posters, Brochures or Magazines using flowfram.sty v 1.11</TITLE> +<META NAME="description" CONTENT="Creating Flow Frames for Posters, Brochures or Magazines using flowfram.sty v 1.11"> +<META NAME="keywords" CONTENT="LaTeX; text frames; posters; brochures; magazines; newspapers"> +<META NAME="resource-type" CONTENT="document"> +<META NAME="distribution" CONTENT="global"> + +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> +<META NAME="Generator" CONTENT="LaTeX2HTML v2002"> +<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> + + +</HEAD> + +<BODY > +<A NAME="top"></A> + +<P> + +<P> + +<H1 ALIGN=CENTER>Creating Flow Frames for Posters, Brochures or +Magazines using flowfram.sty v 1.11</H1> +<P ALIGN=CENTER><STRONG>Nicola L. C. Talbot</STRONG></P> +<BR><P ALIGN=CENTER><I>Date:</I> 28th June 2008</P> +<P ALIGN=LEFT></P> +<BR><P><P ALIGN=LEFT><FONT SIZE=-1>Key words and phrases: LaTeX; text frames; posters; brochures; magazines; newspapers</FONT></P> + +<P> + +<P> +Dr Nicola Talbot +<BR> +School of Computing Sciences +<BR> +University of East Anglia +<BR> +Norwich. Norfolk. NR4 7TJ. +<BR> +United Kingdom +<BR><TT><A NAME="tex2html1" + HREF="http://theoval.cmp.uea.ac.uk/~nlct/">http://theoval.cmp.uea.ac.uk/~nlct/</A></TT> +<P> + +<P> + +<BR> + +<H2><A NAME="SECTION0010000000000000000000"> +Contents</A> +</H2> +<!--Table of Contents--> + +<UL> +<LI><A NAME="tex2html268" + HREF="ffuserguide.html#SECTION0020000000000000000000">1. Introduction</A> +<UL> +<LI><A NAME="tex2html269" + HREF="ffuserguide.html#SECTION0021000000000000000000">1.1 Draft Option</A> +<LI><A NAME="tex2html270" + HREF="ffuserguide.html#SECTION0022000000000000000000">1.2 Frame Stacking Order</A> +<LI><A NAME="tex2html271" + HREF="ffuserguide.html#SECTION0023000000000000000000">1.3 HTML</A> +</UL> +<BR> +<LI><A NAME="tex2html272" + HREF="ffuserguide.html#SECTION0030000000000000000000">2. Defining New Frames</A> +<UL> +<LI><A NAME="tex2html273" + HREF="ffuserguide.html#SECTION0031000000000000000000">2.1 Flow Frames</A> +<UL> +<LI><A NAME="tex2html274" + HREF="ffuserguide.html#SECTION0031100000000000000000">2.1.1 Prematurely Ending a Flow Frame</A> +</UL> +<LI><A NAME="tex2html275" + HREF="ffuserguide.html#SECTION0032000000000000000000">2.2 Static Frames</A> +<UL> +<LI><A NAME="tex2html276" + HREF="ffuserguide.html#SECTION0032100000000000000000">2.2.1 Important Notes</A> +</UL> +<LI><A NAME="tex2html277" + HREF="ffuserguide.html#SECTION0033000000000000000000">2.3 Dynamic Frames</A> +<UL> +<LI><A NAME="tex2html278" + HREF="ffuserguide.html#SECTION0033100000000000000000">2.3.1 Important Notes</A> +</UL> +</UL> +<BR> +<LI><A NAME="tex2html279" + HREF="ffuserguide.html#SECTION0040000000000000000000">3. Modifying Frame Attributes</A> +<UL> +<LI><A NAME="tex2html280" + HREF="ffuserguide.html#SECTION0041000000000000000000">3.1 Non-Rectangular Frames</A> +</UL> +<BR> +<LI><A NAME="tex2html281" + HREF="ffuserguide.html#SECTION0050000000000000000000">4. Locations and Dimensions</A> +<UL> +<LI><A NAME="tex2html282" + HREF="ffuserguide.html#SECTION0051000000000000000000">4.1 Determining the Location of the Typeblock</A> +<LI><A NAME="tex2html283" + HREF="ffuserguide.html#SECTION0052000000000000000000">4.2 Determining the Dimensions and Locations of Frames</A> +<LI><A NAME="tex2html284" + HREF="ffuserguide.html#SECTION0053000000000000000000">4.3 Relative Locations</A> +</UL> +<BR> +<LI><A NAME="tex2html285" + HREF="ffuserguide.html#SECTION0060000000000000000000">5. Predefined Layouts</A> +<UL> +<LI><A NAME="tex2html286" + HREF="ffuserguide.html#SECTION0061000000000000000000">5.1 Column Styles</A> +<LI><A NAME="tex2html287" + HREF="ffuserguide.html#SECTION0062000000000000000000">5.2 Column Styles with an Additional Frame</A> +<LI><A NAME="tex2html288" + HREF="ffuserguide.html#SECTION0063000000000000000000">5.3 Backdrop Effects</A> +<UL> +<LI><A NAME="tex2html289" + HREF="ffuserguide.html#SECTION0063100000000000000000">5.3.1 Vertical stripe effects</A> +<LI><A NAME="tex2html290" + HREF="ffuserguide.html#SECTION0063200000000000000000">5.3.2 Horizontal stripe effect</A> +<LI><A NAME="tex2html291" + HREF="ffuserguide.html#SECTION0063300000000000000000">5.3.3 Background Frame</A> +<LI><A NAME="tex2html292" + HREF="ffuserguide.html#SECTION0063400000000000000000">5.3.4 Vertical and Horizontal Rules</A> +</UL> +</UL> +<BR> +<LI><A NAME="tex2html293" + HREF="ffuserguide.html#SECTION0070000000000000000000">6. Thumbtabs and Minitocs</A> +<UL> +<LI><A NAME="tex2html294" + HREF="ffuserguide.html#SECTION0071000000000000000000">6.1 Thumbtabs</A> +<LI><A NAME="tex2html295" + HREF="ffuserguide.html#SECTION0072000000000000000000">6.2 Minitocs</A> +</UL> +<BR> +<LI><A NAME="tex2html296" + HREF="ffuserguide.html#SECTION0080000000000000000000">7. Global Settings</A> +<UL> +<LI><A NAME="tex2html297" + HREF="ffuserguide.html#SECTION0081000000000000000000">7.1 Macros</A> +<LI><A NAME="tex2html298" + HREF="ffuserguide.html#SECTION0082000000000000000000">7.2 Lengths</A> +<LI><A NAME="tex2html299" + HREF="ffuserguide.html#SECTION0083000000000000000000">7.3 Counters</A> +</UL> +<BR> +<LI><A NAME="tex2html300" + HREF="ffuserguide.html#SECTION0090000000000000000000">8. Troubleshooting</A> +<UL> +<LI><A NAME="tex2html301" + HREF="ffuserguide.html#SECTION0091000000000000000000">8.1 General Queries</A> +<LI><A NAME="tex2html302" + HREF="ffuserguide.html#SECTION0092000000000000000000">8.2 Unexpected Output</A> +<LI><A NAME="tex2html303" + HREF="ffuserguide.html#SECTION0093000000000000000000">8.3 Error Messages</A> +</UL> +<BR> +<LI><A NAME="tex2html304" + HREF="ffuserguide.html#SECTION00100000000000000000000">Glossary</A> +<LI><A NAME="tex2html305" + HREF="ffuserguide.html#SECTION00110000000000000000000">Index</A> +</UL> +<!--End of Table of Contents--> +<P> + +<P> + +<P> + +<H1><A NAME="SECTION0020000000000000000000"> +1. Introduction</A> +</H1> + +<P> + +<I>This chapter provides a brief overview of the package, +the package options and the various frame types.</I> +<P> + +<P> +The <TT>flowfram</TT> package is a LaTeX2e package designed to +enable you to create text <A HREF=ffuserguide.html#gls:frame NAME="11380">frames</A> in a document such that +the contents of the <TT>document</TT><A NAME="3569"></A> environment flow from one +frame to the next in the order that 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. + +<P> +The <TT>flowfram</TT> package provides three types of frame: +<A HREF=ffuserguide.html#gls:flow NAME="11395">flow frames</A>, <A HREF=ffuserguide.html#gls:static NAME="11402">static frames</A> and <A HREF=ffuserguide.html#gls:dynamic NAME="11409">dynamic frames</A> with dimensions and +positions specified by the +user<A NAME="tex2html2" + HREF="#foot3502"><SUP>1.1</SUP></A>. +The main contents of the document environment flow from +one flow frame to the next in the order of definition, +whereas the contents of the static and dynamic frames +are set explicitly using commands described in +<A HREF="ffuserguide.html#sec:modattr">Modifying Frame +Attributes</A>. Note that +unless otherwise stated, all co-ordinates are relative to the +bottom left hand corner of the <A HREF=ffuserguide.html#gls:typeblock NAME="11420">typeblock</A>. If you have +a two-sided document, the absolute position of the typeblock may vary depending on the values of <TT>\oddsidemargin</TT><A NAME="3572"></A> +and <TT>\evensidemargin</TT><A NAME="3577"></A>, and all the frames will shift +accordingly unless otherwise indicated. + +<P> +Since floats (such as figures and tables) can only go in +flow frames, this package provides +the additional environments: +<TT>staticfigure</TT><A NAME="3582"></A> and +<TT>statictable</TT><A NAME="3585"></A> which can be used in static frames and dynamic frames. Unlike their <TT>figure</TT><A NAME="3588"></A> and +<TT>table</TT><A NAME="3591"></A> counterparts, they are fixed in place, and +so do not take an optional placement specifier. The +<TT>\caption</TT><A NAME="3594"></A> and <TT>\label</TT><A NAME="3599"></A> commands can +be used within <TT>staticfigure</TT><A NAME="3604"></A> and <TT>statictable</TT><A NAME="3607"></A> as +usual, but remember that if the frame is displayed on multiple +pages, you may end up with multiply defined labels. + +<P> +The standard <TT>figure</TT><A NAME="3610"></A> and <TT>table</TT><A NAME="3613"></A> commands will +behave as usual in the flow frames, but their starred versions, +<TT>figure*</TT><A NAME="3616"></A> and <TT>table*</TT><A NAME="3619"></A> behave no differently +from <TT>figure</TT><A NAME="3622"></A> and <TT>table</TT><A NAME="3625"></A><A NAME="tex2html3" + HREF="#foot404"><SUP>1.2</SUP></A>. + +<P> +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. + +<P> +You should load <TT>flowfram</TT> <I>after</I> <TT>hyperref</TT><A NAME="3628"></A> and any +colour package (e.g. <TT>color</TT><A NAME="3631"></A>). +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0021000000000000000000"> +1.1 Draft Option</A> +</H1> + +<P> +The <TT>flowfram</TT> package has the package option <TT>draft</TT><A NAME="3638"></A> +which will draw the <A HREF=ffuserguide.html#gls:bbox NAME="11490">bounding boxes</A> for +each <A HREF=ffuserguide.html#gls:frame NAME="11497">frame</A> that has been defined. At the bottom right of each +bounding box (except for the bounding box denoting the +<A HREF=ffuserguide.html#gls:typeblock NAME="11512">typeblock</A>), a marker will be shown in the form: +[<I>T</I>:<I>idn</I>;<I>idl</I>], where <I>T</I> is a single +letter denoting the frame type, <I>idn</I> is the <A HREF=ffuserguide.html#gls:idn NAME="11523">identification number (IDN)</A> for the frame and <I>idl</I> is the <A HREF=ffuserguide.html#gls:idl NAME="11534">identification label (IDL)</A> for that +frame. Values of <I>T</I> are: <TT>F</TT> (<A HREF=ffuserguide.html#gls:flow NAME="11545">flow frame</A>), +<TT>S</TT> (<A HREF=ffuserguide.html#gls:static NAME="11552">static frame</A>) or <TT>D</TT> (<A HREF=ffuserguide.html#gls:dynamic NAME="11559">dynamic frame</A>). +Markers of the form: [M:<I>idn</I>] indicate that the +bounding box is the area taken up by the margin for flow frame with IDN <I>idn</I>. Note that even if a frame has been rotated, the bounding box will not be rotated. + +<P> +If you want to show or hide specific types of bounding +boxes, you can use one of the following commands: + +<UL> +<LI><TT>\showtypeblocktrue</TT><A NAME="3641"></A> Display the bounding box for the typeblock. + +<P> +</LI> +<LI><TT>\showtypeblockfalse</TT><A NAME="3646"></A> Do not display the bounding box for the typeblock. + +<P> +</LI> +<LI><TT>\showmarginstrue</TT><A NAME="3651"></A> Display the bounding box for the margins. + +<P> +</LI> +<LI><TT>\showmarginsfalse</TT><A NAME="3656"></A> Do not display the bounding box for the margins. + +<P> +</LI> +<LI><TT>\showframebboxtrue</TT><A NAME="3661"></A> Display the bounding box for the frames. + +<P> +</LI> +<LI><TT>\showframebboxfalse</TT><A NAME="3666"></A> Do not display the bounding box for the frames. + +<P> +</LI> +</UL> + +<P> +You can see the layout for the current page (irrespective of +whether or not the <TT>draft</TT><A NAME="3671"></A> option has been set) using +the command: + +<P> +<TT>\flowframeshowlayout</TT><A NAME="3674"></A> +<P> + +<P> +The <TT>flowfram</TT> package also has the options <TT>nocolor</TT><A NAME="3679"></A> +and <TT>norotate</TT><A NAME="3682"></A> for previewers that can not process +colour or rotating specials. (Otherwise you may end up with +large black rectangles obscuring your text, instead of +the pale background colour you were hoping for.) +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0022000000000000000000"></A> +<A NAME="sec:stacking"></A> +<BR> +1.2 Frame Stacking Order +</H1> + +<P> +The material on each page is placed in the following order: + +<OL> +<LI>Each <A HREF=ffuserguide.html#gls:static NAME="11633">static frame</A> defined for that page in ascending +order of <A HREF=ffuserguide.html#gls:idn NAME="11640">IDN</A>. + +<P> +</LI> +<LI>Each <A HREF=ffuserguide.html#gls:flow NAME="11647">flow frame</A> defined for that page in ascending +order of <A HREF=ffuserguide.html#gls:idn NAME="11654">IDN</A>. + +<P> +</LI> +<LI>Each <A HREF=ffuserguide.html#gls:dynamic NAME="11661">dynamic frame</A> defined for that page in ascending +order of <A HREF=ffuserguide.html#gls:idn NAME="11668">IDN</A>. + +<P> +</LI> +<LI><A HREF=ffuserguide.html#gls:bbox NAME="11675">Bounding boxes</A> if the <TT>draft</TT><A NAME="3689"></A> +package option has been used. +</LI> +</OL> + +<P> +This ordering can be used to determine if you want something +to overlay or underlay everything else on the page. +Note that the <A HREF=ffuserguide.html#gls:frame NAME="11682">frames</A> do not interact with each other. If +you have two or more overlapping frames, the text in each +frame will not attempt to wrap around the other +frames, but will simply overwrite +them.<A NAME="tex2html17" + HREF="#foot3503"><SUP>1.3</SUP></A> +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0023000000000000000000"> +1.3 HTML</A> +</H1> + +<P> +The <TT>flowfram</TT> package now comes with a LaTeX2HTML style +file <TT>flowfram.perl</TT>. However this style file is not meant +to emulate the <TT>flowfram</TT> package, but is provided to facilitate +creating a plain HTML document from the LaTeX source. All +<A HREF=ffuserguide.html#gls:frame NAME="11710">frame</A>-related information is ignored. By default, the contents +of any <A HREF=ffuserguide.html#gls:static NAME="11713">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="11716">dynamic</A> frames are ignored, but this can be changed using +<PRE> +\HTMLset{showstaticcontents}{1} +</PRE> +to show the contents of the static frames or +<PRE> +\HTMLset{showdynamiccontents}{1} +</PRE> +to show the contents of the dynamic frames (where <code>\HTMLset</code> +is defined in the <TT>html</TT><A NAME="3700"></A> package). Note that this places the +text at the point in the document where the contents are set. +This style file does not create HTML frames. It can therefore be +used to create an accessible version of the PDF document +such as this document. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0030000000000000000000"> +2. Defining New Frames</A> +</H1> + +<P> + +<I>This chapter describes how to define new frames, and how to +identify and set frame contents. See also +<A HREF="ffuserguide.html#sec:layouts">Predefined +Layouts</A>.</I> +<P> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0031000000000000000000"> +2.1 Flow Frames</A> +</H1> + +<P> +The <A HREF=ffuserguide.html#gls:flow NAME="11793">flow frame</A> is the principle type of <A HREF=ffuserguide.html#gls:frame NAME="11800">frame</A>. +The text of the <TT>document</TT><A NAME="3711"></A> environment will flow from +one frame to the next in order of definition. Each +flow frame has an associated width, height, +position on the page and optionally a border. To define +a new flow frame use: + +<P> +<TT>\newflowframe</TT><A NAME="3714"></A><TT>[<I>page list</I>]{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}[<I>label</I>]</TT> +<P> +where <I>width</I> is the width of the frame, <I>height</I> is +the height of the frame, (<I>x</I>,<I>y</I>) is the +position of the bottom left hand corner of the frame relative to the bottom left hand corner of the +<A HREF=ffuserguide.html#gls:typeblock NAME="11831">typeblock</A><A NAME="tex2html29" + HREF="#foot3505"><SUP>2.1</SUP></A>. +The first optional argument, <I>page list</I>, indicates the +list of pages for which this frame is defined. + +<P> +A <A HREF=ffuserguide.html#gls:pglist NAME="11842">page list</A> can either be specified by the keywords: +<TT>all</TT>, <TT>odd</TT>, <TT>even</TT> or <TT>none</TT>, or +by a comma-separated list of either individual page numbers or +<A HREF=ffuserguide.html#gls:pgrange NAME="11849">page ranges</A>. If <I>page list</I> is +omitted, <TT>all</TT> is assumed. +A page range can be a closed +range (e.g. <code>2-8</code>) or an open range (e.g. +<code><10</code> or <code>>5</code>). For example: <code><3,5,7-11,>15</code> +indicates pages 1, 2, 5, 7, 8, 9, 10, 11 and all pages +greater than page 15. These page numbers refer to the value of +the page counter<A NAME="tex2html30" + HREF="#foot3506"><SUP>2.2</SUP></A>, +so if you have a page i and a page 1, they +will both have the same layout (unless you change the +page list setting somewhere between the two pages). + +<P> +Each frame has its own unique <A HREF=ffuserguide.html#gls:idn NAME="11864">IDN</A>, +corresponding to the order in which it was defined. So the first +flow frame to be defined has IDN 1, +the second has IDN 2, and so on. This number can then +be used to identify the frame when you want to modify its +settings. Alternatively, you can assign a unique <A HREF=ffuserguide.html#gls:idl NAME="11887">IDL</A> to the +frame using the final optional argument <I>label</I>. + +<P> +You can retrieve the IDL for a given flow frame from its IDN using: + +<P> +<TT>\getflowlabel</TT><A NAME="3731"></A><TT>{<I>idn</I>}</TT> +<P> +Conversely, you can retrieve the IDN for a given flow frame from its IDL using: + +<P> +<TT>\getflowid</TT><A NAME="3738"></A><TT>{<I>cmd</I>}{<I>idl</I>}</TT> +<P> +where <I>cmd</I> is a control sequence which will be used to +store the frame's IDN. +For example: +<PRE> +The label for the first flow frame is ``\getflowlabel{1}''. +The flow frame labelled ``main'' has IDN \getflowid{\myid}{main}\myid. +</PRE> + (See also +<A HREF="ffuserguide.html#sec:counters">Counters</A>.) + +<P> +Note that <TT>\getflowlabel</TT><A NAME="3747"></A> doesn't perform any check to +determine whether the supplied IDN is valid, but +<TT>\getflowid</TT><A NAME="3752"></A> will generate an error if the supplied +IDL is undefined. + +<P> +By default, the flow frame will not have a border, but the +starred form + +<P> +<TT>\newflowframe*</TT><A NAME="3757"></A><TT>[<I>page list</I>]{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}[<I>label</I>]</TT> +<P> +will place a plain border around the flow frame. +(See <A HREF="ffuserguide.html#sec:modattr">Modifying frame +attributes</A> if you want a different border.) + +<P> +Note that if the document continues beyond the last +defined flow frame (for example, the flow frames have only +been defined on pages 1 to 10, but the document contains 11 +pages) then a single flow frame will be defined, +emulating one column mode for all subsequent pages. + +<P> +In the PDF version of this document, +I used the command +<PRE> +\newflowframe{0.6\textwidth}{\textheight}{0pt}{0pt}[main] +</PRE> +to define the main flow frame<A NAME="tex2html31" + HREF="#foot3507"><SUP>2.3</SUP></A>. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H2><A NAME="SECTION0031100000000000000000"></A> +<A NAME="sec:framebreak"></A> +<BR> +2.1.1 Prematurely Ending a Flow Frame +</H2> + +<P> +You can force text to move immediately to the next defined +<A HREF=ffuserguide.html#gls:flow NAME="11959">flow frame</A> using one of the commands: <TT>\newpage</TT><A NAME="3783"></A>, +<TT>\pagebreak</TT><A NAME="3788"></A> or <TT>\framebreak</TT><A NAME="3793"></A>. +The first two work in an analogous way to the way they +work in standard two column mode. The last one, +<TT>\framebreak</TT><A NAME="3798"></A>, is required +when a paragraph spans two flow frames of different widths, as TeX's output routine does not +adjust to the new value of <TT>\hsize</TT><A NAME="3803"></A> until the last +paragraph of the previous <A HREF=ffuserguide.html#gls:frame NAME="11970">frame</A> has ended. As a +result, the end of the paragraph at the beginning of the new +flow frame retains the width of the previous flow frame. + +<P> +If you want to start a new page, rather than simply move to the +next frame, use the command <TT>\clearpage</TT><A NAME="3808"></A>, +or for two-sided documents, to start on the next odd page +do <TT>\cleardoublepage</TT><A NAME="3813"></A>. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0032000000000000000000"></A> +<A NAME="sec:static"></A> +<BR> +2.2 Static Frames +</H1> + +<P> +A <A HREF=ffuserguide.html#gls:static NAME="12084">static frame</A> is a rectangular area in which text neither +flows into nor flows out of.<A NAME="tex2html41" + HREF="#foot2877"><SUP>2.4</SUP></A> +The contents must be set explicitly, and once set, the contents +of the static frame will remain the same on each page until it is +explicitly changed. Thus, a static frame can be used, for +example, to make a company logo appear in the same place on every +page. + +<P> +As from version 1.03 it is now possible to have +static frames with non-rectangular contents, see +<A HREF="ffuserguide.html#sec:parshape">Non-Rectangular +Frames</A> for further details. + +<P> +A new static frame is defined using the command: + +<P> +<TT>\newstaticframe</TT><A NAME="3822"></A><TT>[<I>page list</I>]{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}[<I>label</I>]</TT> +<P> +where, as with <TT>\newflowframe</TT><A NAME="3839"></A>, <I>width</I> is the width of +the frame, <I>height</I> is the height of the frame, +(<I>x</I>,<I>y</I>) is the position of the bottom left hand +corner of the frame relative to the bottom left hand +corner of the <A HREF=ffuserguide.html#gls:typeblock NAME="12119">typeblock</A>. The first optional argument, +<I>page list</I>, indicates the <A HREF=ffuserguide.html#gls:pglist NAME="12126">page list</A> for which this +static frame should appear, and the final optional argument, +<I>label</I> is a unique textual <A HREF=ffuserguide.html#gls:idl NAME="12137">IDL</A> which you can use to +identify this frame. If no label is specified, you +can refer to this frame by its unique <A HREF=ffuserguide.html#gls:idn NAME="12152">IDN</A>. +The first static frame to be defined has IDN 1, the second +has IDN 2, and so on. + +<P> +You can retrieve the IDL for a given static frame from its IDN using: + +<P> +<TT>\getstaticlabel</TT><A NAME="3844"></A><TT>{<I>idn</I>}</TT> +<P> +Conversely, you can retrieve the IDN for a given static frame from its IDL using: + +<P> +<TT>\getstaticid</TT><A NAME="3851"></A><TT>{<I>cmd</I>}{<I>idl</I>}</TT> +<P> +where <I>cmd</I> is a control sequence which will be used to +store the frame's IDN. +For example: +<PRE> +The label for the first static frame is ``\getstaticlabel{1}''. +The static frame labelled ``backleft'' has IDN +\getstaticid{\myid}{backleft}\myid. +</PRE> + +<P> +Note that <TT>\getstaticlabel</TT><A NAME="3860"></A> doesn't perform any check to +determine whether the supplied IDN is valid, but +<TT>\getstaticid</TT><A NAME="3865"></A> will generate an error if the supplied +IDL is undefined. + +<P> +As with <TT>\newflowframe</TT><A NAME="3870"></A>, there is a starred version + +<P> +<TT>\newstaticframe*</TT><A NAME="3875"></A><TT>[<I>page list</I>]{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}[<I>label</I>]</TT> +<P> +which will place a border around that static frame. + +<P> +To set the contents of a particular static frame, you can +either use the <TT>staticcontents</TT><A NAME="3892"></A> environment: + +<P> +<code>\begin{staticcontents}</code><TT>{<I>IDN</I>}</TT> +<BR><I>contents</I> +<BR><code>\end{staticcontents}</code> +<P> +where <I>IDN</I> is the unique IDN associated with +that static frame and <I>contents</I> is the contents of the +static frame, or you can use the +command: + +<P> +<TT>\setstaticcontents</TT><A NAME="3897"></A><TT>{<I>IDN</I>}{<I>contents</I>}</TT> +<P> +which will do the same thing. + +<P> +There are starred versions available for both the environment +and the command to enable you to identify the static frame by its associated IDL rather than its IDN: + +<P> +<code>\begin{staticcontents*}</code><TT>{<I>IDL</I>}</TT> +<BR><I>contents</I> +<BR><code>\end{staticcontents*}</code> +<P> +or the equivalent: + +<P> +<TT>\setstaticcontents*</TT><A NAME="3908"></A><TT>{<I>IDL</I>}{<I>contents</I>}</TT> +<P> + +<P> +In the body of <TT>staticcontents</TT><A NAME="3917"></A> or <TT>staticcontents*</TT><A NAME="3920"></A>, +or in the second argument of <TT>\setstaticcontents</TT><A NAME="3923"></A> +or <TT>\setstaticcontents*</TT><A NAME="3928"></A>, you can move onto another +static frame using: + +<P> +<TT>\continueonframe</TT><A NAME="3933"></A><TT>[<I>continuation text</I>]{<I>id</I>}</TT> +<P> +If <TT>staticcontents*</TT><A NAME="3942"></A> or <TT>\setstaticcontents*</TT><A NAME="3945"></A> are +being used, <I>id</I> refers to the IDL of the next +static frame, otherwise <I>id</I> refers to the IDN of the +next static frame. +The optional argument specifies some continuation text to place +at the end of the first static frame. For example, suppose I have +defined two static frames labelled "frame1" and "frame2", then +<PRE> +\begin{staticcontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) +\continueonframe[Continued on the right]{frame2} +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{staticcontents*} +</PRE> +is equivalent to: +<PRE> +\begin{staticcontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) +\ffcontinuedtextlayout{Continued on the right} +\end{staticcontents*} +\begin{staticcontents*}{frame2}\par\noindent +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{staticcontents*} +</PRE> +where + +<P> +<TT>\ffcontinuedtextlayout</TT><A NAME="3950"></A><TT>{<I>text</I>}</TT> +<P> +governs how the continuation text should be displayed. The font used +to display the continuation text is given by + +<P> +<TT>\ffcontinuedtextfont</TT><A NAME="3957"></A><TT>{<I>text</I>}</TT> +<P> + +<P> +Note that this assumes that it should appear that no paragraph +break occurs in the transition between the two frames. If you +want a paragraph break you need to explicitly put one before +and after <TT>\continueonframe</TT><A NAME="3964"></A>. For example: +<PRE> +\begin{staticcontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) + +\continueonframe[Continued on the right]{frame2} + +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{staticcontents*} +</PRE> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H2><A NAME="SECTION0032100000000000000000"> +2.2.1 Important Notes</A> +</H2> + +<P> + +<UL> +<LI>When you set the contents of a <A HREF=ffuserguide.html#gls:static NAME="12272">static frame</A>, the contents are +immediately typeset and stored in a box until it is time to put +the contents on the page. This means that if you use any information +that varies throughout the document (such as the page number) the +value that is current when you set the static frame's contents +will be the value used. + +<P> +</LI> +<LI>However, if <TT>\label</TT><A NAME="3973"></A> is used inside a static frame, +the label information will be written to the auxiliary file each +time the static frame is displayed until the contents of that +frame have been changed. This means that you may +end up with multiply defined labels. +</LI> +</UL> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0033000000000000000000"></A> +<A NAME="sec:dynamic"></A> +<BR> +2.3 Dynamic Frames +</H1> + +<P> +A <A HREF=ffuserguide.html#gls:dynamic NAME="12406">dynamic frame</A> is similar to a <A HREF=ffuserguide.html#gls:static NAME="12413">static frame</A> except that its contents +are re-typeset on each page. (A static frame stores its +contents in a savebox, whereas a dynamic frame stores its +contents in a macro.<A NAME="tex2html48" + HREF="#foot3508"><SUP>2.5</SUP></A>) + +<P> +As from version 1.03 it is now possible to have +dynamic frames with non-rectangular contents, see +<A HREF="ffuserguide.html#sec:parshape">Non-Rectangular +Frames</A> for further details. + +<P> +To create a new dynamic frame, use the command: + +<P> +<TT>\newdynamicframe</TT><A NAME="3989"></A><TT>[<I>page list</I>]{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}[<I>label</I>]</TT> +<P> +The parameters are exactly the same as for <TT>\newflowframe</TT><A NAME="4006"></A> +and <TT>\newstaticframe</TT><A NAME="4011"></A>. +Again, each dynamic frame has an associated unique <A HREF=ffuserguide.html#gls:idn NAME="12440">IDN</A>, +starting from 1 for the first dynamic frame to be defined, and +a unique <A HREF=ffuserguide.html#gls:idl NAME="12451">IDL</A> can also be set using the final optional +argument <I>label</I>. + +<P> +You can retrieve the IDL for a given dynamic frame from its IDN using: + +<P> +<TT>\getdynamiclabel</TT><A NAME="4016"></A><TT>{<I>idn</I>}</TT> +<P> +Conversely, you can retrieve the IDN for a given dynamic frame from its IDL using: + +<P> +<TT>\getdynamicid</TT><A NAME="4023"></A><TT>{<I>cmd</I>}{<I>idl</I>}</TT> +<P> +where <I>cmd</I> is a control sequence which will be used to +store the frame's IDN. + +<P> +For example: +<PRE> +The label for the first dynamic frame is ``\getdynamiclabel{1}''. +The dynamic frame labelled ``chaphead'' has IDN +\getdynamicid{\myid}{chaphead}\myid. +</PRE> + +<P> +Note that <TT>\getdynamiclabel</TT><A NAME="4032"></A> doesn't perform any check to +determine whether the supplied IDN is valid, but +<TT>\getdynamicid</TT><A NAME="4037"></A> will generate an error if the supplied +IDL is undefined. + +<P> +As with the other <A HREF=ffuserguide.html#gls:frame NAME="12494">frame</A> types, there is also a starred +version + +<P> +<TT>\newdynamicframe*</TT><A NAME="4042"></A><TT>[<I>page list</I>]{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}[<I>label</I>]</TT> +<P> +which will place a plain border around the dynamic frame. +For example, in the PDF version +of this document I used the command +<PRE> +\newdynamicframe{0.38\textwidth}{\textheight}{0.62\textwidth}{0pt}[chaphead] +</PRE> +which created a frame on the +right on odd pages and on the left on even pages. (The +position for the even pages is set using <TT>\setdynamicframe</TT><A NAME="4059"></A> +defined in <A HREF="ffuserguide.html#sec:modattr">Modifying +Frame Attributes</A>.) + +<P> +The contents of a dynamic frame are set using the command: + +<P> +<TT>\setdynamiccontents</TT><A NAME="4064"></A><TT>{<I>id</I>}{<I>contents</I>}</TT> +<P> +where <I>id</I> is the unique IDN associated with that +dynamic frame, and <I>contents</I> is the contents of the +dynamic frame. Alternatively, if you have assigned an IDL, +<I>label</I>, to the dynamic frame, you can use the starred +version: + +<P> +<TT>\setdynamiccontents*</TT><A NAME="4073"></A><TT>{<I>label</I>}{<I>contents</I>}</TT> +<P> +As with most LaTeX commands, you can't use verbatim text<A NAME="4081"></A> in +<I>contents</I>. + +<P> +As from version 1.09, the contents can also be set using the +<TT>dynamiccontents</TT><A NAME="4083"></A> environment: + +<P> +<code>\begin{dynamiccontents}</code><TT>{<I>id</I>}</TT> +<BR><I>contents</I> +<BR><code>\end{dynamiccontents}</code> +<P> +or the <TT>dynamiccontents*</TT><A NAME="4088"></A> environment: + +<P> +<code>\begin{dynamiccontents*}</code><TT>{label}</TT> +<BR><I>contents</I> +<BR><code>\end{dynamiccontents*}</code> +<P> +<A NAME="pg:verb"></A>Note that you can't use verbatim text<A NAME="4091"></A> within the +<TT>dynamiccontents</TT><A NAME="4093"></A> or <TT>dynamiccontents*</TT><A NAME="4096"></A> environments. + +<P> +You can additionally append text to a dynamic frame using +either: + +<P> +<TT>\appenddynamiccontents</TT><A NAME="4099"></A><TT>{<I>id</I>}{<I>contents</I>}</TT> +<P> +or: + +<P> +<TT>\appenddynamiccontents*</TT><A NAME="4108"></A><TT>{<I>label</I>}{<I>contents</I>}</TT> +<P> + +<P> +If <TT>\chapter</TT><A NAME="4117"></A> is defined, you can make the chapter titles +appear in a dynamic frame using the command + +<P> +<TT>\dfchaphead</TT><A NAME="4122"></A><TT>{<I>IDN</I>}</TT> +<P> +where <I>IDN</I> is the <A HREF=ffuserguide.html#gls:idn NAME="12537">IDN</A> of the dynamic frame. There is +also a starred version of this command if you want to +use the <A HREF=ffuserguide.html#gls:idl NAME="12544">IDL</A> instead of the IDN. For example, in +the PDF version of this document, I used the command: +<PRE> +\dfchaphead*{chaphead} +</PRE> + +<P> +The headers and footers can be turned into dynamic frames using the command + +<P> +<TT>\makedfheaderfooter</TT><A NAME="4129"></A> +<P> +This will create two dynamic frames with IDLs <TT>header</TT> and <TT>footer</TT>. The page style will be used as +usual, but you can then move or resize the header and footer using +<TT>\setdynamicframe</TT><A NAME="4134"></A> (described <A HREF="ffuserguide.html#sec:modattr">later</A>). + +<P> +In the body of <TT>dynamiccontents</TT><A NAME="4139"></A> or <TT>dynamiccontents*</TT><A NAME="4142"></A>, +you can move onto another dynamic frame using: + +<P> +<TT>\continueonframe</TT><A NAME="4145"></A><TT>[<I>continuation text</I>]{id}</TT> +<P> +If this command occurs within <TT>dynamiccontents*</TT><A NAME="4153"></A>, <I>id</I> +refers to the IDL of the new frame, otherwise it refers +to the IDN of the new frame. +The optional argument specifies some continuation text to place +at the end of the first dynamic frame. For example, suppose I have +defined two dynamic frames labelled "frame1" and "frame2", then +<PRE> +\begin{dynamiccontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) +\continueonframe[Continued on the right]{frame2} +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{dynamiccontents*} +</PRE> +is equivalent to: +<PRE> +\begin{dynamiccontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) +\ffcontinuedtextlayout{Continued on the right} +\end{dynamiccontents*} +\begin{dynamiccontents*}{frame2}\par\noindent +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{dynamiccontents*} +</PRE> +where + +<P> +<TT>\ffcontinuedtextlayout</TT><A NAME="4156"></A><TT>{<I>text</I>}</TT> +<P> +governs how the continuation text should be displayed. The font used +to display the continuation text is given by + +<P> +<TT>\ffcontinuedtextfont</TT><A NAME="4163"></A><TT>{<I>text</I>}</TT> +<P> + +<P> +Note that this assumes that it should appear that no paragraph +break occurs in the transition between the two frames. If you +want a paragraph break you need to explicitly put one before +and after <TT>\continueonframe</TT><A NAME="4170"></A>. For example: +<PRE> +\begin{dynamiccontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) + +\continueonframe[Continued on the right]{frame2} + +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{dynamiccontents*} +</PRE> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H2><A NAME="SECTION0033100000000000000000"> +2.3.1 Important Notes</A> +</H2> + +<P> + +<UL> +<LI>Verbatim text<A NAME="960"></A> can't be used in a +<A HREF=ffuserguide.html#gls:dynamic NAME="12596">dynamic frame</A>. This includes +the body of the <TT>dynamiccontents</TT><A NAME="4179"></A> and <TT>dynamiccontents*</TT><A NAME="4182"></A> +environments. + +<P> +</LI> +<LI><TT>\continueonframe</TT><A NAME="4185"></A> can't be used in the +argument of any of the commands that set the contents of a +dynamic frame, such as <TT>\setdynamiccontents</TT><A NAME="4190"></A>. + +<P> +</LI> +<LI>Dynamic frames are painted on the page after all the +static and flow <A HREF=ffuserguide.html#gls:frame NAME="12611">frames</A>. If the location of a dynamic frame overlaps the location of any static or flow frames, the contents +of the dynamic frame will obscure the contents of the overlapping +frames. +</LI> +</UL> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0040000000000000000000"></A> +<A NAME="sec:modattr"></A> +<BR> +3. Modifying Frame Attributes +</H1> + +<P> + +<I>This chapter describes how to modify frame attributes, +such as the size and location.</I> +<P> + +<P> +Once you have defined the <A HREF=ffuserguide.html#gls:flow NAME="12760">flow frames</A>, <A HREF=ffuserguide.html#gls:static NAME="12767">static frames</A> and +<A HREF=ffuserguide.html#gls:dynamic NAME="12774">dynamic frames</A>, their attributes can be changed. The three types of +<A HREF=ffuserguide.html#gls:frame NAME="12781">frame</A> mostly have the same set of attributes, but some are +specific to a certain type. + +<P> +Flow frame attributes are modified using +either the command: + +<P> +<TT>\setflowframe</TT><A NAME="4199"></A><TT>{<I>idn list</I>}{<I>key-val list</I>}</TT> +<P> +or the starred version: + +<P> +<TT>\setflowframe*</TT><A NAME="4208"></A><TT>{<I>label list</I>}{<I>key-val list</I>}</TT> +<P> +or the attributes for all flow frames can be set using: + +<P> +<TT>\setallflowframes</TT><A NAME="4217"></A><TT>{<I>key-val list</I>}</TT> +<P> +Static frame attributes are modified using either the command: + +<P> +<TT>\setstaticframe</TT><A NAME="4224"></A><TT>{<I>idn list</I>}{<I>key-val list</I>}</TT> +<P> +or the starred version: + +<P> +<TT>\setstaticframe*</TT><A NAME="4233"></A><TT>{<I>label list</I>}{<I>key-val list</I>}</TT> +<P> +or the attributes for all static frames can be set using: + +<P> +<TT>\setallstaticframes</TT><A NAME="4242"></A><TT>{<I>key-val list</I>}</TT> +<P> +Dynamic frame attributes are modified using either the command: + +<P> +<TT>\setdynamicframe</TT><A NAME="4249"></A><TT>{<I>idn list</I>}{<I>key-val list</I>}</TT> +<P> +or the starred version: + +<P> +<TT>\setdynamicframe*</TT><A NAME="4258"></A><TT>{<I>label list</I>}{<I>key-val list</I>}</TT> +<P> +or the attributes for all dynamic frames can be set using: + +<P> +<TT>\setalldynamicframes</TT><A NAME="4267"></A><TT>{<I>key-val list</I>}</TT> +<P> + +<P> +In each of the above, <I>idn list</I> can either be one of the +keywords: <TT>all</TT>, <TT>odd</TT> or <TT>even</TT> (indicating +all frames of that type, frames of that type whose +<A HREF=ffuserguide.html#gls:idn NAME="12820">IDN</A> is odd or frames of that type whose IDN is even) or it can be a comma-separated list of ID numbers, or +IDN ranges. + +<P> +For the starred versions, <I>label list</I> should be +a comma-separated list of <A HREF=ffuserguide.html#gls:idl NAME="12839">IDLs</A>. Note that you can't use the +above keywords or have ranges in <I>label list</I>. + +<P> +The <I>key-val list</I> argument must be a comma-separated +list of <I>key</I>=<I>value</I> pairs, indicating which +attributes to modify. The available values are as follows: + +<P> +<DL> +<DT><STRONG>width<A NAME="4273"></A>=<I>length</I></STRONG></DT> +<DD>The width of the frame. + +<P> +</DD> +<DT><STRONG>height<A NAME="4274"></A>=<I>length</I></STRONG></DT> +<DD>The height of the frame. + +<P> +</DD> +<DT><STRONG>x<A NAME="4275"></A>=<I>length</I></STRONG></DT> +<DD>The x-coordinate of the frame for all pages on which it is defined. + +<P> +</DD> +<DT><STRONG>y<A NAME="4276"></A>=<I>length</I></STRONG></DT> +<DD>The y-coordinate of the frame for all pages on which it is defined. + +<P> +</DD> +<DT><STRONG>evenx<A NAME="4277"></A>=<I>length</I></STRONG></DT> +<DD>The x-coordinate of the +frame for all even pages on which it is defined, but only if +the document is a two-sided document. + +<P> +For example, in the PDF version of +this document, I used the commands +<PRE> +\setflowframe*{main}{evenx=0.4\textwidth} +\setdynamicframe*{chaphead}{evenx=0pt} +</PRE> +to switch the positions of the flow frame and dynamic frame containing the document text and chapter headings, respectively, +on even pages. + +<P> +You can swap the odd and even values using the commands: + +<P> +<TT>\ffswapoddeven</TT><A NAME="4279"></A><TT>{<I>IDN</I>}</TT> +<P> +(for flow frames) + +<P> +<TT>\sfswapoddeven</TT><A NAME="4286"></A><TT>{<I>IDN</I>}</TT> +<P> +(for static frames) or + +<P> +<TT>\dfswapoddeven</TT><A NAME="4293"></A><TT>{<I>IDN</I>}</TT> +<P> +(for dynamic frames). These +commands all have starred versions which take the frame's +IDL instead of its IDN. + +<P> +</DD> +<DT><STRONG>eveny<A NAME="4299"></A>=<I>length</I></STRONG></DT> +<DD>The y-coordinate of the +frame for all even pages on which it is defined, but only if +the document is a two-sided document. + +<P> +</DD> +<DT><STRONG>oddx<A NAME="4300"></A>=<I>length</I></STRONG></DT> +<DD>The x-coordinate of the +frame for all odd pages on which it is defined, if the +document is two-sided. + +<P> +</DD> +<DT><STRONG>oddy<A NAME="4301"></A>=<I>length</I></STRONG></DT> +<DD>The y-coordinate of the +frame for all odd pages on which it is defined, +if the document is two-sided. + +<P> +</DD> +<DT><STRONG>valign<A NAME="4302"></A>=<I>pos</I></STRONG></DT> +<DD>Change the vertical alignment +of material inside a static or dynamic frame. The value <I>pos</I> +may be one of: <TT>c</TT>, <TT>t</TT> or <TT>b</TT>. +The default for static frames is <TT>c</TT>, the default +for dynamic frames is <TT>t</TT>. +This key is not available for flow frames. + +<P> +</DD> +<DT><STRONG>label<A NAME="4303"></A>=<I>text</I></STRONG></DT> +<DD>Assign an IDL to the frame. +(If you do not specify a label when you first define a frame it will be given a label identical to its IDN.) This key is +provided to allow the user to label frames that have been +generated by certain predefined layout commands described +in <A HREF="ffuserguide.html#sec:layouts">Predefined +Layouts</A>. + +<P> +</DD> +<DT><STRONG>border<A NAME="4304"></A>=<I>style</I></STRONG></DT> +<DD>The style of the border around the +frame, this can take the values: <TT>none</TT> (no border), +<TT>plain</TT> (plain border) or the name of a LaTeX +<A HREF=ffuserguide.html#gls:fcmd NAME="12938">frame making command</A> without the preceding backslash. (I admit +the notation is a little confusing, a frame making command is a command that places some kind of border around its +argument, such as <TT>\fbox</TT><A NAME="4306"></A>, or if you are using the +<TT>fancybox</TT><A NAME="4311"></A> package: <TT>\doublebox</TT><A NAME="4314"></A>, <TT>\ovalbox</TT><A NAME="4319"></A>, +<TT>\Ovalbox</TT><A NAME="4324"></A> and <TT>\shadowbox</TT><A NAME="4329"></A>.) +The value <TT>fbox</TT> is equivalent to <TT>plain</TT>. + +<P> +For example, to make the first static frame have an oval border: +<PRE> +\setstaticframe{1}{border=ovalbox} +</PRE> +Or you can define your own border: +<PRE> +\newcommand{\greenyellowbox}[1]{\fcolorbox{green}{yellow}{#1}} +\setstaticframe{1}{border=greenyellowbox} +</PRE> + +<P> +This next example uses the <TT>tikz</TT><A NAME="4334"></A> package to define a fancy +frame, so you need to use: +<PRE> +\usepackage{tikz} +\usetikzlibrary{snakes} +</PRE> +The border command is defined as follows: +<PRE> +\newlength\fancywidth +\newlength\fancyheight +\newlength\fancydepth + +\newcommand{\fancyborder}[1]{% +\settowidth{\fancywidth}{#1}% +\settoheight{\fancyheight}{#1}% +\settodepth{\fancydepth}{#1}% +\addtolength{\fancyheight}{\fancydepth}% +\hspace{-\flowframesep}% +\tikz[baseline=0pt]{% +\draw[snake=bumps,raise snake=\flowframesep, + line width=\flowframerule] + (0pt,0pt) rectangle (\fancywidth,\fancyheight); +}} +</PRE> +This makes a bumpy border, but it uses <TT>\flowframesep</TT><A NAME="4337"></A> to +determine the gap between the border and the text and uses +<TT>\flowframerule</TT><A NAME="4342"></A> to set the line width. This ensures that +the offset (see below) is correctly computed. + +<P> +This new border can now be applied to a frame: +<PRE> +\setstaticframe{1}{border=fancyborder} +</PRE> + +<P> +</DD> +<DT><STRONG>offset<A NAME="4346"></A>=<I>offset</I></STRONG></DT> +<DD>The border offset, if it is a +user-defined border. This is the distance from the outer +edge of the left hand border to the left edge of the +<A HREF=ffuserguide.html#gls:bbox NAME="12953">bounding box</A> of the text inside the border. The <TT>flowfram</TT> +package is able to compute the border for the following +known frame making commands: <TT>\fbox</TT><A NAME="4348"></A>, <TT>\ovalbox</TT><A NAME="4353"></A>, +<TT>\Ovalbox</TT><A NAME="4358"></A>, <TT>\doublebox</TT><A NAME="4363"></A> and <TT>\shadowbox</TT><A NAME="4368"></A>. +For all other borders, the offset is assumed to be +<TT>-\flowframesep-\flowframerule</TT>. +If you define your own frame making command, you may need to +specify the offset explicitly, or the flow/static/dynamic frames +may end up shifted to the right or left. + +<P> +The above examples can compute their own offsets, however, +if you were to do, for example: +<PRE> +\newcommand{\thickgreenyellowbox}[1]{% +{\setlength{\fboxsep}{5pt}\setlength{\fboxrule}{6pt}% +\fcolorbox{green}{yellow}{#1}}} +</PRE> +Then you would have to specify the offset. In this example, +the offset is -5pt-6pt=-11pt, +so you would need to do: +<PRE> +\setstaticframe{1}{border=thickgreenyellowbox,offset=-11pt} +</PRE> + +<P> +</DD> +<DT><STRONG>bordercolor<A NAME="4372"></A>=<I>colour</I></STRONG></DT> +<DD>The colour of the border +if you are using a standard frame making command. +The colour can either be specified as, e.g. <TT>green</TT>, +or including the colour model, e.g. <code>[rgb]{0,1,0}</code>. +For example: +<PRE> +\setallflowframes{border=doublebox,bordercolor=[rgb]{1,0,0.5}} +</PRE> + +<P> +</DD> +<DT><STRONG>textcolor<A NAME="4373"></A>=<I>colour</I></STRONG></DT> +<DD>The text colour for that +frame. Again, the colour can either be specified as, +e.g. <TT>green</TT>, or including the colour model, +e.g. <code>[rgb]{0,1,0}</code>. + +<P> +</DD> +<DT><STRONG>backcolor<A NAME="4374"></A>=<I>colour</I></STRONG></DT> +<DD>The background colour for +that frame. Again, the colour can either be specified as, +e.g. <TT>green</TT>, or including the colour model, +e.g. <code>[rgb]{0,1,0}</code>. Note that the background colour +only extends as far as the bounding box, not the border. +If you want it to extend as far as the border, you +will need to define your own border type (see above). + +<P> +</DD> +<DT><STRONG>pages<A NAME="4375"></A>=<I>page list</I></STRONG></DT> +<DD>The <A HREF=ffuserguide.html#gls:pglist NAME="12980">list of +pages</A> for which the frame should appear. This can either have +the values: <TT>all</TT>, <TT>even</TT>, <TT>odd</TT> or <TT>none</TT> +(the latter removes the frame from that point on--useful if you +have multiple pages with the same number), or it can be a +comma-separated list of single pages, or +<A HREF=ffuserguide.html#gls:pgrange NAME="12995">page ranges</A>. +For example: +<PRE> +\setdynamicframe{1}{pages=1,5,8-10} +</PRE> + +<P> +</DD> +<DT><STRONG>margin<A NAME="4376"></A>=<I>side</I></STRONG></DT> +<DD>The side of +the flow frame that its corresponding margin should go on. This +can take the values <TT>left</TT>, <TT>right</TT>, +<TT>inner</TT> or <TT>outer</TT>. This setting is only available +for flow frames. + +<P> +</DD> +<DT><STRONG>clear<A NAME="4377"></A>=<I>boolean</I></STRONG></DT> +<DD>If this value is set, the static or dynamic frame will be +cleared at the start of the +next page, otherwise it will only be cleared on the next +occurrence of <TT>\setstaticcontents</TT><A NAME="4379"></A> or the +<TT>staticcontents</TT><A NAME="4384"></A> environment, or the +<TT>\setdynamiccontents</TT><A NAME="4387"></A>, depending on the frame type. +This value is not set by default. This setting is not +available for flow frames. + +<P> +For example, in the PDF version of this document, I +prevented the chapter heading reappearing on every page using +the command: +<PRE> +\setdynamicframe*{chaphead}{clear} +</PRE> + +<P> +If you want to put <TT>\label</TT><A NAME="4392"></A> in a static or dynamic frame, you +should use the clear<A NAME="4396"></A> key to prevent the label from being +multiply defined. + +<P> +</DD> +<DT><STRONG>style<A NAME="4397"></A>=<I>cmd</I></STRONG></DT> +<DD>This should be +the name of a command <I>without</I> the preceding backslash, +to be applied to the contents of the specified dynamic frame. +The command may either be a declaration, for example: +<PRE> +\setalldynamicframes{style=large} +</PRE> +which will set the contents of all the dynamic frames in a +large font, or it can be a command that takes a single argument, +for example: +<PRE> +\setalldynamicframes{style=textbf} +</PRE> +which will make the text for all the dynamic frames come out in +bold. To unset a style, do <code>style=none</code>. +This setting is only available for dynamic frames. + +<P> +</DD> +<DT><STRONG>angle<A NAME="4398"></A>=<I>n</I></STRONG></DT> +<DD>Rotate the contents of the +frame by <I>n</I> degrees (new to +version 1.02). Note that the <A HREF=ffuserguide.html#gls:bbox NAME="13034">bounding boxes</A> will not +appear rotated. + +<P> +</DD> +<DT><STRONG>shape<A NAME="4399"></A>=<I>shape command</I></STRONG></DT> +<DD>Define a shape for +the contents of a static frame or dynamic frame (new +to version 1.03). If <I>shape command</I> is <TT>\relax</TT><A NAME="4401"></A>, no +paragraph shape will be applied. See +<A HREF="ffuserguide.html#sec:parshape">Non-Rectangular +Frames</A> for further details. +</DD> +</DL> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0041000000000000000000"></A> +<A NAME="sec:parshape"></A> +<BR> +3.1 Non-Rectangular Frames +</H1> + +<P> +As from version 1.03, it is now possible to specify +non-rectangular <A HREF=ffuserguide.html#gls:static NAME="13106">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="13109">dynamic</A> frames (but not <A HREF=ffuserguide.html#gls:flow NAME="13116">flow frames</A>). Note +that the +<A HREF=ffuserguide.html#gls:bbox NAME="13123">bounding box</A> will still appear as a rectangle despite the +<A HREF=ffuserguide.html#gls:frame NAME="13130">frame's</A> shape setting. You may use either TeX's +<TT>\parshape</TT><A NAME="4414"></A> command, or the <TT>\shapepar</TT><A NAME="4419"></A> +command defined in Donald Arseneau's <TT>shapepar</TT><A NAME="4424"></A> +package (if using <TT>\shapepar</TT><A NAME="4427"></A>, remember to include +the <TT>shapepar</TT><A NAME="4432"></A> package.) + +<P> +Note that it is better to use <TT>\parshape</TT><A NAME="4435"></A> instead +of <TT>\shapepar</TT><A NAME="4440"></A> as the latter is more restrictive and +requires more processing. However, <TT>\shapepar</TT><A NAME="4445"></A> provides +greater flexibility in the type of shape that can be used. +<DL> +<DT><STRONG><TT>\parshape</TT><A NAME="4450"></A></STRONG></DT> +<DD>With <TT>\parshape</TT><A NAME="4455"></A> 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 frame. When used with the +shape<A NAME="4459"></A> key for static or dynamic frames, the effects of +<TT>\par</TT><A NAME="4461"></A> and the sectioning commands are modified to allow +the paragraph shape to extend beyond a single paragraph, and +to allow sectioning commands (but not <TT>\chapter</TT><A NAME="4466"></A> +or <TT>\part</TT><A NAME="4471"></A>). + +<P> +</DD> +<DT><STRONG><TT>\shapepar</TT><A NAME="4476"></A></STRONG></DT> +<DD>With <TT>\shapepar</TT><A NAME="4481"></A> 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 <TT>\simpar</TT><A NAME="4486"></A>, 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 <TT>shapepar</TT><A NAME="4491"></A> documentation for +more details. +</DD> +</DL> + +<P> +To restore a frame to its default rectangular setting use +shape<A NAME="4493"></A>=<TT>\relax</TT><A NAME="4495"></A>. + +<P> +For those unfamiliar with TeX's <TT>\parshape</TT><A NAME="4500"></A> command, +the syntax is as follows: +<BR> +<BR><TT>\parshape</TT><A NAME="4505"></A>=<I>n</I> <I>i<SUB>1</SUB></I> <I>l<SUB>1</SUB></I> +<I>i<SUB>2</SUB></I> <I>l<SUB>2</SUB></I> ... +<I>i<SUB>n</SUB></I> <I>l<SUB>n</SUB></I> +<BR> +<BR> +where <I>n</I> is the number of (<I>i<SUB>j</SUB></I> <I>l<SUB>j</SUB></I>) pairs and +<I>i<SUB>j</SUB></I> specifies the left +indentation for the jth line and +<I>l<SUB>j</SUB></I> specifies the length of +the jth line. + +<P> +For example, to create a +zigzag shaped static frame (whose IDN is <TT>shapedt</TT>): + +<PRE> +\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 +}} +</PRE> + +<P> + +<P> +The syntax for <TT>\shapepar</TT><A NAME="4530"></A> is more complicated, see +the <TT>shapepar</TT><A NAME="4535"></A> documentation for more details. In general: +<BR> +<BR><TT>\shapepar</TT><A NAME="4538"></A>{<I>shape specs</I>} +<BR> +<BR> +The <TT>shapepar</TT><A NAME="4543"></A> package has four predefined shapes: +<TT>\squareshape</TT><A NAME="4546"></A>, <TT>\diamondshape</TT><A NAME="4551"></A>, +<TT>\heartshape</TT><A NAME="4556"></A> and <TT>\nutshape</TT><A NAME="4561"></A>. + +<P> +For example, to assign +a heart shape to the static frame whose IDL is <TT>shapedb</TT>: +<PRE> +\setstaticframe*{shapedb}{shape={\shapepar\heartshape}} +</PRE> +To reset the frame back to its original rectangular shape +do: +<PRE> +\setstaticframe*{shapedb}{shape=\relax} +</PRE> + +<P> + + +<P> +The <TT>flowfram</TT> 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. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0050000000000000000000"> +4. Locations and Dimensions</A> +</H1> + +<P> + +<I>This chapter describes some of the commands provided to +determine the locations and dimensions of frames.</I> +<P> + +<P> +This chapter describes some of the commands available that can +be used to determine the locations and dimensions of <A HREF=ffuserguide.html#gls:frame NAME="13156">frames</A>. +See the accompanying document <TT>flowfram.pdf</TT> for more details of +these commands or for other commands not listed here. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0051000000000000000000"></A> +<A NAME="sec:typeblockloc"></A> +<BR> +4.1 Determining the Location of the Typeblock +</H1> + +<P> +As mentioned earlier, when you create new <A HREF=ffuserguide.html#gls:frame NAME="13188">frames</A>, +you must specify their location relative to the <A HREF=ffuserguide.html#gls:typeblock NAME="13195">typeblock</A>, but +what if you want to position a frame a set distance from the +edge of the paper? The <TT>flowfram</TT> package provides the following +commands that compute the distance from the typeblock to the +paper boundary: + +<P> + +<P> +<TT>\computeleftedgeodd</TT><A NAME="4592"></A><TT>{<I>length</I>}</TT> +<P> +This computes the position of the left edge of the (odd) page, relative +to the left side of the typeblock, and stores the result in +<I>length</I>. + +<P> + +<P> +<TT>\computeleftedgeeven</TT><A NAME="4599"></A><TT>{<I>length</I>}</TT> +<P> +As above, but for even pages. + +<P> + +<P> +<TT>\computetopedge</TT><A NAME="4606"></A><TT>{<I>length</I>}</TT> +<P> +This computes the top edge of the page, relative to the bottom of the +typeblock, and stores the result in <I>length</I>. + +<P> + +<P> +<TT>\computebottomedge</TT><A NAME="4613"></A><TT>{<I>length</I>}</TT> +<P> +This computes the bottom edge of the page, relative to the bottom of the +typeblock, and stores the result in <I>length</I>. + +<P> + +<P> +<TT>\computerightedgeodd</TT><A NAME="4620"></A><TT>{<I>length</I>}</TT> +<P> +This computes the position of the right edge of the (odd) page, +relative to the left side of the typeblock, and store the result +in <I>length</I>. + +<P> + +<P> +<TT>\computerightedgeeven</TT><A NAME="4627"></A><TT>{<I>length</I>}</TT> +<P> +As above, but for even pages. + +<P> +Note that in all cases <I>length</I> must be a LaTeX length +command. + +<P> +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): +<PRE> +% 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} +</PRE> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0052000000000000000000"> +4.2 Determining the Dimensions and Locations of Frames</A> +</H1> + +<P> +It is possible to determine the dimensions and locations +of a <A HREF=ffuserguide.html#gls:frame NAME="13239">frame</A> using one of the following commands: + +<P> + +<UL> +<LI><TT>\getstaticbounds</TT><A NAME="4638"></A><TT>{<I>IDN</I>}</TT> +</LI> +<LI><TT>\getstaticbounds*</TT><A NAME="4645"></A><TT>{<I>IDL</I>}</TT> +</LI> +<LI><TT>\getflowbounds</TT><A NAME="4652"></A><TT>{<I>IDN</I>}</TT> +</LI> +<LI><TT>\getflowbounds*</TT><A NAME="4659"></A><TT>{<I>IDL</I>}</TT> +</LI> +<LI><TT>\getdynamicbounds</TT><A NAME="4666"></A><TT>{<I>IDN</I>}</TT> +</LI> +<LI><TT>\getdynamicbounds*</TT><A NAME="4673"></A><TT>{<I>IDL</I>}</TT> +</LI> +</UL> + +<P> +For each command, the starred version takes an <A HREF=ffuserguide.html#gls:idl NAME="13246">IDL</A> as the +argument, and the unstarred version takes an <A HREF=ffuserguide.html#gls:idn NAME="13253">IDN</A> as the +argument. Each command stores the relevant information in the +lengths <TT>\ffareawidth</TT><A NAME="4680"></A>, <TT>\ffareaheight</TT><A NAME="4685"></A>, +<TT>\ffareax</TT><A NAME="4690"></A> and <TT>\ffareay</TT><A NAME="4695"></A>. + +<P> +For other related commands, see the section "Determining Dimensions +and Locations" in the accompanying document +<TT>flowfram.pdf</TT>. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0053000000000000000000"> +4.3 Relative Locations</A> +</H1> + +<P> +To print the relative location of one <A HREF=ffuserguide.html#gls:frame NAME="13313">frame</A> from another do: + +<P> +<TT>\relativeframelocation</TT><A NAME="4704"></A><TT>{<I>type1</I>}{<I>idn1</I>}{<I>type2</I>}{<I>idn2</I>}</TT> +<P> +where <I>type1</I> and <I>idn1</I> indicate the type and <A HREF=ffuserguide.html#gls:idn NAME="13320">IDN</A> of +the first frame, and <I>type2</I> and <I>idn2</I> indicate the type +and <A HREF=ffuserguide.html#gls:idn NAME="13327">IDN</A> of the second frame. There is also a starred version: + +<P> +<TT>\relativeframelocation*</TT><A NAME="4717"></A><TT>{<I>type1</I>}{<I>idl1</I>}{<I>type2</I>}{<I>idll</I>}</TT> +<P> +where <I>idl1</I> and <I>idl2</I> indicate the <A HREF=ffuserguide.html#gls:idl NAME="13334">IDL</A> of the +first and second frames, respectively. Both the above commands will +print one of the following: + +<P> + +<UL> +<LI><TT>\FFaboveleft</TT><A NAME="4730"></A> if the first frame is above left of the +second frame. + +<P> +</LI> +<LI><TT>\FFaboveright</TT><A NAME="4735"></A> if the first frame is above right of the +second frame. + +<P> +</LI> +<LI><TT>\FFabove</TT><A NAME="4740"></A> if the first frame is above the second frame. + +<P> +</LI> +<LI><TT>\FFbelowleft</TT><A NAME="4745"></A> if the first frame is below left of the +second frame. + +<P> +</LI> +<LI><TT>\FFbelowright</TT><A NAME="4750"></A> if the first frame is below right of the +second frame. + +<P> +</LI> +<LI><TT>\FFbelow</TT><A NAME="4755"></A> if the first frame is below the second frame. + +<P> +</LI> +<LI><TT>\FFleft</TT><A NAME="4760"></A> if the first frame is to the left of the +second frame. + +<P> +</LI> +<LI><TT>\FFright</TT><A NAME="4765"></A> if the first frame is to the right of the +second frame. + +<P> +</LI> +<LI><TT>\FFoverlap</TT><A NAME="4770"></A> if both frames overlap. +</LI> +</UL> + +<P> +A frame is considered to be above another frame if the bottom edge +of the first frame is higher than the top edge of the second frame. + +<P> +A frame is considered to be below another frame if the top edge +of the first frame is lower than the bottom edge of the second frame. + +<P> +A frame is considered to be to the left of another frame if the right +edge of the first frame is to the left of the left edge of the second +frame. + +<P> +A frame is considered to be to the right of another frame if the left +edge of the first frame is to the right of the right edge of the +second frame. + +<P> +Note that the relative locations are taken for the current page, +regardless of whether either of the two frames are displayed on that +page. If the current page is odd, then the frame settings for odd pages +will be compared, otherwise the frame settings for even pages will +be compared. However remember that the first paragraph of each page +retains the settings in place at the start of the paragraph, so if the +frames have different locations for odd and even pages, then +<TT>\relativeframelocation</TT><A NAME="4775"></A> may use the wrong page settings if it +is used at the start of the page. + +<P> +For example, the PDF version of this document defined a +<A HREF=ffuserguide.html#gls:flow NAME="13341">flow frame</A> labelled <TT>main</TT> and a +<A HREF=ffuserguide.html#gls:dynamic NAME="13348">dynamic frame</A> labelled <TT>chaphead</TT> which is +used to display the chapter headings. The following code +<PRE> +The dynamic frame is +\relativeframelocation*{dynamic}{chaphead}{flow}{main} +of the flow frame. +</PRE> +produces: +The dynamic frame is +on +the left of the flow frame. + +<P> +There are some short cut commands for frames of the +same type: + +<P> +<TT>\reldynamicloc</TT><A NAME="4780"></A><TT>{<I>idn1</I>}{<I>idn2</I>}</TT> +<P> +This is equivalent to: +<BR> +<BR><TT>\relativeframelocation</TT><A NAME="4789"></A><TT>{dynamic}{<I>idn1</I>}{dynamic}{<I>idn2</I>}</TT> + +<P> +<TT>\relstaticloc</TT><A NAME="4800"></A><TT>{<I>idn1</I>}{<I>idn2</I>}</TT> +<P> +This is equivalent to: +<BR> +<BR><TT>\relativeframelocation</TT><A NAME="4809"></A><TT>{static}{<I>idn1</I>}{static}{<I>idn2</I>}</TT> + +<P> +<TT>\relflowloc</TT><A NAME="4820"></A><TT>{<I>idn1</I>}{<I>idn2</I>}</TT> +<P> +This is equivalent to: +<BR> +<BR><TT>\relativeframelocation</TT><A NAME="4829"></A><TT>{flow}{<I>idn1</I>}{flow}{<I>idn2</I>}</TT> +<BR> +<BR> +Each of the above commands also has a starred version that uses the +<A HREF=ffuserguide.html#gls:idl NAME="13359">IDL</A> instead of the <A HREF=ffuserguide.html#gls:idn NAME="13366">IDN</A>. + +<P> +These commands may be used in the optional argument of +<TT>\continueonframe</TT><A NAME="4840"></A> for frames that are on the same page. +For example: +<PRE> +\begin{dynamiccontents}{1} +Some text in the first dynamic frame that goes on for +quite a bit longer than this example. +\continueonframe[continued \reldynamicloc{2}{1}]{2} +This text is in the second dynamic frame which is +somewhere on the same page. +\end{dynamiccontents} +</PRE> + +<P> +For additional commands that determine the relative location of one +frame from another, see the section "Determining the relative +location of one frame from another" in the accompanying document +<TT>flowfram.pdf</TT>. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0060000000000000000000"></A> +<A NAME="sec:layouts"></A> +<BR> +5. Predefined Layouts +</H1> + +<P> + +<I>This chapter describes commands that create frames +arranged in a predefined layout.</I> +<P> + +<P> +The <TT>flowfram</TT> package has a number of commands which +create <A HREF=ffuserguide.html#gls:frame NAME="13378">frames</A> in a predefined layout. These commands +may only be used in the preamble. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0061000000000000000000"> +5.1 Column Styles</A> +</H1> + +<P> +The standard LaTeX commands <TT>\onecolumn</TT><A NAME="4853"></A> and +<TT>\twocolumn</TT><A NAME="4858"></A> are redefined to create one or two +<A HREF=ffuserguide.html#gls:flow NAME="13426">flow frames</A> that fill the entire <A HREF=ffuserguide.html#gls:typeblock NAME="13433">typeblock</A> separated +from each other (in the case of <TT>\twocolumn</TT><A NAME="4863"></A>) by a +gap of width <TT>\columnsep</TT><A NAME="4868"></A>. The height of these +flow frames may not be exactly as high as the typeblock, +as their height is adjusted to make them an integer +multiple of <TT>\baselineskip</TT><A NAME="4873"></A>. You can switch off this +automatic adjustment using the command: + +<P> +<TT>\ffvadjustfalse</TT><A NAME="4878"></A> +<P> + +<P> +The <TT>\onecolumn</TT><A NAME="4883"></A> and <TT>\twocolumn</TT><A NAME="4888"></A> commands +also take an optional argument which is the <A HREF=ffuserguide.html#gls:pglist NAME="13448">page list</A> for which those flow frames are defined. In addition +to <TT>\onecolumn</TT><A NAME="4893"></A> and <TT>\twocolumn</TT><A NAME="4898"></A>, the +following commands are also defined: + +<P> + +<P> +<TT>\Ncolumn</TT><A NAME="4903"></A><TT>[<I>pages</I>]{<I>n</I>}</TT> +<P> +This creates <I>n</I> column flow frames each separated by a +distance of <TT>\columnsep</TT><A NAME="4912"></A>. + +<P> + +<P> +<TT>\onecolumninarea</TT><A NAME="4917"></A><TT>[<I>pages</I>]{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This creates a single flow frame to fill the given area, +adjusting the height so that it is an integer multiple of +<TT>\baselineskip</TT><A NAME="4932"></A>. + +<P> + +<P> +<TT>\twocolumninarea</TT><A NAME="4937"></A><TT>[<I>pages</I>]{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This creates two column flow frames separated by a distance +of <TT>\columnsep</TT><A NAME="4952"></A> filling the entire area specified, again +adjusting the height so that it is an integer multiple of +<TT>\baselineskip</TT><A NAME="4957"></A>. The columns are separated by a gap of +<TT>\columnsep</TT><A NAME="4962"></A>. + +<P> + +<P> +<TT>\Ncolumninarea</TT><A NAME="4967"></A><TT>[<I>pages</I>]{<I>n</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is a more general form of <TT>\twocolumninarea</TT><A NAME="4984"></A> making +<I>n</I> flow frames instead of two. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0062000000000000000000"> +5.2 Column Styles with an Additional Frame</A> +</H1> + +<P> +As well as the column-style <A HREF=ffuserguide.html#gls:flow NAME="14060">flow frames</A> defined +above, it is also possible to define +<I>n</I> columns with an additional <A HREF=ffuserguide.html#gls:frame NAME="14067">frame</A> spanning either +above or below them. There will be a vertical gap of +approximately<A NAME="tex2html92" + HREF="#foot3036"><SUP>5.1</SUP></A> +<TT>\vcolumnsep</TT><A NAME="4998"></A> between the columns +and the extra frame. In each of the following definitions, +the argument <I>pages</I> is the <A HREF=ffuserguide.html#gls:pglist NAME="14074">page list</A> for which +the frames are defined, <I>n</I> is the number of +columns required, <I>type</I> is the type of frame to go +above or below the columns (this may be one of: <TT>flow</TT>, +<TT>static</TT> or <TT>dynamic</TT>). The area in which the +new frames should fill is defined by <I>width</I>, <I>height</I> +(the width and height of the area) and <I>x</I>, <I>y</I> +(the position of the bottom left hand corner of the area +relative to the bottom left hand corner of the <A HREF=ffuserguide.html#gls:typeblock NAME="14085">typeblock</A>.) + +<P> +The height of the additional frame at the top or bottom of +the columns is given by <I>H</I>. + +<P> + +<P> +<TT>\onecolumntopinarea</TT><A NAME="5003"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This creates one flow frame with a <I>type</I> frame above it, filling +the area specified. + +<P> + +<P> +<TT>\twocolumntopinarea</TT><A NAME="5022"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This creates two column-style flow frames with a <I>type</I> frame +above them, filling the area specified. + +<P> + +<P> +<TT>\Ncolumntopinarea</TT><A NAME="5041"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>n</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This creates <I>n</I> column-style flow frames with a <I>type</I> +frame above them, filling the area specified. + +<P> + +<P> +<TT>\onecolumnbottominarea</TT><A NAME="5062"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This creates one flow frame with a <I>type</I> frame underneath it, +filling the area specified. + +<P> + +<P> +<TT>\twocolumnbottominarea</TT><A NAME="5081"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This creates two column-style flow frames with a <I>type</I> frame +below them, filling the area specified. + +<P> + +<P> +<TT>\Ncolumnbottominarea</TT><A NAME="5100"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>n</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This creates <I>n</I> column-style flow frames with a <I>type</I> +frame below them, filling the area specified. + +<P> +The following commands are special cases of the above: + +<P> + +<P> +<TT>\onecolumnStopinarea</TT><A NAME="5121"></A><TT>[<I>pages</I>]{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\onecolumntopinarea</TT><A NAME="5138"></A><TT>[<I>pages</I>]{static}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\onecolumnDtopinarea</TT><A NAME="5156"></A><TT>[<I>pages</I>]{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\onecolumntopinarea</TT><A NAME="5173"></A><TT>[<I>pages</I>]{dynamic}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\onecolumntop</TT><A NAME="5191"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>H</I>}</TT> +<P> +As <TT>\onecolumntopinarea</TT><A NAME="5202"></A> where the area is the entire +typeblock. + +<P> + +<P> +<TT>\onecolumnStop</TT><A NAME="5207"></A><TT>[<I>pages</I>]{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\onecolumntop</TT><A NAME="5216"></A><TT>[<I>pages</I>]{static}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\onecolumnDtop</TT><A NAME="5226"></A><TT>[<I>pages</I>]{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\onecolumntop</TT><A NAME="5235"></A><TT>[<I>pages</I>]{dynamic}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\twocolumnStopinarea</TT><A NAME="5245"></A><TT>[<I>pages</I>]{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\twocolumntopinarea</TT><A NAME="5262"></A><TT>[<I>pages</I>]{static}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\twocolumnDtopinarea</TT><A NAME="5280"></A><TT>[<I>pages</I>]{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\twocolumntopinarea</TT><A NAME="5297"></A><TT>[<I>pages</I>]{dynamic}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\twocolumntop</TT><A NAME="5315"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>H</I>}</TT> +<P> +As <TT>\twocolumntopinarea</TT><A NAME="5326"></A> where the area is the entire +typeblock. + +<P> + +<P> +<TT>\twocolumnStop</TT><A NAME="5331"></A><TT>[<I>pages</I>]{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\twocolumntop</TT><A NAME="5340"></A><TT>[<I>pages</I>]{static}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\twocolumnDtop</TT><A NAME="5350"></A><TT>[<I>pages</I>]{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\twocolumntop</TT><A NAME="5359"></A><TT>[<I>pages</I>]{dynamic}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\NcolumnStopinarea</TT><A NAME="5369"></A><TT>[<I>pages</I>]{<I>n</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\Ncolumntopinarea</TT><A NAME="5388"></A><TT>[<I>pages</I>]{static}{<I>n</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\NcolumnDtopinarea</TT><A NAME="5408"></A><TT>[<I>pages</I>]{<I>n</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\Ncolumntopinarea</TT><A NAME="5427"></A><TT>[<I>pages</I>]{dynamic}{<I>n</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\Ncolumntop</TT><A NAME="5447"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>n</I>}{<I>H</I>}</TT> +<P> +As <TT>\Ncolumntopinarea</TT><A NAME="5460"></A> where the area is the entire +typeblock. + +<P> + +<P> +<TT>\NcolumnStop</TT><A NAME="5465"></A><TT>[<I>pages</I>]{<I>n</I>}{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\Ncolumntop</TT><A NAME="5476"></A><TT>[<I>pages</I>]{static}{<I>n</I>}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\NcolumnDtop</TT><A NAME="5488"></A><TT>[<I>pages</I>]{<I>n</I>}{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\Ncolumntop</TT><A NAME="5499"></A><TT>[<I>pages</I>]{dynamic}{<I>n</I>}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\onecolumnSbottominarea</TT><A NAME="5511"></A><TT>[<I>pages</I>]{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\onecolumnbottominarea</TT><A NAME="5528"></A><TT>[<I>pages</I>]{static}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\onecolumnDbottominarea</TT><A NAME="5546"></A><TT>[<I>pages</I>]{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\onecolumnbottominarea</TT><A NAME="5563"></A><TT>[<I>pages</I>]{dynamic}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\onecolumnbottom</TT><A NAME="5581"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>H</I>}</TT> +<P> +As <TT>\onecolumnbottominarea</TT><A NAME="5592"></A> where the area is the entire +typeblock. + +<P> + +<P> +<TT>\onecolumnSbottom</TT><A NAME="5597"></A><TT>[<I>pages</I>]{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\onecolumnbottom</TT><A NAME="5606"></A><TT>[<I>pages</I>]{static}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\onecolumnDbottom</TT><A NAME="5616"></A><TT>[<I>pages</I>]{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\onecolumnbottom</TT><A NAME="5625"></A><TT>[<I>pages</I>]{dynamic}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\twocolumnSbottominarea</TT><A NAME="5635"></A><TT>[<I>pages</I>]{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\twocolumnbottominarea</TT><A NAME="5652"></A><TT>[<I>pages</I>]{static}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\twocolumnDbottominarea</TT><A NAME="5670"></A><TT>[<I>pages</I>]{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\twocolumnbottominarea</TT><A NAME="5687"></A><TT>[<I>pages</I>]{dynamic}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\twocolumnbottom</TT><A NAME="5705"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>H</I>}</TT> +<P> +As <TT>\twocolumnbottominarea</TT><A NAME="5716"></A> where the area is the entire +typeblock. + +<P> + +<P> +<TT>\twocolumnSbottom</TT><A NAME="5721"></A><TT>[<I>pages</I>]{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\twocolumnbottom</TT><A NAME="5730"></A><TT>[<I>pages</I>]{static}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\twocolumnDbottom</TT><A NAME="5740"></A><TT>[<I>pages</I>]{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\twocolumnbottom</TT><A NAME="5749"></A><TT>[<I>pages</I>]{dynamic}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\NcolumnSbottominarea</TT><A NAME="5759"></A><TT>[<I>pages</I>]{<I>n</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\Ncolumnbottominarea</TT><A NAME="5778"></A><TT>[<I>pages</I>]{static}{<I>n</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\NcolumnDbottominarea</TT><A NAME="5798"></A><TT>[<I>pages</I>]{<I>n</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> +<P> +This is equivalent to: +<BR> +<TT>\Ncolumnbottominarea</TT><A NAME="5817"></A><TT>[<I>pages</I>]{dynamic}{<I>n</I>}{<I>H</I>}{<I>width</I>}{<I>height</I>}{<I>x</I>}{<I>y</I>}</TT> + +<P> + +<P> +<TT>\Ncolumnbottom</TT><A NAME="5837"></A><TT>[<I>pages</I>]{<I>type</I>}{<I>n</I>}{<I>H</I>}</TT> +<P> +As <TT>\Ncolumnbottominarea</TT><A NAME="5850"></A> where the area is the entire +typeblock. + +<P> + +<P> +<TT>\NcolumnSbottom</TT><A NAME="5855"></A><TT>[<I>pages</I>]{<I>n</I>}{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\Ncolumnbottom</TT><A NAME="5866"></A><TT>[<I>pages</I>]{static}{<I>n</I>}{<I>H</I>}</TT> + +<P> + +<P> +<TT>\NcolumnDbottom</TT><A NAME="5878"></A><TT>[<I>pages</I>]{<I>n</I>}{<I>H</I>}</TT> +<P> +This is equivalent to: +<TT>\Ncolumnbottom</TT><A NAME="5889"></A><TT>[<I>pages</I>]{dynamic}{<I>n</I>}{<I>H</I>}</TT> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0063000000000000000000"> +5.3 Backdrop Effects</A> +</H1> + +<P> +<A HREF=ffuserguide.html#gls:static NAME="14175">Static frames</A> can be used to produce a +backdrop. There are a number of commands which create +static frames that can be used as a backdrop. In the +following definitions, <I>pages</I> is the <A HREF=ffuserguide.html#gls:pglist NAME="14186">page list</A> for +which those static frames are defined (<TT>all</TT> is the default). +For the vertical strips: +<I>xoffset</I> is the amount by which the frames should be +shifted horizontally (0pt by default), <I>W1</I> is the width of the first frame, +with colour specified by <I>C1</I> and <A HREF=ffuserguide.html#gls:idl NAME="14197">IDL</A> <I>L1</I>, +and so on up to <I>Wn</I> the width of the <I>n</I>th frame +with colour specified by <I>Cn</I> and IDL <I>Ln</I>. +For the vertical strips: +<I>yoffset</I> is the amount by which the frames should be +shifted vertically (0pt by default), <I>H1</I> is the height of the first frame, +with colour specified by <I>C1</I> and IDL <I>L1</I>, +and so on up to <I>Hn</I> the height of the <I>n</I>th frame +with colour specified by <I>Cn</I> and IDL <I>Ln</I>. + +<P> +<B>NOTE:</B> unlike the earlier commands, these commands +are all relative to the actual page, not the <A HREF=ffuserguide.html#gls:typeblock NAME="14216">typeblock</A>. +So an x offset of 0pt indicates the first vertical +frame is flush with the left hand edge of the page, and a +y offset of 0pt indicates the first horizontal frame +is flush with the bottom edge of the page. This is because backdrops +tend to span the entire page, not just the typeblock. + +<P> +The colour specification must be completely enclosed in braces, +for example <code>{[rgb]{1,0,1}}</code> not <code>[rgb]{1,0,1}</code>. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H2><A NAME="SECTION0063100000000000000000"> +5.3.1 Vertical stripe effects</A> +</H2> + +<P> + +<P> +<TT>\vtwotone</TT><A NAME="5909"></A><TT>[<I>pages</I>][<I>xoffset</I>]{<I>W1</I>}{<I>C1</I>}{<I>L1</I>}{<I>W2</I>}{<I>C2</I>}{<I>L2</I>}</TT> +<P> +Defines two <A HREF=ffuserguide.html#gls:static NAME="14348">static frames</A> to create a two tone vertical strip effect. +(This command was +used to create the coloured background on the title page +of the PDF version of this document.) + +<P> + +<P> +<TT>\vNtone</TT><A NAME="5930"></A><TT>[<I>pages</I>][<I>xoffset</I>]{<I>n</I>}{<I>W1</I>}{<I>C1</I>}{<I>L1</I>}</TT>...<TT>{<I>Wn</I>}{<I>Cn</I>}{<I>Ln</I>}</TT> +<P> +This is similar to <TT>\vtwotone</TT><A NAME="5953"></A> but with <I>n</I> static frames instead of two. + +<P> + +<P> +<TT>\vtwotonebottom</TT><A NAME="5958"></A><TT>[<I>pages</I>][<I>xoffset</I>]{<I>H</I>}{<I>W1</I>}{<I>C1</I>}{<I>L1</I>}{<I>W2</I>}{<I>C2</I>}{<I>L2</I>}</TT> +<P> +This is similar to <TT>\vtwotone</TT><A NAME="5981"></A> but the static frames are only +<I>H</I> high, instead of the entire height of the page. +The frames are aligned along the bottom edge of the page. + +<P> + +<P> +<TT>\vtwotonetop</TT><A NAME="5986"></A><TT>[<I>pages</I>][<I>xoffset</I>]{<I>H</I>}{<I>W1</I>}{<I>C1</I>}{<I>L1</I>}{<I>W2</I>}{<I>C2</I>}</TT> +<BR><TT>{<I>L2</I>}</TT> +<P> +This is similar to <TT>\vtwotone</TT><A NAME="6009"></A> but the static frames are only +<I>H</I> high, instead of the entire height of the page. +The frames are aligned along the top edge of the page. +(This command was used to create the border effect along +the top of every page in the PDF version of this document. +Two <TT>\vtwotonetop</TT><A NAME="6014"></A> +commands were used, one for the even pages, and the other +for the odd pages.) + +<P> + +<P> +<TT>\vNtonebottom</TT><A NAME="6019"></A><TT>[<I>pages</I>][<I>xoffset</I>]{<I>H</I>}{<I>n</I>}{<I>W1</I>}{<I>C1</I>}{<I>L1</I>}</TT>... +<TT>{<I>Wn</I>}{<I>Cn</I>}{<I>Ln</I>}</TT> +<P> +This is a general version of <TT>\vtwotonebottom</TT><A NAME="6044"></A> for +<I>n</I> frames instead of two. + +<P> + +<P> +<TT>\vNtonetop</TT><A NAME="6049"></A><TT>[<I>pages</I>][<I>xoffset</I>]{<I>H</I>}{<I>n</I>}{<I>W1</I>}{<I>C1</I>}{<I>L1</I>}</TT>... +<TT>{<I>Wn</I>}{<I>Cn</I>}{<I>Ln</I>}</TT> +<P> +This is a general version of <TT>\vtwotonetop</TT><A NAME="6074"></A> for +<I>n</I> frames instead of two. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H2><A NAME="SECTION0063200000000000000000"> +5.3.2 Horizontal stripe effect</A> +</H2> + +<P> + +<P> +<TT>\htwotone</TT><A NAME="6083"></A><TT>[<I>pages</I>][<I>yoffset</I>]{<I>H1</I>}{<I>C1</I>}{<I>L1</I>}{<I>H2</I>}{<I>C2</I>}{<I>L2</I>}</TT> +<P> +This defines two <A HREF=ffuserguide.html#gls:static NAME="14488">static frames</A> to create a two tone horizontal strip +effect. + +<P> + +<P> +<TT>\hNtone</TT><A NAME="6104"></A><TT>[<I>pages</I>][<I>yoffset</I>]{<I>n</I>}{<I>H1</I>}{<I>C1</I>}{<I>L1</I>}</TT>... +<TT>{<I>Hn</I>}{<I>Cn</I>}{<I>Ln</I>}</TT> +<P> +This is similar to <TT>\htwotone</TT><A NAME="6127"></A> but with <I>n</I> static frames instead of two. + +<P> + +<P> +<TT>\htwotoneleft</TT><A NAME="6132"></A><TT>[<I>pages</I>][<I>yoffset</I>]{<I>W</I>}{<I>H1</I>}{<I>C1</I>}{<I>L1</I>}{<I>H2</I>}{<I>C2</I>}{<I>L2</I>}</TT> +<P> +This is similar to <TT>\htwotone</TT><A NAME="6155"></A> but the static frames are only +<I>W</I> wide, instead of the entire width of the page. +The frames are aligned along the left edge of the page. + +<P> + +<P> +<TT>\htwotoneright</TT><A NAME="6160"></A><TT>[<I>pages</I>][<I>yoffset</I>]{<I>W</I>}{<I>H1</I>}{<I>C1</I>}{<I>L1</I>}{<I>H2</I>}{<I>C2</I>}{<I>L2</I>}</TT> +<P> +This is similar to <TT>\htwotone</TT><A NAME="6183"></A> but the static frames are only +<I>W</I> wide, instead of the entire width of the page. +The frames are aligned along the right edge of the page. + +<P> + +<P> +<TT>\hNtoneleft</TT><A NAME="6188"></A><TT>[<I>pages</I>][<I>yoffset</I>]{<I>W</I>}{<I>n</I>}{<I>H1</I>}{<I>C1</I>}{<I>L1</I>}</TT>... +<TT>{<I>Hn</I>}{<I>Cn</I>}{<I>Ln</I>}</TT> +<P> +This is a general version of <TT>\htwotoneleft</TT><A NAME="6213"></A> for +<I>n</I> frames instead of two. + +<P> + +<P> +<TT>\hNtoneright</TT><A NAME="6218"></A><TT>[<I>pages</I>][<I>yoffset</I>]{<I>W</I>}{<I>n</I>}{<I>H1</I>}{<I>C1</I>}{<I>L1</I>}</TT>... +<TT>{<I>Hn</I>}{<I>Cn</I>}{<I>Ln</I>}</TT> +<P> +This is a general version of <TT>\htwotoneright</TT><A NAME="6243"></A> for +<I>n</I> frames instead of two. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H2><A NAME="SECTION0063300000000000000000"> +5.3.3 Background Frame</A> +</H2> + +<P> +To make a single <A HREF=ffuserguide.html#gls:static NAME="14512">static frame</A> covering the entire page, use: + +<P> +<TT>\makebackgroundframe</TT><A NAME="6252"></A><TT>[<I>pages</I>][<I>IDL</I>]</TT> +<P> +Note that this frame should be created before any other +static frame as it will obscure all other static frames created +before it if it is given a background colour. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H2><A NAME="SECTION0063400000000000000000"></A> +<A NAME="sec:insertrule"></A> +<BR> +5.3.4 Vertical and Horizontal Rules +</H2> + +<P> +You can create vertical or horizontal rules between two +<A HREF=ffuserguide.html#gls:frame NAME="14588">frames</A> using the commands: + +<P> + +<P> +<TT>\insertvrule</TT><A NAME="6265"></A><TT>[<I>y top</I>][<I>y bottom</I>]{<I>T1</I>}{<I>IDN1</I>}{<I>T2</I>}{<I>IDN2</I>}</TT> +<P> +This creates a new <A HREF=ffuserguide.html#gls:static NAME="14595">static frame</A> which fits between <I>T1</I> +frame with <A HREF=ffuserguide.html#gls:idn NAME="14606">IDN</A> <I>IDN1</I> and <I>T2</I> frame with IDN <I>IDN2</I>, and places a vertical rule in it +extending from the highest point of the highest frame to +the lowest point of the lowest frame. The first optional +argument <I>y top</I> (default 0pt) extends the rule by that +much above the highest point, and the second optional argument +<I>y bottom</I> (default 0pt) extends the rule by that much +below the lowest point. If either of the optional arguments +are negative, the rule will be shortened instead of extended. +The width of the rule is given by + +<P> +<TT>\ffcolumnseprule</TT><A NAME="6282"></A> +<P> +<B>Note</B> that this has changed as from version 1.09: versions +prior to 1.09 used <TT>\columnseprule</TT><A NAME="6287"></A>. + +<P> +The vertical rule drawn by <TT>\insertvrule</TT><A NAME="6292"></A> is created using +the command: + +<P> +<TT>\ffvrule</TT><A NAME="6297"></A><TT>{offset}{width}{height}</TT> +<P> +This can be redefined if a more ornate rule is required +(see below). + +<P> + +<P> +<TT>\inserthrule</TT><A NAME="6305"></A><TT>[<I>x left</I>][<I>x right</I>]{<I>T1</I>}{<I>IDN1</I>}{<I>T2</I>}{<I>IDN2</I>}</TT> +<P> +This creates a new <A HREF=ffuserguide.html#gls:static NAME="14621">static frame</A> which fits between <I>T1</I> +frame with <A HREF=ffuserguide.html#gls:idn NAME="14632">IDN</A> <I>IDN1</I> and <I>T2</I> frame with IDN <I>IDN2</I>, and places a horizontal rule in it +extending from the leftmost point of the left frame to +the rightmost point of the right frame. The first optional +argument <I>x left</I> (default 0pt) extends the rule by that +much before the leftmost point, and the second optional argument +<I>x right</I> (default 0pt) extends the rule by that much +beyond the rightmost point. If either of the optional arguments +are negative, the rule will be shortened instead of extended. +The height of the rule is given by + +<P> +<TT>\ffcolumnseprule</TT><A NAME="6322"></A> +<P> + +<P> +The horizontal rule drawn by <TT>\inserthrule</TT><A NAME="6327"></A> is created using +the command: + +<P> +<TT>\ffhrule</TT><A NAME="6332"></A><TT>{offset}{width}{height}</TT> +<P> +This can be redefined if a more ornate rule is required (see below). + +<P> +The default value for <TT>\ffcolumnseprule</TT><A NAME="6340"></A> is 2pt. Both +<TT>\insertvrule</TT><A NAME="6345"></A> and <TT>\inserthrule</TT><A NAME="6350"></A> have starred versions +which allow you to identify the frame by <A HREF=ffuserguide.html#gls:idl NAME="14651">IDL</A> instead of +IDN. The frame types, <I>T1</I> and <I>T2</I> can be one +of the following keywords: <TT>flow</TT>, <TT>static</TT> or +<TT>dynamic</TT>. + +<P> +The command + +<P> +<TT>\ffruledeclarations</TT><A NAME="6355"></A> +<P> +can be redefined to set declarations that affect how the rule is drawn. +The most likely use of this command is to set the rule colour. +For example: +<PRE> +\twocolumnStop{2in} + +\renewcommand{\ffruledeclarations}{\color{red}} +\insertvrule{flow}{1}{flow}{2} + +\renewcommand{\ffruledeclarations}{\color{blue}} +\inserthrule{static}{1}{flow}{1} +</PRE> +This will create a layout with two columns (<A HREF=ffuserguide.html#gls:flow NAME="14666">flow frames</A> 1 and 2) +with a <A HREF=ffuserguide.html#gls:static NAME="14673">static frame</A> above. A red vertical rule is placed in a +static frame between flow frames 1 and 2, and a blue horizontal +rule is placed between the static frame and the first +flow frame. (However the horizontal rule will span both +flow frames since that is the width of the static frame.) + +<P> +In the following example, the rules have been redefined +to use a zigzag pattern (which is obtained using the <TT>tikz</TT><A NAME="6360"></A> +package): +<PRE> +\usepackage{flowfram} +\usepackage{tikz} +\usetikzlibrary{snakes} + +\twocolumnStop + +\renewcommand{\ffvrule}[3]{% +\hfill +\tikz{\draw[snake=zigzag,line width=#2,yshift=-#1] (0,0) -- (0pt,#3);}% +\hfill\mbox{}} + +\insertvrule{flow}{1}{flow}{2} + +\renewcommand{\ffhrule}[3]{% +\tikz{\draw[snake=zigzag,line width=#3,xshift=-#1] (0,0) -- (#2,0pt);}} + +\inserthrule{static}{1}{flow}{1} +</PRE> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0070000000000000000000"> +6. Thumbtabs and Minitocs</A> +</H1> + +<P> + +<I>This chapter describes how to create thumbtabs and minitocs, +such as those used in the PDF version of this document.</I> +<P> + +<P> + +<H1><A NAME="SECTION0071000000000000000000"> +6.1 Thumbtabs</A> +</H1> + +<P> +On the right hand side of the odd pages +and on the left hand side of the even pages in the +PDF version of this document, there is a blue rectangle +with the chapter number in it. This is a thumbtab, and it gives +you a rough idea whereabouts in the document you are when you +quickly flick through the pages. Each thumbtab is in fact +a dynamic frame, and you can control whether to make the +number and/or title appear in the thumbtab by using one or +more of the package options: <TT>ttbtitle</TT><A NAME="6367"></A> (show +title--default), <TT>ttbnotitle</TT><A NAME="6370"></A> (don't show the title), +<TT>ttbnum</TT><A NAME="6373"></A> (show the number) and <TT>ttbnonum</TT><A NAME="6376"></A> +(don't show the number--default). + +<P> +If you want thumbtabs in your document, you need to use +the command + +<P> +<TT>\makethumbtabs</TT><A NAME="6379"></A><TT>[<I>y offset</I>]{<I>height</I>}[<I>section type</I>]</TT> +<P> +in the document +preamble. By default, the topmost thumbtab is level with the +top of the <A HREF=ffuserguide.html#gls:typeblock NAME="14770">typeblock</A>, but can be shifted vertically +using the first optional argument <I>y offset</I>. Each +thumbtab will be <I>height</I> high, and will correspond to the +sectioning type <I>section type</I>. If <I>section type</I> +is omitted, chapters will be used if the <TT>\chapter</TT><A NAME="6390"></A> +command is defined, otherwise sections will be used. +The width of the thumbtabs is given by the length + +<P> +<TT>\thumbtabwidth</TT><A NAME="6395"></A> +<P> +which is 1cm by default. +The command + +<P> +<TT>\thumbtabindex</TT><A NAME="6400"></A> +<P> +will display the thumbtab index (all thumbtabs) on the current page. +You then need to use + +<P> +<TT>\enablethumbtabs</TT><A NAME="6405"></A> +<P> +to start the individual thumbtabs and + +<P> +<TT>\disablethumbtabs</TT><A NAME="6410"></A> +<P> +to make them go away. +You can align the table of contents with the thumbtabs<A NAME="tex2html112" + HREF="#foot2391"><SUP>6.1</SUP></A> using +the command + +<P> +<TT>\tocandthumbtabindex</TT><A NAME="6415"></A> +<P> +instead of +the commands <TT>\tableofcontents</TT><A NAME="6420"></A> and +<TT>\thumbtabindex</TT><A NAME="6425"></A>. If you are using the <TT>hyperref</TT><A NAME="6430"></A> +package, the text on the thumbtab index will be a hyperlink +to the corresponding part of the document. Note that when using +<TT>\tocandthumbtabindex</TT><A NAME="6433"></A> you may +need to shift the thumbtabs vertically up or down to make +sure that they align correctly with the table of contents. + +<P> +The format of the text on the thumbtabs is given by the command + +<P> +<TT>\thumbtabindexformat</TT><A NAME="6438"></A> +<P> +for the thumbtab index entries, and + +<P> +<TT>\thumbtabformat</TT><A NAME="6443"></A> +<P> +for the individual thumbtabs. By +default the text on the thumbtabs will be rotated, but as +rotating is not implemented by some previewers, the package option +<TT>norotate</TT><A NAME="6448"></A> is provided, which will stack the letters +vertically. This does not look as good as the rotated text. +Note also that some previewers do not put the hyperlink in the +correct place when the link has been rotated, so this may +also cause a problem. + +<P> +The thumbtab attributes can be changed using + +<P> +<TT>\setthumbtab</TT><A NAME="6451"></A><TT>{<I>n</I>}{<I>key value list</I>}</TT> +<P> +where <I>n</I> is the thumbtab number starting +from 1 (for the top thumbtab) to the value given by the counter +<TT>maxthumbtabs</TT><A NAME="6460"></A> +(for the bottom thumbtab). Note that these numbers are not +related to the associated frame <A HREF=ffuserguide.html#gls:idn NAME="14781">IDN</A>. + +<P> +To just change the settings for the thumbtab index, use + +<P> +<TT>\setthumbtabindex</TT><A NAME="6463"></A><TT>{<I>n</I>}{<I>key value list</I>}</TT> +<P> +The <I>key value list</I> for both these commands is the same as that +for <TT>\setdynamicframe</TT><A NAME="6472"></A>. + +<P> +By default, the thumbtabs have a grey background. In the PDF +version of this document, I used: +<PRE> +\setthumbtab{1}{backcolor=[rgb]{0.15,0.15,1}} +\setthumbtab{2}{backcolor=[rgb]{0.2,0.2,1}} +\setthumbtab{3}{backcolor=[rgb]{0.25,0.25,1}} +\setthumbtab{4}{backcolor=[rgb]{0.3,0.3,1}} +\setthumbtab{5}{backcolor=[rgb]{0.35,0.35,1}} +\setthumbtab{6}{backcolor=[rgb]{0.4,0.4,1}} +\setthumbtab{7}{backcolor=[rgb]{0.45,0.45,1}} +\setthumbtab{8}{backcolor=[rgb]{0.5,0.5,1}} +</PRE> +to change the thumbtab background colour to shades of blue. + +<P> +I also changed the style of the thumbtab text using: +<PRE> +\newcommand{\thumbtabstyle}[1]{{\hypersetup{linkcolor=white}% +\textbf{\large\sffamily #1}}} +\setthumbtab{all}{style=thumbtabstyle,textcolor=white} +</PRE> +Note that the style uses <TT>\hypersetup</TT><A NAME="6477"></A><A NAME="tex2html113" + HREF="#foot3441"><SUP>6.2</SUP></A> to change the colour of the hyperlink text, +since the hyperlink overrides the text colour. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0072000000000000000000"> +6.2 Minitocs</A> +</H1> + +<P> +In the PDF version of this document, after each chapter heading, +there is a mini table of contents for that chapter. To enable minitocs, +use the command + +<P> +<TT>\enableminitoc</TT><A NAME="6489"></A><TT>[<I>section type</I>]</TT> +<P> +The default <I>section type</I> is the same as that used by +the thumbtabs. + +<P> +If you want the minitocs to appear in a <A HREF=ffuserguide.html#gls:dynamic NAME="14799">dynamic frame</A>, you +can use + +<P> +<TT>\appenddfminitoc</TT><A NAME="6496"></A><TT>{<I>IDN</I>}</TT> +<P> +where <I>IDN</I> is the <A HREF=ffuserguide.html#gls:idn NAME="14806">IDN</A> of the appropriate dynamic frame. +There is also a starred version available if you want to +use the <A HREF=ffuserguide.html#gls:idl NAME="14817">IDL</A> instead of the IDN. + +<P> +For example, in the PDF version of this document I +used the command: +<PRE> +\appenddfminitoc*{chaphead} +</PRE> +in the preamble, which appended the minitocs to the +dynamic frame with IDL <TT>chaphead</TT>. + +<P> +The style of the minitoc text is given by the command + +<P> +<TT>\minitocstyle</TT><A NAME="6503"></A><TT>{<I>contents</I>}</TT> +<P> +where the argument is the contents +of the minitoc. This command may be redefined if you want +to change the minitoc style. The gap before the minitoc +is given by the length + +<P> +<TT>\beforeminitocskip</TT><A NAME="6510"></A> +<P> +and the gap after the minitoc is given by the length + +<P> +<TT>\afterminitocskip</TT><A NAME="6515"></A> +<P> +These lengths may be changed using <TT>\setlength</TT><A NAME="6520"></A>. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0080000000000000000000"> +7. Global Settings</A> +</H1> + +<P> + +<I>This section describes style macros, lengths and counters used +by the <TT>flowfram</TT> package.</I> +<P> + +<P> + +<H1><A NAME="SECTION0081000000000000000000"> +7.1 Macros</A> +</H1> +The following macros can be changed using <TT>\renewcommand</TT><A NAME="6529"></A>: + +<P> + +<UL> +<LI><TT>\setffdraftcolor</TT><A NAME="6534"></A> + +<P> +This sets the colour of the <A HREF=ffuserguide.html#gls:bbox NAME="14849">bounding box</A> when it is displayed in draft mode. The default value is: +<code>\color[gray]{0.8}</code>. For example, if you want a darker grey, +do: +<PRE> +\renewcommand{\setffdraftcolor}{\color[gray]{0.3}} +</PRE> + +<P> +</LI> +<LI><TT>\setffdrafttypeblockcolor</TT><A NAME="6539"></A> + +<P> +This sets the colour of +the <A HREF=ffuserguide.html#gls:bbox NAME="14856">bounding box</A> of the <A HREF=ffuserguide.html#gls:typeblock NAME="14863">typeblock</A> when it is displayed +in draft mode. The default value is: <code>\color[gray]{0.9}</code>. +For example, if you want a medium grey, do: +<PRE> +\renewcommand{\setffdrafttypeblockcolor}{\color[gray]{0.5}} +</PRE> + +<P> +</LI> +<LI><TT>\fflabelfont</TT><A NAME="6544"></A> + +<P> +This sets the font size for the <A HREF=ffuserguide.html#gls:bbox NAME="14870">bounding box</A> markers in +draft mode. The default value is: <code>\small\sffamily</code>. +For example, if you want a larger font, do: +<PRE> +\renewcommand{\fflabelfont}{\large\sffamily} +</PRE> + +<P> +</LI> +<LI><TT>\ffruledeclarations</TT><A NAME="6549"></A> + +<P> +This sets the declarations that affect the rules created using +<TT>\insertvrule</TT><A NAME="6554"></A> and <TT>\inserthrule</TT><A NAME="6559"></A>. The default +definition does nothing. +See <A HREF="ffuserguide.html#sec:insertrule">Vertical and +Horizontal Rules</A> for further details. + +<P> +</LI> +<LI><TT>\ffcontinuedtextfont</TT><A NAME="6564"></A><TT>{<I>text</I>}</TT> + +<P> +This sets <I>text</I> in the continuation font. The default definition +does <code>\emph{\small </code><I>text</I><code>}</code>. See +<A HREF="ffuserguide.html#sec:static">Static Frames</A> +and <A HREF="ffuserguide.html#sec:dynamic">Dynamic +Frames</A> for further details. + +<P> +</LI> +</UL> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0082000000000000000000"> +7.2 Lengths</A> +</H1> +The following are lengths, which can be changed using +<TT>\setlength</TT><A NAME="6575"></A>: + +<P> + +<UL> +<LI><TT>\fflabelsep</TT><A NAME="6580"></A> + +<P> +This is the distance from the right hand side of the +<A HREF=ffuserguide.html#gls:bbox NAME="14878">bounding box</A> at which to place the <A HREF=ffuserguide.html#gls:bbox NAME="14885">bounding box</A> marker. The +default value is: <TT>1pt</TT> + +<P> +</LI> +<LI><TT>\flowframesep</TT><A NAME="6585"></A> + +<P> +This is the gap between the text of the <A HREF=ffuserguide.html#gls:frame NAME="14892">frame</A> and +its border, for the standard border types. + +<P> +</LI> +<LI><TT>\flowframerule</TT><A NAME="6590"></A> + +<P> +This is the width of the <A HREF=ffuserguide.html#gls:frame NAME="14899">frame's</A> border, if using +a border given by a <A HREF=ffuserguide.html#gls:fcmd NAME="14906">frame making command</A> that uses <TT>\fboxsep</TT><A NAME="6595"></A> +to set its border width (e.g. <TT>\fbox</TT><A NAME="6600"></A>). + +<P> +</LI> +<LI><TT>\sdfparindent</TT><A NAME="6605"></A> + +<P> +This is the paragraph indentation within <A HREF=ffuserguide.html#gls:static NAME="14909">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="14912">dynamic</A> frames. +The default value is 0pt. + +<P> +</LI> +<LI><TT>\vcolumnsep</TT><A NAME="6614"></A> + +<P> +This is the approximate vertical distance between the top frame +and the column frames when using <TT>\Ncolumntop</TT><A NAME="6619"></A> etc. +(The height of the <A HREF=ffuserguide.html#gls:flow NAME="14919">flow frame</A> may be adjusted to make it +an integer multiple of <TT>\baselineskip</TT><A NAME="6624"></A>.) + +<P> +</LI> +<LI><TT>\columnsep</TT><A NAME="6629"></A> + +<P> +This is the horizontal distance between the column frames +when using <TT>\Ncolumn</TT><A NAME="6634"></A> or <TT>\Ncolumntop</TT><A NAME="6639"></A> etc + +<P> +</LI> +<LI><TT>\ffcolumnseprule</TT><A NAME="6644"></A> + +<P> +This is the width of vertical rules created using +<TT>\insertvrule</TT><A NAME="6649"></A> or the height of horizontal rules created +using <TT>\inserthrule</TT><A NAME="6654"></A>. + +<P> +</LI> +<LI><TT>\beforeminitocskip</TT><A NAME="6659"></A> + +<P> +This is the vertical distance before the minitoc. + +<P> +</LI> +<LI><TT>\afterminitocskip</TT><A NAME="6664"></A> + +<P> +This is the vertical distance after the minitoc. +</LI> +</UL> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0083000000000000000000"></A> +<A NAME="sec:counters"></A> +<BR> +7.3 Counters +</H1> +The following are counters that can be accessed via +<TT>\value</TT><A NAME="6673"></A><TT>{<I>counter name</I>}</TT> or via +<code>\the</code><I>counter name</I>. However the value of these counters +should not be modified. + +<P> +<DL> +<DT><STRONG><TT>maxflow</TT><A NAME="6680"></A></STRONG></DT> +<DD>The total number of <A HREF=ffuserguide.html#gls:flow NAME="14969">flow frames</A> that have +been defined so far. + +<P> +</DD> +<DT><STRONG><TT>thisframe</TT><A NAME="6683"></A></STRONG></DT> +<DD>Stores the <A HREF=ffuserguide.html#gls:idn NAME="14976">IDN</A> of the current +flow frame. You can label and reference the <A HREF=ffuserguide.html#gls:idn NAME="14987">IDN</A> using + +<P> +<TT>\labelflowid</TT><A NAME="6686"></A><TT>{<I>label</I>}</TT> +<P> +This is analogous to the standard <TT>\label</TT><A NAME="6693"></A> command, but will +always refer to the IDN of the current flow frame. It can +then be referenced using <TT>\ref</TT><A NAME="6698"></A><TT>{<I>label</I>}</TT>. Note that +this will always refer to the current flow frame even when used +in the contents of a <A HREF=ffuserguide.html#gls:static NAME="15002">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15005">dynamic</A> frame. + +<P> +Don't use more than one instance of <TT>\labelflowid</TT><A NAME="6709"></A> in a given +flow frame for a given page or you will get a "multiply defined +references" warning. + +<P> +</DD> +<DT><STRONG><TT>displayedframe</TT><A NAME="6714"></A></STRONG></DT> +<DD>Stores the index of the currently +displayed <A HREF=ffuserguide.html#gls:flow NAME="15016">flow frame</A>. This will be the same as the <A HREF=ffuserguide.html#gls:idn NAME="15023">IDN</A> if all +flow frames are displayed on the current page, but if some are +hidden, the values may be different. You can label this counter +using + +<P> +<TT>\labelflow</TT><A NAME="6717"></A><TT>{<I>label</I>}</TT> +<P> +and reference it elsewhere in the document using +<TT>\ref</TT><A NAME="6724"></A><TT>{<I>label</I>}</TT>. For example, if you are using +a column layout, you might want to do something like: +<PRE> +This text is about hippos\labelflow{hippos}. + +% Somewhere else in the document +See column~\ref{hippos} on page~\pageref{hippos} +for information on hippos. +</PRE> +Don't use more than one instance of <TT>\labelflow</TT><A NAME="6731"></A> in a given +flow frame for a given page or you will get a "multiply defined +references" warning. Note that +<TT>\labelflow</TT><A NAME="6736"></A> will always refer to the current flow frame even when used in the contents of a static or dynamic <A HREF=ffuserguide.html#gls:frame NAME="15042">frame</A>. + +<P> +</DD> +<DT><STRONG><TT>maxstatic</TT><A NAME="6741"></A></STRONG></DT> +<DD>The total number of <A HREF=ffuserguide.html#gls:static NAME="15049">static frames</A> that have +been defined so far. + +<P> +</DD> +<DT><STRONG><TT>maxdynamic</TT><A NAME="6744"></A></STRONG></DT> +<DD>The total number of <A HREF=ffuserguide.html#gls:dynamic NAME="15056">dynamic frames</A> that +have been defined so far. + +<P> +</DD> +<DT><STRONG><TT>maxthumbtabs</TT><A NAME="6747"></A></STRONG></DT> +<DD>The total number of thumbtabs. +</DD> +</DL> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0090000000000000000000"> +8. Troubleshooting</A> +</H1> + +<P> + +<I>This chapter should be consulted if you experience any +problems using the <TT>flowfram</TT> package.</I> +<P> + +<P> +For an up-to-date list of frequently asked questions, see +the <A NAME="tex2html141" + HREF="http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/flowframfaq.html">flowfram FAQ</A>. +If you have a query that is not addressed here, please try there +before contacting me. +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0091000000000000000000"> +8.1 General Queries</A> +</H1> + +<P> + +<OL> +<LI>If all my <A HREF=ffuserguide.html#gls:flow NAME="15080">flow frames</A> are only defined on, say, +pages 1-10, what happens if I then add some extra text so that +the document exceeds 10 pages? + +<P> +The output routine will create a new <A HREF=ffuserguide.html#gls:flow NAME="15087">flow frame</A> the size +of the <A HREF=ffuserguide.html#gls:typeblock NAME="15094">typeblock</A> and use that. + +<P> +</LI> +<LI>Can I use the formatted page number in <A HREF=ffuserguide.html#gls:pglist NAME="15101">page lists</A>? + +<P> +No. + +<P> +</LI> +<LI><A NAME="itm:whynot"></A> Why not? + +<P> +When the output routine finishes with one <A HREF=ffuserguide.html#gls:flow NAME="15108">flow frame</A> it looks for the +next <A HREF=ffuserguide.html#gls:flow NAME="15115">flow frame</A> defined on that page. If there are none left, it then +searches through the <A HREF=ffuserguide.html#gls:pglist NAME="15122">page list</A> of all the defined <A HREF=ffuserguide.html#gls:flow NAME="15129">flow frames</A> to +see if the next page lies in that range. If there are none defined on +that page, it ships out that page, and tries the next page. This gives +rise to two problems: + +<P> + +<OL> +<LI>LaTeX is not clairvoyant. If it is currently +on page 14, and on the next page the page numbering changes +to A, it has no way of knowing this until it has reached +that point, which it hasn't yet. So it is looking for a +<A HREF=ffuserguide.html#gls:flow NAME="15136">flow frame</A> defined on page 15, not on page A. + +<P> +</LI> +<LI>How does LaTeX tell if page C lies between +pages A and D? It would require an algorithm that can convert +from a formatted number back to an integer. Given that there +are many different ways of formatting the value of a counter +(besides the standard Roman and alphabetical formats) it +would be impossible to write an algorithm to do this +for some arbitrary format. +</LI> +</OL> + +<P> +</LI> +<LI>Can I have an arbitrarily shaped <A HREF=ffuserguide.html#gls:frame NAME="15143">frame</A>? +<A NAME="itm:parshape"></A> +<P> +You can assign certain irregular shapes to <A HREF=ffuserguide.html#gls:static NAME="15146">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15149">dynamic</A> frames, +using the shape<A NAME="6761"></A> key (see +<A HREF="ffuserguide.html#sec:parshape">Non-Rectangular +Frames</A>). +Note that the <A HREF=ffuserguide.html#gls:bbox NAME="15156">bounding box</A> will still appear as a rectangle with +the dimensions of the given <A HREF=ffuserguide.html#gls:frame NAME="15163">frame</A> which may not correspond +to the assigned shape. +This function is not available for <A HREF=ffuserguide.html#gls:flow NAME="15170">flow frames</A>. + +<P> +</LI> +<LI>Why has the text from my <A HREF=ffuserguide.html#gls:flow NAME="15177">flow frame</A> appeared in a +<A HREF=ffuserguide.html#gls:static NAME="15184">static frame</A> or <A HREF=ffuserguide.html#gls:dynamic NAME="15191">dynamic frame</A>? + +<P> +Assuming you haven't inadvertently set that text as the contents +of the <A HREF=ffuserguide.html#gls:static NAME="15194">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15197">dynamic</A> frame, the frames are most likely +overlapping (see <A HREF="ffuserguide.html#sec:stacking">Frame +Stacking Order</A>). +In an attempt to clarify what's going on, suppose you have +defined a <A HREF=ffuserguide.html#gls:static NAME="15204">static frame</A>, a <A HREF=ffuserguide.html#gls:dynamic NAME="15211">dynamic frame</A> and two <A HREF=ffuserguide.html#gls:flow NAME="15218">flow frames</A>. The +following is an approximate<A NAME="tex2html142" + HREF="#foot2618"><SUP>8.1</SUP></A> analogy: TeX has a sheet of +paper on the table, and has pencilled<A NAME="tex2html143" + HREF="#foot2619"><SUP>8.2</SUP></A> in a +rectangle denoting the <A HREF=ffuserguide.html#gls:typeblock NAME="15225">typeblock</A>. The paper is put to one +side for now. TeX also has four rectangular sheets +of transparent paper. The first (which I shall call sheet 1) +represents the <A HREF=ffuserguide.html#gls:static NAME="15232">static frame</A>, the next two (which I shall call +sheets 2 and 3) represent the <A HREF=ffuserguide.html#gls:flow NAME="15239">flow frames</A>, and the last one +(which I shall call sheet 4) represents the <A HREF=ffuserguide.html#gls:dynamic NAME="15246">dynamic frame</A>. +TeX starts work on filling sheet 2 with the document text. +Once it has put as much text on that sheet as it considers +possible (according to its views on aesthetics), it puts sheet 2 +into the "in tray", and then continues on sheet 3. While it's +filling in sheets 2 and 3, if it encounters a command or +environment that tells it what to put in the <A HREF=ffuserguide.html#gls:static NAME="15253">static frame</A>, +it fills in sheet 1 and then puts sheet 1 into the "in tray" and +resumes where it left off on sheet 2 or 3. Similarly, if +it encounters a command that tells it what to put in the +<A HREF=ffuserguide.html#gls:dynamic NAME="15260">dynamic frame</A>, it stops what it's doing, fills in sheet 4, then +puts sheet 4 into the "in tray", and resumes where it left off. +Only when it has finished sheet 3 (the last <A HREF=ffuserguide.html#gls:flow NAME="15267">flow frame</A> defined +on that page), will it gather together all +the transparent sheets, and fix them onto the page starting +with sheet 1 through to sheet 4, measuring the bottom left hand +corner of each transparent sheet relative to the bottom left hand +corner of the <A HREF=ffuserguide.html#gls:typeblock NAME="15274">typeblock</A>. TeX will then put that page +aside, and start work on the next page. If two or more of the +transparent sheets overlap, you will see through the top one into +the one below (unless of course the top one has been painted +over, either by setting a background colour, or by adding an +image that has a non-transparent background.) + +<P> +Note that it's also possible that the overlap is caused by an +overfull hbox that's causing the text to poke out the side of the +<A HREF=ffuserguide.html#gls:flow NAME="15281">flow frame</A> into a neighbouring <A HREF=ffuserguide.html#gls:frame NAME="15288">frame</A>. Check the log file for +warnings or use the <TT>draft</TT> option to the document class +which will place a filled rectangle on the end of overfull lines. + +<P> +</LI> +<LI>Why do I get lots of overfull hbox messages? + +<P> +Probably because you have narrow <A HREF=ffuserguide.html#gls:frame NAME="15295">frames</A>. It's better to use +ragged right formatting when the frames are narrow. + +<P> +</LI> +<LI>Why do I keep getting multiply-defined warnings? + +<P> +Probably because you have used <TT>\label</TT><A NAME="6767"></A> in a <A HREF=ffuserguide.html#gls:static NAME="15298">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15301">dynamic</A> frame that is displayed on more than one page. Try using the clear<A NAME="6775"></A> +key to ensure that the frame is always cleared at the end of each +page. + +<P> +</LI> +<LI>What happens if I use a command or environment +that switches to two-column mode (e.g. <TT>theindex</TT><A NAME="6777"></A>)? + +<P> +As from version 1.01, any <TT>\onecolumn</TT><A NAME="6780"></A> or +<TT>\twocolumn</TT><A NAME="6785"></A> 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. See the source code of this +document, <TT>ffuserguide.tex</TT>, for an example. + +<P> +</LI> +<LI>How do I change the vertical alignment +of material inside a <A HREF=ffuserguide.html#gls:static NAME="15304">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15307">dynamic</A> frame? + +<P> +Use the valign<A NAME="6793"></A> key in <TT>\setstaticframe</TT><A NAME="6795"></A> or +<TT>\setdynamicframe</TT><A NAME="6800"></A> (new to version 1.03). + +<P> +</LI> +<LI><A NAME="itm:absval"></A> How do I compute the distance from the edge +of the page instead of the <A HREF=ffuserguide.html#gls:typeblock NAME="15314">typeblock</A>? + +<P> +See <A HREF="ffuserguide.html#sec:typeblockloc">Determining the +Location of the Typeblock</A>. + +<P> +</LI> +<LI>Is there a GUI I can use to make it easier to create the +<A HREF=ffuserguide.html#gls:frame NAME="15321">frames</A>? + +<P> +Yes, Jpgfdraw which can be downloaded from: +<TT><A NAME="tex2html144" + HREF="http://theoval.cmp.uea.ac.uk/~nlct/jpgfdraw/">http://theoval.cmp.uea.ac.uk/~nlct/jpgfdraw/</A></TT> +</LI> +</OL> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0092000000000000000000"> +8.2 Unexpected Output</A> +</H1> + +<P> + +<OL> +<LI>The lines at the beginning of my <A HREF=ffuserguide.html#gls:flow NAME="15331">flow frames</A> are the +wrong width. + +<P> +This is a problem that will occur if you have <A HREF=ffuserguide.html#gls:flow NAME="15338">flow frames</A> with different widths, as the change in <TT>\hsize</TT><A NAME="6809"></A> +does not come into effect until a paragraph break. So if +you have a paragraph that spans two <A HREF=ffuserguide.html#gls:flow NAME="15345">flow frames</A>, the end +of the paragraph at the beginning of the second <A HREF=ffuserguide.html#gls:flow NAME="15352">flow frame</A> will retain the width it had at the start of the +paragraph at the bottom of the previous <A HREF=ffuserguide.html#gls:flow NAME="15359">flow frame</A>. You can +fix the problem by inserting <TT>\framebreak</TT><A NAME="6814"></A> at the +point where the <A HREF=ffuserguide.html#gls:frame NAME="15366">frame</A> break occurs +(see <A HREF="ffuserguide.html#sec:framebreak">Prematurely Ending a +Flow Frame</A>). + +<P> +</LI> +<LI>My <A HREF=ffuserguide.html#gls:frame NAME="15373">frames</A> shift to the right when I add a border. + +<P> +This may occur if you use a border that is not recognised +by the <TT>flowfram</TT> package. You will need to set the +offset using the <TT>offset</TT> key (see +<A HREF="ffuserguide.html#sec:modattr">Modifying Frame +Attributes</A>). + +<P> +</LI> +<LI>I have a vertical white strip along the right hand side +of every page. + +<P> +This can happen if you have, say, an A4 document, and +<TT>ghostscript</TT><A NAME="6819"></A> has letter as the default paper size. You can +change the default paper size by editing the file <code>gs_init.ps</code>. +Change: +<PRE> +% Optionally choose a default paper size other than U.S. letter. +% (a4) +</PRE> +to: +<PRE> +% Optionally choose a default paper size other than U.S. letter. +(a4) +</PRE> + +<P> +</LI> +<LI>I don't have any output. + +<P> +All your <A HREF=ffuserguide.html#gls:flow NAME="15380">flow frames</A> are empty. TeX doesn't put the +frames onto the page until it has finished putting text +into the flow frames. So if there is no text to go in the +flow frames it won't output the page. If you only want the +<A HREF=ffuserguide.html#gls:static NAME="15395">static frames</A> or <A HREF=ffuserguide.html#gls:dynamic NAME="15402">dynamic frames</A> filled in, and nothing +outside of them, just do <code>\mbox{}\clearpage</code>. +This will put +an invisible something with zero area into your +flow frame, but it's enough to convince TeX that the +document contains some text. + +<P> +</LI> +<LI>The last page hasn't appeared. + +<P> +See the previous answer. + +<P> +</LI> +<LI>There is no paragraph indentation inside my +<A HREF=ffuserguide.html#gls:static NAME="15409">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15412">dynamic</A> frames. + +<P> +The paragraph indentation in <A HREF=ffuserguide.html#gls:static NAME="15415">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15418">dynamic</A> frames is governed +by the length <TT>\sdfparindent</TT><A NAME="6830"></A> which is set to 0pt by +default. To make the indentation the same as that used by +<A HREF=ffuserguide.html#gls:flow NAME="15425">flow frames</A> place the following in the preamble: +<PRE> +\setlength{\sdfparindent}{\parindent} +</PRE> + +<P> +</LI> +<LI>My section numbering is in the wrong order. + +<P> +Remember that the contents of the <A HREF=ffuserguide.html#gls:dynamic NAME="15432">dynamic frames</A> are not set +until the page is shipped out, and the contents will be set +in the order of <A HREF=ffuserguide.html#gls:idn NAME="15439">IDN</A>, so if you have any sectioning commands +occuring within dynamic frames, they may not be set in the same +order as they are in your input file. + +<P> +</LI> +<LI>The contents of my <A HREF=ffuserguide.html#gls:static NAME="15446">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15449">dynamic</A> frame have shifted +to the left when I used <TT>\parshape</TT><A NAME="6839"></A>. + +<P> +This will happen if your <TT>\parshape</TT><A NAME="6844"></A> specification +exceeds the linewidth. For example: +<PRE> +\parshape=1 0.4\linewidth 0.7\linewidth +</PRE> +This specifies a line with overall length +<code>1.1\linewidth</code> which is too long. + +<P> +</LI> +</OL> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<H1><A NAME="SECTION0093000000000000000000"> +8.3 Error Messages</A> +</H1> + +<P> + +<OL> +<LI><code>Illegal unit of measure (pt inserted)</code> + +<P> +All lengths must have units. Remember to include the +units when defining new <A HREF=ffuserguide.html#gls:frame NAME="15491">frames</A>. The following +keys require lengths: <TT>width</TT>, <TT>height</TT>, +<TT>x</TT>, <TT>y</TT> and <TT>offset</TT><A NAME="tex2html204" + HREF="#foot3471"><SUP>8.3</SUP></A>. + +<P> +</LI> +<LI><code>Missing number, treated as zero</code> + +<P> +LaTeX is expecting a number. There are a number of +possible causes: + +<P> + +<OL> +<LI>You have used an <A HREF=ffuserguide.html#gls:idl NAME="15498">IDL</A> instead of an <A HREF=ffuserguide.html#gls:idn NAME="15505">IDN</A>. If you +want to refer to a frame by its label, you need to remember +to use the starred versions of the +<code>\set</code><I>type</I><code>frame</code> commands, or when setting +the contents of <A HREF=ffuserguide.html#gls:static NAME="15512">static frames</A> or <A HREF=ffuserguide.html#gls:dynamic NAME="15519">dynamic frames</A>. + +<P> +</LI> +<LI>When specifying page lists, you have mixed keywords +with page ranges. For example: <TT>1,even</TT> is invalid. +</LI> +</OL> + +<P> +</LI> +<LI><code>Flow frame IDL '</code><I>label</I><code>' already defined</code> + +<P> +All <A HREF=ffuserguide.html#gls:idl NAME="15526">IDLs</A> within each <A HREF=ffuserguide.html#gls:frame NAME="15533">frame</A> type must be +unique. There are similar error messages for duplicate +IDLs for <A HREF=ffuserguide.html#gls:static NAME="15544">static frames</A> and <A HREF=ffuserguide.html#gls:dynamic NAME="15551">dynamic frames</A>. + +<P> +</LI> +<LI><code>Can't find flow frame id</code> + +<P> +You have specified a non-existent flow frame <A HREF=ffuserguide.html#gls:idl NAME="15562">IDL</A>. There are +similar error messages for <A HREF=ffuserguide.html#gls:static NAME="15569">static frames</A> and <A HREF=ffuserguide.html#gls:dynamic NAME="15576">dynamic frames</A>. +Check to make sure you have spelt the label correctly, and +check you are using the correct <A HREF=ffuserguide.html#gls:frame NAME="15583">frame</A> type command. +(For example, if a static frame has the IDL <TT>mylabel</TT>, +and you attempt to do +<TT>\setflowframe*</TT><A NAME="6853"></A><TT>{mylabel}{<I>options</I>}</TT>, +then you will get this error, because <TT>mylabel</TT> refers +to a static frame not a <A HREF=ffuserguide.html#gls:flow NAME="15602">flow frame</A>.) + +<P> +</LI> +<LI><code>Key 'clear' is boolean</code> + +<P> +The <TT>clear</TT> key can only have the values <TT>true</TT> +or <TT>false</TT>. + +<P> +</LI> +<LI><code>Key 'clear' not available</code> + +<P> +The <TT>clear</TT> key is only available for <A HREF=ffuserguide.html#gls:static NAME="15605">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15608">dynamic</A> frames. + +<P> +</LI> +<LI><code>Key 'style' not available</code> + +<P> +The <TT>style</TT> key is only available for <A HREF=ffuserguide.html#gls:dynamic NAME="15615">dynamic frames</A>. + +<P> +</LI> +<LI><code>Key 'margin' not available</code> + +<P> +The <TT>margin</TT> key is only available for <A HREF=ffuserguide.html#gls:flow NAME="15622">flow frames</A>. + +<P> +</LI> +<LI><code>Key 'shape' not available</code> + +<P> +The <TT>shape</TT> key is only available for <A HREF=ffuserguide.html#gls:static NAME="15625">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15628">dynamic</A> frames. + +<P> +</LI> +<LI><code>Dynamic frame style '</code><I>style</I><code>' not defined</code> + +<P> +The specified style <I>style</I> must be the name of a command +without the preceding backslash. It is possible that you have +mis-spelt the name, or you have forgotten to define the command. + +<P> +</LI> +<LI><code>Argument of \fbox has an extra }</code> + +<P> +This error will occur if you do, say, <code>border=\fbox</code> +instead of <code>border=fbox</code>. Remember not to include +the initial backslash. + +<P> +</LI> +<LI><code>Not in outer par mode</code> + +<P> +You can not have floats (such as figures, tables or marginal +notes) in <A HREF=ffuserguide.html#gls:static NAME="15631">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15634">dynamic</A> frames. If you want +a figure or table within a <A HREF=ffuserguide.html#gls:static NAME="15637">static</A> or +<A HREF=ffuserguide.html#gls:dynamic NAME="15640">dynamic</A> frame +use <TT>staticfigure</TT><A NAME="6877"></A> or <TT>statictable</TT><A NAME="6880"></A>. + +<P> +</LI> +<LI><code>Somethings wrong---maybe missing \item</code> + +<P> +Assuming that all your list type of environments start +with <TT>\item</TT><A NAME="6883"></A>, this may be caused by something going +wrong with the toc (table of contents), ttb (thumbtab) +or aux (auxiliary) files in the previous run. Try deleting +them, and try again. + +<P> +</LI> +<LI><code>No room for a new \skip</code> + +<P> +You have exceeded TeX's 256 register limit. Use the <TT>etex</TT><A NAME="6888"></A> +package. + +<P> +</LI> +<LI><code>\verb illegal in command argument</code> + +<P> +As a general rule, you can't use verbatim text<A NAME="6890"></A> in a command +argument. +This rule applies to all the commands defined by the <TT>flowfram</TT> +package. See also below. + +<P> +</LI> +<LI>I get <code>\verb illegal in command argument</code> when using +verbatim text<A NAME="6891"></A> inside the <TT>dynamiccontents</TT><A NAME="6893"></A> environment. + +<P> +You can not use verbatim text<A NAME="6895"></A> inside either the starred or +unstarred version of the <TT>dynamiccontents</TT><A NAME="6897"></A> environment. +(See <A HREF="ffuserguide.html#pg:verb">earlier</A>.) + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> +</LI> +</OL> + +<P> +<BR> + +<H2><A NAME="SECTION00100000000000000000000"> +Glossary</A> +</H2> +<DL COMPACT> +<DT><A NAME="gls:bbox"><B>bounding box</B></A><DD>The bounding box of a frame is the area allocated for the +contents of that frame. However the text may not completely fill that +area, and it is possible that the text may overflow that area. <A NAME="tex2html9" + HREF="ffuserguide.html#11490"> 1.1 Draft Option</A> +, <A NAME="tex2html24" + HREF="ffuserguide.html#11675"> 1.2 Frame Stacking Order</A> +, <A NAME="tex2html65" + HREF="ffuserguide.html#12953"> 3. Modifying Frame Attributes</A> +, <A NAME="tex2html68" + HREF="ffuserguide.html#13034"> 3. Modifying Frame Attributes</A> +, <A NAME="tex2html72" + HREF="ffuserguide.html#13123"> 3.1 Non-Rectangular Frames</A> +, <A NAME="tex2html119" + HREF="ffuserguide.html#14849"> 7.1 Macros</A> +, <A NAME="tex2html120" + HREF="ffuserguide.html#14856"> 7.1 Macros</A> +, <A NAME="tex2html122" + HREF="ffuserguide.html#14870"> 7.1 Macros</A> +, <A NAME="tex2html123" + HREF="ffuserguide.html#14878"> 7.2 Lengths</A> +, <A NAME="tex2html124" + HREF="ffuserguide.html#14885"> 7.2 Lengths</A> +, <A NAME="tex2html157" + HREF="ffuserguide.html#15156"> 8.1 General Queries</A> +<DT><A NAME="gls:dynamic"><B>dynamic frame</B></A><DD>Frames +in which text is fixed in place, but the contents are re-typeset +each time the frame is displayed. <A NAME="tex2html7" + HREF="ffuserguide.html#11409"> 1. Introduction</A> +, <A NAME="tex2html16" + HREF="ffuserguide.html#11559"> 1.1 Draft Option</A> +, <A NAME="tex2html22" + HREF="ffuserguide.html#11661"> 1.2 Frame Stacking Order</A> +, <A NAME="tex2html28" + HREF="ffuserguide.html#11716"> 1.3 HTML</A> +, <A NAME="tex2html49" + HREF="ffuserguide.html#12406"> 2.3 Dynamic Frames</A> +, <A NAME="tex2html56" + HREF="ffuserguide.html#12596"> 2.3.1 Important Notes</A> +, <A NAME="tex2html60" + HREF="ffuserguide.html#12774"> 3. Modifying Frame Attributes</A> +, <A NAME="tex2html70" + HREF="ffuserguide.html#13109"> 3.1 Non-Rectangular Frames</A> +, <A NAME="tex2html85" + HREF="ffuserguide.html#13348"> 4.3 Relative Locations</A> +, <A NAME="tex2html116" + HREF="ffuserguide.html#14799"> 6.2 Minitocs</A> +, <A NAME="tex2html129" + HREF="ffuserguide.html#14912"> 7.2 Lengths</A> +, <A NAME="tex2html135" + HREF="ffuserguide.html#15005"> 7.3 Counters</A> +, <A NAME="tex2html140" + HREF="ffuserguide.html#15056"> 7.3 Counters</A> +, <A NAME="tex2html156" + HREF="ffuserguide.html#15149"> 8.1 General Queries</A> +, <A NAME="tex2html162" + HREF="ffuserguide.html#15191"> 8.1 General Queries</A> +, <A NAME="tex2html164" + HREF="ffuserguide.html#15197"> 8.1 General Queries</A> +, <A NAME="tex2html166" + HREF="ffuserguide.html#15211"> 8.1 General Queries</A> +, <A NAME="tex2html171" + HREF="ffuserguide.html#15246"> 8.1 General Queries</A> +, <A NAME="tex2html173" + HREF="ffuserguide.html#15260"> 8.1 General Queries</A> +, <A NAME="tex2html180" + HREF="ffuserguide.html#15301"> 8.1 General Queries</A> +, <A NAME="tex2html182" + HREF="ffuserguide.html#15307"> 8.1 General Queries</A> +, <A NAME="tex2html194" + HREF="ffuserguide.html#15402"> 8.2 Unexpected Output</A> +, <A NAME="tex2html196" + HREF="ffuserguide.html#15412"> 8.2 Unexpected Output</A> +, <A NAME="tex2html198" + HREF="ffuserguide.html#15418"> 8.2 Unexpected Output</A> +, <A NAME="tex2html200" + HREF="ffuserguide.html#15432"> 8.2 Unexpected Output</A> +, <A NAME="tex2html203" + HREF="ffuserguide.html#15449"> 8.2 Unexpected Output</A> +, <A NAME="tex2html209" + HREF="ffuserguide.html#15519"> 8.3 Error Messages</A> +, <A NAME="tex2html213" + HREF="ffuserguide.html#15551"> 8.3 Error Messages</A> +, <A NAME="tex2html216" + HREF="ffuserguide.html#15576"> 8.3 Error Messages</A> +, <A NAME="tex2html220" + HREF="ffuserguide.html#15608"> 8.3 Error Messages</A> +, <A NAME="tex2html221" + HREF="ffuserguide.html#15615"> 8.3 Error Messages</A> +, <A NAME="tex2html224" + HREF="ffuserguide.html#15628"> 8.3 Error Messages</A> +, <A NAME="tex2html226" + HREF="ffuserguide.html#15634"> 8.3 Error Messages</A> +, <A NAME="tex2html228" + HREF="ffuserguide.html#15640"> 8.3 Error Messages</A> +<DT><A NAME="gls:flow"><B>flow frame</B></A><DD>The frames in a document such that the contents of the +<TT>document</TT><A NAME="3542"></A> environment flow from one frame to the next in +the order that they were defined. There must be at least one flow frame +on every page. <A NAME="tex2html5" + HREF="ffuserguide.html#11395"> 1. Introduction</A> +, <A NAME="tex2html14" + HREF="ffuserguide.html#11545"> 1.1 Draft Option</A> +, <A NAME="tex2html20" + HREF="ffuserguide.html#11647"> 1.2 Frame Stacking Order</A> +, <A NAME="tex2html32" + HREF="ffuserguide.html#11793"> 2.1 Flow Frames</A> +, <A NAME="tex2html39" + HREF="ffuserguide.html#11959"> 2.1.1 Prematurely Ending a Flow Frame</A> +, <A NAME="tex2html58" + HREF="ffuserguide.html#12760"> 3. Modifying Frame Attributes</A> +, <A NAME="tex2html71" + HREF="ffuserguide.html#13116"> 3.1 Non-Rectangular Frames</A> +, <A NAME="tex2html84" + HREF="ffuserguide.html#13341"> 4.3 Relative Locations</A> +, <A NAME="tex2html89" + HREF="ffuserguide.html#13426"> 5.1 Column Styles</A> +, <A NAME="tex2html93" + HREF="ffuserguide.html#14060"> 5.2 Column Styles with an Additional Frame</A> +, <A NAME="tex2html110" + HREF="ffuserguide.html#14666"> 5.3.4 Vertical and Horizontal Rules</A> +, <A NAME="tex2html130" + HREF="ffuserguide.html#14919"> 7.2 Lengths</A> +, <A NAME="tex2html131" + HREF="ffuserguide.html#14969"> 7.3 Counters</A> +, <A NAME="tex2html136" + HREF="ffuserguide.html#15016"> 7.3 Counters</A> +, <A NAME="tex2html145" + HREF="ffuserguide.html#15080"> 8.1 General Queries</A> +, <A NAME="tex2html146" + HREF="ffuserguide.html#15087"> 8.1 General Queries</A> +, <A NAME="tex2html149" + HREF="ffuserguide.html#15108"> 8.1 General Queries</A> +, <A NAME="tex2html150" + HREF="ffuserguide.html#15115"> 8.1 General Queries</A> +, <A NAME="tex2html152" + HREF="ffuserguide.html#15129"> 8.1 General Queries</A> +, <A NAME="tex2html153" + HREF="ffuserguide.html#15136"> 8.1 General Queries</A> +, <A NAME="tex2html159" + HREF="ffuserguide.html#15170"> 8.1 General Queries</A> +, <A NAME="tex2html160" + HREF="ffuserguide.html#15177"> 8.1 General Queries</A> +, <A NAME="tex2html167" + HREF="ffuserguide.html#15218"> 8.1 General Queries</A> +, <A NAME="tex2html170" + HREF="ffuserguide.html#15239"> 8.1 General Queries</A> +, <A NAME="tex2html174" + HREF="ffuserguide.html#15267"> 8.1 General Queries</A> +, <A NAME="tex2html176" + HREF="ffuserguide.html#15281"> 8.1 General Queries</A> +, <A NAME="tex2html185" + HREF="ffuserguide.html#15331"> 8.2 Unexpected Output</A> +, <A NAME="tex2html186" + HREF="ffuserguide.html#15338"> 8.2 Unexpected Output</A> +, <A NAME="tex2html187" + HREF="ffuserguide.html#15345"> 8.2 Unexpected Output</A> +, <A NAME="tex2html188" + HREF="ffuserguide.html#15352"> 8.2 Unexpected Output</A> +, <A NAME="tex2html189" + HREF="ffuserguide.html#15359"> 8.2 Unexpected Output</A> +, <A NAME="tex2html192" + HREF="ffuserguide.html#15380"> 8.2 Unexpected Output</A> +, <A NAME="tex2html199" + HREF="ffuserguide.html#15425"> 8.2 Unexpected Output</A> +, <A NAME="tex2html218" + HREF="ffuserguide.html#15602"> 8.3 Error Messages</A> +, <A NAME="tex2html222" + HREF="ffuserguide.html#15622"> 8.3 Error Messages</A> +<DT><A NAME="gls:frame"><B>frame</B></A><DD>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: +flow, static and dynamic. <A NAME="tex2html4" + HREF="ffuserguide.html#11380"> 1. Introduction</A> +, <A NAME="tex2html10" + HREF="ffuserguide.html#11497"> 1.1 Draft Option</A> +, <A NAME="tex2html25" + HREF="ffuserguide.html#11682"> 1.2 Frame Stacking Order</A> +, <A NAME="tex2html26" + HREF="ffuserguide.html#11710"> 1.3 HTML</A> +, <A NAME="tex2html33" + HREF="ffuserguide.html#11800"> 2.1 Flow Frames</A> +, <A NAME="tex2html40" + HREF="ffuserguide.html#11970"> 2.1.1 Prematurely Ending a Flow Frame</A> +, <A NAME="tex2html53" + HREF="ffuserguide.html#12494"> 2.3 Dynamic Frames</A> +, <A NAME="tex2html57" + HREF="ffuserguide.html#12611"> 2.3.1 Important Notes</A> +, <A NAME="tex2html61" + HREF="ffuserguide.html#12781"> 3. Modifying Frame Attributes</A> +, <A NAME="tex2html73" + HREF="ffuserguide.html#13130"> 3.1 Non-Rectangular Frames</A> +, <A NAME="tex2html74" + HREF="ffuserguide.html#13156"> 4. Locations and Dimensions</A> +, <A NAME="tex2html75" + HREF="ffuserguide.html#13188"> 4.1 Determining the Location of the Typeblock</A> +, <A NAME="tex2html77" + HREF="ffuserguide.html#13239"> 4.2 Determining the Dimensions and Locations of Frames</A> +, <A NAME="tex2html80" + HREF="ffuserguide.html#13313"> 4.3 Relative Locations</A> +, <A NAME="tex2html88" + HREF="ffuserguide.html#13378"> 5. Predefined Layouts</A> +, <A NAME="tex2html94" + HREF="ffuserguide.html#14067"> 5.2 Column Styles with an Additional Frame</A> +, <A NAME="tex2html104" + HREF="ffuserguide.html#14588"> 5.3.4 Vertical and Horizontal Rules</A> +, <A NAME="tex2html125" + HREF="ffuserguide.html#14892"> 7.2 Lengths</A> +, <A NAME="tex2html126" + HREF="ffuserguide.html#14899"> 7.2 Lengths</A> +, <A NAME="tex2html138" + HREF="ffuserguide.html#15042"> 7.3 Counters</A> +, <A NAME="tex2html154" + HREF="ffuserguide.html#15143"> 8.1 General Queries</A> +, <A NAME="tex2html158" + HREF="ffuserguide.html#15163"> 8.1 General Queries</A> +, <A NAME="tex2html177" + HREF="ffuserguide.html#15288"> 8.1 General Queries</A> +, <A NAME="tex2html178" + HREF="ffuserguide.html#15295"> 8.1 General Queries</A> +, <A NAME="tex2html184" + HREF="ffuserguide.html#15321"> 8.1 General Queries</A> +, <A NAME="tex2html190" + HREF="ffuserguide.html#15366"> 8.2 Unexpected Output</A> +, <A NAME="tex2html191" + HREF="ffuserguide.html#15373"> 8.2 Unexpected Output</A> +, <A NAME="tex2html205" + HREF="ffuserguide.html#15491"> 8.3 Error Messages</A> +, <A NAME="tex2html211" + HREF="ffuserguide.html#15533"> 8.3 Error Messages</A> +, <A NAME="tex2html217" + HREF="ffuserguide.html#15583"> 8.3 Error Messages</A> +<DT><A NAME="gls:fcmd"><B>frame making command</B></A><DD>A +LaTeX command which places some kind of border around its +argument. For example: <TT>\fbox</TT><A NAME="3555"></A>. <A NAME="tex2html64" + HREF="ffuserguide.html#12938"> 3. Modifying Frame Attributes</A> +, <A NAME="tex2html127" + HREF="ffuserguide.html#14906"> 7.2 Lengths</A> +<DT><A NAME="gls:idl"><B>identification label +(IDL)</B></A><DD>A unique +label which can be assigned to a frame, enabling you to +refer to the frame by label instead of by its +IDN. <A NAME="tex2html13" + HREF="ffuserguide.html#11534"> 1.1 Draft Option</A> +, <A NAME="tex2html38" + HREF="ffuserguide.html#11887"> 2.1 Flow Frames</A> +, <A NAME="tex2html45" + HREF="ffuserguide.html#12137"> 2.2 Static Frames</A> +, <A NAME="tex2html52" + HREF="ffuserguide.html#12451"> 2.3 Dynamic Frames</A> +, <A NAME="tex2html55" + HREF="ffuserguide.html#12544"> 2.3 Dynamic Frames</A> +, <A NAME="tex2html63" + HREF="ffuserguide.html#12839"> 3. Modifying Frame Attributes</A> +, <A NAME="tex2html78" + HREF="ffuserguide.html#13246"> 4.2 Determining the Dimensions and Locations of Frames</A> +, <A NAME="tex2html83" + HREF="ffuserguide.html#13334"> 4.3 Relative Locations</A> +, <A NAME="tex2html86" + HREF="ffuserguide.html#13359"> 4.3 Relative Locations</A> +, <A NAME="tex2html99" + HREF="ffuserguide.html#14197"> 5.3 Backdrop Effects</A> +, <A NAME="tex2html109" + HREF="ffuserguide.html#14651"> 5.3.4 Vertical and Horizontal Rules</A> +, <A NAME="tex2html118" + HREF="ffuserguide.html#14817"> 6.2 Minitocs</A> +, <A NAME="tex2html206" + HREF="ffuserguide.html#15498"> 8.3 Error Messages</A> +, <A NAME="tex2html210" + HREF="ffuserguide.html#15526"> 8.3 Error Messages</A> +, <A NAME="tex2html214" + HREF="ffuserguide.html#15562"> 8.3 Error Messages</A> +<DT><A NAME="gls:idn"><B>identification number +(IDN)</B></A><DD>A unique +number assigned to each frame, which you can use to identify +the frame when modifying its appearance. Example: if you +have defined 3 flow frames, 2 static frames and 1 dynamic +frame, the flow frames will have IDNs 1, 2 and 3, the static +frames will have IDNs 1 and 2, and the dynamic frame will +have IDN 1. <A NAME="tex2html12" + HREF="ffuserguide.html#11523"> 1.1 Draft Option</A> +, <A NAME="tex2html19" + HREF="ffuserguide.html#11640"> 1.2 Frame Stacking Order</A> +, <A NAME="tex2html21" + HREF="ffuserguide.html#11654"> 1.2 Frame Stacking Order</A> +, <A NAME="tex2html23" + HREF="ffuserguide.html#11668"> 1.2 Frame Stacking Order</A> +, <A NAME="tex2html37" + HREF="ffuserguide.html#11864"> 2.1 Flow Frames</A> +, <A NAME="tex2html46" + HREF="ffuserguide.html#12152"> 2.2 Static Frames</A> +, <A NAME="tex2html51" + HREF="ffuserguide.html#12440"> 2.3 Dynamic Frames</A> +, <A NAME="tex2html54" + HREF="ffuserguide.html#12537"> 2.3 Dynamic Frames</A> +, <A NAME="tex2html62" + HREF="ffuserguide.html#12820"> 3. Modifying Frame Attributes</A> +, <A NAME="tex2html79" + HREF="ffuserguide.html#13253"> 4.2 Determining the Dimensions and Locations of Frames</A> +, <A NAME="tex2html81" + HREF="ffuserguide.html#13320"> 4.3 Relative Locations</A> +, <A NAME="tex2html82" + HREF="ffuserguide.html#13327"> 4.3 Relative Locations</A> +, <A NAME="tex2html87" + HREF="ffuserguide.html#13366"> 4.3 Relative Locations</A> +, <A NAME="tex2html106" + HREF="ffuserguide.html#14606"> 5.3.4 Vertical and Horizontal Rules</A> +, <A NAME="tex2html108" + HREF="ffuserguide.html#14632"> 5.3.4 Vertical and Horizontal Rules</A> +, <A NAME="tex2html115" + HREF="ffuserguide.html#14781"> 6.1 Thumbtabs</A> +, <A NAME="tex2html117" + HREF="ffuserguide.html#14806"> 6.2 Minitocs</A> +, <A NAME="tex2html132" + HREF="ffuserguide.html#14976"> 7.3 Counters</A> +, <A NAME="tex2html133" + HREF="ffuserguide.html#14987"> 7.3 Counters</A> +, <A NAME="tex2html137" + HREF="ffuserguide.html#15023"> 7.3 Counters</A> +, <A NAME="tex2html201" + HREF="ffuserguide.html#15439"> 8.2 Unexpected Output</A> +, <A NAME="tex2html207" + HREF="ffuserguide.html#15505"> 8.3 Error Messages</A> +<DT><A NAME="gls:pglist"><B>page list</B></A><DD>A list of +pages. This can either be a single keyword: <TT>all</TT>, +<TT>odd</TT>, <TT>even</TT> or <TT>none</TT>, or it can +be a comma-separated list of individual page numbers or +page ranges. For example: <TT><3,5,7-11,>15</TT> +indicates pages 1,2,5,7,8,9,10,11 and all pages after page 15. +Note that these numbers refer to the actual value of the +page counter, not the absolute physical page number. <A NAME="tex2html35" + HREF="ffuserguide.html#11842"> 2.1 Flow Frames</A> +, <A NAME="tex2html44" + HREF="ffuserguide.html#12126"> 2.2 Static Frames</A> +, <A NAME="tex2html66" + HREF="ffuserguide.html#12980"> 3. Modifying Frame Attributes</A> +, <A NAME="tex2html91" + HREF="ffuserguide.html#13448"> 5.1 Column Styles</A> +, <A NAME="tex2html95" + HREF="ffuserguide.html#14074"> 5.2 Column Styles with an Additional Frame</A> +, <A NAME="tex2html98" + HREF="ffuserguide.html#14186"> 5.3 Backdrop Effects</A> +, <A NAME="tex2html148" + HREF="ffuserguide.html#15101"> 8.1 General Queries</A> +, <A NAME="tex2html151" + HREF="ffuserguide.html#15122"> 8.1 General Queries</A> +<DT><A NAME="gls:pgrange"><B>page range</B></A><DD>Page +ranges can be closed, e.g. <TT>5-10</TT>, or open, e.g. +<TT><7</TT> or <TT>>9</TT>. <A NAME="tex2html36" + HREF="ffuserguide.html#11849"> 2.1 Flow Frames</A> +, <A NAME="tex2html67" + HREF="ffuserguide.html#12995"> 3. Modifying Frame Attributes</A> +<DT><A NAME="gls:static"><B>static frame</B></A><DD>Frames in which text is fixed in place. The contents are fixed until +explicitly changed or cleared via the <TT>\clear</TT><A NAME="3545"></A> key +in <TT>\setstaticcontents</TT><A NAME="3550"></A>. <A NAME="tex2html6" + HREF="ffuserguide.html#11402"> 1. Introduction</A> +, <A NAME="tex2html15" + HREF="ffuserguide.html#11552"> 1.1 Draft Option</A> +, <A NAME="tex2html18" + HREF="ffuserguide.html#11633"> 1.2 Frame Stacking Order</A> +, <A NAME="tex2html27" + HREF="ffuserguide.html#11713"> 1.3 HTML</A> +, <A NAME="tex2html42" + HREF="ffuserguide.html#12084"> 2.2 Static Frames</A> +, <A NAME="tex2html47" + HREF="ffuserguide.html#12272"> 2.2.1 Important Notes</A> +, <A NAME="tex2html50" + HREF="ffuserguide.html#12413"> 2.3 Dynamic Frames</A> +, <A NAME="tex2html59" + HREF="ffuserguide.html#12767"> 3. Modifying Frame Attributes</A> +, <A NAME="tex2html69" + HREF="ffuserguide.html#13106"> 3.1 Non-Rectangular Frames</A> +, <A NAME="tex2html97" + HREF="ffuserguide.html#14175"> 5.3 Backdrop Effects</A> +, <A NAME="tex2html101" + HREF="ffuserguide.html#14348"> 5.3.1 Vertical stripe effects</A> +, <A NAME="tex2html102" + HREF="ffuserguide.html#14488"> 5.3.2 Horizontal stripe effect</A> +, <A NAME="tex2html103" + HREF="ffuserguide.html#14512"> 5.3.3 Background Frame</A> +, <A NAME="tex2html105" + HREF="ffuserguide.html#14595"> 5.3.4 Vertical and Horizontal Rules</A> +, <A NAME="tex2html107" + HREF="ffuserguide.html#14621"> 5.3.4 Vertical and Horizontal Rules</A> +, <A NAME="tex2html111" + HREF="ffuserguide.html#14673"> 5.3.4 Vertical and Horizontal Rules</A> +, <A NAME="tex2html128" + HREF="ffuserguide.html#14909"> 7.2 Lengths</A> +, <A NAME="tex2html134" + HREF="ffuserguide.html#15002"> 7.3 Counters</A> +, <A NAME="tex2html139" + HREF="ffuserguide.html#15049"> 7.3 Counters</A> +, <A NAME="tex2html155" + HREF="ffuserguide.html#15146"> 8.1 General Queries</A> +, <A NAME="tex2html161" + HREF="ffuserguide.html#15184"> 8.1 General Queries</A> +, <A NAME="tex2html163" + HREF="ffuserguide.html#15194"> 8.1 General Queries</A> +, <A NAME="tex2html165" + HREF="ffuserguide.html#15204"> 8.1 General Queries</A> +, <A NAME="tex2html169" + HREF="ffuserguide.html#15232"> 8.1 General Queries</A> +, <A NAME="tex2html172" + HREF="ffuserguide.html#15253"> 8.1 General Queries</A> +, <A NAME="tex2html179" + HREF="ffuserguide.html#15298"> 8.1 General Queries</A> +, <A NAME="tex2html181" + HREF="ffuserguide.html#15304"> 8.1 General Queries</A> +, <A NAME="tex2html193" + HREF="ffuserguide.html#15395"> 8.2 Unexpected Output</A> +, <A NAME="tex2html195" + HREF="ffuserguide.html#15409"> 8.2 Unexpected Output</A> +, <A NAME="tex2html197" + HREF="ffuserguide.html#15415"> 8.2 Unexpected Output</A> +, <A NAME="tex2html202" + HREF="ffuserguide.html#15446"> 8.2 Unexpected Output</A> +, <A NAME="tex2html208" + HREF="ffuserguide.html#15512"> 8.3 Error Messages</A> +, <A NAME="tex2html212" + HREF="ffuserguide.html#15544"> 8.3 Error Messages</A> +, <A NAME="tex2html215" + HREF="ffuserguide.html#15569"> 8.3 Error Messages</A> +, <A NAME="tex2html219" + HREF="ffuserguide.html#15605"> 8.3 Error Messages</A> +, <A NAME="tex2html223" + HREF="ffuserguide.html#15625"> 8.3 Error Messages</A> +, <A NAME="tex2html225" + HREF="ffuserguide.html#15631"> 8.3 Error Messages</A> +, <A NAME="tex2html227" + HREF="ffuserguide.html#15637"> 8.3 Error Messages</A> +<DT><A NAME="gls:typeblock"><B>typeblock</B></A><DD>The area of the page where the main body of the text goes. +The width and height of this area are given by +<TT>\textwidth</TT><A NAME="3532"></A> and <TT>\textheight</TT><A NAME="3537"></A>. <A NAME="tex2html8" + HREF="ffuserguide.html#11420"> 1. Introduction</A> +, <A NAME="tex2html11" + HREF="ffuserguide.html#11512"> 1.1 Draft Option</A> +, <A NAME="tex2html34" + HREF="ffuserguide.html#11831"> 2.1 Flow Frames</A> +, <A NAME="tex2html43" + HREF="ffuserguide.html#12119"> 2.2 Static Frames</A> +, <A NAME="tex2html76" + HREF="ffuserguide.html#13195"> 4.1 Determining the Location of the Typeblock</A> +, <A NAME="tex2html90" + HREF="ffuserguide.html#13433"> 5.1 Column Styles</A> +, <A NAME="tex2html96" + HREF="ffuserguide.html#14085"> 5.2 Column Styles with an Additional Frame</A> +, <A NAME="tex2html100" + HREF="ffuserguide.html#14216"> 5.3 Backdrop Effects</A> +, <A NAME="tex2html114" + HREF="ffuserguide.html#14770"> 6.1 Thumbtabs</A> +, <A NAME="tex2html121" + HREF="ffuserguide.html#14863"> 7.1 Macros</A> +, <A NAME="tex2html147" + HREF="ffuserguide.html#15094"> 8.1 General Queries</A> +, <A NAME="tex2html168" + HREF="ffuserguide.html#15225"> 8.1 General Queries</A> +, <A NAME="tex2html175" + HREF="ffuserguide.html#15274"> 8.1 General Queries</A> +, <A NAME="tex2html183" + HREF="ffuserguide.html#15314"> 8.1 General Queries</A> +</DL> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> +<A NAME="index"></A> +<BR> + +<H2><A NAME="SECTION00110000000000000000000"> +Index</A> +</H2><DL COMPACT> +<DT><STRONG><TT>\afterminitocskip</TT></STRONG> +<DD><A HREF="ffuserguide.html#6515">6.2</A> + | <A HREF="ffuserguide.html#6664">7.2</A> +<DT><STRONG><TT>\appenddfminitoc</TT></STRONG> +<DD><A HREF="ffuserguide.html#6496">6.2</A> +<DT><STRONG><TT>\appenddynamiccontents</TT></STRONG> +<DD><A HREF="ffuserguide.html#4099">2.3</A> +<DT><STRONG><TT>\appenddynamiccontents*</TT></STRONG> +<DD><A HREF="ffuserguide.html#4108">2.3</A> +<DT><STRONG><TT>\baselineskip</TT></STRONG> +<DD><A HREF="ffuserguide.html#4873">5.1</A> + | <A HREF="ffuserguide.html#4932">5.1</A> + | <A HREF="ffuserguide.html#4957">5.1</A> + | <A HREF="ffuserguide.html#4993">5.2</A> + | <A HREF="ffuserguide.html#6624">7.2</A> +<DT><STRONG><TT>\beforeminitocskip</TT></STRONG> +<DD><A HREF="ffuserguide.html#6510">6.2</A> + | <A HREF="ffuserguide.html#6659">7.2</A> +<DT><STRONG><TT>\caption</TT></STRONG> +<DD><A HREF="ffuserguide.html#3594">1.</A> +<DT><STRONG><TT>\chapter</TT></STRONG> +<DD><A HREF="ffuserguide.html#4117">2.3</A> + | <A HREF="ffuserguide.html#4466">3.1</A> + | <A HREF="ffuserguide.html#6390">6.1</A> +<DT><STRONG><TT>\clear</TT></STRONG> +<DD><A HREF="ffuserguide.html#3545">ffuserguide</A> +<DT><STRONG><TT>\cleardoublepage</TT></STRONG> +<DD><A HREF="ffuserguide.html#3813">2.1.1</A> +<DT><STRONG><TT>\clearpage</TT></STRONG> +<DD><A HREF="ffuserguide.html#3808">2.1.1</A> +<DT><STRONG><TT>color</TT> package</STRONG> +<DD><A HREF="ffuserguide.html#3631">1.</A> +<DT><STRONG><TT>\columnsep</TT></STRONG> +<DD><A HREF="ffuserguide.html#4868">5.1</A> + | <A HREF="ffuserguide.html#4912">5.1</A> + | <A HREF="ffuserguide.html#4952">5.1</A> + | <A HREF="ffuserguide.html#4962">5.1</A> + | <A HREF="ffuserguide.html#6629">7.2</A> +<DT><STRONG><TT>\columnseprule</TT></STRONG> +<DD><A HREF="ffuserguide.html#6287">5.3.4</A> +<DT><STRONG><TT>\computebottomedge</TT></STRONG> +<DD><A HREF="ffuserguide.html#4613">4.1</A> +<DT><STRONG><TT>\computeleftedgeeven</TT></STRONG> +<DD><A HREF="ffuserguide.html#4599">4.1</A> +<DT><STRONG><TT>\computeleftedgeodd</TT></STRONG> +<DD><A HREF="ffuserguide.html#4592">4.1</A> +<DT><STRONG><TT>\computerightedgeeven</TT></STRONG> +<DD><A HREF="ffuserguide.html#4627">4.1</A> +<DT><STRONG><TT>\computerightedgeodd</TT></STRONG> +<DD><A HREF="ffuserguide.html#4620">4.1</A> +<DT><STRONG><TT>\computetopedge</TT></STRONG> +<DD><A HREF="ffuserguide.html#4606">4.1</A> +<DT><STRONG><TT>\continueonframe</TT></STRONG> +<DD><A HREF="ffuserguide.html#3933">2.2</A> + | <A HREF="ffuserguide.html#3964">2.2</A> + | <A HREF="ffuserguide.html#4145">2.3</A> + | <A HREF="ffuserguide.html#4170">2.3</A> + | <A HREF="ffuserguide.html#4185">2.3.1</A> + | <A HREF="ffuserguide.html#4840">4.3</A> +<DT><STRONG><TT>\dfchaphead</TT></STRONG> +<DD><A HREF="ffuserguide.html#4122">2.3</A> +<DT><STRONG><TT>\dfswapoddeven</TT></STRONG> +<DD><A HREF="ffuserguide.html#4293">3.</A> +<DT><STRONG><TT>\diamondshape</TT></STRONG> +<DD><A HREF="ffuserguide.html#4551">3.1</A> +<DT><STRONG><TT>\disablethumbtabs</TT></STRONG> +<DD><A HREF="ffuserguide.html#6410">6.1</A> +<DT><STRONG><TT>displayedframe</TT> counter</STRONG> +<DD><A HREF="ffuserguide.html#6714">7.3</A> +<DT><STRONG><TT>document</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#3542">ffuserguide</A> + | <A HREF="ffuserguide.html#3569">1.</A> + | <A HREF="ffuserguide.html#3711">2.1</A> +<DT><STRONG><TT>\doublebox</TT></STRONG> +<DD><A HREF="ffuserguide.html#4314">3.</A> + | <A HREF="ffuserguide.html#4363">3.</A> +<DT><STRONG><TT>draft</TT> option</STRONG> +<DD><A HREF="ffuserguide.html#3638">1.1</A> + | <A HREF="ffuserguide.html#3671">1.1</A> + | <A HREF="ffuserguide.html#3689">1.2</A> +<DT><STRONG><TT>dynamiccontents</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#3986">2.3</A> + | <A HREF="ffuserguide.html#4083">2.3</A> + | <A HREF="ffuserguide.html#4093">2.3</A> + | <A HREF="ffuserguide.html#4139">2.3</A> + | <A HREF="ffuserguide.html#4179">2.3.1</A> + | <A HREF="ffuserguide.html#6893">8.3</A> + | <A HREF="ffuserguide.html#6897">8.3</A> +<DT><STRONG><TT>dynamiccontents*</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#4088">2.3</A> + | <A HREF="ffuserguide.html#4096">2.3</A> + | <A HREF="ffuserguide.html#4142">2.3</A> + | <A HREF="ffuserguide.html#4153">2.3</A> + | <A HREF="ffuserguide.html#4182">2.3.1</A> +<DT><STRONG><TT>\enableminitoc</TT></STRONG> +<DD><A HREF="ffuserguide.html#6489">6.2</A> +<DT><STRONG><TT>\enablethumbtabs</TT></STRONG> +<DD><A HREF="ffuserguide.html#6405">6.1</A> +<DT><STRONG><TT>etex</TT> package</STRONG> +<DD><A HREF="ffuserguide.html#6888">8.3</A> +<DT><STRONG><TT>\evensidemargin</TT></STRONG> +<DD><A HREF="ffuserguide.html#3577">1.</A> +<DT><STRONG><TT>fancybox</TT> package</STRONG> +<DD><A HREF="ffuserguide.html#4311">3.</A> +<DT><STRONG><TT>\fbox</TT></STRONG> +<DD><A HREF="ffuserguide.html#3555">ffuserguide</A> + | <A HREF="ffuserguide.html#4306">3.</A> + | <A HREF="ffuserguide.html#4348">3.</A> + | <A HREF="ffuserguide.html#6600">7.2</A> +<DT><STRONG><TT>\fboxsep</TT></STRONG> +<DD><A HREF="ffuserguide.html#6595">7.2</A> +<DT><STRONG><TT>\FFabove</TT></STRONG> +<DD><A HREF="ffuserguide.html#4740">4.3</A> +<DT><STRONG><TT>\FFaboveleft</TT></STRONG> +<DD><A HREF="ffuserguide.html#4730">4.3</A> +<DT><STRONG><TT>\FFaboveright</TT></STRONG> +<DD><A HREF="ffuserguide.html#4735">4.3</A> +<DT><STRONG><TT>\ffareaheight</TT></STRONG> +<DD><A HREF="ffuserguide.html#4685">4.2</A> +<DT><STRONG><TT>\ffareawidth</TT></STRONG> +<DD><A HREF="ffuserguide.html#4680">4.2</A> +<DT><STRONG><TT>\ffareax</TT></STRONG> +<DD><A HREF="ffuserguide.html#4690">4.2</A> +<DT><STRONG><TT>\ffareay</TT></STRONG> +<DD><A HREF="ffuserguide.html#4695">4.2</A> +<DT><STRONG><TT>\FFbelow</TT></STRONG> +<DD><A HREF="ffuserguide.html#4755">4.3</A> +<DT><STRONG><TT>\FFbelowleft</TT></STRONG> +<DD><A HREF="ffuserguide.html#4745">4.3</A> +<DT><STRONG><TT>\FFbelowright</TT></STRONG> +<DD><A HREF="ffuserguide.html#4750">4.3</A> +<DT><STRONG><TT>\ffcolumnseprule</TT></STRONG> +<DD><A HREF="ffuserguide.html#6282">5.3.4</A> + | <A HREF="ffuserguide.html#6322">5.3.4</A> + | <A HREF="ffuserguide.html#6340">5.3.4</A> + | <A HREF="ffuserguide.html#6644">7.2</A> +<DT><STRONG><TT>\ffcontinuedtextfont</TT></STRONG> +<DD><A HREF="ffuserguide.html#3957">2.2</A> + | <A HREF="ffuserguide.html#4163">2.3</A> + | <A HREF="ffuserguide.html#6564">7.1</A> +<DT><STRONG><TT>\ffcontinuedtextlayout</TT></STRONG> +<DD><A HREF="ffuserguide.html#3950">2.2</A> + | <A HREF="ffuserguide.html#4156">2.3</A> +<DT><STRONG><TT>\ffhrule</TT></STRONG> +<DD><A HREF="ffuserguide.html#6332">5.3.4</A> +<DT><STRONG><TT>\fflabelfont</TT></STRONG> +<DD><A HREF="ffuserguide.html#6544">7.1</A> +<DT><STRONG><TT>\fflabelsep</TT></STRONG> +<DD><A HREF="ffuserguide.html#6580">7.2</A> +<DT><STRONG><TT>\FFleft</TT></STRONG> +<DD><A HREF="ffuserguide.html#4760">4.3</A> +<DT><STRONG><TT>\FFoverlap</TT></STRONG> +<DD><A HREF="ffuserguide.html#4770">4.3</A> +<DT><STRONG><TT>\FFright</TT></STRONG> +<DD><A HREF="ffuserguide.html#4765">4.3</A> +<DT><STRONG><TT>\ffruledeclarations</TT></STRONG> +<DD><A HREF="ffuserguide.html#6355">5.3.4</A> + | <A HREF="ffuserguide.html#6549">7.1</A> +<DT><STRONG><TT>\ffswapoddeven</TT></STRONG> +<DD><A HREF="ffuserguide.html#4279">3.</A> +<DT><STRONG><TT>\ffvadjustfalse</TT></STRONG> +<DD><A HREF="ffuserguide.html#4878">5.1</A> +<DT><STRONG><TT>\ffvrule</TT></STRONG> +<DD><A HREF="ffuserguide.html#6297">5.3.4</A> +<DT><STRONG><TT>figure</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#3588">1.</A> + | <A HREF="ffuserguide.html#3610">1.</A> + | <A HREF="ffuserguide.html#3622">1.</A> +<DT><STRONG><TT>figure*</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#3616">1.</A> +<DT><STRONG><TT>\flowframerule</TT></STRONG> +<DD><A HREF="ffuserguide.html#4342">3.</A> + | <A HREF="ffuserguide.html#6590">7.2</A> +<DT><STRONG><TT>\flowframesep</TT></STRONG> +<DD><A HREF="ffuserguide.html#4337">3.</A> + | <A HREF="ffuserguide.html#6585">7.2</A> +<DT><STRONG><TT>\flowframeshowlayout</TT></STRONG> +<DD><A HREF="ffuserguide.html#3674">1.1</A> +<DT><STRONG>frame settings</STRONG> +<DD><DL COMPACT> +<DT><STRONG>angle</STRONG> +<DD><A HREF="ffuserguide.html#4398">3.</A> +<DT><STRONG>backcolor</STRONG> +<DD><A HREF="ffuserguide.html#4374">3.</A> +<DT><STRONG>border</STRONG> +<DD><A HREF="ffuserguide.html#4304">3.</A> +<DT><STRONG>bordercolor</STRONG> +<DD><A HREF="ffuserguide.html#4372">3.</A> +<DT><STRONG>clear</STRONG> +<DD><A HREF="ffuserguide.html#4377">3.</A> + | <A HREF="ffuserguide.html#4396">3.</A> + | <A HREF="ffuserguide.html#6775">8.1</A> +<DT><STRONG>evenx</STRONG> +<DD><A HREF="ffuserguide.html#4277">3.</A> +<DT><STRONG>eveny</STRONG> +<DD><A HREF="ffuserguide.html#4299">3.</A> +<DT><STRONG>height</STRONG> +<DD><A HREF="ffuserguide.html#4274">3.</A> +<DT><STRONG>label</STRONG> +<DD><A HREF="ffuserguide.html#4303">3.</A> +<DT><STRONG>margin</STRONG> +<DD><A HREF="ffuserguide.html#4376">3.</A> +<DT><STRONG>oddx</STRONG> +<DD><A HREF="ffuserguide.html#4300">3.</A> +<DT><STRONG>oddy</STRONG> +<DD><A HREF="ffuserguide.html#4301">3.</A> +<DT><STRONG>offset</STRONG> +<DD><A HREF="ffuserguide.html#4346">3.</A> +<DT><STRONG>pages</STRONG> +<DD><A HREF="ffuserguide.html#4375">3.</A> +<DT><STRONG>shape</STRONG> +<DD><A HREF="ffuserguide.html#4399">3.</A> + | <A HREF="ffuserguide.html#4459">3.1</A> + | <A HREF="ffuserguide.html#4493">3.1</A> + | <A HREF="ffuserguide.html#6761">8.1</A> +<DT><STRONG>style</STRONG> +<DD><A HREF="ffuserguide.html#4397">3.</A> +<DT><STRONG>textcolor</STRONG> +<DD><A HREF="ffuserguide.html#4373">3.</A> +<DT><STRONG>valign</STRONG> +<DD><A HREF="ffuserguide.html#4302">3.</A> + | <A HREF="ffuserguide.html#6793">8.1</A> +<DT><STRONG>width</STRONG> +<DD><A HREF="ffuserguide.html#4273">3.</A> +<DT><STRONG>x</STRONG> +<DD><A HREF="ffuserguide.html#4275">3.</A> +<DT><STRONG>y</STRONG> +<DD><A HREF="ffuserguide.html#4276">3.</A> +</DL> +<DT><STRONG><TT>\framebreak</TT></STRONG> +<DD><A HREF="ffuserguide.html#3793">2.1.1</A> + | <A HREF="ffuserguide.html#3798">2.1.1</A> + | <A HREF="ffuserguide.html#6814">8.2</A> +<DT><STRONG><TT>\getdynamicbounds</TT></STRONG> +<DD><A HREF="ffuserguide.html#4666">4.2</A> +<DT><STRONG><TT>\getdynamicbounds*</TT></STRONG> +<DD><A HREF="ffuserguide.html#4673">4.2</A> +<DT><STRONG><TT>\getdynamicid</TT></STRONG> +<DD><A HREF="ffuserguide.html#4023">2.3</A> + | <A HREF="ffuserguide.html#4037">2.3</A> +<DT><STRONG><TT>\getdynamiclabel</TT></STRONG> +<DD><A HREF="ffuserguide.html#4016">2.3</A> + | <A HREF="ffuserguide.html#4032">2.3</A> +<DT><STRONG><TT>\getflowbounds</TT></STRONG> +<DD><A HREF="ffuserguide.html#4652">4.2</A> +<DT><STRONG><TT>\getflowbounds*</TT></STRONG> +<DD><A HREF="ffuserguide.html#4659">4.2</A> +<DT><STRONG><TT>\getflowid</TT></STRONG> +<DD><A HREF="ffuserguide.html#3738">2.1</A> + | <A HREF="ffuserguide.html#3752">2.1</A> +<DT><STRONG><TT>\getflowlabel</TT></STRONG> +<DD><A HREF="ffuserguide.html#3731">2.1</A> + | <A HREF="ffuserguide.html#3747">2.1</A> +<DT><STRONG><TT>\getstaticbounds</TT></STRONG> +<DD><A HREF="ffuserguide.html#4638">4.2</A> +<DT><STRONG><TT>\getstaticbounds*</TT></STRONG> +<DD><A HREF="ffuserguide.html#4645">4.2</A> +<DT><STRONG><TT>\getstaticid</TT></STRONG> +<DD><A HREF="ffuserguide.html#3851">2.2</A> + | <A HREF="ffuserguide.html#3865">2.2</A> +<DT><STRONG><TT>\getstaticlabel</TT></STRONG> +<DD><A HREF="ffuserguide.html#3844">2.2</A> + | <A HREF="ffuserguide.html#3860">2.2</A> +<DT><STRONG><TT>ghostscript</TT></STRONG> +<DD><A HREF="ffuserguide.html#6819">8.2</A> +<DT><STRONG><TT>\heartshape</TT></STRONG> +<DD><A HREF="ffuserguide.html#4556">3.1</A> +<DT><STRONG><TT>\hNtone</TT></STRONG> +<DD><A HREF="ffuserguide.html#6104">5.3.2</A> +<DT><STRONG><TT>\hNtoneleft</TT></STRONG> +<DD><A HREF="ffuserguide.html#6188">5.3.2</A> +<DT><STRONG><TT>\hNtoneright</TT></STRONG> +<DD><A HREF="ffuserguide.html#6218">5.3.2</A> +<DT><STRONG><TT>\hsize</TT></STRONG> +<DD><A HREF="ffuserguide.html#3803">2.1.1</A> + | <A HREF="ffuserguide.html#6809">8.2</A> +<DT><STRONG><TT>html</TT> package</STRONG> +<DD><A HREF="ffuserguide.html#3700">1.3</A> +<DT><STRONG><TT>\htwotone</TT></STRONG> +<DD><A HREF="ffuserguide.html#6083">5.3.2</A> + | <A HREF="ffuserguide.html#6127">5.3.2</A> + | <A HREF="ffuserguide.html#6155">5.3.2</A> + | <A HREF="ffuserguide.html#6183">5.3.2</A> +<DT><STRONG><TT>\htwotoneleft</TT></STRONG> +<DD><A HREF="ffuserguide.html#6132">5.3.2</A> + | <A HREF="ffuserguide.html#6213">5.3.2</A> +<DT><STRONG><TT>\htwotoneright</TT></STRONG> +<DD><A HREF="ffuserguide.html#6160">5.3.2</A> + | <A HREF="ffuserguide.html#6243">5.3.2</A> +<DT><STRONG><TT>hyperref</TT> package</STRONG> +<DD><A HREF="ffuserguide.html#3628">1.</A> + | <A HREF="ffuserguide.html#6482">6.1</A> + | <A HREF="ffuserguide.html#6430">6.1</A> +<DT><STRONG><TT>\hypersetup</TT></STRONG> +<DD><A HREF="ffuserguide.html#6477">6.1</A> +<DT><STRONG><TT>\inserthrule</TT></STRONG> +<DD><A HREF="ffuserguide.html#6305">5.3.4</A> + | <A HREF="ffuserguide.html#6327">5.3.4</A> + | <A HREF="ffuserguide.html#6350">5.3.4</A> + | <A HREF="ffuserguide.html#6559">7.1</A> + | <A HREF="ffuserguide.html#6654">7.2</A> +<DT><STRONG><TT>\insertvrule</TT></STRONG> +<DD><A HREF="ffuserguide.html#6265">5.3.4</A> + | <A HREF="ffuserguide.html#6292">5.3.4</A> + | <A HREF="ffuserguide.html#6345">5.3.4</A> + | <A HREF="ffuserguide.html#6554">7.1</A> + | <A HREF="ffuserguide.html#6649">7.2</A> +<DT><STRONG><TT>\item</TT></STRONG> +<DD><A HREF="ffuserguide.html#6883">8.3</A> +<DT><STRONG><TT>\label</TT></STRONG> +<DD><A HREF="ffuserguide.html#3599">1.</A> + | <A HREF="ffuserguide.html#3973">2.2.1</A> + | <A HREF="ffuserguide.html#4392">3.</A> + | <A HREF="ffuserguide.html#6693">7.3</A> + | <A HREF="ffuserguide.html#6767">8.1</A> +<DT><STRONG><TT>\labelflow</TT></STRONG> +<DD><A HREF="ffuserguide.html#6717">7.3</A> + | <A HREF="ffuserguide.html#6731">7.3</A> + | <A HREF="ffuserguide.html#6736">7.3</A> +<DT><STRONG><TT>\labelflowid</TT></STRONG> +<DD><A HREF="ffuserguide.html#6686">7.3</A> + | <A HREF="ffuserguide.html#6709">7.3</A> +<DT><STRONG><TT>\makebackgroundframe</TT></STRONG> +<DD><A HREF="ffuserguide.html#6252">5.3.3</A> +<DT><STRONG><TT>\makedfheaderfooter</TT></STRONG> +<DD><A HREF="ffuserguide.html#4129">2.3</A> +<DT><STRONG><TT>\makethumbtabs</TT></STRONG> +<DD><A HREF="ffuserguide.html#6379">6.1</A> +<DT><STRONG><TT>maxdynamic</TT> counter</STRONG> +<DD><A HREF="ffuserguide.html#6744">7.3</A> +<DT><STRONG><TT>maxflow</TT> counter</STRONG> +<DD><A HREF="ffuserguide.html#6680">7.3</A> +<DT><STRONG><TT>maxstatic</TT> counter</STRONG> +<DD><A HREF="ffuserguide.html#6741">7.3</A> +<DT><STRONG><TT>maxthumbtabs</TT> counter</STRONG> +<DD><A HREF="ffuserguide.html#6460">6.1</A> + | <A HREF="ffuserguide.html#6747">7.3</A> +<DT><STRONG><TT>\minitocstyle</TT></STRONG> +<DD><A HREF="ffuserguide.html#6503">6.2</A> +<DT><STRONG><TT>\Ncolumn</TT></STRONG> +<DD><A HREF="ffuserguide.html#4903">5.1</A> + | <A HREF="ffuserguide.html#6634">7.2</A> +<DT><STRONG><TT>\Ncolumnbottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#5837">5.2</A> + | <A HREF="ffuserguide.html#5866">5.2</A> + | <A HREF="ffuserguide.html#5889">5.2</A> +<DT><STRONG><TT>\Ncolumnbottominarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5100">5.2</A> + | <A HREF="ffuserguide.html#5778">5.2</A> + | <A HREF="ffuserguide.html#5817">5.2</A> + | <A HREF="ffuserguide.html#5850">5.2</A> +<DT><STRONG><TT>\NcolumnDbottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#5878">5.2</A> +<DT><STRONG><TT>\NcolumnDbottominarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5798">5.2</A> +<DT><STRONG><TT>\NcolumnDtop</TT></STRONG> +<DD><A HREF="ffuserguide.html#5488">5.2</A> +<DT><STRONG><TT>\NcolumnDtopinarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5408">5.2</A> +<DT><STRONG><TT>\Ncolumninarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#4967">5.1</A> +<DT><STRONG><TT>\NcolumnSbottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#5855">5.2</A> +<DT><STRONG><TT>\NcolumnSbottominarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5759">5.2</A> +<DT><STRONG><TT>\NcolumnStop</TT></STRONG> +<DD><A HREF="ffuserguide.html#5465">5.2</A> +<DT><STRONG><TT>\NcolumnStopinarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5369">5.2</A> +<DT><STRONG><TT>\Ncolumntop</TT></STRONG> +<DD><A HREF="ffuserguide.html#5447">5.2</A> + | <A HREF="ffuserguide.html#5476">5.2</A> + | <A HREF="ffuserguide.html#5499">5.2</A> + | <A HREF="ffuserguide.html#6619">7.2</A> + | <A HREF="ffuserguide.html#6639">7.2</A> +<DT><STRONG><TT>\Ncolumntopinarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5041">5.2</A> + | <A HREF="ffuserguide.html#5388">5.2</A> + | <A HREF="ffuserguide.html#5427">5.2</A> + | <A HREF="ffuserguide.html#5460">5.2</A> +<DT><STRONG><TT>\newdynamicframe</TT></STRONG> +<DD><A HREF="ffuserguide.html#3989">2.3</A> +<DT><STRONG><TT>\newdynamicframe*</TT></STRONG> +<DD><A HREF="ffuserguide.html#4042">2.3</A> +<DT><STRONG><TT>\newflowframe</TT></STRONG> +<DD><A HREF="ffuserguide.html#3714">2.1</A> + | <A HREF="ffuserguide.html#3839">2.2</A> + | <A HREF="ffuserguide.html#3870">2.2</A> + | <A HREF="ffuserguide.html#4006">2.3</A> +<DT><STRONG><TT>\newflowframe*</TT></STRONG> +<DD><A HREF="ffuserguide.html#3757">2.1</A> +<DT><STRONG><TT>\newpage</TT></STRONG> +<DD><A HREF="ffuserguide.html#3783">2.1.1</A> +<DT><STRONG><TT>\newstaticframe</TT></STRONG> +<DD><A HREF="ffuserguide.html#3822">2.2</A> + | <A HREF="ffuserguide.html#4011">2.3</A> +<DT><STRONG><TT>\newstaticframe*</TT></STRONG> +<DD><A HREF="ffuserguide.html#3875">2.2</A> +<DT><STRONG><TT>nocolor</TT> option</STRONG> +<DD><A HREF="ffuserguide.html#3679">1.1</A> +<DT><STRONG><TT>norotate</TT> option</STRONG> +<DD><A HREF="ffuserguide.html#3682">1.1</A> + | <A HREF="ffuserguide.html#6448">6.1</A> +<DT><STRONG><TT>\nutshape</TT></STRONG> +<DD><A HREF="ffuserguide.html#4561">3.1</A> +<DT><STRONG><TT>\oddsidemargin</TT></STRONG> +<DD><A HREF="ffuserguide.html#3572">1.</A> +<DT><STRONG><TT>\onecolumn</TT></STRONG> +<DD><A HREF="ffuserguide.html#4853">5.1</A> + | <A HREF="ffuserguide.html#4883">5.1</A> + | <A HREF="ffuserguide.html#4893">5.1</A> + | <A HREF="ffuserguide.html#6780">8.1</A> +<DT><STRONG><TT>\onecolumnbottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#5581">5.2</A> + | <A HREF="ffuserguide.html#5606">5.2</A> + | <A HREF="ffuserguide.html#5625">5.2</A> +<DT><STRONG><TT>\onecolumnbottominarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5062">5.2</A> + | <A HREF="ffuserguide.html#5528">5.2</A> + | <A HREF="ffuserguide.html#5563">5.2</A> + | <A HREF="ffuserguide.html#5592">5.2</A> +<DT><STRONG><TT>\onecolumnDbottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#5616">5.2</A> +<DT><STRONG><TT>\onecolumnDbottominarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5546">5.2</A> +<DT><STRONG><TT>\onecolumnDtop</TT></STRONG> +<DD><A HREF="ffuserguide.html#5226">5.2</A> +<DT><STRONG><TT>\onecolumnDtopinarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5156">5.2</A> +<DT><STRONG><TT>\onecolumninarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#4917">5.1</A> +<DT><STRONG><TT>\onecolumnSbottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#5597">5.2</A> +<DT><STRONG><TT>\onecolumnSbottominarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5511">5.2</A> +<DT><STRONG><TT>\onecolumnStop</TT></STRONG> +<DD><A HREF="ffuserguide.html#5207">5.2</A> +<DT><STRONG><TT>\onecolumnStopinarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5121">5.2</A> +<DT><STRONG><TT>\onecolumntop</TT></STRONG> +<DD><A HREF="ffuserguide.html#5191">5.2</A> + | <A HREF="ffuserguide.html#5216">5.2</A> + | <A HREF="ffuserguide.html#5235">5.2</A> +<DT><STRONG><TT>\onecolumntopinarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5003">5.2</A> + | <A HREF="ffuserguide.html#5138">5.2</A> + | <A HREF="ffuserguide.html#5173">5.2</A> + | <A HREF="ffuserguide.html#5202">5.2</A> +<DT><STRONG><TT>\Ovalbox</TT></STRONG> +<DD><A HREF="ffuserguide.html#4319">3.</A> + | <A HREF="ffuserguide.html#4324">3.</A> + | <A HREF="ffuserguide.html#4353">3.</A> + | <A HREF="ffuserguide.html#4358">3.</A> +<DT><STRONG><TT>\pagebreak</TT></STRONG> +<DD><A HREF="ffuserguide.html#3788">2.1.1</A> +<DT><STRONG><TT>\par</TT></STRONG> +<DD><A HREF="ffuserguide.html#4461">3.1</A> +<DT><STRONG><TT>\parshape</TT></STRONG> +<DD><A HREF="ffuserguide.html#4450">3.1</A> + | <A HREF="ffuserguide.html#4414">3.1</A> + | <A HREF="ffuserguide.html#4435">3.1</A> + | <A HREF="ffuserguide.html#4455">3.1</A> + | <A HREF="ffuserguide.html#4500">3.1</A> + | <A HREF="ffuserguide.html#4505">3.1</A> + | <A HREF="ffuserguide.html#6839">8.2</A> + | <A HREF="ffuserguide.html#6844">8.2</A> +<DT><STRONG><TT>\part</TT></STRONG> +<DD><A HREF="ffuserguide.html#4471">3.1</A> +<DT><STRONG><TT>\ref</TT></STRONG> +<DD><A HREF="ffuserguide.html#6698">7.3</A> + | <A HREF="ffuserguide.html#6724">7.3</A> +<DT><STRONG><TT>\relativeframelocation</TT></STRONG> +<DD><A HREF="ffuserguide.html#4704">4.3</A> + | <A HREF="ffuserguide.html#4775">4.3</A> + | <A HREF="ffuserguide.html#4789">4.3</A> + | <A HREF="ffuserguide.html#4809">4.3</A> + | <A HREF="ffuserguide.html#4829">4.3</A> +<DT><STRONG><TT>\relativeframelocation*</TT></STRONG> +<DD><A HREF="ffuserguide.html#4717">4.3</A> +<DT><STRONG><TT>\relax</TT></STRONG> +<DD><A HREF="ffuserguide.html#4401">3.</A> + | <A HREF="ffuserguide.html#4495">3.1</A> +<DT><STRONG><TT>\reldynamicloc</TT></STRONG> +<DD><A HREF="ffuserguide.html#4780">4.3</A> +<DT><STRONG><TT>\relflowloc</TT></STRONG> +<DD><A HREF="ffuserguide.html#4820">4.3</A> +<DT><STRONG><TT>\relstaticloc</TT></STRONG> +<DD><A HREF="ffuserguide.html#4800">4.3</A> +<DT><STRONG><TT>\renewcommand</TT></STRONG> +<DD><A HREF="ffuserguide.html#6529">7.1</A> +<DT><STRONG><TT>\sdfparindent</TT></STRONG> +<DD><A HREF="ffuserguide.html#6605">7.2</A> + | <A HREF="ffuserguide.html#6830">8.2</A> +<DT><STRONG><TT>\setalldynamicframes</TT></STRONG> +<DD><A HREF="ffuserguide.html#4267">3.</A> +<DT><STRONG><TT>\setallflowframes</TT></STRONG> +<DD><A HREF="ffuserguide.html#4217">3.</A> +<DT><STRONG><TT>\setallstaticframes</TT></STRONG> +<DD><A HREF="ffuserguide.html#4242">3.</A> +<DT><STRONG><TT>\setdynamiccontents</TT></STRONG> +<DD><A HREF="ffuserguide.html#4064">2.3</A> + | <A HREF="ffuserguide.html#4190">2.3.1</A> + | <A HREF="ffuserguide.html#4387">3.</A> +<DT><STRONG><TT>\setdynamiccontents*</TT></STRONG> +<DD><A HREF="ffuserguide.html#4073">2.3</A> +<DT><STRONG><TT>\setdynamicframe</TT></STRONG> +<DD><A HREF="ffuserguide.html#4059">2.3</A> + | <A HREF="ffuserguide.html#4134">2.3</A> + | <A HREF="ffuserguide.html#4249">3.</A> + | <A HREF="ffuserguide.html#6472">6.1</A> + | <A HREF="ffuserguide.html#6800">8.1</A> +<DT><STRONG><TT>\setdynamicframe*</TT></STRONG> +<DD><A HREF="ffuserguide.html#4258">3.</A> +<DT><STRONG><TT>\setffdraftcolor</TT></STRONG> +<DD><A HREF="ffuserguide.html#6534">7.1</A> +<DT><STRONG><TT>\setffdrafttypeblockcolor</TT></STRONG> +<DD><A HREF="ffuserguide.html#6539">7.1</A> +<DT><STRONG><TT>\setflowframe</TT></STRONG> +<DD><A HREF="ffuserguide.html#3774">2.1</A> + | <A HREF="ffuserguide.html#4199">3.</A> +<DT><STRONG><TT>\setflowframe*</TT></STRONG> +<DD><A HREF="ffuserguide.html#4208">3.</A> + | <A HREF="ffuserguide.html#6853">8.3</A> +<DT><STRONG><TT>\setlength</TT></STRONG> +<DD><A HREF="ffuserguide.html#6520">6.2</A> + | <A HREF="ffuserguide.html#6575">7.2</A> +<DT><STRONG><TT>\setstaticcontents</TT></STRONG> +<DD><A HREF="ffuserguide.html#3550">ffuserguide</A> + | <A HREF="ffuserguide.html#3897">2.2</A> + | <A HREF="ffuserguide.html#3923">2.2</A> + | <A HREF="ffuserguide.html#4379">3.</A> +<DT><STRONG><TT>\setstaticcontents*</TT></STRONG> +<DD><A HREF="ffuserguide.html#3908">2.2</A> + | <A HREF="ffuserguide.html#3928">2.2</A> + | <A HREF="ffuserguide.html#3945">2.2</A> +<DT><STRONG><TT>\setstaticframe</TT></STRONG> +<DD><A HREF="ffuserguide.html#4224">3.</A> + | <A HREF="ffuserguide.html#6795">8.1</A> +<DT><STRONG><TT>\setstaticframe*</TT></STRONG> +<DD><A HREF="ffuserguide.html#4233">3.</A> +<DT><STRONG><TT>\setthumbtab</TT></STRONG> +<DD><A HREF="ffuserguide.html#6451">6.1</A> +<DT><STRONG><TT>\setthumbtabindex</TT></STRONG> +<DD><A HREF="ffuserguide.html#6463">6.1</A> +<DT><STRONG><TT>\sfswapoddeven</TT></STRONG> +<DD><A HREF="ffuserguide.html#4286">3.</A> +<DT><STRONG><TT>\shadowbox</TT></STRONG> +<DD><A HREF="ffuserguide.html#4329">3.</A> + | <A HREF="ffuserguide.html#4368">3.</A> +<DT><STRONG><TT>shapepar</TT> package</STRONG> +<DD><A HREF="ffuserguide.html#4476">3.1</A> + | <A HREF="ffuserguide.html#4419">3.1</A> + | <A HREF="ffuserguide.html#4424">3.1</A> + | <A HREF="ffuserguide.html#4427">3.1</A> + | <A HREF="ffuserguide.html#4432">3.1</A> + | <A HREF="ffuserguide.html#4440">3.1</A> + | <A HREF="ffuserguide.html#4445">3.1</A> + | <A HREF="ffuserguide.html#4481">3.1</A> + | <A HREF="ffuserguide.html#4491">3.1</A> + | <A HREF="ffuserguide.html#4530">3.1</A> + | <A HREF="ffuserguide.html#4535">3.1</A> + | <A HREF="ffuserguide.html#4538">3.1</A> + | <A HREF="ffuserguide.html#4543">3.1</A> +<DT><STRONG><TT>\showframebboxfalse</TT></STRONG> +<DD><A HREF="ffuserguide.html#3666">1.1</A> +<DT><STRONG><TT>\showframebboxtrue</TT></STRONG> +<DD><A HREF="ffuserguide.html#3661">1.1</A> +<DT><STRONG><TT>\showmarginsfalse</TT></STRONG> +<DD><A HREF="ffuserguide.html#3656">1.1</A> +<DT><STRONG><TT>\showmarginstrue</TT></STRONG> +<DD><A HREF="ffuserguide.html#3651">1.1</A> +<DT><STRONG><TT>\showtypeblockfalse</TT></STRONG> +<DD><A HREF="ffuserguide.html#3646">1.1</A> +<DT><STRONG><TT>\showtypeblocktrue</TT></STRONG> +<DD><A HREF="ffuserguide.html#3641">1.1</A> +<DT><STRONG><TT>\simpar</TT></STRONG> +<DD><A HREF="ffuserguide.html#4486">3.1</A> +<DT><STRONG><TT>\squareshape</TT></STRONG> +<DD><A HREF="ffuserguide.html#4546">3.1</A> +<DT><STRONG><TT>staticcontents</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#3892">2.2</A> + | <A HREF="ffuserguide.html#3917">2.2</A> + | <A HREF="ffuserguide.html#3983">2.3</A> + | <A HREF="ffuserguide.html#4384">3.</A> +<DT><STRONG><TT>staticcontents*</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#3920">2.2</A> + | <A HREF="ffuserguide.html#3942">2.2</A> +<DT><STRONG><TT>staticfigure</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#3582">1.</A> + | <A HREF="ffuserguide.html#3604">1.</A> + | <A HREF="ffuserguide.html#6877">8.3</A> +<DT><STRONG><TT>statictable</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#3585">1.</A> + | <A HREF="ffuserguide.html#3607">1.</A> + | <A HREF="ffuserguide.html#6880">8.3</A> +<DT><STRONG><TT>table</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#3591">1.</A> + | <A HREF="ffuserguide.html#3613">1.</A> + | <A HREF="ffuserguide.html#3625">1.</A> +<DT><STRONG><TT>table*</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#3619">1.</A> +<DT><STRONG><TT>\tableofcontents</TT></STRONG> +<DD><A HREF="ffuserguide.html#6420">6.1</A> +<DT><STRONG><TT>\textheight</TT></STRONG> +<DD><A HREF="ffuserguide.html#3537">ffuserguide</A> +<DT><STRONG><TT>\textwidth</TT></STRONG> +<DD><A HREF="ffuserguide.html#3532">ffuserguide</A> +<DT><STRONG><TT>theindex</TT> environment</STRONG> +<DD><A HREF="ffuserguide.html#6777">8.1</A> +<DT><STRONG><TT>thisframe</TT> counter</STRONG> +<DD><A HREF="ffuserguide.html#6683">7.3</A> +<DT><STRONG><TT>\thumbtabformat</TT></STRONG> +<DD><A HREF="ffuserguide.html#6443">6.1</A> +<DT><STRONG><TT>\thumbtabindex</TT></STRONG> +<DD><A HREF="ffuserguide.html#6400">6.1</A> + | <A HREF="ffuserguide.html#6425">6.1</A> +<DT><STRONG><TT>\thumbtabindexformat</TT></STRONG> +<DD><A HREF="ffuserguide.html#6438">6.1</A> +<DT><STRONG><TT>\thumbtabwidth</TT></STRONG> +<DD><A HREF="ffuserguide.html#6395">6.1</A> +<DT><STRONG><TT>tikz</TT> package</STRONG> +<DD><A HREF="ffuserguide.html#4334">3.</A> + | <A HREF="ffuserguide.html#6360">5.3.4</A> +<DT><STRONG><TT>\tocandthumbtabindex</TT></STRONG> +<DD><A HREF="ffuserguide.html#6415">6.1</A> + | <A HREF="ffuserguide.html#6433">6.1</A> +<DT><STRONG><TT>ttbnonum</TT> option</STRONG> +<DD><A HREF="ffuserguide.html#6376">6.1</A> +<DT><STRONG><TT>ttbnotitle</TT> option</STRONG> +<DD><A HREF="ffuserguide.html#6370">6.1</A> +<DT><STRONG><TT>ttbnum</TT> option</STRONG> +<DD><A HREF="ffuserguide.html#6373">6.1</A> +<DT><STRONG><TT>ttbtitle</TT> option</STRONG> +<DD><A HREF="ffuserguide.html#6367">6.1</A> +<DT><STRONG><TT>\twocolumn</TT></STRONG> +<DD><A HREF="ffuserguide.html#4858">5.1</A> + | <A HREF="ffuserguide.html#4863">5.1</A> + | <A HREF="ffuserguide.html#4888">5.1</A> + | <A HREF="ffuserguide.html#4898">5.1</A> + | <A HREF="ffuserguide.html#6785">8.1</A> +<DT><STRONG><TT>\twocolumnbottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#5705">5.2</A> + | <A HREF="ffuserguide.html#5730">5.2</A> + | <A HREF="ffuserguide.html#5749">5.2</A> +<DT><STRONG><TT>\twocolumnbottominarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5081">5.2</A> + | <A HREF="ffuserguide.html#5652">5.2</A> + | <A HREF="ffuserguide.html#5687">5.2</A> + | <A HREF="ffuserguide.html#5716">5.2</A> +<DT><STRONG><TT>\twocolumnDbottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#5740">5.2</A> +<DT><STRONG><TT>\twocolumnDbottominarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5670">5.2</A> +<DT><STRONG><TT>\twocolumnDtop</TT></STRONG> +<DD><A HREF="ffuserguide.html#5350">5.2</A> +<DT><STRONG><TT>\twocolumnDtopinarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5280">5.2</A> +<DT><STRONG><TT>\twocolumninarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#4937">5.1</A> + | <A HREF="ffuserguide.html#4984">5.1</A> +<DT><STRONG><TT>\twocolumnSbottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#5721">5.2</A> +<DT><STRONG><TT>\twocolumnSbottominarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5635">5.2</A> +<DT><STRONG><TT>\twocolumnStop</TT></STRONG> +<DD><A HREF="ffuserguide.html#5331">5.2</A> +<DT><STRONG><TT>\twocolumnStopinarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5245">5.2</A> +<DT><STRONG><TT>\twocolumntop</TT></STRONG> +<DD><A HREF="ffuserguide.html#5315">5.2</A> + | <A HREF="ffuserguide.html#5340">5.2</A> + | <A HREF="ffuserguide.html#5359">5.2</A> +<DT><STRONG><TT>\twocolumntopinarea</TT></STRONG> +<DD><A HREF="ffuserguide.html#5022">5.2</A> + | <A HREF="ffuserguide.html#5262">5.2</A> + | <A HREF="ffuserguide.html#5297">5.2</A> + | <A HREF="ffuserguide.html#5326">5.2</A> +<DT><STRONG><TT>\value</TT></STRONG> +<DD><A HREF="ffuserguide.html#6673">7.3</A> +<DT><STRONG><TT>\vcolumnsep</TT></STRONG> +<DD><A HREF="ffuserguide.html#4998">5.2</A> + | <A HREF="ffuserguide.html#6614">7.2</A> +<DT><STRONG>verbatim text</STRONG> +<DD><A HREF="ffuserguide.html#3981">2.3</A> + | <A HREF="ffuserguide.html#4081">2.3</A> + | <A HREF="ffuserguide.html#4091">2.3</A> + | <A HREF="ffuserguide.html#960">2.3.1</A> + | <A HREF="ffuserguide.html#6890">8.3</A> + | <A HREF="ffuserguide.html#6891">8.3</A> + | <A HREF="ffuserguide.html#6895">8.3</A> +<DT><STRONG><TT>\vNtone</TT></STRONG> +<DD><A HREF="ffuserguide.html#5930">5.3.1</A> +<DT><STRONG><TT>\vNtonebottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#6019">5.3.1</A> +<DT><STRONG><TT>\vNtonetop</TT></STRONG> +<DD><A HREF="ffuserguide.html#6049">5.3.1</A> +<DT><STRONG><TT>\vtwotone</TT></STRONG> +<DD><A HREF="ffuserguide.html#5909">5.3.1</A> + | <A HREF="ffuserguide.html#5953">5.3.1</A> + | <A HREF="ffuserguide.html#5981">5.3.1</A> + | <A HREF="ffuserguide.html#6009">5.3.1</A> +<DT><STRONG><TT>\vtwotonebottom</TT></STRONG> +<DD><A HREF="ffuserguide.html#5958">5.3.1</A> + | <A HREF="ffuserguide.html#6044">5.3.1</A> +<DT><STRONG><TT>\vtwotonetop</TT></STRONG> +<DD><A HREF="ffuserguide.html#5986">5.3.1</A> + | <A HREF="ffuserguide.html#6014">5.3.1</A> + | <A HREF="ffuserguide.html#6074">5.3.1</A> + +</DL> + +<P> + +<P> +<A HREF="ffuserguide.html#top">Top</A> | <A HREF="ffuserguide.html#index">Index</A> + +<P> + +<BR><HR><H4>Footnotes</H4> +<DL> +<DT><A NAME="foot3502">... +user</A><A + HREF="ffuserguide.html#tex2html2"><SUP>1.1</SUP></A></DT> +<DD>Can I have arbitrary shaped frames? See +<A HREF="ffuserguide.html#sec:parshape">Non-Rectangular Frames</A> + +</DD> +<DT><A NAME="foot404">... environment</A><A + HREF="ffuserguide.html#tex2html3"><SUP>1.2</SUP></A></DT> +<DD>This is because +of the arbitrary layout of the flow frames. + +</DD> +<DT><A NAME="foot3503">... +them.</A><A + HREF="ffuserguide.html#tex2html17"><SUP>1.3</SUP></A></DT> +<DD>Can I have arbitrary +shaped frames? See +<A HREF="ffuserguide.html#sec:parshape">Non-Rectangular +Frames</A>. + +</DD> +<DT><A NAME="foot3505">...typeblock</A><A + HREF="ffuserguide.html#tex2html29"><SUP>2.1</SUP></A></DT> +<DD>See <A HREF="ffuserguide.html#itm:absval">converting from absolute to relative page +co-ordinates</A> + +</DD> +<DT><A NAME="foot3506">... counter</A><A + HREF="ffuserguide.html#tex2html30"><SUP>2.2</SUP></A></DT> +<DD>why can't I use the page number format? +See query <A HREF="ffuserguide.html#itm:whynot">3</A> + +</DD> +<DT><A NAME="foot3507">...flow</A><A + HREF="ffuserguide.html#tex2html31"><SUP>2.3</SUP></A></DT> +<DD>the +position for the even pages is set using <TT>\setflowframe</TT><A NAME="3774"></A> +defined in <A HREF="ffuserguide.html#sec:modattr">Modifying +Frame Attributes</A> + +</DD> +<DT><A NAME="foot2877">... of.</A><A + HREF="ffuserguide.html#tex2html41"><SUP>2.4</SUP></A></DT> +<DD>By "neither flows into nor +flows out of" I mean you have to explicitly set the contents of +this frame. Note that it may appear to contain text if another +frame overlaps it, but this text belongs to the other frame. + +</DD> +<DT><A NAME="foot3508">... macro.</A><A + HREF="ffuserguide.html#tex2html48"><SUP>2.5</SUP></A></DT> +<DD>which means that you can have +verbatim text<A NAME="3981"></A> in the body of the <TT>staticcontents</TT><A NAME="3983"></A> environment +but not in the body of the <TT>dynamiccontents</TT><A NAME="3986"></A> environment + +</DD> +<DT><A NAME="foot3036">... +approximately</A><A + HREF="ffuserguide.html#tex2html92"><SUP>5.1</SUP></A></DT> +<DD>It may not be exact, as the flow frames are adjusted so that their height is an integer multiple +of <TT>\baselineskip</TT><A NAME="4993"></A>, which may increase the gap. + +</DD> +<DT><A NAME="foot2391">... thumbtabs</A><A + HREF="ffuserguide.html#tex2html112"><SUP>6.1</SUP></A></DT> +<DD>but +only do this if there is enough room on the page! + +</DD> +<DT><A NAME="foot3441">...hypersetup@<TT>\hypersetup</TT></A><A + HREF="ffuserguide.html#tex2html113"><SUP>6.2</SUP></A></DT> +<DD>defined by the +<TT>hyperref</TT><A NAME="6482"></A> package + +</DD> +<DT><A NAME="foot2618">... approximate</A><A + HREF="ffuserguide.html#tex2html142"><SUP>8.1</SUP></A></DT> +<DD>The pedantic may point out +that TeX may make several attempts to fill in the flow frames +depending on penalties and so on. + +</DD> +<DT><A NAME="foot2619">... pencilled</A><A + HREF="ffuserguide.html#tex2html143"><SUP>8.2</SUP></A></DT> +<DD>actually it hasn't +drawn anything really, but it has in its mind's eye. + +</DD> +<DT><A NAME="foot3471">...offset</A><A + HREF="ffuserguide.html#tex2html204"><SUP>8.3</SUP></A></DT> +<DD><TT>offset</TT> can also have the value <TT>compute</TT> + +</DD> +</DL> +<BR><HR> + +</BODY> +</HTML> diff --git a/Master/texmf-dist/doc/latex/flowfram/ffuserguide.pdf b/Master/texmf-dist/doc/latex/flowfram/ffuserguide.pdf Binary files differindex f4665501a7d..a59c1f556f4 100644 --- a/Master/texmf-dist/doc/latex/flowfram/ffuserguide.pdf +++ b/Master/texmf-dist/doc/latex/flowfram/ffuserguide.pdf diff --git a/Master/texmf-dist/doc/latex/flowfram/ffuserguide.tex b/Master/texmf-dist/doc/latex/flowfram/ffuserguide.tex index e0bee6de93b..03dc82f0418 100644 --- a/Master/texmf-dist/doc/latex/flowfram/ffuserguide.tex +++ b/Master/texmf-dist/doc/latex/flowfram/ffuserguide.tex @@ -1,9 +1,9 @@ \documentclass[a4paper,twoside]{book} -\usepackage{times} +\usepackage{mathptmx} \usepackage{courier} -\usepackage{helvet} +\usepackage[scaled=0.9]{helvet} \usepackage{makeidx} \usepackage[landscape,margin=1in,top=1in,bottom=1in]{geometry} \usepackage{color} @@ -13,57 +13,122 @@ bookmarksopen, pdfauthor={Nicola Talbot}, pdftitle={Creating Flow Frames for Posters, Brochures or Magazines using flowfram.sty}, - pdfkeywords={LaTeX;text frames;posters;brochures}]{hyperref} + pdfkeywords={LaTeX;text frames;posters;brochures;magazines;newspapers}]{hyperref} \usepackage[style=altlist,toc,nonumberlist]{glossaries} \usepackage{pgf} \usepackage[norotate,ttbnotitle,ttbnum]{flowfram} \usepackage{shapepar} +\usepackage{html} % Define some commands for consistency and indexing -\newcommand{\sty}[1]{\textsf{#1}\index{#1@\textsf{#1} package}} -\newcommand{\env}[1]{\textsf{#1}\index{#1@\textsf{#1} environment}} +\newcommand{\styni}[1]{\textsf{#1}} +\newcommand{\envni}[1]{\textsf{#1}} +\newcommand{\ctrni}[1]{\textsf{#1}} +\newcommand{\pkgoptni}[1]{\textsf{#1}} + +\newcommand{\sty}[1]{\styni{#1}\index{#1@\styni{#1} package}} +\newcommand{\env}[1]{\envni{#1}\index{#1@\envni{#1} environment}} +\newcommand{\ctr}[1]{\ctrni{#1}\index{#1@\ctrni{#1} counter}} \newcommand{\cmdname}[1]{\texttt{\symbol{92}#1}\index{#1@\texttt{\symbol{92}#1}}} -\newcommand{\meta}[1]{\textnormal{\textless\textit{#1}\textgreater}} +\newcommand{\meta}[1]{% +\textnormal{\ensuremath{\langle}\emph{#1}\ensuremath{\rangle}}} \newcommand{\marg}[1]{\texttt{\char`\{#1\char`\}}} \newcommand{\oarg}[1]{\texttt{[#1]}} \newcommand{\appname}[1]{\texttt{#1}\index{#1@\texttt{#1}}} -\newcommand{\pkgopt}[1]{\textsf{#1}\index{#1@\textsf{#1} option}} +\newcommand{\pkgopt}[1]{\pkgoptni{#1}\index{#1@\pkgoptni{#1} option}} \newcommand{\key}[1]{#1\index{frame settings!#1}} +\newcommand{\dq}[1]{``#1''} +\newcommand*{\Index}[1]{#1\index{#1}} + +\newsavebox\dfnsbox +\definecolor{defcol}{cmyk}{0,0,0.2,0} +\newlength\dfnlen + +\newenvironment{definition}{% +\par\vskip10pt\noindent +\setlength{\dfnlen}{\linewidth}% +\addtolength{\dfnlen}{-2\fboxsep}% +\begin{lrbox}{\dfnsbox}% +\begin{minipage}{\dfnlen}\ignorespaces +}{% +\end{minipage}% +\end{lrbox}% +\colorbox{defcol}{\usebox{\dfnsbox}}% +\par +\vskip10pt\noindent\ignorespacesafterend} + +\newcommand{\chapdesc}[1]{% +\appenddynamiccontents*{chaphead}{\par +\emph{#1}}} + +\newcommand*{\glsindex}[1]{\protect\index{#1}} + +\newcommand*{\htmlnav}{} + +\begin{htmlonly} +\renewcommand{\LaTeX}{LaTeX} +\renewcommand{\TeX}{TeX} +\renewcommand{\LaTeXe}{LaTeX2e} +\renewcommand{\latextohtml}{LaTeX2HTML} +\renewcommand{\styni}[1]{\texttt{#1}} +\renewcommand{\envni}[1]{\texttt{#1}} +\renewcommand{\ctrni}[1]{\texttt{#1}} +\renewcommand{\pkgoptni}[1]{\texttt{#1}} +\renewcommand{\meta}[1]{\emph{#1}} +\renewcommand{\dq}[1]{"#1"} + +\renewenvironment{definition}{\par}{\par} + +\renewcommand*{\chapdesc}[1]{\par\emph{#1}\par} + +\newcommand*{\glsindex}[1]{} + +\newcommand*{\htmlnav}{% +\par\htmlref{Top}{top}~\textbar~\htmlref{Index}{index}} + +\usepackage{amsmath} +\keywords{LaTeX; text frames; posters; brochures; magazines; newspapers} +\end{htmlonly} % Glossary Stuff -\newglossaryentry{typeblock}{name=typeblock,description={The -area of the page where the main body of the text goes. +\newglossaryentry{typeblock}{name=typeblock\glsindex{typeblock},% +description={The area of the page where the main body of the text goes. The width and height of this area are given by \protect\cmdname{textwidth} and \protect\cmdname{textheight}}} -\newglossaryentry{flow}{name=flow frame,description={The frames in -a document such that the contents of the \protect\env{document} -environment flow from one frame to the next in the order -that they were defined. There must be at least one flow frame on -every page}} +\newglossaryentry{flow}{name=flow frame\glsindex{frame!flow},% +description={The frames in a document such that the contents of the +\protect\env{document} environment flow from one frame to the next in +the order that they were defined. There must be at least one flow frame +on every page}} -\newglossaryentry{static}{name=static frame,description={Frames -in which text is fixed in place. The contents are fixed until -explicitly changed}} +\newglossaryentry{static}{name=static frame\glsindex{frame!static},% +description={Frames in which text is fixed in place. The contents are fixed until +explicitly changed or cleared via the \protect\cmdname{clear} key +in \protect\cmdname{setstaticcontents}}} -\newglossaryentry{dynamic}{name=dynamic frame,description={Frames +\newglossaryentry{dynamic}{name=dynamic frame\glsindex{frame!dynamic},% +description={Frames in which text is fixed in place, but the contents are re-typeset -after each page}} +each time the frame is displayed}} \newcommand*{\staticordynamic}{\glslink{static}{static} or \glslink{dynamic}{dynamic} frame} -\newglossaryentry{frame}{name=frame,description={A rectangular +\newglossaryentry{frame}{name=frame\glsindex{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: flow, static and dynamic}} -\newglossaryentry{fcmd}{name=frame making command,description={A +\newglossaryentry{fcmd}{name=frame making command\glsindex{frame +making command},description={A \LaTeX\ command which places some kind of border around its argument. For example: \protect\cmdname{fbox}}} -\newglossaryentry{pglist}{name=page list,description={A list of +\newglossaryentry{pglist}{name=page list\glsindex{page list},% +description={A list of pages. This can either be a single keyword: \texttt{all}, \texttt{odd}, \texttt{even} or \texttt{none}, or it can be a comma-separated list of individual page numbers or @@ -72,18 +137,24 @@ indicates pages 1,2,5,7,8,9,10,11 and all pages after page 15. Note that these numbers refer to the actual value of the page counter, not the absolute physical page number}} -\newglossaryentry{pgrange}{name=page range,description={Page +\newglossaryentry{pgrange}{name=page range\glsindex{page range},% +description={Page ranges can be closed, e.g.\ \texttt{5-10}, or open, e.g. \texttt{\textless7} or \texttt{\textgreater9}}} -\newglossaryentry{bbox}{name=bounding box, -plural=bounding boxes, -description={The smallest -possible rectangle that completely encompasses the object}} - -\newglossaryentry{idn}{name={identification number (IDN)}, -text={IDN},first={identification number (IDN)}, -plural={IDNs},firstplural={identification numbers (IDNs)}, +\newglossaryentry{bbox}{name=bounding box\glsindex{bounding box}, +plural=bounding boxes\glsindex{bounding box}, +firstplural=bounding boxes\glsindex{bounding box}, +description={The bounding box of a frame is the area allocated for the +contents of that frame. However the text may not completely fill that +area, and it is possible that the text may overflow that area}} + +\newglossaryentry{idn}{name={identification number +(IDN)\glsindex{IDN}\glsindex{identification number|see{IDN}}}, +text={IDN\glsindex{IDN}},% +first={identification number (IDN)\glsindex{IDN}}, +plural={IDNs\glsindex{IDN}},% +firstplural={identification numbers (IDNs)\glsindex{IDN}}, description={A unique number assigned to each frame, which you can use to identify the frame when modifying its appearance. Example: if you @@ -92,9 +163,12 @@ frame, the flow frames will have IDNs 1, 2 and 3, the static frames will have IDNs 1 and 2, and the dynamic frame will have IDN 1}} -\newglossaryentry{idl}{name={identification label (IDL)}, -text={IDL},first={identification label (IDL)}, -plural={IDLs},firstplural={identification labels (IDLs)}, +\newglossaryentry{idl}{name={identification label +(IDL)\glsindex{IDL}\glsindex{identification label|see{IDL}}}, +text={IDL\glsindex{IDL}},% +first={identification label (IDL)\glsindex{IDL}}, +plural={IDLs\glsindex{IDL}},% +firstplural={identification labels (IDLs)\glsindex{IDL}}, description={A unique label which can be assigned to a frame, enabling you to refer to the frame by label instead of by its @@ -157,12 +231,12 @@ IDN}} % numbered chapters: \renewcommand{\DFchapterstyle}[1]{% -\raggedright\sffamily\bfseries\Huge\color{blue}\thechapter. #1\par -} +{\raggedright\sffamily\bfseries\Huge\color{blue}\thechapter. #1\par +}} % unnumbered chapters: -\renewcommand{\DFschapterstyle}[1]{\raggedright\sffamily\bfseries\Huge\color{blue} #1\par -} +\renewcommand{\DFschapterstyle}[1]{{\raggedright\sffamily\bfseries\Huge\color{blue} #1\par +}} % Make thumb tabs (specify each tab to be 0.75in high) @@ -178,9 +252,11 @@ IDN}} \setthumbtab{5}{backcolor=[rgb]{0.35,0.35,1}} \setthumbtab{6}{backcolor=[rgb]{0.4,0.4,1}} \setthumbtab{7}{backcolor=[rgb]{0.45,0.45,1}} +\setthumbtab{8}{backcolor=[rgb]{0.5,0.5,1}} % change the text style on the thumbtabs -\newcommand{\thumbtabstyle}[1]{\textsc{\sffamily #1}} +\newcommand{\thumbtabstyle}[1]{{\hypersetup{linkcolor=white}% +\textbf{\large\sffamily #1}}} \setthumbtab{all}{style=thumbtabstyle,textcolor=white} % set default page style @@ -238,33 +314,48 @@ backcolor=blue,textcolor=white,style=footstyle,pages=none} \makeatletter \renewenvironment{theindex}{% -\setflowframe*{oddcol1,oddcol2}{pages=odd} -\setflowframe*{evencol1,evencol2}{pages=even} +\setflowframe*{oddcol1,oddcol2}{pages=odd}% +\setflowframe*{evencol1,evencol2}{pages=even}% +\setdynamicframe*{chaphead}{clear=false}% \clearpage \mbox{}\framebreak\phantomsection -\setflowframe*{main}{pages=none} -\setdynamiccontents*{chaphead}{\DFschapterstyle{\indexname}} -\addcontentsline{toc}{chapter}{\indexname} +\setflowframe*{main}{pages=none}% +\setdynamiccontents*{chaphead}{\DFschapterstyle{\indexname}% +\idxnav}% +\addcontentsline{toc}{chapter}{\indexname}% \setlength{\parindent}{0pt}% \setlength{\parskip}{0pt plus .3pt}% -\let\item\@idxitem}{% -\afterpage{% -\setflowframe*{main}{pages=all}% -\setflowframe{>1}{pages=none}% +\let\item\@idxitem +}{% +\setdynamicframe*{chaphead}{clear}% } -\finishthispage + +% Define commands to create an index navigation bar. +\newcommand*{\idxgroupheading}[1]{% +\textbf{\hypertarget{idx:#1}{#1}}% +\protected@write\@auxout{}{\string\addtoidxnav{#1}}\indexspace} + +\newcommand*{\idxgrouplink}[1]{% +\par\vskip5pt\textbf{\hyperlink{idx:#1}{#1}}} + +\newcommand{\idxnav}{} + +\newcommand*{\addtoidxnav}[1]{% +\toks@\expandafter{\idxnav}% +\xdef\idxnav{\the\toks@ \noexpand\idxgrouplink{#1}}% } \makeatother -\begin{document} +\begin{document}\label{top} +\title{Creating Flow Frames for Posters, Brochures or +Magazines using flowfram.sty v 1.11} +\author{Nicola L. C. Talbot} +\date{28th June 2008} + % swap frames around for title page \ffswapoddeven*{main} \dfswapoddeven*{chaphead} -\title{Creating Flow Frames for Posters, Brochures or -Magazines using flowfram.sty v 1.10} -\author{Nicola L. C. Talbot} -\date{21 August 2007} \pagenumbering{alph} \maketitle @@ -285,10 +376,8 @@ United Kingdom\\ \ffswapoddeven*{main} \dfswapoddeven*{chaphead} -\tableofcontents \thumbtabindex - -%\tocandthumbtabindex % not enough room for this +\tableofcontents % make the footers appear from this point on \setdynamicframe*{footer}{pages=all} @@ -299,48 +388,50 @@ United Kingdom\\ \chapter{Introduction} \enablethumbtabs \pagenumbering{arabic} +\chapdesc{This chapter provides a brief overview of the package, +the package options and the various frame types.} -The \sty{flowfram} package is a \LaTeXe\ package designed to +The \styni{flowfram} package is a \LaTeXe\ package designed to enable you to create text \glspl{frame} in a document such that the contents of the \env{document} environment flow from one -\gls{frame} to the next in the order that they were defined. +\gls*{frame} to the next in the order that 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. -The \sty{flowfram} package provides three types of \gls{frame}: +The \styni{flowfram} package provides three types of \gls*{frame}: \glspl{flow}, \glspl{static} and \glspl{dynamic} with dimensions and positions specified by the user\footnote{Can I have arbitrary shaped frames? See -\autoref{sec:parshape}}. +\latexhtml{\autoref{sec:parshape}}{\htmlref{Non-Rectangular Frames}{sec:parshape}}}. The main contents of the document environment flow from -one \gls{flow} to the next in the order of definition, +one \gls*{flow} to the next in the order of definition, whereas the contents of the static and dynamic frames are set explicitly using commands described in -\autoref{sec:modattr}. Note that +\latexhtml{\autoref{sec:modattr}}{\htmlref{Modifying Frame +Attributes}{sec:modattr}}. Note that unless otherwise stated, all co-ordinates are relative to the bottom left hand corner of the \gls{typeblock}. If you have -a two-sided document, the absolute position of the \gls{typeblock} -may vary depending on the values of \cmdname{oddsidemargin} -and \cmdname{evensidemargin}, and all the \glspl{frame} will shift +a two-sided document, the absolute position of the \gls*{typeblock} +may vary depending on the values of \cmdname{oddsidemargin} +and \cmdname{evensidemargin}, and all the \glspl*{frame} will shift accordingly unless otherwise indicated. Since floats (such as figures and tables) can only go in -\glspl{flow}, this package provides +\glspl*{flow}, this package provides the additional environments: \env{staticfigure} and -\env{statictable} which can be used in \glspl{static} -and \glspl{dynamic}. Unlike their \env{figure} and +\env{statictable} which can be used in \glspl*{static} +and \glspl*{dynamic}. Unlike their \env{figure} and \env{table} counterparts, they are fixed in place, and so do not take an optional placement specifier. The \cmdname{caption} and \cmdname{label} commands can be used within \env{staticfigure} and \env{statictable} as -usual, but it is recommended that you \cmdname{protect} the -\cmdname{label} command, otherwise the label may end up -being multiply defined. +usual, but remember that if the frame is displayed on multiple +pages, you may end up with multiply defined labels. The standard \env{figure} and \env{table} commands will -behave as usual in the \glspl{flow}, but their starred versions, +behave as usual in the \glspl*{flow}, but their starred versions, \env{figure*} and \env{table*} behave no differently from \env{figure} and \env{table}\footnote{This is because of the arbitrary layout of the flow frames.}. @@ -350,65 +441,67 @@ class files and packages. Since it modifies the output routine, it is likely to conflict with any other package which also does this. -You should load \sty{flowfram} \emph{after} \sty{hyperref} -and any colour package (e.g.\ \sty{color}). +You should load \styni{flowfram} \emph{after} \sty{hyperref} and any +colour package (e.g.\ \sty{color}).\htmlnav \section{Draft Option} -The \sty{flowfram} package has the package option \texttt{draft} -which will draw the \gls{bbox}es for -each \gls{frame} defined. At the bottom right of each -\gls{bbox} (except for the \gls{bbox} denoting the +The \styni{flowfram} package has the package option \pkgopt{draft} +which will draw the \glspl{bbox} for +each \gls{frame} that has been defined. At the bottom right of each +\gls*{bbox} (except for the \gls*{bbox} denoting the \gls{typeblock}), a marker will be shown in the form: [\meta{T}:\meta{idn};\meta{idl}], where \meta{T} is a single -letter denoting the \gls{frame} type, \meta{idn} is the \gls{idn}\ -for the \gls{frame} and \meta{idl} is the \gls{idl}\ for that -\gls{frame}. Values of \meta{T} are: \texttt{F} (\gls{flow}), +letter denoting the \gls*{frame} type, \meta{idn} is the \gls{idn}\ +for the \gls*{frame} and \meta{idl} is the \gls{idl}\ for that +\gls*{frame}. Values of \meta{T} are: \texttt{F} (\gls{flow}), \texttt{S} (\gls{static}) or \texttt{D} (\gls{dynamic}). Markers of the form: [M:\meta{idn}] indicate that the -\gls{bbox} is the area taken up by the margin for \gls{flow} -with \gls{idn}\ \meta{idn}. Note that even if a \gls{frame} -has been rotated, the \gls{bbox} will not be rotated. +\gls*{bbox} is the area taken up by the margin for \gls*{flow} +with \gls*{idn}\ \meta{idn}. Note that even if a \gls*{frame} +has been rotated, the \gls*{bbox} will not be rotated. If you want to show or hide specific types of bounding boxes, you can use one of the following commands: \begin{itemize} \item -\cmdname{showtypeblocktrue} Display the \gls{bbox} -for the \gls{typeblock}. +\cmdname{showtypeblocktrue} Display the \gls*{bbox} +for the \gls*{typeblock}. \item -\cmdname{showtypeblockfalse} Do not display the \gls{bbox} -for the \gls{typeblock}. +\cmdname{showtypeblockfalse} Do not display the \gls*{bbox} +for the \gls*{typeblock}. \item -\cmdname{showmarginstrue} Display the \gls{bbox} +\cmdname{showmarginstrue} Display the \gls*{bbox} for the margins. \item -\cmdname{showmarginsfalse} Do not display the \gls{bbox} +\cmdname{showmarginsfalse} Do not display the \gls*{bbox} for the margins. \item -\cmdname{showframebboxtrue} Display the \gls{bbox} -for the \glspl{frame}. +\cmdname{showframebboxtrue} Display the \gls*{bbox} +for the \glspl*{frame}. \item -\cmdname{showframebboxfalse} Do not display the \gls{bbox} -for the \glspl{frame}. +\cmdname{showframebboxfalse} Do not display the \gls*{bbox} +for the \glspl*{frame}. \end{itemize} You can see the layout for the current page (irrespective of -whether or not the \texttt{draft} option has been set) using +whether or not the \pkgopt{draft} option has been set) using the command: +\begin{definition} \cmdname{flowframeshowlayout} +\end{definition} -The \sty{flowfram} package also has the options \pkgopt{nocolor} +The \styni{flowfram} package also has the options \pkgopt{nocolor} and \pkgopt{norotate} for previewers that can not process colour or rotating specials. (Otherwise you may end up with large black rectangles obscuring your text, instead of -the pale background colour you were hoping for.) +the pale background colour you were hoping for.)\htmlnav \section{Frame Stacking Order} \label{sec:stacking} @@ -424,86 +517,159 @@ order of \gls{idn}. \item Each \gls{dynamic} defined for that page in ascending order of \gls{idn}. -\item \Glspl{bbox} if the \texttt{draft} +\item \Glspl{bbox} if the \pkgopt{draft} package option has been used. \end{enumerate} This ordering can be used to determine if you want something to overlay or underlay everything else on the page. Note that the \glspl{frame} do not interact with each other. If -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 +you have two or more overlapping \glspl*{frame}, the text in each +\gls*{frame} will not attempt to wrap around the other +\glspl*{frame}, but will simply overwrite them.\footnote{Can I have arbitrary -shaped frames? See \autoref{sec:parshape}.} +shaped frames? See +\latexhtml{\autoref{sec:parshape}}{\htmlref{Non-Rectangular +Frames}{sec:parshape}}.}\htmlnav + +\section{HTML} + +The \styni{flowfram} package now comes with a \latextohtml\ style +file \texttt{flowfram.perl}. However this style file is not meant +to emulate the \styni{flowfram} package, but is provided to facilitate +creating a plain HTML document from the \LaTeX\ source. All +\gls{frame}-related information is ignored. By default, the contents +of any \staticordynamic{}s are ignored, but this can be changed using +\begin{verbatim} +\HTMLset{showstaticcontents}{1} +\end{verbatim} +to show the contents of the \glspl*{static} or +\begin{verbatim} +\HTMLset{showdynamiccontents}{1} +\end{verbatim} +to show the contents of the \glspl*{dynamic} (where \verb|\HTMLset| +is defined in the \sty{html} package). Note that this places the +text at the point in the document where the contents are set. +This style file does not create HTML frames. It can therefore be +used to create an accessible version of the PDF document +\latexhtml{such as the HTML version of this document, +\texttt{ffuserguide.html}}{such as this document}.\htmlnav \chapter{Defining New Frames} +\chapdesc{This chapter describes how to define new frames, and how to +identify and set frame contents. See also +\latexhtml{\autoref{sec:layouts}}{\htmlref{Predefined +Layouts}{sec:layouts}}.}\htmlnav \section{Flow Frames} The \gls{flow} is the principle type of \gls{frame}. The text of the \env{document} environment will flow from -one \gls{frame} to the next in order of definition. Each -\gls{flow} has an associated width, height, -position on the page, and optionally a border. To define -a new \gls{flow} use:\\[10pt] +one \gls*{frame} to the next in order of definition. Each +\gls*{flow} has an associated width, height, +position on the page and optionally a border. To define +a new \gls*{flow} use: +\begin{definition} \cmdname{newflowframe}\oarg{\meta{page list}}%% \marg{\meta{width}}% \marg{\meta{height}}% \marg{\meta{x}}% \marg{\meta{y}}% -\oarg{\meta{label}}\\[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} +\oarg{\meta{label}} +\end{definition} +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}\footnote{See \autoref{itm:absval} on +\gls{typeblock}\footnote{See \latexhtml{query~\ref{itm:absval} on page~\pageref{itm:absval} if you want to convert from absolute -page co-ordinates to co-ordinates relative to the typeblock}. +page co-ordinates to co-ordinates relative to the +typeblock}{\htmlref{converting from absolute to relative page +co-ordinates}{itm:absval}}}. The first optional argument, \meta{page list}, indicates the -list of pages for which this \gls{frame} is defined. +list of pages for which this \gls*{frame} is defined. A \gls{pglist} can either be specified by the keywords: \texttt{all}, \texttt{odd}, \texttt{even} or \texttt{none}, or by a comma-separated list of either individual page numbers or \glspl{pgrange}. If \meta{page list} is omitted, \texttt{all} is assumed. -A \gls{pgrange} can be a closed +A \gls*{pgrange} can be a closed range (e.g.\ \verb+2-8+) or an open range (e.g.\ \verb+<10+ or \verb/>5/). For example: \verb'<3,5,7-11,>15' indicates pages 1, 2, 5, 7, 8, 9, 10, 11 and all pages greater than page 15. These page numbers refer to the value of the page counter\footnote{why can't I use the page number format? -See item~\ref{itm:whynot} on page~\pageref{itm:whynot}}, +See query~\ref{itm:whynot}\latex{ on page~\pageref{itm:whynot}}}, so if you have a page~i and a page~1, they will both have the same layout (unless you change the -page range setting somewhere between the two pages). +page list setting somewhere between the two pages). -Each \gls{frame} has its own unique \gls{idn}, +Each \gls*{frame} has its own unique \gls{idn}, corresponding to the order in which it was defined. So the first -\gls{flow} to be defined has the \gls{idn}~1, -the second has \gls{idn}~2, and so on. This number can then -be used to identify the \gls{frame} when you want to modify its +\gls*{flow} to be defined has \gls*{idn}~1, +the second has \gls*{idn}~2, and so on. This number can then +be used to identify the \gls*{frame} when you want to modify its settings. Alternatively, you can assign a unique \gls{idl}\ to the -\gls{frame} using the final optional argument \meta{label}. - -By default, the \gls{flow} will not have a border, but the -starred form, \cmdname{newflowframe*}, -will place a plain border around the \gls{flow}. +\gls*{frame} using the final optional argument \meta{label}. + +You can retrieve the \gls*{idl} for a given \gls*{flow} +from its \gls*{idn} using: +\begin{definition} +\cmdname{getflowlabel}\marg{\meta{idn}} +\end{definition} +Conversely, you can retrieve the \gls*{idn} for a given \gls*{flow} +from its \gls*{idl} using: +\begin{definition} +\cmdname{getflowid}\marg{\meta{cmd}}\marg{\meta{idl}} +\end{definition} +where \meta{cmd} is a control sequence which will be used to +store the frame's \gls*{idn}. +For example: +\begin{verbatim} +The label for the first flow frame is ``\getflowlabel{1}''. +The flow frame labelled ``main'' has IDN \getflowid{\myid}{main}\myid. +\end{verbatim} +\latex{produces: The label for the first flow frame is +``\getflowlabel{1}''. +The flow frame labelled ``main'' has IDN +\getflowid{\myid}{main}\myid.} (See also +\latexhtml{\autoref{sec:counters}}{\htmlref{Counters}{sec:counters}}.) + +Note that \cmdname{getflowlabel} doesn't perform any check to +determine whether the supplied \gls*{idn} is valid, but +\cmdname{getflowid} will generate an error if the supplied +\gls*{idl} is undefined. + +By default, the \gls*{flow} will not have a border, but the +starred form +\begin{definition} +\cmdname{newflowframe*}\oarg{\meta{page list}}%% +\marg{\meta{width}}% +\marg{\meta{height}}% +\marg{\meta{x}}% +\marg{\meta{y}}% +\oarg{\meta{label}} +\end{definition} +will place a plain border around the \gls*{flow}. +(See \latexhtml{\autoref{sec:modattr}}{\htmlref{Modifying frame +attributes}{sec:modattr}} if you want a different border.) Note that if the document continues beyond the last -defined \gls{flow} (for example, the \glspl{flow} have only +defined \gls*{flow} (for example, the \glspl*{flow} have only been defined on pages~1 to~10, but the document contains 11 -pages) then a single \gls{flow} will be defined, +pages) then a single \gls*{flow} will be defined, emulating one column mode for all subsequent pages. -In this document, I have used the command +In \latexhtml{this document, I have}{the PDF version of this document, +I} used the command \begin{verbatim} \newflowframe{0.6\textwidth}{\textheight}{0pt}{0pt}[main] \end{verbatim} -to define the main \gls{flow}\footnote{the -position for the even pages is set using \cmdname{setflowframe} -defined in \autoref{sec:modattr}} (i.e.\ this one.) +to define the main \gls*{flow}\footnote{the +position for the even pages is set using \cmdname{setflowframe} +defined in \latexhtml{\autoref{sec:modattr}}{\htmlref{Modifying +Frame Attributes}{sec:modattr}}}\latex{ (i.e.\ this one)}.\htmlnav \subsection{Prematurely Ending a Flow Frame} \label{sec:framebreak} @@ -512,348 +678,592 @@ You can force text to move immediately to the next defined \gls{flow} using one of the commands: \cmdname{newpage}, \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, +work in standard two column mode. The last one, \cmdname{framebreak}, is required -when a paragraph spans two \glspl{flow} +when a paragraph spans two \glspl*{flow} of different widths, as \TeX's output routine does not adjust to the new value of \cmdname{hsize} until the last paragraph of the previous \gls{frame} has ended. As a result, the end of the paragraph at the beginning of the new -\gls{flow} retains the width of the previous \gls{flow}. +\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{clearpage}, +next \gls*{frame}, use the command \cmdname{clearpage}, or for two-sided documents, to start on the next odd page -do \cmdname{cleardoublepage}. +do \cmdname{cleardoublepage}.\htmlnav \section{Static Frames} +\label{sec:static} A \gls{static} is a rectangular area in which text neither -flows into, nor flows out of\footnote{By ``neither flows into nor -flows out of'' I mean you have to explicitly set the contents of +flows into nor flows out of.\footnote{By \dq{neither flows into nor +flows out of} I mean you have to explicitly set the contents of this frame. Note that it may appear to contain text if another -frame overlaps it, but this text belongs to the other frame.}. +frame overlaps it, but this text belongs to the other frame.} The contents must be set explicitly, and once set, the contents -of the \gls{static} will remain the same on each page until it is -explicitly changed. Thus, a \gls{static} can be used, for +of the \gls*{static} will remain the same on each page until it is +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 -\glspl{static} with non-rectangular contents, see -\autoref{sec:parshape} for further details. +\glspl*{static} with non-rectangular contents, see +\latexhtml{\autoref{sec:parshape}}{\htmlref{Non-Rectangular +Frames}{sec:parshape}} for further details. -A new \gls{static} is defined using the command:\\[10pt] +A new \gls*{static} is defined using the command: +\begin{definition} \cmdname{newstaticframe}\oarg{\meta{page list}}% \marg{\meta{width}}% \marg{\meta{height}}% \marg{\meta{x}}% \marg{\meta{y}}% -\oarg{\meta{label}}\\[10pt] +\oarg{\meta{label}} +\end{definition} where, as with \cmdname{newflowframe}, \meta{width} is the width of -the \gls{static}, \meta{height} is the height of the \gls{static}, +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{static} relative to the bottom left hand +corner of the \gls*{frame} relative to the bottom left hand corner of the \gls{typeblock}. The first optional argument, \meta{page list}, indicates the \gls{pglist} for which this -\gls{static} should appear, and the final optional argument, +\gls*{static} should appear, and the final optional argument, \meta{label} is a unique textual \gls{idl}\ which you can use to -identify this \gls{static}. If no label is specified, you -can refer to this \gls{static} by its unique \gls{idn}. -The first \gls{static} defined has \gls{idn}~1, the second -has \gls{idn}~2, and so on. +identify this \gls*{frame}. If no label is specified, you +can refer to this \gls*{frame} by its unique \gls{idn}. +The first \gls*{static} to be defined has \gls*{idn}~1, the second +has \gls*{idn}~2, and so on. + +You can retrieve the \gls*{idl} for a given \gls*{static} +from its \gls*{idn} using: +\begin{definition} +\cmdname{getstaticlabel}\marg{\meta{idn}} +\end{definition} +Conversely, you can retrieve the \gls*{idn} for a given \gls*{static} +from its \gls*{idl} using: +\begin{definition} +\cmdname{getstaticid}\marg{\meta{cmd}}\marg{\meta{idl}} +\end{definition} +where \meta{cmd} is a control sequence which will be used to +store the frame's \gls*{idn}. +For example: +\begin{verbatim} +The label for the first static frame is ``\getstaticlabel{1}''. +The static frame labelled ``backleft'' has IDN +\getstaticid{\myid}{backleft}\myid. +\end{verbatim} +\latex{produces: The label for the first static frame is +``\getstaticlabel{1}''. +The static frame labelled ``backleft'' has IDN +\getstaticid{\myid}{backleft}\myid.} + +Note that \cmdname{getstaticlabel} doesn't perform any check to +determine whether the supplied \gls*{idn} is valid, but +\cmdname{getstaticid} will generate an error if the supplied +\gls*{idl} is undefined. As with \cmdname{newflowframe}, there is a starred version -\cmdname{newstaticframe*} which will place a border around that -\gls{static}. +\begin{definition} +\cmdname{newstaticframe*}\oarg{\meta{page list}}% +\marg{\meta{width}}% +\marg{\meta{height}}% +\marg{\meta{x}}% +\marg{\meta{y}}% +\oarg{\meta{label}} +\end{definition} +which will place a border around that \gls*{static}. -To set the contents of a particular \gls{static}, you can -either use the \env{staticcontents} environment:\\[10pt] +To set the contents of a particular \gls*{static}, you can +either use the \env{staticcontents} environment: +\begin{definition} \verb/\begin{staticcontents}/\marg{\meta{IDN}}\\ \meta{contents}\\ -\verb/\end{staticcontents}/\\[10pt] -where \meta{IDN} is the unique \gls{idn}\ associated with -that \gls{static} and \meta{contents} is the contents of the -\gls{static}, or you can use the -command:\\[10pt] -\cmdname{setstaticcontents}\marg{\meta{IDN}}\marg{\meta{contents}}\\[10pt] +\verb/\end{staticcontents}/ +\end{definition} +where \meta{IDN} is the unique \gls*{idn}\ associated with +that \gls*{static} and \meta{contents} is the contents of the +\gls*{static}, or you can use the +command: +\begin{definition} +\cmdname{setstaticcontents}\marg{\meta{IDN}}\marg{\meta{contents}} +\end{definition} which will do the same thing. There are starred versions available for both the environment -and the command to enable you to identify the \gls{static} -by its associated \gls{idl}\ rather than its \gls{idn} -:\\[10pt] +and the command to enable you to identify the \gls*{static} +by its associated \gls*{idl}\ rather than its \gls*{idn}: +\begin{definition} \verb/\begin{staticcontents*}/\marg{\meta{IDL}}\\ \meta{contents}\\ -\verb/\end{staticcontents*}/\\[10pt] -or the equivalent:\\[10pt] +\verb/\end{staticcontents*}/ +\end{definition} +or the equivalent: +\begin{definition} \cmdname{setstaticcontents*}\marg{\meta{IDL}}\marg{\meta{contents}} +\end{definition} + +In the body of \env{staticcontents} or \env{staticcontents*}, +or in the second argument of \cmdname{setstaticcontents} +or \cmdname{setstaticcontents*}, you can move onto another +\gls*{static} using: +\begin{definition} +\cmdname{continueonframe}\oarg{\meta{continuation text}}\marg{\meta{id}} +\end{definition} +If \env{staticcontents*} or \cmdname{setstaticcontents*} are +being used, \meta{id} refers to the \gls*{idl} of the next +\gls*{static}, otherwise \meta{id} refers to the \gls*{idn} of the +next \gls*{static}. +The optional argument specifies some continuation text to place +at the end of the first \gls*{static}. For example, suppose I have +defined two \glspl*{static} labelled \dq{frame1} and \dq{frame2}, then +\begin{verbatim} +\begin{staticcontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) +\continueonframe[Continued on the right]{frame2} +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{staticcontents*} +\end{verbatim} +is equivalent to: +\begin{verbatim} +\begin{staticcontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) +\ffcontinuedtextlayout{Continued on the right} +\end{staticcontents*} +\begin{staticcontents*}{frame2}\par\noindent +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{staticcontents*} +\end{verbatim} +where +\begin{definition} +\cmdname{ffcontinuedtextlayout}\marg{\meta{text}} +\end{definition} +governs how the continuation text should be displayed. The font used +to display the continuation text is given by +\begin{definition} +\cmdname{ffcontinuedtextfont}\marg{\meta{text}} +\end{definition} + +Note that this assumes that it should appear that no paragraph +break occurs in the transition between the two \glspl*{frame}. If you +want a paragraph break you need to explicitly put one before +and after \cmdname{continueonframe}. For example: +\begin{verbatim} +\begin{staticcontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) + +\continueonframe[Continued on the right]{frame2} + +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{staticcontents*} +\end{verbatim} +\htmlnav + +\subsection{Important Notes} + +\begin{itemize} +\item When you set the contents of a \gls{static}, the contents are +immediately typeset and stored in a box until it is time to put +the contents on the page. This means that if you use any information +that varies throughout the document (such as the page number) the +value that is current when you set the \gls*{static}['s] contents +will be the value used. + +\item However, if \cmdname{label} is used inside a \gls*{static}, +the label information will be written to the auxiliary file each +time the \gls*{static} is displayed until the contents of that +frame have been changed. This means that you may +end up with multiply defined labels. +\end{itemize} +\htmlnav \section{Dynamic Frames} +\label{sec:dynamic} -A \gls{dynamic} is similar to a \gls{static}, but its contents -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\footnote{which means that you can have -verbatim text in the body of the \env{staticcontents} environment -but not in the body of the \env{dynamiccontents} environment -(see page~\pageref{pg:verb})}). +A \gls{dynamic} is similar to a \gls{static} except that its contents +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.\footnote{which means that you can have +\Index{verbatim text} in the body of the \env{staticcontents} environment +but not in the body of the \env{dynamiccontents} environment\latex{ +(see page~\pageref{pg:verb})}}) As from version 1.03 it is now possible to have -\glspl{dynamic} with non-rectangular contents, see -\autoref{sec:parshape} for further details. +\glspl*{dynamic} with non-rectangular contents, see +\latexhtml{\autoref{sec:parshape}}{\htmlref{Non-Rectangular +Frames}{sec:parshape}} for further details. -To create a new \gls{dynamic}, use the command:\\[10pt] +To create a new \gls*{dynamic}, use the command: +\begin{definition} \cmdname{newdynamicframe}\oarg{\meta{page list}}% \marg{\meta{width}}% \marg{\meta{height}}% \marg{\meta{x}}% \marg{\meta{y}}% -\oarg{\meta{label}}\\[10pt] -The parameters are exactly the same as for \cmdname{newflowframe} +\oarg{\meta{label}} +\end{definition} +The parameters are exactly the same as for \cmdname{newflowframe} and \cmdname{newstaticframe}. -Again, each \gls{dynamic} has an associated unique \gls{idn}, -starting from 1 for the first \gls{dynamic} defined, and +Again, each \gls*{dynamic} has an associated unique \gls{idn}, +starting from 1 for the first \gls*{dynamic} to be defined, and a unique \gls{idl}\ can also be set using the final optional argument \meta{label}. +You can retrieve the \gls*{idl} for a given \gls*{dynamic} +from its \gls*{idn} using: +\begin{definition} +\cmdname{getdynamiclabel}\marg{\meta{idn}} +\end{definition} +Conversely, you can retrieve the \gls*{idn} for a given \gls*{dynamic} +from its \gls*{idl} using: +\begin{definition} +\cmdname{getdynamicid}\marg{\meta{cmd}}\marg{\meta{idl}} +\end{definition} +where \meta{cmd} is a control sequence which will be used to +store the frame's \gls*{idn}. + +For example: +\begin{verbatim} +The label for the first dynamic frame is ``\getdynamiclabel{1}''. +The dynamic frame labelled ``chaphead'' has IDN +\getdynamicid{\myid}{chaphead}\myid. +\end{verbatim} +\latex{produces: The label for the first dynamic frame is +``\getdynamiclabel{1}''. +The dynamic frame labelled ``chaphead'' has IDN +\getdynamicid{\myid}{chaphead}\myid.} + +Note that \cmdname{getdynamiclabel} doesn't perform any check to +determine whether the supplied \gls*{idn} is valid, but +\cmdname{getdynamicid} will generate an error if the supplied +\gls*{idl} is undefined. + As with the other \gls{frame} types, there is also a starred version -\cmdname{newdynamicframe*} -which will place a plain border around the \gls{dynamic}. -For example, in this document I have used the command +\begin{definition} +\cmdname{newdynamicframe*}\oarg{\meta{page list}}% +\marg{\meta{width}}% +\marg{\meta{height}}% +\marg{\meta{x}}% +\marg{\meta{y}}% +\oarg{\meta{label}} +\end{definition} +which will place a plain border around the \gls*{dynamic}. +For example, in \latexhtml{this document I have}{the PDF version +of this document I } used the command \begin{verbatim} \newdynamicframe{0.38\textwidth}{\textheight}{0.62\textwidth}{0pt}[chaphead] \end{verbatim} -which has created the \gls{frame} on the -right on odd pages, and on the left on even pages (the -position for the even pages is set using \cmdname{setdynamicframe} -defined in \autoref{sec:modattr}). - -The contents of a \gls{dynamic} are set using the command:\\[10pt] -\cmdname{setdynamiccontents}\marg{\meta{id}}\marg{\meta{contents}}\\[10pt] -where \meta{id} is the unique \gls{idn}\ associated with that -\gls{dynamic}, and \meta{contents} is the contents of the -\gls{dynamic}. Alternatively, if you have assigned an \gls{idl}, -\meta{label}, to the \gls{dynamic}, you can use the starred -version:\\[10pt] -\cmdname{setdynamiccontents*}\marg{\meta{label}}\marg{\meta{contents}}\\[10pt] +which \latex{has }created \latexhtml{the}{a} \gls*{frame} on the +right on odd pages and on the left on even pages. (The +position for the even pages is set using \cmdname{setdynamicframe} +defined in \latexhtml{\autoref{sec:modattr}}{\htmlref{Modifying +Frame Attributes}{sec:modattr}}.) + +The contents of a \gls*{dynamic} are set using the command: +\begin{definition} +\cmdname{setdynamiccontents}\marg{\meta{id}}\marg{\meta{contents}} +\end{definition} +where \meta{id} is the unique \gls*{idn}\ associated with that +\gls*{dynamic}, and \meta{contents} is the contents of the +\gls*{dynamic}. Alternatively, if you have assigned an \gls*{idl}, +\meta{label}, to the \gls*{dynamic}, you can use the starred +version: +\begin{definition} +\cmdname{setdynamiccontents*}\marg{\meta{label}}\marg{\meta{contents}} +\end{definition} +As with most \LaTeX\ commands, you can't use \Index{verbatim text} in +\meta{contents}. + As from version 1.09, the contents can also be set using the -\env{dynamiccontents} environment:\\[10pt] -\verb|\begin{dynamiccontents}|\marg{\meta{id}}\\[10pt] -or the \env{dynamiccontents*} environment:\\[10pt] -\verb|\begin{dynamiccontents*}|\marg{label}\\[10pt] -\label{pg:verb}Note that you can not use verbatim text within the +\env{dynamiccontents} environment: +\begin{definition} +\verb|\begin{dynamiccontents}|\marg{\meta{id}}\\ +\meta{contents}\\ +\verb|\end{dynamiccontents}| +\end{definition} +or the \env{dynamiccontents*} environment: +\begin{definition} +\verb|\begin{dynamiccontents*}|\marg{label}\\ +\meta{contents}\\ +\verb|\end{dynamiccontents*}| +\end{definition} +\label{pg:verb}Note that you can't use \Index{verbatim text} within the \env{dynamiccontents} or \env{dynamiccontents*} environments. -You can additionally append text to a \gls{dynamic} using -either:\\[10pt] -\cmdname{appenddynamiccontents}\marg{\meta{id}}\marg{\meta{contents}}\\[10pt] -or:\\[10pt] -\cmdname{appenddynamiccontents*}\marg{\meta{label}}\marg{\meta{contents}}\\[10pt] - -You can make the chapter titles (if \cmdname{chapter} is defined) +You can additionally append text to a \gls*{dynamic} using +either: +\begin{definition} +\cmdname{appenddynamiccontents}\marg{\meta{id}}\marg{\meta{contents}} +\end{definition} +or: +\begin{definition} +\cmdname{appenddynamiccontents*}\marg{\meta{label}}\marg{\meta{contents}} +\end{definition} + +If \cmdname{chapter} is defined, you can make the chapter titles appear in a dynamic frame using the command +\begin{definition} \cmdname{dfchaphead}\marg{\meta{IDN}} +\end{definition} where \meta{IDN} is the \gls{idn}\ of the dynamic frame. There is also a starred version of this command if you want to -use the \gls{idl}\ instead of the \gls{idn}. For example, in this -document, I used the command: +use the \gls{idl}\ instead of the \gls*{idn}. For example, in +\html{the PDF version of }this document, I used the command: \begin{verbatim} \dfchaphead*{chaphead} \end{verbatim} -The headers and footers can be turned into \glspl{dynamic} -using the command \cmdname{makedfheaderfooter}. This will -create two \glspl{dynamic} with \glspl{idl} \texttt{header} and -\texttt{footer}. The page style will be used as usual, but -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 \glspl{frame}, -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}\marg{\meta{length}} - -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}\marg{\meta{length}} - -As above, but for even pages. - -\item \cmdname{computetopedge}\marg{\meta{length}} - -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}\marg{\meta{length}} - -Compute the bottom edge of the page, relative to the bottom of the -\gls{typeblock}, and store the result in \meta{length} +The headers and footers can be turned into \glspl*{dynamic} +using the command +\begin{definition} +\cmdname{makedfheaderfooter} +\end{definition} +This will create two \glspl*{dynamic} with \glspl*{idl} +\texttt{header} and \texttt{footer}. The page style will be used as +usual, but you can then move or resize the header and footer using +\cmdname{setdynamicframe} (described \latexhtml{in +\autoref{sec:modattr}}{\htmlref{later}{sec:modattr}}). + +In the body of \env{dynamiccontents} or \env{dynamiccontents*}, +you can move onto another \gls*{dynamic} using: +\begin{definition} +\cmdname{continueonframe}\oarg{\meta{continuation text}}\marg{id} +\end{definition} +If this command occurs within \env{dynamiccontents*}, \meta{id} +refers to the \gls*{idl} of the new frame, otherwise it refers +to the \gls*{idn} of the new frame. +The optional argument specifies some continuation text to place +at the end of the first \gls*{dynamic}. For example, suppose I have +defined two \glspl*{dynamic} labelled \dq{frame1} and \dq{frame2}, then +\begin{verbatim} +\begin{dynamiccontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) +\continueonframe[Continued on the right]{frame2} +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{dynamiccontents*} +\end{verbatim} +is equivalent to: +\begin{verbatim} +\begin{dynamiccontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) +\ffcontinuedtextlayout{Continued on the right} +\end{dynamiccontents*} +\begin{dynamiccontents*}{frame2}\par\noindent +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{dynamiccontents*} +\end{verbatim} +where +\begin{definition} +\cmdname{ffcontinuedtextlayout}\marg{\meta{text}} +\end{definition} +governs how the continuation text should be displayed. The font used +to display the continuation text is given by +\begin{definition} +\cmdname{ffcontinuedtextfont}\marg{\meta{text}} +\end{definition} + +Note that this assumes that it should appear that no paragraph +break occurs in the transition between the two frames. If you +want a paragraph break you need to explicitly put one before +and after \cmdname{continueonframe}. For example: +\begin{verbatim} +\begin{dynamiccontents*}{frame1} +Some text in the first frame. (Let's +assume this frame is somewhere on the +left half of the page.) -\item \cmdname{computerightedgeodd}\marg{\meta{length}} +\continueonframe[Continued on the right]{frame2} -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}. +This is some text in the second frame. (Let's +assume this frame is somewhere on the +right half of the same page.) +\end{dynamiccontents*} +\end{verbatim} +\htmlnav -\item \cmdname{computerightedgeeven}\marg{\meta{length}} +\subsection{Important Notes} -As above, but for even pages. +\begin{itemize} +\item Verbatim text\index{verbatim text} can't be used in a +\gls{dynamic}. This includes +the body of the \env{dynamiccontents} and \env{dynamiccontents*} +environments. + +\item \cmdname{continueonframe} can't be used in the +argument of any of the commands that set the contents of a +\gls*{dynamic}, such as \cmdname{setdynamiccontents}. + +\item \Glspl*{dynamic} are painted on the page after all the +static and flow \glspl{frame}. If the location of a \gls*{dynamic} +overlaps the location of any static or flow frames, the contents +of the \gls*{dynamic} will obscure the contents of the overlapping +frames. \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} +\htmlnav \chapter{Modifying Frame Attributes} \label{sec:modattr} +\chapdesc{This chapter describes how to modify frame attributes, +such as the size and location.} Once you have defined the \glspl{flow}, \glspl{static} and \glspl{dynamic}, their attributes can be changed. The three types of \gls{frame} mostly have the same set of attributes, but some are specific to a certain type. -\\[10pt] -\Gls{flow} attributes are modified using -either the command:\\[10pt] -\cmdname{setflowframe}\marg{\meta{idn list}}\marg{\meta{key-val list}}\\[10pt] -or the starred version:\\[10pt] -\cmdname{setflowframe*}\marg{\meta{label list}}\marg{\meta{key-val list}}\\[10pt] -or the attributes for all \glspl{flow} can be -set using:\\[10pt] + +\Gls*{flow} attributes are modified using +either the command: +\begin{definition} +\cmdname{setflowframe}\marg{\meta{idn list}}\marg{\meta{key-val list}} +\end{definition} +or the starred version: +\begin{definition} +\cmdname{setflowframe*}\marg{\meta{label list}}\marg{\meta{key-val list}} +\end{definition} +or the attributes for all \glspl*{flow} can be set using: +\begin{definition} \cmdname{setallflowframes}\marg{\meta{key-val list}} -\\[10pt] -\Gls{static} attributes are modified -using either the command:\\[10pt] -\cmdname{setstaticframe}\marg{\meta{idn list}}\marg{\meta{key-val list}}\\[10pt] -or the starred version:\\[10pt] -\cmdname{setstaticframe*}\marg{\meta{label list}}\marg{\meta{key-val list}}\\[10pt] -or the attributes for all \glspl{static} -can be set using:\\[10pt] +\end{definition} +\Gls*{static} attributes are modified using either the command: +\begin{definition} +\cmdname{setstaticframe}\marg{\meta{idn list}}\marg{\meta{key-val list}} +\end{definition} +or the starred version: +\begin{definition} +\cmdname{setstaticframe*}\marg{\meta{label list}}\marg{\meta{key-val list}} +\end{definition} +or the attributes for all \glspl*{static} +can be set using: +\begin{definition} \cmdname{setallstaticframes}\marg{\meta{key-val list}} -\\[10pt] -\Gls{dynamic} attributes are modified -using either the command:\\[10pt] -\cmdname{setdynamicframe}\marg{\meta{idn list}}\marg{\meta{key-val list}}\\[10pt] -or the starred version:\\[10pt] -\cmdname{setdynamicframe*}\marg{\meta{label list}}\marg{\meta{key-val list}}\\[10pt] -or the attributes for all \glspl{dynamic} -can be set using:\\[10pt] +\end{definition} +\Gls*{dynamic} attributes are modified using either the command: +\begin{definition} +\cmdname{setdynamicframe}\marg{\meta{idn list}}\marg{\meta{key-val list}} +\end{definition} +or the starred version: +\begin{definition} +\cmdname{setdynamicframe*}\marg{\meta{label list}}\marg{\meta{key-val list}} +\end{definition} +or the attributes for all \glspl*{dynamic} can be set using: +\begin{definition} \cmdname{setalldynamicframes}\marg{\meta{key-val list}} -\\[10pt] +\end{definition} + In each of the above, \meta{idn list} can either be one of the keywords: \texttt{all}, \texttt{odd} or \texttt{even} (indicating -all \glspl{frame} of that type, -\glspl{frame} of that type whose \gls{idn} -is odd or \glspl{frame} of that type whose \gls{idn} -is even), or it can be a comma-separated list of ID numbers, or -\gls{idn} ranges. +all \glspl*{frame} of that type, \glspl*{frame} of that type whose +\gls{idn} is odd or \glspl*{frame} of that type whose \gls*{idn} +is even) or it can be a comma-separated list of ID numbers, or +\gls*{idn} ranges. For the starred versions, \meta{label list} should be -a comma-separated list of \glspl{idl}. Note that you can -not use the above keywords, or have ranges with the -starred versions. +a comma-separated list of \glspl{idl}. Note that you can't use the +above keywords or have ranges in \meta{label list}. The \meta{key-val list} argument must be a comma-separated list of \meta{key}=\meta{value} pairs, indicating which attributes to modify. The available values are as follows: \begin{description} -\item[\key{width}=\meta{length}] The width of the \gls{frame}. +\item[\key{width}=\meta{length}] The width of the \gls*{frame}. -\item[\key{height}=\meta{length}] The height of the \gls{frame}. +\item[\key{height}=\meta{length}] The height of the \gls*{frame}. -\item[\key{x}=\meta{length}] The x-coordinate of the \gls{frame} +\item[\key{x}=\meta{length}] The x-coordinate of the \gls*{frame} for all pages on which it is defined. -\item[\key{y}=\meta{length}] The y-coordinate of the \gls{frame} +\item[\key{y}=\meta{length}] The y-coordinate of the \gls*{frame} for all pages on which it is defined. \item[\key{evenx}=\meta{length}] The x-coordinate of the -\gls{frame} for all even pages on which it is defined, but only if +\gls*{frame} for all even pages on which it is defined, but only if the document is a two-sided document. -For example, in this document, I have used the commands +For example, in \latexhtml{this document, I have}{the PDF version of +this document, I} used the commands \begin{verbatim} \setflowframe*{main}{evenx=0.4\textwidth} \setdynamicframe*{chaphead}{evenx=0pt} \end{verbatim} -to switch the positions of the \gls{flow} and \gls{dynamic} +to switch the positions of the \gls*{flow} and \gls*{dynamic} containing the document text and chapter headings, respectively, on even pages. You can swap the odd and even values using the commands: -\cmdname{ffswapoddeven}\marg{\meta{IDN}} (for -\glspl{flow}) \cmdname{sfswapoddeven}\marg{\meta{IDN}} -(for \glspl{static}) or -\cmdname{dfswapoddeven}\marg{\meta{IDN}}. These +\begin{definition} +\cmdname{ffswapoddeven}\marg{\meta{IDN}} +\end{definition} +(for \glspl*{flow}) +\begin{definition} +\cmdname{sfswapoddeven}\marg{\meta{IDN}} +\end{definition} +(for \glspl*{static}) or +\begin{definition} +\cmdname{dfswapoddeven}\marg{\meta{IDN}} +\end{definition} +(for \glspl*{dynamic}). These commands all have starred versions which take the frame's -\gls{idl}\ instead of its \gls{idn}. +\gls*{idl}\ instead of its \gls*{idn}. \item[\key{eveny}=\meta{length}] The y-coordinate of the -\gls{frame} for all even pages on which it is defined, but only if +\gls*{frame} for all even pages on which it is defined, but only if the document is a two-sided document. \item[\key{oddx}=\meta{length}] The x-coordinate of the -\gls{frame} for all odd pages on which it is defined, if the +\gls*{frame} for all odd pages on which it is defined, if the document is two-sided. \item[\key{oddy}=\meta{length}] The y-coordinate of the -\gls{frame} for all odd pages on which it is defined, +\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} +of material inside a static or dynamic frame. The value \meta{pos} may be one of: \texttt{c}, \texttt{t} or \texttt{b}. -The default for \glspl{static} is \texttt{c}, the default -for \glspl{dynamic} is \texttt{t}. -This key is not available for \glspl{flow}. +The default for \glspl*{static} is \texttt{c}, the default +for \glspl*{dynamic} is \texttt{t}. +This key is not available for \glspl*{flow}. -\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 \gls{idn}.) This key is +\item[\key{label}=\meta{text}] Assign an \gls*{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 \gls*{idn}.) This key is provided to allow the user to label frames that have been generated by certain predefined layout commands described -in \autoref{sec:layouts}. +in \latexhtml{\autoref{sec:layouts}}{\htmlref{Predefined +Layouts}{sec:layouts}}. \item[\key{border}=\meta{style}] The style of the border around the -\gls{frame}, this can take the values: \texttt{none} (no border), +\gls*{frame}, this can take the values: \texttt{none} (no border), \texttt{plain} (plain border) or the name of a \LaTeX\ \gls{fcmd} without the preceding backslash. (I admit -the notation is a little confusing, a \gls{fcmd} +the notation is a little confusing, a \gls*{fcmd} is a command that places some kind of border around its argument, such as \cmdname{fbox}, or if you are using the \sty{fancybox} package: \cmdname{doublebox}, \cmdname{ovalbox}, \cmdname{Ovalbox} and \cmdname{shadowbox}.) The value \texttt{fbox} is equivalent to \texttt{plain}. -For example, to make the first \gls{static} have an oval border: +For example, to make the first \gls*{static} have an oval border: \begin{verbatim} \setstaticframe{1}{border=ovalbox} \end{verbatim} @@ -863,22 +1273,55 @@ Or you can define your own border: \setstaticframe{1}{border=greenyellowbox} \end{verbatim} +This next example uses the \sty{tikz} package to define a fancy +frame, so you need to use: +\begin{verbatim} +\usepackage{tikz} +\usetikzlibrary{snakes} +\end{verbatim} +The border command is defined as follows: +\begin{verbatim} +\newlength\fancywidth +\newlength\fancyheight +\newlength\fancydepth + +\newcommand{\fancyborder}[1]{% +\settowidth{\fancywidth}{#1}% +\settoheight{\fancyheight}{#1}% +\settodepth{\fancydepth}{#1}% +\addtolength{\fancyheight}{\fancydepth}% +\hspace{-\flowframesep}% +\tikz[baseline=0pt]{% +\draw[snake=bumps,raise snake=\flowframesep, + line width=\flowframerule] + (0pt,0pt) rectangle (\fancywidth,\fancyheight); +}} +\end{verbatim} +This makes a bumpy border, but it uses \cmdname{flowframesep} to +determine the gap between the border and the text and uses +\cmdname{flowframerule} to set the line width. This ensures that +the offset (see below) is correctly computed. + +This new border can now be applied to a frame: +\begin{verbatim} +\setstaticframe{1}{border=fancyborder} +\end{verbatim} + \item[\key{offset}=\meta{offset}] The border offset, if it is a user-defined border. This is the distance from the outer edge of the left hand border to the left edge of the -\gls{bbox} of the text inside the border. The \sty{flowfram} +\gls{bbox} of the text inside the border. The \styni{flowfram} package is able to compute the border for the following -known \glspl{fcmd}: \cmdname{fbox}, \cmdname{ovalbox}, +known \glspl*{fcmd}: \cmdname{fbox}, \cmdname{ovalbox}, \cmdname{Ovalbox}, \cmdname{doublebox} and \cmdname{shadowbox}. For all other borders, the offset is assumed to be -$-$\cmdname{flowframesep}$-$\cmdname{flowframerule}. -If you define your own \glslink{fcmd}{frame} -\glslink{fcmd}{making} \glslink{fcmd}{command}, -you may need to +\latexhtml{$-$\cmdname{flowframesep}$-$\cmdname{flowframerule}% +}{\texttt{-\textbackslash flowframesep-\textbackslash flowframerule}}. +If you define your own \gls*{fcmd}, you may need to specify the offset explicitly, or the flow/static/dynamic frames may end up shifted to the right or left. -The above two examples can compute their own offsets, however, +The above examples can compute their own offsets, however, if you were to do, for example: \begin{verbatim} \newcommand{\thickgreenyellowbox}[1]{% @@ -886,14 +1329,15 @@ if you were to do, for example: \fcolorbox{green}{yellow}{#1}}} \end{verbatim} Then you would have to specify the offset. In this example, -the offset is $-5\mathrm{pt}-\mathrm{6pt}=-11\mathrm{pt}$, +the offset is \latexhtml{$-5\mathrm{pt}-\mathrm{6pt}=-11\mathrm{pt}$% +}{-5pt-6pt=-11pt}, so you would need to do: \begin{verbatim} \setstaticframe{1}{border=thickgreenyellowbox,offset=-11pt} \end{verbatim} \item[\key{bordercolor}=\meta{colour}] The colour of the border -if you are using a standard \gls{fcmd}. +if you are using a standard \gls*{fcmd}. The colour can either be specified as, e.g.\ \texttt{green}, or including the colour model, e.g. \verb/[rgb]{0,1,0}/. For example: @@ -902,23 +1346,22 @@ For example: \end{verbatim} \item[\key{textcolor}=\meta{colour}] The text colour for that -\gls{frame}. Again, the colour can either be specified as, +\gls*{frame}. Again, the colour can either be specified as, e.g.\ \texttt{green}, or including the colour model, e.g. \verb/[rgb]{0,1,0}/. \item[\key{backcolor}=\meta{colour}] The background colour for -that \gls{frame}. Again, the colour can either be specified as, +that \gls*{frame}. Again, the colour can either be specified as, e.g.\ \texttt{green}, or including the colour model, e.g. \verb/[rgb]{0,1,0}/. Note that the background colour -only extends as far as the \gls{bbox}, not the border. +only extends as far as the \gls*{bbox}, not the border. If you want it to extend as far as the border, you will need to define your own border type (see above). \item[\key{pages}=\meta{page list}] The \glslink{pglist}{list of -pages} for which the \gls{frame} -should appear. This can either have the values: \texttt{all}, -\texttt{even}, \texttt{odd} or \texttt{none} (the latter -removes the \gls{frame} from that point on---useful if you +pages} for which the \gls*{frame} should appear. This can either have +the values: \texttt{all}, \texttt{even}, \texttt{odd} or \texttt{none} +(the latter removes the \gls*{frame} from that point on---useful if you have multiple pages with the same number), or it can be a comma-separated list of single pages, or \glspl{pgrange}. @@ -928,10 +1371,10 @@ For example: \end{verbatim} \item[\key{margin}=\meta{side}] The side of -the \gls{flow} that its corresponding margin should go on. This +the \gls*{flow} that its corresponding margin should go on. This can take the values \texttt{left}, \texttt{right}, \texttt{inner} or \texttt{outer}. This setting is only available -for \glspl{flow}. +for \glspl*{flow}. \item[\key{clear}=\meta{boolean}] If this value is set, the static or dynamic frame will be @@ -941,42 +1384,50 @@ occurrence of \cmdname{setstaticcontents} or the \env{staticcontents} environment, or the \cmdname{setdynamiccontents}, depending on the frame type. This value is not set by default. This setting is not -available for \glspl{flow}. +available for \glspl*{flow}. -For example, to prevent the chapter heading reappearing on -every page, I have used the command: +For example, \latexhtml{to prevent the chapter heading reappearing on +every page, I have used}{in the PDF version of this document, I +prevented the chapter heading reappearing on every page using} +the command: \begin{verbatim} \setdynamicframe*{chaphead}{clear} \end{verbatim} +If you want to put \cmdname{label} in a static or dynamic frame, you +should use the \key{clear} key to prevent the label from being +multiply defined. + \item[\key{style}=\meta{cmd}] This should be the name of a command \emph{without} the preceding backslash, -to be applied to the contents of the specified \gls{dynamic}. +to be applied to the contents of the specified \gls*{dynamic}. The command may either be a declaration, for example: \begin{verbatim} \setalldynamicframes{style=large} \end{verbatim} -which will set the contents of all the dynamic frames in a +which will set the contents of all the \glspl*{dynamic} in a large font, or it can be a command that takes a single argument, for example: \begin{verbatim} \setalldynamicframes{style=textbf} \end{verbatim} -which will make the text for all the dynamic frames come out in +which will make the text for all the \glspl*{dynamic} come out in bold. To unset a style, do \verb/style=none/. -This setting is only available for \glspl{dynamic}. +This setting is only available for \glspl*{dynamic}. \item[\key{angle}=\meta{n}] Rotate the contents of the -\gls{frame} by \meta{n} degrees (new to -version 1.02). Note that the \gls{bbox}es will not +\gls*{frame} by \meta{n} degrees (new to +version 1.02). Note that the \glspl{bbox} 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. +the contents of a \gls*{static} or \gls*{dynamic} (new +to version 1.03). If \meta{shape command} is \cmdname{relax}, no +paragraph shape will be applied. See +\latexhtml{\autoref{sec:parshape}}{\htmlref{Non-Rectangular +Frames}{sec:parshape}} for further details. \end{description} +\htmlnav \section{Non-Rectangular Frames} \label{sec:parshape} @@ -985,21 +1436,22 @@ As from version 1.03, it is now possible to specify non-rectangular \staticordynamic{}s (but not \glspl{flow}). Note that the \gls{bbox} will still appear as a rectangle despite the -\gls{frame}'s shape setting. You may use either \TeX's +\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} +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. +requires more processing. However, \cmdname{shapepar} provides +greater flexibility in the type of shape that can be used. \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 +in the left or right side of the \gls*{frame}. When used with the +\key{shape} key for static or dynamic frames, 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} @@ -1015,21 +1467,28 @@ 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 +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: +\cmdname{parshape}=\latexhtml{$n$ $i_1$ $l_1$ $i_2$ $l_2$ \ldots\ $i_n$ $l_n$}{\meta{n} \meta{i\textsubscript{1}} \meta{l\textsubscript{1}} +\meta{i\textsubscript{2}} \meta{l\textsubscript{2}} \ldots\ +\meta{i\textsubscript{n}} \meta{l\textsubscript{n}}}\\[10pt] +where \latexhtml{$n$}{\meta{n}} is the number of (\latexhtml{$i_j$ +$l_j$}{\meta{i\textsubscript{j}} \meta{l\textsubscript{j}}}) pairs and +\latexhtml{$i_j$}{\meta{i\textsubscript{j}}} specifies the left +indentation for the \latexhtml{$j$th}{jth} line and +\latexhtml{$l_j$}{\meta{l\textsubscript{j}}} specifies the length of +the \latexhtml{$j$th}{jth} line. + +\latexhtml{The \gls*{static} on the top +\ifthenelse{\isodd{page}}{left}{right} +was assigned a zigzag shape using:}{For example, to create a +zigzag shaped static frame (whose \gls*{idn} is \texttt{shapedt}):} \setstaticframe*{shapedb,shapedt}{pages=all} \begin{verbatim} -\setstaticframe*{shapedb}{shape={\parshape=20 +\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 @@ -1067,8 +1526,8 @@ was assigned a zigzag shape using: \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} +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 @@ -1088,8 +1547,10 @@ 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: +\latexhtml{The \gls{static} on the bottom +\ifthenelse{\isodd{page}}{left}{right} +was assigned a heart shape using the command:}{For example, to assign +a heart shape to the static frame whose \gls*{idl} is \texttt{shapedb}:} \begin{verbatim} \setstaticframe*{shapedb}{shape={\shapepar\heartshape}} \end{verbatim} @@ -1111,9 +1572,85 @@ 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 +The \styni{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. +have to be used explicitly within the contents of the frame.\htmlnav + +\chapter{Locations and Dimensions} +\chapdesc{This chapter describes some of the commands provided to +determine the locations and dimensions of frames.} + +This chapter describes some of the commands available that can +be used to determine the locations and dimensions of \glspl{frame}. +See the accompanying document \texttt{flowfram.pdf} for more details of +these commands or for other commands not listed here.\htmlnav + +\section{Determining the Location of the Typeblock} +\label{sec:typeblockloc} + +As mentioned earlier, when you create new \glspl{frame}, +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 \styni{flowfram} package provides the following +commands that compute the distance from the \gls*{typeblock} to the +paper boundary: + +\begin{definition} +\cmdname{computeleftedgeodd}\marg{\meta{length}} +\end{definition} +This computes the position of the left edge of the (odd) page, relative +to the left side of the \gls*{typeblock}, and stores the result in +\meta{length}. + +\begin{definition} +\cmdname{computeleftedgeeven}\marg{\meta{length}} +\end{definition} +As above, but for even pages. + +\begin{definition} +\cmdname{computetopedge}\marg{\meta{length}} +\end{definition} +This computes the top edge of the page, relative to the bottom of the +\gls*{typeblock}, and stores the result in \meta{length}. + +\begin{definition} +\cmdname{computebottomedge}\marg{\meta{length}} +\end{definition} +This computes the bottom edge of the page, relative to the bottom of the +\gls*{typeblock}, and stores the result in \meta{length}. + +\begin{definition} +\cmdname{computerightedgeodd}\marg{\meta{length}} +\end{definition} +This computes the position of the right edge of the (odd) page, +relative to the left side of the \gls*{typeblock}, and store the result +in \meta{length}. + +\begin{definition} +\cmdname{computerightedgeeven}\marg{\meta{length}} +\end{definition} +As above, but for even pages. + +Note that in all cases \meta{length} must 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} +\htmlnav \section{Determining the Dimensions and Locations of Frames} @@ -1133,14 +1670,139 @@ For each command, the starred version takes an \gls{idl}\ as the argument, and the unstarred version takes an \gls{idn}\ as the argument. Each command stores the relevant information in the lengths \cmdname{ffareawidth}, \cmdname{ffareaheight}, -\cmdname{ffareax} and \cmdname{ffareay} +\cmdname{ffareax} and \cmdname{ffareay}. + +For other related commands, see the section \dq{Determining Dimensions +and Locations} in the accompanying document +\texttt{flowfram.pdf}.\htmlnav + +\section{Relative Locations} + +To print the relative location of one \gls{frame} from another do: +\begin{definition} +\cmdname{relativeframelocation}\marg{\meta{type1}}\marg{\meta{idn1}}\marg{\meta{type2}}\marg{\meta{idn2}} +\end{definition} +where \meta{type1} and \meta{idn1} indicate the type and \gls{idn} of +the first frame, and \meta{type2} and \meta{idn2} indicate the type +and \gls{idn} of the second frame. There is also a starred version: +\begin{definition} +\cmdname{relativeframelocation*}\marg{\meta{type1}}\marg{\meta{idl1}}\marg{\meta{type2}}\marg{\meta{idll}} +\end{definition} +where \meta{idl1} and \meta{idl2} indicate the \gls{idl} of the +first and second frames, respectively. Both the above commands will +print one of the following: + +\begin{itemize} +\item \cmdname{FFaboveleft} if the first frame is above left of the +second frame. + +\item \cmdname{FFaboveright} if the first frame is above right of the +second frame. + +\item \cmdname{FFabove} if the first frame is above the second frame. + +\item \cmdname{FFbelowleft} if the first frame is below left of the +second frame. + +\item \cmdname{FFbelowright} if the first frame is below right of the +second frame. + +\item \cmdname{FFbelow} if the first frame is below the second frame. + +\item \cmdname{FFleft} if the first frame is to the left of the +second frame. + +\item \cmdname{FFright} if the first frame is to the right of the +second frame. + +\item \cmdname{FFoverlap} if both frames overlap. +\end{itemize} + +A frame is considered to be above another frame if the bottom edge +of the first frame is higher than the top edge of the second frame. + +A frame is considered to be below another frame if the top edge +of the first frame is lower than the bottom edge of the second frame. + +A frame is considered to be to the left of another frame if the right +edge of the first frame is to the left of the left edge of the second +frame. + +A frame is considered to be to the right of another frame if the left +edge of the first frame is to the right of the right edge of the +second frame. + +Note that the relative locations are taken for the current page, +regardless of whether either of the two frames are displayed on that +page. If the current page is odd, then the frame settings for odd pages +will be compared, otherwise the frame settings for even pages will +be compared. However remember that the first paragraph of each page +retains the settings in place at the start of the paragraph, so if the +frames have different locations for odd and even pages, then +\cmdname{relativeframelocation} may use the wrong page settings if it +is used at the start of the page. + +For example, \html{the PDF version of }this document defined a +\gls{flow} labelled \texttt{main} \latex{(this one)} and a +\gls{dynamic} labelled \texttt{chaphead} which is +used to display the chapter headings. The following code +\begin{verbatim} +The dynamic frame is +\relativeframelocation*{dynamic}{chaphead}{flow}{main} +of the flow frame. +\end{verbatim} +produces: +The dynamic frame is +\latexhtml{\relativeframelocation*{dynamic}{chaphead}{flow}{main}}{on +the left} of the flow frame. + +There are some short cut commands for \glspl*{frame} of the +same type: +\begin{definition} +\cmdname{reldynamicloc}\marg{\meta{idn1}}\marg{\meta{idn2}} +\end{definition} +This is equivalent to:\\[10pt] +\cmdname{relativeframelocation}\marg{dynamic}\marg{\meta{idn1}}\marg{dynamic}\marg{\meta{idn2}} +\begin{definition} +\cmdname{relstaticloc}\marg{\meta{idn1}}\marg{\meta{idn2}} +\end{definition} +This is equivalent to:\\[10pt] +\cmdname{relativeframelocation}\marg{static}\marg{\meta{idn1}}\marg{static}\marg{\meta{idn2}} +\begin{definition} +\cmdname{relflowloc}\marg{\meta{idn1}}\marg{\meta{idn2}} +\end{definition} +This is equivalent to:\\[10pt] +\cmdname{relativeframelocation}\marg{flow}\marg{\meta{idn1}}\marg{flow}\marg{\meta{idn2}} +\\[10pt] +Each of the above commands also has a starred version that uses the +\gls{idl} instead of the \gls{idn}. + +These commands may be used in the optional argument of +\cmdname{continueonframe} for frames that are on the same page. +For example: +\begin{verbatim} +\begin{dynamiccontents}{1} +Some text in the first dynamic frame that goes on for +quite a bit longer than this example. +\continueonframe[continued \reldynamicloc{2}{1}]{2} +This text is in the second dynamic frame which is +somewhere on the same page. +\end{dynamiccontents} +\end{verbatim} + +For additional commands that determine the relative location of one +frame from another, see the section \dq{Determining the relative +location of one frame from another} in the accompanying document +\texttt{flowfram.pdf}.\htmlnav \chapter{Predefined Layouts} \label{sec:layouts} +\chapdesc{This chapter describes commands that create frames +arranged in a predefined layout.} -The \sty{flowfram} package has a number of commands which +The \styni{flowfram} package has a number of commands which create \glspl{frame} in a predefined layout. These commands -may only be used in the preamble. +may only be used in the preamble.\htmlnav \section{Column Styles} @@ -1149,319 +1811,537 @@ The standard \LaTeX\ commands \cmdname{onecolumn} and \glspl{flow} that fill the entire \gls{typeblock} separated from each other (in the case of \cmdname{twocolumn}) by a gap of width \cmdname{columnsep}. The height of these -\glspl{flow} may not be exactly as high as the \gls{typeblock}, +\glspl*{flow} may not be exactly as high as the \gls*{typeblock}, as their height is adjusted to make them an integer multiple of \cmdname{baselineskip}. You can switch off this -automatic adjustment using the command: \cmdname{ffvadjustfalse}. +automatic adjustment using the command: +\begin{definition} +\cmdname{ffvadjustfalse} +\end{definition} The \cmdname{onecolumn} and \cmdname{twocolumn} commands -also take an optional argument which is the \gls{pglist} -for which those \glspl{flow} are defined. In addition +also take an optional argument which is the \gls{pglist} +for which those \glspl*{flow} are defined. In addition to \cmdname{onecolumn} and \cmdname{twocolumn}, the following commands are also defined: -\begin{itemize} -\item \cmdname{Ncolumn}\oarg{\meta{pages}}\marg{\meta{n}} - -Create \meta{n} column \glspl{flow} each separated by a +\begin{definition} +\cmdname{Ncolumn}\oarg{\meta{pages}}\marg{\meta{n}} +\end{definition} +This creates \meta{n} column \glspl*{flow} each separated by a distance of \cmdname{columnsep}. -\item \cmdname{onecolumninarea}\oarg{\meta{pages}}% +\begin{definition} +\cmdname{onecolumninarea}\oarg{\meta{pages}}% \marg{\meta{width}}\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} - -This creates a single \gls{flow} to fill the given area, +\end{definition} +This creates a single \gls*{flow} to fill the given area, adjusting the height so that it is an integer multiple of \cmdname{baselineskip}. -\item \cmdname{twocolumninarea}\oarg{\meta{pages}}% +\begin{definition} +\cmdname{twocolumninarea}\oarg{\meta{pages}}% \marg{\meta{width}}\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This creates two column \glspl*{flow} separated by a distance +of \cmdname{columnsep} filling the entire area specified, again +adjusting the height so that it is an integer multiple of +\cmdname{baselineskip}. The columns are separated by a gap of +\cmdname{columnsep}. -This creates two column \glspl{flow} separated by a distance -of \cmdname{columnsep} filling the entire area specified. - -\item \cmdname{Ncolumninarea}\oarg{\meta{pages}}\marg{\meta{n}}% +\begin{definition} +\cmdname{Ncolumninarea}\oarg{\meta{pages}}\marg{\meta{n}}% \marg{\meta{width}}\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} - -A more general form of \cmdname{twocolumninarea} making -\meta{n} frames instead of two. -\end{itemize} +\end{definition} +This is a more general form of \cmdname{twocolumninarea} making +\meta{n} \glspl*{flow} instead of two.\htmlnav \section{Column Styles with an Additional Frame} -As well as the column style of \glspl{flow} defined +As well as the column-style \glspl{flow} defined above, it is also possible to define -\meta{n} columns with an additional frame spanning either +\meta{n} columns with an additional \gls{frame} spanning either above or below them. There will be a vertical gap of -approximately\footnote{It may not be exact, as the \glspl{flow} +approximately\footnote{It may not be exact, as the \glspl*{flow} are adjusted so that their height is an integer multiple of \cmdname{baselineskip}, which may increase the gap.} \cmdname{vcolumnsep} between the columns and the extra frame. In each of the following definitions, the argument \meta{pages} is the \gls{pglist} for which -the \glspl{frame} are defined, \meta{n} is the number of +the \glspl*{frame} are defined, \meta{n} is the number of columns required, \meta{type} is the type of frame to go above or below the columns (this may be one of: \texttt{flow}, \texttt{static} or \texttt{dynamic}). The area in which the -new frames should fill is defined by \meta{width}, \meta{height} -(the width and height of the area) and \meta{x}, \meta{y} +new frames should fill is defined by \meta{width}, \meta{height} +(the width and height of the area) and \meta{x}, \meta{y} (the position of the bottom left hand corner of the area relative to the bottom left hand corner of the \gls{typeblock}.) The height of the additional frame at the top or bottom of the columns is given by \meta{H}. -\begin{itemize} -\item \cmdname{onecolumntopinarea}\oarg{\meta{pages}}% +\begin{definition} +\cmdname{onecolumntopinarea}\oarg{\meta{pages}}% \marg{\meta{type}}\marg{\meta{H}}\marg{\meta{width}}% \marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} - -One \gls{flow} with a \meta{type} frame above it, filling +\end{definition} +This creates one \gls*{flow} with a \meta{type} frame above it, filling the area specified. -\item \cmdname{twocolumntopinarea}\oarg{\meta{pages}}% +\begin{definition} +\cmdname{twocolumntopinarea}\oarg{\meta{pages}}% \marg{\meta{type}}\marg{\meta{H}}\marg{\meta{width}}% \marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This creates two column-style \glspl*{flow} with a \meta{type} frame +above them, filling the area specified. -Two column style \glspl{flow} with a \meta{type} frame above -them, filling the area specified. - -\item \cmdname{Ncolumntopinarea}\oarg{\meta{pages}}\marg{\meta{type}}% +\begin{definition} +\cmdname{Ncolumntopinarea}\oarg{\meta{pages}}\marg{\meta{type}}% \marg{\meta{n}}\marg{\meta{H}}\marg{\meta{width}}\marg{\meta{height}}% \marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This creates \meta{n} column-style \glspl*{flow} with a \meta{type} +frame above them, filling the area specified. -\meta{n} column style \glspl{flow} with a \meta{type} frame -above them, filling the area specified. - -\item \cmdname{onecolumnbottominarea}\oarg{\meta{pages}}% +\begin{definition} +\cmdname{onecolumnbottominarea}\oarg{\meta{pages}}% \marg{\meta{type}}\marg{\meta{H}}\marg{\meta{width}}% \marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This creates one \gls*{flow} with a \meta{type} frame underneath it, +filling the area specified. -One \gls{flow} with a \meta{type} frame underneath it, filling -the area specified. - -\item \cmdname{twocolumnbottominarea}\oarg{\meta{pages}}% +\begin{definition} +\cmdname{twocolumnbottominarea}\oarg{\meta{pages}}% \marg{\meta{type}}\marg{\meta{H}}\marg{\meta{width}}% \marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This creates two column-style \glspl*{flow} with a \meta{type} frame +below them, filling the area specified. -Two column style \glspl{flow} with a \meta{type} frame below -them, filling the area specified. - -\item \cmdname{Ncolumnbottominarea}\oarg{\meta{pages}}% +\begin{definition} +\cmdname{Ncolumnbottominarea}\oarg{\meta{pages}}% \marg{\meta{type}}\marg{\meta{n}}\marg{\meta{H}}% \marg{\meta{width}}\marg{\meta{height}}\marg{\meta{x}}% \marg{\meta{y}} +\end{definition} +This creates \meta{n} column-style \glspl*{flow} with a \meta{type} +frame below them, filling the area specified. -\meta{n} column style \glspl{flow} with a \meta{type} frame -below them, filling the area specified. +The following commands are special cases of the above: -\end{itemize} +\begin{definition} +\cmdname{onecolumnStopinarea}\oarg{\meta{pages}}% +\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{onecolumntopinarea}\oarg{\meta{pages}}% +\marg{static}\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} -The following commands are special cases of the above: +\begin{definition} +\cmdname{onecolumnDtopinarea}\oarg{\meta{pages}}% +\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{onecolumntopinarea}\oarg{\meta{pages}}% +\marg{dynamic}\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} -\begin{itemize} -\item \cmdname{onecolumntop}\oarg{\meta{pages}}\marg{\meta{type}}% +\begin{definition} +\cmdname{onecolumntop}\oarg{\meta{pages}}\marg{\meta{type}}% \marg{\meta{H}} - +\end{definition} As \cmdname{onecolumntopinarea} where the area is the entire -\gls{typeblock}. +\gls*{typeblock}. + +\begin{definition} +\cmdname{onecolumnStop}\oarg{\meta{pages}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{onecolumntop}\oarg{\meta{pages}}\marg{static}\marg{\meta{H}} + +\begin{definition} +\cmdname{onecolumnDtop}\oarg{\meta{pages}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{onecolumntop}\oarg{\meta{pages}}\marg{dynamic}\marg{\meta{H}} + +\begin{definition} +\cmdname{twocolumnStopinarea}\oarg{\meta{pages}}% +\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{twocolumntopinarea}\oarg{\meta{pages}}% +\marg{static}\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} -\item \cmdname{twocolumntop}\oarg{\meta{pages}}% -\marg{\meta{type}}\marg{\meta{H}} +\begin{definition} +\cmdname{twocolumnDtopinarea}\oarg{\meta{pages}}% +\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{twocolumntopinarea}\oarg{\meta{pages}}% +\marg{dynamic}\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\begin{definition} +\cmdname{twocolumntop}\oarg{\meta{pages}}% +\marg{\meta{type}}\marg{\meta{H}} +\end{definition} As \cmdname{twocolumntopinarea} where the area is the entire -\gls{typeblock}. +\gls*{typeblock}. + +\begin{definition} +\cmdname{twocolumnStop}\oarg{\meta{pages}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{twocolumntop}\oarg{\meta{pages}}\marg{static}\marg{\meta{H}} + +\begin{definition} +\cmdname{twocolumnDtop}\oarg{\meta{pages}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{twocolumntop}\oarg{\meta{pages}}\marg{dynamic}\marg{\meta{H}} + +\begin{definition} +\cmdname{NcolumnStopinarea}\oarg{\meta{pages}}% +\marg{\meta{n}}\marg{\meta{H}}\marg{\meta{width}}\marg{\meta{height}}% +\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{Ncolumntopinarea}\oarg{\meta{pages}}\marg{static}% +\marg{\meta{n}}\marg{\meta{H}}\marg{\meta{width}}\marg{\meta{height}}% +\marg{\meta{x}}\marg{\meta{y}} -\item \cmdname{Ncolumntop}\oarg{\meta{pages}}% -\marg{\meta{type}}\marg{\meta{n}}\marg{\meta{H}} +\begin{definition} +\cmdname{NcolumnDtopinarea}\oarg{\meta{pages}}% +\marg{\meta{n}}\marg{\meta{H}}\marg{\meta{width}}\marg{\meta{height}}% +\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{Ncolumntopinarea}\oarg{\meta{pages}}\marg{dynamic}% +\marg{\meta{n}}\marg{\meta{H}}\marg{\meta{width}}\marg{\meta{height}}% +\marg{\meta{x}}\marg{\meta{y}} +\begin{definition} +\cmdname{Ncolumntop}\oarg{\meta{pages}}% +\marg{\meta{type}}\marg{\meta{n}}\marg{\meta{H}} +\end{definition} As \cmdname{Ncolumntopinarea} where the area is the entire -\gls{typeblock}. +\gls*{typeblock}. + +\begin{definition} +\cmdname{NcolumnStop}\oarg{\meta{pages}}\marg{\meta{n}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{Ncolumntop}\oarg{\meta{pages}}\marg{static}\marg{\meta{n}}\marg{\meta{H}} + +\begin{definition} +\cmdname{NcolumnDtop}\oarg{\meta{pages}}\marg{\meta{n}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{Ncolumntop}\oarg{\meta{pages}}\marg{dynamic}\marg{\meta{n}}\marg{\meta{H}} + +\begin{definition} +\cmdname{onecolumnSbottominarea}\oarg{\meta{pages}}% +\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{onecolumnbottominarea}\oarg{\meta{pages}}% +\marg{static}\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} -\item \cmdname{onecolumnbottom}\oarg{\meta{pages}}% -\marg{\meta{type}}\marg{\meta{H}} +\begin{definition} +\cmdname{onecolumnDbottominarea}\oarg{\meta{pages}}% +\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{onecolumnbottominarea}\oarg{\meta{pages}}% +\marg{dynamic}\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\begin{definition} +\cmdname{onecolumnbottom}\oarg{\meta{pages}}% +\marg{\meta{type}}\marg{\meta{H}} +\end{definition} As \cmdname{onecolumnbottominarea} where the area is the entire -\gls{typeblock}. +\gls*{typeblock}. + +\begin{definition} +\cmdname{onecolumnSbottom}\oarg{\meta{pages}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{onecolumnbottom}\oarg{\meta{pages}}\marg{static}\marg{\meta{H}} + +\begin{definition} +\cmdname{onecolumnDbottom}\oarg{\meta{pages}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{onecolumnbottom}\oarg{\meta{pages}}\marg{dynamic}\marg{\meta{H}} + +\begin{definition} +\cmdname{twocolumnSbottominarea}\oarg{\meta{pages}}% +\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{twocolumnbottominarea}\oarg{\meta{pages}}% +\marg{static}\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} -\item \cmdname{twocolumnbottom}\oarg{\meta{pages}}% -\marg{\meta{type}}\marg{\meta{H}} +\begin{definition} +\cmdname{twocolumnDbottominarea}\oarg{\meta{pages}}% +\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{twocolumnbottominarea}\oarg{\meta{pages}}% +\marg{dynamic}\marg{\meta{H}}\marg{\meta{width}}% +\marg{\meta{height}}\marg{\meta{x}}\marg{\meta{y}} +\begin{definition} +\cmdname{twocolumnbottom}\oarg{\meta{pages}}% +\marg{\meta{type}}\marg{\meta{H}} +\end{definition} As \cmdname{twocolumnbottominarea} where the area is the entire -\gls{typeblock}. +\gls*{typeblock}. + +\begin{definition} +\cmdname{twocolumnSbottom}\oarg{\meta{pages}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{twocolumnbottom}\oarg{\meta{pages}}\marg{static}\marg{\meta{H}} + +\begin{definition} +\cmdname{twocolumnDbottom}\oarg{\meta{pages}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{twocolumnbottom}\oarg{\meta{pages}}\marg{dynamic}\marg{\meta{H}} + +\begin{definition} +\cmdname{NcolumnSbottominarea}\oarg{\meta{pages}}% +\marg{\meta{n}}\marg{\meta{H}}\marg{\meta{width}}\marg{\meta{height}}% +\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{Ncolumnbottominarea}\oarg{\meta{pages}}\marg{static}% +\marg{\meta{n}}\marg{\meta{H}}\marg{\meta{width}}\marg{\meta{height}}% +\marg{\meta{x}}\marg{\meta{y}} -\item \cmdname{Ncolumnbottom}\oarg{\meta{pages}}% -\marg{\meta{type}}\marg{\meta{n}}\marg{\meta{H}} +\begin{definition} +\cmdname{NcolumnDbottominarea}\oarg{\meta{pages}}% +\marg{\meta{n}}\marg{\meta{H}}\marg{\meta{width}}\marg{\meta{height}}% +\marg{\meta{x}}\marg{\meta{y}} +\end{definition} +This is equivalent to:\newline +\cmdname{Ncolumnbottominarea}\oarg{\meta{pages}}\marg{dynamic}% +\marg{\meta{n}}\marg{\meta{H}}\marg{\meta{width}}\marg{\meta{height}}% +\marg{\meta{x}}\marg{\meta{y}} +\begin{definition} +\cmdname{Ncolumnbottom}\oarg{\meta{pages}}% +\marg{\meta{type}}\marg{\meta{n}}\marg{\meta{H}} +\end{definition} As \cmdname{Ncolumnbottominarea} where the area is the entire -\gls{typeblock}. +\gls*{typeblock}. -\end{itemize} +\begin{definition} +\cmdname{NcolumnSbottom}\oarg{\meta{pages}}\marg{\meta{n}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{Ncolumnbottom}\oarg{\meta{pages}}\marg{static}\marg{\meta{n}}\marg{\meta{H}} + +\begin{definition} +\cmdname{NcolumnDbottom}\oarg{\meta{pages}}\marg{\meta{n}}\marg{\meta{H}} +\end{definition} +This is equivalent to: +\cmdname{Ncolumnbottom}\oarg{\meta{pages}}\marg{dynamic}\marg{\meta{n}}\marg{\meta{H}} +\htmlnav \section{Backdrop Effects} \Glspl{static} can be used to produce a backdrop. There are a number of commands which create -\glspl{static} that can be used as a backdrop. In the +\glspl*{static} that can be used as a backdrop. In the following definitions, \meta{pages} is the \gls{pglist} for -which those \glspl{static} are defined (all is the default). +which those \glspl*{static} are defined (\texttt{all} is the default). For the vertical strips: \meta{xoffset} is the amount by which the frames should be shifted horizontally (0pt by default), \meta{W1} is the width of the first frame, with colour specified by \meta{C1} and \gls{idl}\ \meta{L1}, and so on up to \meta{Wn} the width of the \meta{n}th frame -with colour specified by \meta{Cn} and \gls{idl}\ \meta{Ln}. +with colour specified by \meta{Cn} and \gls*{idl}\ \meta{Ln}. For the vertical strips: \meta{yoffset} is the amount by which the frames should be shifted vertically (0pt by default), \meta{H1} is the height of the first frame, -with colour specified by \meta{C1} and \gls{idl}\ \meta{L1}, +with colour specified by \meta{C1} and \gls*{idl}\ \meta{L1}, and so on up to \meta{Hn} the height of the \meta{n}th frame -with colour specified by \meta{Cn} and \gls{idl}\ \meta{Ln}. +with colour specified by \meta{Cn} and \gls*{idl}\ \meta{Ln}. \textbf{NOTE:} unlike the earlier commands, these commands are all relative to the actual page, not the \gls{typeblock}. -So an $x$ offset of 0pt indicates the first vertical frame -is flush with the left hand edge of the page, and a $y$ offset -of 0pt indicates the first horizontal frame is flush with -the bottom edge of the page. This is because backdrops tend -to span the entire page, not just the \gls{typeblock}. +So an \latexhtml{$x$}{x} offset of 0pt indicates the first vertical +frame is flush with the left hand edge of the page, and a +\latexhtml{$y$}{y} offset of 0pt indicates the first horizontal frame +is flush with the bottom edge of the page. This is because backdrops +tend to span the entire page, not just the \gls*{typeblock}. The colour specification must be completely enclosed in braces, -e.g.\ \verb"{[rgb]{1,0,1}}" not \verb"[rgb]{1,0,1}". +for example \verb"{[rgb]{1,0,1}}" not \verb"[rgb]{1,0,1}".\htmlnav \subsection{Vertical stripe effects} -\begin{itemize} -\item \cmdname{vtwotone}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% +\begin{definition} +\cmdname{vtwotone}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% \marg{\meta{W1}}\marg{\meta{C1}}\marg{\meta{L1}}% \marg{\meta{W2}}\marg{\meta{C2}}\marg{\meta{L2}} - -Create a two tone vertical strip effect. (This command was +\end{definition} +Defines two \glspl{static} to create a two tone vertical strip effect. +(This command was used to create the coloured background on the title page -of this document.) +of \html{the PDF version of }this document.) -\item \cmdname{vNtone}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% +\begin{definition} +\cmdname{vNtone}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% \marg{\meta{n}}\marg{\meta{W1}}\marg{\meta{C1}}\marg{\meta{L1}}% \ldots\marg{\meta{Wn}}\marg{\meta{Cn}}\marg{\meta{Ln}} - -Similar to \cmdname{vtwotone} but with \meta{n} \glspl{static} +\end{definition} +This is similar to \cmdname{vtwotone} but with \meta{n} \glspl*{static} instead of two. -\item \cmdname{vtwotonebottom}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% +\begin{definition} +\cmdname{vtwotonebottom}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% \marg{\meta{H}}\marg{\meta{W1}}\marg{\meta{C1}}\marg{\meta{L1}}% \marg{\meta{W2}}\marg{\meta{C2}}\marg{\meta{L2}} - -Similar to \cmdname{vtwotone} but the \glspl{static} are only +\end{definition} +This is similar to \cmdname{vtwotone} but the \glspl*{static} are only \meta{H} high, instead of the entire height of the page. The frames are aligned along the bottom edge of the page. -\item \cmdname{vtwotonetop}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% +\begin{definition} +\cmdname{vtwotonetop}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% \marg{\meta{H}}\marg{\meta{W1}}\marg{\meta{C1}}\marg{\meta{L1}}% -\marg{\meta{W2}}\marg{\meta{C2}}\marg{\meta{L2}} - -Similar to \cmdname{vtwotone} but the \glspl{static} are only +\marg{\meta{W2}}\marg{\meta{C2}}\newline\marg{\meta{L2}} +\end{definition} +This is similar to \cmdname{vtwotone} but the \glspl*{static} are only \meta{H} high, instead of the entire height of the page. The frames are aligned along the top edge of the page. (This command was used to create the border effect along -the top of every page in this document. Two \cmdname{vtwotonetop} +the top of every page in \html{the PDF version of }this document. +Two \cmdname{vtwotonetop} commands were used, one for the even pages, and the other for the odd pages.) -\item \cmdname{vNtonebottom}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% +\begin{definition} +\cmdname{vNtonebottom}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% \marg{\meta{H}}\marg{\meta{n}}\marg{\meta{W1}}\marg{\meta{C1}}% \marg{\meta{L1}}% -\ldots\linebreak +\ldots \marg{\meta{Wn}}\marg{\meta{Cn}}\marg{\meta{Ln}} +\end{definition} +This is a general version of \cmdname{vtwotonebottom} for +\meta{n} frames instead of two. -More general version of \cmdname{vtwotonebottom} but for -\meta{n} frames. - -\item \cmdname{vNtonetop}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% +\begin{definition} +\cmdname{vNtonetop}\oarg{\meta{pages}}\oarg{\meta{xoffset}}% \marg{\meta{H}}\marg{\meta{n}}\marg{\meta{W1}}\marg{\meta{C1}}% \marg{\meta{L1}}% -\ldots\linebreak +\ldots \marg{\meta{Wn}}\marg{\meta{Cn}}\marg{\meta{Ln}} - -More general version of \cmdname{vtwotonetop} but for -\meta{n} frames. - -\end{itemize} +\end{definition} +This is a general version of \cmdname{vtwotonetop} for +\meta{n} frames instead of two.\htmlnav \subsection{Horizontal stripe effect} -\begin{itemize} -\item \cmdname{htwotone}\oarg{\meta{pages}}\oarg{\meta{yoffset}}% +\begin{definition} +\cmdname{htwotone}\oarg{\meta{pages}}\oarg{\meta{yoffset}}% \marg{\meta{H1}}\marg{\meta{C1}}\marg{\meta{L1}}% \marg{\meta{H2}}\marg{\meta{C2}}\marg{\meta{L2}} +\end{definition} +This defines two \glspl{static} to create a two tone horizontal strip +effect. -Create a two tone horizontal strip effect. - -\item \cmdname{hNtone}\oarg{\meta{pages}}\oarg{\meta{yoffset}}% +\begin{definition} +\cmdname{hNtone}\oarg{\meta{pages}}\oarg{\meta{yoffset}}% \marg{\meta{n}}\marg{\meta{H1}}\marg{\meta{C1}}\marg{\meta{L1}}% -\ldots\linebreak +\ldots \marg{\meta{Hn}}\marg{\meta{Cn}}\marg{\meta{Ln}} - -Similar to \cmdname{htwotone} but with \meta{n} \glspl{static} +\end{definition} +This is similar to \cmdname{htwotone} but with \meta{n} \glspl*{static} instead of two. -\item \cmdname{htwotoneleft}\oarg{\meta{pages}}\oarg{\meta{yoffset}}% +\begin{definition} +\cmdname{htwotoneleft}\oarg{\meta{pages}}\oarg{\meta{yoffset}}% \marg{\meta{W}}\marg{\meta{H1}}\marg{\meta{C1}}\marg{\meta{L1}}% \marg{\meta{H2}}\marg{\meta{C2}}\marg{\meta{L2}} - -Similar to \cmdname{htwotone} but the \glspl{static} are only +\end{definition} +This is similar to \cmdname{htwotone} but the \glspl*{static} are only \meta{W} wide, instead of the entire width of the page. The frames are aligned along the left edge of the page. -\item \cmdname{htwotoneright}\oarg{\meta{pages}}% +\begin{definition} +\cmdname{htwotoneright}\oarg{\meta{pages}}% \oarg{\meta{yoffset}}\marg{\meta{W}}\marg{\meta{H1}}% \marg{\meta{C1}}\marg{\meta{L1}}% \marg{\meta{H2}}\marg{\meta{C2}}\marg{\meta{L2}} - -Similar to \cmdname{htwotone} but the \glspl{static} are only +\end{definition} +This is similar to \cmdname{htwotone} but the \glspl*{static} are only \meta{W} wide, instead of the entire width of the page. The frames are aligned along the right edge of the page. -\item \cmdname{hNtoneleft}\oarg{\meta{pages}}% +\begin{definition} +\cmdname{hNtoneleft}\oarg{\meta{pages}}% \oarg{\meta{yoffset}}\marg{\meta{W}}\marg{\meta{n}}% \marg{\meta{H1}}\marg{\meta{C1}}\marg{\meta{L1}}% -\ldots\linebreak +\ldots \marg{\meta{Hn}}\marg{\meta{Cn}}\marg{\meta{Ln}} +\end{definition} +This is a general version of \cmdname{htwotoneleft} for +\meta{n} frames instead of two. -More general version of \cmdname{htwotoneleft} but for -\meta{n} frames. - -\item \cmdname{hNtoneright}\oarg{\meta{pages}}% +\begin{definition} +\cmdname{hNtoneright}\oarg{\meta{pages}}% \oarg{\meta{yoffset}}\marg{\meta{W}}\marg{\meta{n}}% \marg{\meta{H1}}\marg{\meta{C1}}\marg{\meta{L1}}% -\ldots\linebreak +\ldots \marg{\meta{Hn}}\marg{\meta{Cn}}\marg{\meta{Ln}} - -More general version of \cmdname{htwotoneright} but for -\meta{n} frames. - -\end{itemize} +\end{definition} +This is a general version of \cmdname{htwotoneright} for +\meta{n} frames instead of two.\htmlnav \subsection{Background Frame} To make a single \gls{static} covering the entire page, use: -\cmdname{makebackgroundframe}\oarg{\meta{pages}}\oarg{\meta{IDL}}. -Note that this \gls{static} should be created before any other -\gls{static} as it will obscure all other \glspl{static} created before -it if it is given a background colour. +\begin{definition} +\cmdname{makebackgroundframe}\oarg{\meta{pages}}\oarg{\meta{IDL}} +\end{definition} +Note that this \gls*{frame} should be created before any other +\gls*{static} as it will obscure all other \glspl*{static} created +before it if it is given a background colour.\htmlnav \subsection{Vertical and Horizontal Rules} +\label{sec:insertrule} You can create vertical or horizontal rules between two \glspl{frame} using the commands: -\begin{itemize} - -\item \cmdname{insertvrule}\oarg{\meta{y top}}"% +\begin{definition} +\cmdname{insertvrule}\oarg{\meta{y top}}% \oarg{\meta{y bottom}}\marg{\meta{T1}}\marg{\meta{IDN1}}% \marg{\meta{T2}}\marg{\meta{IDN2}} - -This creates a new \gls{static} which fits between \meta{T1} -\gls{frame} with \gls{idn}\ \meta{IDN1} and \meta{T2} \gls{frame} -with \gls{idn}\ \meta{IDN2}, and places a vertical rule in it +\end{definition} +This creates a new \gls{static} which fits between \meta{T1} +\gls*{frame} with \gls{idn}\ \meta{IDN1} and \meta{T2} \gls*{frame} +with \gls*{idn}\ \meta{IDN2}, and places a vertical rule in it extending from the highest point of the highest frame to the lowest point of the lowest frame. The first optional argument \meta{y top} (default 0pt) extends the rule by that @@ -1469,17 +2349,29 @@ much above the highest point, and the second optional argument \meta{y bottom} (default 0pt) extends the rule by that much below the lowest point. If either of the optional arguments are negative, the rule will be shortened instead of extended. -The width of the rule is given by \cmdname{ffcolumnseprule}. +The width of the rule is given by +\begin{definition} +\cmdname{ffcolumnseprule} +\end{definition} \textbf{Note} that this has changed as from version 1.09: versions prior to 1.09 used \cmdname{columnseprule}. -\item \cmdname{inserthrule}\oarg{\meta{x left}}% +The vertical rule drawn by \cmdname{insertvrule} is created using +the command: +\begin{definition} +\cmdname{ffvrule}\marg{offset}\marg{width}\marg{height} +\end{definition} +This can be redefined if a more ornate rule is required +(see below). + +\begin{definition} +\cmdname{inserthrule}\oarg{\meta{x left}}% \oarg{\meta{x right}}\marg{\meta{T1}}\marg{\meta{IDN1}}% \marg{\meta{T2}}\marg{\meta{IDN2}} - -This creates a new \gls{static} which fits between \meta{T1} -\gls{frame} with \gls{idn}\ \meta{IDN1} and \meta{T2} \gls{frame} -with \gls{idn}\ \meta{IDN2}, and places a horizontal rule in it +\end{definition} +This creates a new \gls{static} which fits between \meta{T1} +\gls*{frame} with \gls{idn}\ \meta{IDN1} and \meta{T2} \gls*{frame} +with \gls*{idn}\ \meta{IDN2}, and places a horizontal rule in it extending from the leftmost point of the left frame to the rightmost point of the right frame. The first optional argument \meta{x left} (default 0pt) extends the rule by that @@ -1487,23 +2379,81 @@ much before the leftmost point, and the second optional argument \meta{x right} (default 0pt) extends the rule by that much beyond the rightmost point. If either of the optional arguments are negative, the rule will be shortened instead of extended. -The height of the rule is given by \cmdname{ffcolumnseprule}. +The height of the rule is given by +\begin{definition} +\cmdname{ffcolumnseprule} +\end{definition} -\end{itemize} +The horizontal rule drawn by \cmdname{inserthrule} is created using +the command: +\begin{definition} +\cmdname{ffhrule}\marg{offset}\marg{width}\marg{height} +\end{definition} +This can be redefined if a more ornate rule is required (see below). + +The default value for \cmdname{ffcolumnseprule} is 2pt. Both +\cmdname{insertvrule} and \cmdname{inserthrule} have starred versions +which allow you to identify the \gls*{frame} by \gls{idl}\ instead of +\gls*{idn}. The \gls*{frame} types, \meta{T1} and \meta{T2} can be one +of the following keywords: \texttt{flow}, \texttt{static} or +\texttt{dynamic}. + +The command +\begin{definition} +\cmdname{ffruledeclarations} +\end{definition} +can be redefined to set declarations that affect how the rule is drawn. +The most likely use of this command is to set the rule colour. +For example: +\begin{verbatim} +\twocolumnStop{2in} -The default value for \cmdname{ffcolumnseprule} is 2pt. -Both of the above commands have starred versions which allow -you to identify the \gls{frame} by \gls{idl}\ instead of \gls{idn}. -The \gls{frame} types, \meta{T1} and \meta{T2} can be one of -the following keywords: \texttt{flow}, \texttt{static} -or \texttt{dynamic}. +\renewcommand{\ffruledeclarations}{\color{red}} +\insertvrule{flow}{1}{flow}{2} +\renewcommand{\ffruledeclarations}{\color{blue}} +\inserthrule{static}{1}{flow}{1} +\end{verbatim} +This will create a layout with two columns (\glspl{flow}~1 and~2) +with a \gls{static} above. A red vertical rule is placed in a +\gls*{static} between \glspl*{flow}~1 and~2, and a blue horizontal +rule is placed between the \gls*{static} and the first +\gls*{flow}. (However the horizontal rule will span both +\glspl*{flow} since that is the width of the \gls*{static}.) + +In the following example, the rules have been redefined +to use a zigzag pattern (which is obtained using the \sty{tikz} +package): +\begin{verbatim} +\usepackage{flowfram} +\usepackage{tikz} +\usetikzlibrary{snakes} + +\twocolumnStop + +\renewcommand{\ffvrule}[3]{% +\hfill +\tikz{\draw[snake=zigzag,line width=#2,yshift=-#1] (0,0) -- (0pt,#3);}% +\hfill\mbox{}} + +\insertvrule{flow}{1}{flow}{2} + +\renewcommand{\ffhrule}[3]{% +\tikz{\draw[snake=zigzag,line width=#3,xshift=-#1] (0,0) -- (#2,0pt);}} + +\inserthrule{static}{1}{flow}{1} +\end{verbatim} +\htmlnav \chapter{Thumbtabs and Minitocs} +\chapdesc{This chapter describes how to create thumbtabs and minitocs, +such as those used in \html{the PDF version of }this document.} \section{Thumbtabs} -On the right hand side of this page, there is a blue rectangle +On the right hand side of \latexhtml{this page}{the odd pages +and on the left hand side of the even pages in the +PDF version of this document}, there is a blue rectangle with the chapter number in it. This is a thumbtab, and it gives you a rough idea whereabouts in the document you are when you quickly flick through the pages. Each thumbtab is in fact @@ -1511,67 +2461,93 @@ a dynamic frame, and you can control whether to make the number and/or title appear in the thumbtab by using one or more of the package options: \pkgopt{ttbtitle} (show title---default), \pkgopt{ttbnotitle} (don't show the title), -\pkgopt{ttbnum} (show the number) and \pkgopt{ttbnonum} +\pkgopt{ttbnum} (show the number) and \pkgopt{ttbnonum} (don't show the number---default). If you want thumbtabs in your document, you need to use the command -\begin{center} +\begin{definition} \cmdname{makethumbtabs}\oarg{\meta{y offset}}\marg{\meta{height}}% \oarg{\meta{section type}} -\end{center} +\end{definition} in the document preamble. By default, the topmost thumbtab is level with the top of the \gls{typeblock}, but can be shifted vertically using the first optional argument \meta{y offset}. Each thumbtab will be \meta{height} high, and will correspond to the -sectioning type \meta{section type}. If \meta{section type} -is omitted, chapters will be used if the \cmdname{chapter} +sectioning type \meta{section type}. If \meta{section type} +is omitted, chapters will be used if the \cmdname{chapter} command is defined, otherwise sections will be used. The width of the thumbtabs is given by the length -\cmdname{thumbtabwidth}, which is 1cm by default. - -The command \cmdname{thumbtabindex} will display the -thumbtab index (all thumbtabs) on the current page. You -then need to use the command \cmdname{enablethumbtabs} -to start the individual thumbtabs and \cmdname{disablethumbtabs} +\begin{definition} +\cmdname{thumbtabwidth} +\end{definition} +which is 1cm by default. +The command +\begin{definition} +\cmdname{thumbtabindex} +\end{definition} +will display the thumbtab index (all thumbtabs) on the current page. +You then need to use +\begin{definition} +\cmdname{enablethumbtabs} +\end{definition} +to start the individual thumbtabs and +\begin{definition} +\cmdname{disablethumbtabs} +\end{definition} to make them go away. - You can align the table of contents with the thumbtabs\footnote{but only do this if there is enough room on the page!} using -the command \cmdname{tocandthumbtabindex} instead of +the command +\begin{definition} +\cmdname{tocandthumbtabindex} +\end{definition} +instead of the commands \cmdname{tableofcontents} and -\cmdname{thumbtabindex}. If you are using the \sty{hyperref} +\cmdname{thumbtabindex}. If you are using the \sty{hyperref} package, the text on the thumbtab index will be a hyperlink -to the corresponding part of the document. Note that you may +to the corresponding part of the document. Note that when using +\cmdname{tocandthumbtabindex} you may need to shift the thumbtabs vertically up or down to make sure that they align correctly with the table of contents. The format of the text on the thumbtabs is given by the command -\cmdname{thumbtabindexformat} for the thumbtab index entries, -and \cmdname{thumbtabformat} for the individual thumbtabs. By +\begin{definition} +\cmdname{thumbtabindexformat} +\end{definition} +for the thumbtab index entries, and +\begin{definition} +\cmdname{thumbtabformat} +\end{definition} +for the individual thumbtabs. By default the text on the thumbtabs will be rotated, but as rotating is not implemented by some previewers, the package option \pkgopt{norotate} is provided, which will stack the letters vertically. This does not look as good as the rotated text. -In addition, some previewers do not put the hyperlink in the +Note also that some previewers do not put the hyperlink in the correct place when the link has been rotated, so this may also cause a problem. The thumbtab attributes can be changed using -\cmdname{setthumbtab}\marg{\meta{n}}\marg{\meta{key value -list}}, where \meta{n} is the thumbtab number starting -from 1 (for the top thumbtab) to \verb"\value{maxthumbtabs}" +\begin{definition} +\cmdname{setthumbtab}\marg{\meta{n}}\marg{\meta{key value list}} +\end{definition} +where \meta{n} is the thumbtab number starting +from 1 (for the top thumbtab) to the value given by the counter +\ctr{maxthumbtabs} (for the bottom thumbtab). Note that these numbers are not -related to the \gls{frame} \glspl{idn}. +related to the associated \gls*{frame} \gls{idn}. To just change the settings for the thumbtab index, use -\cmdname{setthumbtabindex}\marg{\meta{n}}\marg{\meta{key value list}}. +\begin{definition} +\cmdname{setthumbtabindex}\marg{\meta{n}}\marg{\meta{key value list}} +\end{definition} The \meta{key value list} for both these commands is the same as that for \cmdname{setdynamicframe}. -By default, the thumbtabs have a grey background. In this -document, I have used: +By default, the thumbtabs have a grey background. In \html{the PDF +version of }this document, I \latex{have }used: \begin{verbatim} \setthumbtab{1}{backcolor=[rgb]{0.15,0.15,1}} \setthumbtab{2}{backcolor=[rgb]{0.2,0.2,1}} @@ -1580,56 +2556,75 @@ document, I have used: \setthumbtab{5}{backcolor=[rgb]{0.35,0.35,1}} \setthumbtab{6}{backcolor=[rgb]{0.4,0.4,1}} \setthumbtab{7}{backcolor=[rgb]{0.45,0.45,1}} +\setthumbtab{8}{backcolor=[rgb]{0.5,0.5,1}} \end{verbatim} to change the thumbtab background colour to shades of blue. -I have also changed the style of the thumbtab text using: +I \latex{have }also changed the style of the thumbtab text using: \begin{verbatim} -\newcommand{\thumbtabstyle}[1]{\textsc{\sffamily #1}} +\newcommand{\thumbtabstyle}[1]{{\hypersetup{linkcolor=white}% +\textbf{\large\sffamily #1}}} \setthumbtab{all}{style=thumbtabstyle,textcolor=white} \end{verbatim} - -Given that I have specified white text, why does the thumbtab -index have black text? This is because the text on the thumbtab -index is a hyperlink, and I have used \verb"linkcolor=black" -with the hyperref package. +Note that the style uses \cmdname{hypersetup}\footnote{defined by the +\sty{hyperref} package} to change the colour of the hyperlink text, +since the hyperlink overrides the text colour.\htmlnav \section{Minitocs} -In this document, after each chapter heading, there is a -mini table of contents for that chapter. To enable minitocs, +In \html{the PDF version of }this document, after each chapter heading, +there is a mini table of contents for that chapter. To enable minitocs, use the command -\cmdname{enableminitoc}\oarg{\meta{section type}}. -The default \meta{section type} is the same as the thumbtabs. +\begin{definition} +\cmdname{enableminitoc}\oarg{\meta{section type}} +\end{definition} +The default \meta{section type} is the same as that used by +the thumbtabs. If you want the minitocs to appear in a \gls{dynamic}, you -can use \cmdname{appenddfminitoc}\marg{\meta{IDN}} -where \meta{IDN} is the \gls{idn}\ of the appropriate \gls{dynamic}. +can use +\begin{definition} +\cmdname{appenddfminitoc}\marg{\meta{IDN}} +\end{definition} +where \meta{IDN} is the \gls{idn}\ of the appropriate \gls*{dynamic}. There is also a starred version available if you want to -use the \gls{idl}\ instead of the \gls{idn}. +use the \gls{idl}\ instead of the \gls*{idn}. -For example, in this document I have used the command: +For example, in \html{the PDF version of }this document I +\latex{have }used the command: \begin{verbatim} \appenddfminitoc*{chaphead} \end{verbatim} -in the preamble, which has appended the minitocs to the -\gls{dynamic} with \gls{idl}\ \texttt{chaphead}. +in the preamble, which \latex{has }appended the minitocs to the +\gls*{dynamic} with \gls*{idl}\ \texttt{chaphead}. The style of the minitoc text is given by the command -\cmdname{minitocstyle} which takes one argument, the contents +\begin{definition} +\cmdname{minitocstyle}\marg{\meta{contents}} +\end{definition} +where the argument is the contents of the minitoc. This command may be redefined if you want to change the minitoc style. The gap before the minitoc -is given by the length \cmdname{beforeminitocskip} and -the gap after the minitoc is given by the length -\cmdname{afterminitocskip}. These lengths may be changed -using \cmdname{setlength}. - -\chapter{Global Values} - +is given by the length +\begin{definition} +\cmdname{beforeminitocskip} +\end{definition} +and the gap after the minitoc is given by the length +\begin{definition} +\cmdname{afterminitocskip} +\end{definition} +These lengths may be changed using \cmdname{setlength}.\htmlnav + +\chapter{Global Settings} +\chapdesc{This section describes style macros, lengths and counters used +by the \styni{flowfram} package.} + +\section{Macros} The following macros can be changed using \cmdname{renewcommand}: \begin{itemize} \item \cmdname{setffdraftcolor} + This sets the colour of the \gls{bbox} when it is displayed in draft mode. The default value is: \verb/\color[gray]{0.8}/. For example, if you want a darker grey, @@ -1638,8 +2633,9 @@ do: \renewcommand{\setffdraftcolor}{\color[gray]{0.3}} \end{verbatim} -\item -\cmdname{setffdrafttypeblockcolor} This sets the colour of +\item \cmdname{setffdrafttypeblockcolor} + +This sets the colour of the \gls{bbox} of the \gls{typeblock} when it is displayed in draft mode. The default value is: \verb/\color[gray]{0.9}/. For example, if you want a medium grey, do: @@ -1648,6 +2644,7 @@ For example, if you want a medium grey, do: \end{verbatim} \item \cmdname{fflabelfont} + This sets the font size for the \gls{bbox} markers in draft mode. The default value is: \verb/\small\sffamily/. For example, if you want a larger font, do: @@ -1655,48 +2652,149 @@ For example, if you want a larger font, do: \renewcommand{\fflabelfont}{\large\sffamily} \end{verbatim} +\item \cmdname{ffruledeclarations} + +This sets the declarations that affect the rules created using +\cmdname{insertvrule} and \cmdname{inserthrule}. The default +definition does nothing. +See \latexhtml{\autoref{sec:insertrule}}{\htmlref{Vertical and +Horizontal Rules}{sec:insertrule}} for further details. + +\item \cmdname{ffcontinuedtextfont}\marg{\meta{text}} + +This sets \meta{text} in the continuation font. The default definition +does \verb|\emph{\small |\meta{text}\verb|}|. See +\latexhtml{\autoref{sec:static}}{\htmlref{Static Frames}{sec:static}} +and \latexhtml{\autoref{sec:dynamic}}{\htmlref{Dynamic +Frames}{sec:dynamic}} for further details. + \end{itemize} +\htmlnav +\section{Lengths} The following are lengths, which can be changed using \cmdname{setlength}: \begin{itemize} \item \cmdname{fflabelsep} + This is the distance from the right hand side of the \gls{bbox} at which to place the \gls{bbox} marker. The default value is: \texttt{1pt} \item \cmdname{flowframesep} + This is the gap between the text of the \gls{frame} and its border, for the standard border types. \item \cmdname{flowframerule} -This is the width of the \gls{frame}'s border, if using -a border given by a \glslink{fcmd}{frame} -\glslink{fcmd}{making command} that uses \cmdname{fboxsep} + +This is the width of the \gls{frame}['s] border, if using +a border given by a \gls{fcmd} 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. +and the column frames when using \cmdname{Ncolumntop} 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 +when using \cmdname{Ncolumn} or \cmdname{Ncolumntop} etc + +\item \cmdname{ffcolumnseprule} + +This is the width of vertical rules created using +\cmdname{insertvrule} or the height of horizontal rules created +using \cmdname{inserthrule}. + +\item \cmdname{beforeminitocskip} + +This is the vertical distance before the minitoc. + +\item \cmdname{afterminitocskip} + +This is the vertical distance after the minitoc. \end{itemize} +\htmlnav + +\section{Counters} +\label{sec:counters} +The following are counters that can be accessed via +\cmdname{value}\marg{\meta{counter name}} or via +\verb|\the|\meta{counter name}. However the value of these counters +should not be modified. + +\begin{description} +\item[\ctr{maxflow}] The total number of \glspl{flow} that have +been defined so far. + +\item[\ctr{thisframe}] Stores the \gls{idn} of the current +\gls*{flow}. You can label and reference the \gls{idn} using +\begin{definition} +\cmdname{labelflowid}\marg{\meta{label}} +\end{definition} +This is analogous to the standard \cmdname{label} command, but will +always refer to the \gls*{idn} of the current \gls*{flow}. It can +then be referenced using \cmdname{ref}\marg{\meta{label}}. Note that +this will always refer to the current \gls*{flow} even when used +in the contents of a \staticordynamic. + +Don't use more than one instance of \cmdname{labelflowid} in a given +\gls*{flow} for a given page or you will get a \dq{multiply defined +references} warning. + +\item[\ctr{displayedframe}] Stores the index of the currently +displayed \gls{flow}. This will be the same as the \gls{idn} if all +\glspl*{flow} are displayed on the current page, but if some are +hidden, the values may be different. You can label this counter +using +\begin{definition} +\cmdname{labelflow}\marg{\meta{label}} +\end{definition} +and reference it elsewhere in the document using +\cmdname{ref}\marg{\meta{label}}. For example, if you are using +a column layout, you might want to do something like: +\begin{verbatim} +This text is about hippos\labelflow{hippos}. + +% Somewhere else in the document +See column~\ref{hippos} on page~\pageref{hippos} +for information on hippos. +\end{verbatim} +Don't use more than one instance of \cmdname{labelflow} in a given +\gls*{flow} for a given page or you will get a \dq{multiply defined +references} warning. Note that +\cmdname{labelflow} will always refer to the current \gls*{flow} +even when used in the contents of a static or dynamic \gls{frame}. + +\item[\ctr{maxstatic}] The total number of \glspl{static} that have +been defined so far. + +\item[\ctr{maxdynamic}] The total number of \glspl{dynamic} that +have been defined so far. + +\item[\ctr{maxthumbtabs}] The total number of thumbtabs. +\end{description} +\htmlnav \chapter{Troubleshooting} +\chapdesc{This chapter should be consulted if you experience any +problems using the \styni{flowfram} package.} For an up-to-date list of frequently asked questions, see -\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/}. +\latexhtml{% +\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/flowframfaq.html}}{the \htmladdnormallink{flowfram FAQ}{http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/faq/flowframfaq.html}}. If you have a query that is not addressed here, please try there -before contacting me. +before contacting me.\htmlnav \section{General Queries} @@ -1706,7 +2804,7 @@ pages 1-10, what happens if I then add some extra text so that the document exceeds 10 pages? The output routine will create a new \gls{flow} the size -of the \gls{typeblock}, and use that. +of the \gls{typeblock} and use that. \item Can I use the formatted page number in \glspl{pglist}? @@ -1714,13 +2812,12 @@ No. \item\label{itm:whynot} Why not? -When the output routine finishes with one \gls{flow} -it looks for the next \gls{flow} defined on that page, -if there are none left, it then searches through the \gls{pglist} -of all the defined \glspl{flow} to see if the next page -lies in that range, if there are none defined on that page, -it ships out that page, and tries the next page. -This gives rise to two problems: +When the output routine finishes with one \gls{flow} it looks for the +next \gls{flow} defined on that page. If there are none left, it then +searches through the \gls{pglist} of all the defined \glspl{flow} to +see if the next page lies in that range. If there are none defined on +that page, it ships out that page, and tries the next page. This gives +rise to two problems: \begin{enumerate} \item \LaTeX\ is not clairvoyant. If it is currently @@ -1742,7 +2839,9 @@ for some arbitrary format. \label{itm:parshape} You can assign certain irregular shapes to \staticordynamic{}s, -using the \key{shape} key (see \autoref{sec:parshape}). +using the \key{shape} key (see +\latexhtml{\autoref{sec:parshape}}{\htmlref{Non-Rectangular +Frames}{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. @@ -1753,7 +2852,8 @@ This function is not available for \glspl{flow}. Assuming you haven't inadvertently set that text as the contents of the \staticordynamic, the frames are most likely -overlapping (see \autoref{sec:stacking}). +overlapping (see \latexhtml{\autoref{sec:stacking}}{\htmlref{Frame +Stacking Order}{sec:stacking}}). In an attempt to clarify what's going on, suppose you have defined a \gls{static}, a \gls{dynamic} and two \glspl{flow}. The following is an approximate\footnote{The pedantic may point out @@ -1770,14 +2870,14 @@ sheets~2 and~3) represent the \glspl{flow}, and the last one \TeX\ starts work on filling sheet~2 with the document text. Once it has put as much text on that sheet as it considers possible (according to its views on aesthetics), it puts sheet~2 -into the ``in tray'', and then continues on sheet~3. While it's +into the \dq{in tray}, and then continues on sheet~3. While it's filling in sheets~2 and~3, if it encounters a command or environment that tells it what to put in the \gls{static}, -it fills in sheet~1 and then puts sheet~1 into the ``in tray'' and +it fills in sheet~1 and then puts sheet~1 into the \dq{in tray} and resumes where it left off on sheet~2 or~3. Similarly, if it encounters a command that tells it what to put in the \gls{dynamic}, it stops what it's doing, fills in sheet~4, then -puts sheet~4 into the ``in tray'', and resumes where it left off. +puts sheet~4 into the \dq{in tray}, and resumes where it left off. Only when it has finished sheet~3 (the last \gls{flow} defined on that page), will it gather together all the transparent sheets, and fix them onto the page starting @@ -1792,11 +2892,21 @@ image that has a non-transparent background.) Note that it's also possible that the overlap is caused by an overfull hbox that's causing the text to poke out the side of the -\gls{flow} into a neighbouring \gls{frame}. +\gls{flow} into a neighbouring \gls{frame}. Check the log file for +warnings or use the \pkgoptni{draft} option to the document class +which will place a filled rectangle on the end of overfull lines. \item Why do I get lots of overfull hbox messages? -Probably because you have narrow \glspl{frame}. +Probably because you have narrow \glspl{frame}. It's better to use +ragged right formatting when the frames are narrow. + +\item Why do I keep getting multiply-defined warnings? + +Probably because you have used \cmdname{label} in a \staticordynamic\ +that is displayed on more than one page. Try using the \key{clear} +key to ensure that the frame is always cleared at the end of each +page. \item What happens if I use a command or environment that switches to two-column mode (e.g. \env{theindex})? @@ -1805,7 +2915,8 @@ 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. +your own frames for use in the index. See the source code of this +document, \texttt{ffuserguide.tex}, for an example. \item How do I change the vertical alignment of material inside a \staticordynamic? @@ -1816,14 +2927,16 @@ Use the \key{valign} key in \cmdname{setstaticframe} or \item\label{itm:absval} How do I compute the distance from the edge of the page instead of the \gls{typeblock}? -See \autoref{sec:typeblockloc}. +See \latexhtml{\autoref{sec:typeblockloc}}{\htmlref{Determining the +Location of the Typeblock}{sec:typeblockloc}}. \item Is there a GUI I can use to make it easier to create the \glspl{frame}? -Yes, JpgfDraw which can be downloaded from: +Yes, Jpgfdraw which can be downloaded from: \url{http://theoval.cmp.uea.ac.uk/~nlct/jpgfdraw/} \end{enumerate} +\htmlnav \section{Unexpected Output} @@ -1831,29 +2944,33 @@ Yes, JpgfDraw which can be downloaded from: \item The lines at the beginning of my \glspl{flow} are the wrong width. -This is a problem that will occur if you have \glspl{flow} -with different widths, as the change in \cmdname{hsize} +This is a problem that will occur if you have \glspl{flow} +with different widths, as the change in \cmdname{hsize} does not come into effect until a paragraph break. So if you have a paragraph that spans two \glspl{flow}, the end -of the paragraph at the beginning of the second \gls{flow} +of the paragraph at the beginning of the second \gls{flow} will retain the width it had at the start of the paragraph at the bottom of the previous \gls{flow}. You can fix the problem by inserting \cmdname{framebreak} at the point where the \gls{frame} break occurs -(see \autoref{sec:framebreak}). +(see \latexhtml{\autoref{sec:framebreak}}{\htmlref{Prematurely Ending a +Flow Frame}{sec:framebreak}}). \item My \glspl{frame} shift to the right when I add a border. This may occur if you use a border that is not recognised -by the \sty{flowfram} package. You will need to set the -offset using the \texttt{offset} key (see \autoref{sec:modattr}). +by the \styni{flowfram} package. You will need to set the +offset using the \texttt{offset} key (see +\latexhtml{\autoref{sec:modattr}}{\htmlref{Modifying Frame +Attributes}{sec:modattr}}). \item I have a vertical white strip along the right hand side of every page. -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: +This can happen if you have, say, an A4 document, and +\appname{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) @@ -1868,13 +2985,13 @@ to: All your \glspl{flow} are empty. \TeX\ doesn't put the frames onto the page until it has finished putting text -into the \glspl{flow}. So if there is no text to go in the -\glspl{flow} it won't output the page. If you only want the +into the \glspl*{flow}. So if there is no text to go in the +\glspl*{flow} it won't output the page. If you only want the \glspl{static} or \glspl{dynamic} filled in, and nothing outside of them, just do \verb|\mbox{}\clearpage|. This will put an invisible something with zero area into your -\gls{flow}, but it's enough to convince \TeX\ that the +\gls*{flow}, but it's enough to convince \TeX\ that the document contains some text. \item The last page hasn't appeared. @@ -1892,16 +3009,16 @@ default. To make the indentation the same as that used by \setlength{\sdfparindent}{\parindent} \end{verbatim} -\item My section numbering is in the wrong order +\item My section numbering is in the wrong order. Remember that the contents of the \glspl{dynamic} are not set until the page is shipped out, and the contents will be set in the order of \gls{idn}, so if you have any sectioning commands -occuring within \glspl{dynamic}, they may not be set in the same +occuring within \glspl*{dynamic}, 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} +to the left when I used \cmdname{parshape}. This will happen if your \cmdname{parshape} specification exceeds the linewidth. For example: @@ -1912,6 +3029,7 @@ This specifies a line with overall length \verb"1.1\linewidth" which is too long. \end{enumerate} +\htmlnav \section{Error Messages} @@ -1944,23 +3062,23 @@ with page ranges. For example: \texttt{1,even} is invalid. All \glspl{idl} within each \gls{frame} type must be unique. There are similar error messages for duplicate -\glspl{idl} for \glspl{static} and \glspl{dynamic}. +\glspl*{idl} for \glspl{static} and \glspl{dynamic}. \item \verb/Can't find flow frame id/ -You have specified a non-existent \gls{flow} \gls{idl}. There are +You have specified a non-existent \gls*{flow} \gls{idl}. There are similar error messages for \glspl{static} and \glspl{dynamic}. Check to make sure you have spelt the label correctly, and check you are using the correct \gls{frame} type command. -(For example, if a \gls{static} has the \gls{idl}\ \texttt{mylabel}, +(For example, if a \gls*{static} has the \gls*{idl}\ \texttt{mylabel}, and you attempt to do \cmdname{setflowframe*}\marg{mylabel}\marg{\meta{options}}, then you will get this error, because \texttt{mylabel} refers -to a \gls{static} not a \gls{flow}.) +to a \gls*{static} not a \gls{flow}.) \item \verb/Key 'clear' is boolean/ -The \texttt{clear} key can only have the values \texttt{true} +The \texttt{clear} key can only have the values \texttt{true} or \texttt{false}. \item \verb/Key 'clear' not available/ @@ -2008,23 +3126,36 @@ them, and try again. \item \verb/No room for a new \skip/ -You have exceeded \TeX's 256 register limit. Use the \sty{etex} +You have exceeded \TeX's 256 register limit. Use the \sty{etex} package. +\item \verb|\verb illegal in command argument| + +As a general rule, you can't use \Index{verbatim text} in a command +argument. +This rule applies to all the commands defined by the \styni{flowfram} +package. See also below. + \item I get \verb|\verb illegal in command argument| when using -verbatim text inside the \env{dynamiccontents} environment. +\Index{verbatim text} inside the \env{dynamiccontents} environment. -You can not use verbatim text inside either the starred or +You can not use \Index{verbatim text} inside either the starred or unstarred version of the \env{dynamiccontents} environment. -(See page~\pageref{pg:verb}.) +(See \latexhtml{page~\pageref{pg:verb}}{\htmlref{earlier}{pg:verb}}.) +\htmlnav \end{enumerate} \disablethumbtabs \printglossary +\htmlnav +\html{\label{index}} \printindex +\htmlnav + +\clearpage % have a backcover: \setdynamicframe*{footer}{pages=none} \setstaticframe*{lastbackleft,lastbackright}{pages=even} diff --git a/Master/texmf-dist/doc/latex/flowfram/flowfram.dtx b/Master/texmf-dist/doc/latex/flowfram/flowfram.dtx new file mode 100644 index 00000000000..7ad71e5b94c --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/flowfram.dtx @@ -0,0 +1,7678 @@ +%\iffalse +% flowfram.dtx generated using makedtx version 0.94b (c) Nicola Talbot +% Command line args: +% -src "flowfram.sty\Z=>flowfram.sty" +% -doc "docstub.tex" +% -author "Nicola Talbot" +% -dir "source" +% flowfram +% Created on 2008/7/1 14:05 +%\fi +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%</package> +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2008 Nicola Talbot, all rights reserved. +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\CheckSum{9387} +\PageIndex + +\usepackage{url} +\usepackage[colorlinks,hyperindex=false, +pdfauthor={Nicola L C Talbot}, +pdftitle={Documented Source Code for flowfram.sty}]{hyperref} +\usepackage[style=altlist,toc,nonumberlist]{glossaries} + +\newglossary[slg]{secondary}{sgi}{sgo}{Glossary} +\renewcommand{\acronymtype}{secondary} + +\MakeShortVerb" +\DeleteShortVerb| + +\newcommand{\sty}[1]{\textsf{#1}} +\newcommand{\env}[1]{\textsf{#1}} + +\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 + + +\newglossaryentry{typeblock}{name=typeblock,description={The +area of the page where the main body of the text goes. +The width and height of this area are given by \cs{textwidth} +and \cs{textheight}},type=secondary} + +\newglossaryentry{flow}{name=flow frame,description={The frames in +a document such that the contents of the \env{document} +environment flow from one frame to the next in the order +that they were defined. There must be at least one flow frame on +every page},type=secondary} + +\newglossaryentry{static}{name=static frame,description={Frames +in which text is fixed in place. The contents are fixed until +explicitly changed},type=secondary} + +\newglossaryentry{dynamic}{name=dynamic frame,description={Frames +in which text is fixed in place, but the contents are re-typeset +after each page},type=secondary} + +\newglossaryentry{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: +flow, static and dynamic},type=secondary} + +\newglossaryentry{fcmd}{name=frame making command,description={A +\LaTeX\ command which places some kind of border around its +argument. For example: \cs{fbox}},type=secondary} + +\newglossaryentry{pglist}{name=page list,description={A list of +pages. This can either be a single keyword: \texttt{all}, +\texttt{odd}, \texttt{even} or \texttt{none}, or it can +be a comma-separated list of individual page numbers or +page ranges. For example: \texttt{\textless3,5,7-11,\textgreater15} +indicates pages 1,2,5,7,8,9,10,11 and all pages after page 15. +Note that these numbers refer to the actual value of the +page counter, not the absolute physical page number}, +type=secondary} + +\newglossaryentry{pgrange}{name=page range,description={Page +ranges can be closed, e.g.\ \texttt{5-10}, or open, e.g. +\texttt{\textless7} or \texttt{\textgreater9}}, +type=secondary} + +\newglossaryentry{bbox}{name=bounding box,plural=bounding boxes, +description={The smallest +possible rectangle that completely encompasses the object}, +type=secondary} + +\newacronym[name={identification number (IDN)}, +description={A unique +number assigned to each frame, which you can use to identify +the frame when modifying its appearance. Example: if you +have defined 3 flow frames, 2 static frames and 1 dynamic +frame, the flow frames will have IDNs 1, 2 and 3, the static +frames will have IDNs 1 and 2, and the dynamic frame will +have IDN 1}]{idn}{IDN}{identification number} + +\newacronym[name={identification label (IDL)}, +description={A unique +label which can be assigned to a frame, enabling you to +refer to the frame by label instead of by its +IDN}]{idl}{IDL}{identification label} + +\makeglossaries + +\begin{document} +\DocInput{flowfram.dtx} +\end{document} +%</driver> +%\fi +%\title{Documented Source Code for flowfram.sty v1.11} +%\author{Nicola L. C. Talbot} +%\date{28th June 2008} +%\maketitle +% +%This is the documented source code for the flowfram package. +%For a user manual, see \url{ffuserguide.pdf}. +% +%\tableofcontents +% +%\printglossary[type=secondary] +% +%\StopEventually{\PrintIndex} +% +% +%\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}[2008/06/27 v1.11] +% \end{macrocode} +% Load packages needed by this package +% \begin{macrocode} +\RequirePackage{ifthen} +\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: +% \begin{macrocode} +\newcommand{\setffdraftcolor}{\color[gray]{0.8}} +\newcommand{\setffdrafttypeblockcolor}{\color[gray]{0.9}} +% \end{macrocode} +%\begin{macro}{\fflabelsep} +% In draft mode, each \gls{bbox} (apart from the one indicating +% the \gls{typeblock}), has a label positioned to the right of the +% box, at a distance of "\fflabelsep" from the right hand +% border.\DescribeMacro{\fflabelsep} +% \begin{macrocode} +\newlength\fflabelsep +\fflabelsep=1pt +% \end{macrocode} +%\end{macro} +%\begin{macro}{\fflabelfont} +% The appearance of the label is set by the declaration: +% \begin{macrocode} +\newcommand*{\fflabelfont}{\small\sffamily} +% \end{macrocode} +%\end{macro} +% The command "\@ffdraft" is used to switch to draft mode. +% Allow user the option to show particular types of bounding +% boxes. +% \begin{macrocode} +\newif\ifshowtypeblock +\newif\ifshowmargins +\newif\ifshowframebbox +% \end{macrocode} +%\begin{macro}{\@ffdraft} +% Set all draft settings. +% \begin{macrocode} +\newcommand*{\@ffdraft}{% +\showtypeblocktrue +\showmarginstrue +\showframebboxtrue +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ffnodraft} +% Unset all draft settings. +% \begin{macrocode} +\newcommand*{\@ffnodraft}{% +\showtypeblockfalse +\showmarginsfalse +\showframebboxfalse +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@fr@meifdraft} +% Draw \gls{bbox}. +% \begin{macrocode} +\newcommand*{\@fr@meifdraft}[3][\setffdraftcolor]{% +\def\ff@backcol{{none}}% +\@ifundefined{color}{\frame{#2}}{#1\frame{#2}}% +\ifthenelse{\equal{#3}{}}{}{% +\makebox[0pt][l]{\hskip\fflabelsep\fflabelfont{[#3]}}}}% +% \end{macrocode} +%\end{macro} +% Colour setting commands, do nothing by default: +% \begin{macrocode} +\newcommand*{\@s@tffcol}{} +\newcommand*{\@s@tfftextcol}{} +% \end{macrocode} +%\begin{macro}{\@ffbackground} +% Deal with \gls{frame} background colour. Note that the background colour only +% extends to the limit of the \gls{frame}['s] \gls{bbox}. If you want the background +% colour to be flush with the \glspl{frame} border, you will have to create your own +% customised border. +% \begin{macrocode} +\newcommand*{\@ffbackground}[1]{#1} +% \end{macrocode} +%\end{macro} +% Now declare the options. If draft, switch to draft definitions. +% \begin{macrocode} +\DeclareOption{draft}{\@ffdraft} +% \end{macrocode} +% If not draft, reset commands so that no \glspl{bbox} +% are drawn. +% \begin{macrocode} +\DeclareOption{final}{\@ffnodraft} +% \end{macrocode} +%\begin{macro}{\if@ttb@rotate} +% Allow provision to prevent rotation in the thumbtabs. +% If no rotation, thumbtab text will be stacked vertically. +% This will also affect whether or not to rotate \glspl{frame}. +% \begin{macrocode} +\newif\if@ttb@rotate +\@ttb@rotatetrue +\DeclareOption{rotate}{\@ttb@rotatetrue} +\DeclareOption{norotate}{\@ttb@rotatefalse} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\rotateframe} +% Define command that will only rotate box if rotate option +% set. +% \begin{macrocode} +\newcommand{\rotateframe}[2]{\if@ttb@rotate +\rotatebox{#1}{#2}% +\else +#2\relax +\fi} +% \end{macrocode} +%\end{macro} +% Should the thumbtabs include number, title, both or +% neither? +% \begin{macrocode} +\newif\if@ttb@num +\newif\if@ttb@title +\@ttb@numfalse +\@ttb@titletrue +\DeclareOption{ttbtitle}{\@ttb@titletrue} +\DeclareOption{ttbnotitle}{\@ttb@titlefalse} +\DeclareOption{ttbnum}{\@ttb@numtrue} +\DeclareOption{ttbnonum}{\@ttb@numfalse} +% \end{macrocode} +% If color option specified, set up the default colours +% for the borders and text for all \gls{frame} types. Note that +% the colour name has to be grouped within the definition +% of "\flowframecol" and "\flowframetextcol". This +% was done so that you could do, for example, +% "\renewcommand{\flowframecol}{[rgb]{1,1,0}}" so that +% you can specify the colour model as well. +% The commands "\@s@tffcol" and "\@s@tfftextcol" +% switch to the border and text colour, respectively. They +% both assume that "\ff@col" has been set to the +% relevant colour before use. +% \begin{macrocode} +\DeclareOption{color}{% +\def\flowframecol{{black}}\def\flowframetextcol{{black}} +\renewcommand*\@s@tffcol{\ifthenelse{\equal{\ff@col}{}}{}{% +\expandafter\color\ff@col}} +\renewcommand*\@s@tfftextcol{\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\expandafter\color\ff@txtcol}} +\renewcommand*{\@ffbackground}[1]{% +\ifthenelse{\equal{\ff@backcol}{{none}}}{% +#1}{{\fboxsep=0pt\expandafter\colorbox\ff@backcol{#1}}}} +} +% \end{macrocode} +% If nocolor is specified, ensure that the colour changing +% commands do nothing. +% \begin{macrocode} +\DeclareOption{nocolor}{% +\def\flowframetextcol{}% +\def\flowframecol{}% +\renewcommand{\@s@tffcol}{}\renewcommand{\@s@tfftextcol}{} +\renewcommand{\@ffbackground}[1]{#1} +} +% \end{macrocode} +% Check to see if the document class has the draft option +% set. The easiest way to do this is to check the length +% of "\overfullrule" (the marker that indicates overfull +% hboxes). +% \begin{macrocode} +\ifdim\overfullrule=0pt +\ExecuteOptions{final} +\else +\ExecuteOptions{draft} +\fi +% \end{macrocode} +% If the "\normalcolor" command is something other than +% "\relax", then implement +% the color option as the default, otherwise implement the +% nocolor option as the default. +% \begin{macrocode} +\ifx\normalcolor\relax +\ExecuteOptions{nocolor} +\else +\ExecuteOptions{color} +\fi +% \end{macrocode} +% Now the defaults have all been set, the package options +% specified by the user can be processed: +% \begin{macrocode} +\ProcessOptions +% \end{macrocode} +% If color option has been specified, but no color +% package has been loaded yet, load color.sty +% \begin{macrocode} +\ifx\normalcolor\relax +\ifthenelse{\equal{\flowframetextcol}{}}{}{% +\RequirePackage{color}} +\fi +% \end{macrocode} +% User may want a non standard style for the first page of +% each chapter, so modify chapter commands to take this into +% account.\DescribeMacro{\chapterfirstpagestyle} +% \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}{% +\thispagestyle{\chapterfirstpagestyle}\@ff@OLD@schapter} +} +% \end{macrocode} +% Now get on with the package. First we need to set up +% a register to store the number of \glspl{flow} that have been defined: +% \begin{macrocode} +\newcounter{maxflow} +\c@maxflow=0\relax +% \end{macrocode} +% Next define a counter to keep track of the \gls{idn} of the current +% \gls{flow}. +% \begin{macrocode} +\newcounter{thisframe} +\c@thisframe=0\relax +\@ifpackageloaded{hyperref}{% +\def\theHthisframe{\thepage.\arabic{thisframe}}}{} +% \end{macrocode} +%\begin{macro}{\labelflowidn} +%\changes{1.11}{2008/06/27}{new} +% Define a command to label the current \gls{flow} so that its +% \gls{idn} can be referenced: +% \begin{macrocode} +\newcommand*{\labelflowidn}[1]{% +{\def\@currentlabel{\thethisframe}\label{#1}}} +% \end{macrocode} +%\end{macro} +% Define a counter to store the current frame index for the current +% page. This will be the same as the \gls{idn} if all \glspl{flow} +% are displayed on the current page, but may be different to the +% \gls{idn} if some \glspl{flow} are not displayed. +%\changes{1.11}{2008/06/27}{displayedframe counter added} +% \begin{macrocode} +\newcounter{displayedframe} +\c@displayedframe=0 +\@ifpackageloaded{hyperref}{% +\def\theHdisplayedframe{\thepage.\arabic{displayedframe}}}{} +% \end{macrocode} +%\begin{macro}{\labelflow} +%\changes{1.11}{2008/06/27}{new} +% Define a command to label the current \gls{flow} so that its +% displayed index can be referenced: +% \begin{macrocode} +\newcommand*{\labelflow}[1]{% +{\def\@currentlabel{\thedisplayedframe}\label{#1}}} +% \end{macrocode} +%\end{macro} +% Define a counter to store the total number of \glspl{static}: +% \begin{macrocode} +\newcounter{maxstatic} +\c@maxstatic=0\relax +% \end{macrocode} +% Define a counter to store the total number of \glspl{dynamic}: +% \begin{macrocode} +\newcounter{maxdynamic} +\c@maxdynamic=0\relax +% \end{macrocode} +% Define some temporary variables +% \begin{macrocode} +\newcount\@colN +\newcount\@ff@tmpN +\newcount\ff@id +\newlength\@ff@offset +\newlength\@ff@tmp@x +\newlength\@ff@tmp@x@even +\newlength\@ff@tmp@y +% \end{macrocode} +%\begin{macro}{\sdfparindent} +% Define a length to govern paragraph indentation within +% static and dynamic frames. +% This is 0pt by default. +% \begin{macrocode} +\newlength\sdfparindent +% \end{macrocode} +%\end{macro} +% +% \subsection{Flow Frames} +%\begin{macro}{\flowframesep} +% Set up default lengths. The gap between the text and the +% border is given by: +% \begin{macrocode} +\newlength\flowframesep +\flowframesep=\fboxsep +% \end{macrocode} +%\end{macro} +%\begin{macro}{\flowframerule} +% The width of the frame is given by: +% \begin{macrocode} +\newlength\flowframerule +\flowframerule=\fboxrule +% \end{macrocode} +%\end{macro} +%\begin{macro}{\flowframeshowlayout} +% Define command to show page layout. This finishes the current +% page, temporarily sets draft mode, and prints an empty page. +% Only the \glspl{frame} for that page will be shown. +%\DescribeMacro{\flowframeshowlayout} +% \begin{macrocode} +\newcommand*{\flowframeshowlayout}{% +\finishthispage +{\@ffdraft\mbox{}\finishthispage\clearpage}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\framebreak} +% If the \glspl{flow} are not all of the same width, the change +% in "\hsize" will not come into effect until the end +% of the paragraph. Provide a command to simulate a paragraph +% break, without making it look as though there is a paragraph. +% Provides an optional argument that is passed to +% "\pagebreak". Make sure it is grouped to localise +% the change in "\parfillskip" and "\parskip". +% \begin{macrocode} +\newif\ifusedframebreak +\newcommand{\framebreak}[1][4]{% +\usedframebreaktrue +{\parfillskip=0pt\pagebreak[#1]\parskip=0pt\par\noindent}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\finishthispage} +% The commands "\newpage" and +% "\pagebreak" can be used to move on to the next +% \gls{flow}, but to finish the entire page, use +% "\finishthispage". +% \begin{macrocode} +\newcommand{\finishthispage}{% +\@colN=\c@thisframe +\newpage +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\@ff@chckifthispg{\c@page}{\@colN}% +\if@notthiscol\else +\mbox{}\newpage% +\fi +}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\cleardoublepage} +% Modify the definition of "\cleardoublepage". This may +% or may not be defined so use "\def". +% \begin{macrocode} +\def\cleardoublepage{\finishthispage +\if@twoside +\ifodd\c@page +\else +\hbox{}\finishthispage +\fi +\fi} +% \end{macrocode} +%\end{macro} +% Disable "@twocolumn" flag, as it makes no sense. +% \begin{macrocode} +\@twocolumnfalse +% \end{macrocode} +% Disable "@mparswitch" flag, as each \gls{flow} has +% its own predefined margin setting. +% \begin{macrocode} +\@mparswitchfalse +% \end{macrocode} +%\begin{macro}{\globalreversemargin} +% The margins get switched during the output routine, so +% need the effect to be global. +% \begin{macrocode} +\newcommand{\globalreversemargin}{% +\global\@mparbottom\z@\global\@reversemargintrue} +\newcommand{\globalnormalmargin}{% +\global\@mparbottom\z@\global\@reversemarginfalse} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@getmarginpos} +% Determine whether the margin should be on the right +% or left. This depends on the setting, which can either +% be "right" or "left" (self explanatory) or "inner" (on the +% spine side, so left for odd pages and right for even +% pages) or "outer" (on the outside of the page, so right +% for odd pages and left for even pages.) When "\@getmarginpos" +% is finished, the setting is stored in "\ff@margin". +% \begin{macrocode} +\newcommand{\@getmarginpos}[1]{% +\ifthenelse{\equal{#1}{inner}}{% +\if@twoside +\ifodd\c@page\def\ff@margin{left}\else\def\ff@margin{right}\fi +\else +\def\ff@margin{left}% +\fi +}{% +\ifthenelse{\equal{#1}{outer}}{% +\if@twoside +\ifodd\c@page\def\ff@margin{right}\else\def\ff@margin{left}\fi +\else +\def\ff@margin{right}% +\fi +}{% +\def\ff@margin{#1}}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\setmargin} +% Set the margin for current \gls{flow}. +% \begin{macrocode} +\newcommand{\setmargin}{% +\@getmarginpos{% +\csname @ff@margin@\romannumeral\c@thisframe\endcsname}% +\ifthenelse{\equal{\ff@margin}{left}}% +{\globalreversemargin}{\globalnormalmargin}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\newflowframe} +% Create a new \gls{flow}. Syntax:\newline +% \cs{newflowframe}\oarg{pages}\marg{width}\marg{height}\marg{x}\marg{y}\oarg{label} +% +% First increment "\c@maxflow", and define boolean +% to indicate whether or not the \gls{flow} has a border, +% Then check to see whether or not the starred version is +% begin used. All the settings must be global: the +% output routine will create a new \gls{flow}, if there are no +% more defined, and since changes made in the output routine +% are localised, the new \gls{frame} will be lost unless it is +% globally defined. Flow frames should only be set up in the +% preamble, but if there are not enough \glspl{frame} to fit all +% the document text, the output routine will create a new \gls{flow}. +% So, define "\newflowframe" so that it calls +% "\@n@wflowframe" +% \begin{macrocode} +\newcommand{\newflowframe}{\@n@wflowframe} +% \end{macrocode} +%\end{macro} +% Set the external command for use only in the preamble, an +% make the output routine use the internal command +% \begin{macrocode} +\@onlypreamble{\newflowframe} +% \end{macrocode} +%\begin{macro}{\@n@wflowframe} +% \begin{macrocode} +\newcommand{\@n@wflowframe}{% +\global\advance\c@maxflow by 1\relax +\expandafter\global\expandafter +\newif\csname ifcolumnframe\romannumeral\c@maxflow\endcsname +\@ifstar\@snewflowframe\@newflowframe +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@snewflowframe} +% Starred version sets boolean flag to indicate a border +% \begin{macrocode} +\newcommand{\@snewflowframe}{% +\expandafter\global\expandafter +\let\csname ifcolumnframe\romannumeral\c@maxflow\endcsname\iftrue +\@@newflowframe} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@newflowframe} +% 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 +\@@newflowframe} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@newflowframe} +% Now get on with initialising the \gls{flow}. By default, it +% will apply the \gls{flow} to all pages, the optional argument +% 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} +\ifnum\c@thisframe=0\relax +\ifthenelse{\equal{#1}{all}\TE@or\equal{#1}{odd}}{% +\c@thisframe=\c@maxflow +\global\setlength{\hsize}{#2}% +\global\usedframebreaktrue +}{\ifthenelse{\equal{#1}{even}\TE@or\equal{#1}{none}}{}{% +\def\ff@pages{#1}% +\@for\@ff@pp:=\ff@pages\do{% +\def\@ff@numstart{0}\def\@ff@numend{0}% +\@ff@getrange{\@ff@pp}% +\ifnum\@ff@numstart=0\def\@ff@numstart{1}\fi +\ifnum\@ff@numstart=1\relax +\c@thisframe=\c@maxflow +\global\setlength{\hsize}{#2}% +\global\usedframebreaktrue +\fi +}}}% +\fi +\@ifnextchar[{\@s@tflowframeid{\c@maxflow}}{% +\@s@tflowframeid{\c@maxflow}[\number\c@maxflow]}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@s@tflowframeid} +% If square brackets occur after "\newflowframe", take +% the contents to be the label, otherwise the label will be +% the \gls{flow} number. +% \begin{macrocode} +\def\@s@tflowframeid#1[#2]{% +\edef\ff@label{#2}% +\@ff@checkuniqueidl{#1}{\ff@label}% +\expandafter +\xdef\csname @col@id@\romannumeral#1\endcsname{\ff@label}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@checkuniqueidl} +% Check \gls{idl} "#2" for \gls{flow} "#1" is unique +% \begin{macrocode} +\newcommand*{\@ff@checkuniqueidl}[2]{% +{\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{% +\advance\@colN by 1\relax +\ifnum\@colN=#1\relax +\else +\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}}{}% +\fi +}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getflowlabel} +%\changes{1.11}{2008/06/27}{new} +%\cs{getflowlabel}\marg{idn} +% Gets the \gls{idl} for the \gls{flow} identified by its +% \gls{idn}. +% \begin{macrocode} +\newcommand*{\getflowlabel}[1]{% +\csname @col@id@\romannumeral#1\endcsname} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getflowid} +%\changes{1.11}{2008/06/27}{new} +%\cs{getflowid}\marg{cmd}\marg{idl} +% Gets the \gls{idn} for the \gls{flow} identified by its +% \gls{idl} and stores in \meta{cmd} which must be a control +% sequence. +% \begin{macrocode} +\newcommand*{\getflowid}[2]{% +\@flowframeid{#2}\edef#1{\number\ff@id}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@flowframeid} +% Work out the \gls{flow} \gls{idn} from the label. This +% iterates through the \glspl{flow}, so if you have a lot of +% them it is quicker to identifiy them by their \gls{idn} +% rather than their \gls{idl}. +% The \gls{idn} stored in "\ff@id". +% \begin{macrocode} +\newcommand*{\@flowframeid}[1]{\@colN=0\relax +\ff@id=0\relax +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\ifthenelse{% +\equal{#1}{\csname @col@id@\romannumeral\@colN\endcsname}}{% +\ff@id=\@colN\relax +% break out of loop +\@colN=\c@maxflow}{}}% +\ifnum\ff@id=0\relax +\PackageError{flowfram}{Can't find flow frame id '#1'}{}\fi} +% \end{macrocode} +%\end{macro} +% Set up the keys for use with "\setflowframe", +% "\setstaticframe" and "\setdynamicframe". +% +% Frame width is stored in "\ff@width". +% \begin{macrocode} +\define@key{flowframe}{width}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'width' key}{}}{}% +\def\ff@width{#1}} +% \end{macrocode} +% Frame height is stored in "\ff@height". +% \begin{macrocode} +\define@key{flowframe}{height}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'height' key}{}}{}% +\def\ff@height{#1}} +% \end{macrocode} +% Frame $x$ co-ordinate (odd and even pages) is stored +% in "\ff@x". +% \begin{macrocode} +\define@key{flowframe}{x}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'x' key}{}}{}% +\def\ff@x{#1}} +% \end{macrocode} +% Frame $y$ co-ordinate (odd and even pages) is stored +% in "\ff@y". +% \begin{macrocode} +\define@key{flowframe}{y}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'y' key}{}}{}% +\def\ff@y{#1}} +% \end{macrocode} +% Frame $x$ co-ordinate (even pages only) is stored +% in "\ff@evenx". +% \begin{macrocode} +\define@key{flowframe}{evenx}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'evenx' key}{}}{}% +\def\ff@evenx{#1}} +% \end{macrocode} +% Frame $y$ co-ordinate (even pages only) is stored in +% "\ff@eveny". +% \begin{macrocode} +\define@key{flowframe}{eveny}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'eveny' key}{}}{}% +\def\ff@eveny{#1}} +% \end{macrocode} +% Frame $x$ co-ordinate (odd pages only if twoside implemented) +% is stored in "\ff@oddx". +% \begin{macrocode} +\define@key{flowframe}{oddx}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'oddx' key}{}}{}% +\def\ff@oddx{#1}} +% \end{macrocode} +% Frame $y$ co-ordinate (odd pages only if twoside implemented) +% is stored in "\ff@oddy". +% \begin{macrocode} +\define@key{flowframe}{oddy}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'oddy' key}{}}{}% +\def\ff@oddy{#1}} +% \end{macrocode} +% New \gls{idl} for \gls{frame} is stored in "\ff@label". +% \begin{macrocode} +\define@key{flowframe}{label}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'label' key}{}}{}% +\def\ff@label{#1}} +% \end{macrocode} +% Frame border. If "none", define "\ff@frame" as "false", +% otherwise define "\ff@frame" as "true". If "plain", define +% "\ff@frametype" as "fbox", otherwise define it to be +% the specified type, which should be the name of a +% \gls{fcmd} without the preceding backslash. +% \begin{macrocode} +\define@key{flowframe}{border}[plain]{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'border' key - use +'none' for no border}{}}{}% +\ifthenelse{\equal{#1}{none}}{% +\def\ff@frame{false}}{\def\ff@frame{true}% +\ifthenelse{\equal{#1}{plain}}{\def\ff@frametype{fbox}}{% +\def\ff@frametype{#1}}}} +% \end{macrocode} +% Frame's border colour. (This may not work for non-standard +% \glspl{fcmd}.) +% \begin{macrocode} +\define@key{flowframe}{bordercolor}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'bordercolor' key}{}}{}% +\def\ff@col{#1}} +% \end{macrocode} +% Frame's text colour. +% \begin{macrocode} +\define@key{flowframe}{textcolor}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'textcolor' key}{}}{}% +\def\ff@txtcol{#1}} +% \end{macrocode} +% The background colour of the \gls{frame}. Note this only covers +% the region of the \gls{bbox}, not any extra space between +% the \gls{bbox} and the border. If you want the background +% colour to go right up to the border, you will need to +% define your own customised border. +% \begin{macrocode} +\define@key{flowframe}{backcolor}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'backcolor' key}{}}{}% +\def\ff@backcol{#1}} +% \end{macrocode} +% \Gls{pglist} for which the \gls{frame} should appear. +% \begin{macrocode} +\define@key{flowframe}{pages}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'pages' key}{}}{}% +\def\ff@pages{#1}} +% \end{macrocode} +% The border takes up extra space, which needs to be +% adjusted. This can be done for standard border types, +% but non-standard borders may require some help. +% \begin{macrocode} +\define@key{flowframe}{offset}{\def\ff@offset{#1}% +\ifthenelse{\equal{#1}{}}{\PackageError{flowframe}{% +Invalid value for key 'offset'}{% +'offset' can either be 'compute' (to compute it according +to certain pre-defined rules) or a length}}{}} +% \end{macrocode} +% Angle to rotate \gls{flow}: +% \begin{macrocode} +\define@key{flowframe}{angle}{\def\ff@angle{#1}% +} +% \end{macrocode} +% This key is only for \glspl{flow}: +% \begin{macrocode} +\define@key{flowframe}{margin}{% +\ifthenelse{\equal{#1}{left} \or \equal{#1}{right} +\or \equal{#1}{inner} \or \equal{#1}{outer}}{% +\def\ff@margin{#1}}{\PackageError{flowfram}{invalid value of +'margin' key}{Key 'margin' can only take the values +'left' or 'right'}}} +% \end{macrocode} +% This key is only for \glspl{static}: +% \begin{macrocode} +\define@key{flowframe}{clear}[true]{% +\ifthenelse{\equal{#1}{true}\or\equal{#1}{false}}{% +\def\ff@clear{#1}}{\PackageError{flowfram}{Key 'clear' is +boolean}{You can only specify the values 'true' or 'false'}}} +% \end{macrocode} +% This key is only for \glspl{dynamic}: +% \begin{macrocode} +\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}}} +% \end{macrocode} +% This key is only for \glspl{static} and \glspl{dynamic}. +% \begin{macrocode} +\define@key{flowframe}{shape}{\def\ff@shape{#1}% +} +% \end{macrocode} +% This key is only for \glspl{static} and \glspl{dynamic}. +% \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} +%\begin{macro}{\setallflowframes} +% Provide a command to change the settings for all flow +% frames. This just iterates through all the \glspl{flow}, +% and sets each one in turn. +% \begin{macrocode} +\newcommand*{\setallflowframes}[1]{% +\@colN=0\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\@@setflowframe{\@colN}{#1}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\setflowframe} +% Define "\setflowframe" command. Check to see +% whether or not the starred version is being used. +% \begin{macrocode} +\newcommand*{\setflowframe}{\@ifstar\@ssetflowframe\@setflowframe} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ssetflowframe} +% This is the starred version. It finds the \gls{idn} for +% each label in the comma-separated list (first argument), +% and applies the setting for that numbered \gls{flow}. +% \begin{macrocode} +\newcommand{\@ssetflowframe}[2]{% +\@for\@ff@id:=#1\do{% +\@flowframeid{\@ff@id}% +\@@setflowframe{\ff@id}{#2}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@setflowframe} +% This is the unstarred version. It iterates through +% each \gls{idn} in the comma-separated list passed +% as the first argument, but it also checks for number +% ranges, and sets the values for that \gls{flow}. Ensures +% that number ranges do not lie out of bounds. +% \begin{macrocode} +\newcommand*{\@setflowframe}[2]{% +\ifthenelse{\equal{#1}{all}}{% +\setallflowframes{#2}}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxflow\TE@or\@colN=\c@maxflow}{% +\@@setflowframe{\@colN}{#2}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxflow\relax + \def\@ff@numend{\c@maxflow}% +\fi +\@colN=\@ff@numstart\relax +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@setflowframe{\@colN}{#2}% +\advance\@colN by 1\relax +}}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@setflowframe} +% This is the command that actually sets the values for +% the \gls{flow} whose \gls{idn} is specified by the first +% parameter. +%\changes{1.11}{2008/06/27}{removed unwanted spaces} +% \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@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@shape{\empty}% +\setkeys{flowframe}{#2}% +\ifthenelse{\equal{\ff@frame}{}}{}{% +\setboolean{columnframe\romannumeral#1}{\ff@frame}}% +\ifthenelse{\equal{\ff@width}{}}{}{% +\expandafter\setlength\csname colwidth\romannumeral#1\endcsname +{\ff@width}}% +\ifthenelse{\equal{\ff@height}{}}{}{% +\expandafter\setlength\csname colheight\romannumeral#1\endcsname +{\ff@height}}% +\ifthenelse{\equal{\ff@x}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@posx\endcsname +{\ff@x}% +\expandafter\setlength\csname col@\romannumeral#1@evenx\endcsname +{\ff@x}} +\ifthenelse{\equal{\ff@y}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@posy\endcsname +{\ff@y}% +\expandafter\setlength\csname col@\romannumeral#1@eveny\endcsname +{\ff@y}}% +\ifthenelse{\equal{\ff@evenx}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@evenx\endcsname +{\ff@evenx}}% +\ifthenelse{\equal{\ff@eveny}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@eveny\endcsname +{\ff@eveny}}% +\ifthenelse{\equal{\ff@oddx}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@posx\endcsname +{\ff@oddx}}% +\ifthenelse{\equal{\ff@oddy}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@posy\endcsname +{\ff@oddy}}% +\ifthenelse{\equal{\ff@label}{}}{}{% +\@s@tflowframeid{#1}[\ff@label]}% +\ifthenelse{\equal{\ff@frametype}{}}{}{% +\expandafter\edef\csname @ff@frametype@\romannumeral#1\endcsname +{\ff@frametype}}% +\ifthenelse{\equal{\ff@col}{}}{}{% +\expandafter\@setframecol\ff@col\end{#1}{col}{ff}}% +\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\expandafter\@setframecol\ff@txtcol\end{#1}{txtcol}{ff}}% +\ifthenelse{\equal{\ff@backcol}{}}{}{% +\expandafter\@setframecol\ff@backcol\end{#1}{backcol}{ff}}% +\ifthenelse{\equal{\ff@margin}{}}{}{% +\expandafter\xdef\csname @ff@margin@\romannumeral#1\endcsname +{\ff@margin}}% +\ifthenelse{\equal{\ff@pages}{}}{}{% +\expandafter\xdef\csname @ff@pages@\romannumeral#1\endcsname +{\ff@pages}}% +\ifthenelse{\equal{\ff@offset}{}}{}{% +\expandafter\xdef\csname @ff@offset@\romannumeral#1\endcsname +{\ff@offset}}% +\ifthenelse{\equal{\ff@angle}{}}{}{% +\expandafter\xdef\csname @ff@angle@\romannumeral#1\endcsname +{\ff@angle}}% +\ifthenelse{\equal{\ff@clear}{}}{}{% +\PackageError{flowfram}% +{Key 'clear' not available for flow frames}{}}% +\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} +%\end{macro} +%\begin{macro}{\ffswapoddeven} +% Swap odd and even offsets for a given \gls{flow}. Do the main stuff for +% a given \gls{flow} \gls{idn}. +% \begin{macrocode} +\newcommand*{\@@flowframeswapcoords}[1]{% +\setlength{\@ff@tmp@x}% +{\csname col@\romannumeral#1@evenx\endcsname} +\expandafter\setlength\csname col@\romannumeral#1@evenx\endcsname +{\csname col@\romannumeral#1@posx\endcsname}% +\expandafter\setlength\csname col@\romannumeral#1@posx\endcsname +{\@ff@tmp@x}% +\setlength{\@ff@tmp@y}% +{\csname col@\romannumeral#1@eveny\endcsname} +\expandafter\setlength\csname col@\romannumeral#1@eveny\endcsname +{\csname col@\romannumeral#1@posy\endcsname}% +\expandafter\setlength\csname col@\romannumeral#1@posy\endcsname +{\@ff@tmp@y}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ffswapoddeven} +% Allow user to specify \gls{flow} either by \gls{idn} or \gls{idl}: +% \begin{macrocode} +\newcommand*{\ffswapoddeven}{% +\@ifstar\@sflowframeswapcoords\@flowframeswapcoords} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sflowframeswapcoords} +% Starred form +% \begin{macrocode} +\newcommand*{\@sflowframeswapcoords}[1]{% +\@for\@ff@id:=#1\do{% +\@flowframeid{\@ff@id}% +\@@flowframeswapcoords{\ff@id}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@flowframeswapcoords} +% Unstarred form: +% \begin{macrocode} +\newcommand*{\@flowframeswapcoords}[1]{% +\ifthenelse{\equal{#1}{all}}{% +\ff@id=0\relax +\whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax +\@@flowframeswapcoords{\ff@id}}% +}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxflow\TE@or\@colN=\c@maxflow}{% +\@@flowframeswapcoords{\@colN}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxflow + \def\@ff@numend{\c@maxflow}% +\fi +\@colN=\@ff@numstart +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@flowframeswapcoords{\@colN}% +\advance\@colN by 1\relax +}}}}} +% \end{macrocode} +%\end{macro} +% +% Allow user to get the dimensions of \gls{flow} (useful for +% \glspl{flow} created using "\Ncolumns" etc.) Only the \gls{idn} can +% be used for these commands. +%\begin{macro}{\flowframex} +% \begin{macrocode} +\newcommand*{\flowframex}[1]{% +\csname col@\romannumeral#1@posx\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\flowframey} +% \begin{macrocode} +\newcommand*{\flowframey}[1]{% +\csname col@\romannumeral#1@posy\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\flowframeevenx} +% \begin{macrocode} +\newcommand*{\flowframeevenx}[1]{% +\csname col@\romannumeral#1@evenx\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\flowframeeveny} +% \begin{macrocode} +\newcommand*{\flowframeeveny}[1]{% +\csname col@\romannumeral#1@eveny\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\flowframewidth} +% \begin{macrocode} +\newcommand{\flowframewidth}[1]{% +\csname colwidth\romannumeral#1\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\flowframeheight} +% \begin{macrocode} +\newcommand*{\flowframeheight}[1]{% +\csname colheight\romannumeral#1\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@setframecol} +% Set the colour of the frame, this is a little tricky +% because the model may need to be specified in square +% brackets. First check to see if a colour model has been +% specified +% \begin{macrocode} +\def\@setframecol{\@ifnextchar[\@@setframecol\@@setfr@mecol} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@setframecol} +% A colour model has been specified. +% \begin{macrocode} +\def\@@setframecol[#1]#2\end#3#4#5{% +\expandafter\edef\csname @#5@#4@\romannumeral#3\endcsname{% +[#1]{#2}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@setfr@mecol} +% A colour model has not been specified. +% \begin{macrocode} +\def\@@setfr@mecol#1\end#2#3#4{% +\expandafter\edef\csname @#4@#3@\romannumeral#2\endcsname{{#1}}} +% \end{macrocode} +%\end{macro} +% +% \subsection{Static Frames} +%\begin{macro}{\newstaticframe} +% Now deal with setting up the \glspl{static}. This is +% similar to the \glspl{flow}, except it has an +% associated \LaTeX\ savebox rather than a \TeX\ box. +% Syntax:\newline +% \cs{newstaticframe}\oarg{pages}\marg{width}\marg{height}\marg{x}\marg{y}\oarg{label}\par +% As with "\newflowframe", the final optional argument is +% dealt with at the end. +% \begin{macrocode} +\newcommand*{\newstaticframe}{\@n@wstaticframe} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@n@wstaticframe} +% \begin{macrocode} +\newcommand*{\@n@wstaticframe}{% +\global\advance\c@maxstatic by 1\relax +\newboolean{staticframe\romannumeral\c@maxstatic}% +\@ifstar\@snewstaticframe\@newstaticframe +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@snewstaticframe} +% Starred version (has a border): +% \begin{macrocode} +\newcommand{\@snewstaticframe}{% +\setboolean{staticframe\romannumeral\c@maxstatic}{true}% +\@@newstaticframe} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@newstaticframe} +% Unstarred version (no border): +% \begin{macrocode} +\newcommand{\@newstaticframe}{% +\setboolean{staticframe\romannumeral\c@maxstatic}{false}% +\@@newstaticframe} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@newstaticframe} +% Now set up the \gls{static}: +% \begin{macrocode} +\newcommand*{\@@newstaticframe}[5][all]{% +\expandafter +\newbox\csname @staticframe@\romannumeral\c@maxstatic\endcsname +\expandafter +\newlength\csname @sf@\romannumeral\c@maxstatic @posx\endcsname +\expandafter +\newlength\csname @sf@\romannumeral\c@maxstatic @posy\endcsname +\expandafter\setlength +\csname @sf@\romannumeral\c@maxstatic @posx\endcsname{#4}% +\expandafter\setlength +\csname @sf@\romannumeral\c@maxstatic @posy\endcsname{#5}% +\expandafter\newlength +\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname +\expandafter\newlength +\csname @sf@\romannumeral\c@maxstatic @eveny\endcsname +\expandafter\setlength +\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname{#4}% +\expandafter\setlength +\csname @sf@\romannumeral\c@maxstatic @eveny\endcsname{#5}% +{\@ff@tmp@x=#2\relax +\@ff@tmp@y=#3\relax +\expandafter +\xdef\csname @sf@dim@\romannumeral\c@maxstatic\endcsname{% +[c][\the\@ff@tmp@y][c]{\the\@ff@tmp@x}}}% +\expandafter +\def\csname @sf@col@\romannumeral\c@maxstatic\endcsname{% +\flowframecol}% +\expandafter +\def\csname @sf@txtcol@\romannumeral\c@maxstatic\endcsname{% +\flowframetextcol}% +\expandafter +\def\csname @sf@backcol@\romannumeral\c@maxstatic\endcsname{% +{none}}% +\expandafter +\xdef\csname @sf@pages@\romannumeral\c@maxstatic\endcsname{#1}% +\expandafter +\gdef\csname @sf@offset@\romannumeral\c@maxstatic\endcsname{% +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}% +\setboolean{@sf@clear@\romannumeral\c@maxstatic}{false} +\@ifnextchar[{\@s@tstaticframeid{\c@maxstatic}}% +{\@s@tstaticframeid{\c@maxstatic}[\number\c@maxstatic]}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@s@tstaticframeid} +% Set the label for the \gls{static}: +% \begin{macrocode} +\def\@s@tstaticframeid#1[#2]{% +\edef\ff@label{#2}% +\@sf@checkuniqueidl{#1}{\ff@label}% +\expandafter +\xdef\csname @sf@id@\romannumeral#1\endcsname{\ff@label}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sf@checkuniqueidl} +% Check \gls{idl} "#2" for \gls{static} "#1" is unique +% \begin{macrocode} +\newcommand*{\@sf@checkuniqueidl}[2]{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{% +\advance\@colN by 1\relax +\ifnum\@colN=#1\relax +\else +\ifthenelse{% +\equal{#2}{\csname @sf@id@\romannumeral\@colN\endcsname}}{% +\PackageError{flowfram}{Static frame IDL '#2' already defined}{% +You can't assign this label, as it is already defined +for static frame \number\@colN}}{}% +\fi +}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getstaticlabel} +%\changes{1.11}{2008/06/27}{new} +%\cs{getstaticlabel}\marg{idn} +% Gets the \gls{idl} for the \gls{static} identified by its +% \gls{idn}. +% \begin{macrocode} +\newcommand*{\getstaticlabel}[1]{% +\csname @sf@id@\romannumeral#1\endcsname} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getstaticid} +%\changes{1.11}{2008/06/27}{new} +%\cs{getstaticid}\marg{cmd}\marg{idl} +% Gets the \gls{idn} for the \gls{static} identified by its +% \gls{idl} and stores in \meta{cmd} which must be a control +% sequence. +% \begin{macrocode} +\newcommand*{\getstaticid}[2]{% +\@staticframeid{#2}\edef#1{\number\ff@id}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@staticframeid} +% Work out the \gls{idn} of the \gls{static} with the +% given label. This iterates through each \gls{static}, +% so if there are a lot of \glspl{static}, it may take a while. +% The \gls{idn} stored in "\ff@id". +% \begin{macrocode} +\newcommand*{\@staticframeid}[1]{\@colN=0\relax +\ff@id=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax +\ifthenelse{% +\equal{#1}{\csname @sf@id@\romannumeral\@colN\endcsname}}{% +\ff@id=\@colN\relax +% break out of loop +\@colN=\c@maxstatic}{}}% +\ifnum\ff@id=0\PackageError{flowfram}{Can't find static frame +id '#1'}{}\fi} +% \end{macrocode} +%\end{macro} +% +% Make it easier to get the x and y values for static +% frames. (Width and height stored differently.) +%\begin{macro}{\staticframex} +% \begin{macrocode} +\newcommand*{\staticframex}[1]{% +\csname @sf@\romannumeral#1@posx\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\staticframey} +% \begin{macrocode} +\newcommand*{\staticframey}[1]{% +\csname @sf@\romannumeral#1@posy\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\staticframeevenx} +% \begin{macrocode} +\newcommand*{\staticframeevenx}[1]{% +\csname @sf@\romannumeral#1@evenx\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\staticframeeveny} +% \begin{macrocode} +\newcommand*{\staticframeeveny}[1]{% +\csname @sf@\romannumeral#1@eveny\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\setallstaticframes} +% Modify the settings for all the \glspl{static}: +% \begin{macrocode} +\newcommand*{\setallstaticframes}[1]{% +\@colN=0\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax +\@@setstaticframe{\@colN}{#1}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\setstaticframe} +% Modify the settings for the specified \glspl{static}: +% \begin{macrocode} +\newcommand*{\setstaticframe}{% +\@ifstar\@ssetstaticframe\@setstaticframe} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ssetstaticframe} +% Starred version: Iterate through the comma-separated +% list of labels. +% \begin{macrocode} +\newcommand*{\@ssetstaticframe}[2]{% +\@for\@ff@id:=#1\do{% +\@staticframeid{\@ff@id}% +\@@setstaticframe{\ff@id}{#2}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@setstaticframe} +% Unstarred version. Iterate through the comma-separated +% list of \glspl{idn}, and check for number ranges. +% Ensures that number ranges do not lie out of bounds. +% \begin{macrocode} +\newcommand*{\@setstaticframe}[2]{% +\ifthenelse{\equal{#1}{all}}{% +\setallstaticframes{#2}}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxstatic\TE@or\@colN=\c@maxstatic}{% +\@@setstaticframe{\@colN}{#2}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxstatic\relax + \def\@ff@numend{\c@maxstatic}% +\fi +\@colN=\@ff@numstart\relax +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@setstaticframe{\@colN}{#2}% +\advance\@colN by 1\relax +}}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@setstaticframe} +% Modify the settings for the \gls{static} whose \gls{idn}\ +% is given by the first argument. +% \begin{macrocode} +\newcommand*{\@@setstaticframe}[2]{% +\expandafter\expandafter\expandafter +\@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@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{}% +\setkeys{flowframe}{#2}% +\ifthenelse{\equal{\ff@frame}{}}{}{% +\setboolean{staticframe\romannumeral#1}{\ff@frame}}% +\ifthenelse{\equal{\ff@x}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@posx\endcsname +{\ff@x}% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@evenx\endcsname +{\ff@x}}% +\ifthenelse{\equal{\ff@y}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@posy\endcsname +{\ff@y}% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@eveny\endcsname +{\ff@y}}% +\ifthenelse{\equal{\ff@evenx}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@evenx\endcsname +{\ff@evenx}}% +\ifthenelse{\equal{\ff@eveny}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@eveny\endcsname +{\ff@eveny}}% +\ifthenelse{\equal{\ff@oddx}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@posx\endcsname +{\ff@oddx}}% +\ifthenelse{\equal{\ff@oddy}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@posy\endcsname +{\ff@oddy}}% +\expandafter +\xdef\csname @sf@dim@\romannumeral#1\endcsname{% +[c][\ff@height][\ff@valign]{\ff@width}}% +\ifthenelse{\equal{\ff@frametype}{}}{}{% +\expandafter +\xdef\csname @sf@frametype@\romannumeral#1\endcsname{% +\ff@frametype}}% +\ifthenelse{\equal{\ff@label}{}}{}{% +\@s@tstaticframeid{#1}[\ff@label]} +\ifthenelse{\equal{\ff@col}{}}{}{% +\expandafter\@setframecol\ff@col\end{#1}{col}{sf}}% +\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\expandafter\@setframecol\ff@txtcol\end{#1}{txtcol}{sf}}% +\ifthenelse{\equal{\ff@backcol}{}}{}{% +\expandafter\@setframecol\ff@backcol\end{#1}{backcol}{sf}}% +\ifthenelse{\equal{\ff@offset}{}}{}{% +\expandafter +\xdef\csname @sf@offset@\romannumeral#1\endcsname{\ff@offset}}% +\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}}% +\ifthenelse{\equal{\ff@clear}{}}{}{% +\setboolean{@sf@clear@\romannumeral#1}{\ff@clear}}% +\ifthenelse{\equal{\ff@margin}{}}{}{% +\PackageError{flowfram}{Key 'margin' not available for +static frames}{Static frames don't have marginal notes}}% +\ifthenelse{\equal{\ff@style}{}}{}{% +\PackageError{flowfram}{Key 'style' not available for +static frames}{}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\simpar} +% Simulate paragraph break inside "\shapepar" +% \begin{macrocode} + %\newcommand*{\simpar}{\hfil\vadjust{\vskip\parskip}\break\indent} +\newcommand*{\simpar}{\hfill\\\indent\mbox{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ffpshpar} +% Provide means to allow parshape to be carried over a paragraph +% break. +% \begin{macrocode} +\let\FLForgpar\par +\newcommand{\ffpshpar}{\edef\flf@next{\hangafter=\the\hangafter +\hangindent=\the\hangindent}\FLForgpar\flf@next +\edef\flf@next{\prevgraf=\the\prevgraf}\@ff@parshape\indent\mbox{}\flf@next} +% \end{macrocode} +%\end{macro} +% +% Provide a means to have section headings within "\parshape". +%\begin{macro}{\@ff@parshape} +% \begin{macrocode} +\def\@ff@parshape{\parshape=0} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@sectionhead} +% \begin{macrocode} +\newcommand*{\@ff@sectionhead}[1]{% +\def\ff@sechead{#1}% +\ffpshpar +\@ifstar{\@s@ff@heading}{\@dblarg\@ff@heading}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@s@ff@heading} +% \begin{macrocode} +\def\@s@ff@heading#1{% +\@ifundefined{@ff@old\ff@sechead}{\PackageError{flowfram}{Unknown +heading command '\ff@sechead'}{}}{% +\begingroup +\edef\flf@next{\hangafter=\the\hangafter +\hangindent=\the\hangindent}\FLForgpar\flf@next +\let\par=\FLForgpar +\edef\flf@next{\prevgraf=\the\prevgraf}% +\csname @ff@old\ff@sechead\endcsname*{\@ff@parshape\flf@next +#1}% +\xdef\flf@next{\@ff@parshape +\prevgraf=\the\prevgraf}% +\endgroup +}% +\mbox{}\flf@next\let\flf@next\undefined} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@heading} +% \begin{macrocode} +\def\@ff@heading[#1]#2{% +\@ifundefined{@ff@old\ff@sechead}{\PackageError{flowfram}{Unknown +heading command '\ff@sechead'}{}}{% +\begingroup +\edef\flf@next{\hangafter=\the\hangafter +\hangindent=\the\hangindent}\FLForgpar\flf@next +\let\par=\FLForgpar +\edef\flf@next{\prevgraf=\the\prevgraf}% +\csname @ff@old\ff@sechead\endcsname[#1]{\@ff@parshape\flf@next +#2}% +\xdef\flf@next{\@ff@parshape +\prevgraf=\the\prevgraf}% +\endgroup}% +\mbox{}\flf@next\let\flf@next\undefined} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@setsecthead} +% 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} +%\end{macro} +%\begin{macro}{\@ff@getshape} +% 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} +%\end{macro} +%\begin{macro}{\@ff@disablesec} +% 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} +%\end{macro} +% +%\begin{environment}{staticcontents} +% Set the contents of the \gls{static} given by its \gls{idn}. +% Syntax: "\begin{staticcontents}"\marg{idn}. +% \begin{macrocode} +\newbox\staticframe +\newenvironment{staticcontents}[1]{% +\let\continueonframe=\@staticcontinueonframe +\@beginstaticcontents{#1}% +}{% +\@endstaticcontents +\ignorespaces} +% \end{macrocode} +%\end{environment} +%\begin{environment}{staticcontents*} +% Set the contents of the \gls{static} given by its \gls{idl}. +% Syntax: "\begin{staticcontents*}"\marg{label}. +% \begin{macrocode} +\newenvironment{staticcontents*}[1]{\@staticframeid{#1}% +\let\continueonframe=\@staticscontinueonframe +\@beginstaticcontents{\ff@id}% +}{% +\@endstaticcontents +\ignorespaces} +% \end{macrocode} +%\end{environment} +% +% Begin staticcontents stuff. +% \begin{macrocode} +\newcommand{\@beginstaticcontents}[1]{% +\@ifundefined{@staticframe@\romannumeral#1}{% +\PackageError{flowfram}{Static frame '#1' not defined}{}}{}% +\expandafter\let\expandafter\@ff@parshape\csname @sf@shape@\romannumeral#1\endcsname +\expandafter\@ff@getshape\@ff@parshape\relax +\ifcase\ff@shape +% no shape +\edef\@sf@mpg{% +\noexpand +\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname +\noexpand\begingroup +\noexpand\let\noexpand\FLForgpar=\noexpand\par +}% +\or +% \parshape +\edef\@sf@mpg{% +\noexpand +\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname +\@ff@parshape +\noexpand\begingroup +\noexpand\let\noexpand\FLForgpar=\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\noindent +\@sf@mpg +\setlength\parindent\sdfparindent +} +% \end{macrocode} +% End staticcontents stuff +% \begin{macrocode} +\newcommand*{\@endstaticcontents}{% +\ifnum\ff@shape=2\par +\else\FLForgpar\fi\endgroup\end{minipage}\end{lrbox}% +\expandafter\global\expandafter\sbox\@sf@thisframe{% +\usebox\staticframe}} +% \end{macrocode} +% +%\begin{macro}{\setstaticcontents} +% Provide a command version. +% Syntax: \cs{setstaticcontents}\marg{idn}\marg{text}. +% \begin{macrocode} +\newcommand{\setstaticcontents}{% +\@ifstar\@sstaticconts\@staticconts} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sstaticconts} +% Starred version: \gls{static} identified by label. +% \begin{macrocode} +\newcommand{\@sstaticconts}[2]{\begin{staticcontents*}{#1}% +#2\end{staticcontents*}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@staticconts} +% Unstarred version: \gls{static} identified by \gls{idn}. +% \begin{macrocode} +\newcommand{\@staticconts}[2]{\begin{staticcontents}{#1}% +#2\end{staticcontents}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@staticframeswapcoords} +% Swap odd and even offsets for a given \gls{static}. Do the main stuff for +% a given \gls{static} \gls{idn}. +% \begin{macrocode} +\newcommand*{\@@staticframeswapcoords}[1]{% +\setlength{\@ff@tmp@x}% +{\csname @sf@\romannumeral#1@evenx\endcsname} +\expandafter\setlength\csname @sf@\romannumeral#1@evenx\endcsname +{\csname @sf@\romannumeral#1@posx\endcsname}% +\expandafter\setlength\csname @sf@\romannumeral#1@posx\endcsname +{\@ff@tmp@x}% +\setlength{\@ff@tmp@y}% +{\csname @sf@\romannumeral#1@eveny\endcsname} +\expandafter\setlength\csname @sf@\romannumeral#1@eveny\endcsname +{\csname @sf@\romannumeral#1@posy\endcsname}% +\expandafter\setlength\csname @sf@\romannumeral#1@posy\endcsname +{\@ff@tmp@y}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\sfswapoddeven} +% Allow user to specify \gls{flow} either by \gls{idn} or \gls{idl}: +% \begin{macrocode} +\newcommand*{\sfswapoddeven}{% +\@ifstar\@sstaticframeswapcoords\@staticframeswapcoords} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sstaticframeswapcoords} +% Starred form +% \begin{macrocode} +\newcommand*{\@sstaticframeswapcoords}[1]{% +\@for\@ff@id:=#1\do{% +\@staticframeid{\@ff@id}% +\@@staticframeswapcoords{\ff@id}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@staticframeswapcoords} +% Unstarred form: +% \begin{macrocode} +\newcommand*{\@staticframeswapcoords}[1]{% +\ifthenelse{\equal{#1}{all}}{% +\ff@id=0\relax +\whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax +\@@staticframeswapcoords{\ff@id}}% +}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxflow\TE@or\@colN=\c@maxflow}{% +\@@staticframeswapcoords{\@colN}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxflow + \def\@ff@numend{\c@maxflow}% +\fi +\@colN=\@ff@numstart +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@staticframeswapcoords{\@colN}% +\advance\@colN by 1\relax +}}}}} +% \end{macrocode} +%\end{macro} +% +% \subsection{Dynamic Frames} +% Now deal with the \glspl{dynamic}. These are very similar +% to the \glspl{static}, but instead of having a savebox, +% the contents of the \gls{dynamic} are stored in a macro. +%\begin{macro}{\newdynamicframe} +% Syntax:\newline +% \cs{newdynamicframe}\oarg{pages}\marg{width}\marg{height}\marg{x}\marg{y}\oarg{label} +% \begin{macrocode} +\newcommand*{\newdynamicframe}{% +\@n@wdynamicframe} +\newcommand*{\@n@wdynamicframe}{% +\global\advance\c@maxdynamic by 1\relax +\newboolean{dynamicframe\romannumeral\c@maxdynamic} +\@ifstar\@snewdynamicframe\@newdynamicframe +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@snewdynamicframe} +% Starred version: has a border. +% \begin{macrocode} +\newcommand*{\@snewdynamicframe}{% +\setboolean{dynamicframe\romannumeral\c@maxdynamic}{true}% +\@@newdynamicframe} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@newdynamicframe} +% Unstarred version: no border. +% \begin{macrocode} +\newcommand*{\@newdynamicframe}{% +\setboolean{dynamicframe\romannumeral\c@maxdynamic}{false}% +\@@newdynamicframe} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@newdynamicframe} +% Create new \gls{dynamic}: +% \begin{macrocode} +\newcommand*{\@@newdynamicframe}[5][all]{% +\expandafter +\gdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{}% +\expandafter +\newlength\csname @df@\romannumeral\c@maxdynamic @posx\endcsname +\expandafter +\newlength\csname @df@\romannumeral\c@maxdynamic @posy\endcsname +\expandafter\setlength +\csname @df@\romannumeral\c@maxdynamic @posx\endcsname{#4}% +\expandafter\setlength +\csname @df@\romannumeral\c@maxdynamic @posy\endcsname{#5}% +\expandafter\newlength +\csname @df@\romannumeral\c@maxdynamic @evenx\endcsname +\expandafter\newlength +\csname @df@\romannumeral\c@maxdynamic @eveny\endcsname +\expandafter\setlength +\csname @df@\romannumeral\c@maxdynamic @evenx\endcsname{#4}% +\expandafter\setlength +\csname @df@\romannumeral\c@maxdynamic @eveny\endcsname{#5}% +{\@ff@tmp@x=#2\relax +\@ff@tmp@y=#3\relax +\expandafter +\xdef\csname @df@dim@\romannumeral\c@maxdynamic\endcsname{% +[c][\the\@ff@tmp@y][t]{\the\@ff@tmp@x}}}% +\expandafter +\gdef\csname @df@col@\romannumeral\c@maxdynamic\endcsname{% +\flowframecol}% +\expandafter +\gdef\csname @df@txtcol@\romannumeral\c@maxdynamic\endcsname{% +\flowframetextcol}% +\expandafter +\gdef\csname @df@backcol@\romannumeral\c@maxdynamic\endcsname{% +{none}}% +\expandafter +\gdef\csname @df@pages@\romannumeral\c@maxdynamic\endcsname{#1}% +\expandafter +\gdef\csname @df@frametype@\romannumeral\c@maxdynamic\endcsname{% +fbox}% +\expandafter +\gdef\csname @df@style@\romannumeral\c@maxdynamic\endcsname{relax}% +\expandafter +\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}}% +{\@s@tdynamicframeid{\c@maxdynamic}[\number\c@maxdynamic]}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@s@tdynamicframeid} +% Set the label for the given \gls{dynamic}: +% \begin{macrocode} +\def\@s@tdynamicframeid#1[#2]{% +\edef\ff@label{#2}% +\@df@checkuniqueidl{#1}{\ff@label}% +\expandafter +\xdef\csname @df@id@\romannumeral#1\endcsname{\ff@label}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@df@checkuniqueidl} +% Check \gls{idl} "#2" for \gls{static} "#1" is unique +% \begin{macrocode} +\newcommand*{\@df@checkuniqueidl}[2]{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{% +\advance\@colN by 1\relax +\ifnum\@colN=#1\relax +\else +\ifthenelse{\equal{#2}% +{\csname @df@id@\romannumeral\@colN\endcsname}}{% +\PackageError{flowfram}{Dynamic frame IDL '#2' already defined}{% +You can't assign this label, as it is already defined +for dynamic frame \number\@colN}}{}% +\fi +}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getdynamiclabel} +%\changes{1.11}{2008/06/27}{new} +%\cs{getdynamiclabel}\marg{idn} +% Gets the \gls{idl} for the \gls{dynamic} identified by its +% \gls{idn}. +% \begin{macrocode} +\newcommand*{\getdynamiclabel}[1]{% +\csname @df@id@\romannumeral#1\endcsname} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getdynamicid} +%\changes{1.11}{2008/06/27}{new} +%\cs{getdynamicid}\marg{cmd}\marg{idl} +% Gets the \gls{idn} for the \gls{dynamic} identified by its +% \gls{idl} and stores in \meta{cmd} which must be a control +% sequence. +% \begin{macrocode} +\newcommand*{\getdynamicid}[2]{% +\@dynamicframeid{#2}\edef#1{\number\ff@id}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@dynamicframeid} +% Determine the \gls{idn} of the \gls{dynamic} from its label. +% The \gls{idn} is stored in "\ff@id". +% \begin{macrocode} +\newcommand*{\@dynamicframeid}[1]{\@colN=0\relax +\ff@id=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax +\ifthenelse{% +\equal{#1}{\csname @df@id@\romannumeral\@colN\endcsname}}{% +\ff@id=\@colN\relax +% break out of loop +\@colN=\c@maxdynamic}{}}% +\ifnum\ff@id=0\PackageError{flowfram}{Can't find dynamic frame +id '#1'}{}\fi} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@getframeid} +% \cs{@getframeid}\marg{type}\marg{idl} +% +% Gets the \gls{idl} for the frame of type \meta{type} whose \gls{idl} +% is given by \meta{idl}. The \gls{idn} is stored in "\ff@id". +% \begin{macrocode} +\newcommand*{\@getframeid}[2]{% +\@ifdefined{@#1frameid}{\csname @#1frameid\endcsname{#2}}{% +\PackageError{flowfram}{Unknown frame type `#1'}{Frame types can +be one of: flow, static or dynamic}}} +% \end{macrocode} +%\end{macro} +% +% Make it easier to get the x and y values for dynamic +% frames. (Width and height stored differently.) +%\begin{macro}{\dynamicframex} +% \begin{macrocode} +\newcommand*{\dynamicframex}[1]{% +\csname @df@\romannumeral#1@posx\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\dynamicframey} +% \begin{macrocode} +\newcommand*{\dynamicframey}[1]{% +\csname @df@\romannumeral#1@posy\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\dynamicframeevenx} +% \begin{macrocode} +\newcommand*{\dynamicframeevenx}[1]{% +\csname @df@\romannumeral#1@evenx\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\dynamicframeeveny} +% \begin{macrocode} +\newcommand*{\dynamicframeeveny}[1]{% +\csname @df@\romannumeral#1@eveny\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\setalldynamicframes} +% Change the settings for all the \glspl{dynamic}: +% \begin{macrocode} +\newcommand*{\setalldynamicframes}[1]{% +\@colN=0\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax +\@@setdynamicframe{\@colN}{#1}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\setdynamicframe} +% Change the settings for specified \glspl{dynamic}: +% \begin{macrocode} +\newcommand*{\setdynamicframe}{% +\@ifstar\@ssetdynamicframe\@setdynamicframe} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ssetdynamicframe} +% Starred version: iterate through comma-separated list +% of labels. +% \begin{macrocode} +\newcommand*{\@ssetdynamicframe}[2]{% +\@for\@ff@id:=#1\do{% +\@dynamicframeid{\@ff@id}% +\@@setdynamicframe{\ff@id}{#2}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@setdynamicframe} +% Unstarred version: iterate through comma-separated list +% of ID numbers. Include provision for number ranges. +% If necessary, modify number ranges to ensure they are valid. +% \begin{macrocode} +\newcommand*{\@setdynamicframe}[2]{% +\ifthenelse{\equal{#1}{all}}{% +\setalldynamicframes{#2}}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxdynamic\TE@or\@colN=\c@maxdynamic}{% +\@@setdynamicframe{\@colN}{#2}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxdynamic\relax + \def\@ff@numend{\c@maxdynamic}% +\fi +\@colN=\@ff@numstart\relax +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@setdynamicframe{\@colN}{#2}% +\advance\@colN by 1\relax +}}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@setdynamicframe} +% Change the setting for the \gls{dynamic} given by its \gls{idn}. +%\changes{1.11}{2008/06/27}{removed unwanted space} +%\changes{1.11}{2008/06/27}{fixed bug in clear key} +% \begin{macrocode} +\newcommand*{\@@setdynamicframe}[2]{% +\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@shape{0}% +\setkeys{flowframe}{#2}% +\ifthenelse{\equal{\ff@frame}{}}{}{% +\setboolean{dynamicframe\romannumeral#1}{\ff@frame}}% +\ifthenelse{\equal{\ff@x}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@posx\endcsname{\ff@x}% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@evenx\endcsname{\ff@x}}% +\ifthenelse{\equal{\ff@y}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@posy\endcsname{\ff@y}% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@eveny\endcsname{\ff@y}}% +\ifthenelse{\equal{\ff@evenx}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@evenx\endcsname{\ff@evenx}}% +\ifthenelse{\equal{\ff@eveny}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@eveny\endcsname{\ff@eveny}}% +\ifthenelse{\equal{\ff@oddx}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@posx\endcsname{\ff@oddx}}% +\ifthenelse{\equal{\ff@oddy}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@posy\endcsname{\ff@oddy}}% +\expandafter\xdef\csname @df@dim@\romannumeral#1\endcsname{% +[c][\ff@height][\ff@valign]{\ff@width}}% +\ifthenelse{\equal{\ff@label}{}}{}{% +\@s@tdynamicframeid{#1}[\ff@label]}% +\ifthenelse{\equal{\ff@frametype}{}}{}{% +\expandafter +\xdef\csname @df@frametype@\romannumeral#1\endcsname{% +\ff@frametype}}% +\ifthenelse{\equal{\ff@col}{}}{}{% +\expandafter\@setframecol\ff@col\end{#1}{col}{df}}% +\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\expandafter\@setframecol\ff@txtcol\end{#1}{txtcol}{df}}% +\ifthenelse{\equal{\ff@backcol}{}}{}{% +\expandafter\@setframecol\ff@backcol\end{#1}{backcol}{df}}% +\ifthenelse{\equal{\ff@offset}{}}{}{% +\expandafter +\xdef\csname @df@offset@\romannumeral#1\endcsname{\ff@offset}}% +\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}}% +\ifthenelse{\equal{\ff@style}{}}{}{% +\@ifundefined{\ff@style}{\PackageError{flowfram}% +{Unknown style '\ff@style'}{The command \expandafter +\string\csname\ff@style\endcsname\space has not been defined}}{% +\expandafter +\xdef\csname @df@style@\romannumeral#1\endcsname{\ff@style}}}% +\ifthenelse{\equal{\ff@clear}{}}{}{% +\setboolean{@df@clear@\romannumeral#1}{\ff@clear}% +}% +\ifthenelse{\equal{\ff@margin}{}}{}{% +\PackageError{flowfram}{Key 'margin' not available for dynamic +frames}{dynamic frames don't have marginal notes}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@dynamicframeswapcoords} +% Swap odd and even offsets for a given \gls{static}. Do the main stuff for +% a given \gls{static} \gls{idn}. +% \begin{macrocode} +\newcommand*{\@@dynamicframeswapcoords}[1]{% +\setlength{\@ff@tmp@x}% +{\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}% +\expandafter\setlength +\csname @df@\romannumeral#1@eveny\endcsname +{\csname @df@\romannumeral#1@posy\endcsname}% +\expandafter\setlength\csname @df@\romannumeral#1@posy\endcsname +{\@ff@tmp@y}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\dfswapoddeven} +% Allow user to specify \gls{flow} either by \gls{idn} or \gls{idl}: +% \begin{macrocode} +\newcommand*{\dfswapoddeven}{% +\@ifstar\@sdynamicframeswapcoords\@dynamicframeswapcoords} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sdynamicframeswapcoords} +% Starred form +% \begin{macrocode} +\newcommand*{\@sdynamicframeswapcoords}[1]{% +\@for\@ff@id:=#1\do{% +\@dynamicframeid{\@ff@id}% +\@@dynamicframeswapcoords{\ff@id}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@dynamicframeswapcoords} +% Unstarred form: +% \begin{macrocode} +\newcommand*{\@dynamicframeswapcoords}[1]{% +\ifthenelse{\equal{#1}{all}}{% +\ff@id=0\relax +\whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax +\@@dynamicframeswapcoords{\ff@id}}% +}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxflow\TE@or\@colN=\c@maxflow}{% +\@@dynamicframeswapcoords{\@colN}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxflow + \def\@ff@numend{\c@maxflow}% +\fi +\@colN=\@ff@numstart +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@dynamicframeswapcoords{\@colN}% +\advance\@colN by 1\relax +}}}}} +% \end{macrocode} +%\end{macro} +% Set the contents of a \gls{dynamic}. +% +%\begin{environment}{dynamiccontents} +% Syntax: "\begin{dynamiccontents}"\marg{idn} +% +% The contents of the \env{dynamiccontents} environment needs +% to be stored in the control sequence "\@dynamicframe@"\meta{rn} +% (where \meta{rn} is the \meta{idn} as a roman numeral.) +% \begin{macrocode} +\newenvironment{dynamiccontents}[1]{% +\def\@flf@{dynamiccontents}% +\xdynamiccontents{#1}}{% +\endxdynamiccontents +} +% \end{macrocode} +%\end{environment} +% Token to store contents of environment: +% \begin{macrocode} +\newtoks\@dynamictok +% \end{macrocode} +% Start of the environment (unstarred): +% \begin{macrocode} +\def\xdynamiccontents#1{% +\def\@flf@idn{#1}% +\@dynamictok{}\@flf@get@body +} +% \end{macrocode} +% Get the body of the environment: +% \begin{macrocode} +\long\def\@flf@get@body#1\end{% +\@flf@checkcontinued#1\continueonframe\@nil +\ifdfcontinued + \expandafter\flf@ta\expandafter{\@flf@tmpa}% + \edef\@flf@tmp{\the\@dynamictok\the\flf@ta}% + \@dynamictok\expandafter{\@flf@tmp}% +\else + \@dynamictok\expandafter{\the\@dynamictok#1}% +\fi +\@flf@find@end} +% \end{macrocode} +% Check if \cs{continueonframe} has been used. +% \begin{macrocode} +\newif\ifdfcontinued +\long\def\@flf@checkcontinued#1\continueonframe#2\@nil{% +\long\def\@flf@tmpa{#1}\long\def\@flf@tmpb{#2}% +\ifx\@flf@tmpb\@lempty + \dfcontinuedfalse +\else + \dfcontinuedtrue + \flf@getcontargs#2\@ff@text\@ff@nextid\@ff@rest +\fi +} +% \end{macrocode} +% Long equivalent of \cs{@empty}: +% \begin{macrocode} +\long\def\@lempty{} +% \end{macrocode} +% Get the first optional argument and store in the forth argument +% (which should be a control sequence). Get the second argument and +% store in the fifth argument (which should be a control sequence). +% Get the third argument and +% store in the sixth argument (which should be a control sequence). +% \begin{macrocode} +\def\flf@getcontargs{% +\@ifnextchar[{\@flf@getcontargs}{\@flf@getcontargs[]}} +% \end{macrocode} +% \begin{macrocode} +\long\def\@flf@getcontargs[#1]#2#3\continueonframe#4#5#6{% +\def#4{#1}\def#5{#2}\def#6{#3}% +} +% \end{macrocode} +% Find the end of the environment: +% \begin{macrocode} +\def\@flf@find@end#1{% +\def\@tempa{#1}% +\global\let\flf@next=\relax +\ifdfcontinued + \@dynamictok\expandafter + {\the\@dynamictok\ffcontinuedtextlayout}% + \protected@edef\@tmpa{\the\@dynamictok{\@ff@text}}% + \@dynamictok\expandafter{\@tmpa}% + \toks@\expandafter{\@ff@rest}% + \edef\flf@next{\noexpand\@flf@get@body\noexpand\end{#1}% + \noexpand\begin{#1}{\@ff@nextid}\noexpand\par + \noexpand\noindent\noexpand\ignorespaces + \the\toks@\noexpand\end{#1}}% +\else + \ifx\@tempa\@flf@ + \let\flf@next=\@flf@endxdynamiccontents + \else + \@dynamictok\expandafter + {\the\@dynamictok\end{#1}}% + \let\flf@next=\@flf@get@body + \fi +\fi +\flf@next +} +% \end{macrocode} +% End of the environment: +% \begin{macrocode} +\let\endxdynamiccontents\relax +\def\@flf@endxdynamiccontents{% +\ifnum\@flf@idn>\c@maxdynamic + \PackageError{flowfram}{Dynamic frame \number\@flf@idn\ does not exist}{% + You have specified dynamic frame number \number\@flf@idn, but there are + only \number\c@maxdynamic\space dynamic frames currently defined}% +\else + \expandafter + \xdef\csname @dynamicframe@\romannumeral\@flf@idn\endcsname{% + \the\@dynamictok}% + \expandafter +\fi +\expandafter\end\expandafter{\@flf@}% +} +% \end{macrocode} +%\begin{environment}{dynamiccontents*} +% Starred version +% \begin{macrocode} +\newenvironment{dynamiccontents*}[1]{% +\def\@flf@{dynamiccontents*}% +\@dynamicframeid{#1}% +\xdynamiccontents{\ff@id}}{% +\enddynamiccontents +} +% \end{macrocode} +%\end{environment} +% +%\begin{macro}{\setdynamiccontents} +% \begin{macrocode} +\newcommand{\setdynamiccontents}{% +\@ifstar\@ssetdynamiccontents\@setdynamiccontents} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ssetdynamiccontents} +% Starred version: identify \gls{dynamic} by its \gls{idl}: +% \begin{macrocode} +\newcommand{\@ssetdynamiccontents}[2]{% +\@dynamicframeid{#1}\@setdynamiccontents{\ff@id}{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@setdynamiccontents} +% Unstarred version: identify \gls{dynamic} by its \gls{idn}: +% \begin{macrocode} +\newcommand{\@setdynamiccontents}[2]{% +\ifnum#1>\c@maxdynamic +\PackageError{flowfram}{Dynamic frame \number#1\ does not exist}{% +You have specified dynamic frame number \number#1, but there are +only \number\c@maxdynamic\space dynamic frames currently defined}% +\else +\expandafter +\gdef\csname @dynamicframe@\romannumeral#1\endcsname{#2}% +\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\appenddynamiccontents} +% Append information to \gls{dynamic}. First check to +% see if starred or unstarred version is being used. +% \begin{macrocode} +\newcommand{\appenddynamiccontents}{% +\@ifstar\@sappenddynamic\@appenddynamic} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sappenddynamic} +% Starred version: find the \gls{idn} and pass it to +% the unstarred version. +% \begin{macrocode} +\newcommand{\@sappenddynamic}[2]{% +\@dynamicframeid{#1}\@appenddynamic{\ff@id}{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@appenddynamic} +% Unstarred version. +% \begin{macrocode} +\newcommand{\@appenddynamic}[2]{% +\ifnum#1>\c@maxdynamic + \PackageError{flowfram}{Dynamic frame \number#1 does not exist}{% + You have specified dynamic frame number \number#1, + but there are only + \number\c@maxdynamic\space dynamic frames currently defined}% +\else + \expandafter\@ff@addtolist + \csname @dynamicframe@\romannumeral#1\endcsname\entry{#2}% +\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@addtolist} +% Append "#2" onto the end of "#1". +% \begin{macrocode} +\newtoks\flf@ta \newtoks\flf@tb +\long\def\@ff@addtolist#1\entry#2{\flf@ta={{#2}}% +\flf@tb=\expandafter{#1}% +\xdef#1{\the\flf@tb\the\flf@ta}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\continueonframe} +% \cs{continueonframe}\oarg{text}\marg{id} +% Ends current \env{staticcontents} or \env{dynamiccontents} +% environment and starts environment of the same type for frame +% given by \meta{id}. Can only be used inside \env{staticcontents} +% or \env{dynamiccontents} environments. If the starred version of +% the environment is used, \marg{id} refers to the \gls{idl}, otherwise +% it refers to the \gls{idn} of the new frame. +% \begin{macrocode} +\newcommand{\continueonframe}{\PackageError{flowfram}{Can't continue +to new frame: not in static or dynamic frame}{% +\string\continueonframe\space may only +be used inside `staticcontents' or `dynamiccontents' environments +(of their starred versions)}} +% \end{macrocode} +%\end{macro} +% \cs{@scontinueonframe} and \cs{@continueonframe} are set +% by \env{staticcontents} and \env{dynamiccontents} environments +% (and their starred forms). +% +% Static starred version uses \gls{idl} +% \begin{macrocode} +\newcommand*{\@staticscontinueonframe}[2][]{% +\ffcontinuedtextlayout{#1}% +\end{staticcontents*}% +\begin{staticcontents*}{#2}\par\noindent\ignorespaces} +% \end{macrocode} +% Static unstarred version uses \gls{idn} +% \begin{macrocode} +\newcommand*{\@staticcontinueonframe}[2][]{% +\ffcontinuedtextlayout{#1}% +\end{staticcontents}% +\begin{staticcontents}{#2}\par\noindent\ignorespaces} +% \end{macrocode} +% +%\begin{macro}{\ffcontinuedtextlayout} +%Displays the continued text used by \cs{continueonframe}. +% \begin{macrocode} +\newcommand{\ffcontinuedtextlayout}[1]{% +\parfillskip=0pt\par\hfill\ffcontinuedtextfont{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ffcontinuedtextfont} +%Sets the font to display the continuation text used by +%\cs{continueonframe} +% \begin{macrocode} +\newcommand*{\ffcontinuedtextfont}[1]{\emph{\small #1}} +% \end{macrocode} +%\end{macro} +% +%\subsection{Determining Dimensions and Locations} +%\begin{macro}{\computeleftedgeodd} +% Compute the position of the left most edge of the page, +% relative to the left side of the \gls{typeblock}. Since odd and +% even pages may have a different offset if "\oddsidemargin" +% and "\evensidemargin" have different values, it is necessary +% to have two separate commands for odd and even pages. +% First the odd pages. +% \begin{macrocode} +\newcommand*{\computeleftedgeodd}[1]{% +\setlength{#1}{-1in}% +\addtolength{#1}{-\hoffset}% +\addtolength{#1}{-\oddsidemargin}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\computeleftedgeeven} +% Now for the even pages +% \begin{macrocode} +\newcommand*{\computeleftedgeeven}[1]{% +\setlength{#1}{-1in}% +\addtolength{#1}{-\hoffset}% +\addtolength{#1}{-\evensidemargin}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\computetopedge} +% Compute the top edge of the page, relative to the bottom of +% the \gls{typeblock}. +% \begin{macrocode} +\newcommand*{\computetopedge}[1]{% +\setlength{#1}{\textheight}% +\addtolength{#1}{\headheight}% +\addtolength{#1}{\headsep}% +\addtolength{#1}{1in}% +\addtolength{#1}{\voffset}% +\addtolength{#1}{\topmargin}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\computebottomedge} +% Compute the bottom edge of the page, relative to the bottom +% of the \gls{typeblock}. +% \begin{macrocode} +\newcommand*{\computebottomedge}[1]{% +\computetopedge{#1}% +\addtolength{#1}{-\paperheight}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\computerightedgeodd} +% Compute the right edge of the page, relative to the left edge +% of the \gls{typeblock}. Again, two commands are needed for odd +% and even pages. First the odd pages. +% \begin{macrocode} +\newcommand*{\computerightedgeodd}[1]{% +\computeleftedgeodd{#1}% +\addtolength{#1}{\paperwidth}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\computerightedgeeven} +% Now for the even pages. +% \begin{macrocode} +\newcommand*{\computerightedgeeven}[1]{% +\computeleftedgeeven{#1}% +\addtolength{#1}{\paperwidth}} +% \end{macrocode} +%\end{macro} +% Compute the minimum area surrounding the listed \glspl{flow}. +% Values stored in "\ffareawidth", "\ffareaheight", "\ffareax" +% and "\ffareay" +% \begin{macrocode} +\newlength\ffareawidth +\newlength\ffareaheight +\newlength\ffareax +\newlength\ffareay +% \end{macrocode} +%\begin{macro}{\computeflowframearea} +% Starred version identifies frame by \gls{idl}, unstarred +% version identifies frame by \gls{idn}. +% \begin{macrocode} +\newcommand*{\computeflowframearea}{% +\@ifstar\@scomputeffarea\@computeffarea} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@scomputeffarea} +% Starred version. +% \begin{macrocode} +\newcommand*{\@scomputeffarea}[1]{% +\setlength{\ffareax}{\paperwidth}% +\setlength{\ffareay}{\paperheight}% +\setlength{\@ff@tmp@x}{0pt}% +\setlength{\@ff@tmp@y}{0pt}% +\@for\@ff@id:=#1\do{\@flowframeid{\@ff@id}% +%\ff@id is the IDN +\ifnum\ffareax>\flowframex{\ff@id}% +\setlength{\ffareax}{\flowframex{\ff@id}}% +\fi +\ifnum\ffareay>\flowframey{\ff@id}% +\setlength{\ffareay}{\flowframey{\ff@id}}% +\fi +\setlength{\@ff@offset}{\flowframex{\ff@id}}% +\addtolength{@ff@offset}{\flowframewidth{\ff@id}}% +\ifnum\@ff@tmp@x<\@ff@offset +\setlength{\@ff@tmp@x}{\@ff@offset}% +\fi +\setlength{\@ff@offset}{\flowframey{\ff@id}}% +\addtolength{@ff@offset}{\flowframeheight{\ff@id}}% +\ifnum\@ff@tmp@y<\@ff@offset +\setlength{\@ff@tmp@y}{\@ff@offset}% +\fi +}% +\setlength{\ffareawidth}{\@ff@tmp@x}% +\addtolength{\ffareawidth}{-\ffareax}% +\setlength{\ffareaheight}{\@ff@tmp@y}% +\addtolength{\ffareaheight}{-\ffareay}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@computeffarea} +% Unstarred version. +% \begin{macrocode} +\newcommand*{\@computeffarea}[1]{% +\setlength{\ffareax}{\paperwidth}% +\setlength{\ffareay}{\paperheight}% +\setlength{\@ff@tmp@x}{0pt}% +\setlength{\@ff@tmp@y}{0pt}% +\@for\@ff@id:=#1\do{% +\ff@id=\@ff@id\relax +\setlength{\@ff@offset}{\flowframex{\ff@id}}% +\ifdim\ffareax>\@ff@offset +\setlength{\ffareax}{\@ff@offset}% +\fi +\setlength{\@ff@offset}{\flowframey{\ff@id}}% +\ifdim\ffareay>\@ff@offset +\setlength{\ffareay}{\@ff@offset}% +\fi +\setlength{\@ff@offset}{\flowframex{\ff@id}}% +\addtolength{\@ff@offset}{\flowframewidth{\ff@id}}% +\ifdim\@ff@tmp@x<\@ff@offset +\setlength{\@ff@tmp@x}{\@ff@offset}% +\fi +\setlength{\@ff@offset}{\flowframey{\ff@id}}% +\addtolength{\@ff@offset}{\flowframeheight{\ff@id}}% +\ifdim\@ff@tmp@y<\@ff@offset +\setlength{\@ff@tmp@y}{\@ff@offset}% +\fi +}% +\setlength{\ffareawidth}{\@ff@tmp@x}% +\addtolength{\ffareawidth}{-\ffareax}% +\setlength{\ffareaheight}{\@ff@tmp@y}% +\addtolength{\ffareaheight}{-\ffareay}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@swaplen} +% Swap the values of two lengths +% \begin{macrocode} +\newcommand*{\@ff@swaplen}[2]{% +\setlength{\@ff@tmp@x}{#1}% +\setlength{#1}{#2}% +\setlength{#2}{\@ff@tmp@x}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@ff@getdim} +% Get the dimensions for the given type of frame. +% The first parameter should be a number indictating +% type of frame : 1 (flow), 2 (static), 3 (dynamic). +% The second number is its \gls{idn}. Values are stored in +% "\ffareax", "\ffareay", "\ffareawidth" and "\ffareaheight". +% \begin{macrocode} +\newcommand*{\@ff@getdim}[2]{% +\ifnum#2<1\relax + \PackageError{flowfram}{Frame IDNs start from 1}{% + You have specified a frame IDN of '\number#2'}% +\fi +\ifcase#1\relax + \PackageError{flowfram}{Unknown frame ID type '#1'}{% + Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)}% +\or + \ifnum#2>\c@maxflow\relax + \PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{% + Flow frame IDNs go from 1 to \number\c@maxflow}% + \else + \setlength{\ffareax}{\flowframex{#2}}% + \setlength{\ffareay}{\flowframey{#2}}% + \setlength{\ffareawidth}{\flowframewidth{#2}}% + \setlength{\ffareaheight}{\flowframeheight{#2}}% + \fi +\or + \ifnum#2>\c@maxstatic\relax + \PackageError{flowfram}{Invalid static frame IDN '\number#2'}{% + Static frame IDNs go from 1 to \number\c@maxstatic}% + \else + \setlength{\ffareax}{\staticframex{#2}}% + \setlength{\ffareay}{\staticframey{#2}}% + \expandafter\expandafter\expandafter + \@ff@getstaticpos + \csname @sf@dim@\romannumeral#2\endcsname + \setlength{\ffareawidth}{\@ff@tmp@x}% + \setlength{\ffareaheight}{\@ff@tmp@y}% + \fi +\or + \ifnum#2>\c@maxdynamic\relax + \PackageError{flowfram}{Invalid dynamic frame IDN '\number#2'}{% + Dynamic frame IDNs go from 1 to \number\c@maxdynamic}% + \else + \setlength{\ffareax}{\dynamicframex{#2}}% + \setlength{\ffareay}{\dynamicframey{#2}}% + \expandafter\expandafter\expandafter + \@ff@getstaticpos + \csname @df@dim@\romannumeral#2\endcsname + \setlength{\ffareawidth}{\@ff@tmp@x}% + \setlength{\ffareaheight}{\@ff@tmp@y}% + \fi +\else + \PackageError{flowfram}{Unknown frame ID type '#1'}{% + Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)}% +\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@ff@getevendim} +%\changes{1.11}{2008/06/27}{new} +% Get the dimensions for the given type of frame on even pages. +% The first parameter should be a number indictating +% type of frame : 1 (flow), 2 (static), 3 (dynamic). +% The second number is its \gls{idn}. Values are stored in +% "\ffareax", "\ffareay", "\ffareawidth" and "\ffareaheight". +% \begin{macrocode} +\newcommand*{\@ff@getevendim}[2]{% +\ifnum#2<1\relax + \PackageError{flowfram}{Frame IDNs start from 1}{% + You have specified a frame IDN of '\number#2'}% +\fi +\ifcase#1\relax + \PackageError{flowfram}{Unknown frame ID type '#1'}{% + Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)} +\or + \ifnum#2>\c@maxflow + \PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{% + Flow frame IDNs go from 1 to \number\c@maxflow}% + \else + \setlength{\ffareax}{\flowframeevenx{#2}}% + \setlength{\ffareay}{\flowframeeveny{#2}}% + \setlength{\ffareawidth}{\flowframewidth{#2}}% + \setlength{\ffareaheight}{\flowframeheight{#2}}% + \fi +\or + \ifnum#2>\c@maxstatic\relax + \PackageError{flowfram}{Invalid static frame IDN '\number#2'}{% + Static frame IDNs go from 1 to \number\c@maxstatic}% + \else + \setlength{\ffareax}{\staticframeevenx{#2}}% + \setlength{\ffareay}{\staticframeeveny{#2}}% + \expandafter\expandafter\expandafter + \@ff@getstaticpos + \csname @sf@dim@\romannumeral#2\endcsname + \setlength{\ffareawidth}{\@ff@tmp@x}% + \setlength{\ffareaheight}{\@ff@tmp@y}% + \fi +\or + \ifnum#2>\c@maxdynamic\relax + \PackageError{flowfram}{Invalid dynamic frame IDN '\number#2'}{% + Dynamic frame IDNs go from 1 to \number\c@maxdynamic}% + \else + \setlength{\ffareax}{\dynamicframeevenx{#2}}% + \setlength{\ffareay}{\dynamicframeeveny{#2}}% + \expandafter\expandafter\expandafter + \@ff@getstaticpos + \csname @df@dim@\romannumeral#2\endcsname + \setlength{\ffareawidth}{\@ff@tmp@x}% + \setlength{\ffareaheight}{\@ff@tmp@y}% + \fi +\else + \PackageError{flowfram}{Unknown frame ID type '#1'}{% + Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)} +\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getstaticbounds} +% Convenience method for calling the above. Firstly for static +% frames: +% \begin{macrocode} +\newcommand*{\getstaticbounds}{% +\@ifstar\@sgetstaticbounds\@getstaticbounds} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sgetstaticbounds} +% Starred version (specify by \gls{idl}): +% \begin{macrocode} +\newcommand*{\@sgetstaticbounds}[1]{% +\@staticframeid{#1}\@getstaticbounds{\ff@id}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@getstaticbounds} +% Unstarred version (specify by \gls{idn}): +%\changes{1.11}{2008/06/27}{fixed bug: changed frame id from +% 1 to 2 (thanks to Lutz Goldmann for pointing it out)} +% \begin{macrocode} +\newcommand*{\@getstaticbounds}[1]{\@ff@getdim{2}{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getstaticevenbounds} +%\changes{1.11}{2008/06/27}{new} +% Even pages +% \begin{macrocode} +\newcommand*{\getstaticevenbounds}{% +\@ifstar\@sgetstaticevenbounds\@getstaticevenbounds} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sgetstaticevenbounds} +% Starred version (specify by \gls{idl}): +% \begin{macrocode} +\newcommand*{\@sgetstaticevenbounds}[1]{% +\@staticframeid{#1}\@getstaticevenbounds{\ff@id}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@getstaticevenbounds} +%\changes{1.11}{2008/06/27}{new} +% Unstarred version (specify by \gls{idn}): +% \begin{macrocode} +\newcommand*{\@getstaticevenbounds}[1]{\@ff@getevendim{2}{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getflowbounds} +% Next flow frames: +% \begin{macrocode} +\newcommand*{\getflowbounds}{% +\@ifstar\@sgetflowbounds\@getflowbounds} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sgetflowbounds} +% Starred version (specify by \gls{idl}): +% \begin{macrocode} +\newcommand*{\@sgetflowbounds}[1]{% +\@flowframeid{#1}\@getflowbounds{\ff@id}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@getflowbounds} +% Unstarred version (specify by \gls{idn}): +%\changes{1.11}{2008/06/27}{fixed bug: changed frame id from +% 2 to 1 (thanks to Lutz Goldmann for pointing it out)} +% \begin{macrocode} +\newcommand*{\@getflowbounds}[1]{\@ff@getdim{1}{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\getflowevenbounds} +%\changes{1.11}{2008/06/27}{new} +% Even pages: +% \begin{macrocode} +\newcommand*{\getflowevenbounds}{% +\@ifstar\@sgetflowevenbounds\@getflowevenbounds} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sgetflowevenbounds} +%\changes{1.11}{2008/06/27}{new} +% Starred version (specify by \gls{idl}): +% \begin{macrocode} +\newcommand*{\@sgetflowevenbounds}[1]{% +\@flowframeid{#1}\@getflowevenbounds{\ff@id}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@getflowevenbounds} +%\changes{1.11}{2008/06/27}{new} +% Unstarred version (specify by \gls{idn}): +% \begin{macrocode} +\newcommand*{\@getflowevenbounds}[1]{\@ff@getevendim{1}{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getdynamicbounds} +% Next dynamic frames: +% \begin{macrocode} +\newcommand*{\getdynamicbounds}{% +\@ifstar\@sgetdynamicbounds\@getdynamicbounds} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sgetdynamicbounds} +% Starred version (specify by \gls{idl}): +% \begin{macrocode} +\newcommand*{\@sgetdynamicbounds}[1]{% +\@dynamicframeid{#1}\@getdynamicbounds{\ff@id}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@getdynamicbounds} +% Unstarred version (specify by \gls{idn}): +% \begin{macrocode} +\newcommand*{\@getdynamicbounds}[1]{\@ff@getdim{3}{#1}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getdynamicevenbounds} +% Even pages: +% \begin{macrocode} +\newcommand*{\getdynamicevenbounds}{% +\@ifstar\@sgetdynamicevenbounds\@getdynamicevenbounds} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sgetdynamicevenbounds} +% Starred version (specify by \gls{idl}): +% \begin{macrocode} +\newcommand*{\@sgetdynamicevenbounds}[1]{% +\@dynamicframeid{#1}\@getdynamicevenbounds{\ff@id}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@getdynamicevenbounds} +% Unstarred version (specify by \gls{idn}): +% \begin{macrocode} +\newcommand*{\@getdynamicevenbounds}[1]{\@ff@getevendim{3}{#1}} +% \end{macrocode} +%\end{macro} +% +% \subsection{Determining the relative location of one frame from +% another} +%\changes{1.11}{2008/06/27}{added relative location commands} +% The commands in this section set the following boolean variables: +% \begin{macrocode} +\newif\ifFLFabove +\newif\ifFLFbelow +\newif\ifFLFleft +\newif\ifFLFright +% \end{macrocode} +% These can then be used after one of the \cs{checkifframe}\meta{loc} +% commands defined below. For example: +%\begin{verbatim} +%\checkifframeabove{static}{1}{flow}{1} +%\ifFLFabove +% Static frame is above flow frame. +%\else +% Static frame isn't above flow frame. +%\fi +%\end{verbatim} +% +%\begin{macro}{\checkifframeabove} +%\changes{1.11}{2008/06/27}{new} +%\cs{checkifframeabove}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% +% Checks if the first frame is above the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2}. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be above the +% second frame if they overlap. This code checks the page number to +% determine whether to use \cs{oddcheckifframeabove} or +% \cs{evencheckifframeabove} so it should not be used in the +% first paragraph of the first \gls{flow} on the page if the paragraph +% spans the page break. +% \begin{macrocode} +\newcommand*{\checkifframeabove}{% +\@ifstar\@scheckifframeabove\@checkifframeabove} +% \end{macrocode} +% Starred version: +% \begin{macrocode} +\newcommand*{\@scheckifframeabove}[4]{% +\ifodd\c@page + \@soddcheckifframeabove{#1}{#2}{#3}{#4}% +\else + \@sevencheckifframeabove{#1}{#2}{#3}{#4}% +\fi} +% \end{macrocode} +% Unstarred version: +% \begin{macrocode} +\newcommand*{\@checkifframeabove}[4]{% +\ifodd\c@page + \@oddcheckifframeabove{#1}{#2}{#3}{#4}% +\else + \@evencheckifframeabove{#1}{#2}{#3}{#4}% +\fi} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\oddcheckifframeabove} +%\changes{1.11}{2008/06/27}{new} +%\cs{oddcheckifframeabove}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% Checks if the first frame is above the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2} for odd pages. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be above the +% second frame if they overlap. +% \begin{macrocode} +\newcommand*{\oddcheckifframeabove}{% +\@ifstar\@soddcheckifframeabove\@oddcheckifframeabove} +% \end{macrocode} +% The starred version +% \begin{macrocode} +\newcommand*{\@soddcheckifframeabove}[4]{% +\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1bounds\endcsname{#2}% +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3bounds\endcsname{#4}% +\advance\ffareay by \ffareaheight\relax +\expandafter\ifdim\@ff@check>\ffareay + \FLFabovetrue +\else + \FLFabovefalse +\fi +} +% \end{macrocode} +% The unstarred version +% \begin{macrocode} +\newcommand*{\@oddcheckifframeabove}[4]{% +\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1bounds\endcsname{#2}% +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3bounds\endcsname{#4}% +\advance\ffareay by \ffareaheight\relax +\expandafter\ifdim\@ff@check>\ffareay + \FLFabovetrue +\else + \FLFabovefalse +\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\checkifframebelow} +%\changes{1.11}{2008/06/27}{new} +%\cs{checkifframebelow}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% Checks if the first frame is below the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2}. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be below the +% second frame if they overlap. This code checks the page number to +% determine whether to use \cs{oddcheckifframebelow} or +% \cs{evencheckifframebelow} so it should not be used in the +% first paragraph of the first \gls{flow} on the page if the paragraph +% spans the page break. +% \begin{macrocode} +\newcommand*{\checkifframebelow}{% +\@ifstar\@scheckifframebelow\@checkifframebelow} +% \end{macrocode} +% Starred version: +% \begin{macrocode} +\newcommand*{\@scheckifframebelow}[4]{% +\ifodd\c@page + \@soddcheckifframebelow{#1}{#2}{#3}{#4}% +\else + \@sevencheckifframebelow{#1}{#2}{#3}{#4}% +\fi} +% \end{macrocode} +% Unstarred version: +% \begin{macrocode} +\newcommand*{\@checkifframebelow}[4]{% +\ifodd\c@page + \@oddcheckifframebelow{#1}{#2}{#3}{#4}% +\else + \@evencheckifframebelow{#1}{#2}{#3}{#4}% +\fi} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\oddcheckifframebelow} +%\changes{1.11}{2008/06/27}{new} +%\cs{oddcheckifframebelow}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% +% Checks if the first frame is below the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2} on odd pages. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be below the +% second frame if they overlap. +% \begin{macrocode} +\newcommand*{\oddcheckifframebelow}{% +\@ifstar\@soddcheckifframebelow\@oddcheckifframebelow} +% \end{macrocode} +% The starred version +% \begin{macrocode} +\newcommand*{\@soddcheckifframebelow}[4]{% +\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1bounds\endcsname{#2}% +\advance\ffareay by \ffareaheight\relax +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3bounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareay + \FLFbelowtrue +\else + \FLFbelowfalse +\fi +} +% \end{macrocode} +% The unstarred version +% \begin{macrocode} +\newcommand*{\@oddcheckifframebelow}[4]{% +\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1bounds\endcsname{#2}% +\advance\ffareay by \ffareaheight\relax +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3bounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareay + \FLFbelowtrue +\else + \FLFbelowfalse +\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\checkifframeleft} +%\changes{1.11}{2008/06/27}{new} +%\cs{checkifframeleft}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% Checks if the first frame is to the left of the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2}. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be to the +% left of the second frame if they overlap. This code checks the page number to +% determine whether to use \cs{oddcheckifframeleft} or +% \cs{evencheckifframeleft} so it should not be used in the +% first paragraph of the first \gls{flow} on the page if the paragraph +% spans the page break. +% \begin{macrocode} +\newcommand*{\checkifframeleft}{% +\@ifstar\@scheckifframeleft\@checkifframeleft} +% \end{macrocode} +% Starred version: +% \begin{macrocode} +\newcommand*{\@scheckifframeleft}[4]{% +\ifodd\c@page + \@soddcheckifframeleft{#1}{#2}{#3}{#4}% +\else + \@sevencheckifframeleft{#1}{#2}{#3}{#4}% +\fi} +% \end{macrocode} +% Unstarred version: +% \begin{macrocode} +\newcommand*{\@checkifframeleft}[4]{% +\ifodd\c@page + \@oddcheckifframeleft{#1}{#2}{#3}{#4}% +\else + \@evencheckifframeleft{#1}{#2}{#3}{#4}% +\fi} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\oddcheckifframeleft} +%\changes{1.11}{2008/06/27}{new} +%\cs{oddcheckifframeleft}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% +% Checks if the first frame is to the left of the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2} on odd pages. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be to the +% left of the second frame if they overlap. +% \begin{macrocode} +\newcommand*{\oddcheckifframeleft}{% +\@ifstar\@soddcheckifframeleft\@oddcheckifframeleft} +% \end{macrocode} +% The starred version +% \begin{macrocode} +\newcommand*{\@soddcheckifframeleft}[4]{% +\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1bounds\endcsname{#2}% +\advance\ffareax by \ffareawidth\relax +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3bounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareax + \FLFlefttrue +\else + \FLFleftfalse +\fi +} +% \end{macrocode} +% The unstarred version +% \begin{macrocode} +\newcommand*{\@oddcheckifframeleft}[4]{% +\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1bounds\endcsname{#2}% +\advance\ffareax by \ffareawidth\relax +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3bounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareax + \FLFlefttrue +\else + \FLFleftfalse +\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\checkifframeright} +%\changes{1.11}{2008/06/27}{new} +%\cs{checkifframeright}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% Checks if the first frame is to the right of the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2}. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be to the +% right of the second frame if they overlap. This code checks the page number to +% determine whether to use \cs{oddcheckifframeright} or +% \cs{evencheckifframeright} so it should not be used in the +% first paragraph of the first \gls{flow} on the page if the paragraph +% spans the page break. +% \begin{macrocode} +\newcommand*{\checkifframeright}{% +\@ifstar\@scheckifframeright\@checkifframeright} +% \end{macrocode} +% Starred version: +% \begin{macrocode} +\newcommand*{\@scheckifframeright}[4]{% +\ifodd\c@page + \@soddcheckifframeright{#1}{#2}{#3}{#4}% +\else + \@sevencheckifframeright{#1}{#2}{#3}{#4}% +\fi} +% \end{macrocode} +% Unstarred version: +% \begin{macrocode} +\newcommand*{\@checkifframeright}[4]{% +\ifodd\c@page + \@oddcheckifframeright{#1}{#2}{#3}{#4}% +\else + \@evencheckifframeright{#1}{#2}{#3}{#4}% +\fi} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\oddcheckifframeright} +%\changes{1.11}{2008/06/27}{new} +%\cs{oddcheckifframeright}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% +% Checks if the first frame is to the right of the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2} on odd pages. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be to the +% right of the second frame if they overlap. +% \begin{macrocode} +\newcommand*{\oddcheckifframeright}{% +\@ifstar\@soddcheckifframeright\@oddcheckifframeright} +% \end{macrocode} +% The starred version +% \begin{macrocode} +\newcommand*{\@soddcheckifframeright}[4]{% +\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1bounds\endcsname{#2}% +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3bounds\endcsname{#4}% +\advance\ffareax by \ffareawidth\relax +\expandafter\ifdim\@ff@check>\ffareax + \FLFrighttrue +\else + \FLFrightfalse +\fi +} +% \end{macrocode} +% The unstarred version +% \begin{macrocode} +\newcommand*{\@oddcheckifframeright}[4]{% +\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1bounds\endcsname{#2}% +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3bounds\endcsname{#4}% +\advance\ffareax by \ffareawidth\relax +\expandafter\ifdim\@ff@check>\ffareax + \FLFrighttrue +\else + \FLFrightfalse +\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\evencheckifframeabove} +%\changes{1.11}{2008/06/27}{new} +%\cs{evencheckifframeabove}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% Checks if the first frame is above the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2} for even pages. +% The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be above the +% second frame if they overlap. +% \begin{macrocode} +\newcommand*{\evencheckifframeabove}{% +\@ifstar\@sevencheckifframeabove\@evencheckifframeabove} +% \end{macrocode} +% The starred version +% \begin{macrocode} +\newcommand*{\@sevencheckifframeabove}[4]{% +\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1evenbounds\endcsname{#2}% +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3evenbounds\endcsname{#4}% +\advance\ffareay by \ffareaheight\relax +\expandafter\ifdim\@ff@check>\ffareay + \FLFabovetrue +\else + \FLFabovefalse +\fi +} +% \end{macrocode} +% The unstarred version +% \begin{macrocode} +\newcommand*{\@evencheckifframeabove}[4]{% +\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1evenbounds\endcsname{#2}% +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3evenbounds\endcsname{#4}% +\advance\ffareay by \ffareaheight\relax +\expandafter\ifdim\@ff@check>\ffareay + \FLFabovetrue +\else + \FLFabovefalse +\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\evencheckifframebelow} +%\changes{1.11}{2008/06/27}{new} +%\cs{checkifframebelow}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% Checks if the first frame is below the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2}. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be below the +% second frame if they overlap. +% \begin{macrocode} +\newcommand*{\evencheckifframebelow}{% +\@ifstar\@sevencheckifframebelow\@evencheckifframebelow} +% \end{macrocode} +% The starred version +% \begin{macrocode} +\newcommand*{\@sevencheckifframebelow}[4]{% +\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1evenbounds\endcsname{#2}% +\advance\ffareay by \ffareaheight\relax +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3evenbounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareay + \FLFbelowtrue +\else + \FLFbelowfalse +\fi +} +% \end{macrocode} +% The unstarred version +% \begin{macrocode} +\newcommand*{\@evencheckifframebelow}[4]{% +\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1evenbounds\endcsname{#2}% +\advance\ffareay by \ffareaheight\relax +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3evenbounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareay + \FLFbelowtrue +\else + \FLFbelowfalse +\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\evencheckifframeleft} +%\changes{1.11}{2008/06/27}{new} +%\cs{evencheckifframeleft}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% Checks if the first frame is to the left of the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2}. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be to the +% left of the second frame if they overlap. +% \begin{macrocode} +\newcommand*{\evencheckifframeleft}{% +\@ifstar\@sevencheckifframeleft\@evencheckifframeleft} +% \end{macrocode} +% The starred version +% \begin{macrocode} +\newcommand*{\@sevencheckifframeleft}[4]{% +\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1evenbounds\endcsname{#2}% +\advance\ffareax by \ffareawidth\relax +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3evenbounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareax + \FLFlefttrue +\else + \FLFleftfalse +\fi +} +% \end{macrocode} +% The unstarred version +% \begin{macrocode} +\newcommand*{\@evencheckifframeleft}[4]{% +\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1evenbounds\endcsname{#2}% +\advance\ffareax by \ffareawidth\relax +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3evenbounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareax + \FLFlefttrue +\else + \FLFleftfalse +\fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\evencheckifframeright} +%\changes{1.11}{2008/06/27}{new} +%\cs{evencheckifframeright}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% Checks if the first frame is to the right of the second frame where the +% first frame is of type \meta{type1} with \gls{idn} given by +% \meta{id1} and the second frame is of type \meta{type2} with \gls{idn} +% given by \meta{id2}. The starred version uses the \gls{idl} instead +% of the \gls{idn}. The first frame is not considered to be to the +% right of the second frame if they overlap. +% \begin{macrocode} +\newcommand*{\evencheckifframeright}{% +\@ifstar\@sevencheckifframeright\@evencheckifframeright} +% \end{macrocode} +% The starred version +% \begin{macrocode} +\newcommand*{\@sevencheckifframeright}[4]{% +\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1evenbounds\endcsname{#2}% +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3evenbounds\endcsname{#4}% +\advance\ffareax by \ffareawidth\relax +\expandafter\ifdim\@ff@check>\ffareax + \FLFrighttrue +\else + \FLFrightfalse +\fi +} +% \end{macrocode} +% The unstarred version +% \begin{macrocode} +\newcommand*{\@evencheckifframeright}[4]{% +\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1evenbounds\endcsname{#2}% +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3evenbounds\endcsname{#4}% +\advance\ffareax by \ffareawidth\relax +\expandafter\ifdim\@ff@check>\ffareax + \FLFrighttrue +\else + \FLFrightfalse +\fi +} +% \end{macrocode} +%\end{macro} +% +% Textual labels used to indicate relative location of one frame +% to another. +%\begin{macro}{\FFaboveleft} +%\changes{1.11}{2008/06/27}{new} +% \begin{macrocode} +\newcommand*{\FFaboveleft}{above left} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\FFaboveright} +%\changes{1.11}{2008/06/27}{new} +% \begin{macrocode} +\newcommand*{\FFaboveright}{above right} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\FFbelowleft} +%\changes{1.11}{2008/06/27}{new} +% \begin{macrocode} +\newcommand*{\FFbelowleft}{below left} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\FFbelowright} +%\changes{1.11}{2008/06/27}{new} +% \begin{macrocode} +\newcommand*{\FFbelowright}{below right} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\FFleft} +%\changes{1.11}{2008/06/27}{new} +% \begin{macrocode} +\newcommand*{\FFleft}{on the left} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\FFbelowright} +%\changes{1.11}{2008/06/27}{new} +% \begin{macrocode} +\newcommand*{\FFright}{on the right} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\FFabove} +%\changes{1.11}{2008/06/27}{new} +% \begin{macrocode} +\newcommand*{\FFabove}{above} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\FFbelow} +%\changes{1.11}{2008/06/27}{new} +% \begin{macrocode} +\newcommand*{\FFbelow}{below} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\FFoverlap} +%\changes{1.11}{2008/06/27}{new} +% \begin{macrocode} +\newcommand*{\FFoverlap}{overlap} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\relativeframelocation} +%\changes{1.11}{2008/06/27}{new} +%\cs{relativeframelocation}\marg{type1}\marg{id1}\marg{type2}\marg{id2} +% Displays one of the above commands depending on the relative +% locations of the first frame to the second frame. The arguments +% \meta{id1} and \meta{id2} refer to the \gls{idn} for the unstarred +% version and to the \gls{idl} for the starred version. +% \begin{macrocode} +\DeclareRobustCommand*{\relativeframelocation}{% +\@ifstar\@srelativeframelocation\@relativeframelocation} +% \end{macrocode} +% Starred version: +% \begin{macrocode} +\newcommand*{\@srelativeframelocation}[4]{% +\@scheckifframeabove{#1}{#2}{#3}{#4}% +\@scheckifframebelow{#1}{#2}{#3}{#4}% +\@scheckifframeleft{#1}{#2}{#3}{#4}% +\@scheckifframeright{#1}{#2}{#3}{#4}% +\ifFLFabove + \ifFLFleft + \FFaboveleft + \else + \ifFLFright + \FFaboveright + \else + \FFabove + \fi + \fi +\else + \ifFLFbelow + \ifFLFleft + \FFbelowleft + \else + \ifFLFright + \FFbelowright + \else + \FFbelow + \fi + \fi + \else + \ifFLFleft + \FFleft + \else + \ifFLFright + \FFright + \else + \FFoverlap + \fi + \fi + \fi +\fi +} +% \end{macrocode} +% Unstarred version: +% \begin{macrocode} +\newcommand*{\@relativeframelocation}[4]{% +\@checkifframeabove{#1}{#2}{#3}{#4}% +\@checkifframebelow{#1}{#2}{#3}{#4}% +\@checkifframeleft{#1}{#2}{#3}{#4}% +\@checkifframeright{#1}{#2}{#3}{#4}% +\ifFLFabove + \ifFLFleft + \FFaboveleft + \else + \ifFLFright + \FFaboveright + \else + \FFabove + \fi + \fi +\else + \ifFLFbelow + \ifFLFleft + \FFbelowleft + \else + \ifFLFright + \FFbelowright + \else + \FFbelow + \fi + \fi + \else + \ifFLFleft + \FFleft + \else + \ifFLFright + \FFright + \else + \FFoverlap + \fi + \fi + \fi +\fi +} +% \end{macrocode} +%\end{macro} +% +% Short cut commands for \glspl{frame} of the same type. +%\begin{macro}{\reldynamicloc} +%\changes{1.11}{2008/06/27}{new} +%\cs{reldynamicloc}\marg{id1}\marg{id2} +% \begin{macrocode} +\DeclareRobustCommand*{\reldynamicloc}{% +\@ifstar\@sreldynamicloc\@reldynamicloc} +% \end{macrocode} +% Starred version: +% \begin{macrocode} +\newcommand*{\@sreldynamicloc}[2]{ +\@srelativeframelocation{dynamic}{#1}{dynamic}{#2}} +% \end{macrocode} +% Unstarred version: +% \begin{macrocode} +\newcommand*{\@reldynamicloc}[2]{ +\@relativeframelocation{dynamic}{#1}{dynamic}{#2}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\relstaticloc} +%\changes{1.11}{2008/06/27}{new} +%\cs{relstaticloc}\marg{id1}\marg{id2} +% \begin{macrocode} +\DeclareRobustCommand*{\relstaticloc}{% +\@ifstar\@srelstaticloc\@relstaticloc} +% \end{macrocode} +% Starred version: +% \begin{macrocode} +\newcommand*{\@srelstaticloc}[2]{ +\@srelativeframelocation{static}{#1}{static}{#2}} +% \end{macrocode} +% Unstarred version: +% \begin{macrocode} +\newcommand*{\@relstaticloc}[2]{ +\@relativeframelocation{static}{#1}{static}{#2}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\relflowloc} +%\changes{1.11}{2008/06/27}{new} +%\cs{relflowloc}\marg{id1}\marg{id2} +% \begin{macrocode} +\DeclareRobustCommand*{\relflowloc}{% +\@ifstar\@srelflowloc\@relflowloc} +% \end{macrocode} +% Starred version: +% \begin{macrocode} +\newcommand*{\@srelflowloc}[2]{ +\@srelativeframelocation{flow}{#1}{flow}{#2}} +% \end{macrocode} +% Unstarred version: +% \begin{macrocode} +\newcommand*{\@relflowloc}[2]{ +\@relativeframelocation{flow}{#1}{flow}{#2}} +% \end{macrocode} +%\end{macro} +% +%\subsection{Initialise Flow Frames} +%\begin{macro}{\setinitialframe} +% Specify initial frame. This should be the first flow +% frame that is defined on the first page of the document. +% Having another \gls{flow} as the initial frame is not +% a good idea, and may have unexpected results. +% \begin{macrocode} +\newcommand*{\setinitialframe}[1]{\c@thisframe=#1% +\global\usedframebreaktrue +\global\setlength{\hsize}{% +\csname colwidth\romannumeral\c@thisframe\endcsname}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\setframes} +% Set the initial frame. +% \begin{macrocode} +\newif\if@setfr@mes +\@setfr@mesfalse +\newcommand*{\setframes}{% +\ifnum\c@thisframe=0\relax +\PackageWarning{flowfram}{Can't find a flow frame on page 1. +\MessageBreak +Attempting to find the first page with a flow frame}% +\@nxtcol=1\relax +\c@curpg=1\relax +\@g@tnextcol{\@nxtcol}% +% \end{macrocode} +% shipout pages without flow frames +% \begin{macrocode} +\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}% +\c@thisframe=\@nxtcol +\fi +\@setcol{\c@thisframe}\relax +\@setfr@mestrue +\edef\ff@txtcol{% +\csname @ff@txtcol@\romannumeral\c@thisframe\endcsname}% +\@s@tfftextcol +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\emulatetwocolumn} +% Emulate original "\twocolumn" declaration. +% This is provided for backward compatibilty, and +% may be removed in later versions. +% \begin{macrocode} +\newcommand{\emulatetwocolumn}[1][]{% +\finishthispage +\setallflowframes{pages=none}% +\settoheight{\@ff@staticH}{#1}% +\settodepth{\@ff@tmp@y}{#1}% +\addtolength{\@ff@staticH}{\@ff@tmp@y}% +\ifdim\@ff@staticH>0pt\relax +\twocolumnStop[\c@page]{\@ff@staticH}% +\c@thisframe=\c@maxflow +\advance\c@thisframe by -1\relax +\@twocolumn[>\c@page]% +\setstaticcontents{\c@maxstatic}{#1}% +\else +\@twocolumn +\c@thisframe=\c@maxflow +\advance\c@thisframe by -1\relax +\fi +\@setcol{\c@thisframe}\relax +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\emulateonecolumn} +% Emulate original "\onecolumn" declaration. +% This is provided for backward compatibilty, and +% may be removed in later versions. +% \begin{macrocode} +\newcommand{\emulateonecolumn}[1][]{% +\finishthispage +\setallflowframes{pages=none}% +\settoheight{\@ff@staticH}{#1}% +\settodepth{\@ff@tmp@y}{#1}% +\addtolength{\@ff@staticH}{\@ff@tmp@y}% +\ifdim\@ff@staticH>0pt\relax +\onecolumnStop[\c@page]{\@ff@staticH}% +\c@thisframe=\c@maxflow +\advance\c@thisframe by -1\relax +\@onecolumn[>\c@page]% +\setstaticcontents{\c@maxstatic}{#1}% +\else +\@twocolumn +\c@thisframe=\c@maxflow +\advance\c@thisframe by -1\relax +\fi +\@setcol{\c@thisframe}\relax +} +% \end{macrocode} +%\end{macro} +% If no flow frames have been defined, create one big one +% the size of the \gls{typeblock}, and initialise the frames. +% \begin{macrocode} +\AtBeginDocument{% +\ifnum\c@maxflow=0\relax +\PackageWarning{flowfram}{No flow frames, adding one}% +\@onecolumn +\fi +\setframes +\renewcommand{\onecolumn}[1][]{\PackageWarning{flowfram}{% +Ignoring \string\onecolumn\space found in document environment. +Frames must be defined in the preamble}#1}% +\renewcommand{\twocolumn}[1][]{\PackageWarning{flowfram}{% +Ignoring \string\twocolumn\space found in document environment. +Frames must be defined in the preamble}#1}% +} +% \end{macrocode} +% If the document finishes before the last frame on the last +% 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} +% \end{macrocode} +%\subsection{Output Routine} +%\begin{macro}{\@setcol} +% Set up the output box so it has the correct dimensions for +% specified \gls{flow}. This is used by the output routine. +%\changes{1.11}{2008/06/27}{added displayedframe increment} +% \begin{macrocode} +\newcommand{\@setcol}[1]{% +\ifnum\c@maxflow<#1\relax + \PackageError{flowfram}{Can't set frame '\number#1', doesn't + exist}{}% +\else + \expandafter\global\expandafter\columnwidth + \csname colwidth\romannumeral#1\endcsname + \ifdim\hsize=\columnwidth + \else + \ifusedframebreak + \else + \PackageWarning{flowfram}{Moving to flow frame of unequal + width,\MessageBreak use of \string\framebreak\space advised, + or text might not appear correctly}% + \fi + \fi + \global\usedframebreakfalse + \global\hsize\columnwidth + \expandafter\global + \expandafter\vsize\csname colheight\romannumeral#1\endcsname + \global\@colht\vsize + \global\@colroom\@colht + \global\linewidth\columnwidth + \setmargin +\fi +\stepcounter{displayedframe}% +} +% \end{macrocode} +%\end{macro} +% Modify the output routine so that it uses "\vsize" +% instead of "\textheight". +% \begin{macrocode} +\output={\let\par\@@par +\ifnum\outputpenalty <-\@M + \@specialoutput +\else + \@makecol + \@opcol \@startcolumn + \@whilesw \if@fcolmade \fi {\@opcol \@startcolumn }% +\fi +\ifnum\outputpenalty>-\@Miv + \ifdim\@colroom<1.5\baselineskip + \ifdim\@colroom<\vsize + \@latex@warning@no@line{Text page \thepage \space + contains only floats}\@emptycol + \else + \global\vsize\@colroom + \fi + \else + \global\vsize\@colroom + \fi +\else + \global\vsize\maxdimen +\fi +} +% \end{macrocode} +%\begin{macro}{\@doclearpage} +% Modify "\@doclearpage", again replace "\textheight" +% with "\vsize", and only use the twocolumn stuff. +% \begin{macrocode} +\def\@doclearpage{% +\ifvoid\footins + \setbox\@tempboxa\vsplit\@cclv to\z@ + \unvbox\@tempboxa + \setbox\@tempboxa\box\@cclv + \xdef\@deferlist{\@toplist\@botlist\@deferlist}% +\global\let\@toplist\@empty +\global\let\@botlist\@empty +\global\@colroom\@colht + \ifx\@currlist\@empty + \else + \@latexerr{Float(s) lost}\@ehb + \global\let\@currlist\@empty + \fi + \@makefcolumn + \@deferlist + \@whilesw \if@fcolmade \fi {\@opcol + \@makefcolumn + \@deferlist}% +\if@firstcolumn + \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}% +\global\let\@dbltoplist\@empty +\global\@colht\vsize +\begingroup + \@dblfloatplacement + \@makefcolumn + \@dbldeferlist + \@whilesw \if@fcolmade \fi {\@outputpage +\@makefcolumn\@dbldeferlist}% +\endgroup +\else + \vbox{}\clearpage +\fi +\else + \setbox\@cclv\vbox{\box\@cclv\vfil}% +\@makecol\@opcol\clearpage\fi} +% \end{macrocode} +%\end{macro} +% Modify "\@outputpage" slightly. Add provision for +% turning headers and footers into \glspl{dynamic}. +% +%\begin{macro}{\@dothehead} +% First define macro to do the header. This will be +% modified if it is turned into a \gls{dynamic}. +% \begin{macrocode} +\newcommand{\@dothehead}{\vbox to \headheight{% +\color@hbox\normalcolor\hbox to \textwidth{% +\@thehead}\color@endbox}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@dothefoot} +% Same again for the footer. +% \begin{macrocode} +\newcommand{\@dothefoot}{% +\color@hbox\normalcolor\hbox to \textwidth{% +\@thefoot}\color@endbox} +\newcommand{\@dodynamicthehead}{} +\newcommand{\@dodynamicthefoot}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@outputpage} +% Now for the modified version of "\@outputpage". The +% page style stuff has been moved to "\@outputdblcol" +% so that the headers and footers can be set in \glspl{dynamic} +% before the \glspl{dynamic} are put on the page. +% \begin{macrocode} +\def\@outputpage{% +\begingroup + \let\protect\noexpand + \@resetactivechars + \global\let\@@if@newlist\if@newlist + \global\@newlistfalse\@parboxrestore + \shipout\vbox{\set@typeset@protect + \aftergroup + \endgroup + \aftergroup + \set@typeset@protect + \reset@font\normalsize\normalsfcodes + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \baselineskip\z@skip + \lineskip\z@skip + \lineskiplimit\z@ + \vskip\topmargin\moveright\@themargin + \vbox{% + \vskip\headheight + \vskip\headsep + \box\@outputbox + }}% + \global\let\if@newlist\@@if@newlist + \stepcounter{page}% + \setcounter{displayedframe}{0}% + \let\firstmark\botmark} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\makedfheaderfooter} +% Make the headers and footers be in \glspl{dynamic}. There +% will initially be no difference in appearance until +% the settings are changed using "\setdynamicframe". +% The header frame is given the \gls{idl} "header", and the +% footer is given the \gls{idl} "footer". +% \begin{macrocode} +\newcommand*{\makedfheaderfooter}{% +% create dynamic frames at the standard location +\setlength{\@ff@tmp@y}{\textheight}% +\addtolength{\@ff@tmp@y}{\headsep}% +\newdynamicframe{\textwidth}{\headheight}{0pt}{\@ff@tmp@y}[header]% +\newdynamicframe{\textwidth}{\headheight}{0pt}{-\footskip}[footer]% +\renewcommand{\@dothehead}{}% +\renewcommand{\@dothefoot}{}% +\renewcommand{\@dodynamicthehead}{% +\@dynamicframeid{header}% +\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}% +}% +} +% \end{macrocode} +%\end{macro} +% This should only be done in the preamble. +% \begin{macrocode} +\@onlypreamble{\makedfheaderfooter} +% \end{macrocode} +%\begin{macro}{\footnotecolor} +% Set footnotes in "\footnotecolor" rather than "\normalcolor" +% This ensures that the footnotes appear in the same colour +% as the text colour for the \gls{flow} to which they belong. +% \begin{macrocode} +\newcommand{\footnotecolor}{% +\@ifundefined{@ff@txtcol@\romannumeral\c@thisframe}{% +\normalcolor}{% +\edef\ff@txtcol{% +\csname @ff@txtcol@\romannumeral\c@thisframe\endcsname}% +\@s@tfftextcol}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@makecol} +% Modify "\@makecol" so that the footnotes, and the +% footnote rule are in the colour for that frame. +% \begin{macrocode} +\renewcommand{\@makecol}{% +\ifvoid\footins + \setbox\@outputbox\box\@cclv +\else + \setbox\@outputbox\vbox{% +\boxmaxdepth\@maxdepth\@tempdima\dp\@cclv + \unvbox\@cclv + \vskip\skip\footins + \color@begingroup + \footnotecolor + \footnoterule + \unvbox\footins + \color@endgroup +}\fi +\xdef\@freelist{\@freelist \@midlist }% +\global\let\@midlist\@empty +\@combinefloats +\ifvbox\@kludgeins + \@makespecialcolbox +\else + \setbox\@outputbox\vbox to\@colht{% +\@texttop\dimen@\dp\@outputbox + \unvbox \@outputbox + \vskip -\dimen@\@textbottom +}\fi +\global\maxdepth\@maxdepth} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@opcol} +% Modify "\@opcol", as "\if@twocolumn" is now +% irrelevant. +% \begin{macrocode} +\def\@opcol{\@outputdblcol +\global\@mparbottom\z@ +\global\@textfloatsheight\z@ +\@floatplacement +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@checkifmoreframes} +% Check to see if there are more \glspl{flow} defined, and +% set "\if@ff@moreframes" as appropriate. This involves +% iterating through all \glspl{flow}, and through each +% frame's \gls{pglist}. +% \begin{macrocode} +\newif\if@ff@moreframes +\newcommand*{\@ff@checkifmoreframes}{% +\@ff@moreframesfalse +\@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}% +}% +\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} +%\end{macro} +%\begin{macro}{\@ff@checkpages} +% Check to see if the current page lies in the \gls{pglist} +% given by "#1". +% \begin{macrocode} +\newcommand*{\@ff@checkpages}[2][\c@page]{% +\@for\@ff@pp:=#2\do{% +\@ff@checkthispage{#1}{\@ff@pp}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@checkthispage} +% Check to see if the current page lies in the \gls{pgrange} +% given by "#1". If the \gls{pgrange} is specified by +% "all", "odd" or "even" then there are definitely more +% frames available, otherwise check to see if the current page +% lies within the number range. If the \gls{pgrange} is "none", +% ignore it. +% \begin{macrocode} +\newcommand*{\@ff@checkthispage}[2]{% +\ifthenelse{\equal{#2}{all}\or\equal{#2}{even}\or\equal{#2}{odd}}{% +\@ff@moreframestrue}{% +\ifthenelse{\equal{#2}{none}}{}{% +\@ff@checknumrange{#1}{#2}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@checknumrange} +% The number range could be a single number, a closed range +% (e.g.\ "2-6") or an open range (e,g.\ "<4" or ">10"). +% Use "\@ff@getrange" to find the start and end ranges. +% For open ended ranges assume a maximum value of 10000. +% If the current page is less than or equal to the maximum, +% there are still more \glspl{flow} available. +% \begin{macrocode} +\newcommand*{\@ff@checknumrange}[2]{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{#2}% +\ifnum\@ff@numend>#1\relax +\@ff@moreframestrue +\else +\ifnum\@ff@numend=#1\relax +\@ff@moreframestrue +\fi +\fi +} +% \end{macrocode} +%\end{macro} +% Work out the minimum and maximum values of a number range +% which could either be a single number, a closed number +% range or an open number range. If the first character +% is "<" or ">" then it is an open range, otherwise it is +% a closed range or a single number. Define a counter +% to use whilst determining the range. +% \begin{macrocode} +\newcount\c@ffrangenum +% \end{macrocode} +%\begin{macro}{\@ff@getrange} +% Now to find out what kind of range it is. If it is a single +% number, e.g.\ "24", then it will do, e.g.\ +% "\@ff@@getrange24-\relax". +% If it is a closed range, e.g. "30-40", it will do , e.g.\ +% "\@ff@@getrange30-40-\relax". If it is an open range, e.g.\ +% ">25", it will do, e.g.\ "\@ff@@getrange>25-\relax". +% \begin{macrocode} +\newcommand*{\@ff@getrange}[1]{% +\expandafter\@ff@@getrange#1-\relax\end} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@@getrange} +% The ranges can now be picked out. If the first character +% is a "<" or ">" it is an open ended range, otherwise it +% is either a single value, or a close ended range. +% \begin{macrocode} +\def\@ff@@getrange#1#2\end{% +\ifx#1<\relax + \@ff@getrangeless#1#2\end +\else + \ifx#1>\relax + \@ff@getrangegreater#1#2\end + \else + \@@ff@getrange#1#2\end + \fi +\fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@getrangeless} +% Get the values for an open ended range with an +% upper bound. A minimum value of "0" is assumed. +% \begin{macrocode} +\def\@ff@getrangeless<#1-\relax\end{% +\c@ffrangenum=#1\relax +\advance\c@ffrangenum by -1\relax +\def\@ff@numstart{0}% +\edef\@ff@numend{\number\c@ffrangenum}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@getrangegreater} +% Get the values for an open ended range with a lower +% bound. A maximum value of "10000" is assumed. +% \begin{macrocode} +\def\@ff@getrangegreater>#1-\relax\end{% +\c@ffrangenum=#1\relax +\advance\c@ffrangenum by 1\relax +\edef\@ff@numstart{\number\c@ffrangenum}% +\def\@ff@numend{10000}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@ff@getrange} +% Determine whether we have a single number or +% a closed range. If "#2" is "\relax", it is a single +% value, otherwise it is a range. +% \begin{macrocode} +\def\@@ff@getrange#1-#2\end{% +\ifx\relax#2\relax +\def\@ff@numstart{#1}\def\@ff@numend{#1}% +\else +\def\@ff@numstart{#1}% +\@@@ff@getrange#2\end +\fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@@ff@getrange} +% Extract the end value from the closed range. +% \begin{macrocode} +\def\@@@ff@getrange#1-\relax\end{% +\def\@ff@numend{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@g@tnextcol} +% Find the next \gls{flow}. If there are no more flow +% frames, define a new one the size of the \gls{typeblock}. +% (Otherwise the remaining document text will be lost.) +% \begin{macrocode} +\newif\if@notthiscol +\newif\if@ff@nwpg +\newcount\c@curpg +\newcommand*{\@g@tnextcol}[1]{% +\@ff@checkifmoreframes +\if@ff@moreframes +\else +% No more frames, add new frame +\PackageWarning{flowfram}{Run out of flows frames, +adding new one}% +\@onecolumn +#1=\c@maxflow +\fi +\@notthiscoltrue +\@ff@nwpgfalse +\@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\relax +\fi +\@ff@chckifthispg{\c@curpg}{\@colN}% +\if@notthiscol +\repeat +#1=\@colN +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@chckifthispg} +% This is used to determine the next \gls{flow}, since not +% all \glspl{flow} may be defined on every page. Checks to +% see if \gls{flow} "#2" is defined on page "#1". +% First set up some variables. +% \begin{macrocode} +\newcommand*{\@ff@chckifthispg}[2]{% +\@notthiscoltrue +\edef\ff@pages{\csname @ff@pages@\romannumeral#2\endcsname}% +\@@ff@chckifthispg{#1}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@ff@chckifthispg} +% Now go ahead and check. +% \begin{macrocode} +\newcommand*{\@@ff@chckifthispg}[1]{% +\ifthenelse{\equal{\ff@pages}{none}}{}{% +\ifthenelse{\equal{\ff@pages}{all}}{\@notthiscolfalse}{% +\ifthenelse{\equal{\ff@pages}{odd}}{% +\ifodd#1\@notthiscolfalse\fi}{% +\ifthenelse{\equal{\ff@pages}{even}}{% +\ifodd#1\else\@notthiscolfalse\fi}{% +% check through list of page numbers +\@for\@ff@pp:=\ff@pages\do{% +\def\@ff@numstart{0}\def\@ff@numend{0}% +\@ff@getrange{\@ff@pp}% +\ifthenelse{#1<\@ff@numstart \or #1>\@ff@numend}{}{% +\@notthiscolfalse}% +}% +}}}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sf@chckifthispg} +% Checks to see if \gls{static} "#1" is defined on the +% current page. +% \begin{macrocode} +\newcommand*{\@sf@chckifthispg}[1]{% +\@notthiscoltrue +\edef\ff@pages{\csname @sf@pages@\romannumeral#1\endcsname}% +\@@ff@chckifthispg{\c@page}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@df@chckifthispg} +% Checks to see if \gls{dynamic} "#1" is defined on the +% current page. +% \begin{macrocode} +\newcommand*{\@df@chckifthispg}[1]{% +\@notthiscoltrue +\edef\ff@pages{\csname @df@pages@\romannumeral#1\endcsname}% +\@@ff@chckifthispg{\c@page}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@setcolbox} +% Sets the \TeX\ box defining the \gls{flow} to the output +% box. This saves the output until the page is shipped out after +% all the \glspl{flow} have been filled for that page. +% \begin{macrocode} +\newcommand*{\@setcolbox}[1]{% +\expandafter\global\expandafter\setbox +\csname column\romannumeral#1\endcsname\box\@outputbox +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@docolbox} +% Put \gls{flow} on the page with the correct border, if it +% has one. +% \begin{macrocode} +\newcommand*{\@docolbox}[1]{% +\edef\ff@frametype{% +\csname @ff@frametype@\romannumeral#1\endcsname}% +\edef\ff@col{\csname @ff@col@\romannumeral#1\endcsname}% +\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}{% +\ifthenelse{\boolean{columnframe\romannumeral#1}}{% +\@ff@fbox{\csname colwidth\romannumeral#1\endcsname}% +{\csname colheight\romannumeral#1\endcsname}{% +\expandafter\box\csname column\romannumeral#1\endcsname}{% +\csname\ff@frametype\endcsname}% +}{% +\@ff@box{\csname colwidth\romannumeral#1\endcsname}% +{\csname colheight\romannumeral#1\endcsname}{% +\expandafter\box\csname column\romannumeral#1\endcsname}% +}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@docolbbox} +% Do the \gls{bbox} for given \gls{flow}. +% \begin{macrocode} +\newcommand*{\@docolbbox}[1]{% +\@ff@setoffset{#1}% +\def\ff@col{}\def\ff@txtcol{}% +\@fr@meifdraft{% +\@ff@box{\csname colwidth\romannumeral#1\endcsname}% +{\csname colheight\romannumeral#1\endcsname}{% +\expandafter\box\csname column\romannumeral#1\endcsname}}% +{F:\number#1;\csname @col@id@\romannumeral#1\endcsname}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@fbox} +% Put the \TeX\ box "#3" of width "#1" and +% height "#2", and frame making command +% specified by "#4". +% \begin{macrocode} +\newcommand{\@ff@fbox}[4]{{% +\fboxsep=\flowframesep\fboxrule=\flowframerule\@s@tffcol +\kern\@ff@offset +#4{\@ff@box{#1}{#2}{#3}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@box} +% Put the \TeX\ box "#3" of width "#1" and height "#2" on +% the page. +% \begin{macrocode} +\newcommand{\@ff@box}[3]{{\@ffbackground{\vbox to#2 +{\hb@xt@ #1{\hss{\@s@tfftextcol #3}\hss}\vss\kern\z@}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@putcolbox} +% Display the \gls{flow} on the page, at its given position. +% If the document is two-sided, need to check whether +% the current page is odd or even to determine the correct +% location. +% \begin{macrocode} +\newcommand*{\@putcolbox}[1]{% +\@ff@chckifthispg{\c@page}{#1}% +\if@notthiscol +\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname col@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@posx\endcsname +\@docolbox{#1}\hss}% +\else +\expandafter\raise\csname col@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@evenx\endcsname +\@docolbox{#1}\hss}% +\fi +\else +\expandafter\raise\csname col@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@posx\endcsname +\@docolbox{#1}\hss}% +\fi +\fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@putcolbbox} +% Same for \gls{flow} \gls{bbox}: +% \begin{macrocode} +\newcommand*{\@putcolbbox}[1]{% +\@ff@chckifthispg{\c@page}{#1}% +\if@notthiscol +\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname col@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@posx\endcsname +\@docolbbox{#1}\hss}% +\else +\expandafter\raise\csname col@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@evenx\endcsname +\@docolbbox{#1}\hss}% +\fi +\else +\expandafter\raise\csname col@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@posx\endcsname +\@docolbbox{#1}\hss}% +\fi +\fi +} +% \end{macrocode} +%\end{macro} +% If an offset hasn't been specified, compute it. If the +% frame making command is known (e.g. doublebox), compute +% the offset according to known specifications, otherwise +% set the negative offset to "\flowframesep" plus +% "\flowframerule", which may or may not be correct. +% +%\begin{macro}{\@ff@s@t@doubleboxoffset} +% Compute offset for "\doublebox": +% \begin{macrocode} +\newcommand*{\@ff@s@t@doubleboxoffset}{% +\setlength{\@ff@offset}{-\flowframesep}% +\addtolength{\@ff@offset}{-3.75\flowframerule}% +\addtolength{\@ff@offset}{-.5pt}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@s@t@ovalboxoffset} +% Compute offset for "\ovalbox": +% \begin{macrocode} +\newcommand*{\@ff@s@t@ovalboxoffset}{% +\@ff@offset=-\fontdimen 8\tenln\relax +\advance\@ff@offset by -\flowframesep\relax +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@s@t@Ovalboxoffset} +% Compute offset for "\ovalbox": +% \begin{macrocode} +\newcommand*{\@ff@s@t@Ovalboxoffset}{% +\@ff@offset=-\fontdimen 8\tenlnw\relax +\advance\@ff@offset by -\flowframesep\relax +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@s@t@defaultoffset} +% Compute default offset: +% \begin{macrocode} +\newcommand*{\@ff@s@t@defaultoffset}{% +\@ff@offset=-\flowframesep\relax +\addtolength{\@ff@offset}{-\flowframerule}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@setoffset} +% Compute offset for \gls{flow} "#1". Stores offset value +% in "\ff@offset". +% \begin{macrocode} +\newcommand*{\@ff@setoffset}[1]{% +\ifthenelse{\equal{\csname @ff@offset@\romannumeral#1\endcsname}% +{compute}}{% +\ifthenelse{\boolean{columnframe\romannumeral#1}}{% +\ifthenelse{% +\equal{\csname @ff@frametype@\romannumeral#1\endcsname}% +{doublebox}}{% +\@ff@s@t@doubleboxoffset +}{% +\ifthenelse{% +\equal{\csname @ff@frametype@\romannumeral#1\endcsname}% +{ovalbox}}{% +\@ff@s@t@ovalboxoffset +}{% +\ifthenelse{% +\equal{\csname @ff@frametype@\romannumeral#1\endcsname}% +{Ovalbox}}{% +\@ff@s@t@Ovalboxoffset}{% +\@ff@s@t@defaultoffset +}}}% +}{}% +}{% +\setlength{\@ff@offset}% +{\csname @ff@offset@\romannumeral#1\endcsname}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sf@setoffset} +% Compute offset for \gls{static} "#1". Stores offset value +% in "\ff@offset". +% \begin{macrocode} +\newcommand*{\@sf@setoffset}[1]{% +\ifthenelse{% +\equal{\csname @sf@offset@\romannumeral#1\endcsname}% +{compute}}{% +\ifthenelse{\boolean{staticframe\romannumeral#1}}{% +\ifthenelse{% +\equal{\csname @sf@frametype@\romannumeral#1\endcsname}% +{doublebox}}{% +\@ff@s@t@doubleboxoffset +}{% +\ifthenelse{% +\equal{\csname @sf@frametype@\romannumeral#1\endcsname}% +{ovalbox}}{% +\@ff@s@t@ovalboxoffset +}{% +\ifthenelse{% +\equal{\csname @sf@frametype@\romannumeral#1\endcsname}% +{Ovalbox}}{% +\@ff@s@t@Ovalboxoffset +}{% +\@ff@s@t@defaultoffset +}}}% +}{}% +}{% +\setlength{\@ff@offset}% +{\csname @sf@offset@\romannumeral#1\endcsname}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@df@setoffset} +% Compute offset for \gls{dynamic} "#1". Stores offset value +% in "\ff@offset". +% \begin{macrocode} +\newcommand*{\@df@setoffset}[1]{% +\ifthenelse{% +\equal{\csname @df@offset@\romannumeral#1\endcsname}% +{compute}}{% +\setlength{\@ff@offset}{0pt}% +\ifthenelse{\boolean{dynamicframe\romannumeral#1}}{% +\ifthenelse{% +\equal{\csname @df@frametype@\romannumeral#1\endcsname}% +{doublebox}}{% +\@ff@s@t@doubleboxoffset +}{% +\ifthenelse{% +\equal{\csname @df@frametype@\romannumeral#1\endcsname}% +{ovalbox}}{% +\@ff@s@t@ovalboxoffset +}{% +\ifthenelse{% +\equal{\csname @df@frametype@\romannumeral#1\endcsname}% +{Ovalbox}}{% +\@ff@s@t@Ovalboxoffset}{% +\@ff@s@t@defaultoffset +}}}% +}{}% +}{% +\setlength{\@ff@offset}% +{\csname @df@offset@\romannumeral#1\endcsname}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@putmarginbox} +% Draw box representing the margin for \gls{flow} "#1". +% \begin{macrocode} +\newcommand*{\@putmarginbox}[1]{% +\@ff@chckifthispg{\c@page}{#1}% +\if@notthiscol +\else +\@killglue +\if@twoside +\ifodd\c@page +\edef\ff@x{\csname col@\romannumeral#1@posx\endcsname}% +\edef\ff@y{\csname col@\romannumeral#1@posy\endcsname}% +\else +\edef\ff@x{\csname col@\romannumeral#1@evenx\endcsname}% +\edef\ff@y{\csname col@\romannumeral#1@eveny\endcsname}% +\fi +\else +\edef\ff@x{\csname col@\romannumeral#1@posx\endcsname}% +\edef\ff@y{\csname col@\romannumeral#1@posy\endcsname}% +\fi +\setlength{\@ff@tmp@x}{\ff@x}% +\setlength{\@ff@tmp@y}{\ff@y}% +\@getmarginpos{\csname @ff@margin@\romannumeral#1\endcsname}% +\ifthenelse{\equal{\ff@margin}{left}}{% +\addtolength{\@ff@tmp@x}{-\marginparwidth}% +\addtolength{\@ff@tmp@x}{-\marginparsep}% +\ifthenelse{\boolean{columnframe\romannumeral#1}}{% +}{}% +}{% +\addtolength{\@ff@tmp@x}% +{\csname colwidth\romannumeral#1\endcsname}% +\addtolength{\@ff@tmp@x}{\marginparsep}% +\ifthenelse{\boolean{columnframe\romannumeral#1}}{% +}{}% +}% +\raise\@ff@tmp@y +\hb@xt@\z@{% +\expandafter\kern\@ff@tmp@x +\@fr@meifdraft{\@ff@box{\marginparwidth}% +{\csname colheight\romannumeral#1\endcsname}{}}% +{M:\number#1}\hss}\fi +\ignorespaces} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@drawmargins} +% Draw all the margins associated with the \glspl{flow} defined +% on the current page. +% \begin{macrocode} +\newcommand*{\@ff@drawmargins}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{% +\advance\@colN by 1\relax +\makebox[0pt][l]{\@putmarginbox{\@colN}}% +}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@getstaticpos} +% Extract the width and height for static or \gls{dynamic} +% specified in the form \oarg{c}\oarg{height}\oarg{valign}\marg{width} +% \begin{macrocode} +\def\@ff@getstaticpos[#1][#2][#3]#4{\@ff@tmp@x=#4\relax +\@ff@tmp@y=#2\relax +\def\ff@valign{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@dostaticbox} +% Display the savebox associated with \gls{static} "#1" +% \begin{macrocode} +\newcommand*{\@dostaticbox}[1]{% +\edef\ff@frametype{% +\csname @sf@frametype@\romannumeral#1\endcsname}% +\edef\ff@col{\csname @sf@col@\romannumeral#1\endcsname}% +\edef\ff@backcol{\csname @sf@backcol@\romannumeral#1\endcsname}% +\@sf@setoffset{#1}% +\expandafter\expandafter\expandafter +\@ff@getstaticpos\csname @sf@dim@\romannumeral#1\endcsname +\rotateframe{\csname @sf@angle@\romannumeral#1\endcsname}{% +\ifthenelse{\boolean{staticframe\romannumeral#1}}{% +\@ff@fbox{\@ff@tmp@x}{\@ff@tmp@y}{% +\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname} +{\csname\ff@frametype\endcsname}% +}{% +\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}% +{\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname}% +}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@dostaticbbox} +% Now for the \gls{bbox}: +% \begin{macrocode} +\newcommand*{\@dostaticbbox}[1]{% +\edef\ff@col{}% +\@sf@setoffset{#1}% +\expandafter\expandafter\expandafter +\@ff@getstaticpos\csname @sf@dim@\romannumeral#1\endcsname +\@fr@meifdraft{% +\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}% +{\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname}% +}{S:\number#1;\csname @sf@id@\romannumeral#1\endcsname}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@putstaticbox} +% Put the static box "#1" at its given position, with its +% associated border. +% \begin{macrocode} +\newcommand*{\@putstaticbox}[1]{% +\@sf@chckifthispg{#1}% +\if@notthiscol\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname @sf@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@posx\endcsname +\@dostaticbox{#1}\hss}% +\else +\expandafter\raise\csname @sf@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@evenx\endcsname +\@dostaticbox{#1}\hss}% +\fi +\else +\expandafter\raise\csname @sf@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@posx\endcsname +\@dostaticbox{#1}\hss}% +\fi +\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@putstaticbbox} +% Now for the \gls{bbox}: +% \begin{macrocode} +\newcommand*{\@putstaticbbox}[1]{% +\@sf@chckifthispg{#1}% +\if@notthiscol\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname @sf@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@posx\endcsname +\@dostaticbbox{#1}\hss}\ignorespaces +\else +\expandafter\raise\csname @sf@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@evenx\endcsname +\@dostaticbbox{#1}\hss}\ignorespaces +\fi +\else +\expandafter\raise\csname @sf@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@posx\endcsname +\@dostaticbbox{#1}\hss}\ignorespaces +\fi +\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@resetst@tics} +% Clear the contents of all the \glspl{static} that have +% the "clear" option set. +% \begin{macrocode} +\newcommand*{\@resetst@tics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax +\ifthenelse{\boolean{@sf@clear@\romannumeral\@colN}}{% +\global\sbox{% +\csname @staticframe@\romannumeral\@colN\endcsname}{}}{}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@resetdyn@mics} +% Clear the contents of the \glspl{dynamic} that have the "clear" option +% set. +% \begin{macrocode} +\newcommand*{\@resetdyn@mics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax +\ifthenelse{\boolean{@df@clear@\romannumeral\@colN}}{% +\expandafter\global\expandafter +\gdef\csname @dynamicframe@\romannumeral\@colN\endcsname{}}{}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@dodfparbox} +% 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} +%\end{macro} +%\begin{macro}{\@dodynamicbox} +% Typeset the dynamic box with its associated border. +% \begin{macrocode} +\newcommand*{\@dodynamicbox}[1]{% +\edef\ff@frametype{% +\csname @df@frametype@\romannumeral#1\endcsname}% +\edef\ff@col{\csname @df@col@\romannumeral#1\endcsname}% +\edef\ff@txtcol{\csname @df@txtcol@\romannumeral#1\endcsname}% +\edef\ff@backcol{\csname @df@backcol@\romannumeral#1\endcsname}% +\edef\ff@style{\csname @df@style@\romannumeral#1\endcsname}% +\def\ff@contents{\csname @dynamicframe@\romannumeral#1\endcsname}% +\@df@setoffset{#1}% +\expandafter\expandafter\expandafter +\@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname +\rotateframe{\csname @df@angle@\romannumeral#1\endcsname}{% +\ifthenelse{\boolean{dynamicframe\romannumeral#1}}{% +\@ff@fbox{\@ff@tmp@x}{\@ff@tmp@y}% +{\@dodfparbox{#1}}% +{\csname\ff@frametype\endcsname}% +}{% +\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}{% +\@dodfparbox{#1}}% +}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@dodynamicbbox} +% Now for the \gls{bbox}: +% \begin{macrocode} +\newcommand*{\@dodynamicbbox}[1]{% +\edef\ff@col{}% +\@df@setoffset{#1}% +\expandafter\expandafter\expandafter +\@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname +\@fr@meifdraft{% +\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}{% +\expandafter\expandafter\expandafter +\parbox\csname @df@dim@\romannumeral#1\endcsname +{}}% +}{D:\number#1;\csname @df@id@\romannumeral#1\endcsname}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@putdynamicbox} +% Put the \gls{dynamic} "#1" at its given position +% \begin{macrocode} +\newcommand*{\@putdynamicbox}[1]{% +\@df@chckifthispg{#1}% +\if@notthiscol\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname @df@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@posx\endcsname +\@dodynamicbox{#1}\hss}\ignorespaces +\else +\expandafter\raise\csname @df@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@evenx\endcsname +\@dodynamicbox{#1}\hss}\ignorespaces +\fi +\else +\expandafter\raise\csname @df@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@posx\endcsname +\@dodynamicbox{#1}\hss}\ignorespaces +\fi +\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@putdynamicbbox} +% Bounding box: +% \begin{macrocode} +\newcommand*{\@putdynamicbbox}[1]{% +\@df@chckifthispg{#1}% +\if@notthiscol\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname @df@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@posx\endcsname +\@dodynamicbbox{#1}\hss}\ignorespaces +\else +\expandafter\raise\csname @df@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@evenx\endcsname +\@dodynamicbbox{#1}\hss}\ignorespaces +\fi +\else +\expandafter\raise\csname @df@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@posx\endcsname +\@dodynamicbbox{#1}\hss}\ignorespaces +\fi +\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@doheader} +% Do standard header in the standard place. +% \begin{macrocode} +\newcommand*{\@@doheader}{% +\setlength\@ff@tmp@y{\textheight}% +\addtolength{\@ff@tmp@y}{\headsep}% +\def\ff@col{}% +\def\ff@txtcol{}% +\def\ff@backcol{{none}}% +\@ff@box{0pt}{\@ff@tmp@y}{\makebox[0pt][l]{\@dothehead}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@dofooter} +% Do standard footer in the standard place. +% \begin{macrocode} +\newcommand*{\@@dofooter}{% +\setlength\@ff@tmp@y{-\footskip}% +\def\ff@col{}% +\def\ff@txtcol{}% +\def\ff@backcol{{none}}% +\@ff@box{0pt}{\@ff@tmp@y}{\makebox[0pt][l]{\@dothefoot}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@s@tfr@mes} +% This is a modified version of the way the picture environment +% works: +% \begin{macrocode} +\newcommand{\@s@tfr@mes}[1]{{\@picht\textheight +\setbox\@picbox\hb@xt@ \textwidth +\bgroup \hbox \bgroup #1\relax +\egroup +\hss \egroup +\ht\@picbox\@picht \dp\@picbox +\z@ \mbox{\box \@picbox}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@doallflowframes} +% Puts all the \glspl{flow} defined on the current page +% \begin{macrocode} +\newcommand*{\@ff@doallflowframes}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\@putcolbox{\@colN}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@doallflowframesbbox} +% Flow frame \glspl{bbox}: +% \begin{macrocode} +\newcommand*{\@ff@doallflowframesbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\@putcolbbox{\@colN}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@doallstatics} +% Puts all \glspl{static} defined on the current page +% \begin{macrocode} +\newcommand*{\@ff@doallstatics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax +\@putstaticbox{\@colN}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@doallstaticsbbox} +% Static frame \glspl{bbox}: +% \begin{macrocode} +\newcommand*{\@ff@doallstaticsbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax +\@putstaticbbox{\@colN}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@doalldynamics} +% Puts all the \glspl{dynamic} defined on the current page +% \begin{macrocode} +\newcommand*{\@ff@doalldynamics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax +\@putdynamicbox{\@colN}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@doalldynamicsbbox} +% Dynamic frame \glspl{bbox}: +% \begin{macrocode} +\newcommand*{\@ff@doalldynamicsbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax +\@putdynamicbbox{\@colN}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@dotypeblock} +% Draw \gls{typeblock} frame if draft. +% \begin{macrocode} +\newcommand*{\@ff@dotypeblock}{% +\makebox[0pt][l]{\@fr@meifdraft[\setffdrafttypeblockcolor]{% +\vbox to \textheight{\hbox to \textwidth{}}}{}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@do@allframes} +% Put all frames defined on the current page. +% \begin{macrocode} +\newlength\ffevenoffset +\newcommand*{\@ff@do@allframes}{% +\ffevenoffset=0pt\relax +\if@twoside + \ifodd\c@page + \else + \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 +\@@dofooter +\@ff@doallflowframes +\@ff@doalldynamics +\ifshowtypeblock + \@ff@dotypeblock +\fi +\ifshowframebbox + \@ff@doallstaticsbbox + \@ff@doallflowframesbbox + \@ff@doalldynamicsbbox +\fi +\ifshowmargins + \@ff@drawmargins +\fi +}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@outputdblcol} +% This was modified from the output routine for standard +% two column format. After "\@g@tnextcol", the register +% "\c@curpg" contains the page that the next \gls{flow} +% is on. If "\c@curpg" minus "\c@page" is greater +% than 1, then there is at least one page without a \gls{flow}. +% These pages will have to be shipped before \TeX\ can +% continue with the rest of the document. +% \begin{macrocode} +\newcount\@nxtcol +\def\@outputdblcol{% +\@nxtcol=\c@thisframe +\c@curpg=\c@page +\@g@tnextcol{\@nxtcol}% +\if@ff@nwpg % next flow frame starts on new page + \global\@firstcolumntrue + \@setcolbox\c@thisframe + \if@specialpage + \global\@specialpagefalse + \@nameuse{ps@\@specialstyle}\relax + \fi + \if@twoside + \ifodd\count\z@ + \let\@thehead\@oddhead + \let\@thefoot\@oddfoot + \else + \let\@thehead\@evenhead + \let\@thefoot\@evenfoot + \fi + \else + \let\@thehead\@oddhead + \let\@thefoot\@oddfoot + \fi + \@begindvi + \@dodynamicthehead\@dodynamicthefoot + \vbadness=\@M + \setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}% + \@combinedblfloats + \@outputpage +%shipout pages without flow frames +\advance\c@curpg by -\c@page\relax + \whiledo{\c@curpg>0}{\advance\c@curpg by -1\relax + \setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}% +\@outputpage} + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw \if@fcolmade \fi + {\@outputpage \@startdblcolumn }\endgroup + \@resetst@tics + \@resetdyn@mics +\else % still on same page, save contents of box255 + \global\@firstcolumnfalse + \@setcolbox\c@thisframe +\fi +\global\c@thisframe=\@nxtcol +\@setcol{\c@thisframe}\relax +\global\@colht\vsize +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@dblfloatplacement} +% Modify "\@dblfloatplacement" replacing "\textheight" +% with "\vsize". +% \begin{macrocode} +\def\@dblfloatplacement{% + \global\@dbltopnum\c@dbltopnumber + \global\@dbltoproom\dbltopfraction\@colht\@textmin + \@colht\advance\@textmin -\@dbltoproom + \@fpmin\dblfloatpagefraction\vsize + \@fptop \@dblfptop \@fpsep \@dblfpsep \@fpbot \@dblfpbot} +% \end{macrocode} +%\end{macro} +% +%\subsection{Static versions of floats} +% Floats can not go in saveboxes or minipages, so define +% static versions to go in static and \glspl{dynamic}. +% These just set "\@captype" so that the "\caption" +% command may be used. +%\begin{environment}{statictable} +% \begin{macrocode} +\newenvironment{statictable}{\def\@captype{table}}{} +% \end{macrocode} +%\end{environment} +%\begin{environment}{staticfigure} +% \begin{macrocode} +\newenvironment{staticfigure}{\def\@captype{figure}}{} +% \end{macrocode} +%\end{environment} +% +%\subsection{Standard Layouts} +%\subsubsection{Column Styles} +% Redefine "\twocolumn" and "\onecolumn" to set up \glspl{flow} from +% the dimensions of the \gls{typeblock}. Ignore the optional argument. +% The \gls{flow} height will be adjusted to make sure that it +% is an integer multiple of "\baselineskip", unless +% "\ffvajdustfalse" is used. +% \begin{macrocode} +\newif\ifffvadjust +\ffvadjusttrue +% \end{macrocode} +%\begin{macro}{\onecolumn} +% "\onecolumn" will make a single \gls{flow} that takes +% up the entire area of the \gls{typeblock} (adjusted according +% to "\ifffvadjust".) Frames should only be created in +% the preamble, otherwise the next \gls{flow} may not +% be detected by the output routine. The exception to this +% is when the output routine can't find any more \glspl{flow} +% to use, in which case it creates a single \gls{flow} using +% "\@onecolumn". Therefore, make "\onecolumn" use "\@onecolumn", +% and then set "\onecolumn" as a preamble command, so it +% can't be used in the document, but the output routine can +% use "\@onecolumn". Syntax: \cs{onecolumn}\oarg{pages}, +% where \meta{pages} is the \gls{pglist} for which the new +% \gls{flow} is defined. +% \begin{macrocode} +\renewcommand*{\onecolumn}{\@onecolumn} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@onecolumn} +% \begin{macrocode} +\newcommand*{\@onecolumn}[1][all]{% +\@onecolumninarea[#1]{\textwidth}{\textheight}{0pt}{0pt}} +% \end{macrocode} +%\end{macro} +% Need a length to store the height of +% the \gls{flow} so that it can be adjusted. +% \begin{macrocode} +\newlength\columnheight +% \end{macrocode} +%\begin{macro}{\onecolumninarea} +% "\onecolumn" is in fact a special case of "\onecolumninarea" +% which sets up one \gls{flow} in the specified area, given +% by bottom left corner (\meta{x}, \meta{y}), +% relative to the \gls{typeblock}, with width \meta{w} +% and height \meta{h}. +% The only difference between "\onecolumninarea" and +% explicitly creating the \gls{flow} using "\newflowframe" +% is the "\onecolumninarea" will adjust the vertical height +% the ensure it is a multiple of "\baselineskip". There +% is also no starred version, so if you want a border, you +% will need to set it explicitly using "\setflowframe". +% Syntax:\newline +% \cs{onecolumninarea}\oarg{pages}\marg{w}\marg{h}\marg{x}\marg{y}. +% \begin{macrocode} +\newcommand*{\onecolumninarea}{\@onecolumninarea} +\@onlypreamble{\onecolumninarea} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@onecolumninarea} +% \begin{macrocode} +\newcommand*{\@onecolumninarea}[5][all]{% +\setlength{\columnheight}{#3}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\@n@wflowframe[#1]{#2}{\columnheight}{#4}{#5}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumn} +% Set up two \glspl{flow} parallel to each other +% with a distance of "\columnsep" between them, to +% fill the entire \gls{typeblock} (although the frames may +% end up marginally shorter than "\textheight" after +% they have been adjusted.) Again, these commands may only +% be used in the preamble. Note that unlike the standard +% "\twocolumn" command, this one has an optional argument +% that indicates which pages the two \glspl{flow} should +% appear on. Syntax: \cs{twocolumn}\oarg{pages}. +% \begin{macrocode} +\renewcommand*{\twocolumn}{\@twocolumn} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@twocolumn} +% \begin{macrocode} +\newcommand*{\@twocolumn}[1][all]{% +\@twocolumninarea[#1]{\textwidth}{\textheight}{0pt}{0pt}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumninarea} +% Again, "\twocolumn" is actually a special case of +% "\twocolumninarea". +% Syntax:\newline +% \cs{twocolumninarea}\oarg{pages}\marg{w}\marg{h}\marg{x}\marg{y}. +% \begin{macrocode} +\newcommand*{\twocolumninarea}{\@twocolumninarea} +\@onlypreamble{\twocolumninarea} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@twocolumninarea} +% \begin{macrocode} +\newcommand*{\@twocolumninarea}[5][all]{% +\setlength{\columnheight}{#3}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\setlength{\columnwidth}{#2}% +\addtolength{\columnwidth}{-\columnsep}% +\divide\columnwidth by 2\relax +\setlength{\@ff@tmp@x}{#4}% +\addtolength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\@n@wflowframe[#1]{\columnwidth}{\columnheight}{#4}{#5}% +\setflowframe{\c@maxflow}{margin=left}% +\@n@wflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{#5}% +\setflowframe{\c@maxflow}{margin=right}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Ncolumn} +% Again for an aribtrary number of columns (\meta{n}). Syntax: +% \cs{Ncolumn}\oarg{pages}\marg{n}. +% \begin{macrocode} +\newcommand*{\Ncolumn}[2][all]{% +\Ncolumninarea[#1]{#2}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\Ncolumn} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Ncolumninarea} +% Check the number of \glspl{flow} requested, and do one +% of the special cases if available. +% Syntax:\newline +% \cs{Ncolumninarea}\oarg{pages}\marg{n}\marg{w}\marg{h}\marg{x}\marg{y}. +% \begin{macrocode} +\newcommand*{\Ncolumninarea}[6][all]{% +\ifnum#2>2\relax + \@Ncolumninarea[#1]{#2}{#3}{#4}{#5}{#6}% +\else + \ifcase#2\relax + \PackageError{flowfram}{% + You have requested 0 flowframes!}{% + It does not make much sense to ask to create 0 flow frames}% + \or + \onecolumninarea[#1]{#3}{#4}{#5}{#6}% + \or + \twocolumninarea[#1]{#3}{#4}{#5}{#6}% + \else + \PackageError{flowfram}{% + Can't create a negative number of flow frames!}{% + You have asked for \number#2 \space flow frames + which really doesn't make sense}% + \fi +\fi +} + +\@onlypreamble{\Ncolumninarea} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@Ncolumninarea} +% Set up \meta{n} columns in the area specified. +% There is a horizontal distance of "\columnsep" +% between them all. +% \begin{macrocode} +\newcommand*{\@Ncolumninarea}[6][all]{% +\@colN=#2\relax +\advance\@colN by -1\relax +\setlength{\columnwidth}{#3}% +\addtolength{\columnwidth}{-\@colN\columnsep}% +\divide\columnwidth by #2\relax +\setlength{\@ff@tmp@x}{#5}% +\setlength{\columnheight}{#4}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\@colN=0\relax +\loop +\advance\@colN by 1\relax +\newflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{#6}% +\addtolength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\ifnum\@colN<#2 +\repeat +} +% \end{macrocode} +%\end{macro} +% +% Set up something similar but have another frame (of type +% \meta{type}) at the top of the other frames. +%\begin{macro}{\vcolumnsep} +% The vertical distance between the top frames and column flow +% frames when created using "\Ncolumntop" etc is given by: +% \begin{macrocode} +\newlength{\vcolumnsep} +\setlength{\vcolumnsep}{\columnsep} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\onecolumntop} +% "\onecolumntop" makes one \gls{flow}, and one \meta{type} +% frame in the area specified, where the \meta{type} frame is +% \meta{H} high. +% The distance between the top frame and the column \gls{flow} +% will be approximately "\vcolumnsep". (The height of \gls{flow} +% may be adjusted to make it an integer multiple of +% "\baselineskip".) +% +% First the special case where the area is the \gls{typeblock}. +% Syntax:\newline +% \cs{onecolumntop}\oarg{pages}\marg{type}\marg{H} +% \begin{macrocode} +\newcommand*{\onecolumntop}[3][all]{% +\onecolumntopinarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\onecolumntop} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\onecolumnStop} +% Special case for \gls{static}. +% Syntax: \cs{onecolumnStop}\oarg{pages}\marg{H} +% \begin{macrocode} +\newcommand*{\onecolumnStop}[2][all]{% +\onecolumntopinarea[#1]{static}{#2}{\textwidth}{\textheight}{0pt}{0pt}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\onecolumnDtop} +% Special case for \gls{dynamic}. +% Syntax: \cs{onecolumnDtop}\oarg{pages}\marg{H} +% \begin{macrocode} +\newcommand*{\onecolumnDtop}[2][all]{% +\onecolumntopinarea[#1]{dynamic}{#2}{\textwidth}{\textheight}{0pt}{0pt}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\newframe} +% Create a frame of given type. +% Syntax:\newline +% \cs{newframe}\oarg{pages}\marg{type}\marg{w}\marg{h}\marg{x}\marg{y}. +% \begin{macrocode} +\newcommand*{\newframe}[6][all]{% +\ifthenelse{\equal{#2}{flow}}{% +\@n@wflowframe[#1]{#3}{#4}{#5}{#6}% +}{% +\ifthenelse{\equal{#2}{dynamic}}{% +\@n@wdynamicframe[#1]{#3}{#4}{#5}{#6}}{% +\ifthenelse{\equal{#2}{static}}{% +\@n@wstaticframe[#1]{#3}{#4}{#5}{#6}}{% +\PackageError{flowfram}{Unknown frame type '#2'}{% +Available frame types are: 'flow', 'static' and 'dynamic'}}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\onecolumntopinarea} +% Now for a specified area. +% Syntax:\newline +% \cs{onecolumntopinarea}\oarg{pages}\marg{type}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y}. +% \begin{macrocode} +\newlength\@ff@staticH + +\newcommand*{\onecolumntopinarea}[7][all]{% +\setlength{\@ff@staticH}{#3}% +\setlength{\@ff@tmp@y}{#5}% +\addtolength{\@ff@tmp@y}{-\@ff@staticH}% +\setlength{\columnheight}{\@ff@tmp@y}% +\addtolength{\columnheight}{-\vcolumnsep}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\addtolength{\@ff@tmp@y}{#7}% +\newframe[#1]{#2}{#4}{\@ff@staticH}{#6}{\@ff@tmp@y}% +\@n@wflowframe[#1]{#4}{\columnheight}{#6}{#7}% +} + +\@onlypreamble{\onecolumntopinarea} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\onecolumnStopinarea} +% Special case for \gls{static}. +% Syntax:\newline +% \cs{onecolumnStopinarea}\oarg{pages}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y}. +% \begin{macrocode} +\newcommand*{\onecolumnStopinarea}[6][all]{% +\onecolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\onecolumnDtopinarea} +% Special case for \gls{dynamic}. +% Syntax:\newline +% \cs{onecolumnDtopinarea}\oarg{pages}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y}. +% \begin{macrocode} +\newcommand*{\onecolumnDtopinarea}[6][all]{% +\onecolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumntop} +% Now for two \glspl{flow}, with a single \meta{type} frame +% above both of them. +% Syntax:\newline +% \cs{twocolumntop}\oarg{pages}\marg{type}\marg{H} +% +% First the special case where the area is the entire +% \gls{typeblock}: +% \begin{macrocode} +\newcommand*{\twocolumntop}[3][all]{% +\twocolumntopinarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\twocolumntop} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumnStop} +% Special case for \gls{static}. +% \begin{macrocode} +\newcommand*{\twocolumnStop}[2][all]{% +\@twocolumntopinarea[#1]{static}{#2}{\textwidth}{\textheight}{0pt}{0pt}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumnDtop} +% Special case for \gls{dynamic}. +% \begin{macrocode} +\newcommand*{\twocolumnDtop}[2][all]{% +\twocolumntop[#1]{dynamic}{#2}} +% \end{macrocode} +%\end{macro} +% +% Now for a general area. +%\begin{macro}{\twocolumntopinarea} +% Syntax:\newline +% \cs{twocolumntopinarea}\oarg{pages}\marg{type}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y}. +% \begin{macrocode} +\newcommand*{\twocolumntopinarea}{\@twocolumntopinarea} +\newcommand*{\@twocolumntopinarea}[7][all]{% +\setlength{\@ff@staticH}{#3}% +% work out where to put the static frame +\setlength{\@ff@tmp@y}{#5}% +\addtolength{\@ff@tmp@y}{-\@ff@staticH}% +\setlength{\columnheight}{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#7}% +\newframe[#1]{#2}{#4}{\@ff@staticH}{#6}{\@ff@tmp@y}% +% work out height of the flow frames +\addtolength{\columnheight}{-\vcolumnsep}% +\ifffvadjust\adjustheight{\columnheight}\fi% +% work out the widths of the flow frames +\setlength{\columnwidth}{#4}% +\addtolength{\columnwidth}{-\columnsep}% +\divide\columnwidth by 2\relax +% work out the offset of the second column +\setlength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\addtolength{\@ff@tmp@x}{#6}% +\@n@wflowframe[#1]{\columnwidth}{\columnheight}{#6}{#7}% +\setflowframe{\c@maxflow}{margin=left}% +\@n@wflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{#7}% +\setflowframe{\c@maxflow}{margin=right}% +} +\@onlypreamble{\twocolumntopinarea} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumnStopinarea} +% Special case for \gls{static}. +% \begin{macrocode} +\newcommand*{\twocolumnStopinarea}[6][all]{% +\twocolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumnDtopinarea} +% Special case for \gls{dynamic}. +% \begin{macrocode} +\newcommand*{\twocolumnDtopinarea}[6][all]{% +\twocolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Ncolumntop} +% Similarly for an arbitrary number of \glspl{flow}. +% Special case where the area is the \gls{typeblock}. +% +% Syntax:\newline +% \cs{Ncolumntop}\oarg{pages}\marg{type}\marg{n}\marg{H} +% \begin{macrocode} +\newcommand*{\Ncolumntop}[4][all]{% +\Ncolumntopinarea[#1]{#2}{#3}{#4}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\Ncolumntop} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\NcolumnStop} +% Special case for \gls{static}. +% \begin{macrocode} +\newcommand*{\NcolumnStop}[3][all]{% +\Ncolumntop[#1]{static}{#2}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\NcolumnDtop} +% Special case for \gls{dynamic}. +% \begin{macrocode} +\newcommand*{\NcolumnDtop}[3][all]{% +\Ncolumntop[#1]{dynamic}{#2}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Ncolumntopinarea} +% Again test to make sure the user requested a sensible +% number. +% \begin{macrocode} +\newcommand*{\Ncolumntopinarea}[8][all]{% +\ifnum#3>2\relax + \@Ncolumntopinarea[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}% +\else + \ifcase#3\relax + \PackageError{flowfram}{% + You have requested 0 flowframes!}{% + It does not make much sense to ask to create 0 flow frames} + \or + \onecolumntopinarea[#1]{#2}{#4}{#5}{#6}{#7}{#8}% + \or + \twocolumntopinarea[#1]{#2}{#4}{#5}{#6}{#7}{#8}% + \else + \PackageError{flowfram}{% + Can't create a negative number of flow frames!}{% + You have asked for \number#3 \space flow frames + which really doesn't make sense}% + \fi +\fi +} +\@onlypreamble{\Ncolumntopinarea} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@Ncolumntopinarea} +% Fit the frames into specified area. +% Syntax:\newline +% \cs{Ncolumntopinarea}\oarg{pages}\marg{type}\marg{n}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y}. +% \begin{macrocode} +\newcommand*{\@Ncolumntopinarea}[8][all]{% +\setlength{\@ff@staticH}{#4}% +% \end{macrocode} +% work out where to put the static frame +% \begin{macrocode} +\setlength{\@ff@tmp@y}{#6}% +\addtolength{\@ff@tmp@y}{-\@ff@staticH}% +\setlength{\columnheight}{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#8}% +\newframe[#1]{#2}{#5}{\@ff@staticH}{#7}{\@ff@tmp@y}% +% \end{macrocode} +% work out height of the flow frames +% \begin{macrocode} +\addtolength{\columnheight}{-\vcolumnsep}% +% \end{macrocode} +% adjust the flow frame height so that it is a multiple of +% \cs{baselineskip} +% \begin{macrocode} +\ifffvadjust\adjustheight{\columnheight}\fi% +% \end{macrocode} +% work out the widths of the flow frames +% \begin{macrocode} +\@colN=#3\relax +\advance\@colN by -1\relax +\setlength{\columnwidth}{#5}% +\addtolength{\columnwidth}{-\@colN\columnsep}% +\divide\columnwidth by #3\relax +\setlength{\@ff@tmp@x}{#7}% +\@colN=0\relax +\loop +\advance\@colN by 1\relax +\newflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{#8}% +% work out the offset for the next column +\addtolength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\ifnum\@colN<#3 +\repeat +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\NcolumnStopinarea} +% Specific case for \gls{static}. +% \begin{macrocode} +\newcommand*{\NcolumnStopinarea}[7][all]{% +\Ncolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}{#7}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\NcolumnDtopinarea} +% Specific case for \gls{dynamic}. +% \begin{macrocode} +\newcommand*{\NcolumnDtopinarea}[7][all]{% +\Ncolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}{#7}} +% \end{macrocode} +%\end{macro} +% Now the same kind of thing but with the \meta{type} frame at the +% bottom. Firstly, a single \gls{flow} with a \meta{type} +% frame below it. +% +%\begin{macro}{\onecolumnbottom} +% Syntax:\newline +% \cs{onecolumnbottom}\oarg{pages}\marg{type}\marg{H} +% \begin{macrocode} +\newcommand*{\onecolumnbottom}[3][all]{% +\onecolumnbottominarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} +% \end{macrocode} +%\end{macro} +% This command may only be used in the preamble. +% \begin{macrocode} +\@onlypreamble{\onecolumnbottom} +% \end{macrocode} +%\begin{macro}{\onecolumnSbottom} +% Special case for \gls{static}. +% \begin{macrocode} +\newcommand*{\onecolumnSbottom}[2][all]{% +\onecolumnbottom[#1]{static}{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\onecolumnDbottom} +% Special case for \gls{dynamic}. +% \begin{macrocode} +\newcommand*{\onecolumnDbottom}[2][all]{% +\onecolumnbottom[#1]{dynamic}{#2}} +% \end{macrocode} +%\end{macro} +% +% General case of the above, but fit in specified area. +%\begin{macro}{\onecolumnbottominarea} +% Syntax:\newline +% \cs{onecolumnbottominarea}\oarg{pages}\marg{type}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y},\newline +% where \meta{H} is the \meta{type} frame's height. +% The area is defined by bottom +% left co-ordinates (\meta{x}, \meta{y}) width \meta{w}, and +% height \meta{h}. +% \begin{macrocode} +\newcommand*{\onecolumnbottominarea}[7][all]{% +\setlength{\@ff@staticH}{#3}% +\setlength{\columnheight}{#5}% +\addtolength{\columnheight}{-\@ff@staticH}% +\addtolength{\columnheight}{-\vcolumnsep}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\setlength{\@ff@tmp@y}{#5}% +\addtolength{\@ff@tmp@y}{-\columnheight}% +\addtolength{\@ff@tmp@y}{#7}% +\newframe[#1]{#2}{#4}{\@ff@staticH}{#6}{#7}% +\newflowframe[#1]{#4}{\columnheight}{#6}{\@ff@tmp@y}% +} +% \end{macrocode} +%\end{macro} +% Again, this command may only be used in the preamble. +% \begin{macrocode} +\@onlypreamble{\onecolumnbottominarea} +% \end{macrocode} +%\begin{macro}{\onecolumnSbottominarea} +% Special case for \gls{static}. +% \begin{macrocode} +\newcommand*{\onecolumnSbottominarea}[6][all]{% +\onecolumnbottominarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\onecolumnDbottominarea} +% Special case for \gls{dynamic}. +% \begin{macrocode} +\newcommand*{\onecolumnDbottominarea}[6][all]{% +\onecolumnbottominarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumnbottom} +% Now for two \glspl{flow} side by side with a static +% frame underneath both of them. Firstly, the specific +% case where the area is the entire \gls{typeblock}. +% Syntax:\newline +% \cs{twocolumnbottom}\oarg{pages}\marg{type}\marg{H}. +% \begin{macrocode} +\newcommand*{\twocolumnbottom}[3][all]{% +\twocolumnSbottominarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\twocolumnbottom} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumnSbottom} +% Special case for \gls{static}. +% \begin{macrocode} +\newcommand*{\twocolumnSbottom}[2][all]{% +\twocolumnbottom[#1]{static}{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumnDbottom} +% Special case for \gls{dynamic}. +% \begin{macrocode} +\newcommand*{\twocolumnDbottom}[2][all]{% +\twocolumnbottom[#1]{dynamic}{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumnbottominarea} +% Now for a general area. +% Syntax:\newline +% \cs{twocolumnbottominarea}\oarg{pages}\marg{type}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y}. +% \begin{macrocode} +\newcommand*{\twocolumnbottominarea}[7][all]{% +\setlength{\@ff@staticW}{#4}% +\setlength{\@ff@staticH}{#3}% +% \end{macrocode} +% work out height of the flow frames +% \begin{macrocode} +\setlength{\columnheight}{#5}% +\addtolength{\columnheight}{-\@ff@staticH}% +\addtolength{\columnheight}{-\vcolumnsep}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\newframe[#1]{#2}{\@ff@staticW}{\@ff@staticH}{#6}{#7}% +% \end{macrocode} +% work out the $y$ position of the flow frames +% \begin{macrocode} +\setlength{\@ff@tmp@y}{#5}% +\addtolength{\@ff@tmp@y}{-\columnheight}% +\addtolength{\@ff@tmp@y}{#7}% +% \end{macrocode} +% work out the widths of the flow frames +% \begin{macrocode} +\setlength{\columnwidth}{\@ff@staticW}% +\addtolength{\columnwidth}{-\columnsep}% +\divide\columnwidth by 2\relax +% \end{macrocode} +% work out the $x$ offset of the second column +% \begin{macrocode} +\setlength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\addtolength{\@ff@tmp@x}{#6}% +\newflowframe[#1]{\columnwidth}{\columnheight}{#6}{\@ff@tmp@y}% +\setflowframe{\c@maxflow}{margin=left}% +\newflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{\@ff@tmp@y}% +\setflowframe{\c@maxflow}{margin=right}% +} +\@onlypreamble{\twocolumnbottominarea} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumnSbottominarea} +% Special case for \gls{static}. +% \begin{macrocode} +\newcommand*{\twocolumnSbottominarea}[6][all]{% +\twocolumnbottominarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\twocolumnDbottominarea} +% Special case for \gls{dynamic}. +% \begin{macrocode} +\newcommand*{\twocolumnDbottominarea}[6][all]{% +\twocolumnbottominarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} +% \end{macrocode} +%\end{macro} +% Now for an arbitrary number of parallel \glspl{flow} +% with a \gls{static} beneath all of them. +% +%\begin{macro}{\Ncolumnbottom} +% First make them fill the entire \gls{typeblock}. +% Syntax:\newline +% \cs{Ncolumnbottom}\oarg{pages}\marg{type}\marg{H}. +% \begin{macrocode} +\newcommand*{\Ncolumnbottom}[4][all]{% +\Ncolumnbottominarea[#1]{#2}{#3}{#4}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\Ncolumnbottom} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\NcolumnSbottom} +% Special case for \gls{static}. +% \begin{macrocode} +\newcommand*{\NcolumnSbottom}[3][all]{% +\Ncolumnbottom[#1]{static}{#2}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\NcolumnDbottom} +% Special case for \gls{dynamic}. +% \begin{macrocode} +\newcommand*{\NcolumnDbottom}[3][all]{% +\Ncolumnbottom[#1]{dynamic}{#2}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Ncolumnbottominarea} +% Again check the user has requested a sensible number. +% \begin{macrocode} +\newcommand*{\Ncolumnbottominarea}[8][all]{% +\ifnum#3>2\relax + \@Ncolumnbottominarea[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}% +\else + \ifcase#3\relax + \PackageError{flowfram}{% + You have requested 0 flowframes!}{% + It does not make much sense to ask to create 0 flow frames} + \or + \onecolumnbottominarea[#1]{#2}{#4}{#5}{#6}{#7}{#8}% + \or + \twocolumnbottominarea[#1]{#2}{#4}{#5}{#6}{#7}{#8}% + \else + \PackageError{flowfram}{% + Can't create a negative number of flow frames!}{% + You have asked for \number#3 \space flow frames + which really doesn't make sense}% + \fi +\fi +} +\@onlypreamble{\Ncolumnbottominarea} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@NcolumnSbottominarea} +% An arbitrary number of columns with a \gls{static} +% underneath them all, filling the specified area. +% \begin{macrocode} +\newcommand*{\@NcolumnSbottominarea}[8][all]{% +\setlength{\@ff@staticH}{#4}% +% \end{macrocode} +% work out height of the flow frames +% \begin{macrocode} +\setlength{\columnheight}{#6}% +\addtolength{\columnheight}{-\@ff@staticH}% +\addtolength{\columnheight}{-\vcolumnsep}% +% \end{macrocode} +% adjust the flow frame height so that it is a multiple of +% \cs{baselineskip} +% \begin{macrocode} +\ifffvadjust\adjustheight{\columnheight}\fi +\newframe[#1]{#2}{#5}{\@ff@staticH}{#7}{#8}% +% \end{macrocode} +% work out the $y$ offset of the flow frames +% \begin{macrocode} +\setlength{\@ff@tmp@y}{#6}% +\addtolength{\@ff@tmp@y}{-\columnheight}% +\addtolength{\@ff@tmp@y}{#8}% +% \end{macrocode} +% work out the widths of the flow frames +% \begin{macrocode} +\@colN=#3\relax +\advance\@colN by -1\relax +\setlength{\columnwidth}{#5}% +\addtolength{\columnwidth}{-\@colN\columnsep}% +\divide\columnwidth by #3\relax +\setlength{\@ff@tmp@x}{#7}% +\@colN=0\relax +\loop +\advance\@colN by 1\relax +\newflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{\@ff@tmp@y}% +% \end{macrocode} +% work out the offset for the next column +% \begin{macrocode} +\addtolength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\ifnum\@colN<#3 +\repeat +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\NcolumnSbottominarea} +% Specific case for \gls{static}. +% \begin{macrocode} +\newcommand*{\NcolumnSbottominarea}[1][all]{% +\Ncolumnbottominarea[#1]{static}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\NcolumnDbottominarea} +% Specific case for \gls{dynamic}. +% \begin{macrocode} +\newcommand*{\NcolumnDbottominarea}[1][all]{% +\Ncolumnbottominarea[#1]{dynamic}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\adjustheight} +% Given a height "#1" (a length), adjust it so that it is a multiple of "\baselineskip". +% \begin{macrocode} +\newcount\@ff@adjh +\newcommand*{\adjustheight}[1]{% +% \end{macrocode} +% convert to an integer +% \begin{macrocode} +\@ff@adjh=#1\relax +\divide\@ff@adjh by \baselineskip\relax +#1=\baselineskip\relax +\multiply#1 by \@ff@adjh\relax +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\adjustcolsep} +% Adjust the value of "\columnsep" so that the margins will fit between columns. +% \begin{macrocode} +\newcommand*{\adjustcolsep}{% +\multiply\columnsep by 2\relax +\addtolength{\columnsep}{\marginparwidth}} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Backdrop Effects} +% Set up some commands to make \glspl{static} for different styles +% of backdrop. +%\begin{macro}{\vtwotone} +% Syntax:\newline +% \cs{vtwotone}\oarg{pages}\oarg{xoffset}\marg{W1}\marg{C1}\marg{L1}\marg{W2}\marg{C2}\marg{L2} +%\newline where the first frame +% has width \meta{W1} with background colour \meta{C1} and label \meta{L1}. +% The second frame has width \meta{W2} with background colour \meta{C2} +% and label \meta{L2}. Unlike earlier commands, the $x$-offset is +% relative to the left page edge \emph{not} the \gls{typeblock}. +% This is because they are designed for backdrops, which +% tend to span the entire page. +% Note that the colour specs must be +% completely enclosed in braces. e.g.\ "{[gray]{0.5}}" \emph{not} "[gray]{0.5}". +% +% Need a length to store the width of the \gls{static}. +% \begin{macrocode} +\newlength\@ff@staticW +% \end{macrocode} +% Vertical two tone effect where the height of the static +% frames is equal to the paper height. +% \begin{macrocode} +\newcommand*{\vtwotone}[1][all]{% +\def\ff@pages{#1}\@vtwotone} + +\newcommand*{\@vtwotone}[1][0pt]{\@@vtwotonebottom{#1}{\paperheight}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\vtwotonebottom} +% Vertical two tone effect along the bottom of the page, of +% height \meta{H}. +% Syntax:\newline +% \cs{vtwotonebottom}\oarg{pages}\oarg{xoffset}\marg{H}\marg{W1}\marg{C1}\marg{L1}\marg{W2}\marg{C2}\marg{L2} +% where the first frame starts at \meta{xoffset}. +% \begin{macrocode} +\newcommand*{\@@vtwotonebottom}[8]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@x}{#1}% +\addtolength{\@ff@tmp@x@even}{#1}% +\@nextvband{\ff@pages}{#2}{#3}{#4}{#5}% +\@nextvband{\ff@pages}{#2}{#6}{#7}{#8}% +} + +\@onlypreamble{\vtwotone} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\vtwotonebottom} +% Border strip along the bottom of the page +% \begin{macrocode} +\newcommand*{\vtwotonebottom}[1][all]{% +\def\ff@pages{#1}\@vtwotonebottom} + +\@onlypreamble{\vtwotonebottom} + +\newcommand*{\@vtwotonebottom}[2][0pt]{\@@vtwotonebottom{#1}{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\vtwotonetop} +% Border strip along the top of the page +% \begin{macrocode} +\newcommand*{\vtwotonetop}[1][all]{% +\def\ff@pages{#1}\@vtwotonetop} + +\newcommand*{\@vtwotonetop}[2][0pt]{\@@vtwotonetop{#1}{#2}} + +\newcommand*{\@@vtwotonetop}[8]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computetopedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{-#2}% +\addtolength{\@ff@tmp@x}{#1}% +\addtolength{\@ff@tmp@x@even}{#1}% +\@nextvband{\ff@pages}{#2}{#3}{#4}{#5}% +\@nextvband{\ff@pages}{#2}{#6}{#7}{#8}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@nextvband} +% Make next \gls{static}. Syntax:\newline +% \cs{@nextvband}\marg{pages}\marg{height}\marg{width}\marg{colour specs}\marg{label}\newline +% $x$ and $y$ offsets are given by "\@ff@tmp@x" and "\@ff@tmp@y". +% On exit, "\@ff@tmp@x" is set to the right border. +% \begin{macrocode} +\newcommand*{\@nextvband}[5]{% +\setlength{\@ff@staticW}{#3}% +\ifthenelse{\equal{#5}{}}{% +\newstaticframe[#1]{\@ff@staticW}{#2}{\@ff@tmp@x}{\@ff@tmp@y}}% +{\newstaticframe[#1]{\@ff@staticW}{#2}{\@ff@tmp@x}{\@ff@tmp@y}[#5]}% +\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@x}{\@ff@staticW}% +\addtolength{\@ff@tmp@x@even}{\@ff@staticW}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\vNtone} +% Similarly for N colours. Syntax:\newline +% \cs{vNtone}\oarg{pages}\oarg{xoffset}\marg{n}\marg{W1}\marg{C1}\marg{L1}\ldots\marg{Wn}\marg{Cn}\marg{Ln}\newline +% where the first frame has width \meta{W1} with background +% colour \meta{C1} and label \meta{L1} all the way up to +% the \meta{n}th frame which has width \meta{Wn}, background +% colour \meta{Cn} and \gls{idl} \meta{Ln}. +% +% Keep track of which strip we are doing. +% \begin{macrocode} +\newcount\@thisstrip +% \end{macrocode} +% This command needs two optional arguments, so store +% first optional argument, and look for the next. +% \begin{macrocode} +\newcommand*{\vNtone}[1][all]{% +\def\ff@pages{#1}\@vNtone} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@vNtone} +% Got the first argument, now get the next. +% \begin{macrocode} +\newcommand*{\@vNtone}[2][0pt]{% +\@@vNtone{#1}{#2}{\paperheight}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@vNtone} +% Vertical \meta{n} tone aligned along the +% bottom of the page with height "#3". +% \begin{macrocode} +\newcommand*{\@@vNtone}[3]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@x}{#1}% +\addtolength{\@ff@tmp@x@even}{#1}% +\@thisstrip=#2\relax +\setlength{\@ff@staticH}{#3}% +\@nextvNband% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@nextvNband} +% Recursively do the next strip. +% \begin{macrocode} +\newcommand*{\@nextvNband}{% +\ifnum\@thisstrip>0\relax + \let\flf@next\@@nextvNband +\else + \let\flf@next\relax +\fi +\advance\@thisstrip by -1\relax +\flf@next} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@nextvNband} +% Do current strip, and go on to next one. +% \begin{macrocode} +\newcommand*{\@@nextvNband}[3]{% +\@nextvband{\ff@pages}{\@ff@staticH}{#1}{#2}{#3}\@nextvNband} + +\@onlypreamble{\vNtone} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\vNtonebottom} +% Border strip along the bottom of the page. Same as above +% but user specifies the height. +% \begin{macrocode} +\newcommand*{\vNtonebottom}[1][all]{% +\def\ff@pages{#1}\@vNtonebottom} +\@onlypreamble{\vNtonebottom} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@vNtonebottom} +% \begin{macrocode} +\newcommand*{\@vNtonebottom}[3][0pt]{% +\@@vNtone{#1}{#2}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\vNtonetop} +% Border strip along the top of the page. Again two +% optional arguments are required. Get first optional +% argument. +% \begin{macrocode} +\newcommand*{\vNtonetop}[1][all]{% +\def\ff@pages{#1}\@vNtonetop} +\@onlypreamble{\vNtonetop} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@vNtonetop} +% Get next optional argument. +% \begin{macrocode} +\newcommand*{\@vNtonetop}[3][0pt]{% +\@@vNtonetop{#1}{#2}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@vNtonetop} +% Now get on with it. Again, it has to be done +% recursively. +% \begin{macrocode} +\newcommand*{\@@vNtonetop}[3]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computetopedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{-#3}% +\addtolength{\@ff@tmp@x}{#1}% +\addtolength{\@ff@tmp@x@even}{#1}% +\@thisstrip=#2\relax +\setlength{\@ff@staticH}{#3}% +\@nextvNband% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\htwotone} +% Now do horizontal strips. Syntax:\newline +% \cs{htwotone}\oarg{pages}\oarg{y offset}\marg{H1}\marg{C1}\marg{L1}\marg{H2}\marg{C2}\marg{L2} +% \begin{macrocode} +\newcommand*{\htwotone}[1][all]{% +\def\ff@pages{#1}\@htwotone} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@htwotone} +% \begin{macrocode} +\newcommand*{\@htwotone}[1][0pt]{\@@htwotoneleft{#1}{\paperwidth}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@htwotoneleft} +% This is all done in much the same way as the vertical +% strips. +% \begin{macrocode} +\newcommand*{\@@htwotoneleft}[8]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#1}% +\@nexthband{\ff@pages}{#2}{#3}{#4}{#5}% +\@nexthband{\ff@pages}{#2}{#6}{#7}{#8}% +} + +\@onlypreamble{\htwotone} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\htwotoneleft} +% Two tone horizontal strips along left border +% Syntax: \cs{htwotoneleft}\oarg{pages}\oarg{y offset}\marg{width}\marg{H1}\marg{C1}\marg{L1}\marg{H2}\marg{C2}\marg{L2} +% \begin{macrocode} +\newcommand*{\htwotoneleft}[1][all]{% +\def\ff@pages{#1}\@htwotoneleft} +\@onlypreamble{\htwotoneleft} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@htwotoneleft} +% \begin{macrocode} +\newcommand*{\@htwotoneleft}[2][0pt]{\@@htwotoneleft{#1}{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\htwotoneright} +% Two tone horizontal strips along right border +% \begin{macrocode} +\newcommand*{\htwotoneright}[1][all]{% +\def\ff@pages{#1}\@htwotoneright} +\@onlypreamble{\htwotoneright} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@htwotoneright} +% \begin{macrocode} +\newcommand*{\@htwotoneright}[2][0pt]{\@@htwotoneright{#1}{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@htwotoneright} +% \begin{macrocode} +\newcommand*{\@@htwotoneright}[8]{% +\computerightedgeodd{\@ff@tmp@x}% +\if@twoside + \computerightedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#1}% +\addtolength{\@ff@tmp@x}{-#2}% +\addtolength{\@ff@tmp@x@even}{-#2}% +\@nexthband{\ff@pages}{#2}{#3}{#4}{#5}% +\@nexthband{\ff@pages}{#2}{#6}{#7}{#8}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\hNtone} +% Now for \meta{N} coloured horizontal strips +% \begin{macrocode} +\newcommand*{\hNtone}[1][all]{% +\def\ff@pages{#1}\@hNtone} +\@onlypreamble{\hNtone} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@hNtone} +% \begin{macrocode} +\newcommand*{\@hNtone}[2][0pt]{% +\@@hNtone{#1}{#2}{\paperwidth}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@hNtone} +% \begin{macrocode} +\newcommand*{\@@hNtone}[3]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#1}% +\@thisstrip=#2\relax +\setlength{\@ff@staticW}{#3}% +\@nexthNband% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\hNtoneleft} +% Now for the N tone strips along the left border +% \begin{macrocode} +\newcommand*{\hNtoneleft}[1][all]{% +\def\ff@pages{#1}\@hNtoneleft} +\@onlypreamble{\hNtoneleft} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@hNtoneleft} +% \begin{macrocode} +\newcommand*{\@hNtoneleft}[3][0pt]{% +\@@hNtone{#1}{#2}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\hNtoneright} +% Border strip along the right border +% \begin{macrocode} +\newcommand*{\hNtoneright}[1][all]{% +\def\ff@pages{#1}\@hNtoneright} +\@onlypreamble{\hNtoneright} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@hNtoneright} +% \begin{macrocode} +\newcommand*{\@hNtoneright}[3][0pt]{% +\@@hNtoneright{#1}{#2}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@hNtoneright} +% \begin{macrocode} +\newcommand*{\@@hNtoneright}[3]{% +\computerightedgeodd{\@ff@tmp@x}% +\if@twoside + \computerightedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#1}% +\addtolength{\@ff@tmp@x}{-#3}% +\addtolength{\@ff@tmp@x@even}{-#3}% +\@thisstrip=#2\relax +\setlength{\@ff@staticW}{#3}% +\@nexthNband% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@nexthband} +% Make next \gls{static}. Syntax:\newline +% \cs{@nexthband}\marg{pages}\marg{width}\marg{height}\marg{colour specs}\marg{label}\newline +% $x$ and $y$ offsets are given by "\@ff@tmp@x" and "\@ff@tmp@y". +% On exit, "\@ff@tmp@y" is set to the top border. +% \begin{macrocode} +\newcommand*{\@nexthband}[5]{% +\setlength{\@ff@staticH}{#3}% +\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}% +\@setframecol#4\end{\c@maxstatic}{backcol}{sf}% +\addtolength{\@ff@tmp@y}{\@ff@staticH}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@nexthNband} +% Get next horizontal strip recursively. +% \begin{macrocode} +\newcommand*{\@nexthNband}{% +\ifnum\@thisstrip>0\relax + \let\flf@next\@@nexthNband% +\else + \let\flf@next\relax% +\fi +\advance\@thisstrip by -1\relax +\flf@next} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@nexthNband} +% \begin{macrocode} +\newcommand*{\@@nexthNband}[3]{% +\@nexthband{\ff@pages}{\@ff@staticW}{#1}{#2}{#3}\@nexthNband} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\makebackgroundframe} +% Make one big \gls{static} that covers the entire page. +% This command should come before all other commands that create +% \glspl{static}, otherwise it will obscure all the ones defined +% before it. Syntax:\newline +% \cs{makebackgroundframe}\oarg{pages}\oarg{label}. +% \begin{macrocode} +\newcommand*{\makebackgroundframe}[1][all]{% +\ifnum\c@maxstatic>0\relax + \PackageWarning{flowfram}{Background frame is not + first static frame to be defined. All previously defined + static frames may be obscured.}% +\fi +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\newstaticframe[#1]{\paperwidth}{\paperheight}{\@ff@tmp@x}% +{\@ff@tmp@y}% +\expandafter\global\expandafter +\setlength\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname +{\@ff@tmp@x@even}} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Lines Between Frames} +%\DescribeMacro{\insertvrule} +% Insert a \gls{static} between two frames with a vertical +% rule that goes from the maximum height of the highest +% to the minimum height of the lowest, equidistant from +% both frames. Syntax:\newline +% \cs{insertvrule}\oarg{y top}\oarg{y bottom}\marg{frame1 type}\marg{IDN1}\marg{frame2 type}\meta{IDN2}. +% The starred version uses \glspl{idl} instead of \glspl{idn}. +% The optional arguments indicate to continue above the highest +% point by \meta{y top} or continue below the lowest point +% by \meta{y bottom}. +% +%\begin{macro}{\ffcolumnseprule} +% This has changed in v1.09. Define "\ffcolumnseprule" and use +% instead of "\columnseprule" +% \begin{macrocode} +\newlength\ffcolumnseprule +\setlength{\ffcolumnseprule}{2pt} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ffruledeclarations} +%\changes{1.11}{2008/06/27}{new} +% This can be redefined to use declarations that affect how the +% rule appears. For example, it can be used to set the colour of +% the rule. +% \begin{macrocode} +\newcommand*{\ffruledeclarations}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\insertvrule} +% Determine whether or not the starred version is being +% used. +% \begin{macrocode} +\newcommand*{\insertvrule}{\@ifstar\@sinsertvrule\@insertvrule} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@insertvrule} +% Two optional arguments required. +% \begin{macrocode} +\newcommand*{\@insertvrule}[1][0pt]{% +\@ifnextchar[{\@@insertvrule[#1]}{\@@insertvrule[#1][0pt]}} +% \end{macrocode} +%\end{macro} +% Need some lengths: +% \begin{macrocode} +\newlength\@ff@left@x +\newlength\@ff@left@y +\newlength\@ff@left@evenx +\newlength\@ff@left@eveny +\newlength\@ff@left@width +\newlength\@ff@left@height +% \end{macrocode} +%\begin{macro}{\@@insertvrule} +% Arguments all accounted for. Convert the frame type +% into a number to make life easier +% \begin{macrocode} +\def\@@insertvrule[#1][#2]#3#4#5#6{% +\ifthenelse{\equal{#3}{flow}}{% +\def\@ff@type@i{1}}{\ifthenelse{\equal{#3}{static}}{% +\def\@ff@type@i{2}}{\ifthenelse{\equal{#3}{dynamic}}{% +\def\@ff@type@i{3}}{\PackageError{flowfram}{Unknown frame +type '#3'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\ifthenelse{\equal{#5}{flow}}{% +\def\@ff@type@ii{1}}{\ifthenelse{\equal{#5}{static}}{% +\def\@ff@type@ii{2}}{\ifthenelse{\equal{#5}{dynamic}}{% +\def\@ff@type@ii{3}}{\PackageError{flowfram}{Unknown frame +type '#5'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\@@insert@vrule{#1}{#2}{\@ff@type@i}{#4}{\@ff@type@ii}{#6}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@insert@vrule} +% Insert a new \gls{static} between the two specified frames. +% Check to make sure which one is on the left and which one +% is on the right. +% Syntax:\newline +%\cs{@@insert@vrule}\marg{y top}\marg{y bottom}\marg{type ID}\marg{IDN}\marg{type ID}\marg{IDN}. +% \begin{macrocode} +\newcommand*{\@@insert@vrule}[6]{% +\@ff@getdim{#3}{#4}% +\setlength{\@ff@left@x}{\ffareax}% +\setlength{\@ff@left@y}{\ffareay}% +\setlength{\@ff@left@width}{\ffareawidth}% +\setlength{\@ff@left@height}{\ffareaheight}% +\@ff@getdim{#5}{#6}% +\ifnum\@ff@left@x>\ffareax\relax + \@ff@swaplen{\@ff@left@x}{\ffareax}% + \@ff@swaplen{\@ff@left@y}{\ffareax}% + \@ff@swaplen{\@ff@left@evenx}{\ffareaevenx}% + \@ff@swaplen{\@ff@left@eveny}{\ffareaevenx}% + \@ff@swaplen{\@ff@left@width}{\ffareawidth}% + \@ff@swaplen{\@ff@left@height}{\ffareaheight}% +\fi +\setlength{\@ff@tmp@x}{\@ff@left@x} +\addtolength{\@ff@tmp@x}{\@ff@left@width}% +\setlength{\@ff@staticW}{\ffareax}% +\addtolength{\@ff@staticW}{-\@ff@tmp@x}% +\setlength{\@ff@staticH}{\@ff@left@y}% +\addtolength{\@ff@staticH}{\@ff@left@height}% +\setlength{\@ff@tmp@y}{\ffareay}% +\addtolength{\@ff@tmp@y}{\ffareaheight}% +\ifnum\@ff@tmp@y>\@ff@staticH + \setlength{\@ff@staticH}{\@ff@tmp@y}% +\fi +\ifnum\@ff@left@y<\ffareay\relax + \setlength{\@ff@tmp@y}{\@ff@left@y}% +\else + \setlength{\@ff@tmp@y}{\ffareay}% +\fi +\addtolength{\@ff@staticH}{-\@ff@tmp@y}% +\newstaticframe{\@ff@staticW}{\@ff@staticH}% +{\@ff@tmp@x}{\@ff@tmp@y}% +\addtolength{\@ff@staticH}{#1}% +\addtolength{\@ff@staticH}{#2}% +\setstaticcontents{\c@maxstatic}{% +\ffruledeclarations +\ffvrule{#2}{\ffcolumnseprule}{\@ff@staticH}}% +\ifcase#3\relax +\or \edef\@ff@pages{\csname @ff@pages@\romannumeral#4\endcsname}% +\or \edef\@ff@pages{\csname @sf@pages@\romannumeral#4\endcsname}% +\or \edef\@ff@pages{\csname @df@pages@\romannumeral#4\endcsname}% +\fi +\setstaticframe{\c@maxstatic}{pages=\@ff@pages}% +% \end{macrocode} +% check the difference between odd and even page co-ordinates +% and shift new frame in same direction. (Assumes the two +% original frames stay in the same relative position.) +% \begin{macrocode} +\addtolength{\@ff@tmp@x}{\@ff@left@evenx}% +\addtolength{\@ff@tmp@x}{-\@ff@left@x}% +\addtolength{\@ff@tmp@y}{\@ff@left@eveny}% +\addtolength{\@ff@tmp@y}{-\@ff@left@y}% +\setstaticframe{\c@maxstatic}{evenx=\@ff@tmp@x,eveny=\@ff@tmp@y}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ffvrule} +%\changes{1.11}{2008/06/27}{new} +%\cs{ffvrule}\marg{offset}\marg{width}\marg{height}\par +% Draws the rule for \cs{insertvrule} +% \begin{macrocode} +\newcommand*{\ffvrule}[3]{% +\hfill \rule[-#1]{#2}{#3}\hfill\mbox{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sinsertvrule} +% Starred version. Two optional arguments required. +% \begin{macrocode} +\newcommand*{\@sinsertvrule}[1][0pt]{% +\@ifnextchar[{\@@sinsertvrule[#1]}{\@@sinsertvrule[#1][0pt]}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@sinsertvrule} +% Find out the frame types and their \gls{idn}. +% \begin{macrocode} +\def\@@sinsertvrule[#1][#2]#3#4#5#6{% +\ifthenelse{\equal{#3}{flow}}{% +\def\@ff@type@i{1}\@flowframeid{#4}\@ff@tmpN=\ff@id}{% +\ifthenelse{\equal{#3}{static}}{% +\def\@ff@type@i{2}\@staticframeid{#4}\@ff@tmpN=\ff@id}{% +\ifthenelse{\equal{#3}{dynamic}}{% +\def\@ff@type@i{3}\@dynamicframeid{#4}\@ff@tmpN=\ff@id}{% +\PackageError{flowfram}{Unknown frame +type '#3'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\ifthenelse{\equal{#5}{flow}}{% +\def\@ff@type@ii{1}\@flowframeid{#6}}{% +\ifthenelse{\equal{#5}{static}}{% +\def\@ff@type@ii{2}\@staticframeid{#6}}{% +\ifthenelse{\equal{#5}{dynamic}}{% +\def\@ff@type@ii{3}\@dynamicframeid{#6}}{% +\PackageError{flowfram}{Unknown frame +type '#5'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\@@insert@vrule{#1}{#2}{\@ff@type@i}{\@ff@tmpN}% +{\@ff@type@ii}{\ff@id}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\inserthrule} +% Now for a horizontal rule. Syntax similar to "\insertvrule". +% Determine whether or not the starred version is being +% used. +% \begin{macrocode} +\newcommand*{\inserthrule}{\@ifstar\@sinserthrule\@inserthrule} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@inserthrule} +% Two optional arguments required. +% \begin{macrocode} +\newcommand*{\@inserthrule}[1][0pt]{% +\@ifnextchar[{\@@inserthrule[#1]}{\@@inserthrule[#1][0pt]}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@inserthrule} +% Arguments all accounted for. Convert the frame type +% into a number to make life easier +% \begin{macrocode} +\def\@@inserthrule[#1][#2]#3#4#5#6{% +\ifthenelse{\equal{#3}{flow}}{% +\def\@ff@type@i{1}}{\ifthenelse{\equal{#3}{static}}{% +\def\@ff@type@i{2}}{\ifthenelse{\equal{#3}{dynamic}}{% +\def\@ff@type@i{3}}{\PackageError{flowfram}{Unknown frame +type '#3'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\ifthenelse{\equal{#5}{flow}}{% +\def\@ff@type@ii{1}}{\ifthenelse{\equal{#5}{static}}{% +\def\@ff@type@ii{2}}{\ifthenelse{\equal{#5}{dynamic}}{% +\def\@ff@type@ii{3}}{\PackageError{flowfram}{Unknown frame +type '#5'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\@@insert@hrule{#1}{#2}{\@ff@type@i}{#4}{\@ff@type@ii}{#6}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@insert@hrule} +% Insert a new \gls{static} between the two specified frames. +% Check to make sure which one is on the top and which one +% is on the bottom. +% Syntax:\newline +%\cs{@@insert@hrule}\marg{x left}\marg{x right}\marg{type ID}\marg{IDN}\marg{type ID}\marg{IDN}. +% \begin{macrocode} +\newcommand*{\@@insert@hrule}[6]{% +\@ff@getdim{#3}{#4}% +\setlength{\@ff@left@x}{\ffareax}% +\setlength{\@ff@left@y}{\ffareay}% +\setlength{\@ff@left@width}{\ffareawidth}% +\setlength{\@ff@left@height}{\ffareaheight}% +\@ff@getdim{#5}{#6}% +\ifnum\@ff@left@y>\ffareay\relax + \@ff@swaplen{\@ff@left@x}{\ffareax}% + \@ff@swaplen{\@ff@left@y}{\ffareay}% + \@ff@swaplen{\@ff@left@width}{\ffareawidth}% + \@ff@swaplen{\@ff@left@height}{\ffareaheight}% +\fi +\setlength{\@ff@tmp@y}{\@ff@left@y}% +\addtolength{\@ff@tmp@y}{\@ff@left@height}% +\setlength{\@ff@staticH}{\ffareay}% +\addtolength{\@ff@staticH}{-\@ff@tmp@y}% +\setlength{\@ff@staticW}{\@ff@left@x}% +\addtolength{\@ff@staticW}{\@ff@left@width}% +\setlength{\@ff@tmp@x}{\ffareax}% +\addtolength{\@ff@tmp@x}{\ffareawidth}% +\ifnum\@ff@tmp@x>\@ff@staticW\relax + \setlength{\@ff@staticW}{\@ff@tmp@x}% +\fi +\ifnum\@ff@left@x<\ffareax\relax + \setlength{\@ff@tmp@x}{\@ff@left@x}% +\else + \setlength{\@ff@tmp@x}{\ffareax}% +\fi +\addtolength{\@ff@staticW}{-\@ff@tmp@x}% +\newstaticframe{\@ff@staticW}{\@ff@staticH}% +{\@ff@tmp@x}{\@ff@tmp@y}% +\addtolength{\@ff@staticW}{#1}% +\addtolength{\@ff@staticW}{#2}% +\setstaticcontents{\c@maxstatic}{% +\ffruledeclarations +\ffhrule{#1}{\@ff@staticW}{\ffcolumnseprule}}% +\ifcase#3\relax +\or \edef\@ff@pages{\csname @ff@pages@\romannumeral#4\endcsname}% +\or \edef\@ff@pages{\csname @sf@pages@\romannumeral#4\endcsname}% +\or \edef\@ff@pages{\csname @df@pages@\romannumeral#4\endcsname}% +\fi +\setstaticframe{\c@maxstatic}{pages=\@ff@pages}% +\addtolength{\@ff@tmp@x}{\@ff@left@evenx}% +\addtolength{\@ff@tmp@x}{-\@ff@left@x}% +\addtolength{\@ff@tmp@y}{\@ff@left@eveny}% +\addtolength{\@ff@tmp@y}{-\@ff@left@y}% +\setstaticframe{\c@maxstatic}{evenx=\@ff@tmp@x,eveny=\@ff@tmp@y}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ffhrule} +%\changes{1.11}{2008/06/27}{new} +%\cs{ffhrule}\marg{offset}\marg{width}\marg{height}\par +% Draws the rule for \cs{inserthrule} +% \begin{macrocode} +\newcommand*{\ffhrule}[3]{% +\hspace*{-#1}\rule{#2}{#3}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sinserthrule} +% Starred version. Two optional arguments required. +% \begin{macrocode} +\newcommand*{\@sinserthrule}[1][0pt]{% +\@ifnextchar[{\@@sinserthrule[#1]}{\@@sinserthrule[#1][0pt]}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@sinserthrule} +% Find out the frame types and their \gls{idn}. +% \begin{macrocode} +\def\@@sinserthrule[#1][#2]#3#4#5#6{% +\ifthenelse{\equal{#3}{flow}}{% +\def\@ff@type@i{1}\@flowframeid{#4}\@ff@tmpN=\ff@id}{% +\ifthenelse{\equal{#3}{static}}{% +\def\@ff@type@i{2}\@staticframeid{#4}\@ff@tmpN=\ff@id}{% +\ifthenelse{\equal{#3}{dynamic}}{% +\def\@ff@type@i{3}\@dynamicframeid{#4}\@ff@tmpN=\ff@id}{% +\PackageError{flowfram}{Unknown frame +type '#3'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\ifthenelse{\equal{#5}{flow}}{% +\def\@ff@type@ii{1}\@flowframeid{#6}}{% +\ifthenelse{\equal{#5}{static}}{% +\def\@ff@type@ii{2}\@staticframeid{#6}}{% +\ifthenelse{\equal{#5}{dynamic}}{% +\def\@ff@type@ii{3}\@dynamicframeid{#6}}{% +\PackageError{flowfram}{Unknown frame +type '#5'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\@@insert@hrule{#1}{#2}{\@ff@type@i}{\@ff@tmpN}% +{\@ff@type@ii}{\ff@id}% +} +% \end{macrocode} +%\end{macro} +% +% \subsection{Putting Chapter Headings in Dynamic Frames} +%\begin{macro}{\dfchaphead} +% Provide facility to make chapter headings appear +% in specified \gls{dynamic}. +% I originally called this macro "\putchapterheadingsindynamicframe" +% which was descriptive, but overly long, so I changed it +% to the rather more cryptic name "\dfchaphead". +% If the starred form is used, the frame is identified by \gls{idl}, +% the unstarred form identifies the frame \gls{idn}. +% \begin{macrocode} +\newcommand*{\dfchaphead}{% +\@ifstar\@sdynamicchap\@dynamicchap} +% \end{macrocode} +%\end{macro} +% Define style for the chapter heading. These commands +% are should only be used when "\dfchaphead" has been used. +%\begin{macro}{\DFchapterstyle} +% \begin{macrocode} +\newcommand{\DFchapterstyle}[1]{#1} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\DFschapterstyle} +% \begin{macrocode} +\newcommand{\DFschapterstyle}[1]{#1} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@dynamicchap} +% Unstarred version. +% \begin{macrocode} +\newcommand{\@dynamicchap}[1]{% +\@ifundefined{chapter}{\PackageError{flowfram}{Chapters aren't +defined}{The document +class you are using does not define chapters}}{% +\let\@ff@OLDmakechapterhead\@makechapterhead +\let\@ff@OLDmakeschapterhead\@makeschapterhead +\renewcommand{\DFchapterstyle}[1]{\@ff@OLDmakechapterhead{##1}}% +\renewcommand{\DFschapterstyle}[1]{\@ff@OLDmakeschapterhead{##1}}% +% +\xdef\@makechapterhead##1{% +\noexpand\@setdynamiccontents{\number#1}{% +\noexpand\DFchapterstyle{##1}}}% +\xdef\@makeschapterhead##1{% +\noexpand\@setdynamiccontents{\number#1}{% +\noexpand\DFschapterstyle{##1}}}% +}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sdynamicchap} +% Starred form. +% \begin{macrocode} +\newcommand{\@sdynamicchap}[1]{% +\@dynamicframeid{#1}\@dynamicchap{\ff@id}} +% \end{macrocode} +%\end{macro} +% There is no facility for placing other sectional types +% in \glspl{dynamic}. This is because, either (1) the sectioning +% command does not start a new page, in which case there +% is no way of telling where exactly the new section will start, +% and having a section title in some other location on the +% page is ambiguous, and would really confuse the reader, or +% (2) in the case of "\part" in report or book class files, the +% title appears on a page of its own, so where is the point in +% putting it in a \gls{dynamic}? +% +%\subsection{Thumbtabs} +% Define counter to keep track of total number of +% thumbtabs. +% \begin{macrocode} +\newcounter{maxthumbtabs} +% \end{macrocode} +%\begin{macro}{\defaultthumbtabtype} +% Check to see if chapters are defined, if they are make +% thumbtabs correspond to chapters, otherwise make +% thumbtabs correspond to sections. +% \begin{macrocode} +\@ifundefined{chapter}{% +\newcommand*{\defaultthumbtabtype}{section}}{ +\newcommand*{\defaultthumbtabtype}{chapter} +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ttb@type} +% Section type to assign to thumbtabs. +% \begin{macrocode} +\newcommand*{\@ttb@type}{\defaultthumbtabtype} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\makethumbtabs} +% Make the thumbtabs. Read in information from ".ttb" +% file, and open it for output. +% Syntax:\newline +% \cs{makethumbtabs}\oarg{y offset}\marg{height}\oarg{sec type}. +% +% First check to see if there is a second optional argument. +% \begin{macrocode} +\newcommand*{\makethumbtabs}[2][0pt]{% +\@ifnextchar[{\@makethumbtabs[#1]{#2}}{% +\@makethumbtabs[#1]{#2}[\defaultthumbtabtype]}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@makethumbtabs} +% Now all arguments are known, first redefine the +% appropriate sectioning command, then input the ttb file, +% and create the thumbtabs. +% \begin{macrocode} +\def\@makethumbtabs[#1]#2[#3]{% +\@ifundefined{#3}{\PackageError{flowfram}{% +Unknown section type '#3'}{}}{% +\renewcommand{\@ttb@type}{#3}% +\ifthenelse{\equal{#3}{chapter}}{\@makethumbchapter}{% +\ifthenelse{\equal{#3}{part}}{\@makethumbpart}{% +\@makethumbsection{#3}}}} +\@starttoc{ttb}% +\@dothumbtabs{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@makethumbchapter} +% If thumbtabs correspond to chapters, redefine "\@chapter" +% so that each unstarred chapter writes an entry to the +% ".ttb" file. +% \begin{macrocode} +\newcommand{\@makethumbchapter}{ +\let\@ttb@old@chapter\@chapter +\def\@chapter[##1]##2{% +\@ttb@old@chapter[##1]{##2}% +\addtocontents{ttb}{\protect\thumbtab + {\thepage}{\thechapter}{##1}{chapter.\thechapter}}% +\@afterheading +}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@makethumbpart} +% For parts in books or reports, the thumbtab needs to be +% saved after the part counter has been incremented, but +% before the page break so that the page number and part +% numbers are correct. If "\@endpart" is not defined, then +% the document class probably does not start a new page after +% "\part". (This can't be guaranteed for non standard class +% files, but there's nothing that can be done about that.) +% If this happens, just redefine "\@part", and hope for the +% best. +% \begin{macrocode} +\newcommand{\@makethumbpart}{ +\let\@ttb@old@part\@part +\@ifundefined{@endpart}{% +\def\@part[##1]##2{\@ttb@old@part[##1]{##2}% +\addtocontents{ttb}{\protect\thumbtab + {\thepage}{\thepart}{##1}{part.\thepage}}% +\@afterheading}}{% +\let\@ttb@old@endpart\@endpart +\def\@part[##1]##2{% +\def\@parttitle{##1}% +\@ttb@old@part[##1]{##2}% +}% +\def\@endpart{% +\addtocontents{ttb}{% +\protect\thumbtab{\thepage}% +{\thepart}{\@parttitle}{part.\thepage}}% +\@ttb@old@endpart +}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@makethumbsection} +% Thumbtabs defined for one of the remaining standard +% sectioning commands. Since these commands use +% "\@startsection", it is necessary to redefine +% "\@sect" to add the thumbtab information to the .ttb file. +% \begin{macrocode} +\newcommand*{\@makethumbsection}[1]{% +\let\@ttb@old@sect=\@sect +\def\@sect##1##2##3##4##5##6[##7]##8{% +\@ttb@old@sect{##1}{##2}{##3}{##4}{##5}{##6}[##7]{##8}% +\ifthenelse{\equal{##1}{#1}}{% +\addtocontents{ttb}{% +\protect\thumbtab{\thepage}{\csname the#1\endcsname}% +{##7}{#1.\csname the#1\endcsname}}% +\@afterheading}{}% +}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\thumbtab} +% The thumbtab file, ".ttb", will have a series of "\thumbtab" +% commands, when this file is read in, just store the +% information for now. +% \begin{macrocode} +\newcommand{\thumbtab}[4]{% +\stepcounter{maxthumbtabs}% +\expandafter +\gdef\csname thumbtab@pages@\romannumeral\c@maxthumbtabs\endcsname +{#1}% +\expandafter +\gdef\csname thumbtab@num@\romannumeral\c@maxthumbtabs\endcsname +{#2}% +\expandafter +\gdef\csname thumbtab@title@\romannumeral\c@maxthumbtabs\endcsname +{#3}% +\expandafter +\gdef\csname thumbtab@link@\romannumeral\c@maxthumbtabs\endcsname +{#4}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@dothumbtabs} +% Once the thumbtab information has been read in and stored +% in the thumbtab macros, create the thumbtabs using this +% information. First need to work out the \glspl{pgrange} between +% each thumbtab. If the following thumbtab starts on the +% same page as the previous one, leave the page varable +% as a single number (this may happen if the thumbtabs +% correspond to sections rather than chapters). If the +% following thumbtab starts on a different page to the +% one before it, the preceding thumbtab page variable so +% be a range from its own initial page up to the page before +% the next thumbtab starts. The final thumbtab has an open +% ended range. This final thumbtab will continue to be displayed +% until cancelled by "\disablethumbtabs". +% +% Syntax: \cs{@dothumbtabs}\marg{y offset}\marg{height}. +% \begin{macrocode} +\newcommand*{\@dothumbtabs}[2]{% +\@colN=0\relax +\whiledo{\@colN<\c@maxthumbtabs}{% + \advance\@colN by 1\relax + \edef\ff@pages{% + \csname thumbtab@pages@\romannumeral\@colN\endcsname}% + \ifnum\@colN=\c@maxthumbtabs + \expandafter + \xdef\csname thumbtab@pages@\romannumeral\@colN\endcsname{% + \ff@pages,>\ff@pages}% + \else + \advance\@colN by 1\relax + \edef\ff@endpage{% + \csname thumbtab@pages@\romannumeral\@colN\endcsname}% + \advance\@colN by -1\relax + \@ff@tmpN=\ff@endpage\relax + \advance\@ff@tmpN by -1\relax + \ifnum\@ff@tmpN>\ff@pages + \expandafter + \xdef\csname thumbtab@pages@\romannumeral\@colN\endcsname{% + \ff@pages-\number\@ff@tmpN}% + \fi + \fi +}% +\@@dothumbtabs{#1}{#2}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\thumbtabwidth} +% Default thumbtab width. +% \begin{macrocode} +\newlength{\thumbtabwidth} +\setlength{\thumbtabwidth}{1cm} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\thumbtabindexformat} +% Thumbtab format. If hyperlinks have been defined, +% use a hyperlink in the thumbtab index. +% Syntax: \cs{thumbtabindexformat}\marg{link}\marg{text}\marg{height} +% \begin{macrocode} +\@ifundefined{hyperlink}{% +\newcommand{\thumbtabindexformat}[3]{% +\thumbtabformat{#2}{#3}}}{% +\newcommand{\thumbtabindexformat}[3]{% +\hyperlink{#1}{\thumbtabformat{#2}{#3}}} +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\thumbtabformat} +% Individual thumbtab format. If rotating has +% been disabled, stack the letters vertically (this +% doesn't look very good). +% Syntax: \cs{thumbtabformat}\marg{text}\marg{height} +% \begin{macrocode} +\newcommand{\thumbtabformat}[2]{% +\if@ttb@rotate +\rotatebox{-90}{\parbox[c][\thumbtabwidth]{#2}{% +\centering#1}}% +\else +\parbox[c][#2]{\thumbtabwidth}{% +\centering\@ttb@stack{#1}}% +\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@flf@subsp} +% Substitute spaces for \cs{space}. Stores resulting text in +% \cs{@flf@subsptext} which should be set to empty before use. +%\changes{1.10}{2007/08/21}{new} +% \begin{macrocode} +\def\@flf@subsp#1 #2{% +\expandafter\flf@ta\expandafter{\@flf@subsptext}% +\flf@tb{#1}% +\edef\@flf@subsptext{\the\flf@ta\the\flf@tb}% +\def\@flf@tmp{#2}% +\ifx\@flf@tmp\@nnil + \let\@flf@donextsubsp=\@gobble +\else + \expandafter\flf@ta\expandafter{\@flf@subsptext}% + \edef\@flf@subsptext{\the\flf@ta\noexpand\space}% + \let\@flf@donextsubsp=\@flf@subsp +\fi +\@flf@donextsubsp{#2}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ttb@stack} +% Stack letters vertically. +% Any spaces first need to be substituted +% with \cs{space}, otherwise they will be ignored. +%\changes{1.10}{2007/08/21}{spaces now replaced with \cs{space}} +% \begin{macrocode} +\newcommand{\@ttb@stack}[1]{% +\def\@flf@subsptext{}% +\expandafter\@flf@subsp#1 \@nil\relax +\begin{tabular}{l}% +\expandafter\@@ttb@stack\@flf@subsptext\@nil\relax +\end{tabular}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@ttb@stack} +%\changes{1.10}{2007/08/21}{now uses \cs{mbox}} +% \begin{macrocode} +\def\@@ttb@stack#1#2{% +\def\@flf@tmp{#1}% +\ifx\@flf@tmp\@nnil + \let\flf@next\relax +\else + #1\\% + \def\@flf@tmp{#2}% + \ifx\@nnil#2\relax + \let\flf@next\@gobble + \else + \let\flf@next\@@ttb@stack + \fi +\fi +\flf@next{#2}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@greyscale} +% Count register to compute the grey scale. +% \begin{macrocode} +\newcount\@greyscale +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@dothumbtabs} +% Once the \gls{pgrange} have been sorted, create the +% \glspl{dynamic} associated with each thumbtab. +% Thumbtabs will initially have a grey background, but +% this can be changed by the user. Each thumbtab is given +% an \gls{idl} "thumbtab"\meta{n} where \meta{n} is the index of +% the thumbtab (starting from 1 for the topmost thumbtab.) +% Each frame in the thumbtab index is given an \gls{idl} +% "thumbtabindex"\meta{n}, where \meta{n} is as before. +% \begin{macrocode} +\newcommand{\@@dothumbtabs}[2]{% +\setlength{\@ff@tmp@y}{\textheight}% +\addtolength{\@ff@tmp@y}{-#2}% +\addtolength{\@ff@tmp@y}{-#1}% +\computerightedgeodd{\@ff@tmp@x}% +\addtolength{\@ff@tmp@x}{-\thumbtabwidth}% +\computeleftedgeeven{\@ff@tmp@x@even}% +\@ff@tmpN=0\relax +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% + \advance\@ff@tmpN by 1\relax + \@greyscale=\@ff@tmpN\relax + \multiply\@greyscale by 60\relax + \divide\@greyscale by \c@maxthumbtabs + \advance\@greyscale by 25\relax + \edef\@ff@greyscale{0.\number\@greyscale}% +% \end{macrocode} +% Thumbtab +% \begin{macrocode} + \newdynamicframe[none]{\thumbtabwidth}{#2}% + {\@ff@tmp@x}{\@ff@tmp@y}[thumbtab\number\@ff@tmpN]% + \expandafter\global\expandafter + \setlength\csname @df@\romannumeral\c@maxdynamic @evenx\endcsname + {\@ff@tmp@x@even}% +% \end{macrocode} +% set the contents of the dynamic frame +% \begin{macrocode} + \ifthenelse{\boolean{@ttb@title}\and\boolean{@ttb@num}}{% + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabformat{% + \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname\ + \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + }{% + \if@ttb@title + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabformat{% + \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + \fi + \if@ttb@num + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabformat{% + \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + \fi + }% + \expandafter + \xdef\csname @df@backcol@\romannumeral\c@maxdynamic\endcsname + {[gray]{\@ff@greyscale}} +% \end{macrocode} +% Thumbtab index +% \begin{macrocode} + \newdynamicframe[none]{\thumbtabwidth}{#2}% + {\@ff@tmp@x}{\@ff@tmp@y}[thumbtabindex\number\@ff@tmpN]% + \expandafter\global\expandafter + \setlength\csname @df@\romannumeral\c@maxdynamic @evenx\endcsname + {\@ff@tmp@x@even}% + \expandafter +% \end{macrocode} +% set the contents of the dynamic frame +% \begin{macrocode} + \ifthenelse{\boolean{@ttb@title}\and\boolean{@ttb@num}}{% + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabindexformat{% + \csname thumbtab@link@\romannumeral\@ff@tmpN\endcsname}{% + \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname\ + \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + }{% + \if@ttb@title + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabindexformat{% + \csname thumbtab@link@\romannumeral\@ff@tmpN\endcsname}{% + \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + \fi + \if@ttb@num + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabindexformat{% + \csname thumbtab@link@\romannumeral\@ff@tmpN\endcsname}{% + \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + \fi + }% + \expandafter + \xdef\csname @df@backcol@\romannumeral\c@maxdynamic\endcsname + {[gray]{\@ff@greyscale}} + \addtolength{\@ff@tmp@y}{-#2}% +}% +}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\enablethumbtabs} +% Enable thumbtabs. Once the \gls{idn} is obtained for the +% first thumbtab, the rest can be found by incrementing the +% number by 2 (the frames in between correspond to the +% thumbtab index.) +% \begin{macrocode} +\newcommand*{\enablethumbtabs}{% +\ifnum\c@maxthumbtabs>0 +\@ff@tmpN=0\relax +\@dynamicframeid{thumbtab1}% +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% +\advance\@ff@tmpN by 1\relax +% \end{macrocode} +% thumbtab +% \begin{macrocode} +\edef\@ff@pages{\csname thumbtab@pages@\romannumeral\@ff@tmpN\endcsname}% +\@@setdynamicframe{\ff@id}{pages=\@ff@pages}% +\advance\ff@id by 2\relax +}% +\else\PackageWarning{flowfram}{No thumb tabs defined}\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\disablethumbtabs} +% Disable all thumbtabs. +% \begin{macrocode} +\newcommand*{\disablethumbtabs}{% +\ifnum\c@maxthumbtabs>0 +\@ff@tmpN=0\relax +\@dynamicframeid{thumbtab1}% +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% +\advance\@ff@tmpN by 1\relax +% \end{macrocode} +%thumbtab +% \begin{macrocode} +\expandafter\xdef\csname @df@pages@\romannumeral\ff@id\endcsname +{none}% +\advance\ff@id by 1\relax +% \end{macrocode} +%thumbtab index +% \begin{macrocode} +\expandafter\xdef\csname @df@pages@\romannumeral\ff@id\endcsname +{none}% +\advance\ff@id by 1\relax +}\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\thumbtabindex} +% Show thumbtab index on current page. +% The "\@ff@doafter" bit circumvents the problem of duplicate page +% numbers, as the table of contents +% is quite frequently on page i while the first chapter starts on page 1. +% \begin{macrocode} +\newcommand*{\thumbtabindex}{% +\ifnum\c@maxthumbtabs>0\relax +\@ff@tmpN=0\relax +\@dynamicframeid{thumbtabindex1}% +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% +\advance\@ff@tmpN by 1\relax +\expandafter +\xdef\csname @df@pages@\romannumeral\ff@id\endcsname{\c@page}% +\edef\@ff@doafter{% +\noexpand\afterpage{% +\noexpand\setdynamicframe{\number\ff@id}{pages=none}}} +\@ff@doafter +\advance\ff@id by 2\relax +}\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\setthumbtab} +% Modify the settings for all the thumbtabs (including thumbtab +% index). Since the thumbtabs are \glspl{dynamic} +% you could just use "\setdynamicframe", however, the thumbtabs +% will not be generated on the first run, as there will be no +% information in the ttb file, so "\setdynamicframe" would +% generate an error. "\setthumbtab" will only give +% a warning message if it can not find the thumbtab. +% The argument "#1" is the index of the thumbtab (starting +% from 1), the second argument "#2" is the +% frame settings. +% \begin{macrocode} +\newcommand{\setthumbtab}[2]{% +\ifthenelse{\equal{#1}{all}}{% +\@ff@tmpN=0\relax +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% +\advance\@ff@tmpN by 1\relax +\@setthumbtab{\@ff@tmpN}{#2}}}{% +\@for\@ttb@id:=#1\do{\@setthumbtab{\@ttb@id}{#2}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@setthumbtab} +% Set individual thumbtab and its index tab. +% \begin{macrocode} +\newcommand{\@setthumbtab}[2]{% +% check if this thumbtab exists +\ifthenelse{\(\c@maxthumbtabs<#1\) \or \(#1<1\)}{% +\PackageWarning{flowfram}{Can't find thumbtab number '#1', +ttb file may not be up-to-date}}{% +\@dynamicframeid{thumbtab\number#1}% +\@@setdynamicframe{\ff@id}{#2}% +\@dynamicframeid{thumbtabindex\number#1}% +\@@setdynamicframe{\ff@id}{#2}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\setthumbtabindex} +% Only change settings for the thumbtab index. This can +% take a comma-separated number list. +% \begin{macrocode} +\newcommand{\setthumbtabindex}[2]{% +\ifthenelse{\equal{#1}{all}}{% +\@ff@tmpN=0\relax +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% +\advance\@ff@tmpN by 1\relax +\@setthumbtabindex{\@ff@tmpN}{#2}}}{% +\@for\@ttb@id:=#1\do{\@setthumbtabindex{\@ttb@id}{#2}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@setthumbtabindex} +% Change setting for individual thumbtab index entry. +% \begin{macrocode} +\newcommand{\@setthumbtabindex}[2]{% +% check if this thumbtab exists +\ifthenelse{\(\c@maxthumbtabs<#1\) \or \(#1<1\)}{% +\PackageWarning{flowfram}{Can't find thumbtab number `\number#1', +ttb file may not be up-to-date}}{% +\@dynamicframeid{thumbtabindex\number#1}% +\@@setdynamicframe{\ff@id}{#2}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\tocandhumbtabindex} +% Do both the table of contents and the thumbtab index +% \begin{macrocode} +\newcommand*{\tocandthumbtabindex}{% +\aligntoctrue +\tableofcontents +\thumbtabindex +\aligntocfalse +} +% \end{macrocode} +%\end{macro} +% +% \subsection{Minitocs} +%\begin{macro}{\@ttb@minitoctype} +% Sectioning type for the minitoc, by default it is the +% same as the thumbtabs +% \begin{macrocode} +\newcommand*{\@ttb@minitoctype}{\@ttb@type} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@starttoc} +% In order to align the table of contents with the thumbtabs, +% or to use minitocs, the toc information must be stored, +% rather than simply input. +% Therefore, modify "\@starttoc" so that it can store the contents +% of the file. "\if@storetoc" is used to determine whether +% to store the contents, or act as normal. +% \begin{macrocode} +\let\@ttb@old@starttoc\@starttoc +\newif\if@storetoc +\@storetocfalse +\renewcommand*{\@starttoc}[1]{% +\if@storetoc + \@ttb@storetoc{#1}% +\else + \@ttb@old@starttoc{#1}% +\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ttb@storetoc} +% store the contents of the file with the given extension +% \begin{macrocode} +\newcommand*{\@ttb@storetoc}[1]{% +\begingroup +\makeatletter +\@storefileconts{\jobname.#1}% +\if@filesw + \expandafter\newwrite\csname tf@#1\endcsname + \immediate\openout\csname tf@#1\endcsname\jobname.#1\relax +\fi +\@nobreakfalse +\endgroup} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@storefileconts} +% store the contents of named file, if it exists. +%\changes{1.10}{2007/08/21}{uses \cs{PackageInfo} instead of +% \cs{typeout}} +% \begin{macrocode} +\newcommand*{\@storefileconts}[1]{\IfFileExists{#1}{% +\@@storefileconts\@filef@und}{% +\PackageInfo{flowfram}{No file #1.}}} +% \end{macrocode} +%\end{macro} +% store the number of units corresponding to the +% thumbtab type, and minitoc units. These will usually +% have the same value, but this is not always +% guaranteed. +%\begin{macro}{\c@maxtocunits} +% Total number of toc units +% \begin{macrocode} +\newcount\c@maxtocunits +% \end{macrocode} +%\end{macro} +%\begin{macro}{\c@maxminitoc} +% Total number of minitoc units +% \begin{macrocode} +\newcount\c@maxminitoc +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@storefileconts} +% Read each line in from the file, and add to the contents +% list. +% \begin{macrocode} +\newcommand{\@@storefileconts}[1]{% +\@ifundefined{\@ttb@minitoctype}{\@ttb@minitoclevel=6\relax}{% +\expandafter\@ttb@minitoclevel\expandafter + =\csname @ttb@\@ttb@minitoctype @level\endcsname}% +\newread\@ttb@toc +\openin\@ttb@toc=#1\relax +\c@maxtocunits=0\relax +\c@maxminitoc=0\relax +\whiledo{\not\boolean{eof}\@ttb@toc}{% +\read\@ttb@toc to\tocline +\@addtotoclist{\tocline}{\c@maxtocunits}% +}% +\closein\@ttb@toc} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@addtotoclist} +% Before each line is added to the contents list, it is +% first checked to see whether the line starts with +% "\contentsline". If it does, then check to see if the +% sectioning type corresponds to the thumbtab level. If +% it does, then start a new list. There will be "\c@maxtocunits" +% lists, each one corresponding to each thumbtab group. +% In addition, each contents line needs to be added to +% the minitoclists, but only if the sectioning type level +% is greater than "\@ttb@minitoctype". The number of minitoc +% lists is given by "\c@maxminitoc". +% \begin{macrocode} +\newif\if@contsline +\newcount\@ttb@level +\newcount\@ttb@minitoclevel + +\newcommand{\@addtotoclist}[2]{% +\expandafter\@checkcontentsline#1\end +\if@contsline +\expandafter\@gettype#1\end +\ifthenelse{\equal{\@ttb@contstype}{\@ttb@type}}{% +\global\advance#2 by 1\relax +}{% +}% +\fi +\@ifundefined{@toc@\romannumeral#2}{% +\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}}% +% \end{macrocode} +% now do minitoc stuff. If the sectioning type is unknown, +% assume it comes last +% \begin{macrocode} +\if@minitoc + \if@contsline + \@ifundefined{\@ttb@contstype}{\@ttb@level=6}{% + \@ttb@level=\csname @ttb@\@ttb@contstype @level\endcsname}% + \relax + \ifnum\@ttb@level=\@ttb@minitoclevel + \global\advance\c@maxminitoc by 1\relax + \expandafter + \gdef\csname @minitoc@\romannumeral\c@maxminitoc\endcsname{}% + \else + \ifnum\@ttb@level>\@ttb@minitoclevel + \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 +\fi +} +% \end{macrocode} +%\end{macro} +% Is there already a way of determining the sectioning +% level from its name? +% \begin{macrocode} +\def\@ttb@part@level{-1} +\def\@ttb@chapter@level{0} +\def\@ttb@section@level{1} +\def\@ttb@subsection@level{2} +\def\@ttb@subsubsection@level{3} +\def\@ttb@paragraph@level{4} +\def\@ttb@subparagraph@level{5} +% \end{macrocode} +%\begin{macro}{\@checkcontentsline} +% Check to see if line starts with "\contentsline" +% \begin{macrocode} +\long\def\@checkcontentsline#1#2\end{% +\ifx#1\contentsline + \@contslinetrue +\else + \@contslinefalse +\fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@gettype} +% Given that the line starts with "\contentsline", extract +% the first argument of "\contentsline" to get the sectioning +% type. +% \begin{macrocode} +\def\@gettype\contentsline#1#2\end{% +\def\@ttb@contstype{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\tableofcontents} +% Modify "\tableofcontents". It first stores the contents +% of the toc file, and then, either simply prints it on the +% page (so it appears no different to the standard +% "\tableofcontents"), or it prints it out so that each +% thumbtab unit has the same height as the thumbtabs. +% Note: this assumes that the actual table of contents +% starts at the same height as the thumbtabs. The thumbtab +% vertical position may need to be adjusted to compensate +% for space taken up by the contents title. +% \begin{macrocode} +\newif\ifaligntoc +\aligntocfalse + +\let\@ttb@old@tableofcontents\tableofcontents +\renewcommand{\tableofcontents}{% +\@storetoctrue +\@ttb@old@tableofcontents +\ifaligntoc + \@printalignedtoc +\else + \@printtoc +\fi +\@storetocfalse +\global\c@minitoc=0\relax} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\beforeminitocskip} +% Vertical space to add before minitoc. +% \begin{macrocode} +\newlength\beforeminitocskip +\setlength{\beforeminitocskip}{0pt} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\afterminitocskip} +% Vertical space to add after minitoc. +% \begin{macrocode} +\newlength\afterminitocskip +\setlength{\afterminitocskip}{\baselineskip} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\dominitoc} +% Do the minitoc for unit "#1". Check first that +% minitocs have been enabled. +% \begin{macrocode} +\newcommand*{\dominitoc}[1]{% +\if@minitoc \@dominitoc{#1}\fi} +\newcommand*{\@dominitoc}[1]{\@@dominitoc{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\minitocstyle} +% Style in which to display the minitoc. +% \begin{macrocode} +\newcommand{\minitocstyle}[1]{\normalfont\normalsize\normalcolor +#1} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@dominitoc} +% Now do the actual minitoc for unit "#1". +% \begin{macrocode} +\newcommand*{\@@dominitoc}[1]{% +{\minitocstyle{% +\vskip\beforeminitocskip +\csname @minitoc@\romannumeral#1\endcsname}} +\vskip\afterminitocskip} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\appenddfminitoc} +% Modify "\dominitoc" so that the minitoc is appended +% to specified \gls{dynamic}. Starred version uses +% \gls{dynamic} \gls{idl}, unstarred version uses \gls{dynamic} +% \gls{idn}. I originally called this macro "\appendminitoctodynamicframe" +% but decided it was too long, for I've opted instead +% for a slightly more cryptic name. +% \begin{macrocode} +\newcommand*{\appenddfminitoc}{% +\renewcommand{\beforeminitocskip}{\baselineskip}% +\@ifstar\@sappendminitocdf\@appendminitocdf} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sappendminitocdf} +% Starred version +% \begin{macrocode} +\newcommand*{\@sappendminitocdf}[1]{% +\renewcommand{\@dominitoc}[1]{% +\@sappenddynamic{#1}{\@@dominitoc{##1}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@appendminitocdf} +% Unstarred version +% \begin{macrocode} +\newcommand*{\@appendminitocdf}[1]{% +\renewcommand{\@dominitoc}[1]{% +\@appenddynamic{#1}{\@@dominitoc{##1}}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@printtoc} +% Do the table of contents, which has been stored +% in "\c@maxtocunits" macros. (or possibly +% "\c@maxtocunits + 1", if information was added +% before the first group---which corresponds to +% "\@colN=0".) +% \begin{macrocode} +\newcommand*{\@printtoc}{% +\@colN=0\relax +\csname @toc@\romannumeral\@colN\endcsname +\whiledo{\@colN<\c@maxtocunits}{% +\advance\@colN by 1\relax +\csname @toc@\romannumeral\@colN\endcsname}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@printalignedtoc} +% Print the table of contents so that each unit is +% has vertical height the same as the height of the +% thumbtabs. Note that you may have to adjust the +% vertical offset of the thumbtabs (in "\makethumbtabs") +% in order to make them correctly aligned. +% \begin{macrocode} +\newcommand{\@printalignedtoc}{% +\@ff@tmpN=0\relax +\@ifundefined{@toc@\romannumeral\@ff@tmpN}{% +}{% +\csname @toc@\romannumeral\@ff@tmpN\endcsname +\par\noindent\hrulefill +}% +\whiledo{\@ff@tmpN<\c@maxtocunits}{% +\advance\@ff@tmpN by 1\relax +\ifnum\@ff@tmpN>\c@maxthumbtabs +\csname @toc@\romannumeral\@ff@tmpN\endcsname +\else +\@dynamicframeid{thumbtabindex\number\@ff@tmpN}% +\expandafter\expandafter\expandafter +\@ff@getstaticpos\csname @df@dim@\romannumeral\ff@id\endcsname +\vbox to \@ff@tmp@y{% +\noindent\parbox{\linewidth}{% +\csname @toc@\romannumeral\@ff@tmpN\endcsname}% +\vfill +\par\noindent\hrulefill +}% +\fi}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\enableminitoc} +% Make mini tocs appear at the start of given sectional unit. +% \begin{macrocode} +\newcounter{minitoc} +\newif\if@minitoc +\@minitocfalse + +\newcommand*{\enableminitoc}[1][\@ttb@type]{% +\@minitoctrue +\setcounter{minitoc}{0}% +\@ifundefined{#1}{% +\PackageError{flowfram}{Sectioning type `#1' not defined}{}}{% +\renewcommand{\@ttb@minitoctype}{#1}% +\ifthenelse{\equal{#1}{chapter}}{\@makeminitocchapter}{% +\ifthenelse{\equal{#1}{part}}{\@makeminitocpart}{% +\@makeminitocsection{#1}}}}% +} +% \end{macrocode} +%\end{macro} +% This command should only appear in the preamble. (This +% ensures that it is used before "\tableofcontents". +% \begin{macrocode} +\@onlypreamble{\enableminitoc} +% \end{macrocode} +%\begin{macro}{\@makeminitocchapter} +% If minitocs are associated with chapters, redefine +% "\@chapter" so that the minitoc appears after the +% chapter heading. +% \begin{macrocode} +\newcommand{\@makeminitocchapter}{ +\let\@mtoc@old@chapter\@chapter +\def\@chapter[##1]##2{% +\@mtoc@old@chapter[##1]{##2}% +\stepcounter{minitoc}% +\dominitoc{\c@minitoc}% +\@afterheading +}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@makeminitocpart} +% Again, for parts. As before, need to redefine +% "\@endpart" if it exists, otherwise redefine +% "\@part". +% \begin{macrocode} +\newcommand{\@makeminitocpart}{ +\@ifundefined{@endpart}{% +\let\@mtoc@old@part\@part +\def\@part[##1]##2{% +\@mtoc@old@part[##1]{##2}% +\stepcounter{minitoc}% +\dominitoc{\c@minitoc}% +\@afterheading +}}{% +\let\@mtoc@old@endpart\@endpart +\def\@endpart{% +\stepcounter{minitoc}% +\dominitoc{\c@minitoc}% +\@mtoc@old@endpart +}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@makeminitocsection} +% Now for the remaining sectional units. +% \begin{macrocode} +\newcommand{\@makeminitocsection}[1]{% +\let\@mtoc@old@sect=\@sect +\def\@sect##1##2##3##4##5##6[##7]##8{% +\@mtoc@old@sect{##1}{##2}{##3}{##4}{##5}{##6}[##7]{##8}% +\ifthenelse{\equal{##1}{#1}}{% +\stepcounter{minitoc}% +\dominitoc{\c@minitoc}\@afterheading}{}% +}} +% \end{macrocode} +%\end{macro} +%\iffalse +% \begin{macrocode} +%</flowfram.sty> +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/doc/latex/flowfram/flowfram.ins b/Master/texmf-dist/doc/latex/flowfram/flowfram.ins new file mode 100644 index 00000000000..39d4d46d06c --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/flowfram.ins @@ -0,0 +1,31 @@ +% flowfram.ins generated using makedtx version 0.94b 2008/7/1 14:05 +\input docstrip + +\preamble + + flowfram.dtx + Copyright 2008 Nicola Talbot + + This work may be distributed and/or modified under the + conditions of the LaTeX Project Public License, either version 1.3 + of this license of (at your option) any later version. + The latest version of this license is in + http://www.latex-project.org/lppl.txt + and version 1.3 or later is part of all distributions of LaTeX + version 2005/12/01 or later. + + This work has the LPPL maintenance status `maintained'. + + The Current Maintainer of this work is Nicola Talbot. + + This work consists of the files flowfram.dtx and flowfram.ins and the derived file flowfram.sty. + +\endpreamble + +\askforoverwritefalse + +\generate{\file{flowfram.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{flowfram.dtx}{flowfram.sty,package}} +} + +\endbatchfile diff --git a/Master/texmf-dist/doc/latex/flowfram/flowfram.pdf b/Master/texmf-dist/doc/latex/flowfram/flowfram.pdf Binary files differindex 328dd68d149..f59a2bd2a7b 100644 --- a/Master/texmf-dist/doc/latex/flowfram/flowfram.pdf +++ b/Master/texmf-dist/doc/latex/flowfram/flowfram.pdf diff --git a/Master/texmf-dist/doc/latex/flowfram/flowfram.perl b/Master/texmf-dist/doc/latex/flowfram/flowfram.perl new file mode 100644 index 00000000000..7d7f8c23c56 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/flowfram.perl @@ -0,0 +1,1632 @@ +#!/usr/bin/env perl +# File : flowfram.perl +# Author : Nicola L C Talbot +# Date : 28 June 2008 +# Last Modified : 1 July 2008 +# Version : 1.0 +# Description : LaTeX2HTML implementation of the flowfram package. +# This is not meant to emulate the flowfram package. +# Most of the frame related commands are ignored, to +# provide a simple HTML version of the document. +# +# Copyright 2007 Nicola L.C. Talbot +# +# This work may be distributed and/or modified under the +# conditions of the LaTeX Project Public License, either version 1.3 +# of this license of (at your option) any later version. +# The latest version of this license is in +# http://www.latex-project.org/lppl.txt +# and version 1.3 or later is part of all distributions of LaTeX +# version 2005/12/01 or later. +# +# This work has the LPPL maintenance status `maintained'. +# +# The Current Maintainer of this work is Nicola Talbot. + +package main; + +$showstaticcontents = 0; +$showdynamiccontents = 0; + +sub do_cmd_onecolumninarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumninarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_Ncolumninarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_Ncolumn{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumntopinarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumntopinarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_Ncolumntopinarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumnbottominarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumnbottominarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_Ncolumnbottominarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumnStopinarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumnDtopinarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumnSbottominarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumnDbottominarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumnStopinarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumnDtopinarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumnSbottominarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumnDbottominarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_NcolumnDbottominarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_NcolumnSbottominarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumntop +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumntop +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_Ncolumntop +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumnStop +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumnStop +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_NcolumnStop +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumnDtop +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumnDtop +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_NcolumnDtop +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumnbottom +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumnbottom +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_Ncolumnbottom +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumnSbottom +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumnSbottom +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_NcolumnSbottom +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_onecolumnDbottom +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_twocolumnDbottom +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_NcolumnDbottom +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_NcolumnDtopinarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_NcolumnStopinarea +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_makebackgroundframe +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + ($keyval,$pat) = &get_next_optional_argument; + + $_ +} + +sub do_cmd_vtwotone +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_vtwotonetop +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_vtwotonebottom +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_htwotone +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_htwotoneleft +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_htwotoneright +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_hNtone{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + $keyval,$pat = &get_next_optional_argument; + + local($n); + + $n = &missing_braces + unless(s/$next_pair_pr_rx/$n=$2;''/eo); + + for ($idx = 1; $idx <= $n; $idx++) + { + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + } + + $_; +} + +sub do_cmd_hNtoneleft{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + $keyval,$pat = &get_next_optional_argument; + + local($n); + + $n = &missing_braces + unless(s/$next_pair_pr_rx/$n=$2;''/eo); + + for ($idx = 1; $idx <= $n; $idx++) + { + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + } + + $_; +} + +sub do_cmd_hNtoneright{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + $keyval,$pat = &get_next_optional_argument; + + local($n); + + $n = &missing_braces + unless(s/$next_pair_pr_rx/$n=$2;''/eo); + + for ($idx = 1; $idx <= $n; $idx++) + { + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + } + + $_; +} + +sub do_cmd_vNtone{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + $keyval,$pat = &get_next_optional_argument; + + local($n); + + $n = &missing_braces + unless(s/$next_pair_pr_rx/$n=$2;''/eo); + + for ($idx = 1; $idx <= $n; $idx++) + { + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + } + + $_; +} + +sub do_cmd_vNtonetop{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + $keyval,$pat = &get_next_optional_argument; + + local($n); + + $n = &missing_braces + unless(s/$next_pair_pr_rx/$n=$2;''/eo); + + for ($idx = 1; $idx <= $n; $idx++) + { + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + } + + $_; +} + +sub do_cmd_vNtonebottom{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + $keyval,$pat = &get_next_optional_argument; + + local($n); + + $n = &missing_braces + unless(s/$next_pair_pr_rx/$n=$2;''/eo); + + for ($idx = 1; $idx <= $n; $idx++) + { + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + } + + $_; +} + +sub do_cmd_inserthrule{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + ($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_insertvrule{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + ($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_newflowframe +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + ($keyval,$pat) = &get_next_optional_argument; + + $_ +} + +sub do_cmd_newflowframestar +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + ($keyval,$pat) = &get_next_optional_argument; + + $_ +} + +sub do_cmd_newstaticframe +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + ($keyval,$pat) = &get_next_optional_argument; + + $_ +} + +sub do_cmd_newstaticframestar +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + ($keyval,$pat) = &get_next_optional_argument; + + $_ +} + +sub do_cmd_newdynamicframe +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + ($keyval,$pat) = &get_next_optional_argument; + + $_ +} + +sub do_cmd_newdynamicframestar +{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + ($keyval,$pat) = &get_next_optional_argument; + + $_ +} + +sub do_cmd_setflowframe +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setflowframestar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setstaticframe +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setstaticframestar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setdynamicframe +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setdynamicframestar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setalldynamicframes +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setallflowframes +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setallstaticframes +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setthumbtab +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setthumbtabindex +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_ffswapoddeven +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_ffswapoddevenstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_dfswapoddeven +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_dfswapoddevenstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_sfswapoddeven +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_sfswapoddevenstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_dfchaphead +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_dfchapheadstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_computeleftedgeodd +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_computeleftedgeeven +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_computerightedgeodd +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_computerightedgeeven +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_computebottomedge +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_computetopedge +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_appenddfminitoc +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_appenddfminitocstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_makethumbtabs +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_setstaticcontents +{ + local($_) = @_; + local($text); + + s/$next_pair_pr_rx/;''/eo; + + $text = &missing_braces + unless (s/$next_pair_pr_rx/$text=$2;''/eo); + + $text = "" unless($showstaticcontents); + + "$text$_" +} + +sub do_cmd_setstaticcontentsstar +{ + local($_) = @_; + local($text); + + s/$next_pair_pr_rx/;''/eo; + + $text = &missing_braces + unless (s/$next_pair_pr_rx/$text=$2;''/eo); + + $text = "" unless($showstaticcontents); + + "$text$_" +} + +sub do_cmd_setdynamiccontents +{ + local($_) = @_; + local($text); + + s/$next_pair_pr_rx/;''/eo; + + $text = &missing_braces + unless (s/$next_pair_pr_rx/$text=$2;''/eo); + + $text = "" unless($showdynamiccontents); + + "$text$_" +} + +sub do_cmd_setdynamiccontentsstar +{ + local($_) = @_; + local($text); + + s/$next_pair_pr_rx/;''/eo; + + $text = &missing_braces + unless (s/$next_pair_pr_rx/$text=$2;''/eo); + + $text = "" unless($showdynamiccontents); + + "$text$_" +} + +sub do_cmd_appenddynamiccontents +{ + local($_) = @_; + local($text); + + s/$next_pair_pr_rx/;''/eo; + + $text = &missing_braces + unless (s/$next_pair_pr_rx/$text=$2;''/eo); + + $text = "" unless($showdynamiccontents); + + "$text$_" +} + +sub do_cmd_appenddynamiccontentsstar +{ + local($_) = @_; + local($text); + + s/$next_pair_pr_rx/;''/eo; + + $text = &missing_braces + unless (s/$next_pair_pr_rx/$text=$2;''/eo); + + $text = "" unless($showdynamiccontents); + + "$text$_" +} + +sub do_env_staticcontents{ + local($_) = @_; + local($id); + + $id = &missing_braces + unless (s/$next_pair_rx/$id=$2,''/eo); + + local($body) = ($showstaticcontents ? $_ : ""); + + $body +} + +sub do_env_staticcontentsstar{ + local($_) = @_; + local($id); + + $id = &missing_braces + unless (s/$next_pair_rx/$id=$2,''/eo); + + local($body) = ($showstaticcontents ? $_ : ""); + + $body +} + +sub do_env_dynamiccontents{ + local($_) = @_; + local($id); + + $id = &missing_braces + unless (s/$next_pair_rx/$id=$2,''/eo); + + local($body) = ($showdynamiccontents ? $_ : ""); + + $body +} + +sub do_env_dynamiccontentsstar{ + local($_) = @_; + local($id); + + $id = &missing_braces + unless (s/$next_pair_rx/$id=$2,''/eo); + + local($body) = ($showdynamiccontents ? $_ : ""); + + $body +} + +sub do_continueonframe{ + local($_) = @_; + + local($keyval,$pat) = &get_next_optional_argument; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getflowid +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getstaticid +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getdynamicid +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getdynamiclabel +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getflowlabel +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getstaticlabel +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getdynamicbounds +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getdynamicboundsstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getflowbounds +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getflowboundsstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getstaticbounds +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_getstaticboundsstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_FFaboveleft{ "above left".$_[0] } +sub do_cmd_FFaboveright{ "above right".$_[0] } +sub do_cmd_FFbelowleft{ "below left".$_[0] } +sub do_cmd_FFbelowright{ "below right".$_[0] } +sub do_cmd_FFleft{ "on the left".$_[0] } +sub do_cmd_FFright{ "on the right".$_[0] } +sub do_cmd_FFabove{ "above".$_[0] } +sub do_cmd_FFbelow{ "below".$_[0] } +sub do_cmd_FFoverlap{ "overlap".$_[0] } + +sub do_cmd_ffcontinuedtextfont{ + local($_) = @_; + local($text); + + $text = &missingbraces + unless (s/$next_pair_pr_rx/$text=$2;''/eo); + + "<EM>$text</EM>$_" +} + +sub do_cmd_ffhrule{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_ffvrule{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_labelflow{ &do_cmd_label(@_) } + +sub do_cmd_labelflowid{ &do_cmd_label(@_) } + +sub do_cmd_minitocstyle{ + local($_) = @_; + local($text); + + $text = &missing_braces + unless(s/$next_pair_pr_rx/$text=$2;''/eo); + + "$text$_" +} + +sub do_cmd_relativeframelocation +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_relativeframelocationstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_reldynamicloc +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_reldynamiclocstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_relflowloc +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_relflowlocstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_relstaticloc +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_relstaticlocstar +{ + local($_) = @_; + + s/$next_pair_pr_rx/;''/eo; + s/$next_pair_pr_rx/;''/eo; + + $_ +} + +sub do_cmd_simpar{ + local($_) = @_; + + "<P>$_" +} + +sub do_env_staticfigure{ &do_env_figure(@_) } +sub do_env_statictable{ &do_env_table(@_) } + +&ignore_commands( <<_IGNORED_CMDS); +thumbtabindex +tocandthumbtabindex +enablethumbtabs +disablethumbtabs +enableminitoc +makedfheaderfooter +ffcontinuedtextlayout +fflabelfont +ffruledeclarations +ffvadjustfalse +ffvadjusttrue +flowframeshowlayout +finishthispage +framebreak +setffdraftcolor +setffdraftypeblockcolor +showframebboxfalse +showframebboxtrue +showmarginsfalse +showmarginstrue +showtypeblockfalse +showtypeblocktrue +thumbtabformat +thumbtabindexformat +_IGNORED_CMDS + +1; diff --git a/Master/texmf-dist/doc/latex/flowfram/flowfram.sty b/Master/texmf-dist/doc/latex/flowfram/flowfram.sty new file mode 100644 index 00000000000..149e8e7f238 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/flowfram.sty @@ -0,0 +1,4275 @@ +%% +%% This is file `flowfram.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% flowfram.dtx (with options: `flowfram.sty,package') +%% +%% flowfram.dtx +%% Copyright 2008 Nicola Talbot +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license of (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Nicola Talbot. +%% +%% This work consists of the files flowfram.dtx and flowfram.ins and the derived file flowfram.sty. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{flowfram}[2008/06/27 v1.11] +\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 +\fflabelsep=1pt +\newcommand*{\fflabelfont}{\small\sffamily} +\newif\ifshowtypeblock +\newif\ifshowmargins +\newif\ifshowframebbox +\newcommand*{\@ffdraft}{% +\showtypeblocktrue +\showmarginstrue +\showframebboxtrue +} +\newcommand*{\@ffnodraft}{% +\showtypeblockfalse +\showmarginsfalse +\showframebboxfalse +} +\newcommand*{\@fr@meifdraft}[3][\setffdraftcolor]{% +\def\ff@backcol{{none}}% +\@ifundefined{color}{\frame{#2}}{#1\frame{#2}}% +\ifthenelse{\equal{#3}{}}{}{% +\makebox[0pt][l]{\hskip\fflabelsep\fflabelfont{[#3]}}}}% +\newcommand*{\@s@tffcol}{} +\newcommand*{\@s@tfftextcol}{} +\newcommand*{\@ffbackground}[1]{#1} +\DeclareOption{draft}{\@ffdraft} +\DeclareOption{final}{\@ffnodraft} +\newif\if@ttb@rotate +\@ttb@rotatetrue +\DeclareOption{rotate}{\@ttb@rotatetrue} +\DeclareOption{norotate}{\@ttb@rotatefalse} +\newcommand{\rotateframe}[2]{\if@ttb@rotate +\rotatebox{#1}{#2}% +\else +#2\relax +\fi} +\newif\if@ttb@num +\newif\if@ttb@title +\@ttb@numfalse +\@ttb@titletrue +\DeclareOption{ttbtitle}{\@ttb@titletrue} +\DeclareOption{ttbnotitle}{\@ttb@titlefalse} +\DeclareOption{ttbnum}{\@ttb@numtrue} +\DeclareOption{ttbnonum}{\@ttb@numfalse} +\DeclareOption{color}{% +\def\flowframecol{{black}}\def\flowframetextcol{{black}} +\renewcommand*\@s@tffcol{\ifthenelse{\equal{\ff@col}{}}{}{% +\expandafter\color\ff@col}} +\renewcommand*\@s@tfftextcol{\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\expandafter\color\ff@txtcol}} +\renewcommand*{\@ffbackground}[1]{% +\ifthenelse{\equal{\ff@backcol}{{none}}}{% +#1}{{\fboxsep=0pt\expandafter\colorbox\ff@backcol{#1}}}} +} +\DeclareOption{nocolor}{% +\def\flowframetextcol{}% +\def\flowframecol{}% +\renewcommand{\@s@tffcol}{}\renewcommand{\@s@tfftextcol}{} +\renewcommand{\@ffbackground}[1]{#1} +} +\ifdim\overfullrule=0pt +\ExecuteOptions{final} +\else +\ExecuteOptions{draft} +\fi +\ifx\normalcolor\relax +\ExecuteOptions{nocolor} +\else +\ExecuteOptions{color} +\fi +\ProcessOptions +\ifx\normalcolor\relax +\ifthenelse{\equal{\flowframetextcol}{}}{}{% +\RequirePackage{color}} +\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}{% +\thispagestyle{\chapterfirstpagestyle}\@ff@OLD@schapter} +} +\newcounter{maxflow} +\c@maxflow=0\relax +\newcounter{thisframe} +\c@thisframe=0\relax +\@ifpackageloaded{hyperref}{% +\def\theHthisframe{\thepage.\arabic{thisframe}}}{} +\newcommand*{\labelflowidn}[1]{% +{\def\@currentlabel{\thethisframe}\label{#1}}} +\newcounter{displayedframe} +\c@displayedframe=0 +\@ifpackageloaded{hyperref}{% +\def\theHdisplayedframe{\thepage.\arabic{displayedframe}}}{} +\newcommand*{\labelflow}[1]{% +{\def\@currentlabel{\thedisplayedframe}\label{#1}}} +\newcounter{maxstatic} +\c@maxstatic=0\relax +\newcounter{maxdynamic} +\c@maxdynamic=0\relax +\newcount\@colN +\newcount\@ff@tmpN +\newcount\ff@id +\newlength\@ff@offset +\newlength\@ff@tmp@x +\newlength\@ff@tmp@x@even +\newlength\@ff@tmp@y +\newlength\sdfparindent +\newlength\flowframesep +\flowframesep=\fboxsep +\newlength\flowframerule +\flowframerule=\fboxrule +\newcommand*{\flowframeshowlayout}{% +\finishthispage +{\@ffdraft\mbox{}\finishthispage\clearpage}} +\newif\ifusedframebreak +\newcommand{\framebreak}[1][4]{% +\usedframebreaktrue +{\parfillskip=0pt\pagebreak[#1]\parskip=0pt\par\noindent}} +\newcommand{\finishthispage}{% +\@colN=\c@thisframe +\newpage +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\@ff@chckifthispg{\c@page}{\@colN}% +\if@notthiscol\else +\mbox{}\newpage% +\fi +}} +\def\cleardoublepage{\finishthispage +\if@twoside +\ifodd\c@page +\else +\hbox{}\finishthispage +\fi +\fi} +\@twocolumnfalse +\@mparswitchfalse +\newcommand{\globalreversemargin}{% +\global\@mparbottom\z@\global\@reversemargintrue} +\newcommand{\globalnormalmargin}{% +\global\@mparbottom\z@\global\@reversemarginfalse} +\newcommand{\@getmarginpos}[1]{% +\ifthenelse{\equal{#1}{inner}}{% +\if@twoside +\ifodd\c@page\def\ff@margin{left}\else\def\ff@margin{right}\fi +\else +\def\ff@margin{left}% +\fi +}{% +\ifthenelse{\equal{#1}{outer}}{% +\if@twoside +\ifodd\c@page\def\ff@margin{right}\else\def\ff@margin{left}\fi +\else +\def\ff@margin{right}% +\fi +}{% +\def\ff@margin{#1}}}% +} +\newcommand{\setmargin}{% +\@getmarginpos{% +\csname @ff@margin@\romannumeral\c@thisframe\endcsname}% +\ifthenelse{\equal{\ff@margin}{left}}% +{\globalreversemargin}{\globalnormalmargin}% +} +\newcommand{\newflowframe}{\@n@wflowframe} +\@onlypreamble{\newflowframe} +\newcommand{\@n@wflowframe}{% +\global\advance\c@maxflow by 1\relax +\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 +\@@newflowframe} +\newcommand{\@newflowframe}{% +\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} +\ifnum\c@thisframe=0\relax +\ifthenelse{\equal{#1}{all}\TE@or\equal{#1}{odd}}{% +\c@thisframe=\c@maxflow +\global\setlength{\hsize}{#2}% +\global\usedframebreaktrue +}{\ifthenelse{\equal{#1}{even}\TE@or\equal{#1}{none}}{}{% +\def\ff@pages{#1}% +\@for\@ff@pp:=\ff@pages\do{% +\def\@ff@numstart{0}\def\@ff@numend{0}% +\@ff@getrange{\@ff@pp}% +\ifnum\@ff@numstart=0\def\@ff@numstart{1}\fi +\ifnum\@ff@numstart=1\relax +\c@thisframe=\c@maxflow +\global\setlength{\hsize}{#2}% +\global\usedframebreaktrue +\fi +}}}% +\fi +\@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}% +} +\newcommand*{\@ff@checkuniqueidl}[2]{% +{\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{% +\advance\@colN by 1\relax +\ifnum\@colN=#1\relax +\else +\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}}{}% +\fi +}}} +\newcommand*{\getflowlabel}[1]{% +\csname @col@id@\romannumeral#1\endcsname} +\newcommand*{\getflowid}[2]{% +\@flowframeid{#2}\edef#1{\number\ff@id}} +\newcommand*{\@flowframeid}[1]{\@colN=0\relax +\ff@id=0\relax +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\ifthenelse{% +\equal{#1}{\csname @col@id@\romannumeral\@colN\endcsname}}{% +\ff@id=\@colN\relax +\@colN=\c@maxflow}{}}% +\ifnum\ff@id=0\relax +\PackageError{flowfram}{Can't find flow frame id '#1'}{}\fi} +\define@key{flowframe}{width}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'width' key}{}}{}% +\def\ff@width{#1}} +\define@key{flowframe}{height}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'height' key}{}}{}% +\def\ff@height{#1}} +\define@key{flowframe}{x}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'x' key}{}}{}% +\def\ff@x{#1}} +\define@key{flowframe}{y}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'y' key}{}}{}% +\def\ff@y{#1}} +\define@key{flowframe}{evenx}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'evenx' key}{}}{}% +\def\ff@evenx{#1}} +\define@key{flowframe}{eveny}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'eveny' key}{}}{}% +\def\ff@eveny{#1}} +\define@key{flowframe}{oddx}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'oddx' key}{}}{}% +\def\ff@oddx{#1}} +\define@key{flowframe}{oddy}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'oddy' key}{}}{}% +\def\ff@oddy{#1}} +\define@key{flowframe}{label}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'label' key}{}}{}% +\def\ff@label{#1}} +\define@key{flowframe}{border}[plain]{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'border' key - use +'none' for no border}{}}{}% +\ifthenelse{\equal{#1}{none}}{% +\def\ff@frame{false}}{\def\ff@frame{true}% +\ifthenelse{\equal{#1}{plain}}{\def\ff@frametype{fbox}}{% +\def\ff@frametype{#1}}}} +\define@key{flowframe}{bordercolor}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'bordercolor' key}{}}{}% +\def\ff@col{#1}} +\define@key{flowframe}{textcolor}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'textcolor' key}{}}{}% +\def\ff@txtcol{#1}} +\define@key{flowframe}{backcolor}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'backcolor' key}{}}{}% +\def\ff@backcol{#1}} +\define@key{flowframe}{pages}{\ifthenelse{\equal{#1}{}}{% +\PackageError{flowfram}{Missing value for 'pages' key}{}}{}% +\def\ff@pages{#1}} +\define@key{flowframe}{offset}{\def\ff@offset{#1}% +\ifthenelse{\equal{#1}{}}{\PackageError{flowframe}{% +Invalid value for key 'offset'}{% +'offset' can either be 'compute' (to compute it according +to certain pre-defined rules) or a length}}{}} +\define@key{flowframe}{angle}{\def\ff@angle{#1}% +} +\define@key{flowframe}{margin}{% +\ifthenelse{\equal{#1}{left} \or \equal{#1}{right} +\or \equal{#1}{inner} \or \equal{#1}{outer}}{% +\def\ff@margin{#1}}{\PackageError{flowfram}{invalid value of +'margin' key}{Key 'margin' can only take the values +'left' or 'right'}}} +\define@key{flowframe}{clear}[true]{% +\ifthenelse{\equal{#1}{true}\or\equal{#1}{false}}{% +\def\ff@clear{#1}}{\PackageError{flowfram}{Key 'clear' is +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}}} +\newcommand*{\setflowframe}{\@ifstar\@ssetflowframe\@setflowframe} +\newcommand{\@ssetflowframe}[2]{% +\@for\@ff@id:=#1\do{% +\@flowframeid{\@ff@id}% +\@@setflowframe{\ff@id}{#2}}} +\newcommand*{\@setflowframe}[2]{% +\ifthenelse{\equal{#1}{all}}{% +\setallflowframes{#2}}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxflow\TE@or\@colN=\c@maxflow}{% +\@@setflowframe{\@colN}{#2}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxflow\relax + \def\@ff@numend{\c@maxflow}% +\fi +\@colN=\@ff@numstart\relax +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@setflowframe{\@colN}{#2}% +\advance\@colN by 1\relax +}}}}} +\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@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@shape{\empty}% +\setkeys{flowframe}{#2}% +\ifthenelse{\equal{\ff@frame}{}}{}{% +\setboolean{columnframe\romannumeral#1}{\ff@frame}}% +\ifthenelse{\equal{\ff@width}{}}{}{% +\expandafter\setlength\csname colwidth\romannumeral#1\endcsname +{\ff@width}}% +\ifthenelse{\equal{\ff@height}{}}{}{% +\expandafter\setlength\csname colheight\romannumeral#1\endcsname +{\ff@height}}% +\ifthenelse{\equal{\ff@x}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@posx\endcsname +{\ff@x}% +\expandafter\setlength\csname col@\romannumeral#1@evenx\endcsname +{\ff@x}} +\ifthenelse{\equal{\ff@y}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@posy\endcsname +{\ff@y}% +\expandafter\setlength\csname col@\romannumeral#1@eveny\endcsname +{\ff@y}}% +\ifthenelse{\equal{\ff@evenx}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@evenx\endcsname +{\ff@evenx}}% +\ifthenelse{\equal{\ff@eveny}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@eveny\endcsname +{\ff@eveny}}% +\ifthenelse{\equal{\ff@oddx}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@posx\endcsname +{\ff@oddx}}% +\ifthenelse{\equal{\ff@oddy}{}}{}{% +\expandafter\setlength\csname col@\romannumeral#1@posy\endcsname +{\ff@oddy}}% +\ifthenelse{\equal{\ff@label}{}}{}{% +\@s@tflowframeid{#1}[\ff@label]}% +\ifthenelse{\equal{\ff@frametype}{}}{}{% +\expandafter\edef\csname @ff@frametype@\romannumeral#1\endcsname +{\ff@frametype}}% +\ifthenelse{\equal{\ff@col}{}}{}{% +\expandafter\@setframecol\ff@col\end{#1}{col}{ff}}% +\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\expandafter\@setframecol\ff@txtcol\end{#1}{txtcol}{ff}}% +\ifthenelse{\equal{\ff@backcol}{}}{}{% +\expandafter\@setframecol\ff@backcol\end{#1}{backcol}{ff}}% +\ifthenelse{\equal{\ff@margin}{}}{}{% +\expandafter\xdef\csname @ff@margin@\romannumeral#1\endcsname +{\ff@margin}}% +\ifthenelse{\equal{\ff@pages}{}}{}{% +\expandafter\xdef\csname @ff@pages@\romannumeral#1\endcsname +{\ff@pages}}% +\ifthenelse{\equal{\ff@offset}{}}{}{% +\expandafter\xdef\csname @ff@offset@\romannumeral#1\endcsname +{\ff@offset}}% +\ifthenelse{\equal{\ff@angle}{}}{}{% +\expandafter\xdef\csname @ff@angle@\romannumeral#1\endcsname +{\ff@angle}}% +\ifthenelse{\equal{\ff@clear}{}}{}{% +\PackageError{flowfram}% +{Key 'clear' not available for flow frames}{}}% +\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}% +{\csname col@\romannumeral#1@evenx\endcsname} +\expandafter\setlength\csname col@\romannumeral#1@evenx\endcsname +{\csname col@\romannumeral#1@posx\endcsname}% +\expandafter\setlength\csname col@\romannumeral#1@posx\endcsname +{\@ff@tmp@x}% +\setlength{\@ff@tmp@y}% +{\csname col@\romannumeral#1@eveny\endcsname} +\expandafter\setlength\csname col@\romannumeral#1@eveny\endcsname +{\csname col@\romannumeral#1@posy\endcsname}% +\expandafter\setlength\csname col@\romannumeral#1@posy\endcsname +{\@ff@tmp@y}% +} +\newcommand*{\ffswapoddeven}{% +\@ifstar\@sflowframeswapcoords\@flowframeswapcoords} +\newcommand*{\@sflowframeswapcoords}[1]{% +\@for\@ff@id:=#1\do{% +\@flowframeid{\@ff@id}% +\@@flowframeswapcoords{\ff@id}}} +\newcommand*{\@flowframeswapcoords}[1]{% +\ifthenelse{\equal{#1}{all}}{% +\ff@id=0\relax +\whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax +\@@flowframeswapcoords{\ff@id}}% +}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxflow\TE@or\@colN=\c@maxflow}{% +\@@flowframeswapcoords{\@colN}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxflow + \def\@ff@numend{\c@maxflow}% +\fi +\@colN=\@ff@numstart +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@flowframeswapcoords{\@colN}% +\advance\@colN by 1\relax +}}}}} +\newcommand*{\flowframex}[1]{% +\csname col@\romannumeral#1@posx\endcsname} +\newcommand*{\flowframey}[1]{% +\csname col@\romannumeral#1@posy\endcsname} +\newcommand*{\flowframeevenx}[1]{% +\csname col@\romannumeral#1@evenx\endcsname} +\newcommand*{\flowframeeveny}[1]{% +\csname col@\romannumeral#1@eveny\endcsname} +\newcommand{\flowframewidth}[1]{% +\csname colwidth\romannumeral#1\endcsname} +\newcommand*{\flowframeheight}[1]{% +\csname colheight\romannumeral#1\endcsname} +\def\@setframecol{\@ifnextchar[\@@setframecol\@@setfr@mecol} +\def\@@setframecol[#1]#2\end#3#4#5{% +\expandafter\edef\csname @#5@#4@\romannumeral#3\endcsname{% +[#1]{#2}}} +\def\@@setfr@mecol#1\end#2#3#4{% +\expandafter\edef\csname @#4@#3@\romannumeral#2\endcsname{{#1}}} +\newcommand*{\newstaticframe}{\@n@wstaticframe} +\newcommand*{\@n@wstaticframe}{% +\global\advance\c@maxstatic by 1\relax +\newboolean{staticframe\romannumeral\c@maxstatic}% +\@ifstar\@snewstaticframe\@newstaticframe +} +\newcommand{\@snewstaticframe}{% +\setboolean{staticframe\romannumeral\c@maxstatic}{true}% +\@@newstaticframe} +\newcommand{\@newstaticframe}{% +\setboolean{staticframe\romannumeral\c@maxstatic}{false}% +\@@newstaticframe} +\newcommand*{\@@newstaticframe}[5][all]{% +\expandafter +\newbox\csname @staticframe@\romannumeral\c@maxstatic\endcsname +\expandafter +\newlength\csname @sf@\romannumeral\c@maxstatic @posx\endcsname +\expandafter +\newlength\csname @sf@\romannumeral\c@maxstatic @posy\endcsname +\expandafter\setlength +\csname @sf@\romannumeral\c@maxstatic @posx\endcsname{#4}% +\expandafter\setlength +\csname @sf@\romannumeral\c@maxstatic @posy\endcsname{#5}% +\expandafter\newlength +\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname +\expandafter\newlength +\csname @sf@\romannumeral\c@maxstatic @eveny\endcsname +\expandafter\setlength +\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname{#4}% +\expandafter\setlength +\csname @sf@\romannumeral\c@maxstatic @eveny\endcsname{#5}% +{\@ff@tmp@x=#2\relax +\@ff@tmp@y=#3\relax +\expandafter +\xdef\csname @sf@dim@\romannumeral\c@maxstatic\endcsname{% +[c][\the\@ff@tmp@y][c]{\the\@ff@tmp@x}}}% +\expandafter +\def\csname @sf@col@\romannumeral\c@maxstatic\endcsname{% +\flowframecol}% +\expandafter +\def\csname @sf@txtcol@\romannumeral\c@maxstatic\endcsname{% +\flowframetextcol}% +\expandafter +\def\csname @sf@backcol@\romannumeral\c@maxstatic\endcsname{% +{none}}% +\expandafter +\xdef\csname @sf@pages@\romannumeral\c@maxstatic\endcsname{#1}% +\expandafter +\gdef\csname @sf@offset@\romannumeral\c@maxstatic\endcsname{% +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}% +\setboolean{@sf@clear@\romannumeral\c@maxstatic}{false} +\@ifnextchar[{\@s@tstaticframeid{\c@maxstatic}}% +{\@s@tstaticframeid{\c@maxstatic}[\number\c@maxstatic]}} +\def\@s@tstaticframeid#1[#2]{% +\edef\ff@label{#2}% +\@sf@checkuniqueidl{#1}{\ff@label}% +\expandafter +\xdef\csname @sf@id@\romannumeral#1\endcsname{\ff@label}} +\newcommand*{\@sf@checkuniqueidl}[2]{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{% +\advance\@colN by 1\relax +\ifnum\@colN=#1\relax +\else +\ifthenelse{% +\equal{#2}{\csname @sf@id@\romannumeral\@colN\endcsname}}{% +\PackageError{flowfram}{Static frame IDL '#2' already defined}{% +You can't assign this label, as it is already defined +for static frame \number\@colN}}{}% +\fi +}} +\newcommand*{\getstaticlabel}[1]{% +\csname @sf@id@\romannumeral#1\endcsname} +\newcommand*{\getstaticid}[2]{% +\@staticframeid{#2}\edef#1{\number\ff@id}} +\newcommand*{\@staticframeid}[1]{\@colN=0\relax +\ff@id=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax +\ifthenelse{% +\equal{#1}{\csname @sf@id@\romannumeral\@colN\endcsname}}{% +\ff@id=\@colN\relax +\@colN=\c@maxstatic}{}}% +\ifnum\ff@id=0\PackageError{flowfram}{Can't find static frame +id '#1'}{}\fi} +\newcommand*{\staticframex}[1]{% +\csname @sf@\romannumeral#1@posx\endcsname} +\newcommand*{\staticframey}[1]{% +\csname @sf@\romannumeral#1@posy\endcsname} +\newcommand*{\staticframeevenx}[1]{% +\csname @sf@\romannumeral#1@evenx\endcsname} +\newcommand*{\staticframeeveny}[1]{% +\csname @sf@\romannumeral#1@eveny\endcsname} +\newcommand*{\setallstaticframes}[1]{% +\@colN=0\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax +\@@setstaticframe{\@colN}{#1}}} +\newcommand*{\setstaticframe}{% +\@ifstar\@ssetstaticframe\@setstaticframe} +\newcommand*{\@ssetstaticframe}[2]{% +\@for\@ff@id:=#1\do{% +\@staticframeid{\@ff@id}% +\@@setstaticframe{\ff@id}{#2}}} +\newcommand*{\@setstaticframe}[2]{% +\ifthenelse{\equal{#1}{all}}{% +\setallstaticframes{#2}}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxstatic\TE@or\@colN=\c@maxstatic}{% +\@@setstaticframe{\@colN}{#2}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxstatic\relax + \def\@ff@numend{\c@maxstatic}% +\fi +\@colN=\@ff@numstart\relax +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@setstaticframe{\@colN}{#2}% +\advance\@colN by 1\relax +}}}}} +\newcommand*{\@@setstaticframe}[2]{% +\expandafter\expandafter\expandafter +\@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@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{}% +\setkeys{flowframe}{#2}% +\ifthenelse{\equal{\ff@frame}{}}{}{% +\setboolean{staticframe\romannumeral#1}{\ff@frame}}% +\ifthenelse{\equal{\ff@x}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@posx\endcsname +{\ff@x}% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@evenx\endcsname +{\ff@x}}% +\ifthenelse{\equal{\ff@y}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@posy\endcsname +{\ff@y}% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@eveny\endcsname +{\ff@y}}% +\ifthenelse{\equal{\ff@evenx}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@evenx\endcsname +{\ff@evenx}}% +\ifthenelse{\equal{\ff@eveny}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@eveny\endcsname +{\ff@eveny}}% +\ifthenelse{\equal{\ff@oddx}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@posx\endcsname +{\ff@oddx}}% +\ifthenelse{\equal{\ff@oddy}{}}{}{% +\expandafter\global +\expandafter\setlength\csname @sf@\romannumeral#1@posy\endcsname +{\ff@oddy}}% +\expandafter +\xdef\csname @sf@dim@\romannumeral#1\endcsname{% +[c][\ff@height][\ff@valign]{\ff@width}}% +\ifthenelse{\equal{\ff@frametype}{}}{}{% +\expandafter +\xdef\csname @sf@frametype@\romannumeral#1\endcsname{% +\ff@frametype}}% +\ifthenelse{\equal{\ff@label}{}}{}{% +\@s@tstaticframeid{#1}[\ff@label]} +\ifthenelse{\equal{\ff@col}{}}{}{% +\expandafter\@setframecol\ff@col\end{#1}{col}{sf}}% +\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\expandafter\@setframecol\ff@txtcol\end{#1}{txtcol}{sf}}% +\ifthenelse{\equal{\ff@backcol}{}}{}{% +\expandafter\@setframecol\ff@backcol\end{#1}{backcol}{sf}}% +\ifthenelse{\equal{\ff@offset}{}}{}{% +\expandafter +\xdef\csname @sf@offset@\romannumeral#1\endcsname{\ff@offset}}% +\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}}% +\ifthenelse{\equal{\ff@clear}{}}{}{% +\setboolean{@sf@clear@\romannumeral#1}{\ff@clear}}% +\ifthenelse{\equal{\ff@margin}{}}{}{% +\PackageError{flowfram}{Key 'margin' not available for +static frames}{Static frames don't have marginal notes}}% +\ifthenelse{\equal{\ff@style}{}}{}{% +\PackageError{flowfram}{Key 'style' not available for +static frames}{}}% +} + %\newcommand*{\simpar}{\hfil\vadjust{\vskip\parskip}\break\indent} +\newcommand*{\simpar}{\hfill\\\indent\mbox{}} +\let\FLForgpar\par +\newcommand{\ffpshpar}{\edef\flf@next{\hangafter=\the\hangafter +\hangindent=\the\hangindent}\FLForgpar\flf@next +\edef\flf@next{\prevgraf=\the\prevgraf}\@ff@parshape\indent\mbox{}\flf@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\flf@next{\hangafter=\the\hangafter +\hangindent=\the\hangindent}\FLForgpar\flf@next +\let\par=\FLForgpar +\edef\flf@next{\prevgraf=\the\prevgraf}% +\csname @ff@old\ff@sechead\endcsname*{\@ff@parshape\flf@next +#1}% +\xdef\flf@next{\@ff@parshape +\prevgraf=\the\prevgraf}% +\endgroup +}% +\mbox{}\flf@next\let\flf@next\undefined} +\def\@ff@heading[#1]#2{% +\@ifundefined{@ff@old\ff@sechead}{\PackageError{flowfram}{Unknown +heading command '\ff@sechead'}{}}{% +\begingroup +\edef\flf@next{\hangafter=\the\hangafter +\hangindent=\the\hangindent}\FLForgpar\flf@next +\let\par=\FLForgpar +\edef\flf@next{\prevgraf=\the\prevgraf}% +\csname @ff@old\ff@sechead\endcsname[#1]{\@ff@parshape\flf@next +#2}% +\xdef\flf@next{\@ff@parshape +\prevgraf=\the\prevgraf}% +\endgroup}% +\mbox{}\flf@next\let\flf@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]{% +\let\continueonframe=\@staticcontinueonframe +\@beginstaticcontents{#1}% +}{% +\@endstaticcontents +\ignorespaces} +\newenvironment{staticcontents*}[1]{\@staticframeid{#1}% +\let\continueonframe=\@staticscontinueonframe +\@beginstaticcontents{\ff@id}% +}{% +\@endstaticcontents +\ignorespaces} +\newcommand{\@beginstaticcontents}[1]{% +\@ifundefined{@staticframe@\romannumeral#1}{% +\PackageError{flowfram}{Static frame '#1' not defined}{}}{}% +\expandafter\let\expandafter\@ff@parshape\csname @sf@shape@\romannumeral#1\endcsname +\expandafter\@ff@getshape\@ff@parshape\relax +\ifcase\ff@shape +\edef\@sf@mpg{% +\noexpand +\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname +\noexpand\begingroup +\noexpand\let\noexpand\FLForgpar=\noexpand\par +}% +\or +\edef\@sf@mpg{% +\noexpand +\begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname +\@ff@parshape +\noexpand\begingroup +\noexpand\let\noexpand\FLForgpar=\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\noindent +\@sf@mpg +\setlength\parindent\sdfparindent +} +\newcommand*{\@endstaticcontents}{% +\ifnum\ff@shape=2\par +\else\FLForgpar\fi\endgroup\end{minipage}\end{lrbox}% +\expandafter\global\expandafter\sbox\@sf@thisframe{% +\usebox\staticframe}} +\newcommand{\setstaticcontents}{% +\@ifstar\@sstaticconts\@staticconts} +\newcommand{\@sstaticconts}[2]{\begin{staticcontents*}{#1}% +#2\end{staticcontents*}} +\newcommand{\@staticconts}[2]{\begin{staticcontents}{#1}% +#2\end{staticcontents}} +\newcommand*{\@@staticframeswapcoords}[1]{% +\setlength{\@ff@tmp@x}% +{\csname @sf@\romannumeral#1@evenx\endcsname} +\expandafter\setlength\csname @sf@\romannumeral#1@evenx\endcsname +{\csname @sf@\romannumeral#1@posx\endcsname}% +\expandafter\setlength\csname @sf@\romannumeral#1@posx\endcsname +{\@ff@tmp@x}% +\setlength{\@ff@tmp@y}% +{\csname @sf@\romannumeral#1@eveny\endcsname} +\expandafter\setlength\csname @sf@\romannumeral#1@eveny\endcsname +{\csname @sf@\romannumeral#1@posy\endcsname}% +\expandafter\setlength\csname @sf@\romannumeral#1@posy\endcsname +{\@ff@tmp@y}% +} +\newcommand*{\sfswapoddeven}{% +\@ifstar\@sstaticframeswapcoords\@staticframeswapcoords} +\newcommand*{\@sstaticframeswapcoords}[1]{% +\@for\@ff@id:=#1\do{% +\@staticframeid{\@ff@id}% +\@@staticframeswapcoords{\ff@id}}} +\newcommand*{\@staticframeswapcoords}[1]{% +\ifthenelse{\equal{#1}{all}}{% +\ff@id=0\relax +\whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax +\@@staticframeswapcoords{\ff@id}}% +}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxflow\TE@or\@colN=\c@maxflow}{% +\@@staticframeswapcoords{\@colN}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxflow + \def\@ff@numend{\c@maxflow}% +\fi +\@colN=\@ff@numstart +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@staticframeswapcoords{\@colN}% +\advance\@colN by 1\relax +}}}}} +\newcommand*{\newdynamicframe}{% +\@n@wdynamicframe} +\newcommand*{\@n@wdynamicframe}{% +\global\advance\c@maxdynamic by 1\relax +\newboolean{dynamicframe\romannumeral\c@maxdynamic} +\@ifstar\@snewdynamicframe\@newdynamicframe +} +\newcommand*{\@snewdynamicframe}{% +\setboolean{dynamicframe\romannumeral\c@maxdynamic}{true}% +\@@newdynamicframe} +\newcommand*{\@newdynamicframe}{% +\setboolean{dynamicframe\romannumeral\c@maxdynamic}{false}% +\@@newdynamicframe} +\newcommand*{\@@newdynamicframe}[5][all]{% +\expandafter +\gdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{}% +\expandafter +\newlength\csname @df@\romannumeral\c@maxdynamic @posx\endcsname +\expandafter +\newlength\csname @df@\romannumeral\c@maxdynamic @posy\endcsname +\expandafter\setlength +\csname @df@\romannumeral\c@maxdynamic @posx\endcsname{#4}% +\expandafter\setlength +\csname @df@\romannumeral\c@maxdynamic @posy\endcsname{#5}% +\expandafter\newlength +\csname @df@\romannumeral\c@maxdynamic @evenx\endcsname +\expandafter\newlength +\csname @df@\romannumeral\c@maxdynamic @eveny\endcsname +\expandafter\setlength +\csname @df@\romannumeral\c@maxdynamic @evenx\endcsname{#4}% +\expandafter\setlength +\csname @df@\romannumeral\c@maxdynamic @eveny\endcsname{#5}% +{\@ff@tmp@x=#2\relax +\@ff@tmp@y=#3\relax +\expandafter +\xdef\csname @df@dim@\romannumeral\c@maxdynamic\endcsname{% +[c][\the\@ff@tmp@y][t]{\the\@ff@tmp@x}}}% +\expandafter +\gdef\csname @df@col@\romannumeral\c@maxdynamic\endcsname{% +\flowframecol}% +\expandafter +\gdef\csname @df@txtcol@\romannumeral\c@maxdynamic\endcsname{% +\flowframetextcol}% +\expandafter +\gdef\csname @df@backcol@\romannumeral\c@maxdynamic\endcsname{% +{none}}% +\expandafter +\gdef\csname @df@pages@\romannumeral\c@maxdynamic\endcsname{#1}% +\expandafter +\gdef\csname @df@frametype@\romannumeral\c@maxdynamic\endcsname{% +fbox}% +\expandafter +\gdef\csname @df@style@\romannumeral\c@maxdynamic\endcsname{relax}% +\expandafter +\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}}% +{\@s@tdynamicframeid{\c@maxdynamic}[\number\c@maxdynamic]}} +\def\@s@tdynamicframeid#1[#2]{% +\edef\ff@label{#2}% +\@df@checkuniqueidl{#1}{\ff@label}% +\expandafter +\xdef\csname @df@id@\romannumeral#1\endcsname{\ff@label}} +\newcommand*{\@df@checkuniqueidl}[2]{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{% +\advance\@colN by 1\relax +\ifnum\@colN=#1\relax +\else +\ifthenelse{\equal{#2}% +{\csname @df@id@\romannumeral\@colN\endcsname}}{% +\PackageError{flowfram}{Dynamic frame IDL '#2' already defined}{% +You can't assign this label, as it is already defined +for dynamic frame \number\@colN}}{}% +\fi +}} +\newcommand*{\getdynamiclabel}[1]{% +\csname @df@id@\romannumeral#1\endcsname} +\newcommand*{\getdynamicid}[2]{% +\@dynamicframeid{#2}\edef#1{\number\ff@id}} +\newcommand*{\@dynamicframeid}[1]{\@colN=0\relax +\ff@id=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax +\ifthenelse{% +\equal{#1}{\csname @df@id@\romannumeral\@colN\endcsname}}{% +\ff@id=\@colN\relax +\@colN=\c@maxdynamic}{}}% +\ifnum\ff@id=0\PackageError{flowfram}{Can't find dynamic frame +id '#1'}{}\fi} +\newcommand*{\@getframeid}[2]{% +\@ifdefined{@#1frameid}{\csname @#1frameid\endcsname{#2}}{% +\PackageError{flowfram}{Unknown frame type `#1'}{Frame types can +be one of: flow, static or dynamic}}} +\newcommand*{\dynamicframex}[1]{% +\csname @df@\romannumeral#1@posx\endcsname} +\newcommand*{\dynamicframey}[1]{% +\csname @df@\romannumeral#1@posy\endcsname} +\newcommand*{\dynamicframeevenx}[1]{% +\csname @df@\romannumeral#1@evenx\endcsname} +\newcommand*{\dynamicframeeveny}[1]{% +\csname @df@\romannumeral#1@eveny\endcsname} +\newcommand*{\setalldynamicframes}[1]{% +\@colN=0\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax +\@@setdynamicframe{\@colN}{#1}}} +\newcommand*{\setdynamicframe}{% +\@ifstar\@ssetdynamicframe\@setdynamicframe} +\newcommand*{\@ssetdynamicframe}[2]{% +\@for\@ff@id:=#1\do{% +\@dynamicframeid{\@ff@id}% +\@@setdynamicframe{\ff@id}{#2}}} +\newcommand*{\@setdynamicframe}[2]{% +\ifthenelse{\equal{#1}{all}}{% +\setalldynamicframes{#2}}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxdynamic\TE@or\@colN=\c@maxdynamic}{% +\@@setdynamicframe{\@colN}{#2}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxdynamic\relax + \def\@ff@numend{\c@maxdynamic}% +\fi +\@colN=\@ff@numstart\relax +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@setdynamicframe{\@colN}{#2}% +\advance\@colN by 1\relax +}}}}} +\newcommand*{\@@setdynamicframe}[2]{% +\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@shape{0}% +\setkeys{flowframe}{#2}% +\ifthenelse{\equal{\ff@frame}{}}{}{% +\setboolean{dynamicframe\romannumeral#1}{\ff@frame}}% +\ifthenelse{\equal{\ff@x}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@posx\endcsname{\ff@x}% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@evenx\endcsname{\ff@x}}% +\ifthenelse{\equal{\ff@y}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@posy\endcsname{\ff@y}% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@eveny\endcsname{\ff@y}}% +\ifthenelse{\equal{\ff@evenx}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@evenx\endcsname{\ff@evenx}}% +\ifthenelse{\equal{\ff@eveny}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@eveny\endcsname{\ff@eveny}}% +\ifthenelse{\equal{\ff@oddx}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@posx\endcsname{\ff@oddx}}% +\ifthenelse{\equal{\ff@oddy}{}}{}{% +\expandafter\global\expandafter\setlength +\csname @df@\romannumeral#1@posy\endcsname{\ff@oddy}}% +\expandafter\xdef\csname @df@dim@\romannumeral#1\endcsname{% +[c][\ff@height][\ff@valign]{\ff@width}}% +\ifthenelse{\equal{\ff@label}{}}{}{% +\@s@tdynamicframeid{#1}[\ff@label]}% +\ifthenelse{\equal{\ff@frametype}{}}{}{% +\expandafter +\xdef\csname @df@frametype@\romannumeral#1\endcsname{% +\ff@frametype}}% +\ifthenelse{\equal{\ff@col}{}}{}{% +\expandafter\@setframecol\ff@col\end{#1}{col}{df}}% +\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\expandafter\@setframecol\ff@txtcol\end{#1}{txtcol}{df}}% +\ifthenelse{\equal{\ff@backcol}{}}{}{% +\expandafter\@setframecol\ff@backcol\end{#1}{backcol}{df}}% +\ifthenelse{\equal{\ff@offset}{}}{}{% +\expandafter +\xdef\csname @df@offset@\romannumeral#1\endcsname{\ff@offset}}% +\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}}% +\ifthenelse{\equal{\ff@style}{}}{}{% +\@ifundefined{\ff@style}{\PackageError{flowfram}% +{Unknown style '\ff@style'}{The command \expandafter +\string\csname\ff@style\endcsname\space has not been defined}}{% +\expandafter +\xdef\csname @df@style@\romannumeral#1\endcsname{\ff@style}}}% +\ifthenelse{\equal{\ff@clear}{}}{}{% +\setboolean{@df@clear@\romannumeral#1}{\ff@clear}% +}% +\ifthenelse{\equal{\ff@margin}{}}{}{% +\PackageError{flowfram}{Key 'margin' not available for dynamic +frames}{dynamic frames don't have marginal notes}}% +} +\newcommand*{\@@dynamicframeswapcoords}[1]{% +\setlength{\@ff@tmp@x}% +{\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}% +\expandafter\setlength +\csname @df@\romannumeral#1@eveny\endcsname +{\csname @df@\romannumeral#1@posy\endcsname}% +\expandafter\setlength\csname @df@\romannumeral#1@posy\endcsname +{\@ff@tmp@y}% +} +\newcommand*{\dfswapoddeven}{% +\@ifstar\@sdynamicframeswapcoords\@dynamicframeswapcoords} +\newcommand*{\@sdynamicframeswapcoords}[1]{% +\@for\@ff@id:=#1\do{% +\@dynamicframeid{\@ff@id}% +\@@dynamicframeswapcoords{\ff@id}}} +\newcommand*{\@dynamicframeswapcoords}[1]{% +\ifthenelse{\equal{#1}{all}}{% +\ff@id=0\relax +\whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax +\@@dynamicframeswapcoords{\ff@id}}% +}{% +\ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% +\ifthenelse{\equal{#1}{odd}}{\@colN=1}{\@colN=2}% +\whiledo{\@colN<\c@maxflow\TE@or\@colN=\c@maxflow}{% +\@@dynamicframeswapcoords{\@colN}% +\advance\@colN by 2\relax}% +}{% +\@for\@ff@id:=#1\do{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{\@ff@id}% +\ifnum\@ff@numstart=0\relax + \def\@ff@numstart{1}% +\fi +\ifnum\@ff@numend>\c@maxflow + \def\@ff@numend{\c@maxflow}% +\fi +\@colN=\@ff@numstart +\whiledo{\@colN<\@ff@numend \TE@or \@colN=\@ff@numend}{% +\@@dynamicframeswapcoords{\@colN}% +\advance\@colN by 1\relax +}}}}} +\newenvironment{dynamiccontents}[1]{% +\def\@flf@{dynamiccontents}% +\xdynamiccontents{#1}}{% +\endxdynamiccontents +} +\newtoks\@dynamictok +\def\xdynamiccontents#1{% +\def\@flf@idn{#1}% +\@dynamictok{}\@flf@get@body +} +\long\def\@flf@get@body#1\end{% +\@flf@checkcontinued#1\continueonframe\@nil +\ifdfcontinued + \expandafter\flf@ta\expandafter{\@flf@tmpa}% + \edef\@flf@tmp{\the\@dynamictok\the\flf@ta}% + \@dynamictok\expandafter{\@flf@tmp}% +\else + \@dynamictok\expandafter{\the\@dynamictok#1}% +\fi +\@flf@find@end} +\newif\ifdfcontinued +\long\def\@flf@checkcontinued#1\continueonframe#2\@nil{% +\long\def\@flf@tmpa{#1}\long\def\@flf@tmpb{#2}% +\ifx\@flf@tmpb\@lempty + \dfcontinuedfalse +\else + \dfcontinuedtrue + \flf@getcontargs#2\@ff@text\@ff@nextid\@ff@rest +\fi +} +\long\def\@lempty{} +\def\flf@getcontargs{% +\@ifnextchar[{\@flf@getcontargs}{\@flf@getcontargs[]}} +\long\def\@flf@getcontargs[#1]#2#3\continueonframe#4#5#6{% +\def#4{#1}\def#5{#2}\def#6{#3}% +} +\def\@flf@find@end#1{% +\def\@tempa{#1}% +\global\let\flf@next=\relax +\ifdfcontinued + \@dynamictok\expandafter + {\the\@dynamictok\ffcontinuedtextlayout}% + \protected@edef\@tmpa{\the\@dynamictok{\@ff@text}}% + \@dynamictok\expandafter{\@tmpa}% + \toks@\expandafter{\@ff@rest}% + \edef\flf@next{\noexpand\@flf@get@body\noexpand\end{#1}% + \noexpand\begin{#1}{\@ff@nextid}\noexpand\par + \noexpand\noindent\noexpand\ignorespaces + \the\toks@\noexpand\end{#1}}% +\else + \ifx\@tempa\@flf@ + \let\flf@next=\@flf@endxdynamiccontents + \else + \@dynamictok\expandafter + {\the\@dynamictok\end{#1}}% + \let\flf@next=\@flf@get@body + \fi +\fi +\flf@next +} +\let\endxdynamiccontents\relax +\def\@flf@endxdynamiccontents{% +\ifnum\@flf@idn>\c@maxdynamic + \PackageError{flowfram}{Dynamic frame \number\@flf@idn\ does not exist}{% + You have specified dynamic frame number \number\@flf@idn, but there are + only \number\c@maxdynamic\space dynamic frames currently defined}% +\else + \expandafter + \xdef\csname @dynamicframe@\romannumeral\@flf@idn\endcsname{% + \the\@dynamictok}% + \expandafter +\fi +\expandafter\end\expandafter{\@flf@}% +} +\newenvironment{dynamiccontents*}[1]{% +\def\@flf@{dynamiccontents*}% +\@dynamicframeid{#1}% +\xdynamiccontents{\ff@id}}{% +\enddynamiccontents +} +\newcommand{\setdynamiccontents}{% +\@ifstar\@ssetdynamiccontents\@setdynamiccontents} +\newcommand{\@ssetdynamiccontents}[2]{% +\@dynamicframeid{#1}\@setdynamiccontents{\ff@id}{#2}} +\newcommand{\@setdynamiccontents}[2]{% +\ifnum#1>\c@maxdynamic +\PackageError{flowfram}{Dynamic frame \number#1\ does not exist}{% +You have specified dynamic frame number \number#1, but there are +only \number\c@maxdynamic\space dynamic frames currently defined}% +\else +\expandafter +\gdef\csname @dynamicframe@\romannumeral#1\endcsname{#2}% +\fi} +\newcommand{\appenddynamiccontents}{% +\@ifstar\@sappenddynamic\@appenddynamic} +\newcommand{\@sappenddynamic}[2]{% +\@dynamicframeid{#1}\@appenddynamic{\ff@id}{#2}} +\newcommand{\@appenddynamic}[2]{% +\ifnum#1>\c@maxdynamic + \PackageError{flowfram}{Dynamic frame \number#1 does not exist}{% + You have specified dynamic frame number \number#1, + but there are only + \number\c@maxdynamic\space dynamic frames currently defined}% +\else + \expandafter\@ff@addtolist + \csname @dynamicframe@\romannumeral#1\endcsname\entry{#2}% +\fi} +\newtoks\flf@ta \newtoks\flf@tb +\long\def\@ff@addtolist#1\entry#2{\flf@ta={{#2}}% +\flf@tb=\expandafter{#1}% +\xdef#1{\the\flf@tb\the\flf@ta}} +\newcommand{\continueonframe}{\PackageError{flowfram}{Can't continue +to new frame: not in static or dynamic frame}{% +\string\continueonframe\space may only +be used inside `staticcontents' or `dynamiccontents' environments +(of their starred versions)}} +\newcommand*{\@staticscontinueonframe}[2][]{% +\ffcontinuedtextlayout{#1}% +\end{staticcontents*}% +\begin{staticcontents*}{#2}\par\noindent\ignorespaces} +\newcommand*{\@staticcontinueonframe}[2][]{% +\ffcontinuedtextlayout{#1}% +\end{staticcontents}% +\begin{staticcontents}{#2}\par\noindent\ignorespaces} +\newcommand{\ffcontinuedtextlayout}[1]{% +\parfillskip=0pt\par\hfill\ffcontinuedtextfont{#1}} +\newcommand*{\ffcontinuedtextfont}[1]{\emph{\small #1}} +\newcommand*{\computeleftedgeodd}[1]{% +\setlength{#1}{-1in}% +\addtolength{#1}{-\hoffset}% +\addtolength{#1}{-\oddsidemargin}} +\newcommand*{\computeleftedgeeven}[1]{% +\setlength{#1}{-1in}% +\addtolength{#1}{-\hoffset}% +\addtolength{#1}{-\evensidemargin}} +\newcommand*{\computetopedge}[1]{% +\setlength{#1}{\textheight}% +\addtolength{#1}{\headheight}% +\addtolength{#1}{\headsep}% +\addtolength{#1}{1in}% +\addtolength{#1}{\voffset}% +\addtolength{#1}{\topmargin}} +\newcommand*{\computebottomedge}[1]{% +\computetopedge{#1}% +\addtolength{#1}{-\paperheight}} +\newcommand*{\computerightedgeodd}[1]{% +\computeleftedgeodd{#1}% +\addtolength{#1}{\paperwidth}} +\newcommand*{\computerightedgeeven}[1]{% +\computeleftedgeeven{#1}% +\addtolength{#1}{\paperwidth}} +\newlength\ffareawidth +\newlength\ffareaheight +\newlength\ffareax +\newlength\ffareay +\newcommand*{\computeflowframearea}{% +\@ifstar\@scomputeffarea\@computeffarea} +\newcommand*{\@scomputeffarea}[1]{% +\setlength{\ffareax}{\paperwidth}% +\setlength{\ffareay}{\paperheight}% +\setlength{\@ff@tmp@x}{0pt}% +\setlength{\@ff@tmp@y}{0pt}% +\@for\@ff@id:=#1\do{\@flowframeid{\@ff@id}% +\ifnum\ffareax>\flowframex{\ff@id}% +\setlength{\ffareax}{\flowframex{\ff@id}}% +\fi +\ifnum\ffareay>\flowframey{\ff@id}% +\setlength{\ffareay}{\flowframey{\ff@id}}% +\fi +\setlength{\@ff@offset}{\flowframex{\ff@id}}% +\addtolength{@ff@offset}{\flowframewidth{\ff@id}}% +\ifnum\@ff@tmp@x<\@ff@offset +\setlength{\@ff@tmp@x}{\@ff@offset}% +\fi +\setlength{\@ff@offset}{\flowframey{\ff@id}}% +\addtolength{@ff@offset}{\flowframeheight{\ff@id}}% +\ifnum\@ff@tmp@y<\@ff@offset +\setlength{\@ff@tmp@y}{\@ff@offset}% +\fi +}% +\setlength{\ffareawidth}{\@ff@tmp@x}% +\addtolength{\ffareawidth}{-\ffareax}% +\setlength{\ffareaheight}{\@ff@tmp@y}% +\addtolength{\ffareaheight}{-\ffareay}} +\newcommand*{\@computeffarea}[1]{% +\setlength{\ffareax}{\paperwidth}% +\setlength{\ffareay}{\paperheight}% +\setlength{\@ff@tmp@x}{0pt}% +\setlength{\@ff@tmp@y}{0pt}% +\@for\@ff@id:=#1\do{% +\ff@id=\@ff@id\relax +\setlength{\@ff@offset}{\flowframex{\ff@id}}% +\ifdim\ffareax>\@ff@offset +\setlength{\ffareax}{\@ff@offset}% +\fi +\setlength{\@ff@offset}{\flowframey{\ff@id}}% +\ifdim\ffareay>\@ff@offset +\setlength{\ffareay}{\@ff@offset}% +\fi +\setlength{\@ff@offset}{\flowframex{\ff@id}}% +\addtolength{\@ff@offset}{\flowframewidth{\ff@id}}% +\ifdim\@ff@tmp@x<\@ff@offset +\setlength{\@ff@tmp@x}{\@ff@offset}% +\fi +\setlength{\@ff@offset}{\flowframey{\ff@id}}% +\addtolength{\@ff@offset}{\flowframeheight{\ff@id}}% +\ifdim\@ff@tmp@y<\@ff@offset +\setlength{\@ff@tmp@y}{\@ff@offset}% +\fi +}% +\setlength{\ffareawidth}{\@ff@tmp@x}% +\addtolength{\ffareawidth}{-\ffareax}% +\setlength{\ffareaheight}{\@ff@tmp@y}% +\addtolength{\ffareaheight}{-\ffareay}} +\newcommand*{\@ff@swaplen}[2]{% +\setlength{\@ff@tmp@x}{#1}% +\setlength{#1}{#2}% +\setlength{#2}{\@ff@tmp@x}} +\newcommand*{\@ff@getdim}[2]{% +\ifnum#2<1\relax + \PackageError{flowfram}{Frame IDNs start from 1}{% + You have specified a frame IDN of '\number#2'}% +\fi +\ifcase#1\relax + \PackageError{flowfram}{Unknown frame ID type '#1'}{% + Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)}% +\or + \ifnum#2>\c@maxflow\relax + \PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{% + Flow frame IDNs go from 1 to \number\c@maxflow}% + \else + \setlength{\ffareax}{\flowframex{#2}}% + \setlength{\ffareay}{\flowframey{#2}}% + \setlength{\ffareawidth}{\flowframewidth{#2}}% + \setlength{\ffareaheight}{\flowframeheight{#2}}% + \fi +\or + \ifnum#2>\c@maxstatic\relax + \PackageError{flowfram}{Invalid static frame IDN '\number#2'}{% + Static frame IDNs go from 1 to \number\c@maxstatic}% + \else + \setlength{\ffareax}{\staticframex{#2}}% + \setlength{\ffareay}{\staticframey{#2}}% + \expandafter\expandafter\expandafter + \@ff@getstaticpos + \csname @sf@dim@\romannumeral#2\endcsname + \setlength{\ffareawidth}{\@ff@tmp@x}% + \setlength{\ffareaheight}{\@ff@tmp@y}% + \fi +\or + \ifnum#2>\c@maxdynamic\relax + \PackageError{flowfram}{Invalid dynamic frame IDN '\number#2'}{% + Dynamic frame IDNs go from 1 to \number\c@maxdynamic}% + \else + \setlength{\ffareax}{\dynamicframex{#2}}% + \setlength{\ffareay}{\dynamicframey{#2}}% + \expandafter\expandafter\expandafter + \@ff@getstaticpos + \csname @df@dim@\romannumeral#2\endcsname + \setlength{\ffareawidth}{\@ff@tmp@x}% + \setlength{\ffareaheight}{\@ff@tmp@y}% + \fi +\else + \PackageError{flowfram}{Unknown frame ID type '#1'}{% + Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)}% +\fi +} +\newcommand*{\@ff@getevendim}[2]{% +\ifnum#2<1\relax + \PackageError{flowfram}{Frame IDNs start from 1}{% + You have specified a frame IDN of '\number#2'}% +\fi +\ifcase#1\relax + \PackageError{flowfram}{Unknown frame ID type '#1'}{% + Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)} +\or + \ifnum#2>\c@maxflow + \PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{% + Flow frame IDNs go from 1 to \number\c@maxflow}% + \else + \setlength{\ffareax}{\flowframeevenx{#2}}% + \setlength{\ffareay}{\flowframeeveny{#2}}% + \setlength{\ffareawidth}{\flowframewidth{#2}}% + \setlength{\ffareaheight}{\flowframeheight{#2}}% + \fi +\or + \ifnum#2>\c@maxstatic\relax + \PackageError{flowfram}{Invalid static frame IDN '\number#2'}{% + Static frame IDNs go from 1 to \number\c@maxstatic}% + \else + \setlength{\ffareax}{\staticframeevenx{#2}}% + \setlength{\ffareay}{\staticframeeveny{#2}}% + \expandafter\expandafter\expandafter + \@ff@getstaticpos + \csname @sf@dim@\romannumeral#2\endcsname + \setlength{\ffareawidth}{\@ff@tmp@x}% + \setlength{\ffareaheight}{\@ff@tmp@y}% + \fi +\or + \ifnum#2>\c@maxdynamic\relax + \PackageError{flowfram}{Invalid dynamic frame IDN '\number#2'}{% + Dynamic frame IDNs go from 1 to \number\c@maxdynamic}% + \else + \setlength{\ffareax}{\dynamicframeevenx{#2}}% + \setlength{\ffareay}{\dynamicframeeveny{#2}}% + \expandafter\expandafter\expandafter + \@ff@getstaticpos + \csname @df@dim@\romannumeral#2\endcsname + \setlength{\ffareawidth}{\@ff@tmp@x}% + \setlength{\ffareaheight}{\@ff@tmp@y}% + \fi +\else + \PackageError{flowfram}{Unknown frame ID type '#1'}{% + Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)} +\fi +} +\newcommand*{\getstaticbounds}{% +\@ifstar\@sgetstaticbounds\@getstaticbounds} +\newcommand*{\@sgetstaticbounds}[1]{% +\@staticframeid{#1}\@getstaticbounds{\ff@id}} +\newcommand*{\@getstaticbounds}[1]{\@ff@getdim{2}{#1}} +\newcommand*{\getstaticevenbounds}{% +\@ifstar\@sgetstaticevenbounds\@getstaticevenbounds} +\newcommand*{\@sgetstaticevenbounds}[1]{% +\@staticframeid{#1}\@getstaticevenbounds{\ff@id}} +\newcommand*{\@getstaticevenbounds}[1]{\@ff@getevendim{2}{#1}} +\newcommand*{\getflowbounds}{% +\@ifstar\@sgetflowbounds\@getflowbounds} +\newcommand*{\@sgetflowbounds}[1]{% +\@flowframeid{#1}\@getflowbounds{\ff@id}} +\newcommand*{\@getflowbounds}[1]{\@ff@getdim{1}{#1}} +\newcommand*{\getflowevenbounds}{% +\@ifstar\@sgetflowevenbounds\@getflowevenbounds} +\newcommand*{\@sgetflowevenbounds}[1]{% +\@flowframeid{#1}\@getflowevenbounds{\ff@id}} +\newcommand*{\@getflowevenbounds}[1]{\@ff@getevendim{1}{#1}} +\newcommand*{\getdynamicbounds}{% +\@ifstar\@sgetdynamicbounds\@getdynamicbounds} +\newcommand*{\@sgetdynamicbounds}[1]{% +\@dynamicframeid{#1}\@getdynamicbounds{\ff@id}} +\newcommand*{\@getdynamicbounds}[1]{\@ff@getdim{3}{#1}} +\newcommand*{\getdynamicevenbounds}{% +\@ifstar\@sgetdynamicevenbounds\@getdynamicevenbounds} +\newcommand*{\@sgetdynamicevenbounds}[1]{% +\@dynamicframeid{#1}\@getdynamicevenbounds{\ff@id}} +\newcommand*{\@getdynamicevenbounds}[1]{\@ff@getevendim{3}{#1}} +\newif\ifFLFabove +\newif\ifFLFbelow +\newif\ifFLFleft +\newif\ifFLFright +\newcommand*{\checkifframeabove}{% +\@ifstar\@scheckifframeabove\@checkifframeabove} +\newcommand*{\@scheckifframeabove}[4]{% +\ifodd\c@page + \@soddcheckifframeabove{#1}{#2}{#3}{#4}% +\else + \@sevencheckifframeabove{#1}{#2}{#3}{#4}% +\fi} +\newcommand*{\@checkifframeabove}[4]{% +\ifodd\c@page + \@oddcheckifframeabove{#1}{#2}{#3}{#4}% +\else + \@evencheckifframeabove{#1}{#2}{#3}{#4}% +\fi} +\newcommand*{\oddcheckifframeabove}{% +\@ifstar\@soddcheckifframeabove\@oddcheckifframeabove} +\newcommand*{\@soddcheckifframeabove}[4]{% +\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1bounds\endcsname{#2}% +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3bounds\endcsname{#4}% +\advance\ffareay by \ffareaheight\relax +\expandafter\ifdim\@ff@check>\ffareay + \FLFabovetrue +\else + \FLFabovefalse +\fi +} +\newcommand*{\@oddcheckifframeabove}[4]{% +\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1bounds\endcsname{#2}% +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3bounds\endcsname{#4}% +\advance\ffareay by \ffareaheight\relax +\expandafter\ifdim\@ff@check>\ffareay + \FLFabovetrue +\else + \FLFabovefalse +\fi +} +\newcommand*{\checkifframebelow}{% +\@ifstar\@scheckifframebelow\@checkifframebelow} +\newcommand*{\@scheckifframebelow}[4]{% +\ifodd\c@page + \@soddcheckifframebelow{#1}{#2}{#3}{#4}% +\else + \@sevencheckifframebelow{#1}{#2}{#3}{#4}% +\fi} +\newcommand*{\@checkifframebelow}[4]{% +\ifodd\c@page + \@oddcheckifframebelow{#1}{#2}{#3}{#4}% +\else + \@evencheckifframebelow{#1}{#2}{#3}{#4}% +\fi} +\newcommand*{\oddcheckifframebelow}{% +\@ifstar\@soddcheckifframebelow\@oddcheckifframebelow} +\newcommand*{\@soddcheckifframebelow}[4]{% +\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1bounds\endcsname{#2}% +\advance\ffareay by \ffareaheight\relax +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3bounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareay + \FLFbelowtrue +\else + \FLFbelowfalse +\fi +} +\newcommand*{\@oddcheckifframebelow}[4]{% +\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1bounds\endcsname{#2}% +\advance\ffareay by \ffareaheight\relax +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3bounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareay + \FLFbelowtrue +\else + \FLFbelowfalse +\fi +} +\newcommand*{\checkifframeleft}{% +\@ifstar\@scheckifframeleft\@checkifframeleft} +\newcommand*{\@scheckifframeleft}[4]{% +\ifodd\c@page + \@soddcheckifframeleft{#1}{#2}{#3}{#4}% +\else + \@sevencheckifframeleft{#1}{#2}{#3}{#4}% +\fi} +\newcommand*{\@checkifframeleft}[4]{% +\ifodd\c@page + \@oddcheckifframeleft{#1}{#2}{#3}{#4}% +\else + \@evencheckifframeleft{#1}{#2}{#3}{#4}% +\fi} +\newcommand*{\oddcheckifframeleft}{% +\@ifstar\@soddcheckifframeleft\@oddcheckifframeleft} +\newcommand*{\@soddcheckifframeleft}[4]{% +\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1bounds\endcsname{#2}% +\advance\ffareax by \ffareawidth\relax +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3bounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareax + \FLFlefttrue +\else + \FLFleftfalse +\fi +} +\newcommand*{\@oddcheckifframeleft}[4]{% +\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1bounds\endcsname{#2}% +\advance\ffareax by \ffareawidth\relax +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3bounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareax + \FLFlefttrue +\else + \FLFleftfalse +\fi +} +\newcommand*{\checkifframeright}{% +\@ifstar\@scheckifframeright\@checkifframeright} +\newcommand*{\@scheckifframeright}[4]{% +\ifodd\c@page + \@soddcheckifframeright{#1}{#2}{#3}{#4}% +\else + \@sevencheckifframeright{#1}{#2}{#3}{#4}% +\fi} +\newcommand*{\@checkifframeright}[4]{% +\ifodd\c@page + \@oddcheckifframeright{#1}{#2}{#3}{#4}% +\else + \@evencheckifframeright{#1}{#2}{#3}{#4}% +\fi} +\newcommand*{\oddcheckifframeright}{% +\@ifstar\@soddcheckifframeright\@oddcheckifframeright} +\newcommand*{\@soddcheckifframeright}[4]{% +\@ifundefined{@sget#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1bounds\endcsname{#2}% +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@sget#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3bounds\endcsname{#4}% +\advance\ffareax by \ffareawidth\relax +\expandafter\ifdim\@ff@check>\ffareax + \FLFrighttrue +\else + \FLFrightfalse +\fi +} +\newcommand*{\@oddcheckifframeright}[4]{% +\@ifundefined{@get#1bounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1bounds\endcsname{#2}% +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@get#3bounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3bounds\endcsname{#4}% +\advance\ffareax by \ffareawidth\relax +\expandafter\ifdim\@ff@check>\ffareax + \FLFrighttrue +\else + \FLFrightfalse +\fi +} +\newcommand*{\evencheckifframeabove}{% +\@ifstar\@sevencheckifframeabove\@evencheckifframeabove} +\newcommand*{\@sevencheckifframeabove}[4]{% +\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1evenbounds\endcsname{#2}% +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3evenbounds\endcsname{#4}% +\advance\ffareay by \ffareaheight\relax +\expandafter\ifdim\@ff@check>\ffareay + \FLFabovetrue +\else + \FLFabovefalse +\fi +} +\newcommand*{\@evencheckifframeabove}[4]{% +\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1evenbounds\endcsname{#2}% +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3evenbounds\endcsname{#4}% +\advance\ffareay by \ffareaheight\relax +\expandafter\ifdim\@ff@check>\ffareay + \FLFabovetrue +\else + \FLFabovefalse +\fi +} +\newcommand*{\evencheckifframebelow}{% +\@ifstar\@sevencheckifframebelow\@evencheckifframebelow} +\newcommand*{\@sevencheckifframebelow}[4]{% +\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1evenbounds\endcsname{#2}% +\advance\ffareay by \ffareaheight\relax +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3evenbounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareay + \FLFbelowtrue +\else + \FLFbelowfalse +\fi +} +\newcommand*{\@evencheckifframebelow}[4]{% +\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1evenbounds\endcsname{#2}% +\advance\ffareay by \ffareaheight\relax +\edef\@ff@check{\the\ffareay}% +\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3evenbounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareay + \FLFbelowtrue +\else + \FLFbelowfalse +\fi +} +\newcommand*{\evencheckifframeleft}{% +\@ifstar\@sevencheckifframeleft\@evencheckifframeleft} +\newcommand*{\@sevencheckifframeleft}[4]{% +\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1evenbounds\endcsname{#2}% +\advance\ffareax by \ffareawidth\relax +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3evenbounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareax + \FLFlefttrue +\else + \FLFleftfalse +\fi +} +\newcommand*{\@evencheckifframeleft}[4]{% +\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1evenbounds\endcsname{#2}% +\advance\ffareax by \ffareawidth\relax +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3evenbounds\endcsname{#4}% +\expandafter\ifdim\@ff@check<\ffareax + \FLFlefttrue +\else + \FLFleftfalse +\fi +} +\newcommand*{\evencheckifframeright}{% +\@ifstar\@sevencheckifframeright\@evencheckifframeright} +\newcommand*{\@sevencheckifframeright}[4]{% +\@ifundefined{@sget#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#1evenbounds\endcsname{#2}% +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@sget#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @sget#3evenbounds\endcsname{#4}% +\advance\ffareax by \ffareawidth\relax +\expandafter\ifdim\@ff@check>\ffareax + \FLFrighttrue +\else + \FLFrightfalse +\fi +} +\newcommand*{\@evencheckifframeright}[4]{% +\@ifundefined{@get#1evenbounds}{\PackageError{flowfram}{Unknown frame +type `#1'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#1evenbounds\endcsname{#2}% +\edef\@ff@check{\the\ffareax}% +\@ifundefined{@get#3evenbounds}{\PackageError{flowfram}{Unknown frame +type `#3'}{Frame types may only be one of: static, dynamic or +flow}}{}% +\csname @get#3evenbounds\endcsname{#4}% +\advance\ffareax by \ffareawidth\relax +\expandafter\ifdim\@ff@check>\ffareax + \FLFrighttrue +\else + \FLFrightfalse +\fi +} +\newcommand*{\FFaboveleft}{above left} +\newcommand*{\FFaboveright}{above right} +\newcommand*{\FFbelowleft}{below left} +\newcommand*{\FFbelowright}{below right} +\newcommand*{\FFleft}{on the left} +\newcommand*{\FFright}{on the right} +\newcommand*{\FFabove}{above} +\newcommand*{\FFbelow}{below} +\newcommand*{\FFoverlap}{overlap} +\DeclareRobustCommand*{\relativeframelocation}{% +\@ifstar\@srelativeframelocation\@relativeframelocation} +\newcommand*{\@srelativeframelocation}[4]{% +\@scheckifframeabove{#1}{#2}{#3}{#4}% +\@scheckifframebelow{#1}{#2}{#3}{#4}% +\@scheckifframeleft{#1}{#2}{#3}{#4}% +\@scheckifframeright{#1}{#2}{#3}{#4}% +\ifFLFabove + \ifFLFleft + \FFaboveleft + \else + \ifFLFright + \FFaboveright + \else + \FFabove + \fi + \fi +\else + \ifFLFbelow + \ifFLFleft + \FFbelowleft + \else + \ifFLFright + \FFbelowright + \else + \FFbelow + \fi + \fi + \else + \ifFLFleft + \FFleft + \else + \ifFLFright + \FFright + \else + \FFoverlap + \fi + \fi + \fi +\fi +} +\newcommand*{\@relativeframelocation}[4]{% +\@checkifframeabove{#1}{#2}{#3}{#4}% +\@checkifframebelow{#1}{#2}{#3}{#4}% +\@checkifframeleft{#1}{#2}{#3}{#4}% +\@checkifframeright{#1}{#2}{#3}{#4}% +\ifFLFabove + \ifFLFleft + \FFaboveleft + \else + \ifFLFright + \FFaboveright + \else + \FFabove + \fi + \fi +\else + \ifFLFbelow + \ifFLFleft + \FFbelowleft + \else + \ifFLFright + \FFbelowright + \else + \FFbelow + \fi + \fi + \else + \ifFLFleft + \FFleft + \else + \ifFLFright + \FFright + \else + \FFoverlap + \fi + \fi + \fi +\fi +} +\DeclareRobustCommand*{\reldynamicloc}{% +\@ifstar\@sreldynamicloc\@reldynamicloc} +\newcommand*{\@sreldynamicloc}[2]{ +\@srelativeframelocation{dynamic}{#1}{dynamic}{#2}} +\newcommand*{\@reldynamicloc}[2]{ +\@relativeframelocation{dynamic}{#1}{dynamic}{#2}} +\DeclareRobustCommand*{\relstaticloc}{% +\@ifstar\@srelstaticloc\@relstaticloc} +\newcommand*{\@srelstaticloc}[2]{ +\@srelativeframelocation{static}{#1}{static}{#2}} +\newcommand*{\@relstaticloc}[2]{ +\@relativeframelocation{static}{#1}{static}{#2}} +\DeclareRobustCommand*{\relflowloc}{% +\@ifstar\@srelflowloc\@relflowloc} +\newcommand*{\@srelflowloc}[2]{ +\@srelativeframelocation{flow}{#1}{flow}{#2}} +\newcommand*{\@relflowloc}[2]{ +\@relativeframelocation{flow}{#1}{flow}{#2}} +\newcommand*{\setinitialframe}[1]{\c@thisframe=#1% +\global\usedframebreaktrue +\global\setlength{\hsize}{% +\csname colwidth\romannumeral\c@thisframe\endcsname}} +\newif\if@setfr@mes +\@setfr@mesfalse +\newcommand*{\setframes}{% +\ifnum\c@thisframe=0\relax +\PackageWarning{flowfram}{Can't find a flow frame on page 1. +\MessageBreak +Attempting to find the first page with a flow frame}% +\@nxtcol=1\relax +\c@curpg=1\relax +\@g@tnextcol{\@nxtcol}% +\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}% +\c@thisframe=\@nxtcol +\fi +\@setcol{\c@thisframe}\relax +\@setfr@mestrue +\edef\ff@txtcol{% +\csname @ff@txtcol@\romannumeral\c@thisframe\endcsname}% +\@s@tfftextcol +} +\newcommand{\emulatetwocolumn}[1][]{% +\finishthispage +\setallflowframes{pages=none}% +\settoheight{\@ff@staticH}{#1}% +\settodepth{\@ff@tmp@y}{#1}% +\addtolength{\@ff@staticH}{\@ff@tmp@y}% +\ifdim\@ff@staticH>0pt\relax +\twocolumnStop[\c@page]{\@ff@staticH}% +\c@thisframe=\c@maxflow +\advance\c@thisframe by -1\relax +\@twocolumn[>\c@page]% +\setstaticcontents{\c@maxstatic}{#1}% +\else +\@twocolumn +\c@thisframe=\c@maxflow +\advance\c@thisframe by -1\relax +\fi +\@setcol{\c@thisframe}\relax +} +\newcommand{\emulateonecolumn}[1][]{% +\finishthispage +\setallflowframes{pages=none}% +\settoheight{\@ff@staticH}{#1}% +\settodepth{\@ff@tmp@y}{#1}% +\addtolength{\@ff@staticH}{\@ff@tmp@y}% +\ifdim\@ff@staticH>0pt\relax +\onecolumnStop[\c@page]{\@ff@staticH}% +\c@thisframe=\c@maxflow +\advance\c@thisframe by -1\relax +\@onecolumn[>\c@page]% +\setstaticcontents{\c@maxstatic}{#1}% +\else +\@twocolumn +\c@thisframe=\c@maxflow +\advance\c@thisframe by -1\relax +\fi +\@setcol{\c@thisframe}\relax +} +\AtBeginDocument{% +\ifnum\c@maxflow=0\relax +\PackageWarning{flowfram}{No flow frames, adding one}% +\@onecolumn +\fi +\setframes +\renewcommand{\onecolumn}[1][]{\PackageWarning{flowfram}{% +Ignoring \string\onecolumn\space found in document environment. +Frames must be defined in the preamble}#1}% +\renewcommand{\twocolumn}[1][]{\PackageWarning{flowfram}{% +Ignoring \string\twocolumn\space found in document environment. +Frames must be defined in the preamble}#1}% +} +\newcommand{\@setcol}[1]{% +\ifnum\c@maxflow<#1\relax + \PackageError{flowfram}{Can't set frame '\number#1', doesn't + exist}{}% +\else + \expandafter\global\expandafter\columnwidth + \csname colwidth\romannumeral#1\endcsname + \ifdim\hsize=\columnwidth + \else + \ifusedframebreak + \else + \PackageWarning{flowfram}{Moving to flow frame of unequal + width,\MessageBreak use of \string\framebreak\space advised, + or text might not appear correctly}% + \fi + \fi + \global\usedframebreakfalse + \global\hsize\columnwidth + \expandafter\global + \expandafter\vsize\csname colheight\romannumeral#1\endcsname + \global\@colht\vsize + \global\@colroom\@colht + \global\linewidth\columnwidth + \setmargin +\fi +\stepcounter{displayedframe}% +} +\output={\let\par\@@par +\ifnum\outputpenalty <-\@M + \@specialoutput +\else + \@makecol + \@opcol \@startcolumn + \@whilesw \if@fcolmade \fi {\@opcol \@startcolumn }% +\fi +\ifnum\outputpenalty>-\@Miv + \ifdim\@colroom<1.5\baselineskip + \ifdim\@colroom<\vsize + \@latex@warning@no@line{Text page \thepage \space + contains only floats}\@emptycol + \else + \global\vsize\@colroom + \fi + \else + \global\vsize\@colroom + \fi +\else + \global\vsize\maxdimen +\fi +} +\def\@doclearpage{% +\ifvoid\footins + \setbox\@tempboxa\vsplit\@cclv to\z@ + \unvbox\@tempboxa + \setbox\@tempboxa\box\@cclv + \xdef\@deferlist{\@toplist\@botlist\@deferlist}% +\global\let\@toplist\@empty +\global\let\@botlist\@empty +\global\@colroom\@colht + \ifx\@currlist\@empty + \else + \@latexerr{Float(s) lost}\@ehb + \global\let\@currlist\@empty + \fi + \@makefcolumn + \@deferlist + \@whilesw \if@fcolmade \fi {\@opcol + \@makefcolumn + \@deferlist}% +\if@firstcolumn + \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}% +\global\let\@dbltoplist\@empty +\global\@colht\vsize +\begingroup + \@dblfloatplacement + \@makefcolumn + \@dbldeferlist + \@whilesw \if@fcolmade \fi {\@outputpage +\@makefcolumn\@dbldeferlist}% +\endgroup +\else + \vbox{}\clearpage +\fi +\else + \setbox\@cclv\vbox{\box\@cclv\vfil}% +\@makecol\@opcol\clearpage\fi} +\newcommand{\@dothehead}{\vbox to \headheight{% +\color@hbox\normalcolor\hbox to \textwidth{% +\@thehead}\color@endbox}} +\newcommand{\@dothefoot}{% +\color@hbox\normalcolor\hbox to \textwidth{% +\@thefoot}\color@endbox} +\newcommand{\@dodynamicthehead}{} +\newcommand{\@dodynamicthefoot}{} +\def\@outputpage{% +\begingroup + \let\protect\noexpand + \@resetactivechars + \global\let\@@if@newlist\if@newlist + \global\@newlistfalse\@parboxrestore + \shipout\vbox{\set@typeset@protect + \aftergroup + \endgroup + \aftergroup + \set@typeset@protect + \reset@font\normalsize\normalsfcodes + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \baselineskip\z@skip + \lineskip\z@skip + \lineskiplimit\z@ + \vskip\topmargin\moveright\@themargin + \vbox{% + \vskip\headheight + \vskip\headsep + \box\@outputbox + }}% + \global\let\if@newlist\@@if@newlist + \stepcounter{page}% + \setcounter{displayedframe}{0}% + \let\firstmark\botmark} +\newcommand*{\makedfheaderfooter}{% +\setlength{\@ff@tmp@y}{\textheight}% +\addtolength{\@ff@tmp@y}{\headsep}% +\newdynamicframe{\textwidth}{\headheight}{0pt}{\@ff@tmp@y}[header]% +\newdynamicframe{\textwidth}{\headheight}{0pt}{-\footskip}[footer]% +\renewcommand{\@dothehead}{}% +\renewcommand{\@dothefoot}{}% +\renewcommand{\@dodynamicthehead}{% +\@dynamicframeid{header}% +\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}% +}% +} +\@onlypreamble{\makedfheaderfooter} +\newcommand{\footnotecolor}{% +\@ifundefined{@ff@txtcol@\romannumeral\c@thisframe}{% +\normalcolor}{% +\edef\ff@txtcol{% +\csname @ff@txtcol@\romannumeral\c@thisframe\endcsname}% +\@s@tfftextcol}} +\renewcommand{\@makecol}{% +\ifvoid\footins + \setbox\@outputbox\box\@cclv +\else + \setbox\@outputbox\vbox{% +\boxmaxdepth\@maxdepth\@tempdima\dp\@cclv + \unvbox\@cclv + \vskip\skip\footins + \color@begingroup + \footnotecolor + \footnoterule + \unvbox\footins + \color@endgroup +}\fi +\xdef\@freelist{\@freelist \@midlist }% +\global\let\@midlist\@empty +\@combinefloats +\ifvbox\@kludgeins + \@makespecialcolbox +\else + \setbox\@outputbox\vbox to\@colht{% +\@texttop\dimen@\dp\@outputbox + \unvbox \@outputbox + \vskip -\dimen@\@textbottom +}\fi +\global\maxdepth\@maxdepth} +\def\@opcol{\@outputdblcol +\global\@mparbottom\z@ +\global\@textfloatsheight\z@ +\@floatplacement +} +\newif\if@ff@moreframes +\newcommand*{\@ff@checkifmoreframes}{% +\@ff@moreframesfalse +\@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}% +}% +\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{#2}{none}}{}{% +\@ff@checknumrange{#1}{#2}}}} +\newcommand*{\@ff@checknumrange}[2]{% +\def\@ff@numstart{0}\def\@ff@numend{10000}% +\@ff@getrange{#2}% +\ifnum\@ff@numend>#1\relax +\@ff@moreframestrue +\else +\ifnum\@ff@numend=#1\relax +\@ff@moreframestrue +\fi +\fi +} +\newcount\c@ffrangenum +\newcommand*{\@ff@getrange}[1]{% +\expandafter\@ff@@getrange#1-\relax\end} +\def\@ff@@getrange#1#2\end{% +\ifx#1<\relax + \@ff@getrangeless#1#2\end +\else + \ifx#1>\relax + \@ff@getrangegreater#1#2\end + \else + \@@ff@getrange#1#2\end + \fi +\fi +} +\def\@ff@getrangeless<#1-\relax\end{% +\c@ffrangenum=#1\relax +\advance\c@ffrangenum by -1\relax +\def\@ff@numstart{0}% +\edef\@ff@numend{\number\c@ffrangenum}} +\def\@ff@getrangegreater>#1-\relax\end{% +\c@ffrangenum=#1\relax +\advance\c@ffrangenum by 1\relax +\edef\@ff@numstart{\number\c@ffrangenum}% +\def\@ff@numend{10000}} +\def\@@ff@getrange#1-#2\end{% +\ifx\relax#2\relax +\def\@ff@numstart{#1}\def\@ff@numend{#1}% +\else +\def\@ff@numstart{#1}% +\@@@ff@getrange#2\end +\fi +} +\def\@@@ff@getrange#1-\relax\end{% +\def\@ff@numend{#1}} +\newif\if@notthiscol +\newif\if@ff@nwpg +\newcount\c@curpg +\newcommand*{\@g@tnextcol}[1]{% +\@ff@checkifmoreframes +\if@ff@moreframes +\else +\PackageWarning{flowfram}{Run out of flows frames, +adding new one}% +\@onecolumn +#1=\c@maxflow +\fi +\@notthiscoltrue +\@ff@nwpgfalse +\@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\relax +\fi +\@ff@chckifthispg{\c@curpg}{\@colN}% +\if@notthiscol +\repeat +#1=\@colN +} +\newcommand*{\@ff@chckifthispg}[2]{% +\@notthiscoltrue +\edef\ff@pages{\csname @ff@pages@\romannumeral#2\endcsname}% +\@@ff@chckifthispg{#1}% +} +\newcommand*{\@@ff@chckifthispg}[1]{% +\ifthenelse{\equal{\ff@pages}{none}}{}{% +\ifthenelse{\equal{\ff@pages}{all}}{\@notthiscolfalse}{% +\ifthenelse{\equal{\ff@pages}{odd}}{% +\ifodd#1\@notthiscolfalse\fi}{% +\ifthenelse{\equal{\ff@pages}{even}}{% +\ifodd#1\else\@notthiscolfalse\fi}{% +\@for\@ff@pp:=\ff@pages\do{% +\def\@ff@numstart{0}\def\@ff@numend{0}% +\@ff@getrange{\@ff@pp}% +\ifthenelse{#1<\@ff@numstart \or #1>\@ff@numend}{}{% +\@notthiscolfalse}% +}% +}}}}% +} +\newcommand*{\@sf@chckifthispg}[1]{% +\@notthiscoltrue +\edef\ff@pages{\csname @sf@pages@\romannumeral#1\endcsname}% +\@@ff@chckifthispg{\c@page}% +} +\newcommand*{\@df@chckifthispg}[1]{% +\@notthiscoltrue +\edef\ff@pages{\csname @df@pages@\romannumeral#1\endcsname}% +\@@ff@chckifthispg{\c@page}% +} +\newcommand*{\@setcolbox}[1]{% +\expandafter\global\expandafter\setbox +\csname column\romannumeral#1\endcsname\box\@outputbox +} +\newcommand*{\@docolbox}[1]{% +\edef\ff@frametype{% +\csname @ff@frametype@\romannumeral#1\endcsname}% +\edef\ff@col{\csname @ff@col@\romannumeral#1\endcsname}% +\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}{% +\ifthenelse{\boolean{columnframe\romannumeral#1}}{% +\@ff@fbox{\csname colwidth\romannumeral#1\endcsname}% +{\csname colheight\romannumeral#1\endcsname}{% +\expandafter\box\csname column\romannumeral#1\endcsname}{% +\csname\ff@frametype\endcsname}% +}{% +\@ff@box{\csname colwidth\romannumeral#1\endcsname}% +{\csname colheight\romannumeral#1\endcsname}{% +\expandafter\box\csname column\romannumeral#1\endcsname}% +}}} +\newcommand*{\@docolbbox}[1]{% +\@ff@setoffset{#1}% +\def\ff@col{}\def\ff@txtcol{}% +\@fr@meifdraft{% +\@ff@box{\csname colwidth\romannumeral#1\endcsname}% +{\csname colheight\romannumeral#1\endcsname}{% +\expandafter\box\csname column\romannumeral#1\endcsname}}% +{F:\number#1;\csname @col@id@\romannumeral#1\endcsname}} +\newcommand{\@ff@fbox}[4]{{% +\fboxsep=\flowframesep\fboxrule=\flowframerule\@s@tffcol +\kern\@ff@offset +#4{\@ff@box{#1}{#2}{#3}}}} +\newcommand{\@ff@box}[3]{{\@ffbackground{\vbox to#2 +{\hb@xt@ #1{\hss{\@s@tfftextcol #3}\hss}\vss\kern\z@}}}} +\newcommand*{\@putcolbox}[1]{% +\@ff@chckifthispg{\c@page}{#1}% +\if@notthiscol +\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname col@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@posx\endcsname +\@docolbox{#1}\hss}% +\else +\expandafter\raise\csname col@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@evenx\endcsname +\@docolbox{#1}\hss}% +\fi +\else +\expandafter\raise\csname col@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@posx\endcsname +\@docolbox{#1}\hss}% +\fi +\fi +} +\newcommand*{\@putcolbbox}[1]{% +\@ff@chckifthispg{\c@page}{#1}% +\if@notthiscol +\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname col@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@posx\endcsname +\@docolbbox{#1}\hss}% +\else +\expandafter\raise\csname col@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@evenx\endcsname +\@docolbbox{#1}\hss}% +\fi +\else +\expandafter\raise\csname col@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname col@\romannumeral#1@posx\endcsname +\@docolbbox{#1}\hss}% +\fi +\fi +} +\newcommand*{\@ff@s@t@doubleboxoffset}{% +\setlength{\@ff@offset}{-\flowframesep}% +\addtolength{\@ff@offset}{-3.75\flowframerule}% +\addtolength{\@ff@offset}{-.5pt}% +} +\newcommand*{\@ff@s@t@ovalboxoffset}{% +\@ff@offset=-\fontdimen 8\tenln\relax +\advance\@ff@offset by -\flowframesep\relax +} +\newcommand*{\@ff@s@t@Ovalboxoffset}{% +\@ff@offset=-\fontdimen 8\tenlnw\relax +\advance\@ff@offset by -\flowframesep\relax +} +\newcommand*{\@ff@s@t@defaultoffset}{% +\@ff@offset=-\flowframesep\relax +\addtolength{\@ff@offset}{-\flowframerule}% +} +\newcommand*{\@ff@setoffset}[1]{% +\ifthenelse{\equal{\csname @ff@offset@\romannumeral#1\endcsname}% +{compute}}{% +\ifthenelse{\boolean{columnframe\romannumeral#1}}{% +\ifthenelse{% +\equal{\csname @ff@frametype@\romannumeral#1\endcsname}% +{doublebox}}{% +\@ff@s@t@doubleboxoffset +}{% +\ifthenelse{% +\equal{\csname @ff@frametype@\romannumeral#1\endcsname}% +{ovalbox}}{% +\@ff@s@t@ovalboxoffset +}{% +\ifthenelse{% +\equal{\csname @ff@frametype@\romannumeral#1\endcsname}% +{Ovalbox}}{% +\@ff@s@t@Ovalboxoffset}{% +\@ff@s@t@defaultoffset +}}}% +}{}% +}{% +\setlength{\@ff@offset}% +{\csname @ff@offset@\romannumeral#1\endcsname}}% +} +\newcommand*{\@sf@setoffset}[1]{% +\ifthenelse{% +\equal{\csname @sf@offset@\romannumeral#1\endcsname}% +{compute}}{% +\ifthenelse{\boolean{staticframe\romannumeral#1}}{% +\ifthenelse{% +\equal{\csname @sf@frametype@\romannumeral#1\endcsname}% +{doublebox}}{% +\@ff@s@t@doubleboxoffset +}{% +\ifthenelse{% +\equal{\csname @sf@frametype@\romannumeral#1\endcsname}% +{ovalbox}}{% +\@ff@s@t@ovalboxoffset +}{% +\ifthenelse{% +\equal{\csname @sf@frametype@\romannumeral#1\endcsname}% +{Ovalbox}}{% +\@ff@s@t@Ovalboxoffset +}{% +\@ff@s@t@defaultoffset +}}}% +}{}% +}{% +\setlength{\@ff@offset}% +{\csname @sf@offset@\romannumeral#1\endcsname}}% +} +\newcommand*{\@df@setoffset}[1]{% +\ifthenelse{% +\equal{\csname @df@offset@\romannumeral#1\endcsname}% +{compute}}{% +\setlength{\@ff@offset}{0pt}% +\ifthenelse{\boolean{dynamicframe\romannumeral#1}}{% +\ifthenelse{% +\equal{\csname @df@frametype@\romannumeral#1\endcsname}% +{doublebox}}{% +\@ff@s@t@doubleboxoffset +}{% +\ifthenelse{% +\equal{\csname @df@frametype@\romannumeral#1\endcsname}% +{ovalbox}}{% +\@ff@s@t@ovalboxoffset +}{% +\ifthenelse{% +\equal{\csname @df@frametype@\romannumeral#1\endcsname}% +{Ovalbox}}{% +\@ff@s@t@Ovalboxoffset}{% +\@ff@s@t@defaultoffset +}}}% +}{}% +}{% +\setlength{\@ff@offset}% +{\csname @df@offset@\romannumeral#1\endcsname}}% +} +\newcommand*{\@putmarginbox}[1]{% +\@ff@chckifthispg{\c@page}{#1}% +\if@notthiscol +\else +\@killglue +\if@twoside +\ifodd\c@page +\edef\ff@x{\csname col@\romannumeral#1@posx\endcsname}% +\edef\ff@y{\csname col@\romannumeral#1@posy\endcsname}% +\else +\edef\ff@x{\csname col@\romannumeral#1@evenx\endcsname}% +\edef\ff@y{\csname col@\romannumeral#1@eveny\endcsname}% +\fi +\else +\edef\ff@x{\csname col@\romannumeral#1@posx\endcsname}% +\edef\ff@y{\csname col@\romannumeral#1@posy\endcsname}% +\fi +\setlength{\@ff@tmp@x}{\ff@x}% +\setlength{\@ff@tmp@y}{\ff@y}% +\@getmarginpos{\csname @ff@margin@\romannumeral#1\endcsname}% +\ifthenelse{\equal{\ff@margin}{left}}{% +\addtolength{\@ff@tmp@x}{-\marginparwidth}% +\addtolength{\@ff@tmp@x}{-\marginparsep}% +\ifthenelse{\boolean{columnframe\romannumeral#1}}{% +}{}% +}{% +\addtolength{\@ff@tmp@x}% +{\csname colwidth\romannumeral#1\endcsname}% +\addtolength{\@ff@tmp@x}{\marginparsep}% +\ifthenelse{\boolean{columnframe\romannumeral#1}}{% +}{}% +}% +\raise\@ff@tmp@y +\hb@xt@\z@{% +\expandafter\kern\@ff@tmp@x +\@fr@meifdraft{\@ff@box{\marginparwidth}% +{\csname colheight\romannumeral#1\endcsname}{}}% +{M:\number#1}\hss}\fi +\ignorespaces} +\newcommand*{\@ff@drawmargins}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{% +\advance\@colN by 1\relax +\makebox[0pt][l]{\@putmarginbox{\@colN}}% +}% +} +\def\@ff@getstaticpos[#1][#2][#3]#4{\@ff@tmp@x=#4\relax +\@ff@tmp@y=#2\relax +\def\ff@valign{#3}} +\newcommand*{\@dostaticbox}[1]{% +\edef\ff@frametype{% +\csname @sf@frametype@\romannumeral#1\endcsname}% +\edef\ff@col{\csname @sf@col@\romannumeral#1\endcsname}% +\edef\ff@backcol{\csname @sf@backcol@\romannumeral#1\endcsname}% +\@sf@setoffset{#1}% +\expandafter\expandafter\expandafter +\@ff@getstaticpos\csname @sf@dim@\romannumeral#1\endcsname +\rotateframe{\csname @sf@angle@\romannumeral#1\endcsname}{% +\ifthenelse{\boolean{staticframe\romannumeral#1}}{% +\@ff@fbox{\@ff@tmp@x}{\@ff@tmp@y}{% +\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname} +{\csname\ff@frametype\endcsname}% +}{% +\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}% +{\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname}% +}}} +\newcommand*{\@dostaticbbox}[1]{% +\edef\ff@col{}% +\@sf@setoffset{#1}% +\expandafter\expandafter\expandafter +\@ff@getstaticpos\csname @sf@dim@\romannumeral#1\endcsname +\@fr@meifdraft{% +\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}% +{\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname}% +}{S:\number#1;\csname @sf@id@\romannumeral#1\endcsname}} +\newcommand*{\@putstaticbox}[1]{% +\@sf@chckifthispg{#1}% +\if@notthiscol\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname @sf@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@posx\endcsname +\@dostaticbox{#1}\hss}% +\else +\expandafter\raise\csname @sf@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@evenx\endcsname +\@dostaticbox{#1}\hss}% +\fi +\else +\expandafter\raise\csname @sf@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@posx\endcsname +\@dostaticbox{#1}\hss}% +\fi +\fi} +\newcommand*{\@putstaticbbox}[1]{% +\@sf@chckifthispg{#1}% +\if@notthiscol\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname @sf@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@posx\endcsname +\@dostaticbbox{#1}\hss}\ignorespaces +\else +\expandafter\raise\csname @sf@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@evenx\endcsname +\@dostaticbbox{#1}\hss}\ignorespaces +\fi +\else +\expandafter\raise\csname @sf@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @sf@\romannumeral#1@posx\endcsname +\@dostaticbbox{#1}\hss}\ignorespaces +\fi +\fi} +\newcommand*{\@resetst@tics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax +\ifthenelse{\boolean{@sf@clear@\romannumeral\@colN}}{% +\global\sbox{% +\csname @staticframe@\romannumeral\@colN\endcsname}{}}{}}} +\newcommand*{\@resetdyn@mics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax +\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}% +\edef\ff@col{\csname @df@col@\romannumeral#1\endcsname}% +\edef\ff@txtcol{\csname @df@txtcol@\romannumeral#1\endcsname}% +\edef\ff@backcol{\csname @df@backcol@\romannumeral#1\endcsname}% +\edef\ff@style{\csname @df@style@\romannumeral#1\endcsname}% +\def\ff@contents{\csname @dynamicframe@\romannumeral#1\endcsname}% +\@df@setoffset{#1}% +\expandafter\expandafter\expandafter +\@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname +\rotateframe{\csname @df@angle@\romannumeral#1\endcsname}{% +\ifthenelse{\boolean{dynamicframe\romannumeral#1}}{% +\@ff@fbox{\@ff@tmp@x}{\@ff@tmp@y}% +{\@dodfparbox{#1}}% +{\csname\ff@frametype\endcsname}% +}{% +\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}{% +\@dodfparbox{#1}}% +}}} +\newcommand*{\@dodynamicbbox}[1]{% +\edef\ff@col{}% +\@df@setoffset{#1}% +\expandafter\expandafter\expandafter +\@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname +\@fr@meifdraft{% +\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}{% +\expandafter\expandafter\expandafter +\parbox\csname @df@dim@\romannumeral#1\endcsname +{}}% +}{D:\number#1;\csname @df@id@\romannumeral#1\endcsname}} +\newcommand*{\@putdynamicbox}[1]{% +\@df@chckifthispg{#1}% +\if@notthiscol\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname @df@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@posx\endcsname +\@dodynamicbox{#1}\hss}\ignorespaces +\else +\expandafter\raise\csname @df@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@evenx\endcsname +\@dodynamicbox{#1}\hss}\ignorespaces +\fi +\else +\expandafter\raise\csname @df@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@posx\endcsname +\@dodynamicbox{#1}\hss}\ignorespaces +\fi +\fi} +\newcommand*{\@putdynamicbbox}[1]{% +\@df@chckifthispg{#1}% +\if@notthiscol\else +\@killglue +\if@twoside +\ifodd\c@page +\expandafter\raise\csname @df@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@posx\endcsname +\@dodynamicbbox{#1}\hss}\ignorespaces +\else +\expandafter\raise\csname @df@\romannumeral#1@eveny\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@evenx\endcsname +\@dodynamicbbox{#1}\hss}\ignorespaces +\fi +\else +\expandafter\raise\csname @df@\romannumeral#1@posy\endcsname +\hb@xt@\z@{% +\expandafter\kern \csname @df@\romannumeral#1@posx\endcsname +\@dodynamicbbox{#1}\hss}\ignorespaces +\fi +\fi} +\newcommand*{\@@doheader}{% +\setlength\@ff@tmp@y{\textheight}% +\addtolength{\@ff@tmp@y}{\headsep}% +\def\ff@col{}% +\def\ff@txtcol{}% +\def\ff@backcol{{none}}% +\@ff@box{0pt}{\@ff@tmp@y}{\makebox[0pt][l]{\@dothehead}}% +} +\newcommand*{\@@dofooter}{% +\setlength\@ff@tmp@y{-\footskip}% +\def\ff@col{}% +\def\ff@txtcol{}% +\def\ff@backcol{{none}}% +\@ff@box{0pt}{\@ff@tmp@y}{\makebox[0pt][l]{\@dothefoot}}% +} +\newcommand{\@s@tfr@mes}[1]{{\@picht\textheight +\setbox\@picbox\hb@xt@ \textwidth +\bgroup \hbox \bgroup #1\relax +\egroup +\hss \egroup +\ht\@picbox\@picht \dp\@picbox +\z@ \mbox{\box \@picbox}}} +\newcommand*{\@ff@doallflowframes}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\@putcolbox{\@colN}}% +} +\newcommand*{\@ff@doallflowframesbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\@putcolbbox{\@colN}}% +} +\newcommand*{\@ff@doallstatics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax +\@putstaticbox{\@colN}}% +} +\newcommand*{\@ff@doallstaticsbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax +\@putstaticbbox{\@colN}}% +} +\newcommand*{\@ff@doalldynamics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax +\@putdynamicbox{\@colN}}% +} +\newcommand*{\@ff@doalldynamicsbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax +\@putdynamicbbox{\@colN}}% +} +\newcommand*{\@ff@dotypeblock}{% +\makebox[0pt][l]{\@fr@meifdraft[\setffdrafttypeblockcolor]{% +\vbox to \textheight{\hbox to \textwidth{}}}{}}} +\newlength\ffevenoffset +\newcommand*{\@ff@do@allframes}{% +\ffevenoffset=0pt\relax +\if@twoside + \ifodd\c@page + \else + \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 +\@@dofooter +\@ff@doallflowframes +\@ff@doalldynamics +\ifshowtypeblock + \@ff@dotypeblock +\fi +\ifshowframebbox + \@ff@doallstaticsbbox + \@ff@doallflowframesbbox + \@ff@doalldynamicsbbox +\fi +\ifshowmargins + \@ff@drawmargins +\fi +}}} +\newcount\@nxtcol +\def\@outputdblcol{% +\@nxtcol=\c@thisframe +\c@curpg=\c@page +\@g@tnextcol{\@nxtcol}% +\if@ff@nwpg % next flow frame starts on new page + \global\@firstcolumntrue + \@setcolbox\c@thisframe + \if@specialpage + \global\@specialpagefalse + \@nameuse{ps@\@specialstyle}\relax + \fi + \if@twoside + \ifodd\count\z@ + \let\@thehead\@oddhead + \let\@thefoot\@oddfoot + \else + \let\@thehead\@evenhead + \let\@thefoot\@evenfoot + \fi + \else + \let\@thehead\@oddhead + \let\@thefoot\@oddfoot + \fi + \@begindvi + \@dodynamicthehead\@dodynamicthefoot + \vbadness=\@M + \setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}% + \@combinedblfloats + \@outputpage +\advance\c@curpg by -\c@page\relax + \whiledo{\c@curpg>0}{\advance\c@curpg by -1\relax + \setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}% +\@outputpage} + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw \if@fcolmade \fi + {\@outputpage \@startdblcolumn }\endgroup + \@resetst@tics + \@resetdyn@mics +\else % still on same page, save contents of box255 + \global\@firstcolumnfalse + \@setcolbox\c@thisframe +\fi +\global\c@thisframe=\@nxtcol +\@setcol{\c@thisframe}\relax +\global\@colht\vsize +} +\def\@dblfloatplacement{% + \global\@dbltopnum\c@dbltopnumber + \global\@dbltoproom\dbltopfraction\@colht\@textmin + \@colht\advance\@textmin -\@dbltoproom + \@fpmin\dblfloatpagefraction\vsize + \@fptop \@dblfptop \@fpsep \@dblfpsep \@fpbot \@dblfpbot} +\newenvironment{statictable}{\def\@captype{table}}{} +\newenvironment{staticfigure}{\def\@captype{figure}}{} +\newif\ifffvadjust +\ffvadjusttrue +\renewcommand*{\onecolumn}{\@onecolumn} +\newcommand*{\@onecolumn}[1][all]{% +\@onecolumninarea[#1]{\textwidth}{\textheight}{0pt}{0pt}} +\newlength\columnheight +\newcommand*{\onecolumninarea}{\@onecolumninarea} +\@onlypreamble{\onecolumninarea} +\newcommand*{\@onecolumninarea}[5][all]{% +\setlength{\columnheight}{#3}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\@n@wflowframe[#1]{#2}{\columnheight}{#4}{#5}} +\renewcommand*{\twocolumn}{\@twocolumn} +\newcommand*{\@twocolumn}[1][all]{% +\@twocolumninarea[#1]{\textwidth}{\textheight}{0pt}{0pt}} +\newcommand*{\twocolumninarea}{\@twocolumninarea} +\@onlypreamble{\twocolumninarea} +\newcommand*{\@twocolumninarea}[5][all]{% +\setlength{\columnheight}{#3}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\setlength{\columnwidth}{#2}% +\addtolength{\columnwidth}{-\columnsep}% +\divide\columnwidth by 2\relax +\setlength{\@ff@tmp@x}{#4}% +\addtolength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\@n@wflowframe[#1]{\columnwidth}{\columnheight}{#4}{#5}% +\setflowframe{\c@maxflow}{margin=left}% +\@n@wflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{#5}% +\setflowframe{\c@maxflow}{margin=right}% +} +\newcommand*{\Ncolumn}[2][all]{% +\Ncolumninarea[#1]{#2}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\Ncolumn} +\newcommand*{\Ncolumninarea}[6][all]{% +\ifnum#2>2\relax + \@Ncolumninarea[#1]{#2}{#3}{#4}{#5}{#6}% +\else + \ifcase#2\relax + \PackageError{flowfram}{% + You have requested 0 flowframes!}{% + It does not make much sense to ask to create 0 flow frames}% + \or + \onecolumninarea[#1]{#3}{#4}{#5}{#6}% + \or + \twocolumninarea[#1]{#3}{#4}{#5}{#6}% + \else + \PackageError{flowfram}{% + Can't create a negative number of flow frames!}{% + You have asked for \number#2 \space flow frames + which really doesn't make sense}% + \fi +\fi +} + +\@onlypreamble{\Ncolumninarea} +\newcommand*{\@Ncolumninarea}[6][all]{% +\@colN=#2\relax +\advance\@colN by -1\relax +\setlength{\columnwidth}{#3}% +\addtolength{\columnwidth}{-\@colN\columnsep}% +\divide\columnwidth by #2\relax +\setlength{\@ff@tmp@x}{#5}% +\setlength{\columnheight}{#4}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\@colN=0\relax +\loop +\advance\@colN by 1\relax +\newflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{#6}% +\addtolength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\ifnum\@colN<#2 +\repeat +} +\newlength{\vcolumnsep} +\setlength{\vcolumnsep}{\columnsep} +\newcommand*{\onecolumntop}[3][all]{% +\onecolumntopinarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\onecolumntop} +\newcommand*{\onecolumnStop}[2][all]{% +\onecolumntopinarea[#1]{static}{#2}{\textwidth}{\textheight}{0pt}{0pt}} +\newcommand*{\onecolumnDtop}[2][all]{% +\onecolumntopinarea[#1]{dynamic}{#2}{\textwidth}{\textheight}{0pt}{0pt}} +\newcommand*{\newframe}[6][all]{% +\ifthenelse{\equal{#2}{flow}}{% +\@n@wflowframe[#1]{#3}{#4}{#5}{#6}% +}{% +\ifthenelse{\equal{#2}{dynamic}}{% +\@n@wdynamicframe[#1]{#3}{#4}{#5}{#6}}{% +\ifthenelse{\equal{#2}{static}}{% +\@n@wstaticframe[#1]{#3}{#4}{#5}{#6}}{% +\PackageError{flowfram}{Unknown frame type '#2'}{% +Available frame types are: 'flow', 'static' and 'dynamic'}}}}} +\newlength\@ff@staticH + +\newcommand*{\onecolumntopinarea}[7][all]{% +\setlength{\@ff@staticH}{#3}% +\setlength{\@ff@tmp@y}{#5}% +\addtolength{\@ff@tmp@y}{-\@ff@staticH}% +\setlength{\columnheight}{\@ff@tmp@y}% +\addtolength{\columnheight}{-\vcolumnsep}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\addtolength{\@ff@tmp@y}{#7}% +\newframe[#1]{#2}{#4}{\@ff@staticH}{#6}{\@ff@tmp@y}% +\@n@wflowframe[#1]{#4}{\columnheight}{#6}{#7}% +} + +\@onlypreamble{\onecolumntopinarea} +\newcommand*{\onecolumnStopinarea}[6][all]{% +\onecolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} +\newcommand*{\onecolumnDtopinarea}[6][all]{% +\onecolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} +\newcommand*{\twocolumntop}[3][all]{% +\twocolumntopinarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\twocolumntop} +\newcommand*{\twocolumnStop}[2][all]{% +\@twocolumntopinarea[#1]{static}{#2}{\textwidth}{\textheight}{0pt}{0pt}} +\newcommand*{\twocolumnDtop}[2][all]{% +\twocolumntop[#1]{dynamic}{#2}} +\newcommand*{\twocolumntopinarea}{\@twocolumntopinarea} +\newcommand*{\@twocolumntopinarea}[7][all]{% +\setlength{\@ff@staticH}{#3}% +\setlength{\@ff@tmp@y}{#5}% +\addtolength{\@ff@tmp@y}{-\@ff@staticH}% +\setlength{\columnheight}{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#7}% +\newframe[#1]{#2}{#4}{\@ff@staticH}{#6}{\@ff@tmp@y}% +\addtolength{\columnheight}{-\vcolumnsep}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\setlength{\columnwidth}{#4}% +\addtolength{\columnwidth}{-\columnsep}% +\divide\columnwidth by 2\relax +\setlength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\addtolength{\@ff@tmp@x}{#6}% +\@n@wflowframe[#1]{\columnwidth}{\columnheight}{#6}{#7}% +\setflowframe{\c@maxflow}{margin=left}% +\@n@wflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{#7}% +\setflowframe{\c@maxflow}{margin=right}% +} +\@onlypreamble{\twocolumntopinarea} +\newcommand*{\twocolumnStopinarea}[6][all]{% +\twocolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} +\newcommand*{\twocolumnDtopinarea}[6][all]{% +\twocolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} +\newcommand*{\Ncolumntop}[4][all]{% +\Ncolumntopinarea[#1]{#2}{#3}{#4}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\Ncolumntop} +\newcommand*{\NcolumnStop}[3][all]{% +\Ncolumntop[#1]{static}{#2}{#3}} +\newcommand*{\NcolumnDtop}[3][all]{% +\Ncolumntop[#1]{dynamic}{#2}{#3}} +\newcommand*{\Ncolumntopinarea}[8][all]{% +\ifnum#3>2\relax + \@Ncolumntopinarea[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}% +\else + \ifcase#3\relax + \PackageError{flowfram}{% + You have requested 0 flowframes!}{% + It does not make much sense to ask to create 0 flow frames} + \or + \onecolumntopinarea[#1]{#2}{#4}{#5}{#6}{#7}{#8}% + \or + \twocolumntopinarea[#1]{#2}{#4}{#5}{#6}{#7}{#8}% + \else + \PackageError{flowfram}{% + Can't create a negative number of flow frames!}{% + You have asked for \number#3 \space flow frames + which really doesn't make sense}% + \fi +\fi +} +\@onlypreamble{\Ncolumntopinarea} +\newcommand*{\@Ncolumntopinarea}[8][all]{% +\setlength{\@ff@staticH}{#4}% +\setlength{\@ff@tmp@y}{#6}% +\addtolength{\@ff@tmp@y}{-\@ff@staticH}% +\setlength{\columnheight}{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#8}% +\newframe[#1]{#2}{#5}{\@ff@staticH}{#7}{\@ff@tmp@y}% +\addtolength{\columnheight}{-\vcolumnsep}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\@colN=#3\relax +\advance\@colN by -1\relax +\setlength{\columnwidth}{#5}% +\addtolength{\columnwidth}{-\@colN\columnsep}% +\divide\columnwidth by #3\relax +\setlength{\@ff@tmp@x}{#7}% +\@colN=0\relax +\loop +\advance\@colN by 1\relax +\newflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{#8}% +\addtolength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\ifnum\@colN<#3 +\repeat +} +\newcommand*{\NcolumnStopinarea}[7][all]{% +\Ncolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}{#7}} +\newcommand*{\NcolumnDtopinarea}[7][all]{% +\Ncolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}{#7}} +\newcommand*{\onecolumnbottom}[3][all]{% +\onecolumnbottominarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\onecolumnbottom} +\newcommand*{\onecolumnSbottom}[2][all]{% +\onecolumnbottom[#1]{static}{#2}} +\newcommand*{\onecolumnDbottom}[2][all]{% +\onecolumnbottom[#1]{dynamic}{#2}} +\newcommand*{\onecolumnbottominarea}[7][all]{% +\setlength{\@ff@staticH}{#3}% +\setlength{\columnheight}{#5}% +\addtolength{\columnheight}{-\@ff@staticH}% +\addtolength{\columnheight}{-\vcolumnsep}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\setlength{\@ff@tmp@y}{#5}% +\addtolength{\@ff@tmp@y}{-\columnheight}% +\addtolength{\@ff@tmp@y}{#7}% +\newframe[#1]{#2}{#4}{\@ff@staticH}{#6}{#7}% +\newflowframe[#1]{#4}{\columnheight}{#6}{\@ff@tmp@y}% +} +\@onlypreamble{\onecolumnbottominarea} +\newcommand*{\onecolumnSbottominarea}[6][all]{% +\onecolumnbottominarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} +\newcommand*{\onecolumnDbottominarea}[6][all]{% +\onecolumnbottominarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} +\newcommand*{\twocolumnbottom}[3][all]{% +\twocolumnSbottominarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\twocolumnbottom} +\newcommand*{\twocolumnSbottom}[2][all]{% +\twocolumnbottom[#1]{static}{#2}} +\newcommand*{\twocolumnDbottom}[2][all]{% +\twocolumnbottom[#1]{dynamic}{#2}} +\newcommand*{\twocolumnbottominarea}[7][all]{% +\setlength{\@ff@staticW}{#4}% +\setlength{\@ff@staticH}{#3}% +\setlength{\columnheight}{#5}% +\addtolength{\columnheight}{-\@ff@staticH}% +\addtolength{\columnheight}{-\vcolumnsep}% +\ifffvadjust\adjustheight{\columnheight}\fi% +\newframe[#1]{#2}{\@ff@staticW}{\@ff@staticH}{#6}{#7}% +\setlength{\@ff@tmp@y}{#5}% +\addtolength{\@ff@tmp@y}{-\columnheight}% +\addtolength{\@ff@tmp@y}{#7}% +\setlength{\columnwidth}{\@ff@staticW}% +\addtolength{\columnwidth}{-\columnsep}% +\divide\columnwidth by 2\relax +\setlength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\addtolength{\@ff@tmp@x}{#6}% +\newflowframe[#1]{\columnwidth}{\columnheight}{#6}{\@ff@tmp@y}% +\setflowframe{\c@maxflow}{margin=left}% +\newflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{\@ff@tmp@y}% +\setflowframe{\c@maxflow}{margin=right}% +} +\@onlypreamble{\twocolumnbottominarea} +\newcommand*{\twocolumnSbottominarea}[6][all]{% +\twocolumnbottominarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} +\newcommand*{\twocolumnDbottominarea}[6][all]{% +\twocolumnbottominarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} +\newcommand*{\Ncolumnbottom}[4][all]{% +\Ncolumnbottominarea[#1]{#2}{#3}{#4}{\textwidth}{\textheight}{0pt}{0pt}} +\@onlypreamble{\Ncolumnbottom} +\newcommand*{\NcolumnSbottom}[3][all]{% +\Ncolumnbottom[#1]{static}{#2}{#3}} +\newcommand*{\NcolumnDbottom}[3][all]{% +\Ncolumnbottom[#1]{dynamic}{#2}{#3}} +\newcommand*{\Ncolumnbottominarea}[8][all]{% +\ifnum#3>2\relax + \@Ncolumnbottominarea[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}% +\else + \ifcase#3\relax + \PackageError{flowfram}{% + You have requested 0 flowframes!}{% + It does not make much sense to ask to create 0 flow frames} + \or + \onecolumnbottominarea[#1]{#2}{#4}{#5}{#6}{#7}{#8}% + \or + \twocolumnbottominarea[#1]{#2}{#4}{#5}{#6}{#7}{#8}% + \else + \PackageError{flowfram}{% + Can't create a negative number of flow frames!}{% + You have asked for \number#3 \space flow frames + which really doesn't make sense}% + \fi +\fi +} +\@onlypreamble{\Ncolumnbottominarea} +\newcommand*{\@NcolumnSbottominarea}[8][all]{% +\setlength{\@ff@staticH}{#4}% +\setlength{\columnheight}{#6}% +\addtolength{\columnheight}{-\@ff@staticH}% +\addtolength{\columnheight}{-\vcolumnsep}% +\ifffvadjust\adjustheight{\columnheight}\fi +\newframe[#1]{#2}{#5}{\@ff@staticH}{#7}{#8}% +\setlength{\@ff@tmp@y}{#6}% +\addtolength{\@ff@tmp@y}{-\columnheight}% +\addtolength{\@ff@tmp@y}{#8}% +\@colN=#3\relax +\advance\@colN by -1\relax +\setlength{\columnwidth}{#5}% +\addtolength{\columnwidth}{-\@colN\columnsep}% +\divide\columnwidth by #3\relax +\setlength{\@ff@tmp@x}{#7}% +\@colN=0\relax +\loop +\advance\@colN by 1\relax +\newflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{\@ff@tmp@y}% +\addtolength{\@ff@tmp@x}{\columnwidth}% +\addtolength{\@ff@tmp@x}{\columnsep}% +\ifnum\@colN<#3 +\repeat +} +\newcommand*{\NcolumnSbottominarea}[1][all]{% +\Ncolumnbottominarea[#1]{static}} +\newcommand*{\NcolumnDbottominarea}[1][all]{% +\Ncolumnbottominarea[#1]{dynamic}} +\newcount\@ff@adjh +\newcommand*{\adjustheight}[1]{% +\@ff@adjh=#1\relax +\divide\@ff@adjh by \baselineskip\relax +#1=\baselineskip\relax +\multiply#1 by \@ff@adjh\relax +} +\newcommand*{\adjustcolsep}{% +\multiply\columnsep by 2\relax +\addtolength{\columnsep}{\marginparwidth}} +\newlength\@ff@staticW +\newcommand*{\vtwotone}[1][all]{% +\def\ff@pages{#1}\@vtwotone} + +\newcommand*{\@vtwotone}[1][0pt]{\@@vtwotonebottom{#1}{\paperheight}} +\newcommand*{\@@vtwotonebottom}[8]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@x}{#1}% +\addtolength{\@ff@tmp@x@even}{#1}% +\@nextvband{\ff@pages}{#2}{#3}{#4}{#5}% +\@nextvband{\ff@pages}{#2}{#6}{#7}{#8}% +} + +\@onlypreamble{\vtwotone} +\newcommand*{\vtwotonebottom}[1][all]{% +\def\ff@pages{#1}\@vtwotonebottom} + +\@onlypreamble{\vtwotonebottom} + +\newcommand*{\@vtwotonebottom}[2][0pt]{\@@vtwotonebottom{#1}{#2}} +\newcommand*{\vtwotonetop}[1][all]{% +\def\ff@pages{#1}\@vtwotonetop} + +\newcommand*{\@vtwotonetop}[2][0pt]{\@@vtwotonetop{#1}{#2}} + +\newcommand*{\@@vtwotonetop}[8]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computetopedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{-#2}% +\addtolength{\@ff@tmp@x}{#1}% +\addtolength{\@ff@tmp@x@even}{#1}% +\@nextvband{\ff@pages}{#2}{#3}{#4}{#5}% +\@nextvband{\ff@pages}{#2}{#6}{#7}{#8}% +} +\newcommand*{\@nextvband}[5]{% +\setlength{\@ff@staticW}{#3}% +\ifthenelse{\equal{#5}{}}{% +\newstaticframe[#1]{\@ff@staticW}{#2}{\@ff@tmp@x}{\@ff@tmp@y}}% +{\newstaticframe[#1]{\@ff@staticW}{#2}{\@ff@tmp@x}{\@ff@tmp@y}[#5]}% +\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@x}{\@ff@staticW}% +\addtolength{\@ff@tmp@x@even}{\@ff@staticW}% +} +\newcount\@thisstrip +\newcommand*{\vNtone}[1][all]{% +\def\ff@pages{#1}\@vNtone} +\newcommand*{\@vNtone}[2][0pt]{% +\@@vNtone{#1}{#2}{\paperheight}} +\newcommand*{\@@vNtone}[3]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@x}{#1}% +\addtolength{\@ff@tmp@x@even}{#1}% +\@thisstrip=#2\relax +\setlength{\@ff@staticH}{#3}% +\@nextvNband% +} +\newcommand*{\@nextvNband}{% +\ifnum\@thisstrip>0\relax + \let\flf@next\@@nextvNband +\else + \let\flf@next\relax +\fi +\advance\@thisstrip by -1\relax +\flf@next} +\newcommand*{\@@nextvNband}[3]{% +\@nextvband{\ff@pages}{\@ff@staticH}{#1}{#2}{#3}\@nextvNband} + +\@onlypreamble{\vNtone} +\newcommand*{\vNtonebottom}[1][all]{% +\def\ff@pages{#1}\@vNtonebottom} +\@onlypreamble{\vNtonebottom} +\newcommand*{\@vNtonebottom}[3][0pt]{% +\@@vNtone{#1}{#2}{#3}} +\newcommand*{\vNtonetop}[1][all]{% +\def\ff@pages{#1}\@vNtonetop} +\@onlypreamble{\vNtonetop} +\newcommand*{\@vNtonetop}[3][0pt]{% +\@@vNtonetop{#1}{#2}{#3}} +\newcommand*{\@@vNtonetop}[3]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computetopedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{-#3}% +\addtolength{\@ff@tmp@x}{#1}% +\addtolength{\@ff@tmp@x@even}{#1}% +\@thisstrip=#2\relax +\setlength{\@ff@staticH}{#3}% +\@nextvNband% +} +\newcommand*{\htwotone}[1][all]{% +\def\ff@pages{#1}\@htwotone} +\newcommand*{\@htwotone}[1][0pt]{\@@htwotoneleft{#1}{\paperwidth}} +\newcommand*{\@@htwotoneleft}[8]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#1}% +\@nexthband{\ff@pages}{#2}{#3}{#4}{#5}% +\@nexthband{\ff@pages}{#2}{#6}{#7}{#8}% +} + +\@onlypreamble{\htwotone} +\newcommand*{\htwotoneleft}[1][all]{% +\def\ff@pages{#1}\@htwotoneleft} +\@onlypreamble{\htwotoneleft} +\newcommand*{\@htwotoneleft}[2][0pt]{\@@htwotoneleft{#1}{#2}} +\newcommand*{\htwotoneright}[1][all]{% +\def\ff@pages{#1}\@htwotoneright} +\@onlypreamble{\htwotoneright} +\newcommand*{\@htwotoneright}[2][0pt]{\@@htwotoneright{#1}{#2}} +\newcommand*{\@@htwotoneright}[8]{% +\computerightedgeodd{\@ff@tmp@x}% +\if@twoside + \computerightedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#1}% +\addtolength{\@ff@tmp@x}{-#2}% +\addtolength{\@ff@tmp@x@even}{-#2}% +\@nexthband{\ff@pages}{#2}{#3}{#4}{#5}% +\@nexthband{\ff@pages}{#2}{#6}{#7}{#8}% +} +\newcommand*{\hNtone}[1][all]{% +\def\ff@pages{#1}\@hNtone} +\@onlypreamble{\hNtone} +\newcommand*{\@hNtone}[2][0pt]{% +\@@hNtone{#1}{#2}{\paperwidth}} +\newcommand*{\@@hNtone}[3]{% +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#1}% +\@thisstrip=#2\relax +\setlength{\@ff@staticW}{#3}% +\@nexthNband% +} +\newcommand*{\hNtoneleft}[1][all]{% +\def\ff@pages{#1}\@hNtoneleft} +\@onlypreamble{\hNtoneleft} +\newcommand*{\@hNtoneleft}[3][0pt]{% +\@@hNtone{#1}{#2}{#3}} +\newcommand*{\hNtoneright}[1][all]{% +\def\ff@pages{#1}\@hNtoneright} +\@onlypreamble{\hNtoneright} +\newcommand*{\@hNtoneright}[3][0pt]{% +\@@hNtoneright{#1}{#2}{#3}} +\newcommand*{\@@hNtoneright}[3]{% +\computerightedgeodd{\@ff@tmp@x}% +\if@twoside + \computerightedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\addtolength{\@ff@tmp@y}{#1}% +\addtolength{\@ff@tmp@x}{-#3}% +\addtolength{\@ff@tmp@x@even}{-#3}% +\@thisstrip=#2\relax +\setlength{\@ff@staticW}{#3}% +\@nexthNband% +} +\newcommand*{\@nexthband}[5]{% +\setlength{\@ff@staticH}{#3}% +\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}% +\@setframecol#4\end{\c@maxstatic}{backcol}{sf}% +\addtolength{\@ff@tmp@y}{\@ff@staticH}% +} +\newcommand*{\@nexthNband}{% +\ifnum\@thisstrip>0\relax + \let\flf@next\@@nexthNband% +\else + \let\flf@next\relax% +\fi +\advance\@thisstrip by -1\relax +\flf@next} +\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 + first static frame to be defined. All previously defined + static frames may be obscured.}% +\fi +\computeleftedgeodd{\@ff@tmp@x}% +\if@twoside + \computeleftedgeeven{\@ff@tmp@x@even}% +\else + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% +\fi +\computebottomedge{\@ff@tmp@y}% +\newstaticframe[#1]{\paperwidth}{\paperheight}{\@ff@tmp@x}% +{\@ff@tmp@y}% +\expandafter\global\expandafter +\setlength\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname +{\@ff@tmp@x@even}} +\newlength\ffcolumnseprule +\setlength{\ffcolumnseprule}{2pt} +\newcommand*{\ffruledeclarations}{} +\newcommand*{\insertvrule}{\@ifstar\@sinsertvrule\@insertvrule} +\newcommand*{\@insertvrule}[1][0pt]{% +\@ifnextchar[{\@@insertvrule[#1]}{\@@insertvrule[#1][0pt]}} +\newlength\@ff@left@x +\newlength\@ff@left@y +\newlength\@ff@left@evenx +\newlength\@ff@left@eveny +\newlength\@ff@left@width +\newlength\@ff@left@height +\def\@@insertvrule[#1][#2]#3#4#5#6{% +\ifthenelse{\equal{#3}{flow}}{% +\def\@ff@type@i{1}}{\ifthenelse{\equal{#3}{static}}{% +\def\@ff@type@i{2}}{\ifthenelse{\equal{#3}{dynamic}}{% +\def\@ff@type@i{3}}{\PackageError{flowfram}{Unknown frame +type '#3'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\ifthenelse{\equal{#5}{flow}}{% +\def\@ff@type@ii{1}}{\ifthenelse{\equal{#5}{static}}{% +\def\@ff@type@ii{2}}{\ifthenelse{\equal{#5}{dynamic}}{% +\def\@ff@type@ii{3}}{\PackageError{flowfram}{Unknown frame +type '#5'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\@@insert@vrule{#1}{#2}{\@ff@type@i}{#4}{\@ff@type@ii}{#6}% +} +\newcommand*{\@@insert@vrule}[6]{% +\@ff@getdim{#3}{#4}% +\setlength{\@ff@left@x}{\ffareax}% +\setlength{\@ff@left@y}{\ffareay}% +\setlength{\@ff@left@width}{\ffareawidth}% +\setlength{\@ff@left@height}{\ffareaheight}% +\@ff@getdim{#5}{#6}% +\ifnum\@ff@left@x>\ffareax\relax + \@ff@swaplen{\@ff@left@x}{\ffareax}% + \@ff@swaplen{\@ff@left@y}{\ffareax}% + \@ff@swaplen{\@ff@left@evenx}{\ffareaevenx}% + \@ff@swaplen{\@ff@left@eveny}{\ffareaevenx}% + \@ff@swaplen{\@ff@left@width}{\ffareawidth}% + \@ff@swaplen{\@ff@left@height}{\ffareaheight}% +\fi +\setlength{\@ff@tmp@x}{\@ff@left@x} +\addtolength{\@ff@tmp@x}{\@ff@left@width}% +\setlength{\@ff@staticW}{\ffareax}% +\addtolength{\@ff@staticW}{-\@ff@tmp@x}% +\setlength{\@ff@staticH}{\@ff@left@y}% +\addtolength{\@ff@staticH}{\@ff@left@height}% +\setlength{\@ff@tmp@y}{\ffareay}% +\addtolength{\@ff@tmp@y}{\ffareaheight}% +\ifnum\@ff@tmp@y>\@ff@staticH + \setlength{\@ff@staticH}{\@ff@tmp@y}% +\fi +\ifnum\@ff@left@y<\ffareay\relax + \setlength{\@ff@tmp@y}{\@ff@left@y}% +\else + \setlength{\@ff@tmp@y}{\ffareay}% +\fi +\addtolength{\@ff@staticH}{-\@ff@tmp@y}% +\newstaticframe{\@ff@staticW}{\@ff@staticH}% +{\@ff@tmp@x}{\@ff@tmp@y}% +\addtolength{\@ff@staticH}{#1}% +\addtolength{\@ff@staticH}{#2}% +\setstaticcontents{\c@maxstatic}{% +\ffruledeclarations +\ffvrule{#2}{\ffcolumnseprule}{\@ff@staticH}}% +\ifcase#3\relax +\or \edef\@ff@pages{\csname @ff@pages@\romannumeral#4\endcsname}% +\or \edef\@ff@pages{\csname @sf@pages@\romannumeral#4\endcsname}% +\or \edef\@ff@pages{\csname @df@pages@\romannumeral#4\endcsname}% +\fi +\setstaticframe{\c@maxstatic}{pages=\@ff@pages}% +\addtolength{\@ff@tmp@x}{\@ff@left@evenx}% +\addtolength{\@ff@tmp@x}{-\@ff@left@x}% +\addtolength{\@ff@tmp@y}{\@ff@left@eveny}% +\addtolength{\@ff@tmp@y}{-\@ff@left@y}% +\setstaticframe{\c@maxstatic}{evenx=\@ff@tmp@x,eveny=\@ff@tmp@y}% +} +\newcommand*{\ffvrule}[3]{% +\hfill \rule[-#1]{#2}{#3}\hfill\mbox{}} +\newcommand*{\@sinsertvrule}[1][0pt]{% +\@ifnextchar[{\@@sinsertvrule[#1]}{\@@sinsertvrule[#1][0pt]}} +\def\@@sinsertvrule[#1][#2]#3#4#5#6{% +\ifthenelse{\equal{#3}{flow}}{% +\def\@ff@type@i{1}\@flowframeid{#4}\@ff@tmpN=\ff@id}{% +\ifthenelse{\equal{#3}{static}}{% +\def\@ff@type@i{2}\@staticframeid{#4}\@ff@tmpN=\ff@id}{% +\ifthenelse{\equal{#3}{dynamic}}{% +\def\@ff@type@i{3}\@dynamicframeid{#4}\@ff@tmpN=\ff@id}{% +\PackageError{flowfram}{Unknown frame +type '#3'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\ifthenelse{\equal{#5}{flow}}{% +\def\@ff@type@ii{1}\@flowframeid{#6}}{% +\ifthenelse{\equal{#5}{static}}{% +\def\@ff@type@ii{2}\@staticframeid{#6}}{% +\ifthenelse{\equal{#5}{dynamic}}{% +\def\@ff@type@ii{3}\@dynamicframeid{#6}}{% +\PackageError{flowfram}{Unknown frame +type '#5'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\@@insert@vrule{#1}{#2}{\@ff@type@i}{\@ff@tmpN}% +{\@ff@type@ii}{\ff@id}% +} +\newcommand*{\inserthrule}{\@ifstar\@sinserthrule\@inserthrule} +\newcommand*{\@inserthrule}[1][0pt]{% +\@ifnextchar[{\@@inserthrule[#1]}{\@@inserthrule[#1][0pt]}} +\def\@@inserthrule[#1][#2]#3#4#5#6{% +\ifthenelse{\equal{#3}{flow}}{% +\def\@ff@type@i{1}}{\ifthenelse{\equal{#3}{static}}{% +\def\@ff@type@i{2}}{\ifthenelse{\equal{#3}{dynamic}}{% +\def\@ff@type@i{3}}{\PackageError{flowfram}{Unknown frame +type '#3'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\ifthenelse{\equal{#5}{flow}}{% +\def\@ff@type@ii{1}}{\ifthenelse{\equal{#5}{static}}{% +\def\@ff@type@ii{2}}{\ifthenelse{\equal{#5}{dynamic}}{% +\def\@ff@type@ii{3}}{\PackageError{flowfram}{Unknown frame +type '#5'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\@@insert@hrule{#1}{#2}{\@ff@type@i}{#4}{\@ff@type@ii}{#6}% +} +\newcommand*{\@@insert@hrule}[6]{% +\@ff@getdim{#3}{#4}% +\setlength{\@ff@left@x}{\ffareax}% +\setlength{\@ff@left@y}{\ffareay}% +\setlength{\@ff@left@width}{\ffareawidth}% +\setlength{\@ff@left@height}{\ffareaheight}% +\@ff@getdim{#5}{#6}% +\ifnum\@ff@left@y>\ffareay\relax + \@ff@swaplen{\@ff@left@x}{\ffareax}% + \@ff@swaplen{\@ff@left@y}{\ffareay}% + \@ff@swaplen{\@ff@left@width}{\ffareawidth}% + \@ff@swaplen{\@ff@left@height}{\ffareaheight}% +\fi +\setlength{\@ff@tmp@y}{\@ff@left@y}% +\addtolength{\@ff@tmp@y}{\@ff@left@height}% +\setlength{\@ff@staticH}{\ffareay}% +\addtolength{\@ff@staticH}{-\@ff@tmp@y}% +\setlength{\@ff@staticW}{\@ff@left@x}% +\addtolength{\@ff@staticW}{\@ff@left@width}% +\setlength{\@ff@tmp@x}{\ffareax}% +\addtolength{\@ff@tmp@x}{\ffareawidth}% +\ifnum\@ff@tmp@x>\@ff@staticW\relax + \setlength{\@ff@staticW}{\@ff@tmp@x}% +\fi +\ifnum\@ff@left@x<\ffareax\relax + \setlength{\@ff@tmp@x}{\@ff@left@x}% +\else + \setlength{\@ff@tmp@x}{\ffareax}% +\fi +\addtolength{\@ff@staticW}{-\@ff@tmp@x}% +\newstaticframe{\@ff@staticW}{\@ff@staticH}% +{\@ff@tmp@x}{\@ff@tmp@y}% +\addtolength{\@ff@staticW}{#1}% +\addtolength{\@ff@staticW}{#2}% +\setstaticcontents{\c@maxstatic}{% +\ffruledeclarations +\ffhrule{#1}{\@ff@staticW}{\ffcolumnseprule}}% +\ifcase#3\relax +\or \edef\@ff@pages{\csname @ff@pages@\romannumeral#4\endcsname}% +\or \edef\@ff@pages{\csname @sf@pages@\romannumeral#4\endcsname}% +\or \edef\@ff@pages{\csname @df@pages@\romannumeral#4\endcsname}% +\fi +\setstaticframe{\c@maxstatic}{pages=\@ff@pages}% +\addtolength{\@ff@tmp@x}{\@ff@left@evenx}% +\addtolength{\@ff@tmp@x}{-\@ff@left@x}% +\addtolength{\@ff@tmp@y}{\@ff@left@eveny}% +\addtolength{\@ff@tmp@y}{-\@ff@left@y}% +\setstaticframe{\c@maxstatic}{evenx=\@ff@tmp@x,eveny=\@ff@tmp@y}% +} +\newcommand*{\ffhrule}[3]{% +\hspace*{-#1}\rule{#2}{#3}} +\newcommand*{\@sinserthrule}[1][0pt]{% +\@ifnextchar[{\@@sinserthrule[#1]}{\@@sinserthrule[#1][0pt]}} +\def\@@sinserthrule[#1][#2]#3#4#5#6{% +\ifthenelse{\equal{#3}{flow}}{% +\def\@ff@type@i{1}\@flowframeid{#4}\@ff@tmpN=\ff@id}{% +\ifthenelse{\equal{#3}{static}}{% +\def\@ff@type@i{2}\@staticframeid{#4}\@ff@tmpN=\ff@id}{% +\ifthenelse{\equal{#3}{dynamic}}{% +\def\@ff@type@i{3}\@dynamicframeid{#4}\@ff@tmpN=\ff@id}{% +\PackageError{flowfram}{Unknown frame +type '#3'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\ifthenelse{\equal{#5}{flow}}{% +\def\@ff@type@ii{1}\@flowframeid{#6}}{% +\ifthenelse{\equal{#5}{static}}{% +\def\@ff@type@ii{2}\@staticframeid{#6}}{% +\ifthenelse{\equal{#5}{dynamic}}{% +\def\@ff@type@ii{3}\@dynamicframeid{#6}}{% +\PackageError{flowfram}{Unknown frame +type '#5'}{Available frame types are: 'flow', 'static' +or 'dynamic'}}}}% +\@@insert@hrule{#1}{#2}{\@ff@type@i}{\@ff@tmpN}% +{\@ff@type@ii}{\ff@id}% +} +\newcommand*{\dfchaphead}{% +\@ifstar\@sdynamicchap\@dynamicchap} +\newcommand{\DFchapterstyle}[1]{#1} +\newcommand{\DFschapterstyle}[1]{#1} +\newcommand{\@dynamicchap}[1]{% +\@ifundefined{chapter}{\PackageError{flowfram}{Chapters aren't +defined}{The document +class you are using does not define chapters}}{% +\let\@ff@OLDmakechapterhead\@makechapterhead +\let\@ff@OLDmakeschapterhead\@makeschapterhead +\renewcommand{\DFchapterstyle}[1]{\@ff@OLDmakechapterhead{##1}}% +\renewcommand{\DFschapterstyle}[1]{\@ff@OLDmakeschapterhead{##1}}% +\xdef\@makechapterhead##1{% +\noexpand\@setdynamiccontents{\number#1}{% +\noexpand\DFchapterstyle{##1}}}% +\xdef\@makeschapterhead##1{% +\noexpand\@setdynamiccontents{\number#1}{% +\noexpand\DFschapterstyle{##1}}}% +}} +\newcommand{\@sdynamicchap}[1]{% +\@dynamicframeid{#1}\@dynamicchap{\ff@id}} +\newcounter{maxthumbtabs} +\@ifundefined{chapter}{% +\newcommand*{\defaultthumbtabtype}{section}}{ +\newcommand*{\defaultthumbtabtype}{chapter} +} +\newcommand*{\@ttb@type}{\defaultthumbtabtype} +\newcommand*{\makethumbtabs}[2][0pt]{% +\@ifnextchar[{\@makethumbtabs[#1]{#2}}{% +\@makethumbtabs[#1]{#2}[\defaultthumbtabtype]}% +} +\def\@makethumbtabs[#1]#2[#3]{% +\@ifundefined{#3}{\PackageError{flowfram}{% +Unknown section type '#3'}{}}{% +\renewcommand{\@ttb@type}{#3}% +\ifthenelse{\equal{#3}{chapter}}{\@makethumbchapter}{% +\ifthenelse{\equal{#3}{part}}{\@makethumbpart}{% +\@makethumbsection{#3}}}} +\@starttoc{ttb}% +\@dothumbtabs{#1}{#2}% +} +\newcommand{\@makethumbchapter}{ +\let\@ttb@old@chapter\@chapter +\def\@chapter[##1]##2{% +\@ttb@old@chapter[##1]{##2}% +\addtocontents{ttb}{\protect\thumbtab + {\thepage}{\thechapter}{##1}{chapter.\thechapter}}% +\@afterheading +}} +\newcommand{\@makethumbpart}{ +\let\@ttb@old@part\@part +\@ifundefined{@endpart}{% +\def\@part[##1]##2{\@ttb@old@part[##1]{##2}% +\addtocontents{ttb}{\protect\thumbtab + {\thepage}{\thepart}{##1}{part.\thepage}}% +\@afterheading}}{% +\let\@ttb@old@endpart\@endpart +\def\@part[##1]##2{% +\def\@parttitle{##1}% +\@ttb@old@part[##1]{##2}% +}% +\def\@endpart{% +\addtocontents{ttb}{% +\protect\thumbtab{\thepage}% +{\thepart}{\@parttitle}{part.\thepage}}% +\@ttb@old@endpart +}}} +\newcommand*{\@makethumbsection}[1]{% +\let\@ttb@old@sect=\@sect +\def\@sect##1##2##3##4##5##6[##7]##8{% +\@ttb@old@sect{##1}{##2}{##3}{##4}{##5}{##6}[##7]{##8}% +\ifthenelse{\equal{##1}{#1}}{% +\addtocontents{ttb}{% +\protect\thumbtab{\thepage}{\csname the#1\endcsname}% +{##7}{#1.\csname the#1\endcsname}}% +\@afterheading}{}% +}} +\newcommand{\thumbtab}[4]{% +\stepcounter{maxthumbtabs}% +\expandafter +\gdef\csname thumbtab@pages@\romannumeral\c@maxthumbtabs\endcsname +{#1}% +\expandafter +\gdef\csname thumbtab@num@\romannumeral\c@maxthumbtabs\endcsname +{#2}% +\expandafter +\gdef\csname thumbtab@title@\romannumeral\c@maxthumbtabs\endcsname +{#3}% +\expandafter +\gdef\csname thumbtab@link@\romannumeral\c@maxthumbtabs\endcsname +{#4}} +\newcommand*{\@dothumbtabs}[2]{% +\@colN=0\relax +\whiledo{\@colN<\c@maxthumbtabs}{% + \advance\@colN by 1\relax + \edef\ff@pages{% + \csname thumbtab@pages@\romannumeral\@colN\endcsname}% + \ifnum\@colN=\c@maxthumbtabs + \expandafter + \xdef\csname thumbtab@pages@\romannumeral\@colN\endcsname{% + \ff@pages,>\ff@pages}% + \else + \advance\@colN by 1\relax + \edef\ff@endpage{% + \csname thumbtab@pages@\romannumeral\@colN\endcsname}% + \advance\@colN by -1\relax + \@ff@tmpN=\ff@endpage\relax + \advance\@ff@tmpN by -1\relax + \ifnum\@ff@tmpN>\ff@pages + \expandafter + \xdef\csname thumbtab@pages@\romannumeral\@colN\endcsname{% + \ff@pages-\number\@ff@tmpN}% + \fi + \fi +}% +\@@dothumbtabs{#1}{#2}% +} +\newlength{\thumbtabwidth} +\setlength{\thumbtabwidth}{1cm} +\@ifundefined{hyperlink}{% +\newcommand{\thumbtabindexformat}[3]{% +\thumbtabformat{#2}{#3}}}{% +\newcommand{\thumbtabindexformat}[3]{% +\hyperlink{#1}{\thumbtabformat{#2}{#3}}} +} +\newcommand{\thumbtabformat}[2]{% +\if@ttb@rotate +\rotatebox{-90}{\parbox[c][\thumbtabwidth]{#2}{% +\centering#1}}% +\else +\parbox[c][#2]{\thumbtabwidth}{% +\centering\@ttb@stack{#1}}% +\fi} +\def\@flf@subsp#1 #2{% +\expandafter\flf@ta\expandafter{\@flf@subsptext}% +\flf@tb{#1}% +\edef\@flf@subsptext{\the\flf@ta\the\flf@tb}% +\def\@flf@tmp{#2}% +\ifx\@flf@tmp\@nnil + \let\@flf@donextsubsp=\@gobble +\else + \expandafter\flf@ta\expandafter{\@flf@subsptext}% + \edef\@flf@subsptext{\the\flf@ta\noexpand\space}% + \let\@flf@donextsubsp=\@flf@subsp +\fi +\@flf@donextsubsp{#2}% +} +\newcommand{\@ttb@stack}[1]{% +\def\@flf@subsptext{}% +\expandafter\@flf@subsp#1 \@nil\relax +\begin{tabular}{l}% +\expandafter\@@ttb@stack\@flf@subsptext\@nil\relax +\end{tabular}} +\def\@@ttb@stack#1#2{% +\def\@flf@tmp{#1}% +\ifx\@flf@tmp\@nnil + \let\flf@next\relax +\else + #1\\% + \def\@flf@tmp{#2}% + \ifx\@nnil#2\relax + \let\flf@next\@gobble + \else + \let\flf@next\@@ttb@stack + \fi +\fi +\flf@next{#2}} +\newcount\@greyscale +\newcommand{\@@dothumbtabs}[2]{% +\setlength{\@ff@tmp@y}{\textheight}% +\addtolength{\@ff@tmp@y}{-#2}% +\addtolength{\@ff@tmp@y}{-#1}% +\computerightedgeodd{\@ff@tmp@x}% +\addtolength{\@ff@tmp@x}{-\thumbtabwidth}% +\computeleftedgeeven{\@ff@tmp@x@even}% +\@ff@tmpN=0\relax +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% + \advance\@ff@tmpN by 1\relax + \@greyscale=\@ff@tmpN\relax + \multiply\@greyscale by 60\relax + \divide\@greyscale by \c@maxthumbtabs + \advance\@greyscale by 25\relax + \edef\@ff@greyscale{0.\number\@greyscale}% + \newdynamicframe[none]{\thumbtabwidth}{#2}% + {\@ff@tmp@x}{\@ff@tmp@y}[thumbtab\number\@ff@tmpN]% + \expandafter\global\expandafter + \setlength\csname @df@\romannumeral\c@maxdynamic @evenx\endcsname + {\@ff@tmp@x@even}% + \ifthenelse{\boolean{@ttb@title}\and\boolean{@ttb@num}}{% + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabformat{% + \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname\ + \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + }{% + \if@ttb@title + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabformat{% + \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + \fi + \if@ttb@num + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabformat{% + \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + \fi + }% + \expandafter + \xdef\csname @df@backcol@\romannumeral\c@maxdynamic\endcsname + {[gray]{\@ff@greyscale}} + \newdynamicframe[none]{\thumbtabwidth}{#2}% + {\@ff@tmp@x}{\@ff@tmp@y}[thumbtabindex\number\@ff@tmpN]% + \expandafter\global\expandafter + \setlength\csname @df@\romannumeral\c@maxdynamic @evenx\endcsname + {\@ff@tmp@x@even}% + \expandafter + \ifthenelse{\boolean{@ttb@title}\and\boolean{@ttb@num}}{% + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabindexformat{% + \csname thumbtab@link@\romannumeral\@ff@tmpN\endcsname}{% + \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname\ + \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + }{% + \if@ttb@title + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabindexformat{% + \csname thumbtab@link@\romannumeral\@ff@tmpN\endcsname}{% + \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + \fi + \if@ttb@num + \expandafter + \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{% + \noexpand\thumbtabindexformat{% + \csname thumbtab@link@\romannumeral\@ff@tmpN\endcsname}{% + \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname + }{#2}}% + \fi + }% + \expandafter + \xdef\csname @df@backcol@\romannumeral\c@maxdynamic\endcsname + {[gray]{\@ff@greyscale}} + \addtolength{\@ff@tmp@y}{-#2}% +}% +}% +\newcommand*{\enablethumbtabs}{% +\ifnum\c@maxthumbtabs>0 +\@ff@tmpN=0\relax +\@dynamicframeid{thumbtab1}% +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% +\advance\@ff@tmpN by 1\relax +\edef\@ff@pages{\csname thumbtab@pages@\romannumeral\@ff@tmpN\endcsname}% +\@@setdynamicframe{\ff@id}{pages=\@ff@pages}% +\advance\ff@id by 2\relax +}% +\else\PackageWarning{flowfram}{No thumb tabs defined}\fi} +\newcommand*{\disablethumbtabs}{% +\ifnum\c@maxthumbtabs>0 +\@ff@tmpN=0\relax +\@dynamicframeid{thumbtab1}% +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% +\advance\@ff@tmpN by 1\relax +\expandafter\xdef\csname @df@pages@\romannumeral\ff@id\endcsname +{none}% +\advance\ff@id by 1\relax +\expandafter\xdef\csname @df@pages@\romannumeral\ff@id\endcsname +{none}% +\advance\ff@id by 1\relax +}\fi} +\newcommand*{\thumbtabindex}{% +\ifnum\c@maxthumbtabs>0\relax +\@ff@tmpN=0\relax +\@dynamicframeid{thumbtabindex1}% +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% +\advance\@ff@tmpN by 1\relax +\expandafter +\xdef\csname @df@pages@\romannumeral\ff@id\endcsname{\c@page}% +\edef\@ff@doafter{% +\noexpand\afterpage{% +\noexpand\setdynamicframe{\number\ff@id}{pages=none}}} +\@ff@doafter +\advance\ff@id by 2\relax +}\fi} +\newcommand{\setthumbtab}[2]{% +\ifthenelse{\equal{#1}{all}}{% +\@ff@tmpN=0\relax +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% +\advance\@ff@tmpN by 1\relax +\@setthumbtab{\@ff@tmpN}{#2}}}{% +\@for\@ttb@id:=#1\do{\@setthumbtab{\@ttb@id}{#2}}}} +\newcommand{\@setthumbtab}[2]{% +\ifthenelse{\(\c@maxthumbtabs<#1\) \or \(#1<1\)}{% +\PackageWarning{flowfram}{Can't find thumbtab number '#1', +ttb file may not be up-to-date}}{% +\@dynamicframeid{thumbtab\number#1}% +\@@setdynamicframe{\ff@id}{#2}% +\@dynamicframeid{thumbtabindex\number#1}% +\@@setdynamicframe{\ff@id}{#2}}} +\newcommand{\setthumbtabindex}[2]{% +\ifthenelse{\equal{#1}{all}}{% +\@ff@tmpN=0\relax +\whiledo{\@ff@tmpN<\c@maxthumbtabs}{% +\advance\@ff@tmpN by 1\relax +\@setthumbtabindex{\@ff@tmpN}{#2}}}{% +\@for\@ttb@id:=#1\do{\@setthumbtabindex{\@ttb@id}{#2}}}} +\newcommand{\@setthumbtabindex}[2]{% +\ifthenelse{\(\c@maxthumbtabs<#1\) \or \(#1<1\)}{% +\PackageWarning{flowfram}{Can't find thumbtab number `\number#1', +ttb file may not be up-to-date}}{% +\@dynamicframeid{thumbtabindex\number#1}% +\@@setdynamicframe{\ff@id}{#2}}} +\newcommand*{\tocandthumbtabindex}{% +\aligntoctrue +\tableofcontents +\thumbtabindex +\aligntocfalse +} +\newcommand*{\@ttb@minitoctype}{\@ttb@type} +\let\@ttb@old@starttoc\@starttoc +\newif\if@storetoc +\@storetocfalse +\renewcommand*{\@starttoc}[1]{% +\if@storetoc + \@ttb@storetoc{#1}% +\else + \@ttb@old@starttoc{#1}% +\fi} +\newcommand*{\@ttb@storetoc}[1]{% +\begingroup +\makeatletter +\@storefileconts{\jobname.#1}% +\if@filesw + \expandafter\newwrite\csname tf@#1\endcsname + \immediate\openout\csname tf@#1\endcsname\jobname.#1\relax +\fi +\@nobreakfalse +\endgroup} +\newcommand*{\@storefileconts}[1]{\IfFileExists{#1}{% +\@@storefileconts\@filef@und}{% +\PackageInfo{flowfram}{No file #1.}}} +\newcount\c@maxtocunits +\newcount\c@maxminitoc +\newcommand{\@@storefileconts}[1]{% +\@ifundefined{\@ttb@minitoctype}{\@ttb@minitoclevel=6\relax}{% +\expandafter\@ttb@minitoclevel\expandafter + =\csname @ttb@\@ttb@minitoctype @level\endcsname}% +\newread\@ttb@toc +\openin\@ttb@toc=#1\relax +\c@maxtocunits=0\relax +\c@maxminitoc=0\relax +\whiledo{\not\boolean{eof}\@ttb@toc}{% +\read\@ttb@toc to\tocline +\@addtotoclist{\tocline}{\c@maxtocunits}% +}% +\closein\@ttb@toc} +\newif\if@contsline +\newcount\@ttb@level +\newcount\@ttb@minitoclevel + +\newcommand{\@addtotoclist}[2]{% +\expandafter\@checkcontentsline#1\end +\if@contsline +\expandafter\@gettype#1\end +\ifthenelse{\equal{\@ttb@contstype}{\@ttb@type}}{% +\global\advance#2 by 1\relax +}{% +}% +\fi +\@ifundefined{@toc@\romannumeral#2}{% +\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}{% + \@ttb@level=\csname @ttb@\@ttb@contstype @level\endcsname}% + \relax + \ifnum\@ttb@level=\@ttb@minitoclevel + \global\advance\c@maxminitoc by 1\relax + \expandafter + \gdef\csname @minitoc@\romannumeral\c@maxminitoc\endcsname{}% + \else + \ifnum\@ttb@level>\@ttb@minitoclevel + \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 +\fi +} +\def\@ttb@part@level{-1} +\def\@ttb@chapter@level{0} +\def\@ttb@section@level{1} +\def\@ttb@subsection@level{2} +\def\@ttb@subsubsection@level{3} +\def\@ttb@paragraph@level{4} +\def\@ttb@subparagraph@level{5} +\long\def\@checkcontentsline#1#2\end{% +\ifx#1\contentsline + \@contslinetrue +\else + \@contslinefalse +\fi} +\def\@gettype\contentsline#1#2\end{% +\def\@ttb@contstype{#1}} +\newif\ifaligntoc +\aligntocfalse + +\let\@ttb@old@tableofcontents\tableofcontents +\renewcommand{\tableofcontents}{% +\@storetoctrue +\@ttb@old@tableofcontents +\ifaligntoc + \@printalignedtoc +\else + \@printtoc +\fi +\@storetocfalse +\global\c@minitoc=0\relax} +\newlength\beforeminitocskip +\setlength{\beforeminitocskip}{0pt} +\newlength\afterminitocskip +\setlength{\afterminitocskip}{\baselineskip} +\newcommand*{\dominitoc}[1]{% +\if@minitoc \@dominitoc{#1}\fi} +\newcommand*{\@dominitoc}[1]{\@@dominitoc{#1}} +\newcommand{\minitocstyle}[1]{\normalfont\normalsize\normalcolor +#1} +\newcommand*{\@@dominitoc}[1]{% +{\minitocstyle{% +\vskip\beforeminitocskip +\csname @minitoc@\romannumeral#1\endcsname}} +\vskip\afterminitocskip} +\newcommand*{\appenddfminitoc}{% +\renewcommand{\beforeminitocskip}{\baselineskip}% +\@ifstar\@sappendminitocdf\@appendminitocdf} +\newcommand*{\@sappendminitocdf}[1]{% +\renewcommand{\@dominitoc}[1]{% +\@sappenddynamic{#1}{\@@dominitoc{##1}}}} +\newcommand*{\@appendminitocdf}[1]{% +\renewcommand{\@dominitoc}[1]{% +\@appenddynamic{#1}{\@@dominitoc{##1}}}} +\newcommand*{\@printtoc}{% +\@colN=0\relax +\csname @toc@\romannumeral\@colN\endcsname +\whiledo{\@colN<\c@maxtocunits}{% +\advance\@colN by 1\relax +\csname @toc@\romannumeral\@colN\endcsname}} +\newcommand{\@printalignedtoc}{% +\@ff@tmpN=0\relax +\@ifundefined{@toc@\romannumeral\@ff@tmpN}{% +}{% +\csname @toc@\romannumeral\@ff@tmpN\endcsname +\par\noindent\hrulefill +}% +\whiledo{\@ff@tmpN<\c@maxtocunits}{% +\advance\@ff@tmpN by 1\relax +\ifnum\@ff@tmpN>\c@maxthumbtabs +\csname @toc@\romannumeral\@ff@tmpN\endcsname +\else +\@dynamicframeid{thumbtabindex\number\@ff@tmpN}% +\expandafter\expandafter\expandafter +\@ff@getstaticpos\csname @df@dim@\romannumeral\ff@id\endcsname +\vbox to \@ff@tmp@y{% +\noindent\parbox{\linewidth}{% +\csname @toc@\romannumeral\@ff@tmpN\endcsname}% +\vfill +\par\noindent\hrulefill +}% +\fi}} +\newcounter{minitoc} +\newif\if@minitoc +\@minitocfalse + +\newcommand*{\enableminitoc}[1][\@ttb@type]{% +\@minitoctrue +\setcounter{minitoc}{0}% +\@ifundefined{#1}{% +\PackageError{flowfram}{Sectioning type `#1' not defined}{}}{% +\renewcommand{\@ttb@minitoctype}{#1}% +\ifthenelse{\equal{#1}{chapter}}{\@makeminitocchapter}{% +\ifthenelse{\equal{#1}{part}}{\@makeminitocpart}{% +\@makeminitocsection{#1}}}}% +} +\@onlypreamble{\enableminitoc} +\newcommand{\@makeminitocchapter}{ +\let\@mtoc@old@chapter\@chapter +\def\@chapter[##1]##2{% +\@mtoc@old@chapter[##1]{##2}% +\stepcounter{minitoc}% +\dominitoc{\c@minitoc}% +\@afterheading +}} +\newcommand{\@makeminitocpart}{ +\@ifundefined{@endpart}{% +\let\@mtoc@old@part\@part +\def\@part[##1]##2{% +\@mtoc@old@part[##1]{##2}% +\stepcounter{minitoc}% +\dominitoc{\c@minitoc}% +\@afterheading +}}{% +\let\@mtoc@old@endpart\@endpart +\def\@endpart{% +\stepcounter{minitoc}% +\dominitoc{\c@minitoc}% +\@mtoc@old@endpart +}}} +\newcommand{\@makeminitocsection}[1]{% +\let\@mtoc@old@sect=\@sect +\def\@sect##1##2##3##4##5##6[##7]##8{% +\@mtoc@old@sect{##1}{##2}{##3}{##4}{##5}{##6}[##7]{##8}% +\ifthenelse{\equal{##1}{#1}}{% +\stepcounter{minitoc}% +\dominitoc{\c@minitoc}\@afterheading}{}% +}} +\endinput +%% +%% End of file `flowfram.sty'. diff --git a/Master/texmf-dist/doc/latex/flowfram/news.pdf b/Master/texmf-dist/doc/latex/flowfram/news.pdf Binary files differindex f1a3740b4b8..c3d0af301ee 100644 --- a/Master/texmf-dist/doc/latex/flowfram/news.pdf +++ b/Master/texmf-dist/doc/latex/flowfram/news.pdf diff --git a/Master/texmf-dist/doc/latex/flowfram/news.tex b/Master/texmf-dist/doc/latex/flowfram/news.tex index c958b3c5284..a8ff83b3922 100644 --- a/Master/texmf-dist/doc/latex/flowfram/news.tex +++ b/Master/texmf-dist/doc/latex/flowfram/news.tex @@ -148,7 +148,7 @@ 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 +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, diff --git a/Master/texmf-dist/doc/latex/flowfram/news2.pdf b/Master/texmf-dist/doc/latex/flowfram/news2.pdf Binary files differindex 0e8231046c7..a861bae1601 100644 --- a/Master/texmf-dist/doc/latex/flowfram/news2.pdf +++ b/Master/texmf-dist/doc/latex/flowfram/news2.pdf diff --git a/Master/texmf-dist/doc/latex/flowfram/news2.tex b/Master/texmf-dist/doc/latex/flowfram/news2.tex index aef7680ff5c..125d5d3cd58 100644 --- a/Master/texmf-dist/doc/latex/flowfram/news2.tex +++ b/Master/texmf-dist/doc/latex/flowfram/news2.tex @@ -162,7 +162,7 @@ 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 +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.'' diff --git a/Master/texmf-dist/doc/latex/flowfram/poster.pdf b/Master/texmf-dist/doc/latex/flowfram/poster.pdf Binary files differindex b7013ebfd58..d2af4baaae3 100644 --- a/Master/texmf-dist/doc/latex/flowfram/poster.pdf +++ b/Master/texmf-dist/doc/latex/flowfram/poster.pdf diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdf b/Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdf Binary files differnew file mode 100644 index 00000000000..7c9b9a491c6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdf diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex b/Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex new file mode 100644 index 00000000000..d0434139854 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex @@ -0,0 +1,362 @@ +\documentclass[a4paper]{report} + +\usepackage[landscape,margin=1in]{geometry} +\usepackage{color} +\usepackage{flowfram} +\usepackage[colorlinks]{hyperref} + +% Use sans-serif font as default font +\renewcommand{\familydefault}{cmss} + +% adjust \textheight so that it is an integer multiple of +% \baselineskip +\adjustheight{\textheight} + +% set up pagelayout. One column for title page +% two columns for the rest. +\onecolumninarea[1,2]{0.6\textwidth}{\textheight}{0.4\textwidth}{0pt} +\twocolumninarea[>2]{0.6\textwidth}{\textheight}{0.4\textwidth}{0pt} + +% Set up dynamic frame on the left. This is where +% the headings will go. + +\newdynamicframe{0.4\textwidth}{\textheight}{0pt}{0pt}[left] + +% put the chapter headings in this frame +\dfchaphead*{left} +% Modify the default style +\renewcommand{\DFchapterstyle}[1]{% +\raggedright\Huge\slshape\MakeUppercase{#1}\par} + +% Make static frames for background (only for page 1) +\vtwotone[1]{0.6\paperwidth}{[cmyk]{0.65,0.13,0,0}}{backleft}% +{0.4\paperwidth}{[cmyk]{0.94,0.54,0,0}}{backright} + +% Make a border along the top of each page +\vtwotonetop{1cm}{0.6\paperwidth}{[cmyk]{0.65,0.13,0,0}}{topleft}% +{0.4\paperwidth}{[cmyk]{0.94,0.54,0,0}}{topright} + +% make a static frame for the logo +\newstaticframe{0.2\textwidth}{0.25\textheight}{0pt}{0pt}[logo] + +% empty page style, because I am going to make my own +\pagestyle{empty} + +% Each new chapter sets \thispagestyle{\chapterfirstpagestyle}, change this empty as well +\renewcommand{\chapterfirstpagestyle}{empty} + +% Now make a frame in which to put my own customized footer +\newdynamicframe[>1]{\textwidth}{\headheight}{0pt}{-\footskip}[footer] + +% set the contents of the frame: +\setdynamiccontents*{footer}{% +School of Computing Sciences, University of East Anglia\hfill +http://www.cmp.uea.ac.uk/\hfill +page \thepage\ of \pageref*{lastpage}} + + +\newcommand{\env}[1]{\texttt{#1}} +\newcommand{\cmdname}[1]{\texttt{\symbol{92}#1}} +\newcommand{\meta}[1]{\textnormal{\textless\textit{#1}\textgreater}} + +\begin{document} + +% not a very interesting logo +\setstaticcontents*{logo}{\sffamily{\Huge\slshape FLF} Flowfram} + +{\noindent +\slshape\Huge\MakeUppercase{A Sample Brochure}\par +\vskip0.5in +\noindent\large\MakeUppercase{Nicola Talbot}\\ +} + + +\chapter{Introduction} + +The \textsl{flowfram} package is designed to enable you to create +frames in a document such that the +contents of the \env{document} environment flow from one +frame to the next in the order that 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. + +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 (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. + +This is column~\thedisplayedframe. + +The main type of frame is the flow frame. This is described on +column~\ref{flow:flowframe} on page~\pageref{flow:flowframe}. +The order used to draw the contents of each frame on the page +is described in column~\ref{flow:stacking} on +page~\pageref{flow:stacking}. Floats are describe in +column~\ref{flow:floats} on page~\pageref{flow:floats}. + +\chapter{Setting up Frames} + +This is column~\thedisplayedframe. + +The \textsl{flowfram} package provides three types of frame: +{flow frames}, {static +frames} and {dynamic frames}. + +\section*{Flow Frames} + +\labelflow{flow:flowframe} +The flow frame is the principle type of frame. +The text of the \env{document} environment will flow from +one frame to the next in order of definition. Each +flow frame has an associated width, height, +position on the page, and optionally a border. + +It is recommended that all the flow frames in a document +have the same width, otherwise problems may occur +when a paragraph spans to flow frames of unequal +widths. This is because \TeX's output routine does not +register the change in \cmdname{hsize} until it reaches +a paragraph break. If it is absolutely necessary for +flow frames to have unequal widths, judicious use of +\cmdname{framebreak} is required. + +\section*{Static Frames} + +A static frame is a rectangular area in which text neither +flows into, nor flows out of. The contents must be set +explicitly, and once set, the contents of the static frame will +remain the same on each page until it is explicitly +changed. Thus, a static frame can be used, for example, to make +a company logo appear in the same place on every page. + +\section*{Dynamic Frames} + +A dynamic frame is similar to a static frame, but its contents +are re-typeset on each page. (A static frame stores its +contents in a savebox, whereas a dynamic frame stores its +contents in a macro). + +This is column~\thedisplayedframe. + +\chapter{Frame Attributes} +\label{sec:modattr} + +Once you have defined the {flow frames}, {static frames} and +{dynamic frames}, their attributes can be changed. +The three types of frame mostly have the +same set of attributes, but some are specific to a certain type. +The available attributes are as follows +(\textsuperscript{\textbf{F}} indicates the key is +only available for {flow frames}, +\textsuperscript{\textbf{S}} indicates the key is only available +for {static frames} +and \textsuperscript{\textbf{D}} indicates the key +is only available for {dynamic frames}): + +\begin{description} +\item[width=\meta{length}]\mbox{}\par The width of the frame. + +\item[height=\meta{length}]\mbox{}\par The height of the frame. + +\item[x=\meta{length}]\mbox{}\par The x-coordinate of the frame. + +\item[y=\meta{length}]\mbox{}\par The y-coordinate of the frame. + +\item[border=\meta{style}]\mbox{}\par The style of the border around the +frame, this can take the values: \texttt{none} (no border), +\texttt{plain} (plain border) or the name of a \LaTeX\ +frame making command without the preceding backslash. +The value \texttt{fbox} is equivalent to \texttt{plain}. + +\item[offset=\meta{offset}]\mbox{}\par The border offset, if it is a +user-defined border. This is the distance from the outer +edge of the left hand border to the left edge of the +bounding box of the text inside the border. The \textsl{flowfram} +package is able to compute the border for +known frame making commands. +If you define your own frame making command, you may need to +specify the offset explicitly, or the frames +may end up shifted to the right or left. + +\item[bordercolor=\meta{colour}]\mbox{}\par The colour of the border +if you are using a standard frame making command. +The colour can either be specified as, e.g.\ \texttt{green}, +or including the colour model, for example +\verb/[rgb]{0,1,0}/. + +\item[textcolor=\meta{colour}]\mbox{}\par The text colour for that +frame. Again, the colour can either be specified as, +e.g.\ \texttt{green}, or including the colour model, +for example \verb/[rgb]{0,1,0}/. + +\item[pages=\meta{page list}]\mbox{}\par The {list of +pages} for which the frame +should appear. This can either have the values: \texttt{all}, +\texttt{even}, \texttt{odd} or \texttt{none} (the latter +removes the frame from that point on---useful if you +have multiple pages with the same number), or it can be a +comma-separated list of single pages, or +{page ranges}. + +\item[margin=\meta{side}\textsuperscript{F}]\mbox{}\par The side of +the flow frame that its corresponding margin should go on. This +can take the values \texttt{left} or \texttt{right}. + +\item[clear=\meta{boolean}\textsuperscript{S}] If this value +is set, the static frame will be cleared at the start of the +next page. + +\item[style=\meta{cmd}\textsuperscript{D}]\mbox{}\par This should be +the name of a command \emph{without} the preceding backslash, +to be applied to the contents of the specified dynamic frame. +The command may either be a declaration, for example \verb/style=large/ +which will set the contents of all the dynamic frames in a +large font, or it can be a command that takes a single argument, +for example \verb/style=textbf/ +which will make the text for all the dynamic frames come out in +bold. To unset a style, do \verb/style=none/. + +\end{description} + +\chapter{Miscellaneous} + +\section*{Page Layout} + +The \textsl{flowfram} package has the package option \texttt{draft} +which will draw the {bounding boxes} for +each frame defined. At the bottom right of each +bounding box (except for the bounding box denoting the +typeblock), a marker will be shown to indictate the type +of frame, its IDN and its IDL. + +You can see the layout for the current page (irrespective of +whether or not the \texttt{draft} option has been set) using +the command:\newline +\cmdname{flowframeshowlayout} + +The headers and footers will appear as usual (but will not +be shown in draft mode), according to the format given by +\cmdname{pagestyle}. + +\section*{Frame Stacking Order} + +\labelflow{flow:stacking} +The material on each page is placed in the following order: +\begin{enumerate} +\item Each static frame defined for that page in ascending +order of IDN. + +\item Each flow frame defined for that page in ascending +order of IDN. + +\item Each dynamic frame defined for that page in ascending +order of IDN. + +\item {Bounding boxes} if the \texttt{draft} +package option has been used. +\end{enumerate} + +This ordering can be used to determine if you want something +to overlay or underlay everything else on the page. + +\section*{Prematurely Ending a Flow Frame} + +You can force text to move immediately to the next defined +flow frame using one of the standard \LaTeX\ page breaking commands +which work in an analogous way to the way they +work in standard two column mode. + +The command \cmdname{framebreak} is provided for situations +where a paragraph spans two flow frames +of different widths, as \TeX's output routine does not +adjust to the new value of \cmdname{hsize} until the last +paragraph of the previous frame has ended. As a +result, the end of the paragraph at the beginning of the new +flow frame retains the width of the previous flow frame. + +If you want to start a new page, rather than simply move to the +next frame, use the command\newline +\cmdname{finishthispage}. + +\section*{Floats} + +\labelflow{flow:floats} +Since floats (such as figures and tables) can only go in +{flow frames}, this package provides +the additional environments: +\env{staticfigure} and +\env{statictable} which can be used in static frames +and dynamic frames. Unlike their \env{figure} and +\env{table} counterparts, they are fixed in place, and +so do not take an optional placement specifier. The +\cmdname{caption} and \cmdname{label} commands can +be used within \env{staticfigure} and \env{statictable} as +usual. + +The standard \env{figure} and \env{table} commands will +behave as usual in the flow frames, but their starred versions, +\env{figure*} and \env{table*} behave no differently +from \env{figure} and \env{table}. + +\section*{Global Values} + +The following macros can be changed using\linebreak \cmdname{renewcommand}: + +\begin{itemize} +\item \cmdname{setffdraftcolor} + +This sets the colour of the bounding box +when it is displayed in draft mode. + +\item +\cmdname{setffdrafttypeblockcolor} + +This sets the colour of +the bounding box of the typeblock when it is displayed +in draft mode. + +\item \cmdname{fflabelfont} + +This sets the font size for the bounding box markers in +draft mode. + +\end{itemize} + +The following are lengths, which can be changed using +\cmdname{setlength}: + +\begin{itemize} +\item \cmdname{fflabelsep} + +This is the distance from the right hand side of the +bounding box at which to place the bounding box marker. + +\item \cmdname{flowframesep} + +This is the gap between the text of the frame and +its border, for the standard border types. + +\item \cmdname{flowframerule} + +This is the width of the frame's border, if using +a border given by a frame making command that uses \cmdname{fboxsep} +to set its border width. + +\item \cmdname{columnsep} + +This is the horizontal distance between flow frames when using one of the +\cmdname{Ncolumn} type of commands + +\item \cmdname{vcolumnsep} + +This is the vertical distance between the flow frames and the static or +dynamic frame when using one of the \cmdname{Ncolumntop} type of commands. +\end{itemize} + +\label{lastpage} +\end{document} diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/egg.eps b/Master/texmf-dist/doc/latex/flowfram/samples/egg.eps new file mode 100644 index 00000000000..46bd52f5929 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/egg.eps @@ -0,0 +1,129 @@ +%!PS-Adobe-1.0 EPSF-3.0 +%%BoundingBox: 0 766 71 842 +%%Creator: KDE 3.5.3-0.2.fc4 Red Hat +%%CreationDate: Mon Aug 20 21:23:59 2007 +%%Orientation: Portrait +%%Pages: 1 +%%DocumentFonts: + +%%EndComments +%%BeginProlog +% Prolog copyright 1994-2003 Trolltech. You may copy this prolog in any way +% that is directly related to this document. For other use of this prolog, +% see your licensing agreement for Qt. +/d/def load def/D{bind d}bind d/d2{dup dup}D/B{0 d2}D/W{255 d2}D/ED{exch d}D +/D0{0 ED}D/LT{lineto}D/MT{moveto}D/S{stroke}D/F{setfont}D/SW{setlinewidth}D +/CP{closepath}D/RL{rlineto}D/NP{newpath}D/CM{currentmatrix}D/SM{setmatrix}D +/TR{translate}D/SD{setdash}D/SC{aload pop setrgbcolor}D/CR{currentfile read +pop}D/i{index}D/bs{bitshift}D/scs{setcolorspace}D/DB{dict dup begin}D/DE{end +d}D/ie{ifelse}D/sp{astore pop}D/BSt 0 d/LWi 1 d/PSt 1 d/Cx 0 d/Cy 0 d/WFi +false d/OMo false d/BCol[1 1 1]d/PCol[0 0 0]d/BkCol[1 1 1]d/BDArr[0.94 0.88 +0.63 0.50 0.37 0.12 0.06]d/defM matrix d/nS 0 d/GPS{PSt 1 ge PSt 5 le and{{ +LArr PSt 1 sub 2 mul get}{LArr PSt 2 mul 1 sub get}ie}{[]}ie}D/QS{PSt 0 ne{ +gsave LWi SW true GPS 0 SD S OMo PSt 1 ne and{BkCol SC false GPS dup 0 get +SD S}if grestore}if}D/r28{{CR dup 32 gt{exit}if pop}loop 3{CR}repeat 0 4{7 +bs exch dup 128 gt{84 sub}if 42 sub 127 and add}repeat}D/rA 0 d/rL 0 d/rB{rL +0 eq{/rA r28 d/rL 28 d}if dup rL gt{rA exch rL sub rL exch/rA 0 d/rL 0 d rB +exch bs add}{dup rA 16#fffffff 3 -1 roll bs not and exch dup rL exch sub/rL +ED neg rA exch bs/rA ED}ie}D/uc{/rL 0 d 0{dup 2 i length ge{exit}if 1 rB 1 +eq{3 rB dup 3 ge{1 add dup rB 1 i 5 ge{1 i 6 ge{1 i 7 ge{1 i 8 ge{128 add}if +64 add}if 32 add}if 16 add}if 3 add exch pop}if 3 add exch 10 rB 1 add{dup 3 +i lt{dup}{2 i}ie 4 i 3 i 3 i sub 2 i getinterval 5 i 4 i 3 -1 roll +putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{exit}if 3 +1 roll}loop pop pop}{3 rB 1 add{2 copy 8 rB put 1 add}repeat}ie}loop pop}D +/sl D0/QCIgray D0/QCIcolor D0/QCIindex D0/QCI{/colorimage where{pop false 3 +colorimage}{exec/QCIcolor ED/QCIgray QCIcolor length 3 idiv string d 0 1 +QCIcolor length 3 idiv 1 sub{/QCIindex ED/x QCIindex 3 mul d QCIgray +QCIindex QCIcolor x get 0.30 mul QCIcolor x 1 add get 0.59 mul QCIcolor x 2 +add get 0.11 mul add add cvi put}for QCIgray image}ie}D/di{gsave TR 1 i 1 eq +{false eq{pop true 3 1 roll 4 i 4 i false 4 i 4 i imagemask BkCol SC +imagemask}{pop false 3 1 roll imagemask}ie}{dup false ne{/languagelevel +where{pop languagelevel 3 ge}{false}ie}{false}ie{/ma ED 8 eq{/dc[0 1]d +/DeviceGray}{/dc[0 1 0 1 0 1]d/DeviceRGB}ie scs/im ED/mt ED/h ED/w ED/id 7 +DB/ImageType 1 d/Width w d/Height h d/ImageMatrix mt d/DataSource im d +/BitsPerComponent 8 d/Decode dc d DE/md 7 DB/ImageType 1 d/Width w d/Height +h d/ImageMatrix mt d/DataSource ma d/BitsPerComponent 1 d/Decode[0 1]d DE 4 +DB/ImageType 3 d/DataDict id d/MaskDict md d/InterleaveType 3 d end image}{ +pop 8 4 1 roll 8 eq{image}{QCI}ie}ie}ie grestore}d/BF{gsave BSt 1 eq{BCol SC +WFi{fill}{eofill}ie}if BSt 2 ge BSt 8 le and{BDArr BSt 2 sub get/sc ED BCol{ +1. exch sub sc mul 1. exch sub}forall 3 array astore SC WFi{fill}{eofill}ie} +if BSt 9 ge BSt 14 le and{WFi{clip}{eoclip}ie defM SM pathbbox 3 i 3 i TR 4 +2 roll 3 2 roll exch sub/h ED sub/w ED OMo{NP 0 0 MT 0 h RL w 0 RL 0 h neg +RL CP BkCol SC fill}if BCol SC 0.3 SW NP BSt 9 eq BSt 11 eq or{0 4 h{dup 0 +exch MT w exch LT}for}if BSt 10 eq BSt 11 eq or{0 4 w{dup 0 MT h LT}for}if +BSt 12 eq BSt 14 eq or{w h gt{0 6 w h add{dup 0 MT h sub h LT}for}{0 6 w h +add{dup 0 exch MT w sub w exch LT}for}ie}if BSt 13 eq BSt 14 eq or{w h gt{0 +6 w h add{dup h MT h sub 0 LT}for}{0 6 w h add{dup w exch MT w sub 0 exch LT +}for}ie}if S}if BSt 24 eq{}if grestore}D/mat matrix d/ang1 D0/ang2 D0/w D0/h +D0/x D0/y D0/ARC{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED mat CM pop x w 2 div +add y h 2 div add TR 1 h w div neg scale ang2 0 ge{0 0 w 2 div ang1 ang1 +ang2 add arc}{0 0 w 2 div ang1 ang1 ang2 add arcn}ie mat SM}D/C D0/P{NP MT +0.5 0.5 rmoveto 0 -1 RL -1 0 RL 0 1 RL CP fill}D/M{/Cy ED/Cx ED}D/L{NP Cx Cy +MT/Cy ED/Cx ED Cx Cy LT QS}D/DL{NP MT LT QS}D/HL{1 i DL}D/VL{2 i exch DL}D/R +{/h ED/w ED/y ED/x ED NP x y MT 0 h RL w 0 RL 0 h neg RL CP BF QS}D/ACR{/h +ED/w ED/y ED/x ED x y MT 0 h RL w 0 RL 0 h neg RL CP}D/xr D0/yr D0/rx D0/ry +D0/rx2 D0/ry2 D0/RR{/yr ED/xr ED/h ED/w ED/y ED/x ED xr 0 le yr 0 le or{x y +w h R}{xr 100 ge yr 100 ge or{x y w h E}{/rx xr w mul 200 div d/ry yr h mul +200 div d/rx2 rx 2 mul d/ry2 ry 2 mul d NP x rx add y MT x y rx2 ry2 180 -90 +x y h add ry2 sub rx2 ry2 270 -90 x w add rx2 sub y h add ry2 sub rx2 ry2 0 +-90 x w add rx2 sub y rx2 ry2 90 -90 ARC ARC ARC ARC CP BF QS}ie}ie}D/E{/h +ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add TR 1 h w div scale +NP 0 0 w 2 div 0 360 arc mat SM BF QS}D/A{16 div exch 16 div exch NP ARC QS} +D/PIE{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED NP x w 2 div add y h 2 div add MT +x y w h ang1 16 div ang2 16 div ARC CP BF QS}D/CH{16 div exch 16 div exch NP +ARC CP BF QS}D/BZ{curveto QS}D/CRGB{255 div 3 1 roll 255 div 3 1 roll 255 +div 3 1 roll}D/BC{CRGB BkCol sp}D/BR{CRGB BCol sp/BSt ED}D/WB{1 W BR}D/NB{0 +B BR}D/PE{setlinejoin setlinecap CRGB PCol sp/LWi ED/PSt ED LWi 0 eq{0.25 +/LWi ED}if PCol SC}D/P1{1 0 5 2 roll 0 0 PE}D/ST{defM SM concat}D/MF{true +exch true exch{exch pop exch pop dup 0 get dup findfont dup/FontName get 3 +-1 roll eq{exit}if}forall exch dup 1 get/fxscale ED 2 get/fslant ED exch +/fencoding ED[fxscale 0 fslant 1 0 0]makefont fencoding false eq{}{dup +maxlength dict begin{1 i/FID ne{def}{pop pop}ifelse}forall/Encoding +fencoding d currentdict end}ie definefont pop}D/MFEmb{findfont dup length +dict begin{1 i/FID ne{d}{pop pop}ifelse}forall/Encoding ED currentdict end +definefont pop}D/DF{findfont/fs 3 -1 roll d[fs 0 0 fs -1 mul 0 0]makefont d} +D/ty 0 d/Y{/ty ED}D/Tl{gsave SW NP 1 i exch MT 1 i 0 RL S grestore}D/XYT{ty +MT/xyshow where{pop pop xyshow}{exch pop 1 i dup length 2 div exch +stringwidth pop 3 -1 roll exch sub exch div exch 0 exch ashow}ie}D/AT{ty MT +1 i dup length 2 div exch stringwidth pop 3 -1 roll exch sub exch div exch 0 +exch ashow}D/QI{/C save d pageinit/Cx 0 d/Cy 0 d/OMo false d}D/QP{C restore +showpage}D/SPD{/setpagedevice where{1 DB 3 1 roll d end setpagedevice}{pop +pop}ie}D/SV{BSt LWi PSt Cx Cy WFi OMo BCol PCol BkCol/nS nS 1 add d gsave}D +/RS{nS 0 gt{grestore/BkCol ED/PCol ED/BCol ED/OMo ED/WFi ED/Cy ED/Cx ED/PSt +ED/LWi ED/BSt ED/nS nS 1 sub d}if}D/CLSTART{/clipTmp matrix CM d defM SM NP} +D/CLEND{clip NP clipTmp SM}D/CLO{grestore gsave defM SM}D + +/LArr[ [] [] [ 10.000 3.000 ] [ 3.000 10.000 ] [ 3.000 3.000 ] [ 3.000 3.000 ] [ 5.000 3.000 3.000 3.000 ] [ 3.000 5.000 3.000 3.000 ] [ 5.000 3.000 3.000 3.000 3.000 ] [ 3.000 5.000 3.000 3.000 3.000 3.000 ] ] d +/pageinit { +% 210*297mm (portrait) +0 842 translate 1 -1 scale/defM matrix CM d } d +%%EndProlog +%%BeginSetup +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +QI +%%EndPageSetup +[1 0 0 1 0 0]ST +CLSTART +0 0 71 76 ACR +CLEND +B P1 +NB +W BC +/sl 5396 string uc +î½L*îçËDWçÓUÕ?ÇSÑç±ÈÀN°Þæݺ×ô;*ÎÉòçµ-M2ë±Y;L2*ËGU¹ðÂ:ÒSINÂL*JGóL¾òÕ3;.JÐQݽM +¾Ê3BÀâÊCWLÆÔW=RÂ:*æDéòã¿2K*ÇÜíÄ6+ÊPá2àÒç>7;ËL.+VÚ;JðÊ6+<Qæ2Þ°PÄ*@=²Â=X*0ìÞßÏ +.âØDù¯.¯ìºPÑK³éDÍË;.YÜ·C,îÛ²MÆÍIñ°.öCEMÆÇ=ñ°.BCEM2ÊBñ°.¾·çÄ:SÑäã2:³´Ä:±åäã2Z +´íCàÃ7;-06ÚÀÁÁ7*SÑËØÎÁU,¶Ô;ÕVZÅĶI0åAîîAì5L¸Å¶Æ/Q:ï²/ð´Â-ÆÖ:MFP¿Ò6ïö;Ì=LXÃ*³ +íÄè,7ïJ1¾ãÊ4+VÜ6ܹC¸²-:·PÄ*ÇÍÕóóÃä¶Dé±Âé<*PÑK.¯è²ÈÄ*òѯ.KÍüä7¿üµëDÅL¾Ô·<à6*â +Ê*;NäÊ÷@ÀúÍH+MÆòçõí2òI³èÕ5+RåÊ2QXøR:P-¾ôê5¯KĶ+ôÕ2;.Z1ÄÞPËÔòèÓéÈU¯Âù7öü7ï·êR +ðÅÖ8MFSÁÙÄÆ@=XÅßKMNö2ù¯ÂùZÆÙ;ÐöÀWBL4CÖ*6Oí25:,%% +d +71 76[1 0 0 1 0 0]sl 8 false 0 0 di + +QP +%%Trailer +%%Pages: 1 +%%DocumentFonts: +%%EOF diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/egg.png b/Master/texmf-dist/doc/latex/flowfram/samples/egg.png Binary files differnew file mode 100644 index 00000000000..f67b013c345 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/egg.png diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/news.pdf b/Master/texmf-dist/doc/latex/flowfram/samples/news.pdf Binary files differnew file mode 100644 index 00000000000..c3d0af301ee --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/news.pdf diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/news.tex b/Master/texmf-dist/doc/latex/flowfram/samples/news.tex new file mode 100644 index 00000000000..a8ff83b3922 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/news.tex @@ -0,0 +1,204 @@ +\documentclass{article} + +\usepackage{color} +\usepackage{flowfram} +\usepackage[a5paper,top=10mm,bottom=10mm,margin=10mm]{geometry} +\usepackage{graphicx} + +% 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}{2cm} +\setlength{\leftY}{\textheight} +\addtolength{\leftY}{-\leftH} + +\newstaticframe[1]{\textwidth}{\leftH}{0pt}{\leftY}[title] + +% First flow frame. + +\setlength{\leftH}{7cm} +\adjustheight{\leftH} +\addtolength{\leftY}{-\leftH} +\setlength{\leftW}{0.5\textwidth} + +\newflowframe[1]{\leftW}{\leftH}{0pt}{\leftY} + +\setlength{\rightH}{\leftH} +\setlength{\rightY}{\leftY} + +% Second flow frame + +\setlength{\leftH}{3.5cm} +\adjustheight{\leftH} +\addtolength{\leftY}{-\leftH} + +\newflowframe[1]{\textwidth}{\leftH}{0pt}{\leftY} + +% Right hand flow frame + +\setlength{\rightX}{\leftW} +\addtolength{\rightX}{\columnsep} +\setlength{\rightW}{\textwidth} +\addtolength{\rightW}{-\rightX} + +\newflowframe[1]{\rightW}{\rightH}{\rightX}{\rightY} + +% insert vertical line between left and right flow frames + +\insertvrule{flow}{1}{flow}{3} + +% insert horizontal line between flow frames 2 and 3 +% don't want it to go under frame 1 so shift the starting +% position + +\addtolength{\rightX}{-0.5\columnsep} +\addtolength{\rightX}{-0.5\columnseprule} +\inserthrule[-\rightX]{flow}{3}{flow}{2} + +% egg picture + +\addtolength{\rightY}{\rightH} +\addtolength{\rightY}{-10mm} +\setlength{\rightW}{0.75in} +\setlength{\rightH}{0.8in} +\addtolength{\rightY}{-\rightH} +\setlength{\rightX}{\textwidth} +\addtolength{\rightX}{-\rightW} +\newstaticframe[1]{\rightW}{\rightH}{\rightX}{\rightY}[egg] + +% set contents +\setstaticcontents*{egg}{\includegraphics[scale=0.75]{egg}} + +% middle heading + +\setlength{\leftH}{2cm} +\addtolength{\leftY}{-\leftH} + +\newstaticframe[1]{\textwidth}{\leftH}{0pt}{\leftY}[midhead] + +% insert horizontal line +\inserthrule*{flow}{2}{static}{midhead} + +% bottom left flow frame + +\setlength{\leftH}{\leftY} +\adjustheight{\leftH} +\setlength{\leftW}{0.6\textwidth} + +\newflowframe[1]{\leftW}{\leftH}{0pt}{0pt} + +% bottom right flow frame + +\setlength{\rightX}{\leftW} +\addtolength{\rightX}{\columnsep} +\setlength{\rightW}{\textwidth} +\addtolength{\rightW}{-\rightX} + +\newflowframe[1]{\rightW}{\leftH}{\rightX}{0pt} + +% static frame for sheep picture + +\newstaticframe[1]{0.8in}{0.8in}{0pt}{0pt}[sheep] + +% set contents +\setstaticcontents*{sheep}{\includegraphics[scale=0.75]{sheep}} + +\onecolumn[>1] % for any text that falls off the last page + +\setcounter{secnumdepth}{0} +\pagestyle{empty} + +\begin{document} + +\begin{staticcontents*}{title} +\begin{center} +\bfseries\Huge +Fairy Tale Times +\end{center} +\hfill Issue 1. 20 November 2005. +\end{staticcontents*} + +\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.\par +\framebreak + +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.'' + +\framebreak +\section{Tragic Wall Accident} + +{\parshape=6 0pt 13em 0pt 13em 0pt 11em 0pt 11em 0pt 13em +0pt 17em +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. +\par} + +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. + +\begin{staticcontents*}{midhead} +\section{Relief as Missing Sheep Finally Return Home} +\end{staticcontents*} + +\framebreak +There was much celebration yesterday morning when Little Bo +Peep's sheep finally returned home. They had been missing +for more than a week. + +{\parshape=8 0pt \linewidth 0pt \linewidth 0pt \linewidth +0pt \linewidth 40pt 180pt 36pt 184pt 29pt 191pt +0pt \linewidth +``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.'' 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\framebreak}afternoon. +The sheep themselves made no comment, and police are still +trying to determine what happened to them. + +\noindent\hrulefill + +This is a sample document illustrating the +flowfram package. It uses \TeX's \verb|\parshape| command +to create irregularly shaped paragraphs. + +\hfill Nicola Talbot +\framebreak + +\end{document} diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/news2.pdf b/Master/texmf-dist/doc/latex/flowfram/samples/news2.pdf Binary files differnew file mode 100644 index 00000000000..a861bae1601 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/news2.pdf 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..125d5d3cd58 --- /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}{0.9in} +\setlength{\rightH}{1.5in} +\setlength{\rightX}{\textwidth} +\addtolength{\rightX}{-\rightW} +\newstaticframe[1]{\rightW}{\rightH}{\rightX}{\rightY}[egg] + +% set contents +\setstaticcontents*{egg}{\includegraphics[scale=0.9]{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=1.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 Binary files differnew file mode 100644 index 00000000000..d2af4baaae3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/poster.pdf diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/poster.tex b/Master/texmf-dist/doc/latex/flowfram/samples/poster.tex new file mode 100644 index 00000000000..05fe2131f7d --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/poster.tex @@ -0,0 +1,363 @@ +\documentclass[a0]{a0poster} + +\usepackage{color} +\usepackage{times} +\usepackage{courier} +\usepackage{helvet} +\usepackage{flowfram} + +% set up frames + +\setlength{\columnsep}{2cm} + +% Base the page layout on 4 column with static header. +% The static frame has height = 0.2\textheight +\NcolumnStop{4}{0.2\textheight} +% give the static frame a label to make it easier to keep track of +\setstaticframe{\value{maxstatic}}{label={title},backcolor=[cmyk]{0.64,0,0.95,0.40},textcolor=white} + +% Insert a vertical line between flow frames 2 and 3: +\insertvrule{flow}{2}{flow}{3} + +% On the first page, replace last two columns with +% 2 columns and a static underneath +\setflowframe{3,4}{pages={>1}} + +\computeflowframearea{3,4} +\twocolumnSbottominarea[1]{0.5\ffareaheight}{\ffareawidth}{\ffareaheight}{\ffareax}{\ffareay} +\setstaticframe{\value{maxstatic}}{label={info},backcolor=[cmyk]{0.26,0,0.76,0},clear} + +% insert a horizontal rule between flow frame 5 and static +% frame 5 +\inserthrule*[0.5\columnsep]{flow}{5}{static}{info} + +\setallflowframes{backcolor=[cmyk]{0.15,0,0.69,0}} + +\newcommand{\sty}[1]{\textsf{#1}} +\newcommand{\env}[1]{\textsf{#1}} +\newcommand{\cmdname}[1]{\texttt{\symbol{92}#1}} +\newcommand{\meta}[1]{\textnormal{\textless\textit{#1}\textgreater}} + +%\raggedright +%\setlength{\parindent}{15pt} + +\begin{document} +\begin{staticcontents*}{title} +\begin{center} +\bfseries\veryHuge flowframe.sty : Creating Posters, Magazines or Brochures in \LaTeX +\vskip1cm +\huge Nicola L. C. Talbot +\vskip2ex +\normalsize \verb"http://theoval.cmp.uea.ac.uk/~nlct/" +\end{center} +\end{staticcontents*} + +\pagestyle{empty} + +\begin{staticcontents*}{info} +\begin{staticfigure} + +\begin{verbatim} + % Make the distance between columns = 1.5cm + \setlength{\columnsep}{2cm} + + % Make a 4 column layout with a static frame on top. + % The static frame has height = 0.2\textheight + \NcolumnStop{4}{0.2\textheight} + + % give the static frame a label to make it easier to keep track of + \setstaticframe{\value{maxstatic}}{label={title},backcolor=[cmyk]{0.64,0,0.95,0.40},textcolor=white} + + % On the first page, replace the 3rd and 4th columns + % with two shorter columns with a static frame underneath + \setflowframe{3,4}{pages={>1}} + + % The area taken up by the 3rd and 4th columns is given by + \computeflowframearea{3,4} + + % Set up new frames in this area + \twocolumnSbottominarea[1]{0.5}{\ffareawidth}{\ffareaheight}{\ffareax}{\ffareay} + + % Assign a label to the last static frame to be created, and set background colour + \setstaticframe{\value{maxstatic}}{label={info},backcolor=[cmyk]{0.26,0,0.76,0}} + + % Set the background colour for all flow frames + \setallflowframes{backcolor=[cmyk]{0.15,0,0.69,0}} +\end{verbatim} + +\caption{The commands used to define the frames for this document} +\protect\label{fig:thisdoc} +\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 (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 +problem working out the line breaks. + +\section{Introduction} + +The \sty{flowfram} package is designed to enable you to create +frames in a document such that the +contents of the \env{document} environment flow from one +frame to the next in the order that 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. + +\section{Setting up Frames} + +The \sty{flowfram} package provides three types of frame: +{flow frames}, {static +frames} and {dynamic frames}. + +\subsection{Flow Frames} + +The flow frame is the principle type of frame. +The text of the \env{document} environment will flow from +one frame to the next in order of definition. Each +flow frame has an associated width, height, +position on the page, and optionally a border. + +It is recommended that all the flow frames in a document +have the same width, otherwise problems may occur +when a paragraph spans to flow frames of unequal +widths. This is because \TeX's output routine does not +register the change in \cmdname{hsize} until it reaches +a paragraph break. If it is absolutely necessary for +flow frames to have unequal widths, judicious use of +\cmdname{framebreak} is required. + +\subsection{Static Frames} + +A static frame is a rectangular area in which text neither +flows into, nor flows out of. The contents must be set +explicitly, and once set, the contents of the static frame will +remain the same on each page until it is explicitly +changed. Thus, a static frame can be used, for example, to make +a company logo appear in the same place on every page. + +\subsection{Dynamic Frames} + +A dynamic frame is similar to a static frame, but its contents +are re-typeset on each page. (A static frame stores its +contents in a savebox, whereas a dynamic frame stores its +contents in a macro). + +\section{Frame Attributes} +\label{sec:modattr} + +Once you have defined the {flow frames}, {static frames} and +{dynamic frames}, their attributes can be changed. +The three types of frame mostly have the +same set of attributes, but some are specific to a certain type. +The available attributes are as follows +(\textsuperscript{\textbf{F}} indicates the key is +only available for {flow frames}, +\textsuperscript{\textbf{S}} indicates the key is only available +for {static frames} +and \textsuperscript{\textbf{D}} indicates the key +is only available for {dynamic frames}): + +\begin{description} +\item[width=\meta{length}] The width of the frame. + +\item[height=\meta{length}] The height of the frame. + +\item[x=\meta{length}] The x-coordinate of the frame. + +\item[y=\meta{length}] The y-coordinate of the frame. + +\item[border=\meta{style}] The style of the border around the +frame, this can take the values: \texttt{none} (no border), +\texttt{plain} (plain border) or the name of a \LaTeX\ +frame making command without the preceding backslash. +The value \texttt{fbox} is equivalent to \texttt{plain}. + +\item[offset=\meta{offset}] The border offset, if it is a +user-defined border. This is the distance from the outer +edge of the left hand border to the left edge of the +bounding box of the text inside the border. The \sty{flowfram} +package is able to compute the border for +known frame making commands. +If you define your own frame making command, you may need to +specify the offset explicitly, or the frames +may end up shifted to the right or left. + +\item[bordercolor=\meta{colour}] The colour of the border +if you are using a standard frame making command. +The colour can either be specified as, e.g.\ \texttt{green}, +or including the colour model, e.g. \verb/[rgb]{0,1,0}/. + +\item[textcolor=\meta{colour}] The text colour for that +frame. Again, the colour can either be specified as, +e.g.\ \texttt{green}, or including the colour model, +e.g. \verb/[rgb]{0,1,0}/. + +\item[pages=\meta{page list}] The {list of +pages} for which the frame +should appear. This can either have the values: \texttt{all}, +\texttt{even}, \texttt{odd} or \texttt{none} (the latter +removes the frame from that point on---useful if you +have multiple pages with the same number), or it can be a +comma-separated list of single pages, or +{page ranges}. + +\item[margin=\meta{side}\textsuperscript{F}] The side of +the flow frame that its corresponding margin should go on. This +can take the values \texttt{left} or \texttt{right}. + +\item[clear=\meta{boolean}\textsuperscript{S}] If this value +is set, the static frame will be cleared at the start of the +next page. + +\item[style=\meta{cmd}\textsuperscript{D}] This should be +the name of a command \emph{without} the preceding backslash, +to be applied to the contents of the specified dynamic frame. +The command may either be a declaration, for example \verb/style=large/ +which will set the contents of all the dynamic frames in a +large font, or it can be a command that takes a single argument, +for example \verb/style=textbf/ +which will make the text for all the dynamic frames come out in +bold. To unset a style, do \verb/style=none/. + +\end{description} + +\section{Miscellaneous} + +\subsection{Page Layout} + +The \sty{flowfram} package has the package option \texttt{draft} +which will draw the {bounding boxes} for +each frame defined. At the bottom right of each +bounding box (except for the bounding box denoting the +typeblock), a marker will be shown to indictate the type +of frame, its IDN and its IDL. + +You can see the layout for the current page (irrespective of +whether or not the \texttt{draft} option has been set) using +the command:\newline +\cmdname{flowframeshowlayout} + +The headers and footers will appear as usual (but will not +be shown in draft mode), according to the format given by +\cmdname{pagestyle}. + +\subsection{Frame Stacking Order} + +The material on each page is placed in the following order: +\begin{enumerate} +\item Each static frame defined for that page in ascending +order of IDN. + +\item Each flow frame defined for that page in ascending +order of IDN. + +\item Each dynamic frame defined for that page in ascending +order of IDN. + +\item {Bounding boxes} if the \texttt{draft} +package option has been used. +\end{enumerate} + +This ordering can be used to determine if you want something +to overlay or underlay everything else on the page. + +\subsection{Prematurely Ending a Flow Frame} + +You can force text to move immediately to the next defined +flow frame using one of the standard \LaTeX\ page breaking commands +which work in an analogous way to the way they +work in standard two column mode. + +The command \cmdname{framebreak} is provided for situations +where a paragraph spans two flow frames +of different widths, as \TeX's output routine does not +adjust to the new value of \cmdname{hsize} until the last +paragraph of the previous frame has ended. As a +result, the end of the paragraph at the beginning of the new +flow frame retains the width of the previous flow frame. + +If you want to start a new page, rather than simply move to the +next frame, use the command\newline +\cmdname{finishthispage}. + +\subsection{Floats} + +Since floats (such as figures and tables) can only go in +{flow frames}, this package provides +the additional environments: +\env{staticfigure} and +\env{statictable} which can be used in static frames +and dynamic frames. Unlike their \env{figure} and +\env{table} counterparts, they are fixed in place, and +so do not take an optional placement specifier. The +\cmdname{caption} and \cmdname{label} commands can +be used within \env{staticfigure} and \env{statictable} as +usual. + +The standard \env{figure} and \env{table} commands will +behave as usual in the flow frames, but their starred versions, +\env{figure*} and \env{table*} behave no differently +from \env{figure} and \env{table}. + +\subsection{Global Values} + +The following macros can be changed using \cmdname{renewcommand}: + +\begin{itemize} +\item \cmdname{setffdraftcolor} + +This sets the colour of the bounding box +when it is displayed in draft mode. + +\item +\cmdname{setffdrafttypeblockcolor} + +This sets the colour of +the bounding box of the typeblock when it is displayed +in draft mode. + +\item \cmdname{fflabelfont} + +This sets the font size for the bounding box markers in +draft mode. + +\end{itemize} + +The following are lengths, which can be changed using +\cmdname{setlength}: + +\begin{itemize} +\item \cmdname{fflabelsep} + +This is the distance from the right hand side of the +bounding box at which to place the bounding box marker. + +\item \cmdname{flowframesep} + +This is the gap between the text of the frame and +its border, for the standard border types. + +\item \cmdname{flowframerule} + +This is the width of the frame's border, if using +a border given by a frame making command that uses \cmdname{fboxsep} +to set its border width. + +\item \cmdname{columnsep} + +This is the horizontal distance between flow frames when using one of the +\cmdname{Ncolumn} type of commands + +\item \cmdname{vcolumnsep} + +This is the vertical distance between the flow frames and the static or +dynamic frame when using one of the \cmdname{Ncolumntop} type of commands. +\end{itemize} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/sheep.eps b/Master/texmf-dist/doc/latex/flowfram/samples/sheep.eps new file mode 100644 index 00000000000..525aec2992e --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/sheep.eps @@ -0,0 +1,135 @@ +%!PS-Adobe-1.0 EPSF-3.0 +%%BoundingBox: 0 796 58 842 +%%Creator: KDE 3.5.3-0.2.fc4 Red Hat +%%CreationDate: Mon Aug 20 21:24:28 2007 +%%Orientation: Portrait +%%Pages: 1 +%%DocumentFonts: + +%%EndComments +%%BeginProlog +% Prolog copyright 1994-2003 Trolltech. You may copy this prolog in any way +% that is directly related to this document. For other use of this prolog, +% see your licensing agreement for Qt. +/d/def load def/D{bind d}bind d/d2{dup dup}D/B{0 d2}D/W{255 d2}D/ED{exch d}D +/D0{0 ED}D/LT{lineto}D/MT{moveto}D/S{stroke}D/F{setfont}D/SW{setlinewidth}D +/CP{closepath}D/RL{rlineto}D/NP{newpath}D/CM{currentmatrix}D/SM{setmatrix}D +/TR{translate}D/SD{setdash}D/SC{aload pop setrgbcolor}D/CR{currentfile read +pop}D/i{index}D/bs{bitshift}D/scs{setcolorspace}D/DB{dict dup begin}D/DE{end +d}D/ie{ifelse}D/sp{astore pop}D/BSt 0 d/LWi 1 d/PSt 1 d/Cx 0 d/Cy 0 d/WFi +false d/OMo false d/BCol[1 1 1]d/PCol[0 0 0]d/BkCol[1 1 1]d/BDArr[0.94 0.88 +0.63 0.50 0.37 0.12 0.06]d/defM matrix d/nS 0 d/GPS{PSt 1 ge PSt 5 le and{{ +LArr PSt 1 sub 2 mul get}{LArr PSt 2 mul 1 sub get}ie}{[]}ie}D/QS{PSt 0 ne{ +gsave LWi SW true GPS 0 SD S OMo PSt 1 ne and{BkCol SC false GPS dup 0 get +SD S}if grestore}if}D/r28{{CR dup 32 gt{exit}if pop}loop 3{CR}repeat 0 4{7 +bs exch dup 128 gt{84 sub}if 42 sub 127 and add}repeat}D/rA 0 d/rL 0 d/rB{rL +0 eq{/rA r28 d/rL 28 d}if dup rL gt{rA exch rL sub rL exch/rA 0 d/rL 0 d rB +exch bs add}{dup rA 16#fffffff 3 -1 roll bs not and exch dup rL exch sub/rL +ED neg rA exch bs/rA ED}ie}D/uc{/rL 0 d 0{dup 2 i length ge{exit}if 1 rB 1 +eq{3 rB dup 3 ge{1 add dup rB 1 i 5 ge{1 i 6 ge{1 i 7 ge{1 i 8 ge{128 add}if +64 add}if 32 add}if 16 add}if 3 add exch pop}if 3 add exch 10 rB 1 add{dup 3 +i lt{dup}{2 i}ie 4 i 3 i 3 i sub 2 i getinterval 5 i 4 i 3 -1 roll +putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{exit}if 3 +1 roll}loop pop pop}{3 rB 1 add{2 copy 8 rB put 1 add}repeat}ie}loop pop}D +/sl D0/QCIgray D0/QCIcolor D0/QCIindex D0/QCI{/colorimage where{pop false 3 +colorimage}{exec/QCIcolor ED/QCIgray QCIcolor length 3 idiv string d 0 1 +QCIcolor length 3 idiv 1 sub{/QCIindex ED/x QCIindex 3 mul d QCIgray +QCIindex QCIcolor x get 0.30 mul QCIcolor x 1 add get 0.59 mul QCIcolor x 2 +add get 0.11 mul add add cvi put}for QCIgray image}ie}D/di{gsave TR 1 i 1 eq +{false eq{pop true 3 1 roll 4 i 4 i false 4 i 4 i imagemask BkCol SC +imagemask}{pop false 3 1 roll imagemask}ie}{dup false ne{/languagelevel +where{pop languagelevel 3 ge}{false}ie}{false}ie{/ma ED 8 eq{/dc[0 1]d +/DeviceGray}{/dc[0 1 0 1 0 1]d/DeviceRGB}ie scs/im ED/mt ED/h ED/w ED/id 7 +DB/ImageType 1 d/Width w d/Height h d/ImageMatrix mt d/DataSource im d +/BitsPerComponent 8 d/Decode dc d DE/md 7 DB/ImageType 1 d/Width w d/Height +h d/ImageMatrix mt d/DataSource ma d/BitsPerComponent 1 d/Decode[0 1]d DE 4 +DB/ImageType 3 d/DataDict id d/MaskDict md d/InterleaveType 3 d end image}{ +pop 8 4 1 roll 8 eq{image}{QCI}ie}ie}ie grestore}d/BF{gsave BSt 1 eq{BCol SC +WFi{fill}{eofill}ie}if BSt 2 ge BSt 8 le and{BDArr BSt 2 sub get/sc ED BCol{ +1. exch sub sc mul 1. exch sub}forall 3 array astore SC WFi{fill}{eofill}ie} +if BSt 9 ge BSt 14 le and{WFi{clip}{eoclip}ie defM SM pathbbox 3 i 3 i TR 4 +2 roll 3 2 roll exch sub/h ED sub/w ED OMo{NP 0 0 MT 0 h RL w 0 RL 0 h neg +RL CP BkCol SC fill}if BCol SC 0.3 SW NP BSt 9 eq BSt 11 eq or{0 4 h{dup 0 +exch MT w exch LT}for}if BSt 10 eq BSt 11 eq or{0 4 w{dup 0 MT h LT}for}if +BSt 12 eq BSt 14 eq or{w h gt{0 6 w h add{dup 0 MT h sub h LT}for}{0 6 w h +add{dup 0 exch MT w sub w exch LT}for}ie}if BSt 13 eq BSt 14 eq or{w h gt{0 +6 w h add{dup h MT h sub 0 LT}for}{0 6 w h add{dup w exch MT w sub 0 exch LT +}for}ie}if S}if BSt 24 eq{}if grestore}D/mat matrix d/ang1 D0/ang2 D0/w D0/h +D0/x D0/y D0/ARC{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED mat CM pop x w 2 div +add y h 2 div add TR 1 h w div neg scale ang2 0 ge{0 0 w 2 div ang1 ang1 +ang2 add arc}{0 0 w 2 div ang1 ang1 ang2 add arcn}ie mat SM}D/C D0/P{NP MT +0.5 0.5 rmoveto 0 -1 RL -1 0 RL 0 1 RL CP fill}D/M{/Cy ED/Cx ED}D/L{NP Cx Cy +MT/Cy ED/Cx ED Cx Cy LT QS}D/DL{NP MT LT QS}D/HL{1 i DL}D/VL{2 i exch DL}D/R +{/h ED/w ED/y ED/x ED NP x y MT 0 h RL w 0 RL 0 h neg RL CP BF QS}D/ACR{/h +ED/w ED/y ED/x ED x y MT 0 h RL w 0 RL 0 h neg RL CP}D/xr D0/yr D0/rx D0/ry +D0/rx2 D0/ry2 D0/RR{/yr ED/xr ED/h ED/w ED/y ED/x ED xr 0 le yr 0 le or{x y +w h R}{xr 100 ge yr 100 ge or{x y w h E}{/rx xr w mul 200 div d/ry yr h mul +200 div d/rx2 rx 2 mul d/ry2 ry 2 mul d NP x rx add y MT x y rx2 ry2 180 -90 +x y h add ry2 sub rx2 ry2 270 -90 x w add rx2 sub y h add ry2 sub rx2 ry2 0 +-90 x w add rx2 sub y rx2 ry2 90 -90 ARC ARC ARC ARC CP BF QS}ie}ie}D/E{/h +ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add TR 1 h w div scale +NP 0 0 w 2 div 0 360 arc mat SM BF QS}D/A{16 div exch 16 div exch NP ARC QS} +D/PIE{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED NP x w 2 div add y h 2 div add MT +x y w h ang1 16 div ang2 16 div ARC CP BF QS}D/CH{16 div exch 16 div exch NP +ARC CP BF QS}D/BZ{curveto QS}D/CRGB{255 div 3 1 roll 255 div 3 1 roll 255 +div 3 1 roll}D/BC{CRGB BkCol sp}D/BR{CRGB BCol sp/BSt ED}D/WB{1 W BR}D/NB{0 +B BR}D/PE{setlinejoin setlinecap CRGB PCol sp/LWi ED/PSt ED LWi 0 eq{0.25 +/LWi ED}if PCol SC}D/P1{1 0 5 2 roll 0 0 PE}D/ST{defM SM concat}D/MF{true +exch true exch{exch pop exch pop dup 0 get dup findfont dup/FontName get 3 +-1 roll eq{exit}if}forall exch dup 1 get/fxscale ED 2 get/fslant ED exch +/fencoding ED[fxscale 0 fslant 1 0 0]makefont fencoding false eq{}{dup +maxlength dict begin{1 i/FID ne{def}{pop pop}ifelse}forall/Encoding +fencoding d currentdict end}ie definefont pop}D/MFEmb{findfont dup length +dict begin{1 i/FID ne{d}{pop pop}ifelse}forall/Encoding ED currentdict end +definefont pop}D/DF{findfont/fs 3 -1 roll d[fs 0 0 fs -1 mul 0 0]makefont d} +D/ty 0 d/Y{/ty ED}D/Tl{gsave SW NP 1 i exch MT 1 i 0 RL S grestore}D/XYT{ty +MT/xyshow where{pop pop xyshow}{exch pop 1 i dup length 2 div exch +stringwidth pop 3 -1 roll exch sub exch div exch 0 exch ashow}ie}D/AT{ty MT +1 i dup length 2 div exch stringwidth pop 3 -1 roll exch sub exch div exch 0 +exch ashow}D/QI{/C save d pageinit/Cx 0 d/Cy 0 d/OMo false d}D/QP{C restore +showpage}D/SPD{/setpagedevice where{1 DB 3 1 roll d end setpagedevice}{pop +pop}ie}D/SV{BSt LWi PSt Cx Cy WFi OMo BCol PCol BkCol/nS nS 1 add d gsave}D +/RS{nS 0 gt{grestore/BkCol ED/PCol ED/BCol ED/OMo ED/WFi ED/Cy ED/Cx ED/PSt +ED/LWi ED/BSt ED/nS nS 1 sub d}if}D/CLSTART{/clipTmp matrix CM d defM SM NP} +D/CLEND{clip NP clipTmp SM}D/CLO{grestore gsave defM SM}D + +/LArr[ [] [] [ 10.000 3.000 ] [ 3.000 10.000 ] [ 3.000 3.000 ] [ 3.000 3.000 ] [ 5.000 3.000 3.000 3.000 ] [ 3.000 5.000 3.000 3.000 ] [ 5.000 3.000 3.000 3.000 3.000 ] [ 3.000 5.000 3.000 3.000 3.000 3.000 ] ] d +/pageinit { +% 210*297mm (portrait) +0 842 translate 1 -1 scale/defM matrix CM d } d +%%EndProlog +%%BeginSetup +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +QI +%%EndPageSetup +[1 0 0 1 0 0]ST +CLSTART +0 0 58 46 ACR +CLEND +B P1 +NB +W BC +/sl 2668 string uc +îý´+*öA*V¹8º¼ùðãÁAYܺÆIAHÚñ/×Y³+¾ýüûÙ¶óðãíÍÞMêüûùñÍ+*ù-*=+Á+NH¸ò=1¼¶ïàÉYI½Xü +¯¹êJ8P7¾ûÞÊî6ñìG¹õ/**üâP¾*GÍGùâ¿É?U´ëßÕYMAôëIÑ-åI½¼øð×±ÕXÏI½XÚ¶ï;Dü¹öîßÃ=Å8Û +UÅ8ÛöêÇ=é»JGʳëàýÁ1ýʸÔ:1ÀIý¶4Õ̺öîݱݼëLÅ8û÷*JF¾ÝÌGÙ´ëØYµP»ùÈ»:1X³éÜ»MUÕìü +7F.î¶óè½å8Gøðâضïß½ýô»**¼¶ïâÇEµìº×7ÔUµéR-*ÎÚ,éX@XFû=¶*ù-FúõíÒ=9HÚÕXVÙ´WزáÀÄ +*ZëÙ¹õô7ÅJ¹éÔG·¶Þ?Ö´°ïàãÝ:ÐWâ¿ÙåÌÛöéÕ5õó³éÈ?Ù³éÔVÍ*¾²/Eø:*ÎâîP8LUÌÖê/X0ý>DFç +¾ÀÀæ-*ÙÜ+ÞH¾+=ÙµíéÅÀ²3·*÷ÍWßç/F×·9ìØÓèØÉA5½ð·¯·CãßZÂÆÓEÈäõìÓE÷õíìñÁú1Ê=ð:Zã +HõëÉôÛÑÚMž<èùöïÖKÆGÞ+êI3íëâ+Æ»°´µñÞÙÈ?Uµïæϳ-ï+ù<½ü±±ËTUFêسùP¼ûضÐXÛú¹OÜÅF +æîßM9HÚ´,·2¹2Wß»=åÌûÚº÷1Qí÷Ù1YÚöéÃ5Ý×ç=A¸ÁÀ;NÚõðê×ÏÉAý2·T8ú¼÷åÍåܺ·YJE0÷ÀWMC +PüXòßâ+´üûÙ¸÷õÖ°5·2µ7U´ÝYݼFÔº,ÞçÐOÙ´WÛ¸óÈÙµÁÌéGLÆâîæ;1ÞüGñʸ¾úóñØøðàÃ1ýW*:Á +5A*6ÊÅH¶ØµýüÛFù÷ñ¯·Añ:¾ìëÉÕXÛöêÕYM*Í+*2G**X1*ÖæÏEQ8ÉλùüWÚ·ñ;C¯½ýOÔ6ë-ùUÆ-ݽ +Ý»÷ð×UAìÃ-ö7*¾îàÃ5ïâá*¶ï¿Ið¸òÎ.,JÙô¶Q;Iý3ÖÜù?åI½¼ùðßÁ1¾Û-*ÞGºöîÁ,:ºóèÓM9»** +L=ê÷ñèãÝóÏËâß+é÷ûôë-Z9**ù>½üû+*Þ¼îÅÉõìÛ¸**Ò-JîßѽX?åðß*î1*JBÞÇO¾úß1K3*JVL@µR +.Z*ü-*î>=L=Ð÷ÄÛãßÆJÊJXµæ.·¶÷.·ä߯PÚìÂñ·¶V.ç×Kà·* +d +58 46[1 0 0 1 0 0]sl 8 false 0 0 di + +QP +%%Trailer +%%Pages: 1 +%%DocumentFonts: +%%EOF diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/sheep.png b/Master/texmf-dist/doc/latex/flowfram/samples/sheep.png Binary files differnew file mode 100644 index 00000000000..d7cb3517613 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/samples/sheep.png |