manpagez: man pages & more
info groff
Home | html | info | man

File: groff.info,  Node: Page Layout,  Next: Page Control,  Prev: Line Continuation,  Up: GNU troff Reference

5.17 Page Layout
================

The formatter permits configuration of the page length and page number.

 -- Request: .pl [length]
 -- Request: .pl +length
 -- Request: .pl -length
 -- Register: \n[.p]
     Change (increase or decrease) the page length per the numeric
     expression LENGTH.  The default scaling unit is 'v'.  A negative
     LENGTH is valid, but an uncommon application: it prevents page
     location traps from being sprung,(1) (*note Page
     Layout-Footnote-1::) and each output line is placed on a new page.
     If LENGTH is invalid, GNU 'troff' emits a warning in category
     'number'.  If LENGTH is absent or invalid, '11i' is assumed.

     The read-only register '.p' interpolates the current page length.

 -- Request: .pn num
 -- Request: .pn +num
 -- Request: .pn -num
 -- Register: \n[.pn]
     Change (increase or decrease) the page number of the _next_ page
     per the numeric expression NUM.  If NUM is invalid, GNU 'troff'
     emits a warning in category 'number' and ignores the request.
     Without an argument, 'pn' is ignored.

     The read-only register '.pn' interpolates NUM if set by 'pn' on the
     current page, or the current page number plus 1.

   The formatter offers special support for typesetting headers and
footers, collectively termed "titles".  Titles have an independent line
length, and their placement on the page is not restricted.

 -- Request: .tl 'left'center'right'
     Format an output line as a title consisting of LEFT, CENTER, and
     RIGHT, each aligned accordingly.  The delimiter need not be a
     neutral apostrophe: 'tl' accepts the same delimiters as most escape
     sequences; see *note Delimiters::.  If not used as the delimiter,
     any "page number character" character is replaced with the current
     page number; the default is '%'; see the the 'pc' request below.
     Without an argument, 'tl' is ignored.  'tl' writes the title line
     immediately, ignoring any partially collected line.

     It is not an error to omit delimiters after the first.  For
     example, '.tl /Thesis' is interpreted as '.tl /Thesis///': it sets
     a title line comprising only the left-aligned word 'Thesis'.

 -- Request: .lt [length]
 -- Request: .lt +length
 -- Request: .lt -length
 -- Register: \n[.lt]
     Change (increase or decrease) the line length used by titles per
     the numeric expression LENGTH.  The default scaling unit is 'm'.
     If LENGTH is negative, GNU emits a warning in category 'range' and
     treats LENGTH as '0'.  If LENGTH is invalid, GNU 'troff' emits a
     warning in category 'number' and ignores the request.  The
     formatter's default title length is '6.5i'.  With no argument, the
     title length is restored to the previous value.  The title length
     is is associated with the environment (*note Environments::).

     The read-only register '.lt' interpolates the title line length.

 -- Request: .pc [char]
     Set the page number character to CHAR.  With no argument, the page
     number character is disabled.  'pc' does not affect the
     register '%'.

   The following example exercises title features.

     .lt 50n
     This is my partially collected
     .tl 'Isomers 2023'%'Dextrose Edition'
     line.
         => Isomers 2023             1        Dextrose Edition
         => This is my partially collected line.

   We most often see titles used in page header and footer traps.  *Note
Traps::.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.