[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] ".if '...'...' \# comments ..." Bug?
From: |
Alejandro López-Valencia |
Subject: |
Re: [Groff] ".if '...'...' \# comments ..." Bug? |
Date: |
Sun, 11 Apr 2004 15:51:36 -0500 |
On Sun, 11 Apr 2004 12:49:43 -0500 (CDT), Andrew J. Piziali wrote in
<address@hidden>:
>Why? Because groff ignores the \#, as well as the rest of the line,
>including the newline. In the words of the groff info page:
>
> To avoid all this, `gtroff' has a new comment mechanism using the
> `\#' escape. This escape works the same as `\"' except that the
> newline is also ignored:
>
>
> Test
> \# comment
> Test
>
> produces
>
>
> Test Test
>
> as expected.
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
is not valid.
Alejo
--
Alejandro López-Valencia
http://dradul.tripod.com/
The limits of my language are the limits of my world.
(L. Wittgenstein)