% Save file as: NEWSSAMP.TEX Source: FILESERV@SHSU.BITNET % % 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