Skip to content

Commit

Permalink
man: don't paginate when using nroff
Browse files Browse the repository at this point in the history
This tells bin/man to set the register L to very high to avoid pagination
and updates tmac/tmac.an to use that value, if it's set, to set the page
length. This is per Plan 9's rc/bin/man and sys/lib/tmac/tmac.an.
  • Loading branch information
anths committed Jan 29, 2025
1 parent 61e362a commit 2a23f2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 6 additions & 5 deletions bin/man
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ fn roff {
}
if not {
Nflag=-N
Lflag='-rL1000i'
}
if(~ $x *eqn*)
preproc=($preproc eqn)
Expand All @@ -26,15 +27,15 @@ fn roff {
switch($#preproc) {
case 0
{echo -n $FONTS; cat $2< /dev/null} | troff $Nflag -$MAN
{echo -n $FONTS; cat $2< /dev/null} | troff $Nflag $Lflag -$MAN
case 1
{echo -n $FONTS; cat $2< /dev/null} | $preproc | troff $Nflag -$MAN
{echo -n $FONTS; cat $2< /dev/null} | $preproc | troff $Nflag $Lflag -$MAN
case 2
{echo -n $FONTS; cat $2< /dev/null} | $preproc(1) | $preproc(2) | troff $Nflag -$MAN
{echo -n $FONTS; cat $2< /dev/null} | $preproc(1) | $preproc(2) | troff $Nflag $Lflag -$MAN
case 3
{echo -n $FONTS; cat $2< /dev/null} | $preproc(1) | $preproc(2) | $preproc(3) | | troff $Nflag -$MAN
{echo -n $FONTS; cat $2< /dev/null} | $preproc(1) | $preproc(2) | $preproc(3) | | troff $Nflag $Lflag -$MAN
case *
{echo -n $FONTS; cat $2< /dev/null} | $preproc(1) | $preproc(2) | $preproc(3) | | $preproc(4) | troff $Nflag -$MAN
{echo -n $FONTS; cat $2< /dev/null} | $preproc(1) | $preproc(2) | $preproc(3) | | $preproc(4) | troff $Nflag $Lflag -$MAN
}
}
Expand Down
4 changes: 3 additions & 1 deletion tmac/tmac.an
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@
.if t \{.ds R ®
.ds S \s\n()S
..\}
.if n \{.nr )L 11i
.if n \{.ie \nL<=0 .nr )L 11i
.el \{.nr )L \nLu
.nr V 0\}
.nr LL 6.5i
.nr )O .463i
.if '\*(.T'think' \{.nrLL 80n
Expand Down

0 comments on commit 2a23f2c

Please sign in to comment.