[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] End-of-line whitespace.
From: |
Ralph Corderoy |
Subject: |
Re: [Groff] End-of-line whitespace. |
Date: |
Sat, 08 May 2010 13:00:36 +0100 |
Hi Kristaps,
> Are there any concrete reasons for avoiding trailing eoln whitespace
> in roff files (specifically -man and/or -mdoc)? These are stripped
> from input anyway "foo " followed by "bar" outputs "foo bar", so
> I'm hard up for providing a reason beyond "Do It".
It's generally a good idea in all text files since it isn't obvious to
the reader it's present and may sometimes have significance. In troff,
end-of-line whitespace is significant.
$ cat -A eolspc.tr
.ds s foo $
"\*s"$
$ nroff eolspc.tr | grep .
"foo "
$
Here, GNU cat's -A option is appending `$' to the end of the lines,
showing `foo' on the first line of eolspc.tr has a trailing space. That
makes it into the definition of string `s' as can be see in the output
of nroff.
Cheers,
Ralph.