Debian Codegraph @

texmf-dist/tex/plain/resumemac/resumemac.tex

raw
1 % This file is public domain.
2 % Originally written 1992, Don Hosek.
3 % This declaration added by Clea F. Rees 2008/11/16 with the permission of Dan Hosek.
4 %
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 %
7 % Resume macro file for plain.TeX.
8 %
9 % To Use:
10 % \input resumemac
11 % \magnification=\magstep0 % (Or whatever size is desired)
12 % % Setting \magnification is optional.
13 % \name{Your Name Here}
14 % \address{Separated by \\
15 % Type your address\\
16 % In this space.}
17 % \date{Either type it yourself, or use \today}
18 % \tag{Whatever the category is}
19 % Information for this item...
20 % .
21 % .
22 % .
23 % \endtag
24 % Repeat \tag...\endtag as necessary.
25 % Inside of \tag...\endtag, you may use \(dates)what happened then\\ for
26 % itemized lists.
27 %
28 % To set the heading format say:
29 % \centerheading (for centered headings)
30 % \leftheading (for left justified headings)
31 % \rightheading (for right justified headings) or
32 % \specialheading (for a special ``letterhead'' style heading.)
33 % Before you enter the heading commands
34 %
35 % Use \magnification to modify text sizes.
36 %
37 % Written By Don Hosek <[email protected]>
38 %
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40
41 %%%
42 %%% Initializations...
43 %%%
44 \catcode`\@=11
45
46 \newskip\interTAGskip
47
48 \newbox\TAGbox \newbox\INFObox
49 \newdimen\TAGboxhsize \newdimen\INFOboxhsize \newdimen\INFOboxlength
50 \newdimen\DATEhsize \newdimen\DATEINFOhsize \newdimen\@datesepamount
51 \hsize=6.5truein \vsize=9.0truein \interTAGskip=12pt
52 \parindent=0pt
53 \TAGboxhsize=0.9truein \INFOboxhsize=5.3truein % Take care that TAGboxhsize +
54 % INFOboxhsize = hsize - 0.1in
55 \DATEhsize=.75truein \DATEINFOhsize=4.4truein % Take care that DATEhsize +
56 \@datesepamount=.15truein % DATEINFOhsize is <=
57 % INFOboxhsize
58 \let\wheretoputit=c \let\\=\cr
59 \nopagenumbers
60
61 %%%
62 %%% Fonts...
63 %%% Change am.. to cm.. if you are using that series of fonts.
64 %%% System wizards may modify this section to conform to system needs and
65 %%% user desires.
66 %%%
67 \font\NAMEfont=cmbx10 scaled 1200 \font\TAGfont=cmbxsl10
68 \font\smallADDRESSfont=cmr9
69
70 %%%
71 %%% The top macros...
72 %%%
73 %%% First off is the ever-popular \today macro...
74 %%% (cribbed from LaTeX's Letter format.) Basically a long \ifcase on the
75 %%% \month register.
76 %%%
77 \def\today{\ifcase\month\or
78 January\or February\or March\or April\or May\or June\or
79 July\or August\or September\or October\or November\or December\fi
80 \ \number\day, \number\year}
81
82 %%%
83 %%% \specialline is a special version of \line that permits you to select
84 %%% centered, right or left adjusting via an option in []s. We call this in
85 %%% the right-, left-, and centerheadings styles.
86 %%%
87 \def\specialline[#1]#2{
88 \ifx#1l\leftline{#2}
89 \else\ifx#1r\rightline{#2}
90 \else\centerline{#2}
91 \fi
92 \fi}
93
94 %%%
95 %%% \name, \address, \date put the parameter information into \@ whatever
96 %%%
97 \def\name#1{\def\@name{#1}}
98 \def\address#1{\ifx\@address\undefined % allow multiple addresses...
99 \def\@address{#1}
100 \else
101 \def\@@address{#1}
102 \fi}
103 \def\date#1{\def\@date{#1}}
104
105 %%%
106 %%% Now for the meat and potatoes macro: \tag...\endtag
107 %%%
108 %%% \tag
109 %%% Check to see if this is the first tag... If it is, then we want to
110 %%% print the header information at the top.
111 %%% We put the first parameter in \TAGinfo, to be used later, and then
112 %%% begin to put the remainder of the text in a box (the box will be removed
113 %%% later on for flexibility in making page breaks).
114 %%%
115 \def\tag#1{\ifx\@headerprinted\undefined % check to see if this is the first tag
116 \let\@headerprinted=X %change status of @headerprinted
117 \printheader % print the header
118 \fi
119 \def\TAGinfo{#1} % Communication to \endtag
120 \setbox\INFObox=\vbox\bgroup\hsize=\INFOboxhsize}
121
122 %%%
123 %%% \endtag
124 %%% \endtag finishes off the box begun by \tag and and prints the entry
125 %%% in the resume using valign.
126 %%%
127 \def\endtag{\egroup
128 \vskip\interTAGskip
129 \setbox\TAGbox=\vbox{\hsize=\TAGboxhsize
130 \raggedright\hyphenchar\TAGfont=-1
131 \tolerance=20000 % Don't get uptight about lines.
132 \hbadness=10000 % And don't talk about it either.
133 \TAGfont \TAGinfo \vfill}
134 \valign{##\vfill\cr
135 \unvbox\TAGbox\cr
136 \noalign{\hfill}
137 \unvbox\INFObox\cr}}
138
139 %%%
140 %%% Now that wasn't too bad, now was it?
141 %%% Next we create the \(...)... macro to make a few other things
142 %%% easier
143 %%%
144
145 %%%
146 %%% \(dates)
147 %%% whatever happened during that time\\
148 %%% This macro also uses valign to align its text.
149 %%%
150 \def\(#1)#2\\{\par
151 {\tabskip=0pt %change tabskip only inside this macro.
152 \vskip4pt plus 2pt minus3pt
153 \valign{##\vfill\cr
154 \vbox{\hsize=\DATEhsize\leftskip=0pt plus1fill#1}\cr
155 \noalign{\hskip\@datesepamount}
156 \vbox{\hsize=\DATEINFOhsize#2}\cr
157 \noalign{\hfill}}}
158 \par}
159
160 %%%
161 %%% Heading options:
162 %%%
163 %%% \leftheading
164 %%%
165 \def\leftheading{\let\@hstyle=l}
166
167 %%%
168 %%% \rightheading
169 %%%
170 \def\rightheading{\let\@hstyle=r}
171
172 %%%
173 %%% \centerheading
174 %%%
175 \def\centerheading{\let\@hstyle=c}
176
177 %%%
178 %%% \specialheading
179 %%%
180 \def\specialheading{\let\@hstyle=s}
181
182 %%%
183 %%% \heading{heading_type}
184 %%%
185 %%% LaTeX-style command for specifying headig type... use something
186 %%% along the lines of \heading{right} to set the heading type.
187 \def\heading#1{\csname#1heading\endcsname}
188
189 %%%
190 %%% \printheader
191 %%% internal macro for printing the header. Should not be called by user!
192 %%% uses information set by the heading commands.
193 %%%
194 \def\printheader{\ifx\@date\undefined
195 \def\@date{\today} %if date was not specified, use today's date.
196 \fi
197 \ifx\@hstyle s
198 \begingroup
199 \def\\{, }
200 \line{{\NAMEfont\@name}\hfil{\smallADDRESSfont\@address}}
201 \ifx\@@address\undefined\relax\else %two addresses !
202 \line{\hfil{\smallADDRESSfont\@@address}}
203 \fi
204 \endgroup
205 \smallskip
206 \hrule
207 \smallskip
208 \rightline{\@date}
209 \else\ifx\@hstyle r
210 \begingroup
211 \let\\=\cr
212 \halign{\hbox to\hsize{\hfill##\hfil}\cr
213 \NAMEfont\@name\cr
214 \@address\cr
215 \noalign{\smallskip}
216 \ifx\@@address\undefined\relax\else
217 \@@addresscr
218 \noalign{\smallskip}
219 \fi
220 \@date\crcr}
221 \endgroup
222 \else\ifx\@hstyle l
223 \begingroup
224 \let\\=\cr
225 \halign{##\hfil\cr
226 \NAMEfont\@name\cr
227 \@address\cr
228 \noalign{\smallskip}
229 \ifx\@@address\undefined\relax\else
230 \@@addresscr
231 \noalign{\smallskip}
232 \fi
233 \@date\crcr}
234 \endgroup
235 \else\ifx\@hstyle c
236 \centerline{\NAMEfont\@name} % The easy way to do it.
237 \ifx\@@address\undefined
238 \centeroneaddress
239 \else
240 \centertwoaddresses
241 \fi
242 \centerline{\@date}
243 \fi\fi\fi\fi}
244
245 \def\@@addresscr{\@@address\cr} %hack to fool ifx
246
247 \def\centeroneaddress{\begingroup
248 \let\\=\cr
249 \tabskip=0pt plus1fill
250 \halign to \hsize{\hfil##\hfil\cr
251 \@address\crcr}
252 \smallskip
253 \endgroup}
254
255 \def\centertwoaddresses{\begingroup
256 \let\\=\cr
257 \tabskip=0pt
258 \valign{##\vfill\cr
259 \noalign{\hfill}
260 \vbox{\hsize=.4\hsize\tabskip=0ptplus1fill
261 \halign to\hsize{\hfil##\hfil\cr
262 \@address\crcr}}\cr
263 \vbox{\hsize=.4\hsize\tabskip=0ptplus1fill
264 \halign to\hsize{\hfil##\hfil\cr
265 \@@address\crcr}}\cr
266 \noalign{\hfill}}
267 \smallskip
268 \endgroup}
269
270 \catcode`\@=12