groff
[Top][All Lists]
Advanced

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

[Groff] Vertical space around displays in MM


From: Anton Shepelev
Subject: [Groff] Vertical space around displays in MM
Date: Sat, 5 Feb 2011 00:14:57 +0300

Hello all,

After frowning for some time at the increased verti-
cal space after static displays  in  MM,  when  they
concluded  an  list  item or a section, I decided to
look what was going on.

The .DE macro turned out to be generating the  final
vertical  space  by directly calling .sp, instead of
.SP, which caused any following vertical space to be
added  to  the  generated one instead of overlapping
it. For example:

   .AL ""
   .LI
   This is text.
   .DS I N
   And this is a static display
   .DE
   .LI
   This is another list item
   .LI
   And yet another one, so you can compare the
   vertical space.
   .LE

  1.  This is text.

        And this is a static display


  2.  This is another list item

  3.  And yet another one, so you  can  compare  the
      vertical space.

As  you  see,  the  space after the list item ending
with the display is twice that after  the  following
list item. The same thing happens with sections (.H)
and in all other instances of .DE being followed  by
a macro that generates vertical space.

If  this  is a bug and not a feature of MM (I am not
sure which it is) than it can be rid of by replacing
the second call to .sp with .SP in the address@hidden macro:

  -.if \n[Ds] .sp \n[ds*i]u
  +.if \n[Ds] .SP \n[ds*i]u

There're  are  two  such  lines in the definition of
address@hidden: for inserting a vertical  space  before  and
after the display, and although the problem in ques-
tion is caused by the latter one, I think that  both
should be corrected.

With this correction in, the example above no longer
has the increased vertical space:

  1.  This is text.

        And this is a static display

  2.  This is another list item

  3.  And yet another one, so you  can  compare  the
      vertical space.

Anton



reply via email to

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