[Top][All Lists]

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

Re: [Groff] PDF_IMAGE and MOM

From: Dale Snell
Subject: Re: [Groff] PDF_IMAGE and MOM
Date: Mon, 3 Nov 2014 14:21:09 -0800

On Mon, 03 Nov 2014 21:23:32 +0000
Keith Marshall <address@hidden> wrote:

> On 03/11/14 20:16, Dale Snell wrote:
> > On Mon, 03 Nov 2014 16:36:04 +0000
> > Ralph Corderoy wrote:
> >> BTW, your 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.

True.  I know it's a GNU extension, but I wasn't considering the
use of \# in a non-GNU [nt]roff.  I suspect it would result in an
error message.  I certainly hope so, anyway.  My main observation
really was that ".\#" and "\#" are identical; there's no need to
prefer one over the other.

> 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.

Oh, definitely.  I don't think I've ever used \# in the middle of
a line.  I don't do that sort of thing very often anyway;
normally such comments go in the previous line.

> > 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.

Ah, I wasn't aware of that.  Thank you for the heads up.  Almost
all of my *roffing is with Groff and mom, and there I almost
always set .blm to PP.  So if I have a blank line, it's to start a
new paragraph.  I do have the occasional foray into man, and I
generally don't set .blm then.  For some reason, I've never stuck
blank lines in what raw troff I do have.  Perhaps because all of
the examples I've seen never do it either.  To be honest, I don't
do much with raw troff code, or macro sets other than mom and
maybe man, so I don't usually consider non-Groff situations.

BTW, out of my 'satiable curiosity, is mom being used by other
*roffs, or is it strictly Groff?


"Text processing has made it possible to right-justify any idea, even
one which cannot be justified on any other grounds."
                -- J. Finnegan, USC.

Attachment: signature.asc
Description: PGP signature

reply via email to

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