groff
[Top][All Lists]
Advanced

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

Re: [Groff] Werner's Margin Notes


From: Werner LEMBERG
Subject: Re: [Groff] Werner's Margin Notes
Date: Mon, 17 Jan 2005 07:35:59 +0100 (CET)

> All of which is to say, if I get a better idea of how people would
> use margin notes functionality, I might be able to come up with
> something.  But I do need that feedback, since, as I see presently
> see the issue, it strikes me as a lot of trouble for not
> particularly useful results.  All suggestions welcome.

Have you looked at my MN.tmac file?  Some of your concerns are already
handled there.

BTW, LaTeX handles margin notes as boxes which can't be broken across
pages, if I read the code correctly.

> One is a request, similar to .sp | , that advances from the top edge
> of the page to the *baseline* on which type will sit.  groff's
> present behaviour is to treat, for example,
> 
>     .sp |1i
> 
> as meaning "advance 1 inch from the top edge of the page to the top
> of the tallest ascender of type at the current point size".

It seems that you have a wrong idea how groff break lines.  groff does
exactly what you want, I think.  From groff.info (describing the `vs'
request):

     The effective vertical line spacing consists of four components.
  Breaking a line causes the following actions (in the given order).

     * Move the current point vertically by the "extra pre-vertical
       line space".  This is the minimum value of all `\x' escapes
       with a negative argument in the current output line.

     * Move the current point vertically by the vertical line spacing
       as set with the `vs' request.

     * Output the current line.

     * Move the current point vertically by the "extra post-vertical
       line space".  This is the maximum value of all `\x' escapes
       with a positive argument in the line which has just been
       output.

     * Move the current point vertically by the "post-vertical line
       spacing" as set with the `pvs' request.

The `.sp |1i' implicitly causes a `.br', then it sets the current
point to a new vertical positio, and the just outlined algorithm
starts again.

> The other thing I'd really like to see is a single request that
> behaves exactly like .br, except that it doesn't advance on the
> page.  IOW, a single request equivalent to
> 
>     .vs 0
>     .br
> 
> which would have the effect of "carriage return/no linefeed".
> Furthermore, such a request would never spring page traps.

The order of .vs and .br is incorrect.  Try

  .vpt 0
  .br
  .vpt 1
  .vs 0
  a b c d e f g
  .br
  .vs
   a b c d e f g


     Werner




reply via email to

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