Article View: comp.text
Article #5979Re: tabstop according to longest line
From: Martin Costabel
Date: Tue, 14 Mar 1989 03:35
Date: Tue, 14 Mar 1989 03:35
41 lines
1831 bytes
1831 bytes
> *Excerpts from ext.nn.comp.text: 13-Mar-89 tabstop according to longes..*
> *David Carson@cisunx.UUCP (1339)*
> I need a little simple advice on alignment. I'm trying to make a letterhead
> where the address appears on the right side of the page, but is not right-
> justified. It should be left justified so that the longest line of the
> address is flush with the right margin, like so:
> John Doe |
> 1600 Pennsylvania Ave|
> Washington, D.C. |
> 20002 |
> margin^
[Unsatisfactory solutions deleted]
Shortest answer: Use the LaTeX letter style.
From letter.sty one finds the explicit LaTeX solution:
{\raggedleft
\begin{tabular}{l}\ignorespaces
John Doe\\
1600 Pennsylvania Ave\\
Washington, D.C.\\
20002
\end{tabular}\par}
A corresponding Plain TeX solution would be
{\leftskip 0pt plus 1fill \parskip 0pt
\def\\{\egroup\par\hbox\bgroup}
\leavevmode
\hbox{\vbox{{\\
John Doe\\
1600 Pennsylvania Ave\\
Washington, D.C.\\
20002
}}}\par}
This solution leaves the computation of lengths of lines to TeX.
--Martin Costabel
Technical Details
Message-ID:
<cY78WFy00Xs1M8o0gC@andrew.cmu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!andrew.cmu.edu!mc3i+References:
<16709@cisunx.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!andrew.cmu.edu!mc3i+ From: mc3i+@andrew.cmu.edu (Martin Costabel) Newsgroups: comp.text Subject: Re: tabstop according to longest line Message-ID: <cY78WFy00Xs1M8o0gC@andrew.cmu.edu> Date: 14 Mar 89 03:35:45 GMT References: <16709@cisunx.UUCP> Organization: Mathematics, Carnegie Mellon, Pittsburgh, PA Lines: 41 In-Reply-To: <16709@cisunx.UUCP>