home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.text.tex
- Path: sparky!uunet!era!feit
- From: feit@ERA.COM (Mark Feit)
- Subject: Anchoring Boxes
- Message-ID: <1993Jan8.175722.13313@ERA.COM>
- Sender: feit@ERA.COM (Mark Feit)
- Organization: Engineering Research Associates, Vienna, VA
- Date: Fri, 8 Jan 1993 17:57:22 GMT
- Lines: 52
-
- I'm typesetting a phone directory for an amateur radio club I belong
- to using plain TeX. Needing a different format than that of your
- average phone book, I decided on this:
-
- K3 AB Don Wilson....................................(410) 936-1212
- 440 Q Street Hamsville, MD 21012
- NK3 P Steve Donneley...................Omitted at Member's Request
- 1296 Repeater Road Seekyou DE, 14131
- WA4 XYZ Bob Smith.....................................(703) 555-1212
- 1010 Disk Drive Somewhere, VA 12345
-
- To do it, I wrote the following macro:
-
- \def\phonedirentry#1#2#3#4#5#6#7#8#9{
- \par
- \def\nameline{#3 \dotfill \phone{#4}{#5}}
- \def\addrline{#6 \quad #7, #8 \quad #9}
- \noindent
- \hbox{
- % Set the call sign
- \vbox{
- \hbox{
- \hbox to 0.4in {\hfill #1}
- \hbox to 0.4in {#2\hfil\ }
- }
- \hbox{}
- }
- % Set the name, address and phone number
- \vbox{
- \hbox{\nameline}
- \hbox{\quad\addrline}
- }
- }
- \smallskip
- }
-
- So far, I've been unable to make the \vbox containing the name and
- address lines stretch to the right edge of the page so the \dotfill
- will have some dots in it. The only thing I _can_ do that works is
- use \hbox to xxx{...} for the name line. It works (sort of), but I'd
- really like the macro to work properly regardless of what kind of box
- it's put in.
-
- Any suggestions/pointers/flames/etc?
-
- - Mark
-
- ................................. .................................
- : Mark A. Feit KD4TAJ : Internet: feit@era.com :
- : Engineering Research Associates : USENET: ...!uunet!era!feit :
- ................................. .................................
- "Keep BSD Free -- Boycott AT&T"
-