9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] pages in nroff
@ 2006-10-09  0:37 Joel “chesky” Salomon
  2006-10-10  2:36 ` Scott Schwartz
  0 siblings, 1 reply; 7+ messages in thread
From: Joel “chesky” Salomon @ 2006-10-09  0:37 UTC (permalink / raw)
  To: 9fans

I’ve been wondering; do the page boundaries in nroff serve any real purpose anymore?  Probably 95% or more of the time, nroff is invoked by man for display in acme or a terminal and the page headers don’t match anything on the screen anyway.  Would it break the ?roff model to set a page length of “indefinite” so it displays only one header at the beginning and one footer at the end?  Where would I look if I wanted such customization?

--Joel



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] pages in nroff
  2006-10-09  0:37 [9fans] pages in nroff Joel “chesky” Salomon
@ 2006-10-10  2:36 ` Scott Schwartz
  2006-10-12 17:40   ` Joel Salomon
  0 siblings, 1 reply; 7+ messages in thread
From: Scott Schwartz @ 2006-10-10  2:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Unix manpages these days are formatted for online viewing
just as you suggest, and it seems to work fine.

e.g. linux does:
       (echo ".ll 10.6i";
        echo ".pl 1100i";
        /usr/bin/gunzip -c '/usr/share/man/man1/date.1.gz';
        echo;
        echo ".pl \n(nlu+10"
       ) | /usr/bin/gtbl | /usr/bin/nroff -c -mandoc | /usr/bin/less -isr


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] pages in nroff
  2006-10-10  2:36 ` Scott Schwartz
@ 2006-10-12 17:40   ` Joel Salomon
  2006-10-12 17:51     ` Russ Cox
  0 siblings, 1 reply; 7+ messages in thread
From: Joel Salomon @ 2006-10-12 17:40 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 9 Oct 2006 22:36:50 -0400, Scott Schwartz <schwartz@bio.cse.psu.edu> wrote:
> Unix manpages these days are formatted for online viewing
> just as you suggest, and it seems to work fine.
>
> e.g. linux does:
<snip>

I made myself a cpy of /rc/bin/man, and I'm trying to get the same
effect by changing all the lines that look like:
	{echo -n $FONTS; cat $2< /dev/null} | troff $Nflag -$MAN
to
	{echo -n $PROLOG; echo -n $FONTS; cat $2< /dev/null; echo -n $EPILOG} | ...
I'm just not sure how to set $PROLOG and $EPILOG.

I've tried:
cpu% cat /sys/man/onepage
PROLOG='.ll 10.6i
.pl 1100i
'
EPILOG='.pl
(nlu+10
'
cpu%
and invoking . /sys/man/onepage at the top of ~/bin/rc/nman, but that
doesn't seem to accomplish anything.

Can someone with more knowledge of troff suggest something?

--Joel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] pages in nroff
  2006-10-12 17:40   ` Joel Salomon
@ 2006-10-12 17:51     ` Russ Cox
  2006-10-12 17:58       ` Joel Salomon
  2006-10-12 18:01       ` Joel Salomon
  0 siblings, 2 replies; 7+ messages in thread
From: Russ Cox @ 2006-10-12 17:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

There is a much simpler solution:
edit /sys/lib/tmac/tmac.an:

< .ifn \{.nr )L 11i
---
> .ifn \{.nr )L 1000i

Russ


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] pages in nroff
  2006-10-12 17:51     ` Russ Cox
@ 2006-10-12 17:58       ` Joel Salomon
  2006-10-12 18:01       ` Joel Salomon
  1 sibling, 0 replies; 7+ messages in thread
From: Joel Salomon @ 2006-10-12 17:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 10/12/06, Russ Cox <rsc@swtch.com> wrote:
> There is a much simpler solution:
> edit /sys/lib/tmac/tmac.an:

Won't that affect the output of man -p as well?

--Joel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] pages in nroff
  2006-10-12 17:51     ` Russ Cox
  2006-10-12 17:58       ` Joel Salomon
@ 2006-10-12 18:01       ` Joel Salomon
  2006-10-12 18:11         ` Joel “chesky” Salomon
  1 sibling, 1 reply; 7+ messages in thread
From: Joel Salomon @ 2006-10-12 18:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 10/12/06, Russ Cox <rsc@swtch.com> wrote:
> There is a much simpler solution:
> edit /sys/lib/tmac/tmac.an:

Won't that affect the output of man -p as well?  Or is the \ifn taking
care of that?

--Joel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] pages in nroff
  2006-10-12 18:01       ` Joel Salomon
@ 2006-10-12 18:11         ` Joel “chesky” Salomon
  0 siblings, 0 replies; 7+ messages in thread
From: Joel “chesky” Salomon @ 2006-10-12 18:11 UTC (permalink / raw)
  To: 9fans

> Won't that affect the output of man -p as well?  Or is the \ifn taking
> care of that?

Never mind; I just tried it: man makes one page and man -p is
unaffected.

Can I change the footer to read “CMD(1)” as in the header rather than
the now meaningless “Page 1”?  There’s a line:
	.ifn .tl \aPage %\a\\*(]D\a\\*(]W\a
that looks like the one to change, but to what?  Or should the footer
be eliminated entirely and the printing date moved to the header?

(When I next get bored, I’ll try to make man adjust the page width to
the window width the way mc does ☺.)

--Joel



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-10-12 18:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-09  0:37 [9fans] pages in nroff Joel “chesky” Salomon
2006-10-10  2:36 ` Scott Schwartz
2006-10-12 17:40   ` Joel Salomon
2006-10-12 17:51     ` Russ Cox
2006-10-12 17:58       ` Joel Salomon
2006-10-12 18:01       ` Joel Salomon
2006-10-12 18:11         ` Joel “chesky” Salomon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).