% % Copyright 1990, Daniel R. Greening. Copying is permitted for any % non-commercial purpose as long as this copyright and the % documentation are retained on copies and derivative works. No % warrantee is expressed or implied, and the author makes no claims % about the usefulness, applicability, or correctness of the program. % % Greening Phonelist TeX Format. % % This thing is pretty cool, if I do say so myself. I've used it for % several years. It formats phone numbers into a 9x9 block that looks % like the picture that follows. The picture is simplified. There is % enough room for decent sized names, long phone numbers (with area % or country-codes and extensions), and addresses with 9-digit % zipcodes. Print out the phone list example included and you'll % see. % % ------------------+------------------+------------------ % | sally W 784-7861 | dan W 784-7861 | zeke W 784-7861 | % | H 271-2629 | H 271-2629 | H 271-2629 | % | 12 Foster Ct | 12 Foster Ct | 12 Foster Ct | % | New York,NY 10 | New York,NY 10 | Topeka,KS 1054 | % | georgeW 444-adff | | clem W 444-adff | % | schoolW 277-2222 | KANSAS | jethroW 277-2222 | % | abe W 331-3333 | | abigaiH 331-3333 | % | ron W 231-2341 | jeb W 231-2341 | emmy W 231-2341 | % | | | | % ------------------+------------------+------------------ % | MICHIGAN | dan W 784-7861 | | % | dan H 463-5788 | H 271-2629 | WASHINGTON | % | 5582 Golfridge | 12 Foster Ct | | % | Alma, MI,48801 | Lansing,MI 432 | nancy W 234-2223 | % | W 623-3330 | georgeW 444-adff | georgeW 444-adff | % | schoolW 277-2222 | schoolW 277-2222 | schoolW 277-2222 | % | abe W 331-3333 | abe W 331-3333 | abe W 331-3333 | % | ron W 231-2341 | ron W 231-2341 | ron W 231-2341 | % | | | | % ------------------+------------------+------------------ % | jeff W 784-7861 | W 784-7861 | jack W 784-7861 | % | H 271-2629 | H 271-2629 | H 271-2629 | % | 12 Foster Ct | 12 Foster Ct | 12 Foster Ct | % | New York,NY 10 | New York,NY 10 | New York,NY 10 | % | georgeW 444-adff | georgeW 444-adff | georgeW 444-adff | % | schoolW 277-2222 | schoolW 277-2222 | schoolW 277-2222 | % | abe W 331-3333 | abe W 331-3333 | abe W 331-3333 | % | ron W 231-2341 | ron W 231-2341 | ron W 231-2341 | % | | | | % ------------------+------------------+------------------ % % I typically take the output and cut it along the horizontal dividing % lines, then staple the thing together on the left. If you fold it % in half, it fits in a pocket or a largish wallet. If you want to % stick it in a smaller wallet (and you are patient), you can tape the % horizontal strips end-to-end and fan-fold it. It then occupies the % space of a credit-card. % % HOW TO USE: % % Precede lines that contain a country, state or province header with % ``$''. This is an example header for the sovereign state of California: % % $ CALIFORNIA % % Lines which contain a phone number work like this: % % person-name ; cat ; phone-number % % The ``cat'' is typically a one or two letter abbreviation, as in % ``W'' for work, ``H'' for home, ``FX'' for FAX, ``P'' for parents, % etc. The phone-number field defined in this macro package is large % enough to accommodate the number ``999-999-9999x9999''. Here is an % example: % % Alan Turing ; W ; 213-825-2266 % ; H ; 914-784-7861 % % Finally, you indicate an address with the prefix ``>''. This simply % indents the text which follows by one \quad. Here's a bigger % example: % % $ CALIFORNIA % % Alan Turing ; W ; 213-825-2266 % > UCLA Computer Science Dept. % > Los Angeles, CA 90024-1647 % % ; H ; 914-784-7861 % > 1243 Blenheim Lane % > Los Angeles, CA 90025 % % Blank lines essentially mean nothing when the occur between these % three constructs. % % If you want to include formatted paragraphs, you can do so, but you % must terminate them with ``\par'' or with a blank line. % % Enjoy. If you make any interesting modifications, let me know. % % Dan Greening / dgreen@cs.ucla.edu % \font\rm=cmr5 \font\bf=cmbx5 % The following produces 3 column, 3 row output. \hsize=2.0in \vsize=3.0in \voffset=-0.75in \hoffset=-0.5in \newdimen\fullhsize\global\fullhsize=7.5in \newdimen\fullvsize\global\fullvsize=10.5in \newdimen\hboxsize\global\hboxsize=\hsize\advance\hboxsize by 0.5in \newdimen\vboxsize\global\vboxsize=\vsize\advance\vboxsize by 0.5in \def\fullhbox{\hbox to\fullhsize} \def\fullvbox{\vbox to\fullvsize} \newcount\colcount \global\colcount=11 \newcount\rowcount \global\rowcount=5 \baselineskip=6 pt plus 1pt \parindent 0pt \newcount\boxnum % % Define argument to accept ^^M as a terminator for a macro (such as % ;, $, and >. % \def\parsearg #1{\let\next=#1\begingroup\obeylines\futurelet\temp\parseargx} \def\parseargx{% \ifx \obeyedspace\temp \aftergroup\parseargdiscardspace \else% \aftergroup \parseargline % \fi \endgroup} {\obeyspaces % \gdef\parseargdiscardspace {\begingroup\obeylines\futurelet\temp\parseargx}} \gdef\obeyedspace{\ } \def\parseargline{\begingroup \obeylines \parsearglinex} {\obeylines % \gdef\parsearglinex #1^^M{\endgroup \next {#1}}} % \def\initcolbox#1 {\global\setbox#1=\vbox to\vboxsize{\hrule\vss\hbox % to\hboxsize{\vrule height\vboxsize\hfil\vrule height\vboxsize}\vss\hrule}} \def\initcolboxes{ \initcolbox11 \initcolbox12 \initcolbox13 \initcolbox14 \initcolbox15 \initcolbox16 \initcolbox17 \initcolbox18 \initcolbox19 } \def\outputpage{\shipout\fullhbox{\fullvbox{\box11\vss\box14\vss\box17}\hss \fullvbox{\box12\vss\box15\vss\box18}\hss \fullvbox{\box13\vss\box16\vss\box19}}} \initcolboxes \output={ \global\setbox\colcount=\vbox to \vboxsize {\hrule width\hboxsize\vss\hbox to \hboxsize {\vrule height\vboxsize\hss\columnbox\hss\vrule height\vboxsize} \vss\hrule width\hboxsize} % Current column is now saved. \message{(\the\colcount)} \ifnum\colcount=19 \global\colcount=11 \outputpage \advancepageno \initcolboxes \else \global\advance\colcount by 1 \fi % For the very end. \ifnum\outputpenalty>-100000 \else \supereject\outputpage\fi } \def\columnbox{\vbox to\vboxsize{\vfill\hbox{\vbox to\vsize{\unvbox255\vfill}}\vfill}} % % Here we define ``$'' ``>'' and ``;'' as active macro % characters. They serve as separators for fields in our phone list. % \rm \newdimen\widthb \global\setbox0=\hbox{WE} \widthb=\wd0 \newdimen\widthc \global\setbox0=\hbox{999-999-9999x9999} \widthc=\wd0 % \catcode`\;=\active { \catcode`\;=11 \gdef\phonelineyyy #1;#2;#3\finish{ \catcode`\;=\active\hfill \hbox to\widthb{\hfil\ignorespaces #1\hfil} \hbox to 0.05in{\hfil} \hbox to\widthc{\ignorespaces #2\hfil} \par} \gdef\phoneline #1{\catcode`\;=11\phonelineyyy #1;;;\finish} } \outer\def;{\catcode`\;=11\parsearg\phoneline} % \catcode`\>=\active \def\addressline#1{\hbox to\hsize{\quad\ignorespaces #1\hfil}\par} \def>{\parsearg\addressline} % \catcode`\$=\active \def\arealine#1{\vbox to 1pt{\vfil}\hbox to\hsize{\hfil{\bf\ignorespaces #1}\hfil}\vbox to 1pt{\vfil}} \def${\parsearg\arealine} $ SOUTHERN CALIFORNIA Daniel R. Greening ; W ; 213-825-2266 ; H ; 213-829-7726 > 3436 Boelter Hall > Los Angeles, CA 90024-1596 ISI ; W ; 213-822-1511 $ NORTHERN CALIFORNIA Avalon Ventures ; W ; 415-960-1879 Sierra Club ; W ; 415-776-2211 UC Student Assn ; W ; 916-447-8272 $ WASHINGTON, DC Rep. Barney Frank ; W ; 202-225-5931 NGLTF ; W ; 202-332-6483 House of Reps ; W ; 202-225-3121 National Park Service ; W ; 202-343-4747 US Student Assn ; W ; 202-775-8943 $ GEORGIA Georgia Inst. Tech. ; W ; 404-894-2300 $ LOUISIANA Bruce D. Shriver ; W ; 318-231-5811 > Editor-in-Chief, IEEE Computer > U. of Southwestern Louisiana > Drawer 42730 > Lafayette, LA 70504-2730 > shriver@usl.edu $ MARYLAND Ober Travel ; W ; 301-496-6676 $ MASSACHUSETTS Appalachian Mt.Club ; ; 617-523-0636 ATHENA ; W ; 617-253-1300 Kluwer Acad. Pub.; W ; 617-871-6600 MIT LCS ; W ; 617-253-5851 REI ; W ; 617-944-5103 > 279 SalemSt. > Boston,MA > (exit 40 off Rt128) $ NEW HAMPSHIRE AMC Hut Reservations ; ; 603-466-2727 Warren Rudman ; W ; 603-666-7591 $ NEW MEXICO LANL ; W ; 505-667-5061 LANL Library ; W ; 505-667-4175 > 8am-4.30pm m-f LANL CNLS ; W ; 505-667-1444 Santa Fe Institute ; W ; 505-984-8800 > 1120 Canyon Road > Santa Fe, NM 87501 $ NEW YORK AAA ; W ; 212-586-1166 AAA autoTripMaps ; W ; 914-997-7744 ACM ; W ; 212-869-7440 B\&H Photo ; W ; 212-807-7474 Bee Line ; W ; 682-2020 > 14 N Bee Line/lost+found ; W ; 376-6361 Carey Bus ; W ; 212-286-9766 > lost/found 718-632-0529 Conran's Habitat ; W ; 914-683-5858 > I 287 E to exit 5. take 2nd left Cornell University ; W ; 607-255-2000 Daniel R. Greening ; W ; 914-784-7861 ; H ; 914-271-2629 > IBM T.J. Watson Research Center > P.O.Box 704 > Yorktown Heights, NY 10598-0704 IBM Hawthorne ; W ; 914-784-7000 ; FX; 914-784-7455 > 30 Saw Mill River Road > Hawthorne, NY 10532 > mail: > P.O.Box 704 > Yorktown Heights, NY 10598 Kayson Jeep ; W ; 914-271-5105 ; FX; 914-271-5581 NYNEX ; W ; 914-964-6500 Oliva Car Service ; W ; 914-769-8881 Ossining Pub Lib ; W ; 914-941-2416 > 9a n to 133 millwood. > bear right. thru underpass > 53 Croton Avenue. > m-th9.30-9 > f,sa9.30-5.30,su1-5 REI ; W ; 914-632-9222 > 500 Main St. > New Rochelle, NY French Consulate ; W ; 212-606-3600 Hertz ; W ; x23789 ; W ; 914-948-3024 MetroNorth Commuter ; ; 800-522-5624 New York Tax Board ; W ; 800-462-8100 ; W ; 518-438-1073 New York Times ; W ; 800-631-2500 NYU Info ; W ; 212-998-4636 NYU Bookstore ; W ; 212-998-4656 NYU Book orders ; W ; 212-998-4678 > Oscar Wilde Books ; W ; 212-255-8097 Sailing Info ; W ; 914-271-6868 Courtsports ; W ; 914-592-3005 $ NORTH CAROLINA MCNC ; W ; 919-248-1800 > 3021 Cornwallis Road > P.O. Box 12889 > Research Triangle Park, NC 27709-2889 $ OHIO > The Ohio Supercomputer Center > 1224 Kinnear Road > Columbus, OH 43212-1154 $ TEXAS SEMATECH ; W ; 512-356-3500 > SEMATECH > 2706 MontopolisDr. > Austin,TX 78741 $ WASHINGTON Lake Chelan Nat.Rec. ; W ; 509-682-4711 \end % Local Variables % tab-width:25 % End