28-May-87 11:17:50-PDT,729;000000000000 Return-Path: Received: from ECLA.USC.EDU by SCORE.STANFORD.EDU with TCP; Thu 28 May 87 11:17:27-PDT Date: Thu 28 May 87 11:22:37-PDT From: Ted Shapin Subject: Two column style To: texhax@SCORE.STANFORD.EDU Phone: (714)961-3393; Mail:Beckman Instruments, Inc. Mail-addr: 2500 Harbor Blvd., X-11, Fullerton CA 92634 Message-ID: <12306026518.16.BEC.SHAPIN@ECLA.USC.EDU> I have modified TUGBOT.STY to switch between one and two columns in the middle of a page using the method outlined in the TeXbook and TUGboat v.6 #1 pg 30. I have produced the files TWO.STY and TWO.DOC. The latter contains examples of some of the less obvious features. Ted Shapin 28-May-87 11:19:44-PDT,30619;000000000000 Return-Path: Date: Thu 28 May 87 11:23:07-PDT From: Ted Shapin Subject: TWO.STY To: texhax@SCORE.STANFORD.EDU Phone: (714)961-3393; Mail:Beckman Instruments, Inc. Mail-addr: 2500 Harbor Blvd., X-11, Fullerton CA 92634 Message-ID: <12306026608.16.BEC.SHAPIN@ECLA.USC.EDU> %TWO.STY from TeXbook and Tugboat V. 6 No. 1 page 30 % Also mostly stolen from TUGBOAT style % One or two columns. Can switch in middle of page and columns % will be balanced. Also uses section headings from Tugboat style. % % \onecol % \twocol % \sectitle This has a box around it< % \sectitle This is a very \cr long title< % \title The Title\\ The Author\endx \message{TWO.STY, May 27, 1987} \catcode`\@=11 % used as in PLAIN in protected control sequences % Stuff different from PLAIN, or reiterated for clarity \def~{\penalty\@M \ } % tie -- this is PLAIN value; it is reset in AMS-TeX \clubpenalty=10000 \widowpenalty=10000 \normallineskiplimit=1pt \newif\ifNoParIndent \NoParIndentfalse \def \NoParIndent{\parindent=0pt \NoParIndenttrue} \newdimen\normalparindent \normalparindent=20pt % plain = 20pt \def \NormalParIndent{\global\parindent=\normalparindent \global\NoParIndentfalse} \NormalParIndent % set up auxiliary `page numbers' % \pageno = \count0 as used in PLAIN \countdef\xcol=1 \xcol=1 \countdef\spoolno=2 \spoolno=1 % some things with the same names as in, or reiterated from, AMS-TeX \def \BlackBoxes{\overfullrule=5pt } \def \NoBlackBoxes{\overfullrule=0pt } \def \document{} % override an AMS-TeX convention \def \linebreak{\unskip\break} \def \newline{\hskip0pt plus\colwd \break} %\let\brk=\linebreak % TeX80 version %\let\lbrk=\newline % TeX80 version \output{\output@} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Page dimensions % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newdimen\pagewidth \newdimen\pagewd \newdimen\pageheight \newdimen\ruleht \newdimen\colwidth \newdimen\bigcolheight \hsize=39pc \vsize=55pc \maxdepth=2.2pt \parindent=3pc \parskip=2pt \pagewidth=\hsize \pagewd=\hsize \pageheight=\vsize \colwidth=18.75pc \bigcolheight=111pc \newdimen\trimlgt \trimlgt=11in \newdimen\headmargin \headmargin=3.5pc \newdimen\pagelgt \newdimen\rheadlgt \rheadlgt=2.5pc % + headmargin = 6pc = 1in \newdimen\toplgt \toplgt=0pt \newdimen\normalcollgt \normalcollgt=54pc % 52pc for 5#2 \newdimen\collgt \collgt=\normalcollgt \newdimen\Collgt \maxdepth=2pt \newdimen\botlgt \botlgt=0pt \newdimen\rfootlgt \rfootlgt=2pc \gdef\newpage{\par\vfill\eject} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % ***** abbreviations ***** % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \careof{\leavevmode\hbox{\raise.75ex\hbox{c}\kern-.15em /\kern-.125em\smash{\lower.3ex\hbox{o}}}} \def \frac#1/#2{\leavevmode\kern.1em \raise.5ex\hbox{\the\scriptfont0 #1}\kern-.1em /\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}} \def \d@sh#1{\nobreak\thinspace#1\penalty0\thinspace} \def \dash{\d@sh{--}} \def \Dash{\d@sh{---}} \def \TeX{\leavevmode\hbox{T\kern-.1667em\lower.424ex\hbox{E}\kern-.125emX}} \def \TUG{\TeX\ \UG} \def \UG{Users Group} \def \TUB{TUGboat} \def \POBox{P.\thinspace O.~Box } % note -- \LaTeX definition is from LATEX.TEX 2.08 of 27 Mar 85, % adapted for additional flexibility in TUGboat \def \LaTeX{\leavevmode L\kern-.36em\raise.3ex\hbox{\smc a}\kern-.15em\TeX} % note -- the `official' \MF uses \font\logo=manfnt, which is not % in general distribution (to prevent unauthorized % reproduction of the TeXbook) \let\logo=\tenssb % replace by manfnt if that is available \def \MF{{\logo META}\-{\logo FONT}} \def \mf{{\smc Metafont}} \def \Pas{Pascal} \def \UNIX{{\smc unix}} \def \VAX{\leavevmode\hbox{V\kern-.12em A\kern-.1em X}} \def \WEB{{\tt WEB}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % ***** utility registers and definitions ***** % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % test registers for transient use; paired - internal/external \newbox\T@stBox \newbox\TestBox \newcount\T@stCount \newcount\TestCount \newdimen\T@stDimen \newdimen\TestDimen % \cs existence test, stolen from TeXbook exercise 7.7 \def \ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax } % Smashes repeated from AMS-TeX; PLAIN implements only full \smash . \newif\iftop@ \newif\ifbot@ \def\topsmash{\top@true\bot@false\smash@} \def\botsmash{\top@false\bot@true\smash@} \def\smash{\top@true\bot@true\smash@} \def\smash@{\relax\ifmmode\def\next{\mathpalette\mathsm@sh}% \else\let\next\makesm@sh\fi \next } \def\finsm@sh{\iftop@\ht\z@\z@\fi\ifbot@\dp\z@\z@\fi\box\z@} % Vertical `laps'; cf. \llap and \rlap \def\ulap#1{\vbox to \z@{\vss#1}} \def\dlap#1{\vbox to \z@{#1\vss}} % And a horizontal `lap' that takes up no space on either side. \def\zlap#1{\hbox to \z@{\hss#1\hss}} % Avoid unwanted vertical glue when making up pages. %\def \basezero{\baselineskip\z@ \lineskip\z@} Use \offinterlineskip %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % ***** fonts and friends ***** % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Struts give ascenders and descenders to assist in baseline alignment % (e.g. of adjoining vertical boxes); useful only with text fonts. % % \strut is defined in PLAIN . The structure of \strutt is equivalent. \newbox\struttbox \def\strutt{\relax\ifmmode\copy\struttbox\else\unhcopy\struttbox\fi} % Struts are given the following dimensions for use in TUGboat: % % \strut = height/depth of parenthesis in current font % (not the same as PLAIN) % \strutt height + depth = \normalbaselineskip, % height = same as \strut % (equivalent to PLAIN \strut ) % The fonts below are sufficient for most ordinary TUGboat production. % Additional titling fonts are defined elsewhere, and occasionally an % extra font will be needed for a particular item (e.g. the device % charts) and defined in that file. % fonts preloaded but not named in PLAIN \font\ninerm=amr9 \font\eightrm=amr8 \font\sixrm=amr6 \font\ninei=ammi9 \skewchar\ninei='177 \font\eighti=ammi8 \skewchar\eighti='177 \font\sixi=ammi6 \skewchar\sixi='177 \font\ninesy=amsy9 \skewchar\ninesy='60 \font\eightsy=amsy8 \skewchar\eightsy='60 \font\sixsy=amsy6 \skewchar\sixsy='60 \font\ninebf=ambx9 \font\eightbf=ambx8 \font\sixbf=ambx6 \font\ninesl=amsl9 \font\eightsl=amsl8 \font\nineit=amti9 \font\eightit=amti8 \font\sevenit=amti7 \font\ninett=amtt9 \font\eighttt=amtt8 \font \tenupit=amu10 \def \mit{\fam\@ne} \def \cal{\fam\tw@} \def \sy{\cal} % old name % fonts added at AMS % \font\eightex=amex8 % \newfam\cyrfam % uncomment if needed % \font\tencyr=mcyr10 % \font\ninemcyr=mcyr9 % \font\eightcyr=mcyr8 % \font\sixcyr=mcyr6 \font\tensmc=amcsc10 %\font\ninesmc=amcsc9 % when available \let\ninesmc=\tensmc % temporary expedient %\font\eightsmc=amcsc8 \let\eightsmc=\tensmc % temporary expedient %\font \sixteenssb=amssbx16 %\font \sixteenssb=amssbx10 scaled \magstep3 % for distribution \font \sixteenssb=amr10 scaled \magstep3 % Ted's substitution %\font \twelvessb=amssbx12 \font \twelvessb=amssbx10 scaled \magstep1 % for distribution \font \tenssb=amssbx10 %\font \eightssb=amssbx8 %\font \seventphon=tphon7 % used in macro index and device list \def \titlefont{\def\smc{\eightssb}\sixteenssb\baselineskip=16pt } % Allow text to be a bit stretchier than the built-in setting; % TeXbook, page 433, 355 \newdimen\normaltenptstretch \normaltenptstretch=1.6667pt \newdimen\extratenptstretch \extratenptstretch=4pt \def\NormalTenPointSpacing{\fontdimen3\tenrm=\normaltenptstretch \fontdimen3\tenit=\normaltenptstretch} \def\StretchyTenPointSpacing{\fontdimen3\tenrm=\extratenptstretch \fontdimen3\tenit=\extratenptstretch} \def \AddToTenPoint{} % permit external additions to font \def \tenpoint{\normalbaselineskip=12pt % \def\pointsize@AmS{t} \abovedisplayskip=3pt plus 3pt minus 1pt \belowdisplayskip=3pt plus 3pt minus 1pt \abovedisplayshortskip=0pt plus 3pt \belowdisplayshortskip=1pt plus 3pt minus 1pt \def\rm{\fam\z@\tenrm}% \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm \def\oldstyle{\fam\@ne\teni}% \textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei \textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex \def\it{\fam\itfam\tenit}% \textfont\itfam=\tenit \def\sl{\fam\slfam\tensl}% \textfont\slfam=\tensl \def\bf{\fam\bffam\tenbf}% \textfont\bffam=\tenbf \scriptfont\bffam=\eightbf \scriptscriptfont\bffam=\sixbf % \def\cyr{\fam\cyrfam\tencyr}% % \textfont\cyrfam=\tencyr \scriptfont\cyrfam=\eightcyr % \scriptscriptfont\cyrfam=\sixcyr \def\smc{\tensmc}% \def\tt{\tentt}% \def\upright{\tenupit}% \setbox\strutbox=\hbox{\vrule height7.5pt depth2.5pt width\z@}% \setbox\struttbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}% \normalbaselines \AddToTenPoint \rm } \tenpoint % initialize -- default font \newdimen\normalnineptstretch \normalnineptstretch=1.5pt \newdimen\extranineptstretch \extranineptstretch=3.6pt \def\NormalNinePointSpacing{\fontdimen3\ninerm=\normalnineptstretch} \def\StretchyNinePointSpacing{\fontdimen3\ninerm=\extranineptstretch} \def \AddToNinePoint{} \def \ninepoint{\normalbaselineskip=11pt \abovedisplayskip=2.5pt plus 2.5pt minus 1pt \belowdisplayskip=2.5pt plus 2.5pt minus 1pt \abovedisplayshortskip=0pt plus 2.5pt \belowdisplayshortskip=1pt plus 2.5pt minus 1pt \def\rm{\fam\z@\ninerm}% \textfont0=\ninerm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm \def\oldstyle{\fam\@ne\ninei}% \textfont1=\ninei \scriptfont1=\seveni \scriptscriptfont1=\fivei \textfont2=\ninesy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy \def\it{\fam\itfam\nineit}% \textfont\itfam=\nineit \def\sl{\fam\slfam\ninesl}% \textfont\slfam=\ninesl \def\bf{\fam\bffam\ninebf}% \textfont\bffam=\ninebf \scriptfont\bffam=\sevenbf \scriptscriptfont\bffam=\sixbf % \def\cyr{\fam\cyrfam\ninmcyr}% % \textfont\cyrfam=\ninmcyr \scriptfont\cyrfam=\sixcyr % \scriptscriptfont\cyrfam=\sixcyr \def\smc{\ninesmc}% \def\tt{\ninett}% \setbox\strutbox=\hbox{\vrule height 6.75pt depth 2.25pt width\z@}% \setbox\struttbox=\hbox{\vrule height 7.25pt depth 2.75pt width\z@}% \normalbaselines \AddToNinePoint \rm } % this is equivalent to baselineskip = 10pt % \setbox\struttbox=\hbox{\vrule height 7.75pt depth 3.25pt width\z@}% \newdimen\normaleightptstretch \normaleightptstretch=1.333pt \newdimen\extraeightptstretch \extraeightptstretch=3pt \def\NormalEightPointSpacing{\fontdimen3\eightrm=\normaleightptstretch} \def\StretchyEightPointSpacing{\fontdimen3\eightrm=\extraeightptstretch} \def \AddToEightPoint{} \def \eightpoint{\normalbaselineskip=10pt \abovedisplayskip=2pt plus 2pt minus 1pt \belowdisplayskip=2pt plus 2pt minus 1pt \abovedisplayshortskip=0pt plus 2pt \belowdisplayshortskip=1pt plus 2pt minus 1pt \def\rm{\fam\z@\eightrm}% \textfont0=\eightrm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm \def\oldstyle{\fam\@ne\eighti}% \textfont1=\eighti \scriptfont1=\sixi \scriptscriptfont1=\fivei \textfont2=\eightsy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy % \textfont3=\eightex \scriptfont3=\eightex \scriptscriptfont3=\eightex \def\it{\fam\itfam\eightit}% \textfont\itfam=\eightit \def\sl{\fam\slfam\eightsl}% \textfont\slfam=\eightsl \def\bf{\fam\bffam\eightbf}% \textfont\bffam=\eightbf \scriptfont\bffam=\sixbf \scriptscriptfont\bffam=\sixbf % \def\cyr{\fam\cyrfam\eightcyr}% % \textfont\cyrfam=\eightcyr \scriptfont\cyrfam=\sixcyr % \scriptscriptfont\cyrfam=\sixcyr \def\smc{\eightsmc}% \def\tt{\eighttt}% \setbox\strutbox=\hbox{\vrule height 6pt depth 2pt width\z@}% \setbox\struttbox=\hbox{\vrule height 7pt depth 3pt width\z@}% \normalbaselines \AddToEightPoint \rm } % this is equivalent to baselineskip = 9pt % \setbox\struttbox=\hbox{\vrule height 6.5pt depth 2.5pt width\z@}% % PLAIN's definition of \raggedright doesn't permit any stretch, and % results in too many overfull boxes. Change. \newdimen\raggedskip \raggedskip=\z@ \newdimen\raggedstretch \raggedstretch=5em \newskip\raggedparfill \raggedparfill=\z@ plus 1fil \def \raggedspaces{\spaceskip=.3333em \xspaceskip=.5em } % Some applications may have to add stretch, in order to avoid % all overfull boxes. \def \raggedright{\rightskip=\raggedskip plus\raggedstretch \raggedspaces \parfillskip=\raggedparfill } \def \raggedleft{\leftskip=\raggedskip plus\raggedstretch \raggedspaces \parfillskip=\z@ } \def \raggedcenter{\leftskip=\raggedskip plus\raggedstretch \rightskip=\leftskip \raggedspaces \parindent=\z@ \parfillskip=\z@ } \def \normalspaces{\spaceskip=.3333em plus.1667em minus.1111em \xspaceskip=.4444em plus.5em minus.037em } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % ***** Section titles and separators ***** % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newskip\Tabskss \Tabskss=0pt plus 1000pt minus 1000pt \newskip\AboveTitleSkip \AboveTitleSkip=12pt % 10pt plus 2pt minus 2pt \newskip\BelowTitleSkip \BelowTitleSkip=8pt % plus 1pt minus 1pt \setbox\T@stBox=\hbox{\titlefont O} \newdimen\stfontheight \stfontheight=\ht\T@stBox \newdimen\strulethickness \strulethickness=.6pt \newcount\n@stnum \n@stnum=0 \def \sthrule{\hrule height\strulethickness depth 0pt } \def \stvrule{\vrule height 1.4\stfontheight depth.4\stfontheight width\strulethickness } \def \sectitlebox #1<{\vbox{\sthrule \hbox to \hsize{\stvrule\hfil #1\hfil\vrule width\strulethickness }% \sthrule }} \def \secsep{\vskip 3\baselineskip} \newif\ifSecTitle \SecTitlefalse \def \sectitle #1<{\par \SecTitletrue \penalty-1000\secsep \n@stnum=0 {\def\\{ }\setbox\T@stBox=\hbox{\titlefont#1}% \ifdim\wd\T@stBox < \hsize \def\result{\unhbox\T@stBox}% \else \def\\{\cr\noalign{\global\advance\n@stnum by 1 }}% \setbox\T@stBox=\vbox{\titlefont \halign{\hfil##\hfil\cr#1\crcr}}% \def\result{\vbox{\unvbox\T@stBox}}\fi \ifnum\n@stnum=1 \def\stvrule{\vrule height 3.5\stfontheight depth\stfontheight width\strulethickness }\fi \centerline{\sectitlebox \titlefont\result<}}% \nobreak \vskip\baselineskip } \def \littlesep{\vskip 3pt plus 1pt minus 1pt \centerline{\hbox to 90pt{\ignorespaces \leaders\hbox to 10pt{\hfil .\hfil}\hfill} }% \vskip 3pt plus 1pt minus 1pt} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % Titles, authors, subtitles, and first-paragraph formatting % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif\ifFirstPar \FirstParfalse % make the first paragraph after a title start flush left, % then reset \parindent; but if all paragraphs should start % flush left, then don't reset. \everypar{\ifNoParIndent \else \ifFirstPar \NormalParIndent \FirstParfalse \fi \fi } % For uppercasing title and author; from AMSPPT.STY, version 0 \def\uctext@#1{\uppercase@#1\gdef\uppercase@@{}$\m@th$} \def\uppercase@#1$#2${\gdef\uppercase@@{\uppercase@}\uppercase {#1}${#2}$\uppercase@@} \newif\ifCtrTitle \CtrTitlefalse \def \TitleUC{} % ordinary titles uc/lc \def \titleframe #1#2#3{\ifSecTitle \SecTitlefalse \else \vskip\AboveTitleSkip \fi \ifCtrTitle \def\CTSkip{\unskip\hfil}\CtrTitlefalse \else \def\CTSkip{}\fi \vbox{#1\halign{\hbox to \hsize {\bf\TitleUC{\CTSkip\ignorespaces##\unskip\hfil}}\strutt\cr #2\crcr}}% \let\oldcr=\cr\def\cr{}% \setbox\T@stBox=\hbox{#3}% \let\cr=\oldcr \ifdim \wd\T@stBox < 5pt % omit if author is null \else \nobreak \vskip 4pt % 4pt + \BelowTitleSkip = \baselineskip \vbox{\halign{\hbox to \hsize {\hskip\parindent\CTSkip\ignorespaces##\hfil}\cr #3\crcr}}\fi \setbox\T@stBox=\hbox{}% \nobreak \vskip\BelowTitleSkip \global\parindent=0pt \global\FirstPartrue } \def \title #1\\#2\endx{\titleframe{}{#1}{#2}} \def \Title #1\\#2\endx{\titleframe{\def\TitleUC{\uctext@}}{#1}{#2}} \def \ctrtitle #1\\#2\endx{\CtrTitletrue\titleframe{}{#1}{#2}} \def \ctrTitle #1\\#2\endx{\CtrTitletrue \titleframe{\def\TitleUC{\uctext@}}{#1}{#2}} % \subtitle and \subsubtitle are used in the announcements box \def \subtitle #1\endx{{\CtrTitletrue \ifFirstPar \AboveTitleSkip=0pt \fi % \AboveTitleSkip=10pt \titleframe{}{#1}{}}} \def \subsubtitle #1\endx{{\CtrTitletrue \ifFirstPar \AboveTitleSkip=0pt \fi % \AboveTitleSkip=10pt \titleframe{}{\sl#1}{}}} % \section was first defined for Jacques Desarmenien's article in 5#2 \def \section #1 #2\par{\ifFirstPar \nobreak \else \penalty-200 \vskip 8pt \fi \noindent{\bf\hbox to \normalparindent{#1\hfil}#2}\endgraf \nobreak \vskip 4pt \parindent=0pt \FirstPartrue } % This is based on \beginsection in PLAIN and \section above. \outer\def\beginsection#1\par{\ifFirstPar \nobreak \else \vskip\z@ plus 6\baselineskip \penalty-250 \vskip\z@ plus-6\baselineskip \vskip 8pt \vskip\parskip \fi \message{#1}\leftline{\bf#1}\nobreak \vskip 4pt \parindent=0pt \FirstPartrue } % Define address blocks and other structures that use \obeylines % in the context \tag ...< % This requires that < be active, so that \obeylines is invoked % at the outer level. \tag{...} will not deliver the data with % ^M (carriage return) intact, so is not a suitable format for % any construction using \obeylines; the reference (if any) in % The TeXbook has not been found, and this information has been % determined empirically, referring to \obeylines constructions % in PLAIN and MANMAC.TeX (The TeXbook macros). {\catcode`\<=\active \obeylines \gdef\AddrFrame#1#2{\endgraf\def\Phone{\leavevmode\kern\parindent}#1% \catcode`\<=\active % % next line intentionally ends with % \def<{ \egroup\catcode`\<=12 #2 }\bgroup \obeylines }% \gdef\LetterAddr{\AddrFrame{\smallskip}{}}% \gdef\TextAddr{\AddrFrame{}{}}% \gdef\Submitted{\AddrFrame{\nobreak\smallskip \parindent=2\normalparindent % \def\Signed{\parfillskip=\normalparindent \qquad\hfil }}{}}% \gdef\Columnist{\AddrFrame{\FirstParfalse % \def\NetAddr{\smallskip \indent\indent }% \def\Phone{\NetAddr }}% {\nobreak \vskip\BelowTitleSkip % \global\parindent=0pt \global\FirstPartrue }\sl }% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Support verbatim listing of TeX source, as defined in TeXbook, p. 421; % lifted from MANMAC.TEX, and modified slightly for narrower columns. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chardef\other=12 \def\ttverbatim{\begingroup \catcode`\\=\other \catcode`\{=\other \catcode`\}=\other \catcode`\$=\other \catcode`\&=\other \catcode`\#=\other \catcode`\%=\other \catcode`\~=\other \catcode`\_=\other \catcode`\^=\other \obeyspaces \obeylines \tt} \newdimen\ttrightskip \ttrightskip=5pc %\outer\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=\z@ \outer\def\begintt{$$\def\par{\leavevmode\null\endgraf}\ttverbatim \parskip=\z@ \catcode`\|=0 \rightskip=-\ttrightskip \ttfinish} {\catcode`\|=0 |catcode`|\=\other % | is temporary escape character |obeylines % end of line is active |gdef|ttfinish#1^^M#2\endtt{#1|vbox{#2}|endgroup$$}} \catcode`\|=\active {\obeylines \gdef|{\ttverbatim \spaceskip\ttglue \let^^M=\ \let|=\endgroup}} \newskip\ttglue {\tenpoint\tt \global\ttglue=.5em plus .25em minus .15em} % this should be installed in each font % From David Eppstein's ``Trees'' paper (6#1), preserve initial spaces. {\obeyspaces\gdef {\ifvmode\indent\fi\space}} \chardef\bs='134 % for \tt mode % Permit math to be embedded within \begintt...\endtt . \def\MTH{$} \def\sb{_} \def\sp{^} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % ***** headers/footers ***** % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\masthead{} % masthead should be used with \OmitHeadtrue % to omit the running head on that page \def\rhead{} % Running Head \def \rtitle{\hbox to \pagewd{\tenrm% \ifodd\pageno \rhead\hfil\number\pageno \else \number\pageno\hfil\rhead \fi }} \def \dohead{\ifOmitHead \global\OmitHeadfalse % \vbox to \rheadlgt{} \else \vbox to \rheadlgt{\topskip=1pc \rtitle \vfil } \fi} \def \runfoot{\vbox to \rfootlgt{\topskip=1.5pc \ifnum\xcol=2 \hbox to \pagewd{\midrtitle\hfil\midrtitle}\fi \vfil }} \def \firsthead{} \newbox\firsth@@d \newbox\firsth@ad \long\def \setfirsthead #1{\ThisIsFirstPagetrue \ifdim \toplgt=\z@ \global\setbox\firsth@ad=\vbox{\hsize=\pagewd #1}% % assume that \firsth@ad ends with glue, hence no \dp \global\toplgt=\ht\firsth@ad \resetpagelgt \else \global\setbox\firsth@ad=\vbox to \toplgt{\hsize=\pagewd #1}% \fi \global\setbox\firsth@@d=\vbox to \toplgt{\vfil}% \gdef\firsthead{\ifnum \xcol=2 \box\firsth@ad \else \copy\firsth@@d \fi }} \def \firstfoot{} \newbox\firstf@@t \newbox\firstf@ot \long\def \setfirstfoot #1{\ThisIsFirstPagetrue \ifdim \botlgt=\z@ \global\setbox\firstf@ot=\vbox{\hsize=\pagewd #1}% \botlgt=\ht\firstf@ot \global\advance\botlgt by \dp\firstf@ot \resetpagelgt \else \global\setbox\firstf@ot=\vbox to \botlgt{\hsize=\pagewd #1}% \fi \global\setbox\firstf@@t=\vbox to \botlgt{\vfil}% \gdef\firstfoot{\ifnum \xcol=2 \copy\firstf@ot \else \copy\firstf@@t \fi }} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % ***** output ***** % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ruleht=.5pt \newinsert\margin \dimen\margin=\maxdimen % no limit on number of marginal notes \count\margin=0 \skip\margin=0pt % marginal inserts take up no space \newif\ifOmitHead \global\OmitHeadfalse % for page without running head \newif\ifTwoCol \global\TwoColfalse % flag if in twocol \def\onepageout#1{\shipout\vbox{ % here we define one page of output \hrule height\z@ depth \z@ width \p@ \vskip - \rheadlgt \offinterlineskip % butt the boxes together \dohead \vbox to \pageheight{ \ifvoid\margin\else % marginal info is present \rlap{\kern31pc\vbox to 0pt{\kern4pt\box\margin \vss}}\fi #1 % now insert the main information \ifvoid\footins\else % footnote info is present \vskip\skip\footins \kern-3pt \hrule height\ruleht width\pagewidth \kern-\ruleht \kern3pt \unvbox\footins\fi \boxmaxdepth=\maxdepth}} \advancepageno} \def\setcornerrules{\hbox to \pagewidth{% for camera alignment \vrule width 1pc height\ruleht \hfil \vrule width 1pc} \hbox to \pagewidth{llap{\sevenrm(page \folio)\kern1pc}% \vrule height1pc width\ruleht depth0pt \hfil \vrule width\ruleht depth0pt}} \output{\onepageout{\unvbox255}} \newbox\partialpage \newdimen\savesize \def\twocol{\ifTwoCol \errmessage{Already in two columns}\else \begingroup \savesize=\vsize \output={\global\setbox\partialpage=\vbox{\unvbox255}}\eject \output={\doublecolumnout} \hsize=\colwidth \vsize=\bigcolheight \advance\vsize by -2\ht\partialpage \TwoColtrue\fi} \def\onecol{\ifTwoCol \output={\balancecolumns}\eject \global\output={\onepageout{\unvbox255}} \global\vsize=\savesize \endgroup \pagegoal=\vsize \TwoColfalse \else\errmessage{Already in one column}\fi} \def\doublecolumnout{\dimen0=\pageheight \advance\dimen0 by-\ht\partialpage \splittopskip=\topskip \setbox0=\vsplit255 to\dimen0 \setbox2=\vsplit255 to\dimen0 \onepageout\pagesofar \global\vsize=\bigcolheight \unvbox255 \penalty\outputpenalty} \def\pagesofar{\unvbox\partialpage \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}} \def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen0=\ht0 \advance\dimen0 by\topskip \advance\dimen0 by -\baselineskip \divide\dimen0 by2 \splittopskip=\topskip {\vbadness=10000 \loop \global\setbox3=\copy0 \global\setbox1=\vsplit3 to \dimen0 \ifdim\ht3>\dimen0 \global\advance\dimen0 by1pt \repeat} \setbox0=\vbox to \dimen0{\unvbox1} \setbox2=\vbox to \dimen0{\unvbox3} \global\output={\balancingerror} \pagesofar} \newhelp\balerrhelp{Please change the page into one that works.} \def\balancingerror{\errhelp=\balerrhelp \errmessage{Page can't be balanced} \onepageout{\unvbox255}} \newcount\issueseqno \issueseqno=-1 % Write out (both to a file and to the log) the starting page number % of an article, to be used for cross references and in contents. % \pagexref is used for articles fully processed in the TUGboat run. % \PageXref is used for "extra" pages, where an item is submitted % as camera copy, and only running heads (at most) are run. \def \pagexref#1{\ifFirstPar \nobreak \fi % don't clobber switch by accident \write-1{\def\expandafter\noexpand\csname#1\endcsname{\number\pageno}}% \write1{\def\expandafter\noexpand\csname#1\endcsname{\number\pageno}}% \ifFirstPar \nobreak \fi } % and don't allow page break \def \PageXref#1{% \immediate\write-1{\def\expandafter \noexpand\csname#1\endcsname{\number\pageno}}% \immediate\write1{\def\expandafter \noexpand\csname#1\endcsname{\number\pageno}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % INRS tables.tex from TUG % % Can be added to this style at this point % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \catcode`\@=12 % used as in PLAIN in protected control sequences 28-May-87 11:19:53-PDT,6612;000000000000 Return-Path: Received: from ECLA.USC.EDU by SCORE.STANFORD.EDU with TCP; Thu 28 May 87 11:19:35-PDT Date: Thu 28 May 87 11:23:31-PDT From: Ted Shapin Subject: TWO.DOC To: texhax@SCORE.STANFORD.EDU Phone: (714)961-3393; Mail:Beckman Instruments, Inc. Mail-addr: 2500 Harbor Blvd., X-11, Fullerton CA 92634 Message-ID: <12306026680.16.BEC.SHAPIN@ECLA.USC.EDU> \input two.sty % two columns style %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % Define the masthead % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\issueno{1} % Change these each issue \def\issdt{June 1987} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \font\lfont=school36 % used for masthead large \def\masthead{\vbox to 1in {\hbox to \pagewd{\lfont TWO COLUMN STYLE\hfil} \bigskip \hrule height.4pt width \pagewd \smallskip {\hbox to \pagewd{\bf Ted Shapin \hfil Beckman Instruments, Inc.}} \smallskip \hrule height.4pt width \pagewd \bigskip}} \def\rhead{TWO.STY,\ \issdt.} % the running head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NoBlackBoxes % Omit overfull black marks \StretchyTenPointSpacing \StretchyNinePointSpacing \StretchyEightPointSpacing \openout1=pages \pageno=1 \def \Input #1{\input /md/#1} \def\ldr{\leaders\hbox to 1em{\hss.\hss}\hfill} \OmitHeadtrue % Use our own masthead on first page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Copy starts here: % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \masthead \twocol \sectitle ANCESTRY< \title Where It Comes From\\Ted Shapin\endx TWO.STY is a modification of TUGBOT.STY that allows switching from one column to two columns and back in the middle of a page. It uses the method described in the \TeX book as modified in Tugboat v.~6, no.~1, page 30. \subtitle This Is A Very Long Subtitle\cr So We'll Put It On Two Lines\endx The macros I added are called $\backslash$twocol to change to two columns and $\backslash$onecol to change to one column. I added a test that will print an error message if you try to change to a mode you are already in. I also made some minor changes to TUGBOT.STY. I made the box around the section titles a little shorter, and reduced the skip before them to 3 lines. I let the masthead be defined and called as regular text outside of the style. \onecol \title TUGBOT Style\\\endx Here are some comments from Barbara Beeton on the original TUGBOT.STY which will help you use some of the features [all the changes are my own fault]: \begintt Paragraphs don't flush left after \sectitle, only after \title . \title ia a 2-parter -- \title #1\\#2[author]\endx . Multi-line title and author parts are split by \cr ; this is probably a bit weird, but it's an artifact of an earlier version that used \halign . Because the article on pages 104 ff. of tb 7#2 seems to have the sorts of things you're looking for, I've stripped it down to contain one each of the interesting stuff, and here are the remains: %tb15pfeffer.tex \title The Sperry~IT: An IBM AT~Compatible \\M.~Pfeffer and A.~Hoenig \endx \pagexref{pfeffer} The high speed of the Sperry IT makes \TeX ing and previewing comfortable\Dash far more comfortable than on a PC-class machine. ..., costs about \$3,400.% \footnote{}{\copyright 1986 M.~Pfeffer.\strutt} \footnote{}{Date submitted: May 21, 1986.} \medskip \noindent{\bf The System unit:} Because \TeX\ is a computation-intensive program, ... \endtt \newpage \begintt For comparison, a 6$\,$MHz AT is two to three times faster than a 4.77$\,$MHz PC; an 8$\,$MHz AT is 33\% faster than a 6$\,$MHz AT, while the Sperry, at 7.16$\,$MHz, is 45\% faster than a 6$\,$MHz AT\null. \smallskip When using the Textset Preview program, the bottle-neck is disk access. ... ... Technical reference manuals are available. {\sl Important\/}: Sperry currently ships the IT with either a 44\thinspace Mb drive made by Miniscribe, ... Sperry's corporate personnel proved to be conscientious and responsive. \beginsection Peripherals The following recommendations on peripherals apply to other AT- and PC-class computers, including the ACS computer I discussed in volume~6, number~3. \smallskip \noindent{\bf Display:} The most comfortable display I've used to date is the Panasonic TR-122MYP. ... \endtt \twocol \title The Sperry~IT: An IBM AT~Compatible \\M.~Pfeffer and A.~Hoenig \endx \pagexref{pfeffer} The high speed of the Sperry IT makes \TeX ing and previewing comfortable\Dash far more comfortable than on a PC-class machine. ..., costs about \$3,400.% \footnote{}{\copyright 1986 M.~Pfeffer.\strutt} \footnote{}{Date submitted: May 21, 1986.} \medskip \noindent{\bf The System unit:} Because \TeX\ is a computation-intensive program, ... For comparison, a 6$\,$MHz AT is two to three times faster than a 4.77$\,$MHz PC; an 8$\,$MHz AT is 33\% faster than a 6$\,$MHz AT, while the Sperry, at 7.16$\,$MHz, is 45\% faster than a 6$\,$MHz AT\null. \smallskip When using the Textset Preview program, the bottle-neck is disk access. ... ... Technical reference manuals are available. {\sl Important\/}: Sperry currently ships the IT with either a 44\thinspace Mb drive made by Miniscribe, ... Sperry's corporate personnel proved to be conscientious and responsive. \beginsection Peripherals The following recommendations on peripherals apply to other AT- and PC-class computers, including the ACS computer I discussed in volume~6, number~3. \smallskip \noindent{\bf Display:} The most comfortable display I've used to date is the Panasonic TR-122MYP. ... \smallskip \noindent{\bf Display Adapter:} Low-cost Hercules-compatible video cards use slow chips, ... \littlesep \title INRS\TeX\\\endx The INRS\TeX\ table making macros work very well with this style. They are available for \$40 from TUG. \onecol \bye -------