% underlin.tex - real multi-word underlining
% By Stephen Gildea <gildea@x.org> January 1995.

% Usage: \textul{text to underline}

\def\textul#1{\leavevmode\let\textulnext=\textuli\textuli#1 & }
\def\textuli#1 {\ifx&#1\unskip\let\textulnext=\relax\else
  \textulword{#1}\textulspace\fi \textulnext}
\newskip\textulspskip		%saved size of a space
\def\textulword#1{%
  \setbox0\hbox{#1\space\global\textulspskip=\the\lastskip\unskip}%
  \dimen0=\dp0\dp0=1.2pt
  \setbox0\vtop{\box0\hrule}\ifdim\dp0<\dimen0\dp0=\dimen0\fi \box0}
\def\textulspace{\leaders\hrule height -1.2pt depth 1.6pt
                         \hskip\textulspskip}

% For a much fancier version with many options (e.g., strikeout),
% see ulem.sty in the CTAN archive.
