groff
[Top][All Lists]
Advanced

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

[Groff] manual pages and terminal width


From: Werner LEMBERG
Subject: [Groff] manual pages and terminal width
Date: Sat, 27 Apr 2002 14:39:36 +0200 (CEST)

Sorry for the long delay in handling this.

Andreas Grünbacher wrote about a month ago:

> groff has the very convenient feature that manual pages are
> formatted dependent on the terminal width, if invoked through
> man.  (If invoked directly it does not do the trick).

Actually, it is possible:

  echo ".ll 78n" | groff -ww - -man -Tlatin1 groff_font.n | less

> Unfortunately this only works for -man style pages, but not for
> -mdoc.

Yes, I agree that it would be a good feature if mdoc could do the
same.

> So I have started to play with the mdoc macros a bit and found that
> changing the ll and lt macros seems to lead to the desired effect.

Note that .ll and .lt are not macros but built-in requests.

After some thinking I believe it is best to handle mdoc similar to
man, i.e., to not use .ll and .lt at all.

Ruslan has sent me the opposite patch, namely to set .ll and .lt to
78n in an-old.mdoc, but I think that should be handled by the `man'
program, not the macro package itself -- at least `man' should have a
chance to change it.

Thus I suggest the following:

  . Remove the calls to .ll and .lt in mdoc.

  . The `man' program should define number registers `LL' and `LT'
    instead of setting .ll and .lt directly.

  . I will add code to both the man and mdoc macro packages to use a
    default value of 78n for the line and title length if LL and LT
    are not set (and 6.5i in troff mode).

Backwards compatibility with old macro packages should be possible by
testing gtroff's version registers.

Please comment.


    Werner

reply via email to

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