[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Re: Problem with devtag macros?
From: |
Anton Shepelev |
Subject: |
Re: [Groff] Re: Problem with devtag macros? |
Date: |
Fri, 18 Mar 2011 15:31:57 +0300 |
Werner Lemberg:
> > Here's a patch for keeping the temporary indent.
>
> Applied, thanks.
I am terribly sorry, but again this patch is not
perfect. The addition of a .ti request has caused a
redundant vertical space, 1v in nroff mode. I have
made a work-around for it:
.de address@hidden
.\" retain temporary indentation
.if !(\\n[.in]-\\n[.i]=0) .nr misc*ti \\n[.in]
.vpt 0
.DEVTAG-\\$1 \\$2
.br
.if r misc*ti \{
. ti \\n[misc*ti]u
. rr misc*ti
. sp -1
. \}
.sp -1
.vpt 1
..
Maybe it would be better to have another 'local'
numeric register to accumulate vertical indent and
then call .sp only once at the end... I'll do it if
groff will 'like' such an optimization.
I have tested it in nroff mode and made sure that it
generates exactly the same output as the unpatched
m.tmac with all DEVTAG calls removed, i.e eliminates
all visible effect of tags.
I have attached an archive (hdtest.zip) containing
the test file I was using (hdtest.mm) and the result
I am getting with it (hdtest.txt). Also attached is
the corresponsing diff file for m.tmac.
Anton
hdtest.zip
Description: Zip archive
m.tmac.diff
Description: Text document