Debian Codegraph @

texmf-dist/doc/latex/flowfram/samples/sample-poster.tex

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