groff
[Top][All Lists]
Advanced

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

Re: [Groff] -ms Heading Macro Margin


From: Larry Kollar
Subject: Re: [Groff] -ms Heading Macro Margin
Date: Sun, 11 Apr 2004 19:19:42 -0400

Andrew J. Piziali wrote:

   I would like to position each level one section heading in an -ms
document 1.75" from the top of a page.  I currently use the following
code in a macro wrapped around .NH :

    .if (\\$1 = 1) \{\
    .  NH \\$1
    '  ce 1
    \&\\$2
    .  sp 0.5i
    .\}

Any attempt to insert ".sp 1.75i" or ".sp |1.75i" is ignored.  When I
inserted \v'1.75i' ahead of \&\\$2, the section header was positioned
properly but the subsequent paragraph was formatted on top of it!

Are you really trying to do something like this?

        .if (\\$1 = 1) \{\
        .  bp
        .  sp |1.75i
        .  NH \\$1
        '  ce 1
        \&\\$2
        .  sp 0.5i
        .\}

I believe this is a manifestation of no-space mode, which ms uses
to suppress extra space between the header & the first line of content
on the page. The quick & cheesy way around it is to add a line
containing only \\& between the .bp & .sp lines -- this tricks groff into
thinking there's now content on the page, and thus disables no-space
mode.

Hope that helps!

--
Larry Kollar     k  o  l  l  a  r  @  a  l  l  t  e  l  .  n  e  t
Unix Text Processing: "UTP Revival"
http://home.alltel.net/kollar/utp/



reply via email to

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