[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Marginal Annotations
From: |
P. Alejandro Lopez-Valencia |
Subject: |
Re: [Groff] Marginal Annotations |
Date: |
Tue, 07 May 2002 19:18:44 -0500 |
At 01:49 p.m. 07/05/2002 -0400, Robert D. Goulding wrote:
The marginal macros are exactly as I found them in this group (see
http://www.ffii.org/archive/mails/groff/2000/Jul/0041.html). Could the
missing definition explain the unwanted vertical space? How would I fix
this?
(Sorry if this appears in a separate thread; still figuring out how to use
the mailing list.)
Oopsie! I read the macro too fast, and too early in the morning. Let me
take another shot at this.
margin-di is a diversion and is there, disregard what I said this morning.
Let's take a look at the code:
.ev margin-ev \" define new environment called margin-ev
. ps 8 \" set font point size to 8pt
. vs 9 \" set vertical size to 9v (line height)
. ft R \" set roman face ("plain" face)
.ev \" reset environment to previous
.
.
.de MS \" define new macro MS creating a margin par environment
. ev margin-ev \" set local environemtn margin-ev
. di margin-di \" create diversion margin-di (save parameters)
. sp .25 \" vertical space up (positive sign)
. po .4i \" set page offset
. ll .6i \" set line length
.. \" end macro
.
.
.de ME \" define macro to end diversion and environment
. br \" line break
. di \" end current diversion
. ie (\\n[dn]+\\n[nl])>=(\\n[.p]-\\n[FM]) \{\
. \" Start conditional.
. \" if height of last completed diversion plus the length
. \" of last completed diversion is greater or equal to
. \" the current page length minus the footer margin height
. \" at the bottom of the page (FM is an ms public register)
. \" then
. tm Margin message is too big at line \\n[.c]
. \" print to the terminal [...] current input line number
. \} \" close conditional
. el \{\ \" open else clause
. margin-di \" set diversion values
. sp -\\n[dn]u \" set space to the negative value of
. \" height of last completed diversion
. \" in device units
. \} \" close conditional
. po \" reset page offset to original
. ll \" ibid line length
. ev \" ibid environment
.. \" end macro
Phew! Now that we know what is going on in there, what I think you need to
do is tweaking the vertical spacing in .MS (.sp) and the vertical size in
the margin environment until you get the vertical alignment the way you
want...
Unfortunately aligning baselines at different scaled sizes depends entirely
on the actual typeface design and variation you use. I think you'd have
better luck with this kind of alignment if you placed the text in a box and
then aligned the box to the main text. (No, I am not volunteering, not that
skilled at it yet. Check groff(7)).
Cheers