|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T U
Length: 8925 (0x22dd) Types: TextFile Notes: Uncompressed file
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦c319c2751⟧ »unix3.0/TeX3.0.tar.Z« └─⟦036c765ac⟧ └─⟦f6ba76d75⟧ »TeX3.0/TeXcontrib/urban/textroff/pages.tex.Z« └─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89 └─⟦f6ba76d75⟧ »./tex82/TeXcontrib/urban/textroff/pages.tex.Z« └─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦63303ae94⟧ »unix3.14/TeX3.14.tar.Z« └─⟦c58930e5c⟧ └─⟦f6ba76d75⟧ »TeX3.14/TeXcontrib/urban/textroff/pages.tex.Z« └─⟦this⟧
\Section{Page Composition} Although plain \TeX\ is not as complete a document composition system as a typical \Troff/ macro package, it does provide several convenient features for composing technical documents. \SubSection{Section Headings} Plain \TeX\ does not provide the sophisticated numbered headings (with several levels of section number) that are found in the |-mm| and |-me| macro packages for \Troff/, or the |Article| document type for |Scribe|. However, there is a |\beginsection| macro that can be used to set a bold heading for a paragraph. For example: \begintt \beginsection 1. An Example |medskip This paragraph isn't indented, even though subsequent paragraphs would be. A more extensive example of this appears in Appendix~B of ``{\sl The \TeX book}.'' \endtt produces the following result: \bigskip \leftline{\bf 1. An Example}\nobreak\smallskip\vskip-\parskip\noindent This paragraph isn't indented, even though subsequent paragraphs would be. A more extensive example of this appears in Appendix~B of ``{\sl The \TeX book}.'' Plain \TeX\ also includes a |\proclaim| macro that can be used to present theorems or similarly assertive statements. \begintt \proclaim Rule 225(a). All proclamations must end their labels with periods, and will appear in slanted type. \endtt \proclaim Rule 225(a). All proclamations must end their labels with periods, and will appear in slanted type. The text of the proclamation comprises an entire paragraph, and thus ends at the next empty line (or |\par|). \SubSection{Page Headers and Footers} Plain \TeX\ normally produces pages with no header lines and a page number centered at the bottom. If something else is wanted, macros are provided to change them. |\footline| defines the footer line. For example, a paper might set up a footer line with the command: \nobreak \begintt \footline={\tenrm Rogue for Pacifists\hfil\folio} \endtt to produce a footer line like: \nobreak\vskip 12pt \line{\tenrm Rogue for Pacifists\hfil\folio} \par\noindent As with \Troff/, it is a good idea to explicitly set the font to ten-point roman type. Otherwise, the footer will be set in whatever font happens to be in effect when the page break occurs. The alert reader will have noted the use of |\folio| for the page number. This useful (if somewhat cryptically named) macro produces the Arabic representation of the page number if it is positive, and the Roman numeral representation of the number if it is negative. The page number begins at 1 and is incremented after every page (or decremented if it is negative). If you want to adjust it yourself, you can issue the command |\pageno=|$n$, where $n$ is the (possibly negative) new page number. The header line can be set up the same way, using |\headline=|. In fact, the document {\sl Using Nroff and --ME\/}, by Eric Allman, uses a header line exactly analogous to the footer line of the previous example. Three-part headers and footers are trickier, because just putting |\hfil| glue between the parts will center the middle section between the left and right sections, rather than centering it on the page. The control sequences |\rlap| and |\llap| can be used to good effect here, since their results behave as if they are of zero width. Think of this as ``allowing the |\hfil| springs to push against the sides of the page,'' and you get the idea. For example, the footer line of this page was set with the input \begintt \footline= { \tenrm % Ten-point roman \rlap{\TeX\ For {\it Troff\/} Users} % Takes no space, types to right \hfil\folio\hfil % Centered Page number \llap{Sample} % Also no space, types to left } \endtt \footline= { \tenrm % Ten-point roman \rlap{\TeX\ For {\it Troff\/} Users} % Takes no space \hfil\folio\hfil % Centered Page number \llap{Sample} % Also no space \global\footline={\hss\tenrm\folio\hss}% Sneaky } \SubSection{Footnotes and Figures} Most documents require some kind of ``movable'' text, i.e. text that is to be set somewhere other than where it appears in the input. In general, \TeX\ calls such items {\sl inserts} and provides powerful, if complex, primitives for the effective manipulation of such material. Fortunately, plain \TeX\ provides fairly handy macros for doing some of the more familiar types of inserts. The most common insert is a footnote, which consists of text to go at the bottom of a page. The plain \TeX\ |\footnote| macro can be used within a paragraph\footnote{*}{Like this.}; for example, the footnote in the present sentence was typed in the following way: \nobreak \begintt ... within a paragraph\footnote{*}{Like this.}; for example, ... \endtt There are two parameters to |\footnote|: the reference mark (which will appear in the footnote and in the paragraph), and the text of the footnote. If necessary, long footnotes are automatically split between pages, and footnotes normally appear in normal sized type as in this example\footnote{**}{This paper uses a private macro (not part of plain \TeX) to automatically number footnotes and display them in eight-point type; this footnote was produced with plain \TeX.}. Note that footnotes {\sl must} appear in the context of a paragraph, or anything else ``horizontal'' that contributes to the page, e.g. in a |\centerline|. If you insist on using a footnote in a more exotic context (e.g. the caption of a ``floating keep''), the esoteric macro |\vfootnote| must be used instead of |\footnote|. The second kind of insert that many people use is exemplified by the ``floating keep'' construct of the |-me| macro package. In this case, an illustration or figure is to be kept together and set onto the page at the earliest convenient time. There are three kinds of floating inserts in plain \TeX. The first, |\topinsert|, places its material, which ends with |\endinsert|, at the top of the current page, if possible, otherwise the material will be placed at the top of the next page. For example: \nobreak \begintt \topinsert \centerline{\vbox{ \hbox{$\spadesuit$ A K 8 4} \hbox{$\heartsuit$ K 3 2} \hbox{$\diamondsuit$ 5} \hbox{$\clubsuit$ A K J 9 6} }} \vskip 12pt \centerline{{\bf Figure 1.} Example of a figure} \endinsert \endtt |\topinsert| automatically adds some extra space to separate the caption from the following text. %\topinsert\vskip 3in \topinsert \centerline{\vbox{ \hbox{$\spadesuit$ A K 8 4} \hbox{$\heartsuit$ K 3 2} \hbox{$\diamondsuit$ 5} \hbox{$\clubsuit$ A K J 9 6} }} \vskip 12pt \centerline{{\bf Figure 1.} Example of a figure} \endinsert The second floating insert, |\midinsert| is much more like the |.(z| construct of the |-me| package; it tries to insert the material in place in the middle of the current page. If it succeeds, the material is placed in a vertical box with about 12 points of space above and below. If this can't be done, the effect is that of a |\topinsert|. Finally, the macro |\pageinsert| justifies its material to the size of a full page and places the result on the following page. For example, the following produces a familiar result: \nobreak \begintt \pageinsert \vfil % vertical centering \centerline{This page intentionally left blank} \vfil % vertical centering \endinsert \endtt \pageinsert \vfil % vertical centering \centerline{This page intentionally left blank} \vfil % vertical centering \endinsert \SubSection{Other Keeps} Plain \TeX\ doesn't provide all the macros that one might want to use for keeps, displays, and the like. However, it's fairly easy to tell \TeX\ to try to avoid breaking up a group. Simply set the cryptic parameter |\interlinepenalty=150| within that group, and this will make line breaks within the group into very poor candidates for page breaking. Another strategy is to use the control word |\filbreak|. |\filbreak| causes the remainder of the current page to be filled with vertical glue, {\bf unless} it can be filled with additional text that is itself followed by |\filbreak|. If every paragraph had |\filbreak| after it, every page of a document would have only complete paragraphs on the page. Similarly, while there is no specific ``display'' macro to correspond to the |.(l| macro of |-me| or the |.DS| macro of |-mm|, one can specify |\obeylines| within a group to cause each newline to begin a new paragraph. One might also wish to set |\parindent| to an appropriate value for the lines within the group. You can even have an entire group of centered lines by specifying |\obeylines|, setting |\parindent| to zero, and |\leftskip| and |\rightskip| (i.e. the left and right margins) to be infinitely extensible glue\note{i.e. {\tt \\leftskip=0pt plus 1fil} and {\tt \\rightskip=0pt plus 1fil}}. There may be some prepackaged macro facilities available on your system for doing these sorts of things.