groff
[Top][All Lists]
Advanced

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

RE: [Groff] Page header angst


From: Ted Harding
Subject: RE: [Groff] Page header angst
Date: Wed, 17 Oct 2001 09:18:08 +0100 (BST)

On 17-Oct-01 Deirdre Saoirse Moen wrote:
> I've been using the ms macros, which have been fine except for one 
> thing I can't figure out how to do: change the flipping page header. 
> On the second and subsequent pages, I get the -2- but I need to 
> change that. Standard mss format has Author/Title on the left, 
> nothing in the center, and page number on the right for pages 2 on.

The simple way to change what appears on page 2 headers onwards
is to redefine the string variables LH, CH, RH.

> Here's my last attempt:
> 
> .de NP
> .tl 'Saoirse Moen/Title''%'
> .sp
> ..

For instance, put at the beginning:

.ds LH Saoirse Moen/Title
.ds CH
.ds RH \\n[PN]

and this should give your "Saoirse Moen/Title" left-justified,
nothing in the middle, and the page number right-justified,
at the top of each page from page 2 on.

> For another non-page-header issue, as my body style is:
> .de BD
> .ne 2
> .ad l0
> .fi
> .ls 2
> ..
> 
> This means that any blank line between paragraphs is echoed, but if I 
> don't leave one, it's wrapped. Meaning I get no space (except for the 
> tab) or an extra line between paragraphs.
> 
> Other than putting .BD on each line between paragraphs (messy, as it 
> makes plain text viewing of the writing more awkward), is there any 
> way to suppress the extra line? If not, I can change the '\n\n\t' to 
> '\n.BD\n\t' in the python script prior to running it through groff.

If you're happy that you can use a blank line in the input to separate
paragraphs (starting the new-paragraph text input at the beginning of
a line, like in this mail, then again a simple procedure is to
appropriately define the "blank-line macro". For instance, again
at the start, put

.blm PP

which means that every blank line in your input will start a new
paragraph "PP" style (i.e. a paragraph with the first line indented),
and no extra blank line will be output. To restore the original
situation (i.e. get rid of the "blank line macro" behaviour) simply
do

.blm

By the way, there is also a default "paragraph drop" extra space
(about half a line-space) generated between paragraphs with the ms
macros. To suppress this, define the number variable PD to be zero:

.nr PD 0

These will work as stated, but conceivably there might be unwanted
implications depending on what else you do in your input (for instance,
you may need to have blank lines in input for other reasons as well).
If you encounter further problems, please ask us again!

Best wishes,
Ted.



--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 17-Oct-01                                       Time: 09:18:08
------------------------------ XFMail ------------------------------

reply via email to

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