Debian Codegraph @

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

raw
1 % This file is public domain.
2
3 \documentclass{article}
4
5 \usepackage{color}
6 \usepackage{flowfram}
7 \usepackage[a5paper,top=10mm,bottom=10mm,margin=10mm]{geometry}
8 \usepackage{graphicx}
9
10 % define lengths to help compute positions
11 \newlength\leftX
12 \newlength\leftY
13 \newlength\leftH
14 \newlength\leftW
15
16 \newlength\rightX
17 \newlength\rightY
18 \newlength\rightH
19 \newlength\rightW
20
21 % Create a static frame to put title in
22 \setlength{\leftH}{2cm}
23 \setlength{\leftY}{\textheight}
24 \addtolength{\leftY}{-\leftH}
25
26 \newstaticframe[1]{\textwidth}{\leftH}{0pt}{\leftY}[title]
27
28 % First flow frame.
29
30 \setlength{\leftH}{7cm}
31 \adjustheight{\leftH}
32 \addtolength{\leftY}{-\leftH}
33 \setlength{\leftW}{0.5\textwidth}
34
35 \newflowframe[1]{\leftW}{\leftH}{0pt}{\leftY}
36
37 \setlength{\rightH}{\leftH}
38 \setlength{\rightY}{\leftY}
39
40 % Second flow frame
41
42 \setlength{\leftH}{3.5cm}
43 \adjustheight{\leftH}
44 \addtolength{\leftY}{-\leftH}
45
46 \newflowframe[1]{\textwidth}{\leftH}{0pt}{\leftY}
47
48 % Right hand flow frame
49
50 \setlength{\rightX}{\leftW}
51 \addtolength{\rightX}{\columnsep}
52 \setlength{\rightW}{\textwidth}
53 \addtolength{\rightW}{-\rightX}
54
55 \newflowframe[1]{\rightW}{\rightH}{\rightX}{\rightY}
56
57 % insert vertical line between left and right flow frames
58
59 \insertvrule{flow}{1}{flow}{3}
60
61 % insert horizontal line between flow frames 2 and 3
62 % don't want it to go under frame 1 so shift the starting
63 % position
64
65 \addtolength{\rightX}{-0.5\columnsep}
66 \addtolength{\rightX}{-0.5\columnseprule}
67 \inserthrule[-\rightX]{flow}{3}{flow}{2}
68
69 % egg picture
70
71 \addtolength{\rightY}{\rightH}
72 \addtolength{\rightY}{-10mm}
73 \setlength{\rightW}{0.75in}
74 \setlength{\rightH}{0.8in}
75 \addtolength{\rightY}{-\rightH}
76 \setlength{\rightX}{\textwidth}
77 \addtolength{\rightX}{-\rightW}
78 \newstaticframe[1]{\rightW}{\rightH}{\rightX}{\rightY}[egg]
79
80 % set contents
81 \setstaticcontents*{egg}{\includegraphics[scale=0.75]{egg}}
82
83 % middle heading
84
85 \setlength{\leftH}{2cm}
86 \addtolength{\leftY}{-\leftH}
87
88 \newstaticframe[1]{\textwidth}{\leftH}{0pt}{\leftY}[midhead]
89
90 % insert horizontal line
91 \inserthrule*{flow}{2}{static}{midhead}
92
93 % bottom left flow frame
94
95 \setlength{\leftH}{\leftY}
96 \adjustheight{\leftH}
97 \setlength{\leftW}{0.6\textwidth}
98
99 \newflowframe[1]{\leftW}{\leftH}{0pt}{0pt}
100
101 % bottom right flow frame
102
103 \setlength{\rightX}{\leftW}
104 \addtolength{\rightX}{\columnsep}
105 \setlength{\rightW}{\textwidth}
106 \addtolength{\rightW}{-\rightX}
107
108 \newflowframe[1]{\rightW}{\leftH}{\rightX}{0pt}
109
110 % static frame for sheep picture
111
112 \newstaticframe[1]{0.8in}{0.8in}{0pt}{0pt}[sheep]
113
114 % set contents
115 \setstaticcontents*{sheep}{\includegraphics[scale=0.75]{sheep}}
116
117 \onecolumn[>1] % for any text that falls off the last page
118
119 \setcounter{secnumdepth}{0}
120 \pagestyle{empty}
121
122 \begin{document}
123
124 \begin{staticcontents*}{title}
125 \begin{center}
126 \bfseries\Huge
127 Fairy Tale Times
128 \end{center}
129 \hfill Issue 1. 20 November 2005.
130 \end{staticcontents*}
131
132 \section{Killer Wolf on the Loose}
133
134 The authorites are warning of a killer wolf on the
135 loose. He has so far devoured an old grandmother and
136 two pig brothers. He is described as being furry with
137 big eyes and big teeth.
138
139 On Monday this week he broke into a house, and devoured
140 an old lady. He then disguised himself as the old lady
141 in order to deceive her granddaughter. Luckily for the little
142 girl a woodsman arrived in time to rescue her. Parents are
143 being cautioned not to let their children wander about on
144 their own, and to remind them not to talk to strangers.\par
145 \framebreak
146
147 The next day the wolf struck again, this time targeting two
148 pig brothers who had most incautiously made their dwellings
149 on the cheap using inadequate materials. The wolf also made
150 an attempt on the third pig brother, but was unable to break
151 into his house.
152
153 Police are appealing to the public for witnesses and remind
154 people to keep their doors securely fastened at all times.
155
156 ``Always ask to see identification,'' said one police advisor,
157 ``and invest in improving the general security of your property.''
158
159 \framebreak
160 \section{Tragic Wall Accident}
161
162 {\parshape=6 0pt 13em 0pt 13em 0pt 11em 0pt 11em 0pt 13em
163 0pt 17em
164 An egg person tragically fell from a six foot wall yesterday
165 afternoon and was smash\-ed to pieces. The king's cavalry rushed
166 to the scene, but regretted that they were unable to help him.
167 \par}
168
169 Humpty Dumpty was believed to be sitting
170 on the wall when he fell. Police have ruled out foul play, but
171 are advising people not to play on high walls, particularly
172 those vulnerable members of the population suffering from
173 eggshell syndrome.
174
175 \begin{staticcontents*}{midhead}
176 \section{Relief as Missing Sheep Finally Return Home}
177 \end{staticcontents*}
178
179 \framebreak
180 There was much celebration yesterday morning when Little Bo
181 Peep's sheep finally returned home. They had been missing
182 for more than a week.
183
184 {\parshape=8 0pt \linewidth 0pt \linewidth 0pt \linewidth
185 0pt \linewidth 40pt 180pt 36pt 184pt 29pt 191pt
186 0pt \linewidth
187 ``I just didn't know where to find them,'' the shepherdess
188 stated, ``but I was told to leave them alone and they'd come
189 home.'' Unusual advice perhaps, but it seems to have worked
190 as they did indeed come home. Eye witnesses reported that their
191 tails were wagging behind them.
192 ``I'm just so happy they've come home,'' Little Bo Peep said
193 in a press conference yesterday\framebreak}afternoon.
194 The sheep themselves made no comment, and police are still
195 trying to determine what happened to them.
196
197 \noindent\hrulefill
198
199 This is a sample document illustrating the
200 flowfram package. It uses \TeX's \verb|\parshape| command
201 to create irregularly shaped paragraphs.
202
203 \hfill Nicola Talbot
204 \framebreak
205
206 \end{document}