groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] PDF_IMAGE and MOM


From: Keith Marshall
Subject: Re: [Groff] PDF_IMAGE and MOM
Date: Mon, 03 Nov 2014 21:23:32 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 03/11/14 20:16, Dale Snell wrote:
> On Mon, 03 Nov 2014 16:36:04 +0000
> Ralph Corderoy wrote:
>> BTW, your mombog.mom had a blank line at the start and the comments
>> were lines starting `\#' rather than `.\#'.  One or the other might
>> have an affect on your attempt at A3 in mom, I don't know.
> 
> "\#" is a _groff_ comment,

Yes, but it's explicitly a GNU troff extension to standard troff
grammar; it may not produce the desired effect, were you to process your
input through any other troff implementation.

The standard, and thus intrinsically portable, closest equivalent is
`\"'; however, it is not entirely equivalent, since `\#' swallows the
following newline, (at the end of the comment), whereas `\"' does not.
(For a whole line comment, the portable equivalent to `\#' is `.\"').

> not mom's.  Mom shouldn't care.  If she
> does, she needs to be chastised, but I think she's safe.  The only
> time I use anything different is when I want an "in-line" comment.
> E.g.,
> 
>   .MY_MACRO ARG ARG \" this is a silly example

Here, you almost certainly don't want the comment to swallow the
newline, so `\#' would surely be unsuitable.  If you always use `\"' for
comments, and always append them to lines which begin with a (maybe
empty) request, you don't have to worry about the distinction.

> As for the blank line at the top of the file, I don't think mom cares.
> I just tried adding a blank line to one of my mom files, and there was
> no change.  Of course, I didn't have any PS or PDF images in it, so it
> wasn't really a good test.

In general, blank lines in troff input *are* significant; they induce a
break, and introduce vertical white space in the output.  At the start
of a document, where space mode is inactive, you may not observe the
effect, but relying on such quirks generally is inadvisable.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]