[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] ".if '...'...' \# comments ..." Bug?
From: |
Andrew J. Piziali |
Subject: |
Re: [Groff] ".if '...'...' \# comments ..." Bug? |
Date: |
Mon, 12 Apr 2004 08:30:39 -0500 (CDT) |
Alejandro, you wrote:
1. When you end a line with \ you have for all practical purposes
added an unpaddable space at the end of the line, not escaped it.
2. Quoting from groff(7):
"""
The roff language is line-oriented. There are only two kinds of
lines, control lines and text lines. The control lines start with
a control character, by default a period "." or a single quote
"'"; all other lines are text lines.
"""
and
"""
Requests are written on a line of their own starting with a dot `.'
or a "'", whereas Escape sequences are in-line functions and in-word
formatting elements starting with a backslash `\'.
"""
That is, all requests are of the forms: (a) "<eol>." for line
breaking requests and (b) "<eol>'" for non-line breaking requests.
3. ``\#'' eliminates the <eol> and therefore (a) makes your
conditional invalid, and (b) of course it works as you show above.
Therefore:
.if '\*[FunctionalVerificationAspectsFigure]'' . ds
FunctionalVerificationAspectsFigure 999
[on one long line] is not valid.
I still do not understand why an .if request of the form
.if 'xxx'yyy' . ds String1 999
is invalid. The groff info page explicitly says everything following
the .if expression is interpreted as though it was on its own line:
- Request: .if expr anything
Evaluate the expression EXPR, and executes ANYTHING (the remainder
of the line) if EXPR evaluates to non-zero (true). ANYTHING is
interpreted as though it was on a line by itself (except that
leading spaces are swallowed).
--
|
address@hidden ________------+------________
/ \
*---*