groff
[Top][All Lists]
Advanced

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

Re: [Groff] numbered displays


From: Denis M. Wilson
Subject: Re: [Groff] numbered displays
Date: Tue, 9 Oct 2012 10:02:45 +0100


On Mon, 8 Oct 2012 20:26:47 -0400
"James K. Lowden" <address@hidden> wrote:

> My world premier macro pair is below!  What would you do to improve
> them?  In particular, what should I do to make them work across page
> boundaries?  
> 
> The intention is to number a -ms DS display, a la eqn.  Input
> 
> .Ds (5)
> .DS I
> Lorem Ipsum
> .DE
> .De
> 
> Output
> 
>       Lorem Ipsum             (5)
> 
> When the first line of the display is the first line on the
> page -- and only then -- the Ds argument is printed too low by about
> 1.5 vs.  
> 
> Here they are: 
> 
> [macros]
> .de Ds \" macro to add display number to DS
> .ds Dq \\$1
> .mk Dp
> ..
> .de De \" used after .DE
> .mk                                   \" hold that thought
> .\" go to position before display + display length 
> .rt ( \\n(Dpu + \\n(dnu )     
> .rj 1
> \\*(Dq
> .br
> .rt                                   \" resume
> ..
> [sorcam]
> 
> Many thanks for your help. 
> 
> --jkl
> 


-- 
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments



reply via email to

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