[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] .IP quoting incompatibility
From: |
Larry Jones |
Subject: |
Re: [Groff] .IP quoting incompatibility |
Date: |
Wed, 13 Jun 2001 12:19:50 -0400 (EDT) |
Werner LEMBERG writes:
>
> Sigh. It's a not a bug in GNU troff, I think.
Well, it's an incompatibility then. It seems to involve argument
substitution inside quoted strings. Consider the following:
.de XX
\\$1
..
.de YY
.XX "\\$1"
..
.YY "$"""""
According to the parsing rules, YY gets called with $1 set to $"". When
it calls XX, Unix troff seems to do literal textual substitution, so the
call is:
.XX "$"""
(that is, the inserted quotes are just inserted literally without
reguard to being in a quoted string) and thus XX gets called with $1 set
to $". groff, on the other hand, does seem to note that the
substitution is in a quoted string and thus, in effect, doubles the
quotes to preserve them, acting as if the call were:
.XX "$"""""
Thus, Unix troff's final output is:
$"
whereas groff's is:
$""
-Larry Jones
These findings suggest a logical course of action. -- Calvin