Post by DanPost by c***@colorado.eduPost by Robin FairbairnsPost by c***@colorado.eduIs there perhaps a trueunderlinecommand somewhere?
The TeX native form
$\underline\hbox{text to be underlined}}$
works correctly in both LaTeX2e and Plain TeX: descenders
are not crossed.
It has to since that \underline is a TeX primitive. Can you imagine
Don Knuth accepting descender crossings?
indeed not (not least because it would be more difficult than what he
_did_ implement).
aiui, the op was concerned about what knuth _did_ implement, viz
underline below the lowest descender. which isn't what an underlined
font would do, since it would mean every glyph potentially had a
different depth of underlining.
i suppose such things have validity in maths (though all i can
remember, 40 years after getting my degree, is handwritten vectors
which would have been printed bold-face), but underlining in text
seems to be limited to people whose horizons were set by typewriters.
--
Robin Fairbairns, Cambridge
Web links are conventionally underlined. And that is not a math
construction.
Web links in professionally typeset books are almost never
underlined. Web links in usenet messages are not underlined
by my newsreader but rather displayed in a color of my choosing
(I chose black :). Web links in my browser are colored but not
underlined, unless a web page overrides that with underlining.
Web links in my email program are both blue and underlined.
Underlining web links obscure the underscore characters in
many URLs. In my opinion it is the worst possibly way to
display a URL.
Post by c***@colorado.eduIn Word documents, underlined paragraphs are common, and it is
professionally done. Select text, click on U toggle. It goes through
the
lowest descender, even if selecting the whole document. Do you
mean that Latex cannot imitate Word?
Why would we want LaTeX to imitate Word?
It has been said that the right way to do underlining in (La)TeX
is to use an already underlined font. Precious few of those have
been designed. A virtual font might do the job. It might even be
possible to write a script that takes any TeX font and produces
the virtually underlined version.
It is not the sort of thing I would ever need.
I can imagine needing underlines like this to imitate manuscript or for
a notation-heavy transcription. So how about using a rule (or several
rules) under the text to be underlined? Something like this:
\newcommand{\singleunderline}[1]
{
\newlength{\wordwidth}
\settowidth{\wordwidth}{#1}
#1\hspace{-\wordwidth}\rule[-1pt]{\wordwidth}{0.25pt}
}
Doubling or tripling the underline would be just a matter of backspacing
and adding more rules.
This is fairly straightforward for a word here or there, but making it
break across lines looks to be more complicated than I currently know
how to handle.
From the standpoint of physical type, you cannot underline through
descenders except by using an underlined font (I've never seen one) or
by printing the underlines during a separate pull through the press
(which contributes significantly to cost).