We were intending to talk this month about the joint
Internet Engineering Task Force/Printer Working Group project to
develop an internet printing protocol. While the IETF only
recognizes the contributions of individuals, the protocol is
being watched with interest by staff from companies like IBM,
Microsoft, Hewlett-Packard, Lexmark, and QMS, so we have every
reason to believe that it'll be well received. (If you're
interested in the IPP work, take a look at http://www.pwg.org/ipp.)
However, earlier in the month some colleagues came to us and said
``Quick! What do you have for formatting
résumés!''
``Ha!,'' we said (since all conversations between
engineers are punctuated by exclamation points), ``have we got a
macro package for you!'' And now, we'll share it with you, too.
Before we start, we have to answer the important
question ``How many accents are there in resume, anyway?'' It
depends: we've usually seen it with one, but our friend Dick
Dunn claims that either two (as in résumé) or none
(as in resume) is proper, even though our edition of Webster's
also allows one like we've used for years. So, with a tip of the
hat to Dick, we'll use two. As always, you're welcome to change
the software.
Also, before we start, we'll remind you to carefully
proofread your résumé: vital documents are
sometimes so vital that they develop their own typographic errors
when you aren't looking. Also get outside referees: We review
each other's résumés, and every so often we get
someone else to do it. If you've got a friend you trust in the
human resources department of a company like the one you're
targetting your résumé for, ask them. Ask managers
you've worked for in the past who you're still on good terms
with. You're often too close to the contents of your own
résumé to critically review it.
As always, we'll be formatting our documents in
troff, rather than one of those new-fangled what-you-see-is-what-you-get word processor things -- we may be computer-literate, but we're still Luddites at heart.
We'll warn you ahead of time that we're going to assume
some troff knowledge, but here we go...
Design issues.
We'll begin by thinking through what we need to put on the
résumé. In general, we want to mark up the
résumé structurally -- that is, in terms of the
items in the résumé (here's the job title, here's
the dates I was there) -- instead of using typographic markup
(this word is in italic, this one has a larger point size). This
will allow us to change the format of our résumé
later by just changing the macros.
On the other hand, we certainly need to identify some things as being in italics, and some in bold, so let's do those macros first, since they're pretty simple.
.de i \f2\\$1\fP .. .de b \f3\\$1\fP .. .de c \f6\\$1\fP\\$2 .. .fp 6 C
We'll assume that we've got an italic font mounted on
position 2, and a bold on position 3. As a matter of good
troff form, we try to refer to the fonts by their position
rather than their names. This means that we can change the fonts
without changing every reference to them.
Notice that we've also included a macro for computer
type in Courier, This allows us to include things in our
résumé like: http://www.alumni.caltech.edu/~copeland/work.html. Another point to notice is
that we mount the Courier font immediately after we define the
c macro, so the two are physically together in the macro
package.
Next we'll need to specify the markup for paragraphs. We want to be able to use three different kinds of paragraphs: Normal block ones, indented ones, and hanging paragraphs. (Our normal résumé style is to use block paragraphs at the beginning of a job description, indented paragraphs within job descriptions, and hanging paragraphs for publications.)
.de PP .br .. .de IP \" indented paragraph .ti +2m .. .de HP \" hanging paragraph .ti -2m ..
Notice that we're using .ti directives, but we
don't say what we're doing the temporary indent from. We'll deal
with that in the setup.
The other thing we might need is the ability to make
nested bullet lists. In our résumés we use them
for the executive summary page. (Why an executive summary?
Because it allows us to put all the relevent buzzwords on a
single page to make life easy for the clerk in the human
resources department.) If we were using the -mm macro
package, we'd use .DL dash lists nested within
.BL bullet lists.
.de BU \" bullet list item for summary .sp .66v .ti -2m \(bu\0\c .. .de DA \" dashed list item for summary .sp .25v .ti -1m \(em\0\c .. .de SB \" item line for summary .ti +2m ..
Again, we're assuming some global page indent in the
setup for the lists, but we'll address that later.
Mr Manager and Dr
Technical.
Next we need to handle a special case,
to prevent special cases: support for two versions of our
résumé, one with a technical focus, and one with
for a mangement position.
.de TE \" technical resume content line
.if \\nB [[\f2tech:\f1
.if \w@\\$1@ \{\
. ie \\nB \\$1]]
. el .if \\nT \\$1
.\}
.if !\w@\\$1@ .if !\\nT .if !\\nB .ig VE
..
.de MG \" management resume content line
.if \\nB [[\f2mgt:\f1
.if \w@\\$1@ .if !\\nT \{\
. ie \\nB \\$1]]
. el \\$1
.\}
.if !\w@\\$1@ .if \\nT .if !\\nB .ig VE
..
.de VE \" version end
.ie \w@\\$1@ \\$1\f1
.el .if \\nB ]]\f1
..
.if \nB .nr D 1
.if \nB .nr T 0
This assumes that when we want to do the technical version of the
résumé, we invoke troff with a line like:
troff -rT1 resume. Additionally, we've set this up to
allow us to do a ``both'' version for editing purposes with
something like: troff -rB1 resume. (Setting B
implies that T is unset, and D (for draft) is
set. By turning off T we make the processing for the
both version a little easier. Also, we may want to do some
special processing if we're printing a draft, which the both
version definitely is.
It's important to note that we've set this up like the -mm italic and bold macros: we can invoke the macro with arguments, like:
or use TE/VE and MG/VE pairs to bracket targetted text, like:.TE "a technical thing I did"
We're doing the latter by making careful use of the troff ig directive, buried beneath a chain of ifs. (You can easily modify this trick for separate waiter and cook résumés, or developer and tester résumés, if you want.).TE a long technical thing that I did .VE
Since we're doing this in a bottom up fashion, next we'll think about the way we'd format each new job. Let's assume we call the macro with a line like:
That is, we want the dates of the job, the title, the company and location as arguments. Why would we use a pound sign instead of a dash in the dates? Because depending on how we arrange the output of the macro, we want to avoid breaking the date across lines if we can help it, since troff will break at a hyphen if it can. We can use the tr directive to change the pound sign into a dash after the hyphenation and fill is completed. So:.NJ 11/94#present "Sr MTS" "QMS" "Boulder, CO"
Notice that we've taken special care about the punctuation in cases where we may be missing one or more arguments. This allows our résumés to have jobs like.de NJ \" new job .\" takes dates, job title, company, location .in 0 .sp .66v .tr #- .if \w@\\$2@ \\$2. .ie \w@\\$4@ \\$3, \\$4 (\\$1): .el \\$3 (\\$1): .in .tr -- ..
Also, like with our paragraph and list macros, we're assuming a base page indent, and we set our job line firmly against the left margin. Of course, we can always change the formatting of the job lead-in without changing the structure of all the NJ macros we used in our résumé text..NJ 5/75#6/79 "Teaching Assistant" "Caltech" ""
New pages, Last
pages.
Now we need to handle our least favorite
troff thing: the macro to handle the top of page. It's
generally a messy process because the macro is invoked by the
bottom of page trap, and we need to do some swapping of
environments to prevent the line that caused the page spill from
being inadvertently printed.
.de BP\" top of page macro
'ev 1
'br
'bp
'sp |.5i
'ps 10
'if \\n%>2 \{\
' tl |\f3Resum\o@e\'@/\\*(Jf\fP (continued)|\
|\f6\\*(J@\fP|
' if !\\nA 'tl |\\*(A1, \\*(A2||\\*(A3|
'\}
'if \\nD 'tl 'draft: \\*(PD'''
'ps
'sp |1i
'ev
..
What're all those hieroglyphs in the tl lines in the
page header? We'll define some strings for our name and address,
Jf contains Jeff's full name, J@ will have
Jeff's e-mail address, and then A1, A2, and
A3 for our street address, city and phone number
respectively. We'll have that data in the résumé a
lot, and defining them as strings means that when we move it's
not quite so much hassle.
In any event, our top of page processing does the
following: On each page after the second (the first page will be
the executive summary, the second is the beginning of our
résumé proper and we don't want a page header on
it, just our centered name) we put our name on the left side, our
e-mail address on the right (in Courier, notice). On the next
line, we put our address and phone number, but we can suppress
this by setting the A number register on the command
line.
(Let's digress for a moment about form: it's good
practice to put your address on each page of your
résumé: pages can get separated, and we want to
make life easy for those clerks who are processing it. On the
other hand, if you send your résumé to an agency,
they'll want to strip your address because they want inquiries to
go through them, and you've just saved the clerk in their filing
department the trouble.)
If we've set the D number register, we're
printing a draft, and we put the date string
(PD) at the top of the page, too. We're
setting the whole page header in 10 point, and then reverting to
the original point size. (Do we need to revert? We may not, but
we can never remember whether the point size is in the
environment or not, so we make the switch to the original point
size explicit.)
Let's use this macro immediately, so that we have the macro and the trap physically together in the source:
Notice that we're really only using this for troff: in nroff, we set the page length to one line so that we never get a real page break. Why? Because the nroff version of our résumé is going to mostly be used for e-mail, page breaks in e-mail are annoying. (Actually, we'll also use nroff to generate the HTML version, but let's come back to that.).if t .wh -1i BP .if n .rm BP .if n .pl 1
We also want an end macro. This will allow us to print a footer at the bottom of the last page, with the date, or other tag information.
.de EM .ch BP \" remove the end page trap .sp |\\n(.pu-.5i .tl '''\\*(PD' .. .em EM
We should also define the date string we print on the draft version and in the footer. Notice we append a t or m so we can tell if we've printed the technical or management version of the résumé.
.\" printed date .ds PD \n(mo/\n(dy/\n(yr .ie \nT .as PD t .el .as PD m
Another structural macro we need is a section header, for things like ``Education'' and ``Publications.''
We've used our previously-defined italic macro here. The only odd thing to note is the ns directive, which prevents explicit spacing until we've printed a line of text. This means that the space we generate in the NJ macro gets ignored immediately after.de SC \" begin section .in 0 .sp 1v .i "\\$1" .in +4m .br .ns ..
.SC Experience
The last thing we need to supply are a macro to produce a fancy block at the top of the first, executive summary page.
.de PH \" 1st page title block .ce 5 \f3\*(JF\f1 \*(A1 \*(A2 .sp .2v \*(A3 .ps -1 .c \\*(J@ "" mailto:\\*(J@ .ps ..
Notice: name in bold, address strung out below in
roman, followed by phone and e-mail, with each line centered.
Out of space, out of
time.
We're not quite done with the base-level
résumé macros, but we're out of space for the
month. Next time, we'll finish up the last little bit of the
macros -- mostly page setup and some string definitions -- and
proceed to discuss how to produce an HTML résumé.
We'll quickly note, though, that Nachum Dershowitz and
Edward M Reingold's book on calendar processing, Calendrical
Calculations (Cambridge, ISBN 0-521-56474-3), has finally
been published. We've been touting their calendar work, first
from Software--Practice and Experience, and now in this
book, in our column for some time. We just got our copy of their
book today.
Until then, happy trails.