Debian Codegraph @

texmf-dist/doc/latex/flowfram/samples/sample1.tex

raw
1 % This file is public domain.
2
3 \documentclass[a4paper]{article}
4
5 \usepackage[a4paper,landscape,margin=1in]{geometry}
6 \usepackage{fancybox}
7 \usepackage{color}
8 \usepackage{flowfram}
9
10 \showframebboxtrue
11 \showtypeblocktrue
12
13 % set up frames
14
15 % Base the page layout on 4 column with static header
16 \NcolumnStop{4}{1in}
17
18 % On the first page, replace last two columns with
19 % 2 columns and a static underneath
20 \setflowframe{3,4}{pages={>1}}
21 \twocolumnSbottominarea[1]{1in}{0.5\textwidth}{\flowframeheight{3}}{0.5\textwidth}{0pt}
22
23 \begin{staticcontents}{2}
24 The page layout for this document was obtained with
25 the following commands:
26 \begin{verbatim}
27 \NcolumnStop{4}{1in}
28 \setflowframe{3,4}{pages={>1}}
29 \twocolumnSbottominarea[1]{1in}{0.5\textwidth}{\flowframeheight{3}}
30 {0.5\textwidth}{0pt}
31 \end{verbatim}
32 \end{staticcontents}
33
34 \newcommand{\sty}[1]{\textsf{#1}}
35 \newcommand{\env}[1]{\textsf{#1}}
36 \newcommand{\cmdname}[1]{\texttt{\symbol{92}#1}}
37 \newcommand{\meta}[1]{\textnormal{\textless\textit{#1}\textgreater}}
38
39 \raggedright
40 %\setlength{\parindent}{15pt}
41
42 \begin{document}
43
44 \begin{staticcontents}{1}
45 \title{Creating Flow Frames for Posters or Magazines}
46 \author{Nicola L. C. Talbot}
47 \date{}
48 \maketitle
49 \end{staticcontents}
50
51 This is a modified version of the manual for the \sty{flowfram} package.
52 It is intended to illustrated what can be done. See the full manual for
53 a comprehensive description.
54
55 If the columns are very narrow, it may be better to
56 use \cmdname{raggedright}, otherwise \TeX\ may have a
57 problem working out the line breaks.
58
59 \section{Introduction}
60
61 The \sty{flowfram} package is designed to enable you to create
62 frames in a document such that the
63 contents of the \env{document} environment flow from one
64 frame to the next in the order that they were defined.
65 This is useful for creating posters
66 or magazines or any other form of document that does not
67 conform to the standard one or two column layout.
68
69 \section{Setting up Frames}
70
71 The \sty{flowfram} package provides three types of frame:
72 {flow frames}, {static
73 frames} and {dynamic frames}.
74
75 \subsection{Flow Frames}
76
77 The flow frame is the principle type of frame.
78 The text of the \env{document} environment will flow from
79 one frame to the next in order of definition. Each
80 flow frame has an associated width, height,
81 position on the page, and optionally a border.
82
83 It is recommended that all the flow frames in a document
84 have the same width, otherwise problems may occur
85 when a paragraph spans to flow frames of unequal
86 widths. This is because \TeX's output routine does not
87 register the change in \cmdname{hsize} until it reaches
88 a paragraph break. If it is absolutely necessary for
89 flow frames to have unequal widths, judicious use of
90 \cmdname{framebreak} is required.
91
92 \subsection{Static Frames}
93
94 A static frame is a rectangular area in which text neither
95 flows into, nor flows out of. The contents must be set
96 explicitly, and once set, the contents of the static frame will
97 remain the same on each page until it is explicitly
98 changed. Thus, a static frame can be used, for example, to make
99 a company logo appear in the same place on every page.
100
101 \subsection{Dynamic Frames}
102
103 A dynamic frame is similar to a static frame, but its contents
104 are re-typeset on each page. (A static frame stores its
105 contents in a savebox, whereas a dynamic frame stores its
106 contents in a macro).
107
108
109 \section{Frame Attributes}
110 \label{sec:modattr}
111
112 Once you have defined the {flow frames}, {static frames} and
113 {dynamic frames}, their attributes can be changed.
114 The three types of frame mostly have the
115 same set of attributes, but some are specific to a certain type.
116 The available attributes are as follows
117 (\textsuperscript{\textbf{F}} indicates the key is
118 only available for {flow frames},
119 \textsuperscript{\textbf{S}} indicates the key is only available
120 for {static frames}
121 and \textsuperscript{\textbf{D}} indicates the key
122 is only available for {dynamic frames}):
123
124 \begin{description}
125 \item[width=\meta{length}] The width of the frame.
126
127 \item[height=\meta{length}] The height of the frame.
128
129 \item[x=\meta{length}] The x-coordinate of the frame.
130
131 \item[y=\meta{length}] The y-coordinate of the frame.
132
133 \item[border=\meta{style}] The style of the border around the
134 frame, this can take the values: \texttt{none} (no border),
135 \texttt{plain} (plain border) or the name of a \LaTeX\
136 frame making command without the preceding backslash.
137 The value \texttt{fbox} is equivalent to \texttt{plain}.
138
139 \item[offset=\meta{offset}] The border offset, if it is a
140 user-defined border. This is the distance from the outer
141 edge of the left hand border to the left edge of the
142 bounding box of the text inside the border. The \sty{flowfram}
143 package is able to compute the border for
144 known frame making commands.
145 If you define your own frame making command, you may need to
146 specify the offset explicitly, or the frames
147 may end up shifted to the right or left.
148
149 \item[bordercolor=\meta{colour}] The colour of the border
150 if you are using a standard frame making command.
151 The colour can either be specified as, e.g.\ \texttt{green},
152 or including the colour model, e.g. \verb/[rgb]{0,1,0}/.
153
154 \item[textcolor=\meta{colour}] The text colour for that
155 frame. Again, the colour can either be specified as,
156 e.g.\ \texttt{green}, or including the colour model,
157 e.g. \verb/[rgb]{0,1,0}/.
158
159 \item[pages=\meta{page list}] The {list of
160 pages} for which the frame
161 should appear. This can either have the values: \texttt{all},
162 \texttt{even}, \texttt{odd} or \texttt{none} (the latter
163 removes the frame from that point on---useful if you
164 have multiple pages with the same number), or it can be a
165 comma-separated list of single pages, or
166 {page ranges}.
167
168 \item[margin=\meta{side}\textsuperscript{F}] The side of
169 the flow frame that its corresponding margin should go on. This
170 can take the values \texttt{left} or \texttt{right}.
171
172 \item[clear=\meta{boolean}\textsuperscript{S}] If this value
173 is set, the static frame will be cleared at the start of the
174 next page.
175
176 \item[style=\meta{cmd}\textsuperscript{D}] This should be
177 the name of a command \emph{without} the preceding backslash,
178 to be applied to the contents of the specified dynamic frame.
179 The command may either be a declaration, for example \verb/style=large/
180 which will set the contents of all the dynamic frames in a
181 large font, or it can be a command that takes a single argument,
182 for example \verb/style=textbf/
183 which will make the text for all the dynamic frames come out in
184 bold. To unset a style, do \verb/style=none/.
185
186 \end{description}
187
188 \section{Miscellaneous}
189
190 \subsection{Page Layout}
191
192 The \sty{flowfram} package has the package option \texttt{draft}
193 which will draw the {bounding boxes} for
194 each frame defined. At the bottom right of each
195 bounding box (except for the bounding box denoting the
196 typeblock), a marker will be shown to indictate the type
197 of frame, its IDN and its IDL.
198
199 You can see the layout for the current page (irrespective of
200 whether or not the \texttt{draft} option has been set) using
201 the command:\newline
202 \cmdname{flowframeshowlayout}
203
204 The headers and footers will appear as usual (but will not
205 be shown in draft mode), according to the format given by
206 \cmdname{pagestyle}.
207
208 \subsection{Frame Stacking Order}
209
210 The material on each page is placed in the following order:
211 \begin{enumerate}
212 \item Each static frame defined for that page in ascending
213 order of IDN.
214
215 \item Each flow frame defined for that page in ascending
216 order of IDN.
217
218 \item Each dynamic frame defined for that page in ascending
219 order of IDN.
220
221 \item {Bounding boxes} if the \texttt{draft}
222 package option has been used.
223 \end{enumerate}
224
225 This ordering can be used to determine if you want something
226 to overlay or underlay everything else on the page.
227
228 \subsection{Prematurely Ending a Flow Frame}
229
230 You can force text to move immediately to the next defined
231 flow frame using one of the standard \LaTeX\ page breaking commands
232 which work in an analogous way to the way they
233 work in standard two column mode.
234
235 The command \cmdname{framebreak} is provided for situations
236 where a paragraph spans two flow frames
237 of different widths, as \TeX's output routine does not
238 adjust to the new value of \cmdname{hsize} until the last
239 paragraph of the previous frame has ended. As a
240 result, the end of the paragraph at the beginning of the new
241 flow frame retains the width of the previous flow frame.
242
243 If you want to start a new page, rather than simply move to the
244 next frame, use the command\newline
245 \cmdname{finishthispage}.
246
247 \subsection{Floats}
248
249 Since floats (such as figures and tables) can only go in
250 {flow frames}, this package provides
251 the additional environments:
252 \env{staticfigure} and
253 \env{statictable} which can be used in static frames
254 and dynamic frames. Unlike their \env{figure} and
255 \env{table} counterparts, they are fixed in place, and
256 so do not take an optional placement specifier. The
257 \cmdname{caption} and \cmdname{label} commands can
258 be used within \env{staticfigure} and \env{statictable} as
259 usual.
260
261 The standard \env{figure} and \env{table} commands will
262 behave as usual in the flow frames, but their starred versions,
263 \env{figure*} and \env{table*} behave no differently
264 from \env{figure} and \env{table}.
265
266 \subsection{Global Values}
267
268 The following macros can be changed using \cmdname{renewcommand}:
269
270 \begin{itemize}
271 \item \cmdname{setffdraftcolor}
272
273 This sets the colour of the bounding box
274 when it is displayed in draft mode.
275
276 \item
277 \cmdname{setffdrafttypeblockcolor}
278
279 This sets the colour of
280 the bounding box of the typeblock when it is displayed
281 in draft mode.
282
283 \item \cmdname{fflabelfont}
284
285 This sets the font size for the bounding box markers in
286 draft mode.
287
288 \end{itemize}
289
290 The following are lengths, which can be changed using
291 \cmdname{setlength}:
292
293 \begin{itemize}
294 \item \cmdname{fflabelsep}
295
296 This is the distance from the right hand side of the
297 bounding box at which to place the bounding box marker.
298
299 \item \cmdname{flowframesep}
300
301 This is the gap between the text of the frame and
302 its border, for the standard border types.
303
304 \item \cmdname{flowframerule}
305
306 This is the width of the frame's border, if using
307 a border given by a frame making command that uses \cmdname{fboxsep}
308 to set its border width.
309 \end{itemize}
310
311 \end{document}