[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Underlining, again
From: |
Peter Schaffter |
Subject: |
[Groff] Underlining, again |
Date: |
Fri, 10 Sep 2010 14:51:22 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Can someone quickly remind me why .cu for the PostScript device
can't be made to behave like .cu when it's called for a TTY? In
other words, it underline glyphs and spaces rather than converting
text to italics?
Werner's ul.tmac is really clever, but I can't see how to get it to
work in all the circumstances where I need it in conjunction with
the mom macros. The difficulty is that .Underline requires an
argument, and there are places where isn't feasible to pass it one.
Mom is set up such that in normal typeset copy (.PRINTSTYLE TYPESET),
Some text \*[IT]more text\*[PREV] other text.
renders <more text> in italic, but if one switches to
typewriter-style output (.PRINTSTYLE TYPEWRITE), <more text> is
underlined.
The underlining is a gross hack that places an underscore beneath
each letter, with the result that spaces aren't underlined. In many
cases, this is acceptable, but when it comes to underlining book
titles in bibliographies generated with refer, it isn't.
Mom's refer formatting is based on the ms refer module and uses
.ref*field
to set up parameters for each field of a bibliographic entry
(author, title, publisher, etc). ref*field takes five args:
1) the field name (a single letter)
2) the punctuation character that separated the field from the
preceding one
3) a string with which to prefix the field
4) a string with which to postfix the field
5) a string to add after the punctuation character supplied by
the next field
Thus, for a book title,
.ref*field T . " \E*[IT]" "" "\E*[PREV]"
.Underline can't be used in a scenario like this.
What's needed is a macro that can be called inline in arg 3 to start
underlining, and another macro in arg 4 to stop underlining.
Even if ul.tmac could be coerced into behaving this way (I've
tussled with it, without success), it seems to me that the macros in
ul.tmac are an awful lot of hoops to jump through for something as
basic as underlining.
Hence wondering about .cu.
--
Peter Schaffter
Author of The Binbrook Caucus
http://www.schaffter.ca
- [Groff] Underlining, again,
Peter Schaffter <=