groff
[Top][All Lists]
Advanced

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

Re: [Groff] mom and toggling pagination


From: Tadziu Hoffmann
Subject: Re: [Groff] mom and toggling pagination
Date: Wed, 7 Dec 2016 12:10:37 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

> > Also, it's generally not a good idea to put blank lines in
> > mom input files.  If you want a blank line in an input file,
> > put a period on a line by itself, as above.
> 
> Is this true for all groff input files, or is it specific to
> mom?  Also, why is it not a good idea?

It's true for *roff in general.  In classic [nt]roff a blank
input line would always produce a blank line in the output.
Usually, this is not really what you want.  If (like in TeX)
you want blank lines in the input to stand for paragraph
breaks, you might only want half a vertical line-space in
the output as paragraph separation.  Or maybe none at all,
and have paragraphs be indented instead.

That's why groff (as an extension of the CSTR54 language spec)
has the ability to invoke a specific macro when encountering a
blank line in the input.  You could use a do-nothing macro to
effectively ignore all blank input lines.  Or you might choose
a new-paragraph macro.  In the latter case, this still requires
you to avoid blank lines in macro definitions etc. (unless you
really mean to start a new paragraph at that point), and only
use them as part of the actual text to be formatted.

My personal take on this is to reserve blank lines for really,
really special formatting tasks, be as specific as possible
in the input document by invoking paragraph macros explicitly,
and leave out blank lines in macro definitions altogether.





reply via email to

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