[Top][All Lists]

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

Re: [Groff] Unix Man Pages

From: Ralph Corderoy
Subject: Re: [Groff] Unix Man Pages
Date: Mon, 10 Mar 2003 23:40:39 +0000

Hi John,

> > > Also, is there a way to set the line width for manpages
> > > (independent of the terminal actually used?)
> > 
> > Hmm. I guess .ll (line length) and .tl (title length) might work.
> I noticed man pages often wrap to the width of the terminal.  Can I
> set the line width somehow by stuffing the right number into some
> environment variable?

Not if you want it to be portable.  I'd suggest using .ll and .tl.  The
only catch is that this might not adjust the width of the page title
because that's in a different environment, so you have to switch
environments and set it there too.

$ cat ~/man.prepend 
.ll 80n
.lt 80n
.ev 1
.ll 80n
.lt 80n
.de hy
$ (cat ~/man.prepend; zc less.1.gz) |
> nroff -Tdumb -man |
> col -b |
> cat -s |
> awk 'NR <= 10 || length == 80' |
> head -20
LESS(1)                                                                  LESS(1)
       less - opposite of more

       less -?
       less --help
       less -V
       less --version
       (See  the  OPTIONS  section  for alternate option syntax with long option
       Less is a program similar to more (1), but which allows backward movement
       read the entire input file before starting, so with large input files  it
       starts  up  faster  than text editors like vi (1).  Less uses termcap (or
       terminfo on some systems), so it can  run  on  a  variety  of  terminals.
       Commands  are  based  on both more and vi.  Commands may be preceded by a
       ESCAPE key; for example ESC-v means the two character sequence  "ESCAPE",
       h or H Help:  display a summary of these commands.  If you forget all the
       z      Like SPACE, but if N is specified, it becomes the new window size.
       w      Like ESC-v, but if N is specified, it becomes the new window size.



reply via email to

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