1

Different systems render man pages differently. Some paginated the pages by default, some don't. How can I control the pagination behaviour?

And how can I configure the page height (in lines) when pagination is enabled?

For example, on Solaris 10, when I view man pages in the terminal (e.g. man man) they are paginated like this:

User Commands                                              man(1)
...
SunOS 5.10          Last change: 29 Apr 2010                    1

User Commands                                              man(1)
...
SunOS 5.10          Last change: 29 Apr 2010                    2
...

On Fedora Linux the same call just renders one big page:

MAN(1)                        Manual pager utils                        MAN(1)
...
2.7.6.1                           2016-12-12                            MAN(1)
  • 1
    On which system do you want to control this behaviour? – Kusalananda Sep 2 '17 at 12:05
  • @Kusalananda, on Linux and Solaris. – maxschlepzig Sep 2 '17 at 14:57
1

The groff documentation describes several options that can be used to control pagination, including -rCR=0 to disable the default single-page behaviour in nroff mode. This can be set using the MANROFFOPT environment variable.

I haven't found a way to control the page length, short of injecting a .pl request into the nroff input stream, and in the absence of that it seems to be effectively a fixed value. It might be worthwhile for man to gain an option to enable pagination and set the page length based on the terminal size ...

0

In Solaris, the man pager defaults to more -s unless specified by the PAGER environmental variable.

In Linux, the man pager defaults to less unless specified by the PAGER or MANPAGER environmental variable. If both are set, MANPAGER is used.

  • 2
    But surely it's not the pager but the page formatter (groff?) that decides to insert headers and footers at specific intervals? – Kusalananda Sep 2 '17 at 20:06
  • If that is what your question is about, on Solaris you have the TCAT and TROFF environmental variables, and on LInux you have the MANROFFOPT and MANROFFSEQ environmental variables. – fpmurphy Sep 2 '17 at 20:18
  • @Kusalananda is right, the $PAGER doesn't influence the formatting (i.e. the pagination) of the page. I also suspect that this behaviour can be influenced by some groff/troff setting. But so far I haven't found anything concrete/obvious on the web/in the manuals. – maxschlepzig Sep 3 '17 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.