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

Paul Eggert eggert at cs.ucla.edu
Sun Nov 27 00:12:25 UTC 2022


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.ps
Type: application/postscript
Size: 5691 bytes
Desc: not available
URL: <https://mm.icann.org/pipermail/tz/attachments/20221126/a4a6773b/foo.ps>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.png
Type: image/png
Size: 4509 bytes
Desc: not available
URL: <https://mm.icann.org/pipermail/tz/attachments/20221126/a4a6773b/foo.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-zic.8-Work-better-with-Solaris-10-troff.patch
Type: text/x-patch
Size: 647 bytes
Desc: not available
URL: <https://mm.icann.org/pipermail/tz/attachments/20221126/a4a6773b/0001-zic.8-Work-better-with-Solaris-10-troff.patch>


More information about the tz mailing list