Discussion:
Where is the true underline?
(too old to reply)
u***@yahoo.com
2007-09-16 22:25:27 UTC
Permalink
Hi all,

I just tried using \underline{text} in Latex, but I've discovered
that this is not a true underline. So for instance,
if I underline the word "yippie", the line will go under
the y's and p letters' underhanging tails. A true underline
would go through the tails.

Is there perhaps a true underline command somewhere?

Thanks.
Peter Flynn
2007-09-16 22:38:33 UTC
Permalink
Post by u***@yahoo.com
Hi all,
I just tried using \underline{text} in Latex, but I've discovered
that this is not a true underline. So for instance,
if I underline the word "yippie", the line will go under
the y's and p letters' underhanging tails. A true underline
would go through the tails.
Is there perhaps a true underline command somewhere?
I think you can adjust the height of the underline in the ulem package.

///Peter
Bob Tennent
2007-09-17 12:00:38 UTC
Permalink
Post by u***@yahoo.com
I just tried using \underline{text} in Latex, but I've discovered
that this is not a true underline. So for instance,
if I underline the word "yippie", the line will go under
the y's and p letters' underhanging tails. A true underline
would go through the tails.
I guess you're calling this a "true" underline because the word
processor you're used to does this. Underlining is almost always a
typographic mistake in a typeset document. Drawing lines through
descenders is an abomination. Even a brain-dead human underliner
would hesitate to underline through characters.

If you want your document to look like it was produced by a dumb
word-processor, use a dumb word-processor.
Jellby
2007-09-17 13:09:50 UTC
Permalink
Post by Bob Tennent
Underlining is almost always a
typographic mistake in a typeset document. Drawing lines through
descenders is an abomination. Even a brain-dead human underliner
would hesitate to underline through characters.
But it's sometimes useful. I've used it to "fake" forms (and character
sheets for roleplaying games). Whether the underline should go across the
descenders is, of course, arguable; what's really important is that the
position is constant and does not depend on whether the text has descenders
or not (something achieved by ulem, if I remember correctly).

When writing by hand, I usually cross the descenders or, if I want to be
careful, I leave a gap around them. This would probably be the best option,
but I guess it's not the easiest... maybe a combination of the ulem
(patched if necessary) and contour packages would do.
--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com
a***@triumf.ca
2007-09-18 03:58:11 UTC
Permalink
Post by Jellby
When writing by hand, I usually cross the descenders or, if I want to be
careful, I leave a gap around them. This would probably be the best option,
http://groups.google.com/group/comp.text.tex/browse_thread/thread/cbf21af461a0c57e/434d4b58e7306abb
Will Robertson
2007-09-18 23:02:32 UTC
Permalink
Post by Jellby
maybe a combination of the ulem
(patched if necessary) and contour packages would do.
Wow, I hadn't seen the contour package before. The fake method is a
bit of a hack, but unless you're using XeTeX (damn) it'll do native
outlines for you. Non--descender crossing in underlines makes them
quite handsome as far as it goes...(if you just gotta do it, for urls
or something)

If no-one else attempts the suggestion above, I'll add it to my (ever-
growing) list of little packages that I shouldn't spend as much time
on as I do...

Wo;;
Will Robertson
2007-09-18 23:07:42 UTC
Permalink
Post by Jellby
maybe a combination of the ulem
(patched if necessary) and contour packages would do.
Wow, I hadn't seen the contour package before. The fake method is a
bit of a hack, but unless you're using XeTeX (damn) it'll do native
outlines for you. Non--descender crossing in underlines makes them
quite handsome as far as it goes...(if you just gotta do it, for urls
or something)

A little package to do this (or even an official addition to ulem)
would
be a nice idea. (I notice that Other Don's done all the hard work
years ago,
as always, so the package shouldn't take too long to put together.)

Will
Bob Tennent
2007-09-19 12:30:50 UTC
Permalink
Post by Jellby
When writing by hand, I usually cross the descenders or, if I want to be
careful, I leave a gap around them. This would probably be the best option,
but I guess it's not the easiest...
How hard would it be to hack a font to create an underlined variant? I
should think that one could start by adding "underlining" strokes to all
glyphs at a suitable depth and then create "gaps" for the glyphs that
have lower descenders using a font editor such as fontforge.

Bob T.
anon k
2007-09-17 14:45:39 UTC
Permalink
Post by Bob Tennent
Post by u***@yahoo.com
I just tried using \underline{text} in Latex, but I've discovered
that this is not a true underline. So for instance,
if I underline the word "yippie", the line will go under
the y's and p letters' underhanging tails. A true underline
would go through the tails.
I guess you're calling this a "true" underline because the word
processor you're used to does this. Underlining is almost always a
typographic mistake in a typeset document. Drawing lines through
descenders is an abomination. Even a brain-dead human underliner
would hesitate to underline through characters.
I haven't researched this to any depth, but I have come across
assertions that underlining was purely a manuscript alternative to
italic text for those who could not change their hand so well. In older
manuscript, you find that writers really can change back and forth with
no apparent difficulty.

Then the same problem occurred in early typewriters, so typescript
adopted underlining too.

And from typescript, people gradually came to think that it was an
acceptable feature of letterpress.
Post by Bob Tennent
If you want your document to look like it was produced by a dumb
word-processor, use a dumb word-processor.
Or if your task is to mimic typescript, or underlined manuscript.
John Harper
2007-09-17 21:55:24 UTC
Permalink
Post by anon k
I haven't researched this to any depth, but I have come across
assertions that underlining was purely a manuscript alternative to
italic text for those who could not change their hand so well.
Not quite. When I started writing stuff to be printed, in that ancient
era when computers were not yet used for the purpose, an underline was
an instruction to the human typesetter to put the underlined stuff in
italics, two underlines looking like ====== were for small caps, three
for normal-sized upper case, and a wiggly underline was an instruction
to use bold font.

For that reason many of us still indicate a vector by a wiggly underline
when writing by hand on paper, blackboard or whiteboard.

-- John Harper, School of Mathematics, Statistics and Computer Science,
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail ***@vuw.ac.nz phone (+64)(4)463 5341 fax (+64)(4)463 5045
anon k
2007-09-18 16:06:05 UTC
Permalink
Post by John Harper
Post by anon k
I haven't researched this to any depth, but I have come across
assertions that underlining was purely a manuscript alternative to
italic text for those who could not change their hand so well.
Not quite. When I started writing stuff to be printed, in that ancient
era when computers were not yet used for the purpose,
Ancient? You and I are several centuries after the practise that I am
referring to. If you poke around for long enough in diaries, account
books and commonplace books, you'll find plenty of manuscript that has
underlining but was never intended for printers. I would guess that
your university or the Alexander Trumbull Library would be good places
to look for this; I hear that there is an important Milton collection in
Wellington that would likely have motivated the collection of manuscript
as well.
Post by John Harper
an underline was
an instruction to the human typesetter to put the underlined stuff in
italics, two underlines looking like ====== were for small caps, three
for normal-sized upper case, and a wiggly underline was an instruction
to use bold font.
Some of us still use these notations, for example when transcribing
(especially for transcribing title pages). This underlining notation is
much more evident to the reader than are replicated font features. When
the underlines are transcription notations, they naturally go into print
like that.
Post by John Harper
For that reason many of us still indicate a vector by a wiggly underline
when writing by hand on paper, blackboard or whiteboard.
-- John Harper, School of Mathematics, Statistics and Computer Science,
Victoria University, PO Box 600, Wellington 6140, New Zealand
Laurence Finston
2007-09-17 15:04:41 UTC
Permalink
Post by u***@yahoo.com
Is there perhaps a true underline command somewhere?
Knuth writes about this topic in _The TeXbook_.

If you want an underline at a particular depth, you can get it like
this:

\def\UL#1{\begingroup\setbox0=\hbox{#1}\leavevmode
\hbox to 0pt{\vrule depth 1pt height -.75pt width \wd0\hss}%
#1\endgroup}

abc\UL{pqy}def

I don't see any major holes in this, but it still isn't guaranteed to
be completely bullet-proof.

You could also set the height, depth, and width of the rule using
additional arguments.

Laurence Finston
Harald Hanche-Olsen
2007-09-17 19:01:51 UTC
Permalink
Post by Laurence Finston
Post by u***@yahoo.com
Is there perhaps a true underline command somewhere?
Knuth writes about this topic in _The TeXbook_.
IIRC, he also states that if you really want underlines done right,
you should have an underlined font in which to do it.

The only place I know of where large amounts of underlining is
necessary, is in certain legal documents which may need to contain
pages of underlined and/or capitalized text. It's enough to make me
glad I'm not a lawyer.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
Javier Bezos
2007-09-18 15:04:21 UTC
Permalink
Post by Harald Hanche-Olsen
Post by Laurence Finston
Knuth writes about this topic in _The TeXbook_.
IIRC, he also states that if you really want underlines done right,
you should have an underlined font in which to do it.
And spaces? A font would underline words, not text.

For underlining I use soul. Spacing behaves as expected and
words are hyphenated if necessary at the end of a line, too.

Javier
-----------------------------
http://www.texytipografia.com
t***@gmail.com
2007-09-17 18:35:13 UTC
Permalink
Post by u***@yahoo.com
Hi all,
I just tried using \underline{text} in Latex, but I've discovered
that this is not a true underline. So for instance,
if I underline the word "yippie", the line will go under
the y's and p letters' underhanging tails. A true underline
would go through the tails.
Is there perhaps a true underline command somewhere?
Thanks.
You could try \underline{\smash[b]{text}}. The \smash[b]{text} command
will cause "text" to have no depth.
Dan
2007-09-17 19:28:47 UTC
Permalink
Post by t***@gmail.com
Post by u***@yahoo.com
Hi all,
I just tried using \underline{text} in Latex, but I've discovered
that this is not a true underline. So for instance,
if I underline the word "yippie", the line will go under
the y's and p letters' underhanging tails. A true underline
would go through the tails.
Is there perhaps a true underline command somewhere?
Thanks.
You could try \underline{\smash[b]{text}}. The \smash[b]{text} command
will cause "text" to have no depth.
This needs the amsmath package. You can use plain \smash (without
[b]) if amsmath is not loaded.


Dan
c***@colorado.edu
2007-09-18 17:48:43 UTC
Permalink
Is there perhaps a trueunderlinecommand somewhere?
Thanks.
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?
Robin Fairbairns
2007-09-19 09:04:02 UTC
Permalink
Post by c***@colorado.edu
Is 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
c***@colorado.edu
2007-09-19 16:20:35 UTC
Permalink
Post by Robin Fairbairns
Post by c***@colorado.edu
Is 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.

In 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?
Dan
2007-09-19 17:55:16 UTC
Permalink
Post by c***@colorado.edu
Post by Robin Fairbairns
Post by c***@colorado.edu
Is 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.edu
In 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.


Dan
anon k
2007-09-21 18:41:30 UTC
Permalink
Post by Dan
Post by c***@colorado.edu
Post by Robin Fairbairns
Post by c***@colorado.edu
Is 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.edu
In 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).
Robin Fairbairns
2007-09-21 21:39:52 UTC
Permalink
Post by anon k
I can imagine needing underlines like this to imitate manuscript or for
a notation-heavy transcription. So how about using a rule (or several
\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.
i used the ulem package (which has a \uuline for double underline) as
part of my strategy for capturing the "feel" of my father's wartime
letters, when i was creating an edition of them.
Post by anon k
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.
ulem does that, of course.
Post by anon k
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).
true; something i'd not thought of. still, if _word_ does it, we ...
possibly needn't bother at all?
--
Robin Fairbairns, Cambridge
Javier Bezos
2007-09-21 17:55:58 UTC
Permalink
-is 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?
Actually, it's Word what is trying to imitate TeX. This
is a declared aim of the new equation editor (which doesn't
match the quality of TeX, of course, despite the claims
of the Microsoft people).

Javier
-----------------------------
http://www.texytipografia.com
Continue reading on narkive:
Loading...