Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!zaphod!ncar!csn!news!grunwald From: grunwald@foobar.colorado.edu (Dirk Grunwald) Newsgroups: comp.text.tex Subject: Re: Request for a more intelligent underline{} macro. Message-ID: <1991Jan14.235759.5765@csn.org> Date: 14 Jan 91 23:57:59 GMT References: <1309@happy.osc.edu> Sender: news@csn.org Reply-To: grunwald@foobar.colorado.edu Organization: University of Colorado at Boulder Lines: 20 In-Reply-To: spencer@cgrg.ohio-state.edu's message of 14 Jan 91 18:48:43 GMT Nntp-Posting-Host: foobar.colorado.edu Actually, some one mailed me the underline code. A little hacking produces the following example. The original code was a little liberal with spaces in the code, which produces an extra space after each word in the underlined region. This version corrects that and gives a single underlined space between words. \documentstyle{article} \def\underl#1 {\leavevmode\let\first=\relax\underli #1 } \def\underli#1 {\ifx\let\next=\relax\unskip \else\let\next=\underli\first\ulinebox{#1}\fi\let\first=\undersp\next} \def\undersp{\penalty50\ulinebox{\space}\penalty50} \def\ulinebox#1{\vtop{\hbox{\strut#1}\hrule}}%Taken from TexHax v.88, 52 \begin{document} \underl now is the time for all now is the time for all good men to now is the time now is the nownownow now iw is fhgdkhfd dfygdfg fkudshf & \end{document}