Re: [PATCH v2 3/4] zic.8: Use correct escape sequences instead of special characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2022-11-26 13:19, G. Branden Robinson wrote:
I would attach scans of Tables I and II from "NROFF/TROFF User's
Manual", the version dated 1976, published with Volume 2 of the Unix
Programmer's Manual (1979)

Thanks for looking into this. It took me a trip down memory lane as I believe I was the first person to submit a computer-typeset PhD thesis to UCLA. I used 7th Edition Unix troff along with the C/A/T phototypesetter that was troff's main target in the 1970s. (As an aside, the C/A/T was why stderr was invented; see Diomidis Spinellis's "The Birth of Standard Error" 2013-12-11 <https://www.spinellis.gr/blog/20131211/>.)

Solaris 10 /usr/bin/troff is largely unchanged from 1970s troff, and supports \(ga but none of the other escapes you mention, I expect because they were not present in the Bell Labs special font version 4 and Commercial II that Unix assumed on the C/A/T. The source code of 7th Edition Unix troff agrees with Solaris 10 behavior here, and this also agrees with 7th Edition Unix /usr/doc/troff/table2 which documents \(ga but none of the other escapes you mentioned. I'm a bit surprised that the printed manuals you mention disagree with 7th Edition Unix, but anyway it doesn't matter all that much since Solaris 10 is what it is.

On other words, on Solaris 10 if I take this file 'foo':

	.nf
	default font
	aq |\(aq| |'|
	ga |\(ga| |`|
	ha |\(ha| |^|
	ti |\(ti| |~|
	.ft CW
	CW font
	aq |\(aq| |'|
	ga |\(ga| |`|
	ha |\(ha| |^|
	ti |\(ti| |~|

and run the shell command:

   /usr/bin/troff foo | /usr/lib/lp/postscript/dpost >foo.ps

I get the attached file foo.ps, and 'evince' says only \(ga works and even there it's barely usable in the default font, as shown in the attached screenshot foo.png of 'evince' displaying foo.ps.


.ie \n(.g .q \f(CR!$%&\(aq()*,/:;<=>?@[\e]\(ha\(ga{|}\(ti\fP .
.el .ie t .q \f(CW!$%&'()*,/:;<=>?@[\e]\(ha\(ga{|}\(ti\fP .
.    el   .q !$%&'()*,/:;<=>?@[\e]\(ha\(ga{|}\(ti .

With Solaris 10 in mind, in the second line of your proposed code the \f(CW...\fP and the \(ga are OK but the \(ha, \(ga, \(ti are dubious so I installed the attached patch instead.

Attachment: foo.ps
Description: PostScript document

Attachment: foo.png
Description: PNG image

From 897c2968f128b7854a486405bb68666265b38b24 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@xxxxxxxxxxx>
Date: Sat, 26 Nov 2022 15:44:18 -0800
Subject: [PROPOSED] * zic.8: Work better with Solaris 10 troff.

---
 zic.8 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/zic.8 b/zic.8
index ccd012b3..019a289c 100644
--- a/zic.8
+++ b/zic.8
@@ -350,6 +350,7 @@ nor
 To allow for future extensions,
 an unquoted name should not contain characters from the set
 .ie \n(.g .q \f(CR!$%&\(aq()*,/:;<=>?@[\e]\(ha\(ga{|}\(ti\fP .
+.el .ie t .q \f(CW!$%&'()*,/:;<=>?@[\e]^\(ga{|}~\fP .
 .el .q !$%&'()*,/:;<=>?@[\e]^`{|}~ .
 .TP
 .B FROM
-- 
2.37.2


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux