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
|
%% file: TXSmemo.tex - Memoranda - TeXsis version 2.18
%% @(#) $Id: TXSmemo.tex,v 18.0 1999/07/09 17:24:29 myers Exp $
%======================================================================*
% This is a set of TeX macros for producing simple memos.
% The sytnax is:
%
% \MemoFormat (or simply \memo in TeXsis)
% \to <name>
% \from <name>
% \subj <whatever the memo is about> or \re is same as \subj
% \date <date of memo>
% \text
% <text of memo>
% \bye
%
%----------------------------------------------------------------------*
\message{Memo Format.}
% ---------- Counters and such:
\newdimen\memoindent \memoindent=2.54cm % indent for \to, \from, etc.
\newdimen\firstheadoffset % \headlineoffset for first page only
\firstheadoffset=0pt % start with headline down for \ORGANIZATION
% ---------- Initialization: Memo document format for memoranda
\def\Memo{\ContentsSwitchfalse% % no table of contents
\texsis % initialize TeXsis
\refswitchfalse % no reference list
\MemoFormat % Setup using \MemoFormat
\memoheader}% % do header at top
\def\memo{\Memo} % synonym
\def\MemoFormat{% set up \Memo environment
\voffset=0.125truein % top margin
\hsize=6.5truein % width of text
\raggedbottom %
\advance \vsize by -\voffset % subtract \voffset from vertical size
\nopagenumbers % no footlines
\let\makeheadline=\makememhed % alternate way of making
\headline={\MemoHeadline}% % headlines for memos
\RunningHeadstrue % default
\headlineoffset=0.8cm % raise all following headlines
\firstheadoffset=0pt % start with headline down for
\def\subjectline{}% % start with this null
\def\nopagenumbers{\RunningHeadsfalse}% redefine \nopagenumbers
\def\pagenumbers{\RunningHeadstrue}%% and \pagenumbers for this document
\twelvepoint % default is 12pt
\quoteon % enable easy quotes
\def\annotations{\annotatememo}% % annotations for memo
\def\cc{\ccmemo}% % carbon copy for memo
\def\Encl{\enclmemo}% % enclosure for memo
\def\ps{\psmemo}% % post script for memo
\def\endmode{\relax}% % for first item
\def\to{\ifmmode\rightarrow\else\To\fi}%
\let\text=\memotext % enable \text
\let\Text=\memotext % \Text is a synonym
\let\body=\memotext % \body is synonym for \text
}
% \ORGANIZATION names your institution. Replace it with whatever you
% want for your own institution.
\def\ORGANIZATION{} % change this in TXSsite.tex!
% \memoheader prints the word MEMORANDUM at the top of the page and
% sets up for \to, \from, etc...
\def\memoheader{% % banner for top of first page
\pageno=1 % begin on page 1
\centerline{\fourteenpoint % 14 pt type centered
M E M O R A N D U M}% %
\bigskip\bigskip % space
\relax}% %
%---------------------------------------
% new def of \makeheadline for MEMOFORMAT, uses \firstheadoffset
\def\makememhed{\vbox to 0pt{\vskip-22.5pt
\ifnum\pageno>1\vskip-\headlineoffset
\else\vskip-\firstheadoffset\fi
\line{\vbox to 8.5pt{}\the\headline}\vss}\nointerlineskip}
% \MemoHeadline prints the subject and page number at the top of each page
\def\MemoHeadline{% headline for Memoranda
\ifnum\pageno>1 % if not first page...
\ifRunningHeads % running headlines on top of page?
{\tenrm\subjectline\hfil Page~\folio}% % print subject line and page #
\else % no running headlines?
{\hfil}% % then nothing
\fi
\else % On the first page do header
{\hfil\twelvess\ORGANIZATION\hfil}% print name of organization
\fi}%
%-----------------------------------------------------------------------
% \memoitem is the basic template for each field
\def\memoitem#1{\endmode % end previous field
\begingroup % begin a new field
\def\endmode{\par\endgroup}% % set up to end this field
\parskip=0pt % no \parskip
\singlespaced % no big space if several lines
\medskip\noindent % skip down a bit
\hangindent=\memoindent % hanging indentation
\hangafter=1 % after first line
\hbox to \memoindent{{\tenss #1}\hfil}% label the field
\nobreak}% % don't break after label
\def\endmode{\relax} % for first item
%---------------------------------------
% TO: and FROM: and FAX:
\def\To{\memoitem{TO:}}
\def\TO:{\To}
\def\From{\memoitem{FROM:}}
\def\FROM:{\From}
\def\from{\From}
\def\FAX{\memoitem{FAX \#:}}
%---------------------------------------
% CC: (Carbon Copies)
\def\ccmemo{\endmode
\def\endmode{\vskip0pt\endgroup}%
\bigskip % skip down a bit
\begingroup\obeylines % obey line ends
\parskip=0pt % no skip between items
\ccitem{cc:\ }%
}
\def\CC{\cc}
% ---------- \ccitem does the work for \cc and other end of memo fields
\def\ccitem#1{\setbox0\hbox{#1\quad}% % box0 = argument
\parindent=\wd0 % get its width
\hang % hanging indentation
\rlap{\copy0}% % and write it
\vskip-\baselineskip\relax}% % kill the skip
% ---------- \Distribution is like CC (\obeyines format)
\def\distribution{\endmode
\def\endmode{\vskip0pt\endgroup}%
\bigskip %
\begingroup\obeylines % obey line ends
\def\n{\par}% % break lines at \n
\parskip=0pt %
\ccitem{Distribution:}%
}
\def\Distribution{\distribution}% % synonym
% ---------- \enclmemo is also like \cc (obeylines format)
\def\enclmemo{\endmode %
\def\endmode{\vskip0pt\endgroup}% %
\bigskip % skip down a bit
\begingroup\obeylines % obey line ends
\parskip=0pt % no skip between items
\ccitem{Encl:\ }%
}
% ---------- \annotatememo is \annotations for memo format
\def\annotatememo{\endmode % end previous item
\def\endmode{\vskip0pt\endgroup}% % set up new ending
\begingroup % changes local
\nobreak\bigskip\nobreak % skip some
\parindent=0pt\parskip=0pt % no indent or skip
\obeylines}% % obey line endings
% ---------- \psmemo does \ps for a memo
\def\psmemo{\endmode % end previous item
\def\endmode{\vskip0pt\endgroup}% % set up ending
\begingroup % start a group
\nobreak\bigskip\nobreak % skip some
\interlinepenalty 5000 % avoid breaks
\def\par{\endgraf\penalty 5000}}% % avoid breaks
%---------------------------------------
% SUBJECT: and RE: (saves first line in \subjectline for tops of pages)
\def\subjectitem#1{\endmode % close previous field
\def\endmode{\relax}% % turn off \endmode before going to \memoitem
\gdef\@subjtype{#1}% % label the field
\begingroup\obeylines % obeylines is on to get first subject line
\getsubject}% % get first line
\def\Subj{\subjectitem{SUBJECT:}}%
\def\SUBJ{\subjectitem{SUBJECT:}}%
\def\subj{\subjectitem{SUBJECT:}}%
\def\subject{\subjectitem{SUBJECT:}}%
\def\Subject{\subjectitem{SUBJECT:}}%
\def\re{\subjectitem{RE:}}%
\def\RE{\subjectitem{RE:}}%
% \getsubject gets the first line in the field in \subjectline
% for use in the headline at the top of pages following
{\obeylines\gdef\getsubject#1
{\endgroup\gdef\subjectline{#1}% \subjectline is first line of \subject
\memoitem{\@subjtype}\subjectline\space}% print SUBJECT: <text>
}% close obeylines
%---------------------------------------
% \date takes what follows on the same line and uses it as the
% date of the memo. If nothing follows then today's date is used.
% It is important for the date, if given, to be on the same line as \date.
\def\Date{\endmode % close previous field
\def\endmode{\relax}% % turn off \endmode before going to \memoitem
\begingroup\obeylines %
\getdate} % get the date, or use today's
\def\DATE{\Date} % synonym
\def\date{\Date}
% \getdate looks for a date up until the end of the line
{\obeylines\gdef\getdate#1
{\endgroup %% close \obeylines
\ifx?#1?\relax\gdef\memodate{\today}% if no date given, use today's
\else\gdef\memodate{#1}\fi %% if date is given, use it
\memoitem{DATE:}\memodate}% %% print DATE: <date>
}% close \obeylines for definitions
\def\monthname#1{\ifcase #1 \errmessage{0 is not a month.}
\or January\or February\or March\or April\or May\or
June\or July\or August\or September\or October\or
November\or December%
\else \errmessage{#1 is not a month.}\fi}
%---------------------------------------
% TEXT: \text sets up for text of memo
\def\memotext{\endmode % close last item
\def\endmode{\bigskip\vfil}% % \endmode is now blank space
\let\to\rightarrow % put \to back to normal
\bigskip\bigskip % skip down for text
\parskip=\normalbaselineskip % \parskip is one blank line
\noindent % like a letter
}
\def\text{\memotext} % start with \text = \memotext
\def\Text{\memotext} % \Text is a synonym
% use \endmemo to end a memo, especially if you use \CC or similar.
\def\endmemo{\endmode\vfill\eject\end} % ends CC: etc, then quits
%=======================================================================
% FAX Memos:
\def\faxmemo{\let\memoheader=\faxmemoheader
\memo\faxline
\vskip 2\baselineskip}
\def\FaxNumber{} % Define your own return fax number
% You can also use \faxline with \memo in other ways, so it's separate
\def\faxline{\line{\tenrm Total pages: \hbox to 2cm{\hrulefill}\space
(including this page) \hfil Fax number:
\ifx\FaxNumber\empty\theBlank{4cm}%
\else \tenrm \FaxNumber\fi}}
\def\faxmemoheader{% % banner for top of first page
\pageno=1 % begin on page 1
\centerline{\fourteenpoint\bf % 14 pt type centered
FAX MEMORANDUM}% %
\bigskip\bigskip % space
\relax}% %
%=======================================================================
% Referee format for Referee Reports
%
\def\Referee{\ContentsSwitchfalse % no table of contents
\texsis % initialize
\auxswitchfalse % no need for an .AUX file
\refswitchfalse % no reference list
\RefReptFormat} % Setup using \MemoFormat
\def\referee{\Referee}% % synonym
\def\RefReptFormat{%
\voffset = 0.125 true in % top margin
\hsize = 6.5 true in % width of text
\raggedbottom %
\advance \vsize by -\voffset % subtract \voffset from vertical size
\nopagenumbers % no footlines
\headlineoffset=0.8cm % raise all following headlines
\firstheadoffset=0pt % start with headline down for
\let\makeheadline=\makememhed %
\def\ORGANIZATION{{\fourteenpoint\bf Referee Report}}% change \ORGANIZATION
\def\subjectline{Referee Report}% % running head is ``Referee Report''
\headline={\MemoHeadline}% % just like a memo
\def\nopagenumbers{\RunningHeadsfalse}% redefine \nopagenumbers
\def\pagenumbers{\RunningHeadstrue}%% and \pagenumbers for this document
\twelvepoint % default is 12pt
\singlespaced\whitespaced % widely spaced, but not double
\parskip=\baselineskip % extra space between paragraphs
\def\endmode{\relax}% % for first item
\quoteon % enable easy quotes
\def\to{\ifmmode\rightarrow\else\To\fi}%
\def\From{\RefFrom}% % say something about \From
\let\text=\memotext %
\let\body=\memotext %
\def\authors{\memoitem{AUTHORS:}}%
\def\author{\memoitem{AUTHOR:}}%
\def\title{\subjectitem{TITLE:}}%
\def\MSref{\memoitem{MANUSCRIPT:}}%
\def\manuscript{\@obsolete\manuscript\MSref\memoitem{MANUSCRIPT:}}%
\def\Number{\memoitem{NUMBER:}}%
\hbox{\space}\bigskip} % space down from top a bit.
\def\RefFrom{\begingroup\obeylines % obeylines to get first subject line
\getFrom}% % get first line
{\obeylines %% look for line endings
\gdef\getFrom#1
{\endgroup %%
\emsg{> Reminder: Referee Reports are usually anonymous. This one says...}%
\emsg{FROM: #1}% % say something about FROM
\memoitem{From:}#1\space}% % but do it anyway
} % close obeylines
%>>> EOF TXSmemo.tex <<<
|