groff
[Top][All Lists]
Advanced

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

[Groff] mdoc and terminal width


From: Andreas Gruenbacher
Subject: [Groff] mdoc and terminal width
Date: Fri, 29 Mar 2002 19:24:12 +0100 (CET)

Hello,

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. Unfortunately this only works for
-man style pages, but not for -mdoc.

Compared to mdoc manual pages, man manual pages are much more low-level,
so I would prefer to use mdoc where possible. Without the terminal width
trick this is a bit painful, though.

I am using groff 1.17.2.

So I havestarted to play with the mdoc macros a bit and found that
changing the ll and lt macros seems to lead to the desired effect. Now my
question is whether the following change makes sense.


diff -Nu orig/doc-ditroff ./doc-ditroff
--- orig/doc-ditroff    Fri Mar 29 19:03:26 2002
+++ ./doc-ditroff       Fri Mar 29 19:04:34 2002
@@ -94,7 +94,9 @@
 .de setup-page-layout
 .nr header-space .5i
 .nr footer-space .5i
+.if !d ll \
 .ll 6.5i
+.if !d lt \
 .lt 6.5i
 .po 1i
 .nr display-vertical .5v
diff -Nu orig/doc-nroff ./doc-nroff
--- orig/doc-nroff      Fri Mar 29 19:14:37 2002
+++ ./doc-nroff Fri Mar 29 19:15:04 2002
@@ -83,7 +83,9 @@
 .el \
 .nr header-space .5i
 .nr footer-space .5i
+.if !d ll \
 .ll 78n
+.if !d ll \
 .lt 78n
 .po 0i
 .nr display-vertical 1v


Also, the files docj-nroff and docj-ditroff include the following code:

.nr ll 78n
.ll 78n
.nr lt 78n
.lt 78n

How can this be dealt with correctly?


Many thanks,

Andreas.

------------------------------------------------------------------------
 Andreas Gruenbacher, address@hidden
 Contact information: http://www.bestbits.at/~ag/


reply via email to

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