From ac2dc0635882400d398bd97198d138880c7bcf64 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 24 Aug 2007 18:39:51 +0000 Subject: flowfram 1.10 (21aug07) git-svn-id: svn://tug.org/texlive/trunk@4801 c570f23f-e606-0410-a88d-b1316a301751 --- Build/cdbuild/ctan2tds.pl | 1 + Master/texmf-dist/doc/latex/flowfram/CHANGES | 14 + Master/texmf-dist/doc/latex/flowfram/README | 79 +- Master/texmf-dist/doc/latex/flowfram/brochure.pdf | Bin 0 -> 63165 bytes Master/texmf-dist/doc/latex/flowfram/brochure.tex | 345 +++ Master/texmf-dist/doc/latex/flowfram/egg.eps | 129 + Master/texmf-dist/doc/latex/flowfram/egg.png | Bin 0 -> 930 bytes .../texmf-dist/doc/latex/flowfram/ffuserguide.pdf | Bin 381626 -> 394031 bytes .../texmf-dist/doc/latex/flowfram/ffuserguide.tex | 682 +++-- Master/texmf-dist/doc/latex/flowfram/flowfram.pdf | Bin 377509 -> 450569 bytes Master/texmf-dist/doc/latex/flowfram/news.pdf | Bin 0 -> 29981 bytes Master/texmf-dist/doc/latex/flowfram/news.tex | 204 ++ Master/texmf-dist/doc/latex/flowfram/news2.pdf | Bin 0 -> 36394 bytes Master/texmf-dist/doc/latex/flowfram/news2.tex | 231 ++ Master/texmf-dist/doc/latex/flowfram/poster.pdf | Bin 0 -> 79651 bytes Master/texmf-dist/doc/latex/flowfram/poster.tex | 363 +++ .../doc/latex/flowfram/samples/brochure.pdf | Bin 63158 -> 0 bytes .../doc/latex/flowfram/samples/brochure.tex | 345 --- .../texmf-dist/doc/latex/flowfram/samples/egg.eps | 200 -- .../texmf-dist/doc/latex/flowfram/samples/egg.png | Bin 930 -> 0 bytes .../texmf-dist/doc/latex/flowfram/samples/news.pdf | Bin 29971 -> 0 bytes .../texmf-dist/doc/latex/flowfram/samples/news.tex | 204 -- .../doc/latex/flowfram/samples/news2.pdf | Bin 36407 -> 0 bytes .../doc/latex/flowfram/samples/news2.tex | 231 -- .../doc/latex/flowfram/samples/poster.pdf | Bin 79646 -> 0 bytes .../doc/latex/flowfram/samples/poster.tex | 363 --- .../doc/latex/flowfram/samples/sheep.eps | 176 -- .../doc/latex/flowfram/samples/sheep.png | Bin 1199 -> 0 bytes Master/texmf-dist/doc/latex/flowfram/sheep.eps | 135 + Master/texmf-dist/doc/latex/flowfram/sheep.png | Bin 0 -> 1199 bytes .../texmf-dist/source/latex/flowfram/flowfram.dtx | 3073 +++++++++++++------- .../texmf-dist/source/latex/flowfram/flowfram.ins | 26 +- Master/texmf-dist/tex/latex/flowfram/flowfram.sty | 1532 +++++----- 33 files changed, 4630 insertions(+), 3703 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/flowfram/brochure.pdf create mode 100644 Master/texmf-dist/doc/latex/flowfram/brochure.tex create mode 100644 Master/texmf-dist/doc/latex/flowfram/egg.eps create mode 100644 Master/texmf-dist/doc/latex/flowfram/egg.png create mode 100644 Master/texmf-dist/doc/latex/flowfram/news.pdf create mode 100644 Master/texmf-dist/doc/latex/flowfram/news.tex create mode 100644 Master/texmf-dist/doc/latex/flowfram/news2.pdf create mode 100644 Master/texmf-dist/doc/latex/flowfram/news2.tex create mode 100644 Master/texmf-dist/doc/latex/flowfram/poster.pdf create mode 100644 Master/texmf-dist/doc/latex/flowfram/poster.tex delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdf delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/egg.eps delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/egg.png delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/news.pdf delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/news.tex delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/news2.pdf delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/news2.tex delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/poster.pdf delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/poster.tex delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/sheep.eps delete mode 100644 Master/texmf-dist/doc/latex/flowfram/samples/sheep.png create mode 100644 Master/texmf-dist/doc/latex/flowfram/sheep.eps create mode 100644 Master/texmf-dist/doc/latex/flowfram/sheep.png diff --git a/Build/cdbuild/ctan2tds.pl b/Build/cdbuild/ctan2tds.pl index 108c229f6b7..1af4a55da0a 100755 --- a/Build/cdbuild/ctan2tds.pl +++ b/Build/cdbuild/ctan2tds.pl @@ -153,6 +153,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; 'fc', "&MAKEflatten", 'featpost', "&MAKEfeatpost", 'feynmf', "&MAKEfeynmf", + 'flowfram', "&MAKEflatten", 'fontinst', "&MAKEfontinst", 'footnpag', "&MAKEfootnpag", 'fourier', "&MAKEflatten", diff --git a/Master/texmf-dist/doc/latex/flowfram/CHANGES b/Master/texmf-dist/doc/latex/flowfram/CHANGES index 98df6404a1c..32b1200bb6a 100644 --- a/Master/texmf-dist/doc/latex/flowfram/CHANGES +++ b/Master/texmf-dist/doc/latex/flowfram/CHANGES @@ -1,5 +1,19 @@ flowfram change log +1.10 : + * fixed license text + * made some long commands short + * updated the documentation to use glossaries package instead of + obsolete glossary package + +1.09 : added \ffcolumnseprule to be used instead of \columnseprule. +Added dynamiccontents environment. + +1.08 : fixed bug in \@ff@getdim (causing undefined \c@dynamic). Fixed +bug that prevented hyperref's page number hyperlinks from working. +Added convenience commands \getstaticbounds, \getflowbounds and +\getdynamicbounds. + 1.07 : fixed bug causing extra pages at the end of the document 1.06 : fixed bug causing slight right shift of frames diff --git a/Master/texmf-dist/doc/latex/flowfram/README b/Master/texmf-dist/doc/latex/flowfram/README index fd950895038..6a0e1555adc 100644 --- a/Master/texmf-dist/doc/latex/flowfram/README +++ b/Master/texmf-dist/doc/latex/flowfram/README @@ -1,41 +1,38 @@ -LaTeX Package : flowfram v 1.07 - -Last Modified : 9th March 2007 - -Author : Nicola Talbot - -Files : flowfram.dtx - documented source file - flowfram.ins - installation script - ffuserguide.pdf - user manual - ffuserguide.tex - source code for user manual - samples/ - directory containiing sample files - -Create frames for posters, brochures or magazines - -The flowfram package is designed to enable you to create -frames in a document such that the contents of the -document environment flow from one frame to the next in the -order in which they were defined. This is useful for creating -posters or magazines or any other form of document that does not -conform to the standard one or two column layout. - -To extract the code do: - -latex flowfram.ins - -To extract the documented code do: - -latex flowfram.dtx -makeindex -s gind.ist flowfram -makeglos.pl flowfram -latex flowfram.dtx -latex flowfram.dtx - -(The documentation requires at least version 2.2 of the -glossary package.) - -This material is subject to the LaTeX Project Public License. -See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license. - -http://theoval.cmp.uea.ac.uk/~nlct/ - +LaTeX Package : flowfram v 1.10 + +Last Modified : 21st Aug 2007 + +Author : Nicola Talbot + +Files : flowfram.dtx - documented source file + flowfram.ins - installation script + ffuserguide.pdf - user manual + ffuserguide.tex - source code for user manual + samples/ - directory 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 + +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/brochure.pdf b/Master/texmf-dist/doc/latex/flowfram/brochure.pdf new file mode 100644 index 00000000000..e6fad4b7b11 Binary files /dev/null and b/Master/texmf-dist/doc/latex/flowfram/brochure.pdf differ diff --git a/Master/texmf-dist/doc/latex/flowfram/brochure.tex b/Master/texmf-dist/doc/latex/flowfram/brochure.tex new file mode 100644 index 00000000000..f5f1fdedd18 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/brochure.tex @@ -0,0 +1,345 @@ +\documentclass[a4paper]{report} + +\usepackage[landscape,margin=1in]{geometry} +\usepackage{color} +\usepackage{flowfram} + +% 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. + +\chapter{Setting up Frames} + +The \textsl{flowfram} package provides three types of frame: +{flow frames}, {static +frames} and {dynamic frames}. + +\section*{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. + +\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). + +\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} + +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} + +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/egg.eps b/Master/texmf-dist/doc/latex/flowfram/egg.eps new file mode 100644 index 00000000000..46bd52f5929 --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/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+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/news2.pdf b/Master/texmf-dist/doc/latex/flowfram/news2.pdf new file mode 100644 index 00000000000..0e8231046c7 Binary files /dev/null and b/Master/texmf-dist/doc/latex/flowfram/news2.pdf differ diff --git a/Master/texmf-dist/doc/latex/flowfram/news2.tex b/Master/texmf-dist/doc/latex/flowfram/news2.tex new file mode 100644 index 00000000000..aef7680ff5c --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/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/poster.pdf b/Master/texmf-dist/doc/latex/flowfram/poster.pdf new file mode 100644 index 00000000000..b7013ebfd58 Binary files /dev/null and b/Master/texmf-dist/doc/latex/flowfram/poster.pdf differ diff --git a/Master/texmf-dist/doc/latex/flowfram/poster.tex b/Master/texmf-dist/doc/latex/flowfram/poster.tex new file mode 100644 index 00000000000..05fe2131f7d --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/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/brochure.pdf b/Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdf deleted file mode 100644 index f02e4cb97b4..00000000000 Binary files a/Master/texmf-dist/doc/latex/flowfram/samples/brochure.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex b/Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex deleted file mode 100644 index f5f1fdedd18..00000000000 --- a/Master/texmf-dist/doc/latex/flowfram/samples/brochure.tex +++ /dev/null @@ -1,345 +0,0 @@ -\documentclass[a4paper]{report} - -\usepackage[landscape,margin=1in]{geometry} -\usepackage{color} -\usepackage{flowfram} - -% 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. - -\chapter{Setting up Frames} - -The \textsl{flowfram} package provides three types of frame: -{flow frames}, {static -frames} and {dynamic frames}. - -\section*{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. - -\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). - -\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} - -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} - -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 deleted file mode 100644 index 24ee44758dc..00000000000 --- a/Master/texmf-dist/doc/latex/flowfram/samples/egg.eps +++ /dev/null @@ -1,200 +0,0 @@ -%!PS-Adobe-3.0 EPSF-3.0 -%%Creator: GIMP PostScript file plugin V 1.17 by Peter Kirchgessner -%%Title: egg.eps -%%CreationDate: Sun Nov 20 16:24:31 2005 -%%DocumentData: Clean7Bit -%%LanguageLevel: 2 -%%Pages: 1 -%%BoundingBox: 14 14 65 69 -%%EndComments -%%BeginProlog -% Use own dictionary to avoid conflicts -10 dict begin -%%EndProlog -%%Page: 1 1 -% Translate for offset -14.173228346456694 14.173228346456694 translate -% Translate to begin of first scanline -0 53.993250843644546 translate -49.993750781152357 -53.993250843644546 scale -% Image geometry -50 54 8 -% Transformation matrix -[ 50 0 0 54 0 0 ] -% Strings to hold RGB-samples per scanline -/rstr 50 string def -/gstr 50 string def -/bstr 50 string def -{currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop} -{currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop} -{currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop} -true 3 -%%BeginData: 2935 ASCII Bytes -colorimage -li.4V^W#I%`P:d,s*t~> -li.4RW0sloRAf?:s*t~> -li.4FCF0o:->VE(s*t~> -mJd4\](u%#](YUmJ,~> -mJd4ZReaMqRe6(KJ,~> -mJd4T7emr'7dfaFJ,~> -mf*=HnFuVWnDWm:J,~> -mf*=@[J.65[Ft'LJ,~> -mf*=+)>>$M)8u%EJ,~> -n,ECEoC`1@nc++~> -n,EC;o==qOnc++~> -n,EC$o,7VBnc++~> -nG`LTnb)tLo)F4~> -nG`LPn[\_ao)F4~> -nG`LDnJVD_o)F4~> -nG`L1nb)t)o)F4~> -nG`KYn[\^jo)F4~> -nG`J5nJVBPo)F4~> -nc&U,n+Hb!oDa=~> -nc&Tmn%&M&oDa=~> -nc&T7mhu1OoDa=~> -o)J%Lo`'F~> -o)A^^mCE;io`'F~> -o)A^Xm2>umo`'F~> -o)A^)mIgOpo`'F~> -o)A]gmCE:ro`'F~> -o)A]*m2>t?o`'F~> -oD\ghlh1>Wp&BO~> -oD\gglad)op&BO~> -oD\gflP]d#p&BO~> -oD\g@lh1>/p&BO~> -oD\g5lad)=p&BO~> -oD\fklP]c(p&BO~> -oD\g%lh1=ip&BO~> -oD\fXlad(`p&BO~> -oD\eSlP]aep&BO~> -o`"pjqt:"#qt:"#p\"UdpA]X~> -o`"pjqmlb8qmlb8pUUA(pA]X~> -o`"piq\fG8q\fG8pDO&1pA]X~> -o`"pUl1P,ApA]X~> -o`"pPl+-lUpA]X~> -o`"pAko'QPpA]X~> -o`"p9l1P,%pA]X~> -o`"p+l+-l0pA]X~> -o`"oXko'PgpA]X~> -o`"p(l1P+ipA]X~> -o`"ocl+-khpA]X~> -o`"nqko'P+pA]X~> -o`"p)l1P+jpA]X~> -o`"oXl+-k]pA]X~> -o`"nIko'OXpA]X~> -o`"p:l1P,&pA]X~> -o`"o_l+-kdpA]X~> -o`"n4ko'OCpA]X~> -o`"pNl1P,:pA]X~> -o`"oml+-krpA]X~> -o`"n/ko'O>pA]X~> -o`"p^l1P,JpA]X~> -o`"p#l+-l(pA]X~> -o`"n/ko'O>pA]X~> -o`"p^l1P,JpA]X~> -o`"p#l+-l(pA]X~> -o`"n/ko'O>pA]X~> -o`"pNrV$7%q=ah!q=XgJpA]X~> -o`"omrOW":q7?S6q76R-pA]X~> -o`"n/r>P\:q&986q&05NpA]X~> -o`"p:r:]jqq"FLorVqB~> -o`"o_r4;V1pq$8/rVqB~> -o`"n4r#5;1p_rr/rVqB~> -q>^=&lLsr_rr7K~> -q>^="lFQ]trr7K~> -q>^ -r;ZL%lh9u^!<7Q~> -r;ZL!lal`s!<7Q~> -r;ZKllPfEs!<7Q~> -s8V^%lh9r]J,~> -s8V^!lal]rJ,~> -s8V]llPfBrJ,~> -!<;X$lLsl]J,~> -!<;WulFQWrJ,~> -!<;Wkl5K -o+1*Z!<2orq[\2~> -o*afo!<2orq[7o~> -o)\(o!<)iqqZ23~> -pCI6&!4qLi!4r%,r=8o.J,~> -pC$s"!1<)`!1 -pAt6m!']]e!'^8Zr;couJ,~> -q@EH&!7gE/!7gcBJ,~> -q@!0"!6XW=!6Y!7J,~> -q>pHm!3>E(!3>emJ,~> -!<<$/p\t6llh1>Wqu6Zqr;V9~> -!<<$+p\t6klad)oqu6Zqr;V9~> -!<<$!p\t6jlP]d#qu6Zqr;V9~> -o)A^)mIgOpo`'F~> -o)A]gmCE:ro`'F~> -o)A]*m2>t?o`'F~> -o)J%Lo`'F~> -o)A^^mCE;io`'F~> -o)A^Xm2>umo`'F~> -nc&U,n+Hb!oDa=~> -nc&Tmn%&M&oDa=~> -nc&T7mhu1OoDa=~> -nG`L1nb)t)o)F4~> -nG`KYn[\^jo)F4~> -nG`J5nJVBPo)F4~> -nG`LTnb)tLo)F4~> -nG`LPn[\_ao)F4~> -nG`LDnJVD_o)F4~> -n,ECEoC`1@nc++~> -n,EC;o==qOnc++~> -n,EC$o,7VBnc++~> -mf37sqY'n!!9*GIJ,~> -mf37oqRZY6!86lAJ,~> -mf37eqAT>6!6"C,J,~> -n,N:rr:^%!nGe"~> -n,N:nr4;e6nGe"~> -n,N:dr#5J6nGe"~> -n,N:r"M_q?l,EQ2nGe"~> -n,N:n"K7`mYaPCsnGe"~> -n,N:d"D]>%)(,7^nGe"~> -n,N:rr;Z[*nGe"~> -n,N:nr;Z[&nGe"~> -n,N:dr;ZZqnGe"~> -n,N:rr;Z[*nGe"~> -n,N:nr;Z[&nGe"~> -n,N:dr;ZZqnGe"~> -n,N:rr;Z[*nGe"~> -n,N:nr;Z[&nGe"~> -n,N:dr;ZZqnGe"~> -n,N:rr;Z[*nGe"~> -n,N:nr;Z[&nGe"~> -n,N:dr;ZZqnGe"~> -n,N:rr;Z[*nGe"~> -n,N:nr;Z[&nGe"~> -n,N:dr;ZZqnGe"~> -n,N:rr;Z[*nGe"~> -n,N:nr;Z[&nGe"~> -n,N:dr;ZZqnGe"~> -n,N:rr;Z[*nGe"~> -n,N:nr;Z[&nGe"~> -n,N:dr;ZZqnGe"~> -n,N:rr;Z[*nGe"~> -n,N:nr;Z[&nGe"~> -n,N:dr;ZZqnGe"~> -n,N:rr;ZX)nc++~> -n,N:nr;ZX%nc++~> -n,N:dr;ZWpnc++~> -nc/Frr;ZL%p&BO~> -nc/Fnr;ZL!p&BO~> -nc/Fdr;ZKlp&BO~> -oDeRrr;ZI$pA]X~> -oDeRnr;ZHupA]X~> -oDeRdr;ZHkpA]X~> -o`+Xrr;ZI$pA]X~> -o`+Xnr;ZHupA]X~> -o`+Xdr;ZHkpA]X~> -p&FasqZ$:#pA]X~> -p&FaoqZ$9tpA]X~> -p&FaeqZ$9jpA]X~> -p&Fdtp]((#p&BO~> -p&Fdpp]('tp&BO~> -p&Fdfp]('jp&BO~> -%%EndData -showpage -%%Trailer -end -%%EOF diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/egg.png b/Master/texmf-dist/doc/latex/flowfram/samples/egg.png deleted file mode 100644 index f67b013c345..00000000000 Binary files a/Master/texmf-dist/doc/latex/flowfram/samples/egg.png and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/news.pdf b/Master/texmf-dist/doc/latex/flowfram/samples/news.pdf deleted file mode 100644 index 2a9dd9cc99d..00000000000 Binary files a/Master/texmf-dist/doc/latex/flowfram/samples/news.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/news.tex b/Master/texmf-dist/doc/latex/flowfram/samples/news.tex deleted file mode 100644 index bb2d8192f5a..00000000000 --- a/Master/texmf-dist/doc/latex/flowfram/samples/news.tex +++ /dev/null @@ -1,204 +0,0 @@ -\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{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{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 deleted file mode 100644 index 22223c09857..00000000000 Binary files a/Master/texmf-dist/doc/latex/flowfram/samples/news2.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/news2.tex b/Master/texmf-dist/doc/latex/flowfram/samples/news2.tex deleted file mode 100644 index c5e404241d9..00000000000 --- a/Master/texmf-dist/doc/latex/flowfram/samples/news2.tex +++ /dev/null @@ -1,231 +0,0 @@ -\documentclass[12pt]{article} - -\usepackage{graphicx} -\usepackage{color} -\usepackage{flowfram} -\usepackage[a4paper,margin=20mm]{geometry} - -% define lengths to help compute positions -\newlength\leftX -\newlength\leftY -\newlength\leftH -\newlength\leftW - -\newlength\rightX -\newlength\rightY -\newlength\rightH -\newlength\rightW - -% Create a static frame to put title in -\setlength{\leftH}{3cm} -\setlength{\leftY}{\textheight} -\addtolength{\leftY}{-\leftH} - -\newstaticframe[1]{\textwidth}{\leftH}{0pt}{\leftY}[title] - -% Create left hand frame. This will have an L shape - -\setlength{\leftH}{13cm} -\adjustheight{\leftH} -\addtolength{\leftY}{-\leftH} - -\newstaticframe[1]{\textwidth}{\leftH}{0pt}{\leftY}[L] -\setstaticframe*{L}{shape={\parshape=24 -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt 0.5\linewidth -0pt \linewidth -0pt \linewidth -0pt \linewidth -0pt \linewidth -0pt \linewidth -0pt \linewidth -0pt \linewidth -}} - -% egg picture - -\addtolength{\rightY}{\leftY} -\addtolength{\rightY}{73mm} -\setlength{\rightW}{1.1in} -\setlength{\rightH}{1.5in} -\setlength{\rightX}{\textwidth} -\addtolength{\rightX}{-\rightW} -\newstaticframe[1]{\rightW}{\rightH}{\rightX}{\rightY}[egg] - -% set contents -\setstaticcontents*{egg}{\includegraphics[scale=2]{egg}} - -% Right hand static frame - -\setlength{\rightX}{0.5\textwidth} -\addtolength{\rightX}{\columnsep} -\setlength{\rightW}{\textwidth} -\addtolength{\rightW}{-\rightX} -\setlength{\rightY}{\leftY} -\addtolength{\rightY}{2.8cm} -\setlength{\rightH}{\leftH} -\addtolength{\rightH}{-2.8cm} - -\newstaticframe[1]{\rightW}{\rightH}{\rightX}{\rightY}[right] - -\setstaticframe*{right}{shape={\parshape=15 -0pt \linewidth -0pt \linewidth -0pt \linewidth -0pt 0.75\linewidth -0pt 0.65\linewidth -0pt 0.75\linewidth -0pt 0.8\linewidth -0pt 0.8\linewidth -0pt \linewidth -0pt \linewidth -0pt \linewidth -0pt \linewidth -0pt \linewidth -0pt \linewidth -0pt \linewidth -}} - -% insert vertical and horizontal rules, can't use -% \insertrule as left hand -% frame is actually the width of the typeblock -\addtolength{\rightX}{-0.5\columnsep} -\newstaticframe[1]{0pt}{\rightH}{\rightX}{\rightY}[Lrule] -\setstaticcontents*{Lrule}{\makebox[0pt][l]{% -\rule{\columnseprule}{\rightH}\rule{\rightW}{\columnseprule}}} - -% middle heading - -\setlength{\leftH}{2cm} -\addtolength{\leftY}{-\leftH} - -\newstaticframe[1]{\textwidth}{\leftH}{0pt}{\leftY}[midhead] - -% insert horizontal rule -\inserthrule*{static}{L}{static}{midhead} - -% flow frames -\twocolumninarea{\textwidth}{\leftY}{0pt}{0pt} - -% static frame for sheep picture - -\newstaticframe[1]{1.6in}{1.6in}{0pt}{0pt}[sheep] - -% set contents -\setstaticcontents*{sheep}{\includegraphics[scale=2]{sheep}} - -\setcounter{secnumdepth}{0} -\setlength{\sdfparindent}{\parindent} - -\begin{document} -\begin{staticcontents*}{title} -\begin{center} -\bfseries\Huge -Fairy Tale Times -\end{center} -\hfill Issue 2. 7 December 2005. -\end{staticcontents*} - -\begin{staticcontents*}{L} -\section{Killer Wolf on the Loose} - -The authorites are warning of a killer wolf on the -loose. He has so far devoured an old grandmother and -two pig brothers. He is described as being furry with -big eyes and big teeth. - -On Monday this week he broke into a house, and devoured -an old lady. He then disguised himself as the old lady -in order to deceive her granddaughter. Luckily for the little -girl a woodsman arrived in time to rescue her. Parents are -being cautioned not to let their children wander about on -their own, and to remind them not to talk to strangers. - -The next day the wolf struck again, this time targeting two -pig brothers who had most incautiously made their dwellings -on the cheap using inadequate materials. The wolf also made -an attempt on the third pig brother, but was unable to break -into his house. - -Police are appealing to the public for witnesses, and remind -people to keep their doors securely fastened at all times. -``Always ask to see identification,'' said one police advisor, -``and invest in improving the general security of your property.'' -\end{staticcontents*} - -\begin{staticcontents*}{right} -\section{Tragic Wall Accident} - -An egg person tragically fell from a six foot wall yesterday -afternoon and was smash\-ed to pieces. The king's cavalry rushed -to the scene, but regretted that they were unable to help him. - -Humpty Dumpty was believed to be sitting on the wall when he fell. Police have ruled out foul play, but -are advising people not to play on high walls, particularly -those vulnerable members of the population suffering from -eggshell syndrome. - -\small\em -%Wall related incidents this year: page 3 -% -Exclusive interview with one of the King's men on page 6 -\end{staticcontents*} - -\begin{staticcontents*}{midhead} -\section{Relief as Missing Sheep Finally Return Home} -\end{staticcontents*} - -There was much celebration yesterday morning when Little Bo -Peep's sheep finally returned home. They had been missing -for more than a week. - -``I just didn't know where to find them,'' the shepherdess -stated, ``but I was told to leave them alone and they'd come -home.'' - -\parshape=8 -0pt \linewidth -0pt \linewidth -0.3\linewidth 0.7\linewidth -0.3\linewidth 0.7\linewidth -0.25\linewidth 0.75\linewidth -0.25\linewidth 0.75\linewidth -0pt \linewidth -0pt \linewidth -Unusual advice perhaps, but it seems to have worked -as they did indeed come home. Eye witnesses reported that their -tails were wagging behind them. -``I'm just so happy they've come home,'' Little Bo Peep said -in a press conference yesterday afternoon. -The sheep themselves made no comment, and police are% -\framebreak\parshape=0 -still trying to determine what happened to them. -The big bad wolf is reportedly helping them with their inquiries. - -\noindent\hrulefill - -This is a sample document illustrating the -flowfram package. It uses \TeX's \verb|\parshape| command -to create irregularly shaped paragraphs. This can be a complicated -and somewhat tiresome task, and is generally not recommended. -Using the shapepar package provides you with more intricate -shapes, but as its documentation says, it is not intended -for use in large documents. - -\hfill Nicola Talbot -\end{document} diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/poster.pdf b/Master/texmf-dist/doc/latex/flowfram/samples/poster.pdf deleted file mode 100644 index f17725bcfea..00000000000 Binary files a/Master/texmf-dist/doc/latex/flowfram/samples/poster.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/poster.tex b/Master/texmf-dist/doc/latex/flowfram/samples/poster.tex deleted file mode 100644 index 05fe2131f7d..00000000000 --- a/Master/texmf-dist/doc/latex/flowfram/samples/poster.tex +++ /dev/null @@ -1,363 +0,0 @@ -\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 deleted file mode 100644 index 117bf0c58a2..00000000000 --- a/Master/texmf-dist/doc/latex/flowfram/samples/sheep.eps +++ /dev/null @@ -1,176 +0,0 @@ -%!PS-Adobe-3.0 EPSF-3.0 -%%Creator: GIMP PostScript file plugin V 1.17 by Peter Kirchgessner -%%Title: sheep.eps -%%CreationDate: Mon Nov 21 11:14:35 2005 -%%DocumentData: Clean7Bit -%%LanguageLevel: 2 -%%Pages: 1 -%%BoundingBox: 14 14 56 48 -%%EndComments -%%BeginProlog -% Use own dictionary to avoid conflicts -10 dict begin -%%EndProlog -%%Page: 1 1 -% Translate for offset -14.173228346456694 14.173228346456694 translate -% Translate to begin of first scanline -0 33.115503665490088 translate -41.754330708661421 -33.115503665490088 scale -% Image geometry -58 46 8 -% Transformation matrix -[ 58 0 0 46 0 0 ] -% Strings to hold RGB-samples per scanline -/rstr 58 string def -/gstr 58 string def -/bstr 58 string def -{currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop} -{currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop} -{currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop} -true 3 -%%BeginData: 7356 ASCII Bytes -colorimage -a8^Y~> -a8^Y~> -a8^Y~> -g&D3SrVQKgrqc]oq#>j~> -g&D*PrVZKmqu- -g&D3Sr;$0`rqQQlq#>j~> -g&D3SrVQKgrqc]oq#>j~> -g&D*PrVZKmqu- -g&D3Sr;$0`rqQQlq#>j~> -li7"ao`#-pr;??_o()eM"SDKdqu-ElJ,~> -li7"ao`#F#r;?<]naZ);nFQDNqYg -li7"ao`#F#qtp'VmHs6+m-jTBq>C-iJ,~> -pAb$hs8Dcks8DoqrVZ`lqm-UeiSinboCMeVrVcbH~> -pAb*jrVcZlrql`nqY^Hmq>7/ugtgfGlLONArVc]pJ,~> -pAY-lr;HZnr;6Kis8;iorVQZiqi_?8eC<45mdBiIr;HYG~> -q>^Hns8;oo!;c]j"Shfgq"Xd]s7lWi#5\/kq"*e9rNcgPb0&)ckihX8qu-PF~> -q>UQrrVcZnqZQckq"XU_p]1'dp&Ojdq#:'kp[RG0rMg1A`5KgMjlQ%/qYgGE~> -q>Uj%rVcWiq>'g[p@e1YpAX[aoD\@^pAFXeo^:\srK@Pn['[KihVR\rq>L>D~> -q>^Hns8;oo!;c]j"Shfgq"Xd]s7lWi#5\/kq"*e9rNcgPb0&)ckihX8qu-PF~> -q>UQrrVcZnqZQckq"XU_p]1'dp&Ojdq#:'kp[RG0rMg1A`5KgMjlQ%/qYgGE~> -q>Uj%rVcWiq>'g[p@e1YpAX[aoD\@^pAFXeo^:\srK@Pn['[KihVR\rq>L>D~> -qu?]q#Q4JrqY9aVo`"C`naGr7qsOm]nac8CoCMJ8gt_k7rj`9Kak>A4p%A7^s*t~> -qu?]q%fH5$q=sUSo'u5=n*TN/qsFFPs7-*Z"7G:'f_qiLYm7bUe^`jTo_\XfJ,~> -qu?]p%f?,!q"F7Jn*TK.lfmZsroj@G$L6sEmI0K2l/'\0rK@SXS=HC]b0&]5nbW7bJ,~> -r;RB.r;?Edq"4+Emd06&kiLjbir7p9ireE+l0834"QnLbcG9Fcrj3$@^!+^YnF65Ps8RT~> -r;RK0r;?Ecp[dn@m-3]qk2P=WhVI&Frnn1DjQ>UgkNCmXaN1pkWrB%+XgQ0gh!XV*rr<"K~> -r;RK0qtp0]p$h>1k2YFXhqH`8e^W."rmq8,h;I5ji<7o[]"4d -r;RB.r;?Edq"4+Emd06&kiLjbir7p9ireE+l0834"QnLbcG9Fcrj3$@^!+^YnF65Ps8RT~> -r;RK0r;?Ecp[dn@m-3]qk2P=WhVI&Frnn1DjQ>UgkNCmXaN1pkWrB%+XgQ0gh!XV*rr<"K~> -r;RK0qtp0]p$h>1k2YFXhqH`8e^W."rmq8,h;I5ji<7o[]"4d -rVmK/r;-9ao()22j5](Rg=k0/ebmnreI1!^gt^cDhqQSt`4>cO$FI:[_q+, -rVmN0r;-9`nF5c*i8EDDe^`*pd*DX8%aNGJdad"&g=tB6c+Ufqql1"(YIqNrkiha=s8RT~> -rVmN/qtTsYm-Nijf@SKsb0%`A_nl>f%`-*%`lZNOd*^7b^T=N+qi_AORB!:+iSjD+s8RT~> -rVmN/qtKjTlg*Tdf%/6obKIuH`l7qq'#hl1aNMlSdF-IiahY^$['R(=rj)p=^:r"Vjn/KMrdX~> -rVmN.qY'XPl07*XdF$.Y`5KO.^qTf]'#),q_SsU;bg"DT_mm4ZX/`0"ri-:,[^OB=iq**IrdX~> -rVmN.q=O=Gj5\b9`PoO$['[*AYH7`('!/7=Z*h0S^;%FqZDFCcP`q:2rf[YSUSGNWg[P+>rdX~> -s8W,u&cDFpo'>8nf[%X[_na%%]tD#U])TAN]t_G$`Q-$<_nEam[/709[(O&tjQ,q0rr.E~> -s8W,u&c;@nn`eoee&fGB]XbM\[C!==ZN%6>[CEi\^;.Ou]=#&MX8An'XL,@ViSjA)rr.E~> -s8W,t&c24gmGlaIa1JR[WhuSfTq@tUSI_ -s8W,u&cDFpo'>8nf[%X[_na%%]tD#U])TAN]t_G$`Q-$<_nEam[/709[(O&tjQ,q0rr.E~> -s8W,u&c;@nn`eoee&fGB]XbM\[C!==ZN%6>[CEi\^;.Ou]=#&MX8An'XL,@ViSjA)rr.E~> -s8W,t&c24gmGlaIa1JR[WhuSfTq@tUSI_ -s8W,t%/]bdmc<'Sc,76.]"%aKs0_s9[/RK4[KF%N]"J$UrNcR5[']e<$+7L]dH9Taqu6SF~> -s8W,s&c21em,?IDa1SgfZEUO9Y-"i(XT,C*Y-5.:[/RK3WWK<'X8T%)XL>R\j5]e/rr.E~> -s8W,s'D_4^kLmu!\#H'pSXPt7R$X/*Q2[*LQNW\ESXlGQU&C/VQB[X4P6mPMUV5I -s8W,s!;ZGss0_p8qm?=.r3ZL4"1PeM\,EW7\@&aCZjF7]`S'PAp\b$iJ,~> -s8W,s!;QAis/u=%ri?!tr2]k"rNH1"!jA`.rMp7/^:r+\kk=rRrdX~> -s8W,r!;H;Qs-NePrK[DIrKI2E#*kOAR@9S4rK@;OQBqN7$C.']XNBG[o_\XeJ,~> -s8W,s!;ZGss0_p8qm?=.r3ZL4"1PeM\,EW7\@&aCZjF7]`S'PAp\b$iJ,~> -s8W,s!;QAis/u=%ri?!tr2]k"rNH1"!jA`.rMp7/^:r+\kk=rRrdX~> -s8W,r!;H;Qs-NePrK[DIrKI2E#*kOAR@9S4rK@;OQBqN7$C.']XNBG[o_\XeJ,~> -"TSK!r:p)os0Md4rj;@)s0Vd5!4;^2&A,Nb\[JrQ][5$dnaZGRs8RT~> -"TSK!r:g#es/Q."ri>^ls/Q7'Xf\]'WXuMBZEUL7WjKsmiU?72rVunJ~> -"TSJuqt0]Js-*MIrfm)>s-3MK!1!MH&>,PcS!]S,TY8%klg+ -"TSJuqtBils0V=&rj;^5s0Vg7&\Gls_o0F/^s:s!n+c\Urr<"K~> -"TSJuqt9cbs/Y[is/Z.#s/Z1&&[T$\]Y1qh\B*O`mJ$APrr<"K~> -"TSJtqXaNHs-3&;s-+@cQBmf$R$aJBWMuqsW27&Te`l_uqYpNpJ,~> -%fcP*qt9@9imbuf]XG2Sn[&5%rj -%fcP)qXj+2hp9'P[&pC0nZ)Shri?^6YctUOa2cKSe(E^Kme6PTrr2qJ~> -%fcP(q=3Uuf#"SmT9ke,nWX!;!1!PL&XSuVUTV,:_8jU@h!+(qqYL0is*t~> -%fcP*qt9@9imbuf]XG2Sn[&5%rj -%fcP)qXj+2hp9'P[&pC0nZ)Shri?^6YctUOa2cKSe(E^Kme6PTrr2qJ~> -%fcP(q=3Uuf#"SmT9ke,nWX!;!1!PL&XSuVUTV,:_8jU@h!+(qqYL0is*t~> -%fcP)qXs77iR>fd]=,)Rn[&5%s0WHI\%B8gb15&!k2u%%q"Xddrr)kI~> -%fcP(q=O"0hTimNZ`^@0nZ)Shs/Zg7YHtRH`6clbj5]Fqp\4Ubrr)kI~> -%fcM&q!mIre\J>jT9tk-nWX!;'U=uMQ^OG:VmO@Zd+d=9me$/Krr2lrJ,~> -%fcP*qt9@8iR>fd]XG2So<\A%s0W?F\@fJlcIpn3mHsN?rVcTmJ,~> -%fcM(qXj+1hTimN[&pC0o;__hs/Z^4YI([LaOSi"lg+-:rVcTmJ,~> -%fcM'q=3Rse\SDkT9ke,o99-;&XAZJQ^XS?Wk$6nf]D5_pAFjbs*t~> -%fcP*qt9@8iR>fd]XG2So<\A%s0W?F\@fJlcIpn3mHsN?rVcTmJ,~> -%fcM(qXj+1hTimN[&pC0o;__hs/Z^4YI([LaOSi"lg+-:rVcTmJ,~> -%fcM'q=3Rse\SDkT9ke,o99-;&XAZJQ^XS?Wk$6nf]D5_pAFjbs*t~> -%fcP*qtBF;j425l]XG2Spp9k)rj2U2%(3RV]>W%Nh!":up\XacJ,~> -%fcP*qt9:5i6] -%fcM'q=<\"f>FhsTU1n-plk]As-3SKrf[kWQ'IZ&T:`0rc->,3m.C,Ks*t~> -%0->(qtKUBk1Il#^UO'Hs0Ma4s0W'>[C*BKZa9V;$amRW`6d>rl1=NAr:p;B~> -%0->(qtBIj~> -%0-;%q=Nt,gW6b/Um_(Ds-!eSQ'R`&QBmf#PEYs0$^R?SX1cj*i9p%+qtU2A~> -%fcP+r:ojIl.s_5`4WRgr3lX5"1G\K\Gj#>\$c.@%(!@R]>`4Vi9U%-q>L*gJ,~> -&-)Y+qtT^Dk1Rr$]sOuHXo>L%XTku5Yd(F:YPkR&Wsl#0Za7Bjgt_/coD/=Zs*t~> -&-)V)qY'=6hp/pKXIkoKQi -%fcP+r:ojIl.s_5`4WRgr3lX5"1G\K\Gj#>\$c.@%(!@R]>`4Vi9U%-q>L*gJ,~> -&-)Y+qtT^Dk1Rr$]sOuHXo>L%XTku5Yd(F:YPkR&Wsl#0Za7Bjgt_/coD/=Zs*t~> -&-)V)qY'=6hp/pKXIkoKQi -&-)Y,r;-*Smc2sPc,@B3^&,GC]tXK]s1]5\]"#8Z[^NTR^V@nAj5]P#pA=g`s*t~> -&-)Y,r;$!Om,-=Ba1\sk[JR<=[C -&-)Y+qtKXDkL[er\?)L%U&L_aT,ODuV5:&bUnO?JR[BG.QC=VFZc1PJk48*=r:p;B~> -s8W,t%/]hkoBbGpf[7mcaN+;"s2P/]b5TTaaqMe3^V@Io]=bnu`mNT*kjnNDqu- -s8W,t$i9Vfn`eoee'#\J_>D"K_SlGms25Sc]!o/VZa7$K^qe.GjlQ"+p\Xpas*t~> -s8W,s$i0J`mc2jJaM"sfYktU)Z*aM -s8W,u')_V"p@@P8j5&DA!7UuKe^i='rRq5%'@P1Kb/hTBa32lXg>qYgp%eF]rqQMD~> -s8W,u')_Rup$h51i7ZZ2!7(WFd*^7irmV_6dF$4[`5KL,^VIe3bgtb=lh'uIr;HEjJ,~> -s8W,u'DqRroBbMtf[%[]!5\^9_o9U8aSs<]`=p"t['[*@Y-54H^<>0kk4/3?qu- -s8W,u')_V"p@@P8j5&DA!7UuKe^i='rRq5%'@P1Kb/hTBa32lXg>qYgp%eF]rqQMD~> -s8W,u')_Rup$h51i7ZZ2!7(WFd*^7irmV_6dF$4[`5KL,^VIe3bgtb=lh'uIr;HEjJ,~> -s8W,u'DqRroBbMtf[%[]!5\^9_o9U8aSs<]`=p"t['[*@Y-54H^<>0kk4/3?qu- -rVmQ0qt^']oCMD8k2l['!!)'?jQ5S(k5XKTi8!#=ec5^#!8cSnm.9iDqtp?ds*t~> -rVmQ0qt^'\o()/2j5U-s!!(s9iSrqtj8\$Mgt1'*d/X0n!8?/cl1+< -rVnDGqY0aUmdB8sgY2_Z!!(X'f\50:gtUK6e'5tT`;fnU!79*Gj6l@.q>'s_s*t~> -rVmE-rVQKgq"XRRnaQVJ!!)Ken,W%YnGhkgm-3WniW&u -rVnDIrVQKfp\4@Nn*^8D!!)ESmdKZ6n*]N-lK7*chZ*Z5!9N>.nb2\Pr;?Nfs*t~> -rVmB,r;-9bp%@nClg"Q7!!*#_!UB%NlMouZjP\eIec5^#!8cSpmI^&Gqtp?ds*t~> -rVmE-rVQKgq"XRRnaQVJ!!)Ken,W%YnGhkgm-3WniW&u -rVnDIrVQKfp\4@Nn*^8D!!)ESmdKZ6n*]N-lK7*chZ*Z5!9N>.nb2\Pr;?Nfs*t~> -rVmB,r;-9bp%@nClg"Q7!!*#_!UB%NlMouZjP\eIec5^#!8cSpmI^&Gqtp?ds*t~> -r;R9+rVcZkqtg-_pAjme!;HKfrqR9&p@e.Ln*fWD!:9dVnauVQqY^ -r;R?-rVcZjqYBp[p&Oac!;?0]rV.*#p%@qGmHs3>!:'XRn+6;Lq>C3ipA]X~> -r;S5Fr;?Hfq=jUToDnF^!;#jTp@n:So^_SAm-3cs!!)-]lg+'5q"Xaar:^/@~> -q>Uj%rVcZlqtgBi!!)oqr"]2.r;HNiq=s[Wo`,!b!;Q?bqu$Bjo`'F~> -q>UQrrVcZnqZ[&s!!)lmqu-F*rVHBcp\"4O!!)Wkp\4L[r;?Ncs*t~> -q>UQrr;?HkqAfS2!!)ikqYU3fqu$9cp@RqHnGiRZ!;,pXq>:'eo`'F~> -q#C6j"9AE$!<2ips8N&rs8*0"!!)iqqtp -q#C6j"9AE$!<2ips8N&rs7uur!!)iqqtp~> -q#C?mrqus"r;ZisqZ$Tps82il$MXT$p]1-cqu$EkoDa=~> -q#C6j"9AE$!<2ips8N&rs8*0"!!)iqqtp -q#C6j"9AE$!<2ips8N&rs7uur!!)iqqtp~> -q#C?mrqus"r;ZisqZ$Tps82il$MXT$p]1-cqu$EkoDa=~> -o)Adlrr<&ls8W''r;Zir!<)lqnGe"~> -o)Adlrr<&ls8Mus!!3#urr)?dJ,~> -o)Adlrr<&ls8W$&qu?`p!;ucnnGe"~> -o)Adlrr<&is8N'"rrDHdJ,~> -o)Adlrr<&is8N'"rrDHdJ,~> -o)Adlrr<&is8N'"rrDHdJ,~> -o)Adlrr<&is8N'"rrDHdJ,~> -o)Adlrr<&is8N'"rrDHdJ,~> -o)Adlrr<&is8N'"rrDHdJ,~> -o)A^js8E#is8N'"rrDHdJ,~> -o)A^js8E#is8N'"rrDHdJ,~> -o)A^js8E#is8N'"rrDHdJ,~> -o)A[in,NCf!<<#un,In~> -o)A[in,NCf!<<#un,In~> -o)A[in,NCf!<<#un,In~> -o)J^inGiIfm/MS~> -o)J^inGiIfm/MS~> -o)J^inGiIfm/MS~> -o)J^inGiIfm/MS~> -o)J^inGiIfm/MS~> -o)J^inGiIfm/MS~> -%%EndData -showpage -%%Trailer -end -%%EOF diff --git a/Master/texmf-dist/doc/latex/flowfram/samples/sheep.png b/Master/texmf-dist/doc/latex/flowfram/samples/sheep.png deleted file mode 100644 index d7cb3517613..00000000000 Binary files a/Master/texmf-dist/doc/latex/flowfram/samples/sheep.png and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/flowfram/sheep.eps b/Master/texmf-dist/doc/latex/flowfram/sheep.eps new file mode 100644 index 00000000000..525aec2992e --- /dev/null +++ b/Master/texmf-dist/doc/latex/flowfram/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/sheep.png b/Master/texmf-dist/doc/latex/flowfram/sheep.png new file mode 100644 index 00000000000..d7cb3517613 Binary files /dev/null and b/Master/texmf-dist/doc/latex/flowfram/sheep.png differ diff --git a/Master/texmf-dist/source/latex/flowfram/flowfram.dtx b/Master/texmf-dist/source/latex/flowfram/flowfram.dtx index 644416a095f..983fb08b65f 100644 --- a/Master/texmf-dist/source/latex/flowfram/flowfram.dtx +++ b/Master/texmf-dist/source/latex/flowfram/flowfram.dtx @@ -1,12 +1,12 @@ %\iffalse -% flowfram.dtx generated using makedtx version 0.91b (c) Nicola Talbot +% 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 2007/3/9 11:23 +% Created on 2007/8/21 13:54 %\fi %\iffalse %<*package> @@ -35,21 +35,23 @@ %<*driver> \documentclass{ltxdoc} -\CheckSum{8125} +\CheckSum{8345} \PageIndex \usepackage{url} \usepackage[colorlinks,hyperindex=false, pdfauthor={Nicola L C Talbot}, pdftitle={Documented Source Code for flowfram.sty}]{hyperref} -\usepackage[style=altlist,toc,number=none]{glossary}[2005/07/15] +\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}} -\newcommand{\cmdname}[1]{\texttt{\symbol{92}#1}} \renewcommand{\usage}[1]{\textit{\hyperpage{#1}}} \renewcommand{\main}[1]{\hyperpage{#1}} @@ -60,77 +62,79 @@ pdftitle={Documented Source Code for flowfram.sty}]{hyperref} \makeatother -\storeglosentry{typeblock}{name=typeblock,description={The +\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 \cmdname{textwidth} -and \cmdname{textheight}}} +The width and height of this area are given by \cs{textwidth} +and \cs{textheight}},type=secondary} -\storeglosentry{flow}{name=flow frame,description={The frames in +\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.}} +every page},type=secondary} -\storeglosentry{static}{name=static frame,description={Frames +\newglossaryentry{static}{name=static frame,description={Frames in which text is fixed in place. The contents are fixed until -explicitly changed.}} +explicitly changed},type=secondary} -\storeglosentry{dynamic}{name=dynamic frame,description={Frames +\newglossaryentry{dynamic}{name=dynamic frame,description={Frames in which text is fixed in place, but the contents are re-typeset -after each page.}} +after each page},type=secondary} -\storeglosentry{frame}{name=frame,description={A rectangular +\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.}} +flow, static and dynamic},type=secondary} -\storeglosentry{fcmd}{name=frame making command,description={A +\newglossaryentry{fcmd}{name=frame making command,description={A \LaTeX\ command which places some kind of border around its -argument. For example: \cmdname{fbox}.}} +argument. For example: \cs{fbox}},type=secondary} -\storeglosentry{pglist}{name=page list,description={A list of +\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.}} +page counter, not the absolute physical page number}, +type=secondary} -\storeglosentry{pgrange}{name=page range,description={Page +\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}.}} +\texttt{\textless7} or \texttt{\textgreater9}}, +type=secondary} -\storeglosentry{bbox}{name=bounding box,description={The smallest -possible rectangle that completely encompasses the object.}} +\newglossaryentry{bbox}{name=bounding box,plural=bounding boxes, +description={The smallest +possible rectangle that completely encompasses the object}, +type=secondary} -\newacronym{IDN}{identification number}{description={A unique +\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.}} +have IDN 1}]{idn}{IDN}{identification number} -\newacronym{IDL}{identification label}{description={A unique +\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.}} +refer to the frame by label instead of by its +IDN}]{idl}{IDL}{identification label} -\makeglossary +\makeglossaries \begin{document} \DocInput{flowfram.dtx} \end{document} % %\fi -%\def\filedate{9th March 2007} -%\def\fileversion{1.07} -%\def\filename{flowfram.dtx} -%\def\docdate{9th March 2007} -% -%\title{Documented Source Code for flowfram.sty v\fileversion} +%\title{Documented Source Code for flowfram.sty v1.10} %\author{Nicola L. C. Talbot} -%\date{\docdate} +%\date{20th Aug 2007} %\maketitle % %This is the documented source code for the flowfram package. @@ -138,7 +142,7 @@ refer to the frame by label instead of by its IDN.}} % %\tableofcontents % -%\printglossary +%\printglossary[type=secondary] % %\StopEventually{\PrintIndex} % @@ -153,7 +157,7 @@ refer to the frame by label instead of by its IDN.}} % Declare package, and identify it as a \LaTeXe\ package. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{flowfram}[2007/03/09 v1.07] +\ProvidesPackage{flowfram}[2007/08/21 v1.10] % \end{macrocode} % Load packages needed by this package % \begin{macrocode} @@ -169,6 +173,7 @@ refer to the frame by label instead of by its IDN.}} \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 @@ -177,11 +182,13 @@ refer to the frame by label instead of by its IDN.}} \newlength\fflabelsep \fflabelsep=1pt % \end{macrocode} -% \DescribeMacro{\fflabelfont} +%\end{macro} +%\begin{macro}{\fflabelfont} % The appearance of the label is set by the declaration: % \begin{macrocode} -\newcommand{\fflabelfont}{\small\sffamily} +\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. @@ -190,60 +197,71 @@ refer to the frame by label instead of by its IDN.}} \newif\ifshowmargins \newif\ifshowframebbox % \end{macrocode} +%\begin{macro}{\@ffdraft} % Set all draft settings. % \begin{macrocode} -\newcommand{\@ffdraft}{% +\newcommand*{\@ffdraft}{% \showtypeblocktrue \showmarginstrue \showframebboxtrue } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@ffnodraft} % Unset all draft settings. % \begin{macrocode} -\newcommand{\@ffnodraft}{% +\newcommand*{\@ffnodraft}{% \showtypeblockfalse \showmarginsfalse \showframebboxfalse } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@fr@meifdraft} % Draw \gls{bbox}. % \begin{macrocode} -\newcommand{\@fr@meifdraft}[3][\setffdraftcolor]{% +\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}{} +\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 \gls{frame}s border, you will have to create your own +% 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} +\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 \gls{bbox} frames +% 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 \gls{frame}s. +% 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} @@ -253,6 +271,7 @@ refer to the frame by label instead of by its IDN.}} #2\relax \fi} % \end{macrocode} +%\end{macro} % Should the thumbtabs include number, title, both or % neither? % \begin{macrocode} @@ -279,11 +298,12 @@ refer to the frame by label instead of by its IDN.}} % \begin{macrocode} \DeclareOption{color}{% \def\flowframecol{{black}}\def\flowframetextcol{{black}} -\renewcommand\@s@tffcol{\ifthenelse{\equal{\ff@col}{}}{}{% +\renewcommand*\@s@tffcol{\ifthenelse{\equal{\ff@col}{}}{}{% \expandafter\color\ff@col}} -\renewcommand\@s@tfftextcol{\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\renewcommand*\@s@tfftextcol{\ifthenelse{\equal{\ff@txtcol}{}}{}{% \expandafter\color\ff@txtcol}} -\renewcommand{\@ffbackground}[1]{\ifthenelse{\equal{\ff@backcol}{{none}}}{% +\renewcommand*{\@ffbackground}[1]{% +\ifthenelse{\equal{\ff@backcol}{{none}}}{% #1}{{\fboxsep=0pt\expandafter\colorbox\ff@backcol{#1}}}} } % \end{macrocode} @@ -337,7 +357,7 @@ refer to the frame by label instead of by its IDN.}} % account.\DescribeMacro{\chapterfirstpagestyle} % \begin{macrocode} \@ifundefined{chapter}{}{% -\newcommand{\chapterfirstpagestyle}{plain} +\newcommand*{\chapterfirstpagestyle}{plain} \let\@ff@OLD@chapter\@chapter \let\@ff@OLD@schapter\@schapter \renewcommand{\@chapter}{% @@ -347,23 +367,23 @@ refer to the frame by label instead of by its IDN.}} } % \end{macrocode} % Now get on with the package. First we need to set up -% a count register to store the number of \gls{flow}s, and +% a count register to store the number of \glspl{flow}, and % one to store the id number of the current \gls{flow}: % \begin{macrocode} \newcounter{maxflow} \newcounter{thisframe} -\c@maxflow=0 -\c@thisframe=0 +\c@maxflow=0\relax +\c@thisframe=0\relax % \end{macrocode} -% Define a counter to store the total number of \gls{static}s: +% Define a counter to store the total number of \glspl{static}: % \begin{macrocode} \newcounter{maxstatic} -\c@maxstatic=0 +\c@maxstatic=0\relax % \end{macrocode} -% Define a counter to store the total number of \gls{dynamic}s: +% Define a counter to store the total number of \glspl{dynamic}: % \begin{macrocode} \newcounter{maxdynamic} -\c@maxdynamic=0 +\c@maxdynamic=0\relax % \end{macrocode} % Define some temporary variables % \begin{macrocode} @@ -375,51 +395,62 @@ refer to the frame by label instead of by its IDN.}} \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\DescribeMacro{\sdfparindent}. +% 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:\DescribeMacro{\flowframesep} +% border is given by: % \begin{macrocode} \newlength\flowframesep \flowframesep=\fboxsep % \end{macrocode} -% The width of the frame is given by:\DescribeMacro{\flowframerule} +%\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 \gls{frame}s for that page will be shown. +% Only the \glspl{frame} for that page will be shown. %\DescribeMacro{\flowframeshowlayout} % \begin{macrocode} -\newcommand{\flowframeshowlayout}{% +\newcommand*{\flowframeshowlayout}{% \finishthispage {\@ffdraft\mbox{}\finishthispage\clearpage}} % \end{macrocode} -% If the \gls{flow}s are not all of the same width, the change +%\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". -% \DescribeMacro{\framebreak} % \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".\DescribeMacro{\finishthispage} +% "\finishthispage". % \begin{macrocode} \newcommand{\finishthispage}{% \@colN=\c@thisframe @@ -431,6 +462,8 @@ refer to the frame by label instead of by its IDN.}} \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} @@ -442,6 +475,7 @@ refer to the frame by label instead of by its IDN.}} \fi \fi} % \end{macrocode} +%\end{macro} % Disable "@twocolumn" flag, as it makes no sense. % \begin{macrocode} \@twocolumnfalse @@ -451,6 +485,7 @@ refer to the frame by label instead of by its IDN.}} % \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} @@ -459,6 +494,8 @@ refer to the frame by label instead of by its IDN.}} \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 @@ -485,6 +522,8 @@ refer to the frame by label instead of by its IDN.}} \def\ff@margin{#1}}}% } % \end{macrocode} +%\end{macro} +%\begin{macro}{\setmargin} % Set the margin for current \gls{flow}. % \begin{macrocode} \newcommand{\setmargin}{% @@ -494,9 +533,10 @@ refer to the frame by label instead of by its IDN.}} {\globalreversemargin}{\globalnormalmargin}% } % \end{macrocode} -%\DescribeMacro{\newflowframe} +%\end{macro} +%\begin{macro}{\newflowframe} % Create a new \gls{flow}. Syntax:\newline -% "\newflowframe["\meta{pages}"]{"\meta{width}"}{"\meta{height}"}{"\meta{x}"}{"\meta{y}"}["\meta{label}"]" +% \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, @@ -506,18 +546,20 @@ refer to the frame by label instead of by its IDN.}} % 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 \gls{frame}s to fit all +% 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 @@ -526,6 +568,8 @@ refer to the frame by label instead of by its IDN.}} \@ifstar\@snewflowframe\@newflowframe } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@snewflowframe} % Starred version sets boolean flag to indicate a border % \begin{macrocode} \newcommand{\@snewflowframe}{% @@ -533,6 +577,8 @@ refer to the frame by label instead of by its IDN.}} \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} @@ -541,6 +587,8 @@ refer to the frame by label instead of by its IDN.}} \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. @@ -610,6 +658,8 @@ refer to the frame by label instead of by its IDN.}} \@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. @@ -621,9 +671,11 @@ refer to the frame by label instead of by its IDN.}} \xdef\csname @col@id@\romannumeral#1\endcsname{\ff@label}% } % \end{macrocode} -% Check \IDL{} "#2" for \gls{flow} "#1" is unique +%\end{macro} +%\begin{macro}{\@ff@checkuniqueidl} +% Check \gls{idl} "#2" for \gls{flow} "#1" is unique % \begin{macrocode} -\newcommand{\@ff@checkuniqueidl}[2]{% +\newcommand*{\@ff@checkuniqueidl}[2]{% {\@colN=0\relax \whiledo{\@colN<\c@maxflow}{% \advance\@colN by 1\relax @@ -637,13 +689,15 @@ for flow frame \number\@colN}}{}% \fi }}} % \end{macrocode} -% Work out the \gls{flow} \IDN\ from the label. This -% iterates through the \gls{flow}s, so if you have a lot of -% them it is quicker to identifiy them by their \IDN\ -% rather than their \IDL. -% The \IDN\ stored in "\ff@id". +%\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 +\newcommand*{\@flowframeid}[1]{\@colN=0\relax \ff@id=0\relax \whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax \ifthenelse{% @@ -654,6 +708,7 @@ for flow frame \number\@colN}}{}% \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". % @@ -711,7 +766,7 @@ for flow frame \number\@colN}}{}% \PackageError{flowfram}{Missing value for 'oddy' key}{}}{}% \def\ff@oddy{#1}} % \end{macrocode} -% New \IDL{} for \gls{frame} is stored in "\ff@label". +% 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}{}}{}% @@ -732,7 +787,7 @@ for flow frame \number\@colN}}{}% \def\ff@frametype{#1}}}} % \end{macrocode} % Frame's border colour. (This may not work for non-standard -% \gls{fcmd}s.) +% \glspl{fcmd}.) % \begin{macrocode} \define@key{flowframe}{bordercolor}{\ifthenelse{\equal{#1}{}}{% \PackageError{flowfram}{Missing value for 'bordercolor' key}{}}{}% @@ -754,7 +809,7 @@ for flow frame \number\@colN}}{}% \PackageError{flowfram}{Missing value for 'backcolor' key}{}}{}% \def\ff@backcol{#1}} % \end{macrocode} -% \useGlosentry{pglist}{Page list} for which the \gls{frame} should appear. +% \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}{}}{}% @@ -775,7 +830,7 @@ to certain pre-defined rules) or a length}}{}} \define@key{flowframe}{angle}{\def\ff@angle{#1}% } % \end{macrocode} -% This key is only for \gls{flow}s: +% This key is only for \glspl{flow}: % \begin{macrocode} \define@key{flowframe}{margin}{% \ifthenelse{\equal{#1}{left} \or \equal{#1}{right} @@ -784,47 +839,50 @@ to certain pre-defined rules) or a length}}{}} 'margin' key}{Key 'margin' can only take the values 'left' or 'right'}}} % \end{macrocode} -% This key is only for \gls{static}s: +% 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 \gls{dynamic}s: +% 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 \gls{static}s and \gls{dynamic}s. +% 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 \gls{static}s and \gls{dynamic}s. +% 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 \gls{flow}s, +% frames. This just iterates through all the \glspl{flow}, % and sets each one in turn. -%\DescribeMacro{\setallflowframes} % \begin{macrocode} -\newcommand{\setallflowframes}[1]{% +\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. -%\DescribeMacro{\setflowframe} % \begin{macrocode} -\newcommand{\setflowframe}{\@ifstar\@ssetflowframe\@setflowframe} +\newcommand*{\setflowframe}{\@ifstar\@ssetflowframe\@setflowframe} % \end{macrocode} -% This is the starred version. It finds the \IDN\ for +%\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} @@ -833,13 +891,15 @@ may only specify 'c', 't' or 'b'}}} \@flowframeid{\@ff@id}% \@@setflowframe{\ff@id}{#2}}} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@setflowframe} % This is the unstarred version. It iterates through -% each \IDN\ in the comma-separated list passed +% 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]{% +\newcommand*{\@setflowframe}[2]{% \ifthenelse{\equal{#1}{all}}{% \setallflowframes{#2}}{% \ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% @@ -863,11 +923,13 @@ may only specify 'c', 't' or 'b'}}} \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 \IDN\ is specified by the first +% the \gls{flow} whose \gls{idn} is specified by the first % parameter. % \begin{macrocode} -\newcommand{\@@setflowframe}[2]{% +\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{}% @@ -944,11 +1006,12 @@ may only specify 'c', 't' or 'b'}}} {Key 'valign' not available for flow frames}{}}% } % \end{macrocode} -%\DescribeMacro{\ffswapoddeven} +%\end{macro} +%\begin{macro}{\ffswapoddeven} % Swap odd and even offsets for a given \gls{flow}. Do the main stuff for -% a given \gls{flow} \IDN{}. +% a given \gls{flow} \gls{idn}. % \begin{macrocode} -\newcommand{\@@flowframeswapcoords}[1]{% +\newcommand*{\@@flowframeswapcoords}[1]{% \setlength{\@ff@tmp@x}% {\csname col@\romannumeral#1@evenx\endcsname} \expandafter\setlength\csname col@\romannumeral#1@evenx\endcsname @@ -963,21 +1026,27 @@ may only specify 'c', 't' or 'b'}}} {\@ff@tmp@y}% } % \end{macrocode} -% Allow user to specify \gls{flow} either by \IDN{} or \IDL{}: +%\end{macro} +%\begin{macro}{\ffswapoddeven} +% Allow user to specify \gls{flow} either by \gls{idn} or \gls{idl}: % \begin{macrocode} -\newcommand{\ffswapoddeven}{% +\newcommand*{\ffswapoddeven}{% \@ifstar\@sflowframeswapcoords\@flowframeswapcoords} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@sflowframeswapcoords} % Starred form % \begin{macrocode} -\newcommand{\@sflowframeswapcoords}[1]{% +\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]{% +\newcommand*{\@flowframeswapcoords}[1]{% \ifthenelse{\equal{#1}{all}}{% \ff@id=0\relax \whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax @@ -1004,39 +1073,48 @@ may only specify 'c', 't' or 'b'}}} \advance\@colN by 1\relax }}}}} % \end{macrocode} +%\end{macro} +% % Allow user to get the dimensions of \gls{flow} (useful for -% \gls{flow}s created using "\Ncolumns" etc.) Only the \IDN{} can +% \glspl{flow} created using "\Ncolumns" etc.) Only the \gls{idn} can % be used for these commands. -%\DescribeMacro{\flowframex} +%\begin{macro}{\flowframex} % \begin{macrocode} -\newcommand{\flowframex}[1]{% +\newcommand*{\flowframex}[1]{% \csname col@\romannumeral#1@posx\endcsname} % \end{macrocode} -%\DescribeMacro{\flowframey} +%\end{macro} +%\begin{macro}{\flowframey} % \begin{macrocode} -\newcommand{\flowframey}[1]{% +\newcommand*{\flowframey}[1]{% \csname col@\romannumeral#1@posy\endcsname} % \end{macrocode} -%\DescribeMacro{\flowframeevenx} +%\end{macro} +%\begin{macro}{\flowframeevenx} % \begin{macrocode} -\newcommand{\flowframeevenx}[1]{% +\newcommand*{\flowframeevenx}[1]{% \csname col@\romannumeral#1@evenx\endcsname} % \end{macrocode} -%\DescribeMacro{\flowframeeveny} +%\end{macro} +%\begin{macro}{\flowframeeveny} % \begin{macrocode} -\newcommand{\flowframeeveny}[1]{% +\newcommand*{\flowframeeveny}[1]{% \csname col@\romannumeral#1@eveny\endcsname} % \end{macrocode} -%\DescribeMacro{\flowframewidth} +%\end{macro} +%\begin{macro}{\flowframewidth} % \begin{macrocode} \newcommand{\flowframewidth}[1]{% \csname colwidth\romannumeral#1\endcsname} % \end{macrocode} -%\DescribeMacro{\flowframeheight} +%\end{macro} +%\begin{macro}{\flowframeheight} % \begin{macrocode} -\newcommand{\flowframeheight}[1]{% +\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 @@ -1044,49 +1122,65 @@ may only specify 'c', 't' or 'b'}}} % \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} -%\DescribeMacro{\newstaticframe} -% Now deal with setting up the \gls{static}s. This is -% similar to the \gls{flow}s, except it has an +%\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 -% "\newstaticframe["\meta{pages}"]{"\meta{width}"}{"\meta{height}"}{"\meta{x}"}{"\meta{y}"}["\meta{label}"]"\par +% \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} -\newcommand{\@n@wstaticframe}{% +\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]{% +\newcommand*{\@@newstaticframe}[5][all]{% \expandafter \newbox\csname @staticframe@\romannumeral\c@maxstatic\endcsname \expandafter @@ -1136,6 +1230,8 @@ fbox}% \@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]{% @@ -1144,9 +1240,11 @@ fbox}% \expandafter \xdef\csname @sf@id@\romannumeral#1\endcsname{\ff@label}} % \end{macrocode} -% Check \IDL{} "#2" for \gls{static} "#1" is unique +%\end{macro} +%\begin{macro}{\@sf@checkuniqueidl} +% Check \gls{idl} "#2" for \gls{static} "#1" is unique % \begin{macrocode} -\newcommand{\@sf@checkuniqueidl}[2]{% +\newcommand*{\@sf@checkuniqueidl}[2]{% \@colN=0\relax \whiledo{\@colN<\c@maxstatic}{% \advance\@colN by 1\relax @@ -1160,12 +1258,14 @@ for static frame \number\@colN}}{}% \fi }} % \end{macrocode} -% Work out the \IDN\ of the \gls{static} with the +%\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 \gls{static}s, it may take a while. -% The \IDN\ stored in "\ff@id". +% 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 +\newcommand*{\@staticframeid}[1]{\@colN=0\relax \ff@id=0\relax \whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax \ifthenelse{% @@ -1176,54 +1276,65 @@ for static frame \number\@colN}}{}% \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.) -% \DescribeMacro{\staticframex} +%\begin{macro}{\staticframex} % \begin{macrocode} -\newcommand{\staticframex}[1]{% +\newcommand*{\staticframex}[1]{% \csname @sf@\romannumeral#1@posx\endcsname} % \end{macrocode} -% \DescribeMacro{\staticframey} +%\end{macro} +%\begin{macro}{\staticframey} % \begin{macrocode} -\newcommand{\staticframey}[1]{% +\newcommand*{\staticframey}[1]{% \csname @sf@\romannumeral#1@posy\endcsname} % \end{macrocode} -% \DescribeMacro{\staticframeevenx} +%\end{macro} +%\begin{macro}{\staticframeevenx} % \begin{macrocode} -\newcommand{\staticframeevenx}[1]{% +\newcommand*{\staticframeevenx}[1]{% \csname @sf@\romannumeral#1@evenx\endcsname} % \end{macrocode} -% \DescribeMacro{\staticframeeveny} +%\end{macro} +%\begin{macro}{\staticframeeveny} % \begin{macrocode} -\newcommand{\staticframeeveny}[1]{% +\newcommand*{\staticframeeveny}[1]{% \csname @sf@\romannumeral#1@eveny\endcsname} % \end{macrocode} -% Modify the settings for all the \gls{static}s: -%\DescribeMacro{\setallstaticframes} +%\end{macro} +%\begin{macro}{\setallstaticframes} +% Modify the settings for all the \glspl{static}: % \begin{macrocode} -\newcommand{\setallstaticframes}[1]{% +\newcommand*{\setallstaticframes}[1]{% \@colN=0\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax \@@setstaticframe{\@colN}{#1}}} % \end{macrocode} -% Modify the settings for the specified \gls{static}s: -%\DescribeMacro{\setstaticframe} +%\end{macro} +%\begin{macro}{\setstaticframe} +% Modify the settings for the specified \glspl{static}: % \begin{macrocode} -\newcommand{\setstaticframe}{% +\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]{% +\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 \IDN{}s, and check for number ranges. +% list of \glspl{idn}, and check for number ranges. % Ensures that number ranges do not lie out of bounds. % \begin{macrocode} -\newcommand{\@setstaticframe}[2]{% +\newcommand*{\@setstaticframe}[2]{% \ifthenelse{\equal{#1}{all}}{% \setallstaticframes{#2}}{% \ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% @@ -1247,10 +1358,12 @@ id '#1'}{}\fi} \advance\@colN by 1\relax }}}}} % \end{macrocode} -% Modify the settings for the \gls{static} whose \IDN\ +%\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]{% +\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{}% @@ -1332,59 +1445,78 @@ static frames}{Static frames don't have marginal notes}}% 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}{\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\orgpar\par -\newcommand{\ffpshpar}{\edef\next{\hangafter=\the\hangafter -\hangindent=\the\hangindent}\orgpar\next -\edef\next{\prevgraf=\the\prevgraf}\@ff@parshape\indent\mbox{}\next} +\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} - -\newcommand{\@ff@sectionhead}[1]{% +% \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\next{\hangafter=\the\hangafter -\hangindent=\the\hangindent}\orgpar\next -\let\par=\orgpar -\edef\next{\prevgraf=\the\prevgraf}% -\csname @ff@old\ff@sechead\endcsname*{\@ff@parshape\next +\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\next{\@ff@parshape +\xdef\flf@next{\@ff@parshape \prevgraf=\the\prevgraf}% \endgroup }% -\mbox{}\next\let\next\undefined} - +\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\next{\hangafter=\the\hangafter -\hangindent=\the\hangindent}\orgpar\next -\let\par=\orgpar -\edef\next{\prevgraf=\the\prevgraf}% -\csname @ff@old\ff@sechead\endcsname[#1]{\@ff@parshape\next +\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\next{\@ff@parshape +\xdef\flf@next{\@ff@parshape \prevgraf=\the\prevgraf}% \endgroup}% -\mbox{}\next\let\next\undefined} +\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}{% @@ -1400,6 +1532,8 @@ heading command '\ff@sechead'}{}}{% \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{% @@ -1418,6 +1552,8 @@ heading command '\ff@sechead'}{}}{% \fi \fi} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@disablesec} % Disable sectioning commands % \begin{macrocode} \newcommand*{\@ff@disablesec}{% @@ -1433,9 +1569,11 @@ sectioning commands within a \string\shapepar}{}}% sectioning commands within a \string\shapepar}{}}% } % \end{macrocode} -% Set the contents of the \gls{static} given by its \IDN{}. -% Synatax: "\begin{staticcontents}{n}". -%\DescribeEnv{staticcontents} +%\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]{% @@ -1449,7 +1587,7 @@ sectioning commands within a \string\shapepar}{}}% \noexpand \begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname \noexpand\begingroup -\noexpand\let\noexpand\orgpar=\noexpand\par +\noexpand\let\noexpand\FLForgpar=\noexpand\par }% \or % \parshape @@ -1458,7 +1596,7 @@ sectioning commands within a \string\shapepar}{}}% \begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname \@ff@parshape \noexpand\begingroup -\noexpand\let\noexpand\orgpar=\noexpand\par +\noexpand\let\noexpand\FLForgpar=\noexpand\par \noexpand\let\noexpand\par=\noexpand\ffpshpar \noexpand\@ff@setsecthead }% @@ -1479,39 +1617,48 @@ sectioning commands within a \string\shapepar}{}}% \@sf@mpg \setlength\parindent\sdfparindent }{\ifnum\ff@shape=2\par -\else\orgpar\fi\endgroup\end{minipage}\end{lrbox}% +\else\FLForgpar\fi\endgroup\end{minipage}\end{lrbox}% \expandafter\global\expandafter\sbox\@sf@thisframe{% \usebox\staticframe}\ignorespaces } % \end{macrocode} -% Set the contents of the \gls{static} given by its \IDL{}. -% Syntax: "\begin{staticcontents*}{"\meta{label}"}". -%\DescribeEnv{staticcontents*} +%\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}% \begin{staticcontents}{\ff@id}}{\end{staticcontents}} % \end{macrocode} +%\end{environment} +%\begin{macro}{\setstaticcontents} % Provide a command version. -% Syntax: "\setstaticcontents{"\meta{n}"}{"\meta{text}"}". -%\DescribeMacro{\setstaticcontents} +% 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}[1]{\@staticframeid{#1}% \@staticconts{\ff@id}} % \end{macrocode} -% Unstarred version: \gls{static} identified by \IDN. +%\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} \IDN{}. +% a given \gls{static} \gls{idn}. % \begin{macrocode} -\newcommand{\@@staticframeswapcoords}[1]{% +\newcommand*{\@@staticframeswapcoords}[1]{% \setlength{\@ff@tmp@x}% {\csname @sf@\romannumeral#1@evenx\endcsname} \expandafter\setlength\csname @sf@\romannumeral#1@evenx\endcsname @@ -1526,22 +1673,27 @@ sectioning commands within a \string\shapepar}{}}% {\@ff@tmp@y}% } % \end{macrocode} -% Allow user to specify \gls{flow} either by \IDN{} or \IDL{}: -% \DescribeMacro{\sfswapoddeven} +%\end{macro} +%\begin{macro}{\sfswapoddeven} +% Allow user to specify \gls{flow} either by \gls{idn} or \gls{idl}: % \begin{macrocode} -\newcommand{\sfswapoddeven}{% +\newcommand*{\sfswapoddeven}{% \@ifstar\@sstaticframeswapcoords\@staticframeswapcoords} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@sstaticframeswapcoords} % Starred form % \begin{macrocode} -\newcommand{\@sstaticframeswapcoords}[1]{% +\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]{% +\newcommand*{\@staticframeswapcoords}[1]{% \ifthenelse{\equal{#1}{all}}{% \ff@id=0\relax \whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax @@ -1568,35 +1720,45 @@ sectioning commands within a \string\shapepar}{}}% \advance\@colN by 1\relax }}}}} % \end{macrocode} +%\end{macro} +% % \subsection{Dynamic Frames} -%\DescribeMacro{\newdynamicframe} -% Now deal with the \gls{dynamic}s. These are very similar -% to the \gls{static}s, but instead of having a savebox, +% 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 -% "\newdynamicframe["\meta{pages}"]{"\meta{width}"}{"\meta{height}"}{"\meta{x}"}{"\meta{y}"}["\meta{label}"]" +% \cs{newdynamicframe}\oarg{pages}\marg{width}\marg{height}\marg{x}\marg{y}\oarg{label} % \begin{macrocode} -\newcommand{\newdynamicframe}{% +\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}{% +\newcommand*{\@snewdynamicframe}{% \setboolean{dynamicframe\romannumeral\c@maxdynamic}{true}% \@@newdynamicframe} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@newdynamicframe} % Unstarred version: no border. % \begin{macrocode} -\newcommand{\@newdynamicframe}{% +\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]{% +\newcommand*{\@@newdynamicframe}[5][all]{% \expandafter \gdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{}% \expandafter @@ -1647,6 +1809,8 @@ fbox}% \@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]{% @@ -1655,9 +1819,11 @@ fbox}% \expandafter \xdef\csname @df@id@\romannumeral#1\endcsname{\ff@label}} % \end{macrocode} -% Check \IDL{} "#2" for \gls{static} "#1" is unique +%\end{macro} +%\begin{macro}{\@df@checkuniqueidl} +% Check \gls{idl} "#2" for \gls{static} "#1" is unique % \begin{macrocode} -\newcommand{\@df@checkuniqueidl}[2]{% +\newcommand*{\@df@checkuniqueidl}[2]{% \@colN=0\relax \whiledo{\@colN<\c@maxdynamic}{% \advance\@colN by 1\relax @@ -1671,10 +1837,12 @@ for dynamic frame \number\@colN}}{}% \fi }} % \end{macrocode} -% Determine the \IDN{} of the \gls{dynamic} from its label. -% The \IDN{} is stored in "\ff@id". +%\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 +\newcommand*{\@dynamicframeid}[1]{\@colN=0\relax \ff@id=0\relax \whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax \ifthenelse{% @@ -1685,54 +1853,64 @@ for dynamic frame \number\@colN}}{}% \ifnum\ff@id=0\PackageError{flowfram}{Can't find dynamic frame id '#1'}{}\fi} % \end{macrocode} +%\end{macro} % Make it easier to get the x and y values for dynamic % frames. (Width and height stored differently.) -%\DescribeMacro{\dynamicframex} +%\begin{macro}{\dynamicframex} % \begin{macrocode} -\newcommand{\dynamicframex}[1]{% +\newcommand*{\dynamicframex}[1]{% \csname @df@\romannumeral#1@posx\endcsname} % \end{macrocode} -%\DescribeMacro{\dynamicframey} +%\end{macro} +%\begin{macro}{\dynamicframey} % \begin{macrocode} -\newcommand{\dynamicframey}[1]{% +\newcommand*{\dynamicframey}[1]{% \csname @df@\romannumeral#1@posy\endcsname} % \end{macrocode} -%\DescribeMacro{\dynamicframeevenx} +%\end{macro} +%\begin{macro}{\dynamicframeevenx} % \begin{macrocode} -\newcommand{\dynamicframeevenx}[1]{% +\newcommand*{\dynamicframeevenx}[1]{% \csname @df@\romannumeral#1@evenx\endcsname} % \end{macrocode} -%\DescribeMacro{\dynamicframeeveny} +%\end{macro} +%\begin{macro}{\dynamicframeeveny} % \begin{macrocode} -\newcommand{\dynamicframeeveny}[1]{% +\newcommand*{\dynamicframeeveny}[1]{% \csname @df@\romannumeral#1@eveny\endcsname} % \end{macrocode} -%\DescribeMacro{\setalldynamicframes} -% Change the settings for all the \gls{dynamic}s: +%\end{macro} +%\begin{macro}{\setalldynamicframes} +% Change the settings for all the \glspl{dynamic}: % \begin{macrocode} -\newcommand{\setalldynamicframes}[1]{% +\newcommand*{\setalldynamicframes}[1]{% \@colN=0\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax \@@setdynamicframe{\@colN}{#1}}} % \end{macrocode} -%\DescribeMacro{\setdynamicframe} -% Change the settings for specified \gls{dynamic}s: +%\end{macro} +%\begin{macro}{\setdynamicframe} +% Change the settings for specified \glspl{dynamic}: % \begin{macrocode} -\newcommand{\setdynamicframe}{% +\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]{% +\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]{% +\newcommand*{\@setdynamicframe}[2]{% \ifthenelse{\equal{#1}{all}}{% \setalldynamicframes{#2}}{% \ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% @@ -1756,9 +1934,11 @@ id '#1'}{}\fi} \advance\@colN by 1\relax }}}}} % \end{macrocode} -% Change the setting for the \gls{dynamic} given by its \IDN{}. +%\end{macro} +%\begin{macro}{\@@setdynamicframe} +% Change the setting for the \gls{dynamic} given by its \gls{idn}. % \begin{macrocode} -\newcommand{\@@setdynamicframe}[2]{% +\newcommand*{\@@setdynamicframe}[2]{% \expandafter\expandafter\expandafter \@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname \def\ff@frame{}\edef\ff@width{\the\@ff@tmp@x}% @@ -1834,10 +2014,12 @@ id '#1'}{}\fi} 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} \IDN{}. +% a given \gls{static} \gls{idn}. % \begin{macrocode} -\newcommand{\@@dynamicframeswapcoords}[1]{% +\newcommand*{\@@dynamicframeswapcoords}[1]{% \setlength{\@ff@tmp@x}% {\csname @df@\romannumeral#1@evenx\endcsname}% \expandafter\setlength @@ -1854,22 +2036,27 @@ frames}{dynamic frames don't have marginal notes}}% {\@ff@tmp@y}% } % \end{macrocode} -% Allow user to specify \gls{flow} either by \IDN{} or \IDL{}: -%\DescribeMacro{\dfswapoddeven} +%\end{macro} +%\begin{macro}{\dfswapoddeven} +% Allow user to specify \gls{flow} either by \gls{idn} or \gls{idl}: % \begin{macrocode} -\newcommand{\dfswapoddeven}{% +\newcommand*{\dfswapoddeven}{% \@ifstar\@sdynamicframeswapcoords\@dynamicframeswapcoords} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@sdynamicframeswapcoords} % Starred form % \begin{macrocode} -\newcommand{\@sdynamicframeswapcoords}[1]{% +\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]{% +\newcommand*{\@dynamicframeswapcoords}[1]{% \ifthenelse{\equal{#1}{all}}{% \ff@id=0\relax \whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax @@ -1896,19 +2083,81 @@ frames}{dynamic frames don't have marginal notes}}% \advance\@colN by 1\relax }}}}} % \end{macrocode} -% Set the contents of a \gls{dynamic}. There is no -% environment equivalent. -%\DescribeMacro{\setdynamiccontents} +%\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.) +% Start of the environment (unstarred): +% \begin{macrocode} +\def\dynamiccontents#1{% +\edef\@flf@{\@currenvir}% +\def\@flf@idn{#1}% +\toks@{}\@flf@get@body +} +% \end{macrocode} +% Get the body of the environment: +% \begin{macrocode} +\long\def\@flf@get@body#1\end + {\toks@\expandafter{\the\toks@#1}\@flf@find@end} +% \end{macrocode} +% Find the end of the environment: +% \begin{macrocode} +\def\@flf@find@end#1{% +\def\@tempa{#1}% +\ifx\@tempa\@flf@ +\expandafter\@flf@enddynamiccontents +\else +\toks@\expandafter + {\the\toks@\end{#1}}\expandafter\@flf@get@body\fi +} +% \end{macrocode} +% End of the environment: +% \begin{macrocode} +\let\enddynamiccontents\relax +\def\@flf@enddynamiccontents{% +\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\toks@}% +\expandafter +\fi +\expandafter\end\expandafter{\@flf@}} +% \end{macrocode} +%\end{environment} +%\begin{environment}{dynamiccontents*} +% Starred version: +% \begin{macrocode} +\expandafter\def\csname dynamiccontents*\endcsname#1{% +\edef\@flf@{\@currenvir}% +\@dynamicframeid{#1}% +\edef\@flf@idn{\number\ff@id}% +\toks@{}\@flf@get@body +} +% \end{macrocode} +%\end{environment} +%\begin{macro}{\setdynamiccontents} % \begin{macrocode} \newcommand{\setdynamiccontents}{% \@ifstar\@ssetdynamiccontents\@setdynamiccontents} % \end{macrocode} -% Starred version: identify \gls{dynamic} by its \IDL: +%\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} -% Unstarred version: identify \gls{dynamic} by its \IDN: +%\end{macro} +%\begin{macro}{\@setdynamiccontents} +% Unstarred version: identify \gls{dynamic} by its \gls{idn}: % \begin{macrocode} \newcommand{\@setdynamiccontents}[2]{% \ifnum#1>\c@maxdynamic @@ -1920,19 +2169,24 @@ only \number\c@maxdynamic\space dynamic frames currently defined}% \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. -%\DescribeMacro{\appenddynamiccontents} % \begin{macrocode} \newcommand{\appenddynamiccontents}{% \@ifstar\@sappenddynamic\@appenddynamic} % \end{macrocode} -% Starred version: find the \IDN{} and pass it to +%\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]{% @@ -1946,30 +2200,314 @@ but there are only \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} -\toksdef\flf@ta=0 \toksdef\flf@tb=2 +\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} +% +%\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 +\PackageError{flowfram}{Unknown frame ID type '#1'}{% +Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)} +\or +\ifnum#2>\c@maxflow +\PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{% +Flow frame IDNs go from 1 to \number\c@maxflow} +\else +\setlength{\ffareax}{\flowframex{#2}} +\setlength{\ffareay}{\flowframey{#2}} +\setlength{\ffareawidth}{\flowframewidth{#2}} +\setlength{\ffareaheight}{\flowframeheight{#2}} +\fi +\or +\ifnum#2>\c@maxstatic +\PackageError{flowfram}{Invalid static frame IDN '\number#2'}{% +Static frame IDNs go from 1 to \number\c@maxstatic} +\else +\setlength{\ffareax}{\staticframex{#2}} +\setlength{\ffareay}{\staticframey{#2}} +\expandafter\expandafter\expandafter +\@ff@getstaticpos +\csname @sf@dim@\romannumeral#2\endcsname +\setlength{\ffareawidth}{\@ff@tmp@x}% +\setlength{\ffareaheight}{\@ff@tmp@y}% +\fi +\or +\ifnum#2>\c@maxdynamic +\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}{\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}): +% \begin{macrocode} +\newcommand*{\@getstaticbounds}[1]{\@ff@getdim{1}{#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}): +% \begin{macrocode} +\newcommand*{\@getflowbounds}[1]{\@ff@getdim{2}{#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} +% %\subsection{Initialise Flow Frames} -%\DescribeMacro{\setinitialframe} +%\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% +\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}{% +\newcommand*{\setframes}{% \ifnum\c@thisframe=0\relax \PackageWarning{flowfram}{Can't find a flow frame on page 1. \MessageBreak @@ -1977,7 +2515,9 @@ Attempting to find the first page with a flow frame}% \@nxtcol=1\relax \c@curpg=1\relax \@g@tnextcol{\@nxtcol}% -%shipout pages without flow frames +% \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}}% @@ -1991,6 +2531,8 @@ Attempting to find the first page with a flow frame}% \@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. @@ -2015,6 +2557,8 @@ Attempting to find the first page with a flow frame}% \@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. @@ -2039,6 +2583,7 @@ Attempting to find the first page with a flow frame}% \@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} @@ -2063,6 +2608,7 @@ Frames must be defined in the preamble}#1}% %\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. % \begin{macrocode} @@ -2093,6 +2639,7 @@ or text might not appear correctly}% \fi } % \end{macrocode} +%\end{macro} % Modify the output routine so that it uses "\vsize" % instead of "\textheight". % \begin{macrocode} @@ -2120,6 +2667,7 @@ or text might not appear correctly}% \fi } % \end{macrocode} +%\begin{macro}{\@doclearpage} % Modify "\@doclearpage", again replace "\textheight" % with "\vsize", and only use the twocolumn stuff. % \begin{macrocode} @@ -2160,9 +2708,11 @@ or text might not appear correctly}% \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 \gls{dynamic}s. +% 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} @@ -2170,6 +2720,8 @@ or text might not appear correctly}% \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}{% @@ -2178,10 +2730,12 @@ or text might not appear correctly}% \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 \gls{dynamic}s -% before the \gls{dynamic}s are put on the page. +% 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 @@ -2201,7 +2755,6 @@ or text might not appear correctly}% \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ - \@begindvi \vskip\topmargin\moveright\@themargin \vbox{% \vskip\headheight @@ -2210,14 +2763,15 @@ or text might not appear correctly}% }}\global\let\if@newlist\@@if@newlist \stepcounter{page}\let\firstmark\botmark} % \end{macrocode} -% \DescribeMacro{\makedfheaderfooter} -% Make the headers and footers be in \gls{dynamic}s. There +%\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 \IDL{} "header", and the -% footer is given the \IDL{} "footer". +% The header frame is given the \gls{idl} "header", and the +% footer is given the \gls{idl} "footer". % \begin{macrocode} -\newcommand{\makedfheaderfooter}{% +\newcommand*{\makedfheaderfooter}{% % create dynamic frames at the standard location \setlength{\@ff@tmp@y}{\textheight}% \addtolength{\@ff@tmp@y}{\headsep}% @@ -2239,10 +2793,12 @@ or text might not appear correctly}% }% } % \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. @@ -2254,6 +2810,8 @@ or text might not appear correctly}% \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} @@ -2284,6 +2842,8 @@ or text might not appear correctly}% }\fi \global\maxdepth\@maxdepth} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@opcol} % Modify "\@opcol", as "\if@twocolumn" is now % irrelevant. % \begin{macrocode} @@ -2293,13 +2853,15 @@ or text might not appear correctly}% \@floatplacement } % \end{macrocode} -% Check to see if there are more \gls{flow}s defined, and +%\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 \gls{flow}s, and through each +% iterating through all \glspl{flow}, and through each % frame's \gls{pglist}. % \begin{macrocode} \newif\if@ff@moreframes -\newcommand{\@ff@checkifmoreframes}{% +\newcommand*{\@ff@checkifmoreframes}{% \@ff@moreframesfalse \@colN=\c@thisframe \whiledo{\@colN<\c@maxflow}{% @@ -2320,13 +2882,17 @@ or text might not appear correctly}% \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]{% +\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 @@ -2334,20 +2900,22 @@ or text might not appear correctly}% % lies within the number range. If the \gls{pgrange} is "none", % ignore it. % \begin{macrocode} -\newcommand{\@ff@checkthispage}[2]{% +\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 \gls{flow}s available. +% there are still more \glspl{flow} available. % \begin{macrocode} -\newcommand{\@ff@checknumrange}[2]{% +\newcommand*{\@ff@checknumrange}[2]{% \def\@ff@numstart{0}\def\@ff@numend{10000}% \@ff@getrange{#2}% \ifnum\@ff@numend>#1\relax @@ -2359,6 +2927,7 @@ or text might not appear correctly}% \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 @@ -2368,6 +2937,7 @@ or text might not appear correctly}% % \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". @@ -2375,25 +2945,29 @@ or text might not appear correctly}% % "\@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]{% +\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<% -\@ff@getrangeless#1#2\end -\else -\ifx#1>% -\@ff@getrangegreater#1#2\end +\ifx#1<\relax + \@ff@getrangeless#1#2\end \else -\@@ff@getrange#1#2\end -\fi + \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} @@ -2403,6 +2977,8 @@ or text might not appear correctly}% \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} @@ -2412,6 +2988,8 @@ or text might not appear correctly}% \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. @@ -2425,11 +3003,15 @@ or text might not appear correctly}% \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.) @@ -2437,7 +3019,7 @@ or text might not appear correctly}% \newif\if@notthiscol \newif\if@ff@nwpg \newcount\c@curpg -\newcommand{\@g@tnextcol}[1]{% +\newcommand*{\@g@tnextcol}[1]{% \@ff@checkifmoreframes \if@ff@moreframes \else @@ -2464,20 +3046,24 @@ adding new one}% #1=\@colN } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@chckifthispg} % This is used to determine the next \gls{flow}, since not -% all \gls{flow}s may be defined on every page. Checks to +% 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]{% +\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]{% +\newcommand*{\@@ff@chckifthispg}[1]{% \ifthenelse{\equal{\ff@pages}{none}}{}{% \ifthenelse{\equal{\ff@pages}{all}}{\@notthiscolfalse}{% \ifthenelse{\equal{\ff@pages}{odd}}{% @@ -2494,37 +3080,45 @@ adding new one}% }}}}% } % \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]{% +\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]{% +\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 \gls{flow}s have been filled for that page. +% all the \glspl{flow} have been filled for that page. % \begin{macrocode} -\newcommand{\@setcolbox}[1]{% +\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]{% +\newcommand*{\@docolbox}[1]{% \edef\ff@frametype{% \csname @ff@frametype@\romannumeral#1\endcsname}% \edef\ff@col{\csname @ff@col@\romannumeral#1\endcsname}% @@ -2543,9 +3137,11 @@ adding new one}% \expandafter\box\csname column\romannumeral#1\endcsname}% }}} % \end{macrocode} -% Do the \gls{bbox} for \gls{flow}. +%\end{macro} +%\begin{macro}{\@docolbbox} +% Do the \gls{bbox} for given \gls{flow}. % \begin{macrocode} -\newcommand{\@docolbbox}[1]{% +\newcommand*{\@docolbbox}[1]{% \@ff@setoffset{#1}% \def\ff@col{}\def\ff@txtcol{}% \@fr@meifdraft{% @@ -2554,6 +3150,8 @@ adding new one}% \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". @@ -2563,18 +3161,22 @@ adding new one}% \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]{% +\newcommand*{\@putcolbox}[1]{% \@ff@chckifthispg{\c@page}{#1}% \if@notthiscol \else @@ -2600,9 +3202,11 @@ adding new one}% \fi } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@putcolbbox} % Same for \gls{flow} \gls{bbox}: % \begin{macrocode} -\newcommand{\@putcolbbox}[1]{% +\newcommand*{\@putcolbbox}[1]{% \@ff@chckifthispg{\c@page}{#1}% \if@notthiscol \else @@ -2628,45 +3232,55 @@ adding new one}% \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}{% +\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 -\advance\@ff@offset by -\flowframesep +\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 -\advance\@ff@offset by -\flowframesep +\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 +\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]{% +\newcommand*{\@ff@setoffset}[1]{% \ifthenelse{\equal{\csname @ff@offset@\romannumeral#1\endcsname}% {compute}}{% \ifthenelse{\boolean{columnframe\romannumeral#1}}{% @@ -2692,10 +3306,12 @@ adding new one}% {\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]{% +\newcommand*{\@sf@setoffset}[1]{% \ifthenelse{% \equal{\csname @sf@offset@\romannumeral#1\endcsname}% {compute}}{% @@ -2723,10 +3339,12 @@ adding new one}% {\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]{% +\newcommand*{\@df@setoffset}[1]{% \ifthenelse{% \equal{\csname @df@offset@\romannumeral#1\endcsname}% {compute}}{% @@ -2754,9 +3372,11 @@ adding new one}% {\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]{% +\newcommand*{\@putmarginbox}[1]{% \@ff@chckifthispg{\c@page}{#1}% \if@notthiscol \else @@ -2796,10 +3416,12 @@ adding new one}% {M:\number#1}\hss}\fi \ignorespaces} % \end{macrocode} -% Draw all the margins associated with the \gls{flow}s defined +%\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}{% +\newcommand*{\@ff@drawmargins}{% \@colN=0\relax \whiledo{\@colN<\c@maxflow}{% \advance\@colN by 1\relax @@ -2807,16 +3429,20 @@ adding new one}% }% } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@ff@getstaticpos} % Extract the width and height for static or \gls{dynamic} -% specified in the form "[c][height][?]{width}" +% 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]{% +\newcommand*{\@dostaticbox}[1]{% \edef\ff@frametype{% \csname @sf@frametype@\romannumeral#1\endcsname}% \edef\ff@col{\csname @sf@col@\romannumeral#1\endcsname}% @@ -2834,9 +3460,11 @@ adding new one}% {\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname}% }}} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@dostaticbbox} % Now for the \gls{bbox}: % \begin{macrocode} -\newcommand{\@dostaticbbox}[1]{% +\newcommand*{\@dostaticbbox}[1]{% \edef\ff@col{}% \@sf@setoffset{#1}% \expandafter\expandafter\expandafter @@ -2846,10 +3474,12 @@ adding new one}% {\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]{% +\newcommand*{\@putstaticbox}[1]{% \@sf@chckifthispg{#1}% \if@notthiscol\else \@killglue @@ -2873,9 +3503,11 @@ adding new one}% \fi \fi} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@putstaticbbox} % Now for the \gls{bbox}: % \begin{macrocode} -\newcommand{\@putstaticbbox}[1]{% +\newcommand*{\@putstaticbbox}[1]{% \@sf@chckifthispg{#1}% \if@notthiscol\else \@killglue @@ -2899,30 +3531,36 @@ adding new one}% \fi \fi} % \end{macrocode} -% Clear the contents of all the \gls{static}s that have +%\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}{% +\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} -% Clear the contents of the \gls{dynamic}s that have the "clear" option +%\end{macro} +%\begin{macro}{\@resetdyn@mics} +% Clear the contents of the \glspl{dynamic} that have the "clear" option % set. % \begin{macrocode} -\newcommand{\@resetdyn@mics}{% +\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]{% +\newcommand*{\@dodfparbox}[1]{% \expandafter\let\expandafter \@ff@parshape\csname @df@shape@\romannumeral#1\endcsname \expandafter\@ff@getshape\@ff@parshape\relax @@ -2956,9 +3594,11 @@ adding new one}% \fi } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@dodynamicbox} % Typeset the dynamic box with its associated border. % \begin{macrocode} -\newcommand{\@dodynamicbox}[1]{% +\newcommand*{\@dodynamicbox}[1]{% \edef\ff@frametype{% \csname @df@frametype@\romannumeral#1\endcsname}% \edef\ff@col{\csname @df@col@\romannumeral#1\endcsname}% @@ -2979,9 +3619,11 @@ adding new one}% \@dodfparbox{#1}}% }}} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@dodynamicbbox} % Now for the \gls{bbox}: % \begin{macrocode} -\newcommand{\@dodynamicbbox}[1]{% +\newcommand*{\@dodynamicbbox}[1]{% \edef\ff@col{}% \@df@setoffset{#1}% \expandafter\expandafter\expandafter @@ -2993,9 +3635,11 @@ adding new one}% {}}% }{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]{% +\newcommand*{\@putdynamicbox}[1]{% \@df@chckifthispg{#1}% \if@notthiscol\else \@killglue @@ -3019,9 +3663,11 @@ adding new one}% \fi \fi} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@putdynamicbbox} % Bounding box: % \begin{macrocode} -\newcommand{\@putdynamicbbox}[1]{% +\newcommand*{\@putdynamicbbox}[1]{% \@df@chckifthispg{#1}% \if@notthiscol\else \@killglue @@ -3045,9 +3691,11 @@ adding new one}% \fi \fi} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@@doheader} % Do standard header in the standard place. % \begin{macrocode} -\newcommand{\@@doheader}{% +\newcommand*{\@@doheader}{% \setlength\@ff@tmp@y{\textheight}% \addtolength{\@ff@tmp@y}{\headsep}% \def\ff@col{}% @@ -3056,9 +3704,11 @@ adding new one}% \@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}{% +\newcommand*{\@@dofooter}{% \setlength\@ff@tmp@y{-\footskip}% \def\ff@col{}% \def\ff@txtcol{}% @@ -3066,6 +3716,8 @@ adding new one}% \@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} @@ -3077,66 +3729,88 @@ adding new one}% \ht\@picbox\@picht \dp\@picbox \z@ \mbox{\box \@picbox}}} % \end{macrocode} -% Puts all the \gls{flow}s defined on the current page +%\end{macro} +%\begin{macro}{\@ff@doallflowframes} +% Puts all the \glspl{flow} defined on the current page % \begin{macrocode} -\newcommand{\@ff@doallflowframes}{% -\@colN=0\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\newcommand*{\@ff@doallflowframes}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax \@putcolbox{\@colN}}% } % \end{macrocode} -% Flow frame \gls{bbox}es: +%\end{macro} +%\begin{macro}{\@ff@doallflowframesbbox} +% Flow frame \glspl{bbox}: % \begin{macrocode} -\newcommand{\@ff@doallflowframesbbox}{% -\@colN=0\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\newcommand*{\@ff@doallflowframesbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax \@putcolbbox{\@colN}}% } % \end{macrocode} -% Puts all \gls{static}s defined on the current page +%\end{macro} +%\begin{macro}{\@ff@doallstatics} +% Puts all \glspl{static} defined on the current page % \begin{macrocode} -\newcommand{\@ff@doallstatics}{% -\@colN=0\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1% +\newcommand*{\@ff@doallstatics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax \@putstaticbox{\@colN}}% } % \end{macrocode} -% Static frame \gls{bbox}es: +%\end{macro} +%\begin{macro}{\@ff@doallstaticsbbox} +% Static frame \glspl{bbox}: % \begin{macrocode} -\newcommand{\@ff@doallstaticsbbox}{% -\@colN=0\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1% +\newcommand*{\@ff@doallstaticsbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax \@putstaticbbox{\@colN}}% } % \end{macrocode} -% Puts all the \gls{dynamic}s defined on the current page +%\end{macro} +%\begin{macro}{\@ff@doalldynamics} +% Puts all the \glspl{dynamic} defined on the current page % \begin{macrocode} -\newcommand{\@ff@doalldynamics}{% -\@colN=0\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1% +\newcommand*{\@ff@doalldynamics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax \@putdynamicbox{\@colN}}% } % \end{macrocode} -% Dynamic frame \gls{bbox}es: +%\end{macro} +%\begin{macro}{\@ff@doalldynamicsbbox} +% Dynamic frame \glspl{bbox}: % \begin{macrocode} -\newcommand{\@ff@doalldynamicsbbox}{% -\@colN=0\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1% +\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}{% +\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}{% +\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 + \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 @@ -3148,18 +3822,20 @@ adding new one}% \@ff@doallflowframes \@ff@doalldynamics \ifshowtypeblock -\@ff@dotypeblock + \@ff@dotypeblock \fi \ifshowframebbox -\@ff@doallstaticsbbox -\@ff@doallflowframesbbox -\@ff@doalldynamicsbbox + \@ff@doallstaticsbbox + \@ff@doallflowframesbbox + \@ff@doalldynamicsbbox \fi \ifshowmargins -\@ff@drawmargins + \@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} @@ -3192,6 +3868,7 @@ adding new one}% \let\@thehead\@oddhead \let\@thefoot\@oddfoot \fi + \@begindvi \@dodynamicthehead\@dodynamicthefoot \vbadness=\@M \setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}% @@ -3218,6 +3895,8 @@ adding new one}% \global\@colht\vsize } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@dblfloatplacement} % Modify "\@dblfloatplacement" replacing "\textheight" % with "\vsize". % \begin{macrocode} @@ -3228,18 +3907,27 @@ adding new one}% \@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 \gls{dynamic}s. +% 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 \gls{flow}s from +% 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 @@ -3248,34 +3936,39 @@ adding new one}% \newif\ifffvadjust \ffvadjusttrue % \end{macrocode} -%\DescribeMacro{\onecolumn} +%\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 \gls{flow}s +% 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 "\@output". Syntax: "\onecolumn["\meta{pages}"]", +% 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} -%\DescribeMacro{\onecolumninarea} +%\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}), +% 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 @@ -3285,38 +3978,52 @@ adding new one}% % is also no starred version, so if you want a border, you % will need to set it explicitly using "\setflowframe". % Syntax:\newline -% "\onecolumninarea["\meta{pages}"]{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}". +% \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} -%\DescribeMacro{\twocolumn} -% Set up two \gls{flow}s parallel to each other +%\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 \gls{flow}s should -% appear on. Syntax: "\twocolumn["\meta{pages}"]". +% 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} -\renewcommand{\twocolumn}{\@twocolumn} \newcommand*{\@twocolumn}[1][all]{% \@twocolumninarea[#1]{\textwidth}{\textheight}{0pt}{0pt}} % \end{macrocode} -%\DescribeMacro{\twocolumninarea} +%\end{macro} +%\begin{macro}{\twocolumninarea} % Again, "\twocolumn" is actually a special case of % "\twocolumninarea". % Syntax:\newline -% "\twocolumninarea["\meta{pages}"]{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}". +% \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}{\@twocolumninarea} \newcommand*{\@twocolumninarea}[5][all]{% \setlength{\columnheight}{#3}% \ifffvadjust\adjustheight{\columnheight}\fi% @@ -3331,78 +4038,84 @@ adding new one}% \@n@wflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{#5}% \setflowframe{\c@maxflow}{margin=right}% } -\@onlypreamble{\twocolumninarea} % \end{macrocode} -%\DescribeMacro{\Ncolumn} +%\end{macro} +%\begin{macro}{\Ncolumn} % Again for an aribtrary number of columns (\meta{n}). Syntax: -% "\Ncolumn["\meta{pages}"]{"\meta{n}"}". +% \cs{Ncolumn}\oarg{pages}\marg{n}. % \begin{macrocode} \newcommand*{\Ncolumn}[2][all]{% \Ncolumninarea[#1]{#2}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\Ncolumn} % \end{macrocode} -%\DescribeMacro{\Ncolumninarea} -% Check the number of \gls{flow}s requested, and do one +%\end{macro} +%\begin{macro}{\Ncolumninarea} +% Check the number of \glspl{flow} requested, and do one % of the special cases if available. % Syntax:\newline -% "\Ncolumninarea["\meta{pages}"]{"\meta{n}"}{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}". +% \cs{Ncolumninarea}\oarg{pages}\marg{n}\marg{w}\marg{h}\marg{x}\marg{y}. % \begin{macrocode} -\newcommand{\Ncolumninarea}[6][all]{% +\newcommand*{\Ncolumninarea}[6][all]{% \ifnum#2>2\relax -\@Ncolumninarea[#1]{#2}{#3}{#4}{#5}{#6}% + \@Ncolumninarea[#1]{#2}{#3}{#4}{#5}{#6}% \else -\ifcase#2 -\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 + \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]{% +\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{\@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} +\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. -%\DescribeMacro{\vcolumnsep} +%\begin{macro}{\vcolumnsep} % The vertical distance between the top frames and column flow % frames when created using "\Ncolumnhead" etc is given by: % \begin{macrocode} \newlength{\vcolumnsep} \setlength{\vcolumnsep}{\columnsep} % \end{macrocode} -%\DescribeMacro{\onecolumntop} +%\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. @@ -3413,49 +4126,54 @@ which really doesn't make sense}% % % First the special case where the area is the \gls{typeblock}. % Syntax:\newline -% "\onecolumntop["\meta{pages}"]{"\meta{type}"}{"\meta{H}"}" +% \cs{onecolumntop}\oarg{pages}\marg{type}\marg{H} % \begin{macrocode} -\newcommand{\onecolumntop}[3][all]{% +\newcommand*{\onecolumntop}[3][all]{% \onecolumntopinarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\onecolumntop} % \end{macrocode} -%\DescribeMacro{\onecolumnStop} +%\end{macro} +%\begin{macro}{\onecolumnStop} % Special case for \gls{static}. -% Syntax: "\onecolumnStop["\meta{pages}"]{"\meta{H}"}" +% Syntax: \cs{onecolumnStop}\oarg{pages}\marg{H} % \begin{macrocode} -\newcommand{\onecolumnStop}[2][all]{% +\newcommand*{\onecolumnStop}[2][all]{% \onecolumntopinarea[#1]{static}{#2}{\textwidth}{\textheight}{0pt}{0pt}} % \end{macrocode} -%\DescribeMacro{\onecolumnDtop} +%\end{macro} +%\begin{macro}{\onecolumnDtop} % Special case for \gls{dynamic}. -% Syntax: "\onecolumnDtop["\meta{pages}"]{"\meta{H}"}" +% Syntax: \cs{onecolumnDtop}\oarg{pages}\marg{H} % \begin{macrocode} -\newcommand{\onecolumnDtop}[2][all]{% +\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 -% "\newframe["\meta{pages}"]{"\meta{type}"}{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}". +% \cs{newframe}\oarg{pages}\marg{type}\marg{w}\marg{h}\marg{x}\marg{y}. % \begin{macrocode} -\newcommand{\newframe}[6][all]{% +\newcommand*{\newframe}[6][all]{% \ifthenelse{\equal{#2}{flow}}{% \@n@wflowframe[#1]{#3}{#4}{#5}{#6}% }{% \ifthenelse{\equal{#2}{dynamic}}{% -\newdynamicframe[#1]{#3}{#4}{#5}{#6}}{% +\@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} -%\DescribeMacro{\onecolumntopinarea} +%\end{macro} +%\begin{macro}{\onecolumntopinarea} % Now for a specified area. % Syntax:\newline -% "\onecolumntopinarea["\meta{pages}"]{"\meta{type}"}{"\meta{H}"}{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}". +% \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]{% +\newcommand*{\onecolumntopinarea}[7][all]{% \setlength{\@ff@staticH}{#3}% \setlength{\@ff@tmp@y}{#5}% \addtolength{\@ff@tmp@y}{-\@ff@staticH}% @@ -3469,62 +4187,70 @@ Available frame types are: 'flow', 'static' and 'dynamic'}}}}} \@onlypreamble{\onecolumntopinarea} % \end{macrocode} -%\DescribeMacro{\onecolumnStopinarea} +%\end{macro} +%\begin{macro}{\onecolumnStopinarea} % Special case for \gls{static}. % Syntax:\newline -% "\onecolumnStopinarea["\meta{pages}"]{"\meta{H}"}{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}". +% \cs{onecolumnStopinarea}\oarg{pages}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y}. % \begin{macrocode} -\newcommand{\onecolumnStopinarea}[6][all]{% +\newcommand*{\onecolumnStopinarea}[6][all]{% \onecolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} % \end{macrocode} -%\DescribeMacro{\onecolumnDtopinarea} +%\end{macro} +%\begin{macro}{\onecolumnDtopinarea} % Special case for \gls{dynamic}. -% Syntax:\newline "\onecolumnDtopinarea["\meta{pages}"]{"\meta{H}"}{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}". +% Syntax:\newline +% \cs{onecolumnDtopinarea}\oarg{pages}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y}. % \begin{macrocode} -\newcommand{\onecolumnDtopinarea}[6][all]{% +\newcommand*{\onecolumnDtopinarea}[6][all]{% \onecolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} % \end{macrocode} -%\DescribeMacro{\twocolumntop} -% Now for two \gls{flow}s, with a single \meta{type} frame +%\end{macro} +%\begin{macro}{\twocolumntop} +% Now for two \glspl{flow}, with a single \meta{type} frame % above both of them. % Syntax:\newline -% "\twocolumntop["\meta{pages}"]{"\meta{type}"}{"\meta{H}"}" +% \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]{% +\newcommand*{\twocolumntop}[3][all]{% \twocolumntopinarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\twocolumntop} % \end{macrocode} -%\DescribeMacro{\twocolumnStop} +%\end{macro} +%\begin{macro}{\twocolumnStop} % Special case for \gls{static}. % \begin{macrocode} -\newcommand{\twocolumnStop}[2][all]{% +\newcommand*{\twocolumnStop}[2][all]{% \@twocolumntopinarea[#1]{static}{#2}{\textwidth}{\textheight}{0pt}{0pt}} % \end{macrocode} -%\DescribeMacro{\twocolumnDtop} +%\end{macro} +%\begin{macro}{\twocolumnDtop} % Special case for \gls{dynamic}. % \begin{macrocode} -\newcommand{\twocolumnDtop}[2][all]{% +\newcommand*{\twocolumnDtop}[2][all]{% \twocolumntop[#1]{dynamic}{#2}} % \end{macrocode} +%\end{macro} +% % Now for a general area. -%\DescribeMacro{\twocolumntopinarea} +%\begin{macro}{\twocolumntopinarea} % Syntax:\newline -% "\twocolumntopinarea["\meta{pages}"]{"\meta{type}"}{"\meta{H}"}{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}". +% \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]{% +\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{\@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} +\addtolength{\columnheight}{-\vcolumnsep}% \ifffvadjust\adjustheight{\columnheight}\fi% % work out the widths of the flow frames \setlength{\columnwidth}{#4}% @@ -3541,84 +4267,101 @@ Available frame types are: 'flow', 'static' and 'dynamic'}}}}} } \@onlypreamble{\twocolumntopinarea} % \end{macrocode} -%\DescribeMacro{\twocolumnStopinarea} +%\end{macro} +%\begin{macro}{\twocolumnStopinarea} % Special case for \gls{static}. % \begin{macrocode} -\newcommand{\twocolumnStopinarea}[6][all]{% +\newcommand*{\twocolumnStopinarea}[6][all]{% \twocolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} % \end{macrocode} -%\DescribeMacro{\twocolumnDtopinarea} +%\end{macro} +%\begin{macro}{\twocolumnDtopinarea} % Special case for \gls{dynamic}. % \begin{macrocode} -\newcommand{\twocolumnDtopinarea}[6][all]{% +\newcommand*{\twocolumnDtopinarea}[6][all]{% \twocolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} % \end{macrocode} -%\DescribeMacro{\Ncolumntop} -% Similarly for an arbitrary number of \gls{flow}s. +%\end{macro} +%\begin{macro}{\Ncolumntop} +% Similarly for an arbitrary number of \glspl{flow}. % Special case where the area is the \gls{typeblock}. % % Syntax:\newline -% "\Ncolumntop["\meta{pages}"]{"\meta{type}"}{"\meta{n}"}{"\meta{H}"}" +% \cs{Ncolumntop}\oarg{pages}\marg{type}\marg{n}\marg{H} % \begin{macrocode} -\newcommand{\Ncolumntop}[4][all]{% +\newcommand*{\Ncolumntop}[4][all]{% \Ncolumntopinarea[#1]{#2}{#3}{#4}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\Ncolumntop} % \end{macrocode} -%\DescribeMacro{\NcolumnStop} +%\end{macro} +%\begin{macro}{\NcolumnStop} % Special case for \gls{static}. % \begin{macrocode} -\newcommand{\NcolumnStop}[3][all]{% +\newcommand*{\NcolumnStop}[3][all]{% \Ncolumntop[#1]{static}{#2}{#3}} % \end{macrocode} -%\DescribeMacro{\NcolumnDtop} +%\end{macro} +%\begin{macro}{\NcolumnDtop} % Special case for \gls{dynamic}. % \begin{macrocode} -\newcommand{\NcolumnDtop}[3][all]{% +\newcommand*{\NcolumnDtop}[3][all]{% \Ncolumntop[#1]{dynamic}{#2}{#3}} % \end{macrocode} -%\DescribeMacro{\Ncolumntopinarea} +%\end{macro} +%\begin{macro}{\Ncolumntopinarea} % Again test to make sure the user requested a sensible % number. % \begin{macrocode} -\newcommand{\Ncolumntopinarea}[8][all]{% +\newcommand*{\Ncolumntopinarea}[8][all]{% \ifnum#3>2\relax -\@Ncolumntopinarea[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}% + \@Ncolumntopinarea[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}% \else -\ifcase#3 -\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 + \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 -% "\Ncolumntopinarea["\meta{pages}"]{"\meta{type}"}{"\meta{n}"}{"\meta{H}"}{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}". +% \cs{Ncolumntopinarea}\oarg{pages}\marg{type}\marg{n}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y}. % \begin{macrocode} -\newcommand{\@Ncolumntopinarea}[8][all]{% +\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}% -% adjust the flow frame height so that it is a multiple of \baselineskip +% \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}% @@ -3636,57 +4379,62 @@ which really doesn't make sense}% \repeat } % \end{macrocode} -%\DescribeMacro{\NcolumnStopinarea} +%\end{macro} +%\begin{macro}{\NcolumnStopinarea} % Specific case for \gls{static}. % \begin{macrocode} -\newcommand{\NcolumnStopinarea}[7][all]{% +\newcommand*{\NcolumnStopinarea}[7][all]{% \Ncolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}{#7}} % \end{macrocode} -%\DescribeMacro{\NcolumnDtopinarea} +%\end{macro} +%\begin{macro}{\NcolumnDtopinarea} % Specific case for \gls{dynamic}. % \begin{macrocode} -\newcommand{\NcolumnDtopinarea}[7][all]{% +\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. % -%\DescribeMacro{\onecolumnbottom} +%\begin{macro}{\onecolumnbottom} % Syntax:\newline -% "\onecolumnbottom["\meta{pages}"]{"\meta{type}"}{"\meta{H}"}" -% where \meta{r} is the ratio of the \meta{type} frame height to the -% height of the \gls{typeblock}. +% \cs{onecolumnbottom}\oarg{pages}\marg{type}\marg{H} % \begin{macrocode} -\newcommand{\onecolumnbottom}[3][all]{% +\newcommand*{\onecolumnbottom}[3][all]{% \onecolumnSbottominarea[#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} -%\DescribeMacro{\onecolumnSbottom} +%\begin{macro}{\onecolumnSbottom} % Special case for \gls{static}. % \begin{macrocode} -\newcommand{\onecolumnSbottom}[2][all]{% +\newcommand*{\onecolumnSbottom}[2][all]{% \onecolumnbottom[#1]{static}{#2}} % \end{macrocode} -%\DescribeMacro{\onecolumnDbottom} +%\end{macro} +%\begin{macro}{\onecolumnDbottom} % Special case for \gls{dynamic}. % \begin{macrocode} -\newcommand{\onecolumnDbottom}[2][all]{% +\newcommand*{\onecolumnDbottom}[2][all]{% \onecolumnbottom[#1]{dynamic}{#2}} % \end{macrocode} +%\end{macro} +% % General case of the above, but fit in specified area. -%\DescribeMacro{\onecolumnbottominarea} +%\begin{macro}{\onecolumnbottominarea} % Syntax:\newline -% "\onecolumnbottominarea["\meta{pages}"]{"\meta{type}"}{"\meta{H}"}{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}",\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 +% left co-ordinates (\meta{x}, \meta{y}) width \meta{w}, and % height \meta{h}. % \begin{macrocode} -\newcommand{\onecolumnbottominarea}[7][all]{% +\newcommand*{\onecolumnbottominarea}[7][all]{% \setlength{\@ff@staticH}{#3}% \setlength{\columnheight}{#5}% \addtolength{\columnheight}{-\@ff@staticH}% @@ -3699,68 +4447,82 @@ which really doesn't make sense}% \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} -%\DescribeMacro{\onecolumnSbottominarea} +%\begin{macro}{\onecolumnSbottominarea} % Special case for \gls{static}. % \begin{macrocode} -\newcommand{\onecolumnSbottominarea}[6][all]{% +\newcommand*{\onecolumnSbottominarea}[6][all]{% \onecolumnbottominarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} % \end{macrocode} -%\DescribeMacro{\onecolumnDbottominarea} +%\end{macro} +%\begin{macro}{\onecolumnDbottominarea} % Special case for \gls{dynamic}. % \begin{macrocode} -\newcommand{\onecolumnDbottominarea}[6][all]{% +\newcommand*{\onecolumnDbottominarea}[6][all]{% \onecolumnbottominarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} % \end{macrocode} -%\DescribeMacro{\twocolumnbottom} -% Now for two \gls{flow}s side by side with a static +%\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 -% "\twocolumnbottom["\meta{pages}"]{"\meta{type}"}{"\meta{H}"}". +% \cs{twocolumnbottom}\oarg{pages}\marg{type}\marg{H}. % \begin{macrocode} -\newcommand{\twocolumnbottom}[3][all]{% +\newcommand*{\twocolumnbottom}[3][all]{% \twocolumnSbottominarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\twocolumnbottom} % \end{macrocode} -%\DescribeMacro{\twocolumnSbottom} +%\end{macro} +%\begin{macro}{\twocolumnSbottom} % Special case for \gls{static}. % \begin{macrocode} -\newcommand{\twocolumnSbottom}[2][all]{% +\newcommand*{\twocolumnSbottom}[2][all]{% \twocolumnbottom[#1]{static}{#2}} % \end{macrocode} -%\DescribeMacro{\twocolumnDbottom} +%\end{macro} +%\begin{macro}{\twocolumnDbottom} % Special case for \gls{dynamic}. % \begin{macrocode} -\newcommand{\twocolumnDbottom}[2][all]{% +\newcommand*{\twocolumnDbottom}[2][all]{% \twocolumnbottom[#1]{dynamic}{#2}} % \end{macrocode} -%\DescribeMacro{\twocolumnbottominarea} +%\end{macro} +%\begin{macro}{\twocolumnbottominarea} % Now for a general area. % Syntax:\newline -% "\twocolumnbottominarea["\meta{pages}"]{"\meta{type}"}{"\meta{H}"}{"\meta{w}"}{"\meta{h}"}{"\meta{x}"}{"\meta{y}"}". +% \cs{twocolumnbottominarea}\oarg{pages}\marg{type}\marg{H}\marg{w}\marg{h}\marg{x}\marg{y}. % \begin{macrocode} -\newcommand{\twocolumnbottominarea}[7][all]{% +\newcommand*{\twocolumnbottominarea}[7][all]{% \setlength{\@ff@staticW}{#4}% \setlength{\@ff@staticH}{#3}% +% \end{macrocode} % work out height of the flow frames -\setlength{\columnheight}{#5} -\addtolength{\columnheight}{-\@ff@staticH} -\addtolength{\columnheight}{-\vcolumnsep} +% \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}% -% work out the y position of the flow frames +% \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 -% work out the x offset of the second column +% \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}% @@ -3771,84 +4533,101 @@ which really doesn't make sense}% } \@onlypreamble{\twocolumnbottominarea} % \end{macrocode} -%\DescribeMacro{\twocolumnSbottominarea} +%\end{macro} +%\begin{macro}{\twocolumnSbottominarea} % Special case for \gls{static}. % \begin{macrocode} -\newcommand{\twocolumnSbottominarea}[6][all]{% +\newcommand*{\twocolumnSbottominarea}[6][all]{% \twocolumnbottominarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} % \end{macrocode} -%\DescribeMacro{\twocolumnDbottominarea} +%\end{macro} +%\begin{macro}{\twocolumnDbottominarea} % Special case for \gls{dynamic}. % \begin{macrocode} -\newcommand{\twocolumnDbottominarea}[6][all]{% +\newcommand*{\twocolumnDbottominarea}[6][all]{% \twocolumnbottominarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} % \end{macrocode} -% Now for an arbitrary number of parallel \gls{flow}s +%\end{macro} +% Now for an arbitrary number of parallel \glspl{flow} % with a \gls{static} beneath all of them. % -%\DescribeMacro{\Ncolumnbottom} +%\begin{macro}{\Ncolumnbottom} % First make them fill the entire \gls{typeblock}. % Syntax:\newline -% "\Ncolumnbottom["\meta{pages}"]{"\meta{type}"}{"\meta{H}"}". +% \cs{Ncolumnbottom}\oarg{pages}\marg{type}\marg{H}. % \begin{macrocode} -\newcommand{\Ncolumnbottom}[4][all]{% +\newcommand*{\Ncolumnbottom}[4][all]{% \Ncolumnbottominarea[#1]{#2}{#3}{#4}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\Ncolumnbottom} % \end{macrocode} -%\DescribeMacro{\NcolumnSbottom} +%\end{macro} +%\begin{macro}{\NcolumnSbottom} % Special case for \gls{static}. % \begin{macrocode} -\newcommand{\NcolumnSbottom}[3][all]{% +\newcommand*{\NcolumnSbottom}[3][all]{% \Ncolumnbottom[#1]{static}{#2}{#3}} % \end{macrocode} -%\DescribeMacro{\NcolumnDbottom} +%\end{macro} +%\begin{macro}{\NcolumnDbottom} % Special case for \gls{dynamic}. % \begin{macrocode} -\newcommand{\NcolumnDbottom}[3][all]{% +\newcommand*{\NcolumnDbottom}[3][all]{% \Ncolumnbottom[#1]{dynamic}{#2}{#3}} % \end{macrocode} -%\DescribeMacro{\Ncolumnbottominarea} +%\end{macro} +%\begin{macro}{\Ncolumnbottominarea} % Again check the user has requested a sensible number. % \begin{macrocode} -\newcommand{\Ncolumnbottominarea}[8][all]{% +\newcommand*{\Ncolumnbottominarea}[8][all]{% \ifnum#3>2\relax -\@Ncolumnbottominarea[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}% + \@Ncolumnbottominarea[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}% \else -\ifcase#3 -\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 + \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]{% +\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}% -% adjust the flow frame height so that it is a multiple of \baselineskip -\ifffvadjust\adjustheight{\columnheight}\fi% +% \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}% -% work out the y offset of the flow frames +% \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}% @@ -3859,51 +4638,64 @@ which really doesn't make sense}% \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} -%\DescribeMacro{\NcolumnSbottominarea} +%\end{macro} +%\begin{macro}{\NcolumnSbottominarea} % Specific case for \gls{static}. % \begin{macrocode} -\newcommand{\NcolumnSbottominarea}[1][all]{% +\newcommand*{\NcolumnSbottominarea}[1][all]{% \Ncolumnbottominarea[#1]{static}} % \end{macrocode} -%\DescribeMacro{\NcolumnDbottominarea} +%\end{macro} +%\begin{macro}{\NcolumnDbottominarea} % Specific case for \gls{dynamic}. % \begin{macrocode} -\newcommand{\NcolumnDbottominarea}[1][all]{% +\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]{% +\newcommand*{\adjustheight}[1]{% +% \end{macrocode} % convert to an integer +% \begin{macrocode} \@ff@adjh=#1\relax -\divide\@ff@adjh by \baselineskip -#1=\baselineskip -\multiply#1 by \@ff@adjh} +\divide\@ff@adjh by \baselineskip\relax +#1=\baselineskip\relax +\multiply#1 by \@ff@adjh\relax +} % \end{macrocode} -%\DescribeMacro{\adjustcolsep} +%\end{macro} +%\begin{macro}{\adjustcolsep} % Adjust the value of "\columnsep" so that the margins will fit between columns. % \begin{macrocode} -\newcommand{\adjustcolsep}{% +\newcommand*{\adjustcolsep}{% \multiply\columnsep by 2\relax \addtolength{\columnsep}{\marginparwidth}} % \end{macrocode} +%\end{macro} +% %\subsubsection{Backdrop Effects} -% Set up some commands to make \gls{static}s for different styles of backdrop. -%\DescribeMacro{\vtwotone} +% Set up some commands to make \glspl{static} for different styles +% of backdrop. +%\begin{macro}{\vtwotone} % Syntax:\newline -% "\vtwotone["\meta{pages}"]["\meta{xoffset}"]{"\meta{W1}"}{"\meta{C1}"}{"\meta{L1}"}{"\meta{W2}"}{"\meta{C2}"}{"\meta{L2}"}" +% \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 +% 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. @@ -3917,24 +4709,25 @@ which really doesn't make sense}% % Vertical two tone effect where the height of the static % frames is equal to the paper height. % \begin{macrocode} -\newcommand{\vtwotone}[1][all]{% +\newcommand*{\vtwotone}[1][all]{% \def\ff@pages{#1}\@vtwotone} -\newcommand{\@vtwotone}[1][0pt]{\@@vtwotonebottom{#1}{\paperheight}} +\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}. -%\DescribeMacro{\vtwotonebottom} % Syntax:\newline -% "\vtwotonebottom["\meta{pages}"]["\meta{xoffset}"]{"\meta{H}"}{"\meta{W1}"}{"\meta{C1}"}{"\meta{L1}"}{"\meta{W2}"}{"\meta{C2}"}{"\meta{L2}"}" +% \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]{% +\newcommand*{\@@vtwotonebottom}[8]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@x}{#1}% @@ -3945,29 +4738,32 @@ which really doesn't make sense}% \@onlypreamble{\vtwotone} % \end{macrocode} +%\end{macro} +%\begin{macro}{\vtwotonebottom} % Border strip along the bottom of the page % \begin{macrocode} -\newcommand{\vtwotonebottom}[1][all]{% +\newcommand*{\vtwotonebottom}[1][all]{% \def\ff@pages{#1}\@vtwotonebottom} \@onlypreamble{\vtwotonebottom} -\newcommand{\@vtwotonebottom}[2][0pt]{\@@vtwotonebottom{#1}{#2}} +\newcommand*{\@vtwotonebottom}[2][0pt]{\@@vtwotonebottom{#1}{#2}} % \end{macrocode} -%\DescribeMacro{\vtwotonetop} +%\end{macro} +%\begin{macro}{\vtwotonetop} % Border strip along the top of the page % \begin{macrocode} -\newcommand{\vtwotonetop}[1][all]{% +\newcommand*{\vtwotonetop}[1][all]{% \def\ff@pages{#1}\@vtwotonetop} -\newcommand{\@vtwotonetop}[2][0pt]{\@@vtwotonetop{#1}{#2}} +\newcommand*{\@vtwotonetop}[2][0pt]{\@@vtwotonetop{#1}{#2}} -\newcommand{\@@vtwotonetop}[8]{% +\newcommand*{\@@vtwotonetop}[8]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computetopedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{-#2}% @@ -3977,29 +4773,34 @@ which really doesn't make sense}% \@nextvband{\ff@pages}{#2}{#6}{#7}{#8}% } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@nextvband} % Make next \gls{static}. Syntax:\newline -% "\@nextvband{pages}{height}{width}{colour specs}{label}"\newline -% x and y offsets are given by "\@ff@tmp@x" and "\@ff@tmp@y". +% \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]{% +\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}% +\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} -%\DescribeMacro{\vNtone} +%\end{macro} +%\begin{macro}{\vNtone} % Similarly for N colours. Syntax:\newline -% "\vNtone["\meta{pages}"]["\meta{xoffset}"]{"\meta{n}"}{"\meta{W1}"}{"\meta{C1}"}{"\meta{L1}"}"\ldots"{"\meta{Wn}"}{"\meta{Cn}"}{"\meta{Ln}"}"\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 \IDL{} \meta{Ln}. +% colour \meta{Cn} and \gls{idl} \meta{Ln}. % % Keep track of which strip we are doing. % \begin{macrocode} @@ -4008,23 +4809,27 @@ which really doesn't make sense}% % This command needs two optional arguments, so store % first optional argument, and look for the next. % \begin{macrocode} -\newcommand{\vNtone}[1][all]{% +\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]{% +\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]{% +\newcommand*{\@@vNtone}[3]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@x}{#1}% @@ -4034,60 +4839,71 @@ which really doesn't make sense}% \@nextvNband% } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@nextvNband} % Recursively do the next strip. % \begin{macrocode} -\newcommand{\@nextvNband}{% +\newcommand*{\@nextvNband}{% \ifnum\@thisstrip>0\relax - \let\next\@@nextvNband% + \let\flf@next\@@nextvNband \else - \let\next\relax% + \let\flf@next\relax \fi \advance\@thisstrip by -1\relax -\next} +\flf@next} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@@nextvNband} % Do current strip, and go on to next one. % \begin{macrocode} -\newcommand{\@@nextvNband}[3]{% +\newcommand*{\@@nextvNband}[3]{% \@nextvband{\ff@pages}{\@ff@staticH}{#1}{#2}{#3}\@nextvNband} \@onlypreamble{\vNtone} % \end{macrocode} -%\DescribeMacro{\vNtonebottom} +%\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]{% +\newcommand*{\vNtonebottom}[1][all]{% \def\ff@pages{#1}\@vNtonebottom} - \@onlypreamble{\vNtonebottom} - -\newcommand{\@vNtonebottom}[3][0pt]{% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@vNtonebottom} +% \begin{macrocode} +\newcommand*{\@vNtonebottom}[3][0pt]{% \@@vNtone{#1}{#2}{#3}} % \end{macrocode} -%\DescribeMacro{\vNtonetop} +%\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]{% +\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]{% +\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]{% +\newcommand*{\@@vNtonetop}[3]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computetopedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{-#3}% @@ -4098,24 +4914,30 @@ which really doesn't make sense}% \@nextvNband% } % \end{macrocode} -%\DescribeMacro{\htwotone} +%\end{macro} +%\begin{macro}{\htwotone} % Now do horizontal strips. Syntax:\newline -% "\htwotone["\meta{pages}"]["\meta{y offset}"]{"\meta{H1}"}{"\meta{C1}"}{"\meta{L1}"}{"\meta{H2}"}{"\meta{C2}"}{"\meta{L2}"}" +% \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]{% +\newcommand*{\htwotone}[1][all]{% \def\ff@pages{#1}\@htwotone} - -\newcommand{\@htwotone}[1][0pt]{\@@htwotoneleft{#1}{\paperwidth}} % \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]{% +\newcommand*{\@@htwotoneleft}[8]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{#1}% @@ -4125,31 +4947,42 @@ which really doesn't make sense}% \@onlypreamble{\htwotone} % \end{macrocode} -%\DescribeMacro{\htwotoneleft} +%\end{macro} +%\begin{macro}{\htwotoneleft} % Two tone horizontal strips along left border -% Syntax: "\htwotoneleft[pages][y offset]{width}{H1}{C1}{L1}{H2}{C2}{L2}" +% 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]{% +\newcommand*{\htwotoneleft}[1][all]{% \def\ff@pages{#1}\@htwotoneleft} - -\newcommand{\@htwotoneleft}[2][0pt]{\@@htwotoneleft{#1}{#2}} - \@onlypreamble{\htwotoneleft} % \end{macrocode} -%\DescribeMacro{\htwotoneright} +%\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]{% +\newcommand*{\htwotoneright}[1][all]{% \def\ff@pages{#1}\@htwotoneright} - -\newcommand{\@htwotoneright}[2][0pt]{\@@htwotoneright{#1}{#2}} - -\newcommand{\@@htwotoneright}[8]{% +\@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}% + \computerightedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{#1}% @@ -4158,24 +4991,30 @@ which really doesn't make sense}% \@nexthband{\ff@pages}{#2}{#3}{#4}{#5}% \@nexthband{\ff@pages}{#2}{#6}{#7}{#8}% } - -\@onlypreamble{\htwotoneright} % \end{macrocode} -%\DescribeMacro{\hNtone} -% Now for N coloured horizontal strips +%\end{macro} +%\begin{macro}{\hNtone} +% Now for \meta{N} coloured horizontal strips % \begin{macrocode} -\newcommand{\hNtone}[1][all]{% +\newcommand*{\hNtone}[1][all]{% \def\ff@pages{#1}\@hNtone} - -\newcommand{\@hNtone}[2][0pt]{% +\@onlypreamble{\hNtone} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@hNtone} +% \begin{macrocode} +\newcommand*{\@hNtone}[2][0pt]{% \@@hNtone{#1}{#2}{\paperwidth}} - -\newcommand{\@@hNtone}[3]{% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@hNtone} +% \begin{macrocode} +\newcommand*{\@@hNtone}[3]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{#1}% @@ -4183,37 +5022,44 @@ which really doesn't make sense}% \setlength{\@ff@staticW}{#3}% \@nexthNband% } - -\@onlypreamble{\hNtone} % \end{macrocode} -%\DescribeMacro{\hNtoneleft} +%\end{macro} +%\begin{macro}{\hNtoneleft} % Now for the N tone strips along the left border % \begin{macrocode} -\newcommand{\hNtoneleft}[1][all]{% +\newcommand*{\hNtoneleft}[1][all]{% \def\ff@pages{#1}\@hNtoneleft} - \@onlypreamble{\hNtoneleft} - -\newcommand{\@hNtoneleft}[3][0pt]{% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@hNtoneleft} +% \begin{macrocode} +\newcommand*{\@hNtoneleft}[3][0pt]{% \@@hNtone{#1}{#2}{#3}} % \end{macrocode} -%\DescribeMacro{\hNtoneright} +%\end{macro} +%\begin{macro}{\hNtoneright} % Border strip along the right border % \begin{macrocode} -\newcommand{\hNtoneright}[1][all]{% +\newcommand*{\hNtoneright}[1][all]{% \def\ff@pages{#1}\@hNtoneright} - \@onlypreamble{\hNtoneright} - -\newcommand{\@hNtoneright}[3][0pt]{% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@hNtoneright} +% \begin{macrocode} +\newcommand*{\@hNtoneright}[3][0pt]{% \@@hNtoneright{#1}{#2}{#3}} - -\newcommand{\@@hNtoneright}[3]{% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@hNtoneright} +% \begin{macrocode} +\newcommand*{\@@hNtoneright}[3]{% \computerightedgeodd{\@ff@tmp@x}% \if@twoside -\computerightedgeeven{\@ff@tmp@x@even}% + \computerightedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{#1}% @@ -4224,12 +5070,14 @@ which really doesn't make sense}% \@nexthNband% } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@nexthband} % Make next \gls{static}. Syntax:\newline -% "\@nexthband{"\meta{pages}"}{"\meta{width}"}{"\meta{height}"}{"\meta{colour specs}"}{"\meta{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. +% \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]{% +\newcommand*{\@nexthband}[5]{% \setlength{\@ff@staticH}{#3}% \ifthenelse{\equal{#5}{}}{% \newstaticframe[#1]{#2}{\@ff@staticH}{\@ff@tmp@x}{\@ff@tmp@y}}% @@ -4241,38 +5089,44 @@ which really doesn't make sense}% \addtolength{\@ff@tmp@y}{\@ff@staticH}% } % \end{macrocode} +%\end{macro} +%\begin{macro}{\@nexthNband} % Get next horizontal strip recursively. % \begin{macrocode} -\newcommand{\@nexthNband}{% +\newcommand*{\@nexthNband}{% \ifnum\@thisstrip>0\relax - \let\next\@@nexthNband% + \let\flf@next\@@nexthNband% \else - \let\next\relax% + \let\flf@next\relax% \fi \advance\@thisstrip by -1\relax -\next} - -\newcommand{\@@nexthNband}[3]{% +\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} -%\DescribeMacro{\makebackgroundframe} +%\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 -% \gls{static}s, otherwise it will obscure all the ones defined +% \glspl{static}, otherwise it will obscure all the ones defined % before it. Syntax:\newline -% "\makebackgroundframe["\meta{pages}"]["\meta{label}"]". +% \cs{makebackgroundframe}\oarg{pages}\oarg{label}. % \begin{macrocode} -\newcommand{\makebackgroundframe}[1][all]{% +\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.}% + \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}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \newstaticframe[#1]{\paperwidth}{\paperheight}{\@ff@tmp@x}% @@ -4281,36 +5135,42 @@ static frames may be obscured.}% \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 -% "\insertvrule["\meta{y top}"]["\meta{y bottom}"]{"\meta{frame1 type}"}{"\meta{IDN2}"}{"\meta{frame2 type}"}{"\meta{IDN2}"}". -% The starred version uses \IDL{}s instead of \IDN{}s. +% \cs{insertvrule}\oarg{y top}\oarg{y bottom}\marg{frame1 type}\marg{IDN2}\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}. % -% The default value of "\columnseprule" is "0pt", but since -% a rule is only inserted explicitly, set "\columnseprule" -% to a non zero length. -%\DescribeMacro{\columnseprule} +%\begin{macro}{\ffcolumnseprule} +% This has changed in v1.09. Define "\ffcolumnseprule" and use +% instead of "\columnseprule" % \begin{macrocode} -\setlength{\columnseprule}{2pt} +\newlength\ffcolumnseprule +\setlength{\ffcolumnseprule}{2pt} % \end{macrocode} -%\DescribeMacro{\insertvrule} +%\end{macro} +%\begin{macro}{\insertvrule} % Determine whether or not the starred version is being % used. % \begin{macrocode} -\newcommand{\insertvrule}{\@ifstar\@sinsertvrule\@insertvrule} +\newcommand*{\insertvrule}{\@ifstar\@sinsertvrule\@insertvrule} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@insertvrule} % Two optional arguments required. % \begin{macrocode} -\newcommand{\@insertvrule}[1][0pt]{% +\newcommand*{\@insertvrule}[1][0pt]{% \@ifnextchar[{\@@insertvrule[#1]}{\@@insertvrule[#1][0pt]}} % \end{macrocode} +%\end{macro} % Need some lengths: % \begin{macrocode} \newlength\@ff@left@x @@ -4320,6 +5180,7 @@ static frames may be obscured.}% \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} @@ -4339,26 +5200,28 @@ 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 -%"\@@insert@vrule{"\meta{y top}"}{"\meta{y bottom}"}{"\meta{type ID}"}{"\meta{IDN}"}{"\meta{type ID}"}{"\meta{IDN}"}". +%\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]{ +\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 -\@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}% +\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}% @@ -4369,12 +5232,12 @@ or 'dynamic'}}}}% \setlength{\@ff@tmp@y}{\ffareay}% \addtolength{\@ff@tmp@y}{\ffareaheight}% \ifnum\@ff@tmp@y>\@ff@staticH -\setlength{\@ff@staticH}{\@ff@tmp@y}% + \setlength{\@ff@staticH}{\@ff@tmp@y}% \fi -\ifnum\@ff@left@y<\ffareay -\setlength{\@ff@tmp@y}{\@ff@left@y}% +\ifnum\@ff@left@y<\ffareay\relax + \setlength{\@ff@tmp@y}{\@ff@left@y}% \else -\setlength{\@ff@tmp@y}{\ffareay}% + \setlength{\@ff@tmp@y}{\ffareay}% \fi \addtolength{\@ff@staticH}{-\@ff@tmp@y}% \newstaticframe{\@ff@staticW}{\@ff@staticH}% @@ -4382,92 +5245,35 @@ or 'dynamic'}}}}% \addtolength{\@ff@staticH}{#1}% \addtolength{\@ff@staticH}{#2}% \setstaticcontents{\c@maxstatic}{\hfill -\rule[-#2]{\columnseprule}{\@ff@staticH}\hfill\mbox{}} -\ifcase#3 -\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} +\rule[-#2]{\ffcolumnseprule}{\@ff@staticH}\hfill\mbox{}}% +\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.) -\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} -% 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} -% 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 \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 -\PackageError{flowfram}{Unknown frame ID type '#1'}{% -Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)} -\or -\ifnum#2>\c@maxflow -\PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{% -Flow frame IDNs go from 1 to \number\c@maxflow} -\else -\setlength{\ffareax}{\flowframex{#2}} -\setlength{\ffareay}{\flowframey{#2}} -\setlength{\ffareawidth}{\flowframewidth{#2}} -\setlength{\ffareaheight}{\flowframeheight{#2}} -\fi -\or -\ifnum#2>\c@maxstatic -\PackageError{flowfram}{Invalid static frame IDN '\number#2'}{% -Static frame IDNs go from 1 to \number\c@maxstatic} -\else -\setlength{\ffareax}{\staticframex{#2}} -\setlength{\ffareay}{\staticframey{#2}} -\expandafter\expandafter\expandafter -\@ff@getstaticpos -\csname @sf@dim@\romannumeral#2\endcsname -\setlength{\ffareawidth}{\@ff@tmp@x}% -\setlength{\ffareaheight}{\@ff@tmp@y}% -\fi -\or -\ifnum#2>\c@dynamic -\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 +\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}{\@sinsertvrule} % Starred version. Two optional arguments required. % \begin{macrocode} -\newcommand{\@sinsertvrule}[1][0pt]{% +\newcommand*{\@sinsertvrule}[1][0pt]{% \@ifnextchar[{\@@sinsertvrule[#1]}{\@@sinsertvrule[#1][0pt]}} % \end{macrocode} -% Find out the frame types and their \IDN{}. +%\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}}{% @@ -4492,18 +5298,23 @@ or 'dynamic'}}}}% {\@ff@type@ii}{\ff@id}% } % \end{macrocode} -%\DescribeMacro{\inserthrule} +%\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} +\newcommand*{\inserthrule}{\@ifstar\@sinserthrule\@inserthrule} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@inserthrule} % Two optional arguments required. % \begin{macrocode} -\newcommand{\@inserthrule}[1][0pt]{% +\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} @@ -4523,26 +5334,28 @@ 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 -%"\@@insert@hrule{"\meta{x left}"}{"\meta{x right}"}{"\meta{type ID}"}{"\meta{IDN}"}{"\meta{type ID}"}{"\meta{IDN}"}". +%\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]{ +\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 -\@ff@swaplen{\@ff@left@x}{\ffareax}% -\@ff@swaplen{\@ff@left@y}{\ffareay}% -\@ff@swaplen{\@ff@left@width}{\ffareawidth}% -\@ff@swaplen{\@ff@left@height}{\ffareaheight}% +\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} +\setlength{\@ff@tmp@y}{\@ff@left@y}% \addtolength{\@ff@tmp@y}{\@ff@left@height}% \setlength{\@ff@staticH}{\ffareay}% \addtolength{\@ff@staticH}{-\@ff@tmp@y}% @@ -4550,13 +5363,13 @@ or 'dynamic'}}}}% \addtolength{\@ff@staticW}{\@ff@left@width}% \setlength{\@ff@tmp@x}{\ffareax}% \addtolength{\@ff@tmp@x}{\ffareawidth}% -\ifnum\@ff@tmp@x>\@ff@staticW -\setlength{\@ff@staticW}{\@ff@tmp@x}% +\ifnum\@ff@tmp@x>\@ff@staticW\relax + \setlength{\@ff@staticW}{\@ff@tmp@x}% \fi -\ifnum\@ff@left@x<\ffareax -\setlength{\@ff@tmp@x}{\@ff@left@x}% +\ifnum\@ff@left@x<\ffareax\relax + \setlength{\@ff@tmp@x}{\@ff@left@x}% \else -\setlength{\@ff@tmp@x}{\ffareax}% + \setlength{\@ff@tmp@x}{\ffareax}% \fi \addtolength{\@ff@staticW}{-\@ff@tmp@x}% \newstaticframe{\@ff@staticW}{\@ff@staticH}% @@ -4564,26 +5377,30 @@ or 'dynamic'}}}}% \addtolength{\@ff@staticW}{#1}% \addtolength{\@ff@staticW}{#2}% \setstaticcontents{\c@maxstatic}{% -\hspace*{-#1}\rule{\@ff@staticW}{\columnseprule}} -\ifcase#3 -\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} +\hspace*{-#1}\rule{\@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} +\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}{\@sinserthrule} % Starred version. Two optional arguments required. % \begin{macrocode} -\newcommand{\@sinserthrule}[1][0pt]{% +\newcommand*{\@sinserthrule}[1][0pt]{% \@ifnextchar[{\@@sinserthrule[#1]}{\@@sinserthrule[#1][0pt]}} % \end{macrocode} -% Find out the frame types and their \IDN{}. +%\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}}{% @@ -4608,168 +5425,40 @@ or 'dynamic'}}}}% {\@ff@type@ii}{\ff@id}% } % \end{macrocode} -%\DescribeMacro{\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} -%\DescribeMacro{\computeleftedgeeven} -% Now for the even pages -% \begin{macrocode} -\newcommand*{\computeleftedgeeven}[1]{% -\setlength{#1}{-1in}% -\addtolength{#1}{-\hoffset}% -\addtolength{#1}{-\evensidemargin}} -% \end{macrocode} -%\DescribeMacro{\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} -%\DescribeMacro{\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} -%\DescribeMacro{\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} -%\DescribeMacro{\computerightedgeeven} -% Now for the even pages. -% \begin{macrocode} -\newcommand*{\computerightedgeeven}[1]{% -\computeleftedgeeven{#1}% -\addtolength{#1}{\paperwidth}} -% \end{macrocode} -% Compute the minimum area surrounding the listed \gls{flow}s. -% Values stored in "\ffareawidth", "\ffareaheight", "\ffareax" -% and "\ffareay" -% \begin{macrocode} -\newlength\ffareawidth -\newlength\ffareaheight -\newlength\ffareax -\newlength\ffareay -% \end{macrocode} -%\DescribeMacro{\computeflowframearea} -% Starred version identifies frame by \IDL{}, unstarred -% version identifies frame by \IDN{}. -% \begin{macrocode} -\newcommand{\computeflowframearea}{% -\@ifstar\@scomputeffarea\@computeffarea} -% \end{macrocode} -% 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} -% 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} +% % \subsection{Putting Chapter Headings in Dynamic Frames} -%\DescribeMacro{\dfchaphead} +%\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 \IDL{}, -% the unstarred form identifies the frame \IDN{}. +% 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}{% +\newcommand*{\dfchaphead}{% \@ifstar\@sdynamicchap\@dynamicchap} % \end{macrocode} -%\DescribeMacro{\DFchapterstyle} -%\DescribeMacro{\DFschapterstyle} +%\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 +\@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 @@ -4784,13 +5473,16 @@ class you are using does not define chapters}}{% \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 \gls{dynamic}s. This is because, either (1) the sectioning +% 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 @@ -4805,32 +5497,38 @@ class you are using does not define chapters}}{% % \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} +\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} +\newcommand*{\@ttb@type}{\defaultthumbtabtype} % \end{macrocode} -%\DescribeMacro{\makethumbtabs} -% Make the thumbtabs. Read in information from .ttb +%\end{macro} +%\begin{macro}{\makethumbtabs} +% Make the thumbtabs. Read in information from ".ttb" % file, and open it for output. % Syntax:\newline -% "\makethumbtabs["\meta{y offset}"]{"\meta{height}"}["\meta{sec type}"]". +% \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]{% +\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. @@ -4846,18 +5544,23 @@ Unknown section type '#3'}{}}{% \@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. +% ".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}}% +\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 @@ -4872,7 +5575,8 @@ Unknown section type '#3'}{}}{% \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}}% +\addtocontents{ttb}{\protect\thumbtab + {\thepage}{\thepart}{##1}{part.\thepage}}% \@afterheading}}{% \let\@ttb@old@endpart\@endpart \def\@part[##1]##2{% @@ -4886,12 +5590,14 @@ Unknown section type '#3'}{}}{% \@ttb@old@endpart }}} % \end{macrocode} -% Thumbtabs defined for one of remaining the standard +%\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]{% +\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}% @@ -4902,7 +5608,9 @@ Unknown section type '#3'}{}}{% \@afterheading}{}% }} % \end{macrocode} -% The thumbtab file, .ttb, will have a series of "\thumbtab" +%\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} @@ -4921,9 +5629,11 @@ Unknown section type '#3'}{}}{% \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 \gls{pgrange}s between +% 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 @@ -4935,44 +5645,47 @@ Unknown section type '#3'}{}}{% % ended range. This final thumbtab will continue to be displayed % until cancelled by "\disablethumbtabs". % -% Syntax: "\@dothumbtabs{"\meta{y offset}"}{"\meta{height}"}". +% Syntax: \cs{@dothumbtabs}\marg{y offset}\marg{height}. % \begin{macrocode} -\newcommand{\@dothumbtabs}[2]{% +\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 -\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}% + \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} -%\DescribeMacro{\thumbtabwidth} +%\end{macro} +%\begin{macro}{\thumbtabwidth} % Default thumbtab width. % \begin{macrocode} \newlength{\thumbtabwidth} \setlength{\thumbtabwidth}{1cm} % \end{macrocode} -%\DescribeMacro{\thumbtabindexformat} +%\end{macro} +%\begin{macro}{\thumbtabindexformat} % Thumbtab format. If hyperlinks have been defined, % use a hyperlink in the thumbtab index. -% Syntax: "\thumbtabindexformat{"\meta{link}"}{"\meta{text}"}{"\meta{height}"}" +% Syntax: \cs{thumbtabindexformat}\marg{link}\marg{text}\marg{height} % \begin{macrocode} \@ifundefined{hyperlink}{% \newcommand{\thumbtabindexformat}[3]{% @@ -4981,11 +5694,12 @@ Unknown section type '#3'}{}}{% \hyperlink{#1}{\thumbtabformat{#2}{#3}}} } % \end{macrocode} -%\DescribeMacro{\thumbtabformat} +%\end{macro} +%\begin{macro}{\thumbtabformat} % Individual thumbtab format. If rotating has % been disabled, stack the letters vertically (this % doesn't look very good). -% Syntax: "\thumbtabformat{"\meta{text}"}{"\meta{height}"}" +% Syntax: \cs{thumbtabformat}\marg{text}\marg{height} % \begin{macrocode} \newcommand{\thumbtabformat}[2]{% \if@ttb@rotate @@ -4996,32 +5710,78 @@ Unknown section type '#3'}{}}{% \centering\@ttb@stack{#1}}% \fi} % \end{macrocode} -% Stack letters vertically. Separate each character -% with a paragraph break. At the moment, spaces -% disappear. Why doesn't "\obeyspaces" fix this? +%\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]{% -{\obeyspaces\expandafter\@@ttb@stack#1\end}} - -\def\@@ttb@stack#1{% -\ifx#1\end\let\next\relax +\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\par -\let\next\@@ttb@stack + #1\\% + \def\@flf@tmp{#2}% + \ifx\@nnil#2\relax + \let\flf@next\@gobble + \else + \let\flf@next\@@ttb@stack + \fi \fi -\next} +\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 -% \gls{dynamic}s associated with each thumbtab. +% \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 \IDL{} "thumbtab"\meta{n} where \meta{n} is the index of +% 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 \IDL{} +% Each frame in the thumbtab index is given an \gls{idl} % "thumbtabindex"\meta{n}, where \meta{n} is as before. % \begin{macrocode} -\newcount\@greyscale - \newcommand{\@@dothumbtabs}[2]{% \setlength{\@ff@tmp@y}{\textheight}% \addtolength{\@ff@tmp@y}{-#2}% @@ -5031,130 +5791,148 @@ Unknown section type '#3'}{}}{% \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}% + \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 -\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}% +% \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 -\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}} +% \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 -\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 +% \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 -\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}% +% \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} -%\DescribeMacro{\enablethumbtabs} -% Enable thumbtabs. Once the \IDN{} is obtained for the -% first thumbtab, the rest can be found bby incrementing the +%\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}{% +\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} -%\DescribeMacro{\disablethumbtabs} +%\end{macro} +%\begin{macro}{\disablethumbtabs} % Disable all thumbtabs. % \begin{macrocode} -\newcommand{\disablethumbtabs}{% +\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} -%\DescribeMacro{\thumbtabindex} +%\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 +% 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}{% +\newcommand*{\thumbtabindex}{% \ifnum\c@maxthumbtabs>0\relax \@ff@tmpN=0\relax \@dynamicframeid{thumbtabindex1}% @@ -5169,9 +5947,10 @@ Unknown section type '#3'}{}}{% \advance\ff@id by 2\relax }\fi} % \end{macrocode} -%\DescribeMacro{\setthumbtab} +%\end{macro} +%\begin{macro}{\setthumbtab} % Modify the settings for all the thumbtabs (including thumbtab -% index). Since the thumbtabs are \gls{dynamic}s +% 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 @@ -5189,6 +5968,8 @@ Unknown section type '#3'}{}}{% \@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]{% @@ -5201,7 +5982,8 @@ ttb file may not be up-to-date}}{% \@dynamicframeid{thumbtabindex\number#1}% \@@setdynamicframe{\ff@id}{#2}}} % \end{macrocode} -%\DescribeMacro{\setthumbtabindex} +%\end{macro} +%\begin{macro}{\setthumbtabindex} % Only change settings for the thumbtab index. This can % take a comma-separated number list. % \begin{macrocode} @@ -5213,35 +5995,43 @@ ttb file may not be up-to-date}}{% \@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 '#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} -%\DescribeMacro{\tocandhumbtabindex} +%\end{macro} +%\begin{macro}{\tocandhumbtabindex} % Do both the table of contents and the thumbtab index % \begin{macrocode} -\newcommand{\tocandthumbtabindex}{% +\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} +\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 inputted. +% 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. @@ -5249,16 +6039,18 @@ ttb file may not be up-to-date}}{% \let\@ttb@old@starttoc\@starttoc \newif\if@storetoc \@storetocfalse -\renewcommand{\@starttoc}[1]{% +\renewcommand*{\@starttoc}[1]{% \if@storetoc -\@ttb@storetoc{#1}% + \@ttb@storetoc{#1}% \else -\@ttb@old@starttoc{#1}% + \@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]{% +\newcommand*{\@ttb@storetoc}[1]{% \begingroup \makeatletter \@storefileconts{\jobname.#1}% @@ -5269,26 +6061,41 @@ ttb file may not be up-to-date}}{% \@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}{% +\newcommand*{\@storefileconts}[1]{\IfFileExists{#1}{% \@@storefileconts\@filef@und}{% -\typeout{No file #1.}}} +\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} -% read each line in from the file, and add to the contents +%\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}{% -\expandafter\@ttb@minitoclevel\expandafter=\csname @ttb@\@ttb@minitoctype @level\endcsname}% +\@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 @@ -5299,7 +6106,9 @@ ttb file may not be up-to-date}}{% }% \closein\@ttb@toc} % \end{macrocode} -% before each line is added to the contents list, it is +%\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 @@ -5329,27 +6138,34 @@ ttb file may not be up-to-date}}{% \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{}\relax -\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 + \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} @@ -5361,15 +6177,18 @@ ttb file may not be up-to-date}}{% \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 + \@contslinetrue \else -\@contslinefalse + \@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. @@ -5377,6 +6196,8 @@ ttb file may not be up-to-date}}{% \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 @@ -5391,88 +6212,104 @@ ttb file may not be up-to-date}}{% \aligntocfalse \let\@ttb@old@tableofcontents\tableofcontents -\renewcommand{\tableofcontents}{ +\renewcommand{\tableofcontents}{% \@storetoctrue \@ttb@old@tableofcontents \ifaligntoc -\@printalignedtoc + \@printalignedtoc \else -\@printtoc + \@printtoc \fi \@storetocfalse \global\c@minitoc=0\relax} % \end{macrocode} -%\DescribeMacro{\beforeminitocskip} +%\end{macro} +%\begin{macro}{\beforeminitocskip} % Vertical space to add before minitoc. % \begin{macrocode} \newlength\beforeminitocskip \setlength{\beforeminitocskip}{0pt} % \end{macrocode} -%\DescribeMacro{\afterminitocskip} +%\end{macro} +%\begin{macro}{\afterminitocskip} % Vertical space to add after minitoc. % \begin{macrocode} \newlength\afterminitocskip \setlength{\afterminitocskip}{\baselineskip} % \end{macrocode} -%\DescribeMacro{\dominitoc} +%\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}} +\newcommand*{\dominitoc}[1]{% +\if@minitoc \@dominitoc{#1}\fi} +\newcommand*{\@dominitoc}[1]{\@@dominitoc{#1}} % \end{macrocode} -%\DescribeMacro{\minitocstyle} +%\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]{% +\newcommand*{\@@dominitoc}[1]{% {\minitocstyle{% \vskip\beforeminitocskip \csname @minitoc@\romannumeral#1\endcsname}} \vskip\afterminitocskip} % \end{macrocode} -%\DescribeMacro{\appenddfminitoc} +%\end{macro} +% +%\begin{macro}{\appenddfminitoc} % Modify "\dominitoc" so that the minitoc is appended % to specified \gls{dynamic}. Starred version uses -% \gls{dynamic} \IDL{}, unstarred version uses \gls{dynamic} -% \IDN{}. I originally called this macro "\appendminitoctodynamicframe" +% \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}{% +\newcommand*{\appenddfminitoc}{% \renewcommand{\beforeminitocskip}{\baselineskip}% \@ifstar\@sappendminitocdf\@appendminitocdf} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@sappendminitocdf} % Starred version % \begin{macrocode} -\newcommand{\@sappendminitocdf}[1]{% +\newcommand*{\@sappendminitocdf}[1]{% \renewcommand{\@dominitoc}[1]{% \@sappenddynamic{#1}{\@@dominitoc{##1}}}} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@appendminitocdf} % Unstarred version % \begin{macrocode} -\newcommand{\@appendminitocdf}[1]{% +\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}{% +\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 @@ -5502,29 +6339,32 @@ ttb file may not be up-to-date}}{% }% \fi}} % \end{macrocode} -%\DescribeMacro{\enableminitoc} +%\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]{% +\newcommand*{\enableminitoc}[1][\@ttb@type]{% \@minitoctrue \setcounter{minitoc}{0}% -\@ifundefined{#1}{ -\PackageError{flowfram}{Sectioning type '#1' not defined}{}}{% +\@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}}}} +\@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. @@ -5538,6 +6378,8 @@ ttb file may not be up-to-date}}{% \@afterheading }} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@makeminitocpart} % Again, for parts. As before, need to redefine % "\@endpart" if it exists, otherwise redefine % "\@part". @@ -5558,6 +6400,8 @@ ttb file may not be up-to-date}}{% \@mtoc@old@endpart }}} % \end{macrocode} +%\end{macro} +%\begin{macro}{\@makeminitocsection} % Now for the remaining sectional units. % \begin{macrocode} \newcommand{\@makeminitocsection}[1]{% @@ -5569,6 +6413,7 @@ ttb file may not be up-to-date}}{% \dominitoc{\c@minitoc}\@afterheading}{}% }} % \end{macrocode} +%\end{macro} %\iffalse % \begin{macrocode} % diff --git a/Master/texmf-dist/source/latex/flowfram/flowfram.ins b/Master/texmf-dist/source/latex/flowfram/flowfram.ins index f5015dc0edf..4ba18a984e3 100644 --- a/Master/texmf-dist/source/latex/flowfram/flowfram.ins +++ b/Master/texmf-dist/source/latex/flowfram/flowfram.ins @@ -1,13 +1,25 @@ -% flowfram.ins generated using makedtx version 0.91b 2007/3/9 11:23 +% flowfram.ins generated using makedtx version 0.94b 2007/8/21 13:54 \input docstrip \preamble -Copyright (C) 2007 Nicola Talbot, all rights reserved. -If you modify this file, you must change its name first. -You are NOT ALLOWED to distribute this file alone. You are NOT -ALLOWED to take money for the distribution or use of either this -file or a changed version, except for a nominal charge for copying -etc. + + flowfram.dtx + Copyright 2007 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 diff --git a/Master/texmf-dist/tex/latex/flowfram/flowfram.sty b/Master/texmf-dist/tex/latex/flowfram/flowfram.sty index 8335fc36430..fb175646edc 100644 --- a/Master/texmf-dist/tex/latex/flowfram/flowfram.sty +++ b/Master/texmf-dist/tex/latex/flowfram/flowfram.sty @@ -5,12 +5,24 @@ %% The original source files were: %% %% flowfram.dtx (with options: `flowfram.sty,package') -%% Copyright (C) 2007 Nicola Talbot, all rights reserved. -%% If you modify this file, you must change its name first. -%% You are NOT ALLOWED to distribute this file alone. You are NOT -%% ALLOWED to take money for the distribution or use of either this -%% file or a changed version, except for a nominal charge for copying -%% etc. +%% +%% flowfram.dtx +%% Copyright 2007 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 @@ -27,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{flowfram}[2007/03/09 v1.07] +\ProvidesPackage{flowfram}[2007/08/21 v1.10] \RequirePackage{ifthen} \RequirePackage{keyval} \RequirePackage{graphics} @@ -37,28 +49,28 @@ \newcommand{\setffdrafttypeblockcolor}{\color[gray]{0.9}} \newlength\fflabelsep \fflabelsep=1pt -\newcommand{\fflabelfont}{\small\sffamily} +\newcommand*{\fflabelfont}{\small\sffamily} \newif\ifshowtypeblock \newif\ifshowmargins \newif\ifshowframebbox -\newcommand{\@ffdraft}{% +\newcommand*{\@ffdraft}{% \showtypeblocktrue \showmarginstrue \showframebboxtrue } -\newcommand{\@ffnodraft}{% +\newcommand*{\@ffnodraft}{% \showtypeblockfalse \showmarginsfalse \showframebboxfalse } -\newcommand{\@fr@meifdraft}[3][\setffdraftcolor]{% +\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} +\newcommand*{\@s@tffcol}{} +\newcommand*{\@s@tfftextcol}{} +\newcommand*{\@ffbackground}[1]{#1} \DeclareOption{draft}{\@ffdraft} \DeclareOption{final}{\@ffnodraft} \newif\if@ttb@rotate @@ -80,11 +92,12 @@ \DeclareOption{ttbnonum}{\@ttb@numfalse} \DeclareOption{color}{% \def\flowframecol{{black}}\def\flowframetextcol{{black}} -\renewcommand\@s@tffcol{\ifthenelse{\equal{\ff@col}{}}{}{% +\renewcommand*\@s@tffcol{\ifthenelse{\equal{\ff@col}{}}{}{% \expandafter\color\ff@col}} -\renewcommand\@s@tfftextcol{\ifthenelse{\equal{\ff@txtcol}{}}{}{% +\renewcommand*\@s@tfftextcol{\ifthenelse{\equal{\ff@txtcol}{}}{}{% \expandafter\color\ff@txtcol}} -\renewcommand{\@ffbackground}[1]{\ifthenelse{\equal{\ff@backcol}{{none}}}{% +\renewcommand*{\@ffbackground}[1]{% +\ifthenelse{\equal{\ff@backcol}{{none}}}{% #1}{{\fboxsep=0pt\expandafter\colorbox\ff@backcol{#1}}}} } \DeclareOption{nocolor}{% @@ -109,7 +122,7 @@ \RequirePackage{color}} \fi \@ifundefined{chapter}{}{% -\newcommand{\chapterfirstpagestyle}{plain} +\newcommand*{\chapterfirstpagestyle}{plain} \let\@ff@OLD@chapter\@chapter \let\@ff@OLD@schapter\@schapter \renewcommand{\@chapter}{% @@ -119,12 +132,12 @@ } \newcounter{maxflow} \newcounter{thisframe} -\c@maxflow=0 -\c@thisframe=0 +\c@maxflow=0\relax +\c@thisframe=0\relax \newcounter{maxstatic} -\c@maxstatic=0 +\c@maxstatic=0\relax \newcounter{maxdynamic} -\c@maxdynamic=0 +\c@maxdynamic=0\relax \newcount\@colN \newcount\@ff@tmpN \newcount\ff@id @@ -137,7 +150,7 @@ \flowframesep=\fboxsep \newlength\flowframerule \flowframerule=\fboxrule -\newcommand{\flowframeshowlayout}{% +\newcommand*{\flowframeshowlayout}{% \finishthispage {\@ffdraft\mbox{}\finishthispage\clearpage}} \newif\ifusedframebreak @@ -275,7 +288,7 @@ \expandafter \xdef\csname @col@id@\romannumeral#1\endcsname{\ff@label}% } -\newcommand{\@ff@checkuniqueidl}[2]{% +\newcommand*{\@ff@checkuniqueidl}[2]{% {\@colN=0\relax \whiledo{\@colN<\c@maxflow}{% \advance\@colN by 1\relax @@ -288,7 +301,7 @@ You can't assign this label, as it is already defined for flow frame \number\@colN}}{}% \fi }}} -\newcommand{\@flowframeid}[1]{\@colN=0\relax +\newcommand*{\@flowframeid}[1]{\@colN=0\relax \ff@id=0\relax \whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax \ifthenelse{% @@ -369,15 +382,15 @@ boolean}{You can only specify the values 'true' or 'false'}}} \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]{% +\newcommand*{\setallflowframes}[1]{% \@colN=0\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax \@@setflowframe{\@colN}{#1}}} -\newcommand{\setflowframe}{\@ifstar\@ssetflowframe\@setflowframe} +\newcommand*{\setflowframe}{\@ifstar\@ssetflowframe\@setflowframe} \newcommand{\@ssetflowframe}[2]{% \@for\@ff@id:=#1\do{% \@flowframeid{\@ff@id}% \@@setflowframe{\ff@id}{#2}}} -\newcommand{\@setflowframe}[2]{% +\newcommand*{\@setflowframe}[2]{% \ifthenelse{\equal{#1}{all}}{% \setallflowframes{#2}}{% \ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% @@ -400,7 +413,7 @@ may only specify 'c', 't' or 'b'}}} \@@setflowframe{\@colN}{#2}% \advance\@colN by 1\relax }}}}} -\newcommand{\@@setflowframe}[2]{% +\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{}% @@ -476,7 +489,7 @@ may only specify 'c', 't' or 'b'}}} \PackageError{flowfram}% {Key 'valign' not available for flow frames}{}}% } -\newcommand{\@@flowframeswapcoords}[1]{% +\newcommand*{\@@flowframeswapcoords}[1]{% \setlength{\@ff@tmp@x}% {\csname col@\romannumeral#1@evenx\endcsname} \expandafter\setlength\csname col@\romannumeral#1@evenx\endcsname @@ -490,13 +503,13 @@ may only specify 'c', 't' or 'b'}}} \expandafter\setlength\csname col@\romannumeral#1@posy\endcsname {\@ff@tmp@y}% } -\newcommand{\ffswapoddeven}{% +\newcommand*{\ffswapoddeven}{% \@ifstar\@sflowframeswapcoords\@flowframeswapcoords} -\newcommand{\@sflowframeswapcoords}[1]{% +\newcommand*{\@sflowframeswapcoords}[1]{% \@for\@ff@id:=#1\do{% \@flowframeid{\@ff@id}% \@@flowframeswapcoords{\ff@id}}} -\newcommand{\@flowframeswapcoords}[1]{% +\newcommand*{\@flowframeswapcoords}[1]{% \ifthenelse{\equal{#1}{all}}{% \ff@id=0\relax \whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax @@ -522,17 +535,17 @@ may only specify 'c', 't' or 'b'}}} \@@flowframeswapcoords{\@colN}% \advance\@colN by 1\relax }}}}} -\newcommand{\flowframex}[1]{% +\newcommand*{\flowframex}[1]{% \csname col@\romannumeral#1@posx\endcsname} -\newcommand{\flowframey}[1]{% +\newcommand*{\flowframey}[1]{% \csname col@\romannumeral#1@posy\endcsname} -\newcommand{\flowframeevenx}[1]{% +\newcommand*{\flowframeevenx}[1]{% \csname col@\romannumeral#1@evenx\endcsname} -\newcommand{\flowframeeveny}[1]{% +\newcommand*{\flowframeeveny}[1]{% \csname col@\romannumeral#1@eveny\endcsname} \newcommand{\flowframewidth}[1]{% \csname colwidth\romannumeral#1\endcsname} -\newcommand{\flowframeheight}[1]{% +\newcommand*{\flowframeheight}[1]{% \csname colheight\romannumeral#1\endcsname} \def\@setframecol{\@ifnextchar[\@@setframecol\@@setfr@mecol} \def\@@setframecol[#1]#2\end#3#4#5{% @@ -540,8 +553,8 @@ may only specify 'c', 't' or 'b'}}} [#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}{% +\newcommand*{\newstaticframe}{\@n@wstaticframe} +\newcommand*{\@n@wstaticframe}{% \global\advance\c@maxstatic by 1\relax \newboolean{staticframe\romannumeral\c@maxstatic}% \@ifstar\@snewstaticframe\@newstaticframe @@ -552,7 +565,7 @@ may only specify 'c', 't' or 'b'}}} \newcommand{\@newstaticframe}{% \setboolean{staticframe\romannumeral\c@maxstatic}{false}% \@@newstaticframe} -\newcommand{\@@newstaticframe}[5][all]{% +\newcommand*{\@@newstaticframe}[5][all]{% \expandafter \newbox\csname @staticframe@\romannumeral\c@maxstatic\endcsname \expandafter @@ -606,7 +619,7 @@ fbox}% \@sf@checkuniqueidl{#1}{\ff@label}% \expandafter \xdef\csname @sf@id@\romannumeral#1\endcsname{\ff@label}} -\newcommand{\@sf@checkuniqueidl}[2]{% +\newcommand*{\@sf@checkuniqueidl}[2]{% \@colN=0\relax \whiledo{\@colN<\c@maxstatic}{% \advance\@colN by 1\relax @@ -619,7 +632,7 @@ You can't assign this label, as it is already defined for static frame \number\@colN}}{}% \fi }} -\newcommand{\@staticframeid}[1]{\@colN=0\relax +\newcommand*{\@staticframeid}[1]{\@colN=0\relax \ff@id=0\relax \whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax \ifthenelse{% @@ -628,24 +641,24 @@ for static frame \number\@colN}}{}% \@colN=\c@maxstatic}{}}% \ifnum\ff@id=0\PackageError{flowfram}{Can't find static frame id '#1'}{}\fi} -\newcommand{\staticframex}[1]{% +\newcommand*{\staticframex}[1]{% \csname @sf@\romannumeral#1@posx\endcsname} -\newcommand{\staticframey}[1]{% +\newcommand*{\staticframey}[1]{% \csname @sf@\romannumeral#1@posy\endcsname} -\newcommand{\staticframeevenx}[1]{% +\newcommand*{\staticframeevenx}[1]{% \csname @sf@\romannumeral#1@evenx\endcsname} -\newcommand{\staticframeeveny}[1]{% +\newcommand*{\staticframeeveny}[1]{% \csname @sf@\romannumeral#1@eveny\endcsname} -\newcommand{\setallstaticframes}[1]{% +\newcommand*{\setallstaticframes}[1]{% \@colN=0\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax \@@setstaticframe{\@colN}{#1}}} -\newcommand{\setstaticframe}{% +\newcommand*{\setstaticframe}{% \@ifstar\@ssetstaticframe\@setstaticframe} -\newcommand{\@ssetstaticframe}[2]{% +\newcommand*{\@ssetstaticframe}[2]{% \@for\@ff@id:=#1\do{% \@staticframeid{\@ff@id}% \@@setstaticframe{\ff@id}{#2}}} -\newcommand{\@setstaticframe}[2]{% +\newcommand*{\@setstaticframe}[2]{% \ifthenelse{\equal{#1}{all}}{% \setallstaticframes{#2}}{% \ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% @@ -668,7 +681,7 @@ id '#1'}{}\fi} \@@setstaticframe{\@colN}{#2}% \advance\@colN by 1\relax }}}}} -\newcommand{\@@setstaticframe}[2]{% +\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{}% @@ -749,48 +762,46 @@ static frames}{Static frames don't have marginal notes}}% \PackageError{flowfram}{Key 'style' not available for static frames}{}}% } + %\newcommand*{\simpar}{\hfil\vadjust{\vskip\parskip}\break\indent} \newcommand*{\simpar}{\hfill\\\indent\mbox{}} -\let\orgpar\par -\newcommand{\ffpshpar}{\edef\next{\hangafter=\the\hangafter -\hangindent=\the\hangindent}\orgpar\next -\edef\next{\prevgraf=\the\prevgraf}\@ff@parshape\indent\mbox{}\next} +\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]{% +\newcommand*{\@ff@sectionhead}[1]{% \def\ff@sechead{#1}% \ffpshpar \@ifstar{\@s@ff@heading}{\@dblarg\@ff@heading}} - \def\@s@ff@heading#1{% \@ifundefined{@ff@old\ff@sechead}{\PackageError{flowfram}{Unknown heading command '\ff@sechead'}{}}{% \begingroup -\edef\next{\hangafter=\the\hangafter -\hangindent=\the\hangindent}\orgpar\next -\let\par=\orgpar -\edef\next{\prevgraf=\the\prevgraf}% -\csname @ff@old\ff@sechead\endcsname*{\@ff@parshape\next +\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\next{\@ff@parshape +\xdef\flf@next{\@ff@parshape \prevgraf=\the\prevgraf}% \endgroup }% -\mbox{}\next\let\next\undefined} - +\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\next{\hangafter=\the\hangafter -\hangindent=\the\hangindent}\orgpar\next -\let\par=\orgpar -\edef\next{\prevgraf=\the\prevgraf}% -\csname @ff@old\ff@sechead\endcsname[#1]{\@ff@parshape\next +\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\next{\@ff@parshape +\xdef\flf@next{\@ff@parshape \prevgraf=\the\prevgraf}% \endgroup}% -\mbox{}\next\let\next\undefined} +\mbox{}\flf@next\let\flf@next\undefined} \newcommand*{\@ff@setsecthead}{% \let\@ff@oldsection=\section \let\@ff@oldsubsection=\subsection @@ -841,7 +852,7 @@ sectioning commands within a \string\shapepar}{}}% \noexpand \begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname \noexpand\begingroup -\noexpand\let\noexpand\orgpar=\noexpand\par +\noexpand\let\noexpand\FLForgpar=\noexpand\par }% \or \edef\@sf@mpg{% @@ -849,7 +860,7 @@ sectioning commands within a \string\shapepar}{}}% \begin{minipage}\csname @sf@dim@\romannumeral#1\endcsname \@ff@parshape \noexpand\begingroup -\noexpand\let\noexpand\orgpar=\noexpand\par +\noexpand\let\noexpand\FLForgpar=\noexpand\par \noexpand\let\noexpand\par=\noexpand\ffpshpar \noexpand\@ff@setsecthead }% @@ -869,7 +880,7 @@ sectioning commands within a \string\shapepar}{}}% \@sf@mpg \setlength\parindent\sdfparindent }{\ifnum\ff@shape=2\par -\else\orgpar\fi\endgroup\end{minipage}\end{lrbox}% +\else\FLForgpar\fi\endgroup\end{minipage}\end{lrbox}% \expandafter\global\expandafter\sbox\@sf@thisframe{% \usebox\staticframe}\ignorespaces } @@ -881,7 +892,7 @@ sectioning commands within a \string\shapepar}{}}% \@staticconts{\ff@id}} \newcommand{\@staticconts}[2]{\begin{staticcontents}{#1}% #2\end{staticcontents}} -\newcommand{\@@staticframeswapcoords}[1]{% +\newcommand*{\@@staticframeswapcoords}[1]{% \setlength{\@ff@tmp@x}% {\csname @sf@\romannumeral#1@evenx\endcsname} \expandafter\setlength\csname @sf@\romannumeral#1@evenx\endcsname @@ -895,13 +906,13 @@ sectioning commands within a \string\shapepar}{}}% \expandafter\setlength\csname @sf@\romannumeral#1@posy\endcsname {\@ff@tmp@y}% } -\newcommand{\sfswapoddeven}{% +\newcommand*{\sfswapoddeven}{% \@ifstar\@sstaticframeswapcoords\@staticframeswapcoords} -\newcommand{\@sstaticframeswapcoords}[1]{% +\newcommand*{\@sstaticframeswapcoords}[1]{% \@for\@ff@id:=#1\do{% \@staticframeid{\@ff@id}% \@@staticframeswapcoords{\ff@id}}} -\newcommand{\@staticframeswapcoords}[1]{% +\newcommand*{\@staticframeswapcoords}[1]{% \ifthenelse{\equal{#1}{all}}{% \ff@id=0\relax \whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax @@ -927,18 +938,20 @@ sectioning commands within a \string\shapepar}{}}% \@@staticframeswapcoords{\@colN}% \advance\@colN by 1\relax }}}}} -\newcommand{\newdynamicframe}{% +\newcommand*{\newdynamicframe}{% +\@n@wdynamicframe} +\newcommand*{\@n@wdynamicframe}{% \global\advance\c@maxdynamic by 1\relax \newboolean{dynamicframe\romannumeral\c@maxdynamic} \@ifstar\@snewdynamicframe\@newdynamicframe } -\newcommand{\@snewdynamicframe}{% +\newcommand*{\@snewdynamicframe}{% \setboolean{dynamicframe\romannumeral\c@maxdynamic}{true}% \@@newdynamicframe} -\newcommand{\@newdynamicframe}{% +\newcommand*{\@newdynamicframe}{% \setboolean{dynamicframe\romannumeral\c@maxdynamic}{false}% \@@newdynamicframe} -\newcommand{\@@newdynamicframe}[5][all]{% +\newcommand*{\@@newdynamicframe}[5][all]{% \expandafter \gdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{}% \expandafter @@ -993,7 +1006,7 @@ fbox}% \@df@checkuniqueidl{#1}{\ff@label}% \expandafter \xdef\csname @df@id@\romannumeral#1\endcsname{\ff@label}} -\newcommand{\@df@checkuniqueidl}[2]{% +\newcommand*{\@df@checkuniqueidl}[2]{% \@colN=0\relax \whiledo{\@colN<\c@maxdynamic}{% \advance\@colN by 1\relax @@ -1006,7 +1019,7 @@ You can't assign this label, as it is already defined for dynamic frame \number\@colN}}{}% \fi }} -\newcommand{\@dynamicframeid}[1]{\@colN=0\relax +\newcommand*{\@dynamicframeid}[1]{\@colN=0\relax \ff@id=0\relax \whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax \ifthenelse{% @@ -1015,24 +1028,24 @@ for dynamic frame \number\@colN}}{}% \@colN=\c@maxdynamic}{}}% \ifnum\ff@id=0\PackageError{flowfram}{Can't find dynamic frame id '#1'}{}\fi} -\newcommand{\dynamicframex}[1]{% +\newcommand*{\dynamicframex}[1]{% \csname @df@\romannumeral#1@posx\endcsname} -\newcommand{\dynamicframey}[1]{% +\newcommand*{\dynamicframey}[1]{% \csname @df@\romannumeral#1@posy\endcsname} -\newcommand{\dynamicframeevenx}[1]{% +\newcommand*{\dynamicframeevenx}[1]{% \csname @df@\romannumeral#1@evenx\endcsname} -\newcommand{\dynamicframeeveny}[1]{% +\newcommand*{\dynamicframeeveny}[1]{% \csname @df@\romannumeral#1@eveny\endcsname} -\newcommand{\setalldynamicframes}[1]{% +\newcommand*{\setalldynamicframes}[1]{% \@colN=0\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax \@@setdynamicframe{\@colN}{#1}}} -\newcommand{\setdynamicframe}{% +\newcommand*{\setdynamicframe}{% \@ifstar\@ssetdynamicframe\@setdynamicframe} -\newcommand{\@ssetdynamicframe}[2]{% +\newcommand*{\@ssetdynamicframe}[2]{% \@for\@ff@id:=#1\do{% \@dynamicframeid{\@ff@id}% \@@setdynamicframe{\ff@id}{#2}}} -\newcommand{\@setdynamicframe}[2]{% +\newcommand*{\@setdynamicframe}[2]{% \ifthenelse{\equal{#1}{all}}{% \setalldynamicframes{#2}}{% \ifthenelse{\equal{#1}{odd} \TE@or \equal{#1}{even}}{% @@ -1055,7 +1068,7 @@ id '#1'}{}\fi} \@@setdynamicframe{\@colN}{#2}% \advance\@colN by 1\relax }}}}} -\newcommand{\@@setdynamicframe}[2]{% +\newcommand*{\@@setdynamicframe}[2]{% \expandafter\expandafter\expandafter \@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname \def\ff@frame{}\edef\ff@width{\the\@ff@tmp@x}% @@ -1130,7 +1143,7 @@ id '#1'}{}\fi} \PackageError{flowfram}{Key 'margin' not available for dynamic frames}{dynamic frames don't have marginal notes}}% } -\newcommand{\@@dynamicframeswapcoords}[1]{% +\newcommand*{\@@dynamicframeswapcoords}[1]{% \setlength{\@ff@tmp@x}% {\csname @df@\romannumeral#1@evenx\endcsname}% \expandafter\setlength @@ -1146,13 +1159,13 @@ frames}{dynamic frames don't have marginal notes}}% \expandafter\setlength\csname @df@\romannumeral#1@posy\endcsname {\@ff@tmp@y}% } -\newcommand{\dfswapoddeven}{% +\newcommand*{\dfswapoddeven}{% \@ifstar\@sdynamicframeswapcoords\@dynamicframeswapcoords} -\newcommand{\@sdynamicframeswapcoords}[1]{% +\newcommand*{\@sdynamicframeswapcoords}[1]{% \@for\@ff@id:=#1\do{% \@dynamicframeid{\@ff@id}% \@@dynamicframeswapcoords{\ff@id}}} -\newcommand{\@dynamicframeswapcoords}[1]{% +\newcommand*{\@dynamicframeswapcoords}[1]{% \ifthenelse{\equal{#1}{all}}{% \ff@id=0\relax \whiledo{\ff@id<\c@maxflow}{\advance\ff@id by 1\relax @@ -1178,6 +1191,39 @@ frames}{dynamic frames don't have marginal notes}}% \@@dynamicframeswapcoords{\@colN}% \advance\@colN by 1\relax }}}}} +\def\dynamiccontents#1{% +\edef\@flf@{\@currenvir}% +\def\@flf@idn{#1}% +\toks@{}\@flf@get@body +} +\long\def\@flf@get@body#1\end + {\toks@\expandafter{\the\toks@#1}\@flf@find@end} +\def\@flf@find@end#1{% +\def\@tempa{#1}% +\ifx\@tempa\@flf@ +\expandafter\@flf@enddynamiccontents +\else +\toks@\expandafter + {\the\toks@\end{#1}}\expandafter\@flf@get@body\fi +} +\let\enddynamiccontents\relax +\def\@flf@enddynamiccontents{% +\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\toks@}% +\expandafter +\fi +\expandafter\end\expandafter{\@flf@}} +\expandafter\def\csname dynamiccontents*\endcsname#1{% +\edef\@flf@{\@currenvir}% +\@dynamicframeid{#1}% +\edef\@flf@idn{\number\ff@id}% +\toks@{}\@flf@get@body +} \newcommand{\setdynamiccontents}{% \@ifstar\@ssetdynamiccontents\@setdynamiccontents} \newcommand{\@ssetdynamiccontents}[2]{% @@ -1205,17 +1251,172 @@ but there are only \expandafter\@ff@addtolist \csname @dynamicframe@\romannumeral#1\endcsname\entry{#2}% \fi} -\toksdef\flf@ta=0 \toksdef\flf@tb=2 +\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{\setinitialframe}[1]{\c@thisframe=#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 +\PackageError{flowfram}{Unknown frame ID type '#1'}{% +Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)} +\or +\ifnum#2>\c@maxflow +\PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{% +Flow frame IDNs go from 1 to \number\c@maxflow} +\else +\setlength{\ffareax}{\flowframex{#2}} +\setlength{\ffareay}{\flowframey{#2}} +\setlength{\ffareawidth}{\flowframewidth{#2}} +\setlength{\ffareaheight}{\flowframeheight{#2}} +\fi +\or +\ifnum#2>\c@maxstatic +\PackageError{flowfram}{Invalid static frame IDN '\number#2'}{% +Static frame IDNs go from 1 to \number\c@maxstatic} +\else +\setlength{\ffareax}{\staticframex{#2}} +\setlength{\ffareay}{\staticframey{#2}} +\expandafter\expandafter\expandafter +\@ff@getstaticpos +\csname @sf@dim@\romannumeral#2\endcsname +\setlength{\ffareawidth}{\@ff@tmp@x}% +\setlength{\ffareaheight}{\@ff@tmp@y}% +\fi +\or +\ifnum#2>\c@maxdynamic +\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*{\getstaticbounds}{% +\@ifstar\@sgetstaticbounds\@getstaticbounds} +\newcommand*{\@sgetstaticbounds}[1]{% +\@staticframeid{#1}\@getstaticbounds{\ff@id}} +\newcommand*{\@getstaticbounds}[1]{\@ff@getdim{1}{#1}} +\newcommand*{\getflowbounds}{% +\@ifstar\@sgetflowbounds\@getflowbounds} +\newcommand*{\@sgetflowbounds}[1]{% +\@flowframeid{#1}\@getflowbounds{\ff@id}} +\newcommand*{\@getflowbounds}[1]{\@ff@getdim{2}{#1}} +\newcommand*{\getdynamicbounds}{% +\@ifstar\@sgetdynamicbounds\@getdynamicbounds} +\newcommand*{\@sgetdynamicbounds}[1]{% +\@dynamicframeid{#1}\@getdynamicbounds{\ff@id}} +\newcommand*{\@getdynamicbounds}[1]{\@ff@getdim{3}{#1}} +\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}{% +\newcommand*{\setframes}{% \ifnum\c@thisframe=0\relax \PackageWarning{flowfram}{Can't find a flow frame on page 1. \MessageBreak @@ -1397,7 +1598,6 @@ or text might not appear correctly}% \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ - \@begindvi \vskip\topmargin\moveright\@themargin \vbox{% \vskip\headheight @@ -1405,7 +1605,7 @@ or text might not appear correctly}% \box\@outputbox }}\global\let\if@newlist\@@if@newlist \stepcounter{page}\let\firstmark\botmark} -\newcommand{\makedfheaderfooter}{% +\newcommand*{\makedfheaderfooter}{% \setlength{\@ff@tmp@y}{\textheight}% \addtolength{\@ff@tmp@y}{\headsep}% \newdynamicframe{\textwidth}{\headheight}{0pt}{\@ff@tmp@y}[header]% @@ -1464,7 +1664,7 @@ or text might not appear correctly}% \@floatplacement } \newif\if@ff@moreframes -\newcommand{\@ff@checkifmoreframes}{% +\newcommand*{\@ff@checkifmoreframes}{% \@ff@moreframesfalse \@colN=\c@thisframe \whiledo{\@colN<\c@maxflow}{% @@ -1484,15 +1684,15 @@ or text might not appear correctly}% }% \fi } -\newcommand{\@ff@checkpages}[2][\c@page]{% +\newcommand*{\@ff@checkpages}[2][\c@page]{% \@for\@ff@pp:=#2\do{% \@ff@checkthispage{#1}{\@ff@pp}}} -\newcommand{\@ff@checkthispage}[2]{% +\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]{% +\newcommand*{\@ff@checknumrange}[2]{% \def\@ff@numstart{0}\def\@ff@numend{10000}% \@ff@getrange{#2}% \ifnum\@ff@numend>#1\relax @@ -1504,17 +1704,17 @@ or text might not appear correctly}% \fi } \newcount\c@ffrangenum -\newcommand{\@ff@getrange}[1]{% +\newcommand*{\@ff@getrange}[1]{% \expandafter\@ff@@getrange#1-\relax\end} \def\@ff@@getrange#1#2\end{% -\ifx#1<% -\@ff@getrangeless#1#2\end -\else -\ifx#1>% -\@ff@getrangegreater#1#2\end +\ifx#1<\relax + \@ff@getrangeless#1#2\end \else -\@@ff@getrange#1#2\end -\fi + \ifx#1>\relax + \@ff@getrangegreater#1#2\end + \else + \@@ff@getrange#1#2\end + \fi \fi } \def\@ff@getrangeless<#1-\relax\end{% @@ -1540,7 +1740,7 @@ or text might not appear correctly}% \newif\if@notthiscol \newif\if@ff@nwpg \newcount\c@curpg -\newcommand{\@g@tnextcol}[1]{% +\newcommand*{\@g@tnextcol}[1]{% \@ff@checkifmoreframes \if@ff@moreframes \else @@ -1565,12 +1765,12 @@ adding new one}% \repeat #1=\@colN } -\newcommand{\@ff@chckifthispg}[2]{% +\newcommand*{\@ff@chckifthispg}[2]{% \@notthiscoltrue \edef\ff@pages{\csname @ff@pages@\romannumeral#2\endcsname}% \@@ff@chckifthispg{#1}% } -\newcommand{\@@ff@chckifthispg}[1]{% +\newcommand*{\@@ff@chckifthispg}[1]{% \ifthenelse{\equal{\ff@pages}{none}}{}{% \ifthenelse{\equal{\ff@pages}{all}}{\@notthiscolfalse}{% \ifthenelse{\equal{\ff@pages}{odd}}{% @@ -1585,21 +1785,21 @@ adding new one}% }% }}}}% } -\newcommand{\@sf@chckifthispg}[1]{% +\newcommand*{\@sf@chckifthispg}[1]{% \@notthiscoltrue \edef\ff@pages{\csname @sf@pages@\romannumeral#1\endcsname}% \@@ff@chckifthispg{\c@page}% } -\newcommand{\@df@chckifthispg}[1]{% +\newcommand*{\@df@chckifthispg}[1]{% \@notthiscoltrue \edef\ff@pages{\csname @df@pages@\romannumeral#1\endcsname}% \@@ff@chckifthispg{\c@page}% } -\newcommand{\@setcolbox}[1]{% +\newcommand*{\@setcolbox}[1]{% \expandafter\global\expandafter\setbox \csname column\romannumeral#1\endcsname\box\@outputbox } -\newcommand{\@docolbox}[1]{% +\newcommand*{\@docolbox}[1]{% \edef\ff@frametype{% \csname @ff@frametype@\romannumeral#1\endcsname}% \edef\ff@col{\csname @ff@col@\romannumeral#1\endcsname}% @@ -1617,7 +1817,7 @@ adding new one}% {\csname colheight\romannumeral#1\endcsname}{% \expandafter\box\csname column\romannumeral#1\endcsname}% }}} -\newcommand{\@docolbbox}[1]{% +\newcommand*{\@docolbbox}[1]{% \@ff@setoffset{#1}% \def\ff@col{}\def\ff@txtcol{}% \@fr@meifdraft{% @@ -1631,7 +1831,7 @@ adding new one}% #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]{% +\newcommand*{\@putcolbox}[1]{% \@ff@chckifthispg{\c@page}{#1}% \if@notthiscol \else @@ -1656,7 +1856,7 @@ adding new one}% \fi \fi } -\newcommand{\@putcolbbox}[1]{% +\newcommand*{\@putcolbbox}[1]{% \@ff@chckifthispg{\c@page}{#1}% \if@notthiscol \else @@ -1681,24 +1881,24 @@ adding new one}% \fi \fi } -\newcommand{\@ff@s@t@doubleboxoffset}{% +\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 -\advance\@ff@offset by -\flowframesep +\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 -\advance\@ff@offset by -\flowframesep +\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 +\newcommand*{\@ff@s@t@defaultoffset}{% +\@ff@offset=-\flowframesep\relax \addtolength{\@ff@offset}{-\flowframerule}% } -\newcommand{\@ff@setoffset}[1]{% +\newcommand*{\@ff@setoffset}[1]{% \ifthenelse{\equal{\csname @ff@offset@\romannumeral#1\endcsname}% {compute}}{% \ifthenelse{\boolean{columnframe\romannumeral#1}}{% @@ -1723,7 +1923,7 @@ adding new one}% \setlength{\@ff@offset}% {\csname @ff@offset@\romannumeral#1\endcsname}}% } -\newcommand{\@sf@setoffset}[1]{% +\newcommand*{\@sf@setoffset}[1]{% \ifthenelse{% \equal{\csname @sf@offset@\romannumeral#1\endcsname}% {compute}}{% @@ -1750,7 +1950,7 @@ adding new one}% \setlength{\@ff@offset}% {\csname @sf@offset@\romannumeral#1\endcsname}}% } -\newcommand{\@df@setoffset}[1]{% +\newcommand*{\@df@setoffset}[1]{% \ifthenelse{% \equal{\csname @df@offset@\romannumeral#1\endcsname}% {compute}}{% @@ -1777,7 +1977,7 @@ adding new one}% \setlength{\@ff@offset}% {\csname @df@offset@\romannumeral#1\endcsname}}% } -\newcommand{\@putmarginbox}[1]{% +\newcommand*{\@putmarginbox}[1]{% \@ff@chckifthispg{\c@page}{#1}% \if@notthiscol \else @@ -1816,7 +2016,7 @@ adding new one}% {\csname colheight\romannumeral#1\endcsname}{}}% {M:\number#1}\hss}\fi \ignorespaces} -\newcommand{\@ff@drawmargins}{% +\newcommand*{\@ff@drawmargins}{% \@colN=0\relax \whiledo{\@colN<\c@maxflow}{% \advance\@colN by 1\relax @@ -1826,7 +2026,7 @@ adding new one}% \def\@ff@getstaticpos[#1][#2][#3]#4{\@ff@tmp@x=#4\relax \@ff@tmp@y=#2\relax \def\ff@valign{#3}} -\newcommand{\@dostaticbox}[1]{% +\newcommand*{\@dostaticbox}[1]{% \edef\ff@frametype{% \csname @sf@frametype@\romannumeral#1\endcsname}% \edef\ff@col{\csname @sf@col@\romannumeral#1\endcsname}% @@ -1843,7 +2043,7 @@ adding new one}% \@ff@box{\@ff@tmp@x}{\@ff@tmp@y}% {\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname}% }}} -\newcommand{\@dostaticbbox}[1]{% +\newcommand*{\@dostaticbbox}[1]{% \edef\ff@col{}% \@sf@setoffset{#1}% \expandafter\expandafter\expandafter @@ -1852,7 +2052,7 @@ adding new one}% \@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]{% +\newcommand*{\@putstaticbox}[1]{% \@sf@chckifthispg{#1}% \if@notthiscol\else \@killglue @@ -1875,7 +2075,7 @@ adding new one}% \@dostaticbox{#1}\hss}% \fi \fi} -\newcommand{\@putstaticbbox}[1]{% +\newcommand*{\@putstaticbbox}[1]{% \@sf@chckifthispg{#1}% \if@notthiscol\else \@killglue @@ -1898,19 +2098,19 @@ adding new one}% \@dostaticbbox{#1}\hss}\ignorespaces \fi \fi} -\newcommand{\@resetst@tics}{% +\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}{% +\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]{% +\newcommand*{\@dodfparbox}[1]{% \expandafter\let\expandafter \@ff@parshape\csname @df@shape@\romannumeral#1\endcsname \expandafter\@ff@getshape\@ff@parshape\relax @@ -1940,7 +2140,7 @@ adding new one}% \ff@contents\par}}}% \fi } -\newcommand{\@dodynamicbox}[1]{% +\newcommand*{\@dodynamicbox}[1]{% \edef\ff@frametype{% \csname @df@frametype@\romannumeral#1\endcsname}% \edef\ff@col{\csname @df@col@\romannumeral#1\endcsname}% @@ -1960,7 +2160,7 @@ adding new one}% \@ff@box{\@ff@tmp@x}{\@ff@tmp@y}{% \@dodfparbox{#1}}% }}} -\newcommand{\@dodynamicbbox}[1]{% +\newcommand*{\@dodynamicbbox}[1]{% \edef\ff@col{}% \@df@setoffset{#1}% \expandafter\expandafter\expandafter @@ -1971,7 +2171,7 @@ adding new one}% \parbox\csname @df@dim@\romannumeral#1\endcsname {}}% }{D:\number#1;\csname @df@id@\romannumeral#1\endcsname}} -\newcommand{\@putdynamicbox}[1]{% +\newcommand*{\@putdynamicbox}[1]{% \@df@chckifthispg{#1}% \if@notthiscol\else \@killglue @@ -1994,7 +2194,7 @@ adding new one}% \@dodynamicbox{#1}\hss}\ignorespaces \fi \fi} -\newcommand{\@putdynamicbbox}[1]{% +\newcommand*{\@putdynamicbbox}[1]{% \@df@chckifthispg{#1}% \if@notthiscol\else \@killglue @@ -2017,7 +2217,7 @@ adding new one}% \@dodynamicbbox{#1}\hss}\ignorespaces \fi \fi} -\newcommand{\@@doheader}{% +\newcommand*{\@@doheader}{% \setlength\@ff@tmp@y{\textheight}% \addtolength{\@ff@tmp@y}{\headsep}% \def\ff@col{}% @@ -2025,7 +2225,7 @@ adding new one}% \def\ff@backcol{{none}}% \@ff@box{0pt}{\@ff@tmp@y}{\makebox[0pt][l]{\@dothehead}}% } -\newcommand{\@@dofooter}{% +\newcommand*{\@@dofooter}{% \setlength\@ff@tmp@y{-\footskip}% \def\ff@col{}% \def\ff@txtcol{}% @@ -2039,43 +2239,49 @@ adding new one}% \hss \egroup \ht\@picbox\@picht \dp\@picbox \z@ \mbox{\box \@picbox}}} -\newcommand{\@ff@doallflowframes}{% -\@colN=0\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\newcommand*{\@ff@doallflowframes}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax \@putcolbox{\@colN}}% } -\newcommand{\@ff@doallflowframesbbox}{% -\@colN=0\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax +\newcommand*{\@ff@doallflowframesbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxflow}{\advance\@colN by 1\relax \@putcolbbox{\@colN}}% } -\newcommand{\@ff@doallstatics}{% -\@colN=0\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1% +\newcommand*{\@ff@doallstatics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax \@putstaticbox{\@colN}}% } -\newcommand{\@ff@doallstaticsbbox}{% -\@colN=0\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1% +\newcommand*{\@ff@doallstaticsbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxstatic}{\advance\@colN by 1\relax \@putstaticbbox{\@colN}}% } -\newcommand{\@ff@doalldynamics}{% -\@colN=0\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1% +\newcommand*{\@ff@doalldynamics}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax \@putdynamicbox{\@colN}}% } -\newcommand{\@ff@doalldynamicsbbox}{% -\@colN=0\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1% +\newcommand*{\@ff@doalldynamicsbbox}{% +\@colN=0\relax +\whiledo{\@colN<\c@maxdynamic}{\advance\@colN by 1\relax \@putdynamicbbox{\@colN}}% } -\newcommand{\@ff@dotypeblock}{% +\newcommand*{\@ff@dotypeblock}{% \makebox[0pt][l]{\@fr@meifdraft[\setffdrafttypeblockcolor]{% \vbox to \textheight{\hbox to \textwidth{}}}{}}} \newlength\ffevenoffset -\newcommand{\@ff@do@allframes}{% +\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 + \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 @@ -2087,15 +2293,15 @@ adding new one}% \@ff@doallflowframes \@ff@doalldynamics \ifshowtypeblock -\@ff@dotypeblock + \@ff@dotypeblock \fi \ifshowframebbox -\@ff@doallstaticsbbox -\@ff@doallflowframesbbox -\@ff@doalldynamicsbbox + \@ff@doallstaticsbbox + \@ff@doallflowframesbbox + \@ff@doalldynamicsbbox \fi \ifshowmargins -\@ff@drawmargins + \@ff@drawmargins \fi }}} \newcount\@nxtcol @@ -2122,6 +2328,7 @@ adding new one}% \let\@thehead\@oddhead \let\@thefoot\@oddfoot \fi + \@begindvi \@dodynamicthehead\@dodynamicthefoot \vbadness=\@M \setbox\@outputbox\vbox{\hbox to \textwidth{\@ff@do@allframes}}% @@ -2162,15 +2369,15 @@ adding new one}% \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} +\renewcommand*{\twocolumn}{\@twocolumn} \newcommand*{\@twocolumn}[1][all]{% \@twocolumninarea[#1]{\textwidth}{\textheight}{0pt}{0pt}} -\newcommand{\twocolumninarea}{\@twocolumninarea} +\newcommand*{\twocolumninarea}{\@twocolumninarea} +\@onlypreamble{\twocolumninarea} \newcommand*{\@twocolumninarea}[5][all]{% \setlength{\columnheight}{#3}% \ifffvadjust\adjustheight{\columnheight}\fi% @@ -2185,72 +2392,71 @@ adding new one}% \@n@wflowframe[#1]{\columnwidth}{\columnheight}{\@ff@tmp@x}{#5}% \setflowframe{\c@maxflow}{margin=right}% } -\@onlypreamble{\twocolumninarea} \newcommand*{\Ncolumn}[2][all]{% \Ncolumninarea[#1]{#2}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\Ncolumn} -\newcommand{\Ncolumninarea}[6][all]{% +\newcommand*{\Ncolumninarea}[6][all]{% \ifnum#2>2\relax -\@Ncolumninarea[#1]{#2}{#3}{#4}{#5}{#6}% -\else -\ifcase#2 -\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 + \@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]{% +\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{\@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} +\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]{% +\newcommand*{\onecolumntop}[3][all]{% \onecolumntopinarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\onecolumntop} -\newcommand{\onecolumnStop}[2][all]{% +\newcommand*{\onecolumnStop}[2][all]{% \onecolumntopinarea[#1]{static}{#2}{\textwidth}{\textheight}{0pt}{0pt}} -\newcommand{\onecolumnDtop}[2][all]{% +\newcommand*{\onecolumnDtop}[2][all]{% \onecolumntopinarea[#1]{dynamic}{#2}{\textwidth}{\textheight}{0pt}{0pt}} -\newcommand{\newframe}[6][all]{% +\newcommand*{\newframe}[6][all]{% \ifthenelse{\equal{#2}{flow}}{% \@n@wflowframe[#1]{#3}{#4}{#5}{#6}% }{% \ifthenelse{\equal{#2}{dynamic}}{% -\newdynamicframe[#1]{#3}{#4}{#5}{#6}}{% +\@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]{% +\newcommand*{\onecolumntopinarea}[7][all]{% \setlength{\@ff@staticH}{#3}% \setlength{\@ff@tmp@y}{#5}% \addtolength{\@ff@tmp@y}{-\@ff@staticH}% @@ -2263,26 +2469,26 @@ Available frame types are: 'flow', 'static' and 'dynamic'}}}}} } \@onlypreamble{\onecolumntopinarea} -\newcommand{\onecolumnStopinarea}[6][all]{% +\newcommand*{\onecolumnStopinarea}[6][all]{% \onecolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} -\newcommand{\onecolumnDtopinarea}[6][all]{% +\newcommand*{\onecolumnDtopinarea}[6][all]{% \onecolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} -\newcommand{\twocolumntop}[3][all]{% +\newcommand*{\twocolumntop}[3][all]{% \twocolumntopinarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\twocolumntop} -\newcommand{\twocolumnStop}[2][all]{% +\newcommand*{\twocolumnStop}[2][all]{% \@twocolumntopinarea[#1]{static}{#2}{\textwidth}{\textheight}{0pt}{0pt}} -\newcommand{\twocolumnDtop}[2][all]{% +\newcommand*{\twocolumnDtop}[2][all]{% \twocolumntop[#1]{dynamic}{#2}} -\newcommand{\twocolumntopinarea}{\@twocolumntopinarea} -\newcommand{\@twocolumntopinarea}[7][all]{% +\newcommand*{\twocolumntopinarea}{\@twocolumntopinarea} +\newcommand*{\@twocolumntopinarea}[7][all]{% \setlength{\@ff@staticH}{#3}% -\setlength{\@ff@tmp@y}{#5} -\addtolength{\@ff@tmp@y}{-\@ff@staticH} +\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} +\addtolength{\columnheight}{-\vcolumnsep}% \ifffvadjust\adjustheight{\columnheight}\fi% \setlength{\columnwidth}{#4}% \addtolength{\columnwidth}{-\columnsep}% @@ -2296,39 +2502,39 @@ Available frame types are: 'flow', 'static' and 'dynamic'}}}}} \setflowframe{\c@maxflow}{margin=right}% } \@onlypreamble{\twocolumntopinarea} -\newcommand{\twocolumnStopinarea}[6][all]{% +\newcommand*{\twocolumnStopinarea}[6][all]{% \twocolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} -\newcommand{\twocolumnDtopinarea}[6][all]{% +\newcommand*{\twocolumnDtopinarea}[6][all]{% \twocolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} -\newcommand{\Ncolumntop}[4][all]{% +\newcommand*{\Ncolumntop}[4][all]{% \Ncolumntopinarea[#1]{#2}{#3}{#4}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\Ncolumntop} -\newcommand{\NcolumnStop}[3][all]{% +\newcommand*{\NcolumnStop}[3][all]{% \Ncolumntop[#1]{static}{#2}{#3}} -\newcommand{\NcolumnDtop}[3][all]{% +\newcommand*{\NcolumnDtop}[3][all]{% \Ncolumntop[#1]{dynamic}{#2}{#3}} -\newcommand{\Ncolumntopinarea}[8][all]{% +\newcommand*{\Ncolumntopinarea}[8][all]{% \ifnum#3>2\relax -\@Ncolumntopinarea[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}% -\else -\ifcase#3 -\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 + \@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]{% +\newcommand*{\@Ncolumntopinarea}[8][all]{% \setlength{\@ff@staticH}{#4}% \setlength{\@ff@tmp@y}{#6}% \addtolength{\@ff@tmp@y}{-\@ff@staticH}% @@ -2352,18 +2558,18 @@ which really doesn't make sense}% \ifnum\@colN<#3 \repeat } -\newcommand{\NcolumnStopinarea}[7][all]{% +\newcommand*{\NcolumnStopinarea}[7][all]{% \Ncolumntopinarea[#1]{static}{#2}{#3}{#4}{#5}{#6}{#7}} -\newcommand{\NcolumnDtopinarea}[7][all]{% +\newcommand*{\NcolumnDtopinarea}[7][all]{% \Ncolumntopinarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}{#7}} -\newcommand{\onecolumnbottom}[3][all]{% +\newcommand*{\onecolumnbottom}[3][all]{% \onecolumnSbottominarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\onecolumnbottom} -\newcommand{\onecolumnSbottom}[2][all]{% +\newcommand*{\onecolumnSbottom}[2][all]{% \onecolumnbottom[#1]{static}{#2}} -\newcommand{\onecolumnDbottom}[2][all]{% +\newcommand*{\onecolumnDbottom}[2][all]{% \onecolumnbottom[#1]{dynamic}{#2}} -\newcommand{\onecolumnbottominarea}[7][all]{% +\newcommand*{\onecolumnbottominarea}[7][all]{% \setlength{\@ff@staticH}{#3}% \setlength{\columnheight}{#5}% \addtolength{\columnheight}{-\@ff@staticH}% @@ -2376,23 +2582,23 @@ which really doesn't make sense}% \newflowframe[#1]{#4}{\columnheight}{#6}{\@ff@tmp@y}% } \@onlypreamble{\onecolumnbottominarea} -\newcommand{\onecolumnSbottominarea}[6][all]{% +\newcommand*{\onecolumnSbottominarea}[6][all]{% \onecolumnbottominarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} -\newcommand{\onecolumnDbottominarea}[6][all]{% +\newcommand*{\onecolumnDbottominarea}[6][all]{% \onecolumnbottominarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} -\newcommand{\twocolumnbottom}[3][all]{% +\newcommand*{\twocolumnbottom}[3][all]{% \twocolumnSbottominarea[#1]{#2}{#3}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\twocolumnbottom} -\newcommand{\twocolumnSbottom}[2][all]{% +\newcommand*{\twocolumnSbottom}[2][all]{% \twocolumnbottom[#1]{static}{#2}} -\newcommand{\twocolumnDbottom}[2][all]{% +\newcommand*{\twocolumnDbottom}[2][all]{% \twocolumnbottom[#1]{dynamic}{#2}} -\newcommand{\twocolumnbottominarea}[7][all]{% +\newcommand*{\twocolumnbottominarea}[7][all]{% \setlength{\@ff@staticW}{#4}% \setlength{\@ff@staticH}{#3}% -\setlength{\columnheight}{#5} -\addtolength{\columnheight}{-\@ff@staticH} -\addtolength{\columnheight}{-\vcolumnsep} +\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}% @@ -2410,44 +2616,44 @@ which really doesn't make sense}% \setflowframe{\c@maxflow}{margin=right}% } \@onlypreamble{\twocolumnbottominarea} -\newcommand{\twocolumnSbottominarea}[6][all]{% +\newcommand*{\twocolumnSbottominarea}[6][all]{% \twocolumnbottominarea[#1]{static}{#2}{#3}{#4}{#5}{#6}} -\newcommand{\twocolumnDbottominarea}[6][all]{% +\newcommand*{\twocolumnDbottominarea}[6][all]{% \twocolumnbottominarea[#1]{dynamic}{#2}{#3}{#4}{#5}{#6}} -\newcommand{\Ncolumnbottom}[4][all]{% +\newcommand*{\Ncolumnbottom}[4][all]{% \Ncolumnbottominarea[#1]{#2}{#3}{#4}{\textwidth}{\textheight}{0pt}{0pt}} \@onlypreamble{\Ncolumnbottom} -\newcommand{\NcolumnSbottom}[3][all]{% +\newcommand*{\NcolumnSbottom}[3][all]{% \Ncolumnbottom[#1]{static}{#2}{#3}} -\newcommand{\NcolumnDbottom}[3][all]{% +\newcommand*{\NcolumnDbottom}[3][all]{% \Ncolumnbottom[#1]{dynamic}{#2}{#3}} -\newcommand{\Ncolumnbottominarea}[8][all]{% +\newcommand*{\Ncolumnbottominarea}[8][all]{% \ifnum#3>2\relax -\@Ncolumnbottominarea[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}% -\else -\ifcase#3 -\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 + \@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]{% +\newcommand*{\@NcolumnSbottominarea}[8][all]{% \setlength{\@ff@staticH}{#4}% \setlength{\columnheight}{#6}% \addtolength{\columnheight}{-\@ff@staticH}% \addtolength{\columnheight}{-\vcolumnsep}% -\ifffvadjust\adjustheight{\columnheight}\fi% +\ifffvadjust\adjustheight{\columnheight}\fi \newframe[#1]{#2}{#5}{\@ff@staticH}{#7}{#8}% \setlength{\@ff@tmp@y}{#6}% \addtolength{\@ff@tmp@y}{-\columnheight}% @@ -2467,30 +2673,31 @@ which really doesn't make sense}% \ifnum\@colN<#3 \repeat } -\newcommand{\NcolumnSbottominarea}[1][all]{% +\newcommand*{\NcolumnSbottominarea}[1][all]{% \Ncolumnbottominarea[#1]{static}} -\newcommand{\NcolumnDbottominarea}[1][all]{% +\newcommand*{\NcolumnDbottominarea}[1][all]{% \Ncolumnbottominarea[#1]{dynamic}} \newcount\@ff@adjh -\newcommand{\adjustheight}[1]{% +\newcommand*{\adjustheight}[1]{% \@ff@adjh=#1\relax -\divide\@ff@adjh by \baselineskip -#1=\baselineskip -\multiply#1 by \@ff@adjh} -\newcommand{\adjustcolsep}{% +\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]{% +\newcommand*{\vtwotone}[1][all]{% \def\ff@pages{#1}\@vtwotone} -\newcommand{\@vtwotone}[1][0pt]{\@@vtwotonebottom{#1}{\paperheight}} -\newcommand{\@@vtwotonebottom}[8]{% +\newcommand*{\@vtwotone}[1][0pt]{\@@vtwotonebottom{#1}{\paperheight}} +\newcommand*{\@@vtwotonebottom}[8]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@x}{#1}% @@ -2500,23 +2707,23 @@ which really doesn't make sense}% } \@onlypreamble{\vtwotone} -\newcommand{\vtwotonebottom}[1][all]{% +\newcommand*{\vtwotonebottom}[1][all]{% \def\ff@pages{#1}\@vtwotonebottom} \@onlypreamble{\vtwotonebottom} -\newcommand{\@vtwotonebottom}[2][0pt]{\@@vtwotonebottom{#1}{#2}} -\newcommand{\vtwotonetop}[1][all]{% +\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}[2][0pt]{\@@vtwotonetop{#1}{#2}} -\newcommand{\@@vtwotonetop}[8]{% +\newcommand*{\@@vtwotonetop}[8]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computetopedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{-#2}% @@ -2525,27 +2732,29 @@ which really doesn't make sense}% \@nextvband{\ff@pages}{#2}{#3}{#4}{#5}% \@nextvband{\ff@pages}{#2}{#6}{#7}{#8}% } -\newcommand{\@nextvband}[5]{% +\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}% +\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]{% +\newcommand*{\vNtone}[1][all]{% \def\ff@pages{#1}\@vNtone} -\newcommand{\@vNtone}[2][0pt]{% +\newcommand*{\@vNtone}[2][0pt]{% \@@vNtone{#1}{#2}{\paperheight}} -\newcommand{\@@vNtone}[3]{% +\newcommand*{\@@vNtone}[3]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@x}{#1}% @@ -2554,37 +2763,34 @@ which really doesn't make sense}% \setlength{\@ff@staticH}{#3}% \@nextvNband% } -\newcommand{\@nextvNband}{% +\newcommand*{\@nextvNband}{% \ifnum\@thisstrip>0\relax - \let\next\@@nextvNband% + \let\flf@next\@@nextvNband \else - \let\next\relax% + \let\flf@next\relax \fi \advance\@thisstrip by -1\relax -\next} -\newcommand{\@@nextvNband}[3]{% +\flf@next} +\newcommand*{\@@nextvNband}[3]{% \@nextvband{\ff@pages}{\@ff@staticH}{#1}{#2}{#3}\@nextvNband} \@onlypreamble{\vNtone} -\newcommand{\vNtonebottom}[1][all]{% +\newcommand*{\vNtonebottom}[1][all]{% \def\ff@pages{#1}\@vNtonebottom} - \@onlypreamble{\vNtonebottom} - -\newcommand{\@vNtonebottom}[3][0pt]{% +\newcommand*{\@vNtonebottom}[3][0pt]{% \@@vNtone{#1}{#2}{#3}} -\newcommand{\vNtonetop}[1][all]{% +\newcommand*{\vNtonetop}[1][all]{% \def\ff@pages{#1}\@vNtonetop} - \@onlypreamble{\vNtonetop} -\newcommand{\@vNtonetop}[3][0pt]{% +\newcommand*{\@vNtonetop}[3][0pt]{% \@@vNtonetop{#1}{#2}{#3}} -\newcommand{\@@vNtonetop}[3]{% +\newcommand*{\@@vNtonetop}[3]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computetopedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{-#3}% @@ -2594,16 +2800,15 @@ which really doesn't make sense}% \setlength{\@ff@staticH}{#3}% \@nextvNband% } -\newcommand{\htwotone}[1][all]{% +\newcommand*{\htwotone}[1][all]{% \def\ff@pages{#1}\@htwotone} - -\newcommand{\@htwotone}[1][0pt]{\@@htwotoneleft{#1}{\paperwidth}} -\newcommand{\@@htwotoneleft}[8]{% +\newcommand*{\@htwotone}[1][0pt]{\@@htwotoneleft{#1}{\paperwidth}} +\newcommand*{\@@htwotoneleft}[8]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{#1}% @@ -2612,23 +2817,20 @@ which really doesn't make sense}% } \@onlypreamble{\htwotone} -\newcommand{\htwotoneleft}[1][all]{% +\newcommand*{\htwotoneleft}[1][all]{% \def\ff@pages{#1}\@htwotoneleft} - -\newcommand{\@htwotoneleft}[2][0pt]{\@@htwotoneleft{#1}{#2}} - \@onlypreamble{\htwotoneleft} -\newcommand{\htwotoneright}[1][all]{% +\newcommand*{\@htwotoneleft}[2][0pt]{\@@htwotoneleft{#1}{#2}} +\newcommand*{\htwotoneright}[1][all]{% \def\ff@pages{#1}\@htwotoneright} - -\newcommand{\@htwotoneright}[2][0pt]{\@@htwotoneright{#1}{#2}} - -\newcommand{\@@htwotoneright}[8]{% +\@onlypreamble{\htwotoneright} +\newcommand*{\@htwotoneright}[2][0pt]{\@@htwotoneright{#1}{#2}} +\newcommand*{\@@htwotoneright}[8]{% \computerightedgeodd{\@ff@tmp@x}% \if@twoside -\computerightedgeeven{\@ff@tmp@x@even}% + \computerightedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{#1}% @@ -2637,20 +2839,17 @@ which really doesn't make sense}% \@nexthband{\ff@pages}{#2}{#3}{#4}{#5}% \@nexthband{\ff@pages}{#2}{#6}{#7}{#8}% } - -\@onlypreamble{\htwotoneright} -\newcommand{\hNtone}[1][all]{% +\newcommand*{\hNtone}[1][all]{% \def\ff@pages{#1}\@hNtone} - -\newcommand{\@hNtone}[2][0pt]{% +\@onlypreamble{\hNtone} +\newcommand*{\@hNtone}[2][0pt]{% \@@hNtone{#1}{#2}{\paperwidth}} - -\newcommand{\@@hNtone}[3]{% +\newcommand*{\@@hNtone}[3]{% \computeleftedgeodd{\@ff@tmp@x}% \if@twoside -\computeleftedgeeven{\@ff@tmp@x@even}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{#1}% @@ -2658,29 +2857,22 @@ which really doesn't make sense}% \setlength{\@ff@staticW}{#3}% \@nexthNband% } - -\@onlypreamble{\hNtone} -\newcommand{\hNtoneleft}[1][all]{% +\newcommand*{\hNtoneleft}[1][all]{% \def\ff@pages{#1}\@hNtoneleft} - \@onlypreamble{\hNtoneleft} - -\newcommand{\@hNtoneleft}[3][0pt]{% +\newcommand*{\@hNtoneleft}[3][0pt]{% \@@hNtone{#1}{#2}{#3}} -\newcommand{\hNtoneright}[1][all]{% +\newcommand*{\hNtoneright}[1][all]{% \def\ff@pages{#1}\@hNtoneright} - \@onlypreamble{\hNtoneright} - -\newcommand{\@hNtoneright}[3][0pt]{% +\newcommand*{\@hNtoneright}[3][0pt]{% \@@hNtoneright{#1}{#2}{#3}} - -\newcommand{\@@hNtoneright}[3]{% +\newcommand*{\@@hNtoneright}[3]{% \computerightedgeodd{\@ff@tmp@x}% \if@twoside -\computerightedgeeven{\@ff@tmp@x@even}% + \computerightedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \addtolength{\@ff@tmp@y}{#1}% @@ -2690,7 +2882,7 @@ which really doesn't make sense}% \setlength{\@ff@staticW}{#3}% \@nexthNband% } -\newcommand{\@nexthband}[5]{% +\newcommand*{\@nexthband}[5]{% \setlength{\@ff@staticH}{#3}% \ifthenelse{\equal{#5}{}}{% \newstaticframe[#1]{#2}{\@ff@staticH}{\@ff@tmp@x}{\@ff@tmp@y}}% @@ -2701,28 +2893,27 @@ which really doesn't make sense}% \@setframecol#4\end{\c@maxstatic}{backcol}{sf}% \addtolength{\@ff@tmp@y}{\@ff@staticH}% } -\newcommand{\@nexthNband}{% +\newcommand*{\@nexthNband}{% \ifnum\@thisstrip>0\relax - \let\next\@@nexthNband% + \let\flf@next\@@nexthNband% \else - \let\next\relax% + \let\flf@next\relax% \fi \advance\@thisstrip by -1\relax -\next} - -\newcommand{\@@nexthNband}[3]{% +\flf@next} +\newcommand*{\@@nexthNband}[3]{% \@nexthband{\ff@pages}{\@ff@staticW}{#1}{#2}{#3}\@nexthNband} -\newcommand{\makebackgroundframe}[1][all]{% +\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.}% + \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}% + \computeleftedgeeven{\@ff@tmp@x@even}% \else -\setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% + \setlength{\@ff@tmp@x@even}{\@ff@tmp@x}% \fi \computebottomedge{\@ff@tmp@y}% \newstaticframe[#1]{\paperwidth}{\paperheight}{\@ff@tmp@x}% @@ -2730,9 +2921,10 @@ static frames may be obscured.}% \expandafter\global\expandafter \setlength\csname @sf@\romannumeral\c@maxstatic @evenx\endcsname {\@ff@tmp@x@even}} -\setlength{\columnseprule}{2pt} -\newcommand{\insertvrule}{\@ifstar\@sinsertvrule\@insertvrule} -\newcommand{\@insertvrule}[1][0pt]{% +\newlength\ffcolumnseprule +\setlength{\ffcolumnseprule}{2pt} +\newcommand*{\insertvrule}{\@ifstar\@sinsertvrule\@insertvrule} +\newcommand*{\@insertvrule}[1][0pt]{% \@ifnextchar[{\@@insertvrule[#1]}{\@@insertvrule[#1][0pt]}} \newlength\@ff@left@x \newlength\@ff@left@y @@ -2755,20 +2947,20 @@ 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]{ +\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 -\@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}% +\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}% @@ -2779,12 +2971,12 @@ or 'dynamic'}}}}% \setlength{\@ff@tmp@y}{\ffareay}% \addtolength{\@ff@tmp@y}{\ffareaheight}% \ifnum\@ff@tmp@y>\@ff@staticH -\setlength{\@ff@staticH}{\@ff@tmp@y}% + \setlength{\@ff@staticH}{\@ff@tmp@y}% \fi -\ifnum\@ff@left@y<\ffareay -\setlength{\@ff@tmp@y}{\@ff@left@y}% +\ifnum\@ff@left@y<\ffareay\relax + \setlength{\@ff@tmp@y}{\@ff@left@y}% \else -\setlength{\@ff@tmp@y}{\ffareay}% + \setlength{\@ff@tmp@y}{\ffareay}% \fi \addtolength{\@ff@staticH}{-\@ff@tmp@y}% \newstaticframe{\@ff@staticW}{\@ff@staticH}% @@ -2792,73 +2984,20 @@ or 'dynamic'}}}}% \addtolength{\@ff@staticH}{#1}% \addtolength{\@ff@staticH}{#2}% \setstaticcontents{\c@maxstatic}{\hfill -\rule[-#2]{\columnseprule}{\@ff@staticH}\hfill\mbox{}} -\ifcase#3 -\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} +\rule[-#2]{\ffcolumnseprule}{\@ff@staticH}\hfill\mbox{}}% +\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} +\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{\@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 -\PackageError{flowfram}{Unknown frame ID type '#1'}{% -Frame ID types are: 1 (flow), 2 (static) and 3 (dynamic)} -\or -\ifnum#2>\c@maxflow -\PackageError{flowfram}{Invalid flow frame IDN '\number#2'}{% -Flow frame IDNs go from 1 to \number\c@maxflow} -\else -\setlength{\ffareax}{\flowframex{#2}} -\setlength{\ffareay}{\flowframey{#2}} -\setlength{\ffareawidth}{\flowframewidth{#2}} -\setlength{\ffareaheight}{\flowframeheight{#2}} -\fi -\or -\ifnum#2>\c@maxstatic -\PackageError{flowfram}{Invalid static frame IDN '\number#2'}{% -Static frame IDNs go from 1 to \number\c@maxstatic} -\else -\setlength{\ffareax}{\staticframex{#2}} -\setlength{\ffareay}{\staticframey{#2}} -\expandafter\expandafter\expandafter -\@ff@getstaticpos -\csname @sf@dim@\romannumeral#2\endcsname -\setlength{\ffareawidth}{\@ff@tmp@x}% -\setlength{\ffareaheight}{\@ff@tmp@y}% -\fi -\or -\ifnum#2>\c@dynamic -\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{\@sinsertvrule}[1][0pt]{% +\newcommand*{\@sinsertvrule}[1][0pt]{% \@ifnextchar[{\@@sinsertvrule[#1]}{\@@sinsertvrule[#1][0pt]}} \def\@@sinsertvrule[#1][#2]#3#4#5#6{% \ifthenelse{\equal{#3}{flow}}{% @@ -2882,8 +3021,8 @@ 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]{% +\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}}{% @@ -2900,20 +3039,20 @@ 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]{ +\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 -\@ff@swaplen{\@ff@left@x}{\ffareax}% -\@ff@swaplen{\@ff@left@y}{\ffareay}% -\@ff@swaplen{\@ff@left@width}{\ffareawidth}% -\@ff@swaplen{\@ff@left@height}{\ffareaheight}% +\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} +\setlength{\@ff@tmp@y}{\@ff@left@y}% \addtolength{\@ff@tmp@y}{\@ff@left@height}% \setlength{\@ff@staticH}{\ffareay}% \addtolength{\@ff@staticH}{-\@ff@tmp@y}% @@ -2921,13 +3060,13 @@ or 'dynamic'}}}}% \addtolength{\@ff@staticW}{\@ff@left@width}% \setlength{\@ff@tmp@x}{\ffareax}% \addtolength{\@ff@tmp@x}{\ffareawidth}% -\ifnum\@ff@tmp@x>\@ff@staticW -\setlength{\@ff@staticW}{\@ff@tmp@x}% +\ifnum\@ff@tmp@x>\@ff@staticW\relax + \setlength{\@ff@staticW}{\@ff@tmp@x}% \fi -\ifnum\@ff@left@x<\ffareax -\setlength{\@ff@tmp@x}{\@ff@left@x}% +\ifnum\@ff@left@x<\ffareax\relax + \setlength{\@ff@tmp@x}{\@ff@left@x}% \else -\setlength{\@ff@tmp@x}{\ffareax}% + \setlength{\@ff@tmp@x}{\ffareax}% \fi \addtolength{\@ff@staticW}{-\@ff@tmp@x}% \newstaticframe{\@ff@staticW}{\@ff@staticH}% @@ -2935,20 +3074,20 @@ or 'dynamic'}}}}% \addtolength{\@ff@staticW}{#1}% \addtolength{\@ff@staticW}{#2}% \setstaticcontents{\c@maxstatic}{% -\hspace*{-#1}\rule{\@ff@staticW}{\columnseprule}} -\ifcase#3 -\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} +\hspace*{-#1}\rule{\@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} +\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{\@sinserthrule}[1][0pt]{% +\newcommand*{\@sinserthrule}[1][0pt]{% \@ifnextchar[{\@@sinserthrule[#1]}{\@@sinserthrule[#1][0pt]}} \def\@@sinserthrule[#1][#2]#3#4#5#6{% \ifthenelse{\equal{#3}{flow}}{% @@ -2972,99 +3111,13 @@ or 'dynamic'}}}}% \@@insert@hrule{#1}{#2}{\@ff@type@i}{\@ff@tmpN}% {\@ff@type@ii}{\ff@id}% } -\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{\dfchaphead}{% +\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 +\@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 @@ -3081,11 +3134,11 @@ class you are using does not define chapters}}{% \@dynamicframeid{#1}\@dynamicchap{\ff@id}} \newcounter{maxthumbtabs} \@ifundefined{chapter}{% -\newcommand{\defaultthumbtabtype}{section}}{ -\newcommand{\defaultthumbtabtype}{chapter} +\newcommand*{\defaultthumbtabtype}{section}}{ +\newcommand*{\defaultthumbtabtype}{chapter} } -\newcommand{\@ttb@type}{\defaultthumbtabtype} -\newcommand{\makethumbtabs}[2][0pt]{% +\newcommand*{\@ttb@type}{\defaultthumbtabtype} +\newcommand*{\makethumbtabs}[2][0pt]{% \@ifnextchar[{\@makethumbtabs[#1]{#2}}{% \@makethumbtabs[#1]{#2}[\defaultthumbtabtype]}% } @@ -3103,14 +3156,16 @@ Unknown section type '#3'}{}}{% \let\@ttb@old@chapter\@chapter \def\@chapter[##1]##2{% \@ttb@old@chapter[##1]{##2}% -\addtocontents{ttb}{\protect\thumbtab{\thepage}{\thechapter}{##1}{chapter.\thechapter}}% +\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}}% +\addtocontents{ttb}{\protect\thumbtab + {\thepage}{\thepart}{##1}{part.\thepage}}% \@afterheading}}{% \let\@ttb@old@endpart\@endpart \def\@part[##1]##2{% @@ -3123,7 +3178,7 @@ Unknown section type '#3'}{}}{% {\thepart}{\@parttitle}{part.\thepage}}% \@ttb@old@endpart }}} -\newcommand{\@makethumbsection}[1]{% +\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}% @@ -3147,29 +3202,30 @@ Unknown section type '#3'}{}}{% \expandafter \gdef\csname thumbtab@link@\romannumeral\c@maxthumbtabs\endcsname {#4}} -\newcommand{\@dothumbtabs}[2]{% +\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 -\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}% + \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} @@ -3188,18 +3244,41 @@ Unknown section type '#3'}{}}{% \parbox[c][#2]{\thumbtabwidth}{% \centering\@ttb@stack{#1}}% \fi} -\newcommand{\@ttb@stack}[1]{% -{\obeyspaces\expandafter\@@ttb@stack#1\end}} - -\def\@@ttb@stack#1{% -\ifx#1\end\let\next\relax +\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 -#1\par -\let\next\@@ttb@stack + \expandafter\flf@ta\expandafter{\@flf@subsptext}% + \edef\@flf@subsptext{\the\flf@ta\noexpand\space}% + \let\@flf@donextsubsp=\@flf@subsp \fi -\next} +\@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}% @@ -3209,82 +3288,82 @@ Unknown section type '#3'}{}}{% \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}% + \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}{% +\newcommand*{\enablethumbtabs}{% \ifnum\c@maxthumbtabs>0 \@ff@tmpN=0\relax \@dynamicframeid{thumbtab1}% @@ -3295,7 +3374,7 @@ Unknown section type '#3'}{}}{% \advance\ff@id by 2\relax }% \else\PackageWarning{flowfram}{No thumb tabs defined}\fi} -\newcommand{\disablethumbtabs}{% +\newcommand*{\disablethumbtabs}{% \ifnum\c@maxthumbtabs>0 \@ff@tmpN=0\relax \@dynamicframeid{thumbtab1}% @@ -3308,7 +3387,7 @@ Unknown section type '#3'}{}}{% {none}% \advance\ff@id by 1\relax }\fi} -\newcommand{\thumbtabindex}{% +\newcommand*{\thumbtabindex}{% \ifnum\c@maxthumbtabs>0\relax \@ff@tmpN=0\relax \@dynamicframeid{thumbtabindex1}% @@ -3346,27 +3425,27 @@ ttb file may not be up-to-date}}{% \@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 '#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}{% +\newcommand*{\tocandthumbtabindex}{% \aligntoctrue \tableofcontents \thumbtabindex \aligntocfalse } -\newcommand{\@ttb@minitoctype}{\@ttb@type} +\newcommand*{\@ttb@minitoctype}{\@ttb@type} \let\@ttb@old@starttoc\@starttoc \newif\if@storetoc \@storetocfalse -\renewcommand{\@starttoc}[1]{% +\renewcommand*{\@starttoc}[1]{% \if@storetoc -\@ttb@storetoc{#1}% + \@ttb@storetoc{#1}% \else -\@ttb@old@starttoc{#1}% + \@ttb@old@starttoc{#1}% \fi} -\newcommand{\@ttb@storetoc}[1]{% +\newcommand*{\@ttb@storetoc}[1]{% \begingroup \makeatletter \@storefileconts{\jobname.#1}% @@ -3376,14 +3455,15 @@ ttb file may not be up-to-date}}{% \fi \@nobreakfalse \endgroup} -\newcommand{\@storefileconts}[1]{\IfFileExists{#1}{% +\newcommand*{\@storefileconts}[1]{\IfFileExists{#1}{% \@@storefileconts\@filef@und}{% -\typeout{No file #1.}}} +\PackageInfo{flowfram}{No file #1.}}} \newcount\c@maxtocunits \newcount\c@maxminitoc \newcommand{\@@storefileconts}[1]{% -\@ifundefined{\@ttb@minitoctype}{\@ttb@minitoclevel=6}{% -\expandafter\@ttb@minitoclevel\expandafter=\csname @ttb@\@ttb@minitoctype @level\endcsname}% +\@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 @@ -3413,21 +3493,25 @@ ttb file may not be up-to-date}}{% \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{}\relax -\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 + \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} @@ -3439,9 +3523,9 @@ ttb file may not be up-to-date}}{% \def\@ttb@subparagraph@level{5} \long\def\@checkcontentsline#1#2\end{% \ifx#1\contentsline -\@contslinetrue + \@contslinetrue \else -\@contslinefalse + \@contslinefalse \fi} \def\@gettype\contentsline#1#2\end{% \def\@ttb@contstype{#1}} @@ -3449,13 +3533,13 @@ ttb file may not be up-to-date}}{% \aligntocfalse \let\@ttb@old@tableofcontents\tableofcontents -\renewcommand{\tableofcontents}{ +\renewcommand{\tableofcontents}{% \@storetoctrue \@ttb@old@tableofcontents \ifaligntoc -\@printalignedtoc + \@printalignedtoc \else -\@printtoc + \@printtoc \fi \@storetocfalse \global\c@minitoc=0\relax} @@ -3463,26 +3547,26 @@ ttb file may not be up-to-date}}{% \setlength{\beforeminitocskip}{0pt} \newlength\afterminitocskip \setlength{\afterminitocskip}{\baselineskip} -\newcommand{\dominitoc}[1]{% -\if@minitoc \@dominitoc{#1} \fi} -\newcommand{\@dominitoc}[1]{\@@dominitoc{#1}} +\newcommand*{\dominitoc}[1]{% +\if@minitoc \@dominitoc{#1}\fi} +\newcommand*{\@dominitoc}[1]{\@@dominitoc{#1}} \newcommand{\minitocstyle}[1]{\normalfont\normalsize\normalcolor #1} -\newcommand{\@@dominitoc}[1]{% +\newcommand*{\@@dominitoc}[1]{% {\minitocstyle{% \vskip\beforeminitocskip \csname @minitoc@\romannumeral#1\endcsname}} \vskip\afterminitocskip} -\newcommand{\appenddfminitoc}{% +\newcommand*{\appenddfminitoc}{% \renewcommand{\beforeminitocskip}{\baselineskip}% \@ifstar\@sappendminitocdf\@appendminitocdf} -\newcommand{\@sappendminitocdf}[1]{% +\newcommand*{\@sappendminitocdf}[1]{% \renewcommand{\@dominitoc}[1]{% \@sappenddynamic{#1}{\@@dominitoc{##1}}}} -\newcommand{\@appendminitocdf}[1]{% +\newcommand*{\@appendminitocdf}[1]{% \renewcommand{\@dominitoc}[1]{% \@appenddynamic{#1}{\@@dominitoc{##1}}}} -\newcommand{\@printtoc}{% +\newcommand*{\@printtoc}{% \@colN=0\relax \csname @toc@\romannumeral\@colN\endcsname \whiledo{\@colN<\c@maxtocunits}{% @@ -3514,15 +3598,15 @@ ttb file may not be up-to-date}}{% \newif\if@minitoc \@minitocfalse -\newcommand{\enableminitoc}[1][\@ttb@type]{% +\newcommand*{\enableminitoc}[1][\@ttb@type]{% \@minitoctrue \setcounter{minitoc}{0}% -\@ifundefined{#1}{ -\PackageError{flowfram}{Sectioning type '#1' not defined}{}}{% +\@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}}}} +\@makeminitocsection{#1}}}}% } \@onlypreamble{\enableminitoc} \newcommand{\@makeminitocchapter}{ -- cgit v1.2.3