groff
[Top][All Lists]
Advanced

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

Re: [Groff] Beginner Groff issue: number registers inside macros


From: Ted Harding
Subject: Re: [Groff] Beginner Groff issue: number registers inside macros
Date: Wed, 27 Jun 2012 19:01:39 +0100 (BST)

On 27-Jun-2012 16:47:17 Clarke Echols wrote:
> On 06/27/2012 10:37 AM, Zoë Blade wrote:
>>> Enjoy, and never give up *roff.  The better you know
>>> it the more beautiful and elegant it turns to be.
>>
>> Like Unix and C in general then? :D
>>
>>> P.S.: Please,  reply to the mailing list when appro-
>>>       priate.  I wrote to both your e-mail  and  the
>>>       list because it's seems to be a common practce
>>>       here.
>>
>> My mistake, I forget you have to specifically click on "reply to all" in
>> these new fangled e-mail clients.  I bet I'm not line wrapping either. :/ 
>> Alas, the world kinda insisted I move away from elm and pine many years ago,
>> for reasons your .sig suggests you know all too well...
>>
>>> P.P.S.: An interesting website you got!
>>
>> Thank you!
>>
>> And on a side note, I've now realised the more fundamental error I'd made. 
>> If I want all the subsequent .D type paragraphs (.D being a macro I wrote
>> that sets a few stylistic values) to have spacing in between them, but not
>> the first, then I should be using a blank line to separate them, not
> specifying .D again in between them all.  In other words, it looks like I
> should only specify the type of paragraph when it changes, not every time. 
> And now my document source looks a lot neater!  So now I have both the answer
> I wanted and the answer I needed. :)
>>
>> Thanks again!
>>
>> All the best,
>> Zoe.
>>
> 
> That may not be what you need.  A blank line has the same vertical
> spacing as a .sp 1v request.  Paragraph spacing is more typically
> .sp .5v
> 
> You may need to set a variable that enables you to deal with the
> first instance of a paragraph, then do the right thing for
> subsequent ones.
> 
> Clarke

Specifically (with reference to your request for a blank line
in 2nd and later invocations) something like:

.nr nextD 0
.de D
.if \\n[nextD] .sp
.nr nextD 1
.\" Then whatever you want to execute within macro .D
..

(where ".sp" could be ".sp 0.5v" or ".sp 0.25m" or whatever you need).

Ted.

-------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Date: 27-Jun-2012  Time: 19:01:36
This message was sent by XFMail
-------------------------------------------------


reply via email to

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