[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Problem with devtag macros?
From: |
Anton Shepelev |
Subject: |
[Groff] Problem with devtag macros? |
Date: |
Sat, 30 Oct 2010 18:59:15 +0400 |
Hello all,
I have returned to the problem with vertical indents
around headings in MM and found the cause of it. The
problem disappeared when removed the call to
.DEVTAG-EO-H macro from the definition of the .H
macro. The devtag macros seem to conflict with MM's
.SP macro.
Then I assembled a small example to demostrate the
effect of .DEVTAG on the output of the ascii device,
which should not exist at all:
.warn
.ll 40n
.\" This is the definition of MM's .SP
.de SP
.br
.if !r line*lp\\n[.z] .nr line*lp\\n[.z] 0
.if !r line*ac\\n[.z] .nr line*ac\\n[.z] 0
.ie \\n[.$] .nr line*temp (v;\\$1)
.el .nr line*temp 1v
.\"
.ie \\n[line*lp\\n[.z]]=\\n[.d] \{\
. \" go here if no output since the last .SP
. nr line*output \\n[line*temp]-\\n[line*ac\\n[.z]]
. if \\n[line*output]<0 .nr line*output 0
. nr line*ac\\n[.z] +\\n[line*output]
.\}
.el \{\
. nr line*ac\\n[.z] \\n[line*temp]
. nr line*output \\n[line*temp]
. \" no extra space in the beginning of a page
.\" This line was commented by me, but has no effect
.\" in the test:
.\" if (\\n[.d]<0):(\\n[pg*head-mark]=\\n[.d]) .nr line*output 0
.\}
.if \\n[line*output] .sp \\n[line*output]u
.nr line*lp\\n[.z] \\n[.d]
..
.\" ######## module misc ###############
.nr address@hidden 14
.de SA
.if \\n[.$] \{\
. if \\$1-1 address@hidden "SA: bad arg: \\$1"
. nr address@hidden 0\\$1
.\}
.ie address@hidden 'ad
.el 'na
..
.ds dt \%.DEVTAG\-EO\-H
.mso devtag.tmac
After this line two .SP 1v follow
.SP 1v
.SP 1v
As you see, the indent is 1v, which is correct.
.SP 2v
And this paragraph is followed by .SP\ 1v, \*(dt and .SP\ 1v.
.SP 1v
.DEVTAG-EO-H
.SP 1v
It too should have generated a 1v space, but the call to
\*(dt hindered .SP from working correctly.
Output:
After this line two .SP 1v follow
As you see, the indent is 1v, which is
correct.
And this paragraph is followed by
.SP 1v, .DEVTAG-EO-H and .SP 1v.
It too should have generated a 1v space,
but the call to .DEVTAG-EO-H hindered
.SP from working correctly.
I couldn't investigate it deeper, but hope even this
helps.
Anton
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff] Problem with devtag macros?,
Anton Shepelev <=