groff
[Top][All Lists]
Advanced

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

Re: [Groff] question about .rs and .nop


From: Werner LEMBERG
Subject: Re: [Groff] question about .rs and .nop
Date: Mon, 26 Aug 2013 18:37:01 +0200 (CEST)

> I cannot reproduce the problem with plain groff, but came across it
> when using macro packages like mm or mom.
> 
> This demonstrates the problem:
> 
> .PRINTSTYLE  TYPESET
> .HEADER_LEFT "top"
> .START
> text1
> .NEWPAGE
> .br
> .rs
> .br
> .sp 5
> text2
> .NEWPAGE
> text3
> .NEWPAGE
> foo
> .br
> .sp 5
> text4
> 
> Put above into file "test" and process with
> 
> groff -mom -Tps test > test.ps; gv test.ps
> 
> and see, how text2 and text3 are placed with the same distance to
> the header rule.  For text4, groff finally honors the preceeding
> .spĀ 5

The problem you see is related to header traps.  The info page
says:

  If a vertical trap is sprung during execution of `sp', the amount of
  vertical space after the trap is discarded.

and this behaviour is not controllable by `rs'.  It seems that after
the top header trap mom plants other, probably unused vertical traps.
If you explicitly disable them with the .vpt command (see below), `rs'
works just fine.


    Werner


======================================================================


.PRINTSTYLE  TYPESET
.HEADER_LEFT "top"
.START
text1
.NEWPAGE
.vpt 0
.rs
.sp 5
text2
.vpt 1
.NEWPAGE
text3
.NEWPAGE
foo
.br
.sp 5
text4

reply via email to

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