summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/plain/tugboat/tugproc.sty
blob: 56361b54664c7f17604b9fdd95957af58e5b4b2d (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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
%% @texfile{
%%     filename="tugproc.sty",
%%     version="1.11",
%%     date="26-Jan-1994",
%%     filetype="TeX macros for TUG Proceedings",
%%     copyright="Copyright (C) TeX Users Group.
%%            Copying of this file is authorized only if either:
%%            (1) you make absolutely no changes to your copy, OR
%%            (2) if you do make changes, you first rename it to some
%%                other name.",
%%     author="TeX Users Group",
%%     address="TeX Users Group",
%%            P. O. Box 869,
%%            Santa Barbara, CA 93102-0869,
%%            USA",
%%     telephone="805-963-8358",
%%     email="Internet: tug@tug.org or TUGboat@Math.AMS.org",
%%     codetable="ISO/ASCII",
%%     checksumtype="line count",
%%     checksum="366",
%%     keywords="tex users group, tugboat, proceedings, plain tex",
%%     abstract="This file contains the plain-based macros
%%            for Proceedings issues of TUGboat, the
%%            Communications of the TeX Users Group."
%%     }
%% *********************************************************
%%
%%  Use of this file also requires the following files:
%%      TUGBOAT.STY (version 1.09+)
%%      TUGBOAT.CMN (version 1.08+) (loaded by TUGBOAT.STY)
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\fileversion{v1.11}
\def\filedate{26 Jan 94}

\message{File `TUGPROC.STY' \fileversion \space\space <\filedate>}

% initialize year/issue-specific elements for standalone use
\def\mtgyear{1994}
\def\volyr{1994}
\def\volno{15}
\def\issno{3}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\input tugboat.sty

\savecat\@ \makeletter\@
\ifx\tugprocloaded@\undefined \let\tugprocloaded@\end
\else \restorecat\@ \xdef\startingpage{\number\pageno}\endinput \fi

\newdimen\tubpagelgt
\tubpagelgt=\pagelgt \advance\tubpagelgt 1pc  % for running feet

% fonts

\font\twelverm=cmr10 scaled 1200
\font\twelvebf=cmbx10 scaled 1200	
\font\fourteenrm=cmr10 scaled 1440
\font\fourteenit=cmti10 scaled 1440
\font\fourteensl=cmsl10 scaled 1440

\def\twelvepoint{%
  \normalbaselineskip=14pt
  \def\rm{\fam\z@\twelverm}%
  \textfont\z@=\twelverm
  \def\bf{\fam\bffam\twelvebf}%
  \textfont\bffam=\twelvebf 
  \normalbaselines \rm}

\def\fourteenpoint{%
  \normalbaselineskip=18pt
  \def\rm{\fam\z@\fourteenrm}%
  \textfont\z@=\fourteenrm
  \def\it{\fam\itfam\fourteenit}%
  \textfont\itfam=\fourteenit
  \def\sl{\fam\slfam\fourteensl}%
  \textfont\slfam=\fourteensl
  \normalbaselines \rm}

\def\AUTHORfont{\twelvepoint\rm}
\def\HEADfont{\twelvepoint\bf}
\def\TITLEfont{\fourteenpoint\rm}
\def\addressfont{\ninepoint\rm}
\def\netaddrfont{\ninepoint\tt}

\def\br{\unskip\hfil\break}		% version for titles
\def\degrade{\def\br{\unskip\space\ignorespaces}%
             \let\\\br} % in running heads.

% running heads & feet
%\newcount\startingpage % Number of first page of article
\newif\ifpreprint  \preprinttrue
\def\preprint{\preprinttrue
   \ifExtrAbs\breaklines\fi}       % (*)
\newif\ifproof \prooffalse \let\filename\relax
\def\Proof{\prooftrue\immediate\write16{File name?}
   \immediate\read16 to\filename}
\def\stamp{\ifproof{\tt \filename}\quad\Now\else\space\fi}
\let\midrtitle=\null
\def\rtitlex{%
   \ifodd\pageno\degrade\rhtitle\else\rhauthor\fi}
\def\rtitle{%
   \hbox to \pagewd{%
      \tenpoint
      \makestrut[10pt;\z@]%
      \ifnum\the\pageno=\startingpage\hfill\stamp\else
      \ifodd\pageno
         \stamp\hfill\rtitlex
      \else
         \rtitlex\hfill\stamp
      \fi\fi
      }%
   }      

\ifx\startingpage\undefined \def\startingpage{1001}\fi
\pageno=\startingpage
\def\rfoot{%
   \hbox to \pagewd{%
      \tenpoint
      \makestrut[\z@;0.5pc]%
      \ifpreprint
         \ifodd\pageno
            \pfoottext\hfil\Now\hfil$^.$\number\pageno
         \else
            \number\pageno$^.$\hfil\Now\hfil\pfoottext
         \fi
      \else
         \ifodd\pageno
            \rfoottext\hfil\number\pageno
         \else
            \number\pageno\hfil\rfoottext
         \fi
      \fi
      }%
   }

\v@lx				% normalize publication info for footer
\def\pfoottext{{\smc Preprint}: \mtgyear{} \TUG{} Annual Meeting}
\def\rfoottext{\tenrm\TUB, \volx\Dash 
   {Proceedings of the \volyr{} Annual Meeting}}

% midpage redone to align running feet.
\def\midpage#1{%
  \vbox{
    \basezero
    \hrule height\z@ depth\z@ width\p@
    \ifTrimmarks
      \vskip-1in                % default offset for laser printers
                                % this puts top trim at edge of paper
      \vbox to \trimlgt \bgroup
      \topregister
      \vskip \headmargin
    \else
      \vskip-\rheadlgt           % this puts runhead above default offset
    \fi
    \dlap{\vbox to\tubpagelgt{\vfil
        \ifnum\xcol=\numcols \runfoot \else \vbox to \rfootlgt{}\fi}}
    \vbox to \pagelgt{
      \ifnum\xcol=\numcols \runhead \else \vbox to \rheadlgt{}\fi
      \ifThisIsFirstPage \firsthead \fi
      \hbox to \pagewd{#1}       % \vsize applied in \pagebody
      \ifThisIsFirstPage \firstfoot \fi
      \vfil                      % if no depth, avoid underfull box
%      \ifnum\xcol=\numcols \runfoot \else \vbox to \rfootlgt{}\fi
      }
    \ifTrimmarks \vfill \botregister \egroup \fi
    }}

% ***************************************************
% Bibliography
\def\Hang{1em} 
\def\entry #1{\noindent\frenchspacing\hangindent\Hang #1}

% Appendix
\def\appendix #1\endappendix{\newpage\onecol\centerline{\HEADfont #1}}

% Box for deadlines:
\newbox\textbox		% \twocolcolwd=18.75pc [cf. tugboat.sty]
\long\def\boxit #1{\vbox{\hrule\hbox{\vrule\kern3pt
   \vbox{\kern3pt\vskip 4pt#1\vskip 4pt\kern3pt}\kern3pt\vrule}\hrule}}
\long\def\boxedlist #1{$$\boxit{\setbox\textbox=\vbox{\hsize 18pc
   \strut{#1}\strut}\box\textbox}$$}  % TeXbook, 94 & 223 (exer 21.3)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% top matter
\def\endtitle{%
  \global\toks@=\expandafter{\the\@argument}%
  \endgroup
  \edef\thetitle{\ignorespaces\the\toks@\unskip}%
  \let\rhtitle\thetitle
  }
	% If your title is too long for the running head,
	% use this to construct a shorter version:
\def\shorttitle{%
  \begingroup
  \def\CurrentTag{shorttitle}%
  \@defaultoptions
  \@savingargumenttrue
  \@checkoptions}

\def\endshorttitle{%
  \global\toks@=\expandafter{\the\@argument}%
  \endgroup
  \edef\rhtitle{\ignorespaces\the\toks@\unskip}%
  }

\def\rhauthor{\@defaultauthorlist}
	% Use the following for running heads if more than
	% one author or author's name is too long to fit:
\def\shortauthor{%
  \begingroup
  \def\CurrentTag{shortauthor}%
  \@defaultoptions
  \@savingargumenttrue
  \@checkoptions}

\def\endshortauthor{%
  \global\toks@=\expandafter{\the\@argument}%
  \endgroup
  \edef\rhauthor{\ignorespaces\the\toks@\unskip}%
  }

%\long\def\Abstract #1\endAbstract{\long\def\@abstract{#1}}
\def\abstract{\@abstract[\longargument]}
\def\@abstract{%
  \begingroup
  \def\CurrentTag{abstract}%
  \@defaultoptions
  \@savingargumenttrue
  \@checkoptions}

\def\endabstract{%
  \global\toks@=\expandafter{\the\@argument}%
  \endgroup
  \edef\theabstract{\ignorespaces\the\toks@\unskip}%
  }

\newif\ifExtrAbs \ExtrAbsfalse % Extract abstract from paper
\def\breaklines{\begingroup\catcode`\^^M=\active\newlinechar=`\^^M}
\def\endbreaklines{\endgroup}

\def\prefnote{\@prefnote[\longargument]}
\def\@prefnote{%
  \begingroup
  \def\CurrentTag{prefnote}%
  \@defaultoptions
  \@savingargumenttrue
  \@checkoptions}

\def\endprefnote{%
  \global\toks@=\expandafter{\the\@argument}%
  \endgroup
  \edef\theprefnote{\ignorespaces\the\toks@\unskip}%
  }

\let\theprefnote\relax

\def\@defaultsignature{%
  \count@=0
  \loop
  \ifnum\count@<\authornumber
    \vskip20pt
    \advance\count@ by \@ne
    \noindent{\AUTHORfont\theauthor{\number\count@}}\endgraf
    \noindent{\addressfont\theaddress{\number\count@}}\endgraf
    \noindent{\netaddrfont\thenetaddress{\number\count@}}\endgraf
  \repeat
  }

\newbox\startbox % \newdimen\startheight
\def\article{% \ifExtrAbs\endbreaklines\fi   % (*)
   \setbox\startbox=\hbox to\colwd
   {\hbox to\pagewd{\vbox{
      \hsize\pagewd\raggedright\advance\rightskip0pt plus 1fil\tenpoint\rm
   \let\\\break
   \noindent{\TITLEfont\thetitle\endgraf}%
   \@defaultsignature
   \ifx\theprefnote\relax\else
     \vskip 20pt
     \hbox to \pagewd{\hfil\vbox{\hsize 0.6\pagewd
       \rightskip\z@skip \parfillskip0pt plus 1fil \spaceskip\z@skip
       \noindent{\bf Author's Note: }\ignorespaces\theprefnote\par}\hfil}
     \fi
   \vskip 20pt
   \hbox to \pagewd{\hfil\vbox{\hsize 0.75\pagewd
     \rightskip\z@skip \parfillskip0pt plus 1fil \spaceskip\z@skip
     \centerline{\bf Abstract}\vskip 5pt
     \noindent\theabstract\par}\hfil}
     \vskip 1pc}}\hss}
   \twocolfigure\box\startbox\endfigure
   \ifExtrAbs                                    % (*)
      \immediate\write\titleabs{\string\TITLE\string\bf\space
          \rhauthor:\ \string\rm \rhtitle;;}
      \immediate\write\titleabs{\space}
      \immediate\write\titleabs{\string\ABS\string\bf\space 
            Abstract.\ \theabstract;;}
      \immediate\write\titleabs{\space}
      \immediate\write\titleabs{\string\endinput}
      \immediate\closeout\titleabs  \endbreaklines
   \fi                                           % (*)
}

% \head  (This writes over a definition in tugboat.sty)
\def\@domainhead{%		
  \if@removeprewhite\else\vskip\baselineskip\fi
  \noindent{\HEADfont\baselineskip15pt % larger type than usual
    \raggedright\bf\ignorespaces\the\@argument\unskip\endgraf}%
  \if@removepostwhite          %  usually we want the white space
  \else\kern0.5\baselineskip\fi
  \nobreak
  \gdef\@next{%
    \if@allowindent\def\@next{}%  usually we don't want to indent here
    \else\def\@next{\DeleteOptionalSpacesandPars{\noindent\ignorespaces}}\fi
    \@next
    }%
  }

\restorecat\@

% \Trimmarkstrue		% for final copy
% \overfullrule=0pt

\endinput

%% *********************************************************

Change History
--------------
1.11   changed TUG address in header to Santa Barbara
       parameterized dates, etc., in running footers
       initialized them at top of file instead of in footer text

1.10   changed \tenrm to \tenpoint in definitions of \rtitle and \rfoot
         so that \sl will be properly defined if used in that context

1.09   removed \smallcode definition; it is now in tugboat.sty
       increased width of abstract from 60-75% of text width
       added standard headers, prepared for archive installation

1.08   changed \start to \startingpage
       added definition of \startingpage at top of file so running heads
         will be empty on first page of article

1.07   removed \Pageno
       added check for previous input
       altered \\ in running heads

Previous:

%%% TUGPROC.sty 11-mar-90 (*) 15-mar-90 30-mar-90 10-apr-90
%%%   26-jun-90 [changed running feet, page numbers, \start]
%%%   28-jun-90 [added \stamp, \ifproof] 29-jun-90 [\Proof]
%%% TUGPROC.sty  03-feb-90 (renamed 13-feb-90) 20-feb-90
%%%                          
%%% Supplementary header file for TUG Proceedings volume
%%% for use with plain.tex  (under revision still)
%%%
%%% (*) This version writes the title and abstract into
%%% a file, for use in preparing the Title-Abstract-Bio
%%% section in the program. Author-Title and Abstract are
%%% written into a file as one-liners; if these lines are
%%% too long, they should be reformatted manually before
%%% the file is \input.