🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.groff.bug
Article #30

sticky problem with -TX75, .eo, and ^

#30
From: Paul Eggert
Date: Thu, 30 Jul 1992 23:42
95 lines
3532 bytes
GROFF VERSION: 1.05

MACHINE: Sun 4/60

OS: SunOS 4.1.2

COMPILER: gcc 2.2.2

INPUT FILES:
.\" This input is taken from RCS's rcsfile(5) man page.
.nf
.vs 12
.ne 38
Example:
.if t .in +0.5i
.cs 1 20
.eo

                           Head
                             |
                             |
                             v                        / \
                         ---------                   /   \
   / \          / \      |       |      / \         /     \
  /   \        /   \     |  2.1  |     /   \       /       \
 /     \      /     \    |       |    /     \     /         \
/1.2.1.3\    /1.3.1.1\   |       |   /1.2.2.2\   /1.2.2.1.1.1\
---------    ---------   ---------   ---------   -------------
    ^            ^           |           ^             ^
    |            |           |           |             |
    |            |           v           |             |
   / \           |       ---------      / \            |
  /   \          |       \  1.3  /     /   \           |
 /     \         ---------\     /     /     \-----------
/1.2.1.1\                  \   /     /1.2.2.1\
---------                   \ /      ---------
    ^                        |           ^
    |                        |           |
    |                        v           |
    |                    ---------       |
    |                    \  1.2  /       |
    ----------------------\     /---------
                           \   /
                            \ /
                             |
                             |
                             v
                         ---------
                         \  1.1  /
                          \     /
                           \   /
                            \ /

.ec
.if t .in
.cs 1
.ce
Fig. 1: A revision tree
.vs
.fi

COMMAND LINE: groff -TX75

DESCRIPTION OF INCORRECT BEHAVIOUR:
Every instance of `^' in the output is displayed as a bunch of
characters of the form \v'-.55m...' instead of as `^'.

The problem is the following source code lines:

dvi/tmac.dvi:.char _ \v'.23m'\D'R .5m .04m'\v'-.04m'\v'-.23m'
xditview/tmac.X:.char ~ \v'-.55m'\\s[\\n(.s/2u]\v'.2m'\(ti\v'-.2m'\s0\v'.55m'
xditview/tmac.X:.char ^ \v'-.55m'\\s[\\n(.s/2u]\v'.3m'\(ha\v'-.3m'\s0\v'.55m'

These lines mean that the old-fashioned (and heretofore quite portable) idiom

	.eo
	draw a picture with Ascii characters
	.ec

doesn't always work for the Ascii characters _, ~, and ^.

SUGGESTED FIX:
The simplest fix is to remove the three .char lines quoted above.
But they must have been put there for a reason.

I can work around the problem by removing .eo and .ec and doubling \,
but this makes the source picture unreadable.  I can also use

	.if \n(.g .char ^ ^

but to be safe I guess I'd have to do that for each distinct character
in the picture, and I see no way to save the old .char definition and
restore it after the picture is done; this is quite awkward.

I'm not sure what else to do about this problem, other than to document it.
Technical Details
Message-ID: <9207302342.AA04499@farside.twinsun.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!twinsun.COM!eggert

Show Full Headers
Complete Article Headers
Newsgroups: gnu.groff.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!twinsun.COM!eggert
From: eggert@twinsun.COM (Paul Eggert)
Subject: sticky problem with -TX75, .eo, and ^
Message-ID: <9207302342.AA04499@farside.twinsun.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 30 Jul 1992 23:42:13 GMT
Approved: bug-groff@prep.ai.mit.edu
Lines: 96