summaryrefslogtreecommitdiff
path: root/macros/plain/contrib/newsletr/newssamp.tex
blob: e0af4e825053cb29c6b3e64cce6175be6013ffce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
%
%  File:        NEWSLETTER_SAMPLE.TEX
%
%  Functional description:
%
%       This file is a sample TeX file to demonstrate the functionality of the
%       NEWSLETTER_FORMAT macros.
%
%       It depends on the file NEWSLETTER_FORMAT.TEX.
%
%  Author:      Hunter Goatley
%
%  Date:        August 15, 1991
%
\ifx\undefined\eoa\input newsletr \fi		% Include macro definitions
\say{Producing sample newsletter}
%
%  Define the page headers and footers.  Different for even/odd pages.
%
\pageheaderlinetrue   \pagefooterlinetrue
\evenpageheader{}{Goat Droppings!}{}
\oddpageheader{}{My Newsletter}{}
\evenpagefooter{August\ 1991}{}{Page\ \folio}
\oddpagefooter{Page \folio}{}{Vol.\ 1\ \ No.\ 1}

\begindoublequotes				% Handle double quotes

\ignoreunderfill                                % Ignore undervfill errors
\parskip=0pt                                    % Don't skip between paragraphs
\parindent=18pt                                 % Indent paragraphs 18pt
\rm                                             % Use tenpoint roman

%
%  Define a few commands to make typing easier.
%
\def\RRM{Robert~R. McCammon}
\edef\TeX{\TeX\null}
\def\LaTeX{{\rm L\kern-.36em\raise.3ex\hbox{\quoteefont a}\kern-.15em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
%
%  Now define a short verbatim, which can be used for short strings:
%
\def\cmd#1{{\tt\string#1}}

%
%  Setup for newsletter page (a little taller and wider, with increased
%  \tolerance, etc.)
%
\newspage

%\nullpage                                      % Null page w/ head/foot

%
%  Now start the first article.  Do the article in double-column format.
%
%  The title and by-line are written in a double-box.
%
\articletitle{Using \TeX\ to Do A Newsletter}{By Hunter Goatley}

\begincolumns{2}                                % Begin double-columns

%
%  Reserve boxes for up to 3 pages of figures.
%
\definefigs{3}

%
%  Define a quote as a figure in the middle of column 2 on page 1 of this
%  article.
%
\definefig{1}{2}{middle}{\Quote{%
        Nothing beats \TeX\null.  Nothing.}{Hunter Goatley}}
%
%  Now do one that extends across the whole page.
%
\definefig{2}{0}{top}{\hsize=\normalhsize%
\vbox{\centerline{\shadowbox{%
        \hsize=5in
        \vsize=.5in
        \vbox to\vsize{
        \vfill
        \centerline{This is inside a \cmd{\shadowbox}.}
        \vfill
        }       %End vbox
        }       %End shadowbox
        }}      %End vbox
        \vskip12pt
        \centerline{This is a figure across the whole page.}
        }       %End definefig

\handlefigures                          % Necessary, but shouldn't be.
\noindent
This document attempts to describe how my plain \TeX\ newsletter format works.
The documentation is sparse, but I hope to let it speak for itself through
the use of examples.  Will they be meaningful examples?  Probably not.  But,
hey, I'll give it a shot.

I started producing {\it Lights Out!---The \RRM\ Newsletter\/}
in June 1989.  For those who don't know, \RRM\ is a very popular author whose
books have primarily been categorized in the horror genr\'e.  His latest,
\book{Boy's Life}, was published in hardcover by Pocket Books in August 1991.
\book{Boy's Life} is {\sl not\/} horror---it's a wonderful tale of how 1964
looked to a 12-year-old boy.  There's a mystery, but the book is primarily
about remembering life when you were young.  I urge you to find the book and
give it a try.  Here are quotes from a couple of reviews of McCammon's previous
novel, \book{Mine}:

%
%  A sample \dotitem'ed list.
%
\bgroup                         % Start a new group to keep \listindent local
\listindent{10pt}\beginlist
\dotitem        "\book{Mine} grips you tightly by the throat, right at the
                start, and squeezes\edots" \farright{---\book{The New York Daily
                News}}
\dotitem        "McCammon at his very best\ \dots\ and then some."
                \farright{---\book{The Birmingham News}}%
\endlist
\egroup

\noindent                       % Don't indent the paragraph after the quotes.
Well, enough about \RRM.  Even if you don't like horror, I think you'll like
McCammon's work.  Other titles include \book{Swan Song}, \book{Blue World},
and \book{Mystery Walk}.

I'll now break and we'll start a new sub-article under this main
article.  I used this approach in a regular column entitled "Things Unearthed,"
which consisted of various news items about new book releases and other
news items.

%
%  Begin a new sub-article.  \coltitle draws a box around the title.  This
%  one has two centered lines, with a box around it.
%
\articlesep
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\coltitle{\centerline{Why I Chose \TeX\ Over}\break
          \centerline{Ventura and PageMaker}}

When I decided I was going to start producing a newsletter, I started looking
at the options I had available to me.  Because I'm a VAX systems programmer,
I preferred to use something on the VAX.  I had had some exposure to \TeX\ and
knew that it would do the job, but I thought I'd look at PC-based choices.

I played around with PageMaker some, and read about Ventura---and decided that
they were way too clumsy to do what I wanted.  I liked the fact that \TeX\ used
regular text files with embedded commands---I could use the editor I was
accustomed to, \TeX\ was available for a variety of platforms, and \TeX\ was
incredibly flexible.

So I decided on \TeX, I had to decide if I was going to use \TeX\ or \LaTeX.
But that's another sub-article.

\articlesep                                             % Line to separate arts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\coltitle{\centerline{Why I Chose Plain \TeX}\break     % Column title box
        \centerline{Instead of \LaTeX}}

I had originally intended to use \LaTeX, because that's what the technical
writing group of my employer-at-the-time was using to produce their manuals.
I knew that I wanted multiple columns and to be able to switch back and forth
between single- and double-columns on the same page at will.  After trying
many variations of the \LaTeX\ double-column style, I finally decided I
couldn't easily do it.  (This was before Frank Mittelbach's \LaTeX\ macros
appeared in {\it The TUGboat\/}.)

So, once I decided on \TeX, I decided I better learn about \TeX\ so I could
write my own macros.  Two years later, I still modify the file some, but it
has been lots of fun and I learned a whole lot about \TeX.

I've since learned that, apparently, not many people use plain \TeX.
Personally, I don't know why everybody flocks to \LaTeX---plain \TeX\ is
so much more flexible.  It is true that you need a default set of macros
to get you going, but once they're there, I believe \TeX\ is actually
easier to use than \LaTeX.

An aside here: if you haven't seen \book{\TeX\ for the Impatient}, by Paul~W.
Abrahams, I strongly recommend a copy.  It's a great reference book for
plain \TeX, and his {\tt eplain.tex} (Extended Plain \TeX) provides some
very useful macros.  It was published last year by Addison-Wesley.

\articlesep
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\coltitle{\centerline{Some of the Highlights}\break
          \centerline{of the Newsletter Format}}

There are variety of commands provided by my newsletter format.  Because
{\it Lights Out!\/} covered a horror author, some of the commands are
specifically designed to handle books and interviews.  While I was developing
the format, I tried to make sure that I kept things as generic as possible
so that it could be used to generate other newsletters.  It remains to be
seen if whether or not I was successful.

%The next page features a list of some of the commands that are available
%and how they're used.

I've included the commands \cmd{\twelvepoint}, \cmd{\elevenpoint},
\dots, \cmd{\eightpoint} to change font sizes.  I didn't do these
the "official" \TeX\ way (font families) out of laziness.  To get the
eight-point font {\tt cmss8} you simply type: \cmd{\eightpoint\string\ss},
probably within a group.

My multiple columns command supports up to 6 columns on a page.  When you
increase the number of columns on a page, you usually need to change
the font size (for three columns, I switched to the {\tt cmss8} font---it
seemed to work out OK because the sans serif font helped differentiate
between the "Letters" column and the rest of the newsletter).

One of the things that seems to be hardest in \TeX---especially when multiple
columns are involved---is the insertion of figures.  I like things to be
very structured---the mathematical side of me, I guess---so when I added
figure support to my macros, I did it by setting up my multiple column
output routine to place figures in certain locations on a page.  You can
specify that a figure is inserted across the entire page at the top and
bottom of the page, or at the top, middle, or bottom of each column.
Here comes the really kludgy part of my format.

The macro \cmd{\definefigs} must be executed to tell \TeX\ how many pages
are following that may contain figures.  What happens is that a large block
of boxes is allocated.  I tried various combinations to make it more dynamic,
but had little luck.  Because of time constraints, I went with the way that
worked.  This shouldn't really cause a problem, because you define figures
within an article, and most articles aren't so long that you exceed the number
of boxes \TeX\ has.  The command to define a figure is:
\vskip\baselineskip
\centerline{\cmd{\definefig\string{Page\string}\string{Column\string}%
        \string{Position\string}\string{Box\string}}}
\vskip\baselineskip
where \cmd{Box} is a \cmd{\vbox} containing your figure.  This can be an empty
\cmd{\vbox} \cmd{\vfill}'ed to the correct size for later pasting.  The quote
on the previous page was inserted with a \cmd{\Quote} as the argument to
the \cmd{\definefig} command.

That's all I'm going to say about the commands for now.  Notice that when
you end the double columns, they are automatically balanced.\eoa

\endcolumns                                     % End of double columns


\articlesep                                     % Separate the articles w/ rule

%
%   Now do another article in single column format.
%
\articletitle{This Is Another Article}{By Me, Of Course}

\begincolumns{3}

This is more just to show that you can also do three-columns on the same page
with single- and double-column formats without \TeX\ complaining about it.
I hope this example has been of some use to you.

Note that balancing these columns still has a few glitches---but nothing adding
or subtracting a few words won't fix.  I've been using this format to generate
five newsletters so far.

\endcolumns

\articlesep

This is more just to show that you can keep both single-, double-, and
triple-column formats on the same page.  \TeX\ won't complain about it
at all (usually).\eoa


\bye