The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] getting nroff to underline in v6,v5
@ 2015-09-27 23:48 Doug McIlroy
  0 siblings, 0 replies; 7+ messages in thread
From: Doug McIlroy @ 2015-09-27 23:48 UTC (permalink / raw)


> It seems that nroff had the ability to show underlined text very early

Pre-Unix roff had the .ul request. Thus I expect (but haven't checked)
that it was in Unix roff. It would be very surprising if nroff, which was
intended to be more capable that roff, didn't have some underlining
facility right from the start.

Doug



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] getting nroff to underline in v6,v5
  2015-09-27 16:10   ` Ronald Natalie
@ 2015-09-27 23:55     ` scj
  0 siblings, 0 replies; 7+ messages in thread
From: scj @ 2015-09-27 23:55 UTC (permalink / raw)


Gad, that triggers memories.  There was a program on our GE mainframe that
output LF/CR instead of CR/LF.  The terminal driver would do the linefeed
and then laboriously space out until it was under the previous cursor
position, and then do the CR.  Great for raising your blood pressure and
stimulating streams of nasty invective against GE.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] getting nroff to underline in v6,v5
  2015-09-27  8:33 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

* [TUHS] getting nroff to underline in v6,v5
  2015-09-27  8:33 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 15:51 ` John Cowan
@ 2015-09-27 16:10   ` Ronald Natalie
  2015-09-27 23:55     ` scj
  0 siblings, 1 reply; 7+ messages in thread
From: Ronald Natalie @ 2015-09-27 16:10 UTC (permalink / raw)


And there were a whole slew of filters like nobsp that either stripped out the over(under?)struck characters or reformatted them so it worked on your lineprinter efficently.      I remember the lineprinter we had if you fed it line with a backspace it would print the line up to the backspace and then overstrike it going forward.   If you had multiple backspaces (like a whole sentene) the thing stuck there just doing the overstrike.   It was more efficient to write a filter that changed the _ BS X for each letter to one line of text, a CR (no LF), and then another line of overstrike.

> On Sep 27, 2015, at 11:51 AM, John Cowan <cowan at mercury.ccil.org> wrote:
> 
> Mark Longridge scripsit:
> 
>> Maybe there was the ability to use overstrike characters on the teletype?
> 
> That's inherent in the nature of printing terminals: 'X', BS, '_' worked
> fine on all such terminals to produce an underlined X.  Later it was
> found to be better to use '_', BS, 'X', which looked the same on actual
> TTYs or equivalents (LA34/36) and was greatly superior on video terminals.
> 
> -- 
> John Cowan          http://www.ccil.org/~cowan        cowan at ccil.org
> Any sufficiently-complicated C or Fortran program contains an ad-hoc,
> informally-specified bug-ridden slow implementation of half of Common Lisp.
>        --Greenspun's Tenth Rule of Programming (rules 1-9 are unknown)
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] getting nroff to underline in v6,v5
  2015-09-27  8:33 Mark Longridge
@ 2015-09-27 15:51 ` John Cowan
  2015-09-27 16:10   ` Ronald Natalie
  2015-09-27 18:00 ` Clem Cole
  2015-09-27 18:12 ` Random832
  2 siblings, 1 reply; 7+ messages in thread
From: John Cowan @ 2015-09-27 15:51 UTC (permalink / raw)


Mark Longridge scripsit:

> Maybe there was the ability to use overstrike characters on the teletype?

That's inherent in the nature of printing terminals: 'X', BS, '_' worked
fine on all such terminals to produce an underlined X.  Later it was
found to be better to use '_', BS, 'X', which looked the same on actual
TTYs or equivalents (LA34/36) and was greatly superior on video terminals.

-- 
John Cowan          http://www.ccil.org/~cowan        cowan at ccil.org
Any sufficiently-complicated C or Fortran program contains an ad-hoc,
informally-specified bug-ridden slow implementation of half of Common Lisp.
        --Greenspun's Tenth Rule of Programming (rules 1-9 are unknown)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] getting nroff to underline in v6,v5
@ 2015-09-27  8:33 Mark Longridge
  2015-09-27 15:51 ` John Cowan
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mark Longridge @ 2015-09-27  8:33 UTC (permalink / raw)


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"

Shouldn't be too hard to hack up something that works in emulated v5.

Mark



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-27 23:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-27 23:48 [TUHS] getting nroff to underline in v6,v5 Doug McIlroy
  -- strict thread matches above, loose matches on Subject: below --
2015-09-27  8:33 Mark Longridge
2015-09-27 15:51 ` John Cowan
2015-09-27 16:10   ` Ronald Natalie
2015-09-27 23:55     ` scj
2015-09-27 18:00 ` Clem Cole
2015-09-27 18:12 ` Random832

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).