* [TUHS] getting nroff to underline in v6,v5
2015-09-27 8:33 [TUHS] getting nroff to underline in v6,v5 Mark Longridge
2015-09-27 15:51 ` John Cowan
@ 2015-09-27 18:00 ` Clem Cole
2015-09-27 18:12 ` Random832
2 siblings, 0 replies; 7+ messages in thread
From: Clem Cole @ 2015-09-27 18:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3392 bytes --]
below
On Sun, Sep 27, 2015 at 4:33 AM, Mark Longridge <cubexyz at gmail.com> wrote:
> It seems that nroff had the ability to show underlined text very early
> on, possibly as early as v3 according to the v3 manual
>
yes
>
> Maybe there was the ability to use overstrike characters on the teletype?
>
Overprinting was a popular idea, particularly with line printers
(i.e. devices that printed multiple characters at the same time on a
single line), as well one character at a time devices modeled after the
ttywrite.
Remember, nroff's "native" terminal is a Teleptype Corp Model 37, which
were fairly popular n the labs in those days. The Teletype machines
printed one character at a time, and needs command characters to move
"platten" up or down and "carriage" back and forth. The <CR><LF> idiom
is left over from those days.
As others have pointed out, Char ^H NewChar was a standard way to print
things on single chracter devices. As was also point out that was not
the best way to do over strike with a line printer, so there were Unix
filters to take reorder the data written, and add spaces as needed so the
line printer's output looked the same.
Again, as other point out this trick did not work well with some early
video terminals.
>
> In bash I can use:
>
> echo -e "\e[4munderline\e[0m"
>
You are mixing times I'm afraid. The \e[4m and \e[0m ideom is very late
in the game. Those are called ANSI screen sequences. To being with,
each manufacturer of "data terminating equipment (aka a DTE or a
"terminal") define how it would interpret what codes. As an industry we
first had agree on a code set (US ASCII - heck by the early 1980's CDC's
system could not agree on a character set - as another side bar, the #1
first behind ASCII was IBM and the 360 was supposed to be an ASCII machine,
but management made then ship it as EBCDIC machine for cost containment
reasons when OS/360 was late).
So by the 1970s, most systems were using 7-bit ASCII to print character
glyfs, but what the DTE did with with other things be it screen
manipulation, overprint, underline, cursor movement was all of the map.
Btw the late 1970, BSD would introduce "termcap" to solve the problem for
programs, and manufactures got together and agreed on soem screen sequences
(the ANSI sequences you refer).
Again, as an interesting twist. The VT-100 was not fully ANSI compliant -
its similar but it's not ANSI. The DEC terminal group took an earlier
(draft) version of the spec and used that to create the VT-100 (I used to
work with one of them in another life but that's another story). They
"embraced" and "extended" the ANSI terminal sequence (and VMS of course
used the DEC version of the sequences). By the time of publishing of the
ANSI standard, the VT-100 had already become the most popular terminal on
the market, so the "Vt-100" compatible terminal became de jigur - as
manufacturers wanted sell terminal that could talk to VMS. Eventually
folks like Wyse (and even DEC in later versions of the VT series), had both
VT-100 "broken" mode and pure "ANSI" mode.
Clem
>
> Shouldn't be too hard to hack up something that works in emulated v5.
>
> Mark
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20150927/50010e40/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] getting nroff to underline in v6,v5
2015-09-27 8:33 [TUHS] getting nroff to underline in v6,v5 Mark Longridge
2015-09-27 15:51 ` John Cowan
2015-09-27 18:00 ` Clem Cole
@ 2015-09-27 18:12 ` Random832
2 siblings, 0 replies; 7+ messages in thread
From: Random832 @ 2015-09-27 18:12 UTC (permalink / raw)
Mark Longridge <cubexyz at gmail.com> writes:
> It seems that nroff had the ability to show underlined text very early
> on, possibly as early as v3 according to the v3 manual.
>
> I haven't managed to get this to work right under simh but I was
> thinking maybe there's a way to do it. It needs an 'underline font'
> but the mechanism of how this worked in the old days is a bit of
> mystery to me. The output device would have to have the ability to
> either display or print underlined text. Maybe someone can remember
> which terminal devices supported this in the old days which worked
> "out of the box" in the v5,v6 era.
>
> Maybe there was the ability to use overstrike characters on the teletype?
>
> In bash I can use:
>
> echo -e "\e[4munderline\e[0m"
The proper escape sequence to end underline is technically \e[24m; using
0 here ends all other formats (bold, color) as well.
> Shouldn't be too hard to hack up something that works in emulated v5.
The "ul" utility, which converts from overstrikes to termcap-based
escape sequences, first appeared in 3.0BSD.
The source code is here:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/src/cmd/ul.c
It'd probably be pretty easy to rip out the termcap dependency and have
it just output ansi codes, though I don't know what dialect of C works
on v5.
1BSD to 3BSD also had an "iul" utility which just printed a row of
dashes under characters to be underlined instead of using escape
sequences. In 2.9BSD and 4BSD and later this functionality is provided
by "ul -i".
http://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/s6/iul.c
It looks like this wouldn't be hard to modify to use escape sequences
instead, and it uses the oldest C dialect of any of these versions.
From 4.1c BSD, ul also handles bold, which is represented by
self-overstriking in the nroff output, and represents superscript and
subscript (half-linefeed) with dim attributes. Any missing attributes
are represented with standout. This is essentially the same
functionality available in modern versions of ul.
^ permalink raw reply [flat|nested] 7+ messages in thread