groff
[Top][All Lists]
Advanced

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

Re: [Groff] A question about vertical position traps


From: Tadziu Hoffmann
Subject: Re: [Groff] A question about vertical position traps
Date: Mon, 30 Jul 2012 21:24:20 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

> Attached is a small test example for -Tascii demonstrating
> the setting of the earliest trap possible.

The manual says:

  The effect of ll, in, or ti is delayed, if a partially
  collected line exists, until after that line is output.

Your trap is actually sprung, but it was triggered in fill-mode,
and this usually means that whatever had already been gathered
and did not fit on the line that was just output now constitutes
the partially collected line.  Thus, your .ll is delayed until
the next line.

One very crude way of preventing this is to empty the partially
collected line into a diversion, set the new line length, and
then replay the diversion into a "new" partially collected line,
like so:

  .de trap
  .di xx
  .br
  .di
  .ll +8n
  .xx
  ..

But diverting and rereading the diversion requires you to
carefully set up indent and filling, otherwise bizarre spacing
may result, so this might not be the optimum solution.

If you know for sure that your label requires only one
line-height, then it would be easier to start a partially
collected line (e.g., including your list marker and the
right-hand label) and then already set the new line length.
This way you wouldn't have to futz around with traps at all.

  .ll 7c
  .in 1c
  .ds xx [label 1]
  .nr xx \n[.l]-\n[.i]-\w'\*[xx]'
  .ll 5c
  \Z'\h'-3n'1.'\c
  \Z'\h'\n[xx]u'\*[xx]'\c
  .ll 6.5c
  I'm going downtown, buy me a fourty-four.
  Yes, I am going downtown, buy me a fourty-four.
  Got bad news today, my baby don't want me no more.

(Tested with -Tps, 10pt font size.)





reply via email to

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