diff options
author | wlemb <wlemb> | 2003-02-26 14:54:01 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2003-02-26 14:54:01 +0000 |
commit | 822f6f8974d7ff491252279efcd273393382b684 (patch) | |
tree | 9e5b8cc839f292de1d506eae566331c64f2d639c /tmac/an-old.tmac | |
parent | 1d5af4426bfb51bae6674464001df0da45e6484e (diff) | |
download | groff-822f6f8974d7ff491252279efcd273393382b684.tar.gz |
Make man pages more customizable.
* tmac/an-old.tmac (FT): New register holding footer distance from
bottom.
(HF): New string holding the default heading font.
(TH): Handle registers `IN' and `SN' set on the command line.
Use `FT'.
(PT, BT): New strings to customize header and footer lines.
(an-header, an-footer): Use them.
(SH, SS): Use `HF'.
* tmac/groff_man.man: Document changes.
* doc/groff.texinfo: Document man changes.
Document Ultrix extensions of man.
* src/roff/troff/input.cc (do_width, do_if_request): Reset
`have_input' after changing back to old environment.
* src/devices/grolbp/lbp.cc (lbp_printer::set_line_thickness): Move
function up to be defined before first call. This is necessary to
avoid a compilation problem with Sun's WorkShop 6 C++ compiler.
* src/utils/afmtodit/afmtodit.pl: Make script search for files in
the default font directory also. Based on a patch from James
J. Ramsey <jjramsey_6x9eq42@yahoo.com>.
* src/utils/afmtodit/Makefile.sub (afmtodit): Handle @FONTDIR@.
* src/utils/afmtodit/afmtodit.man: Document it.
* NEWS: Updated.
* tmac/groff_man.man, doc/groff.texinfo: Many minor fixes.
Diffstat (limited to 'tmac/an-old.tmac')
-rw-r--r-- | tmac/an-old.tmac | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac index 5d199bed..1be02fb4 100644 --- a/tmac/an-old.tmac +++ b/tmac/an-old.tmac @@ -1,6 +1,6 @@ .\" an-old.tmac .\" -.\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002 +.\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003 .\" Free Software Foundation, Inc. .\" Written by James Clark (jjc@jclark.com) .\" @@ -67,6 +67,11 @@ . el .nr LT 6.5i .\} . +.nr FT -.5i +. +.\" Default heading font +.ds HF B +. .nr an-html 0 .if '\*[.T]'html' .nr an-html 1 .if \n[an-html] .nr C 1 @@ -138,10 +143,13 @@ . .\" We must select an integer indentation value for nroff; .\" see comment in an-do-tag. -. ie t .nr IN 7.2n -. el .nr IN 7n +. if !r IN \{\ +. ie t .nr IN 7.2n +. el .nr IN 7n +. \} . PD -. nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings +. if !r SN \ +. nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings . nr an-level 1 . set-an-margin . nr an-prevailing-indent \\n[IN] @@ -156,7 +164,7 @@ . el \{\ . wh 0 an-header . wh -1i an-footer -. wh -.5i an-p-footer +. wh \\n[FT]u an-p-footer . . if (\\n[nl] > 0) \{\ . ie \\n[C] .bp (\\n[%] + 1) @@ -195,6 +203,21 @@ . el .nr PD (.4v >? \n[.V]) .. . +.\" Redefine these to customize the header & footer +. +.de1 PT +. tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])' +.. +. +.de1 BT +. ie \\n[D] \{\ +. if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]' +. if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]' +. \} +. el \ +. tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]' +.. +. .de1 an-header . an-init . ev 1 @@ -206,7 +229,7 @@ . el \{\ . if !\\n[cR] \ . sp .5i -. tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])' +. PT . ie !\\n[cR] \ . sp |1i . el \ @@ -246,12 +269,7 @@ . ds an-page-string \\n[%] . \} . \} -. ie \\n[D] \{\ -. if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]' -. if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]' -. \} -. el \ -. tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]' +. BT . ev .. . @@ -279,7 +297,7 @@ . nr an-no-space-flag 1 . nr an-break-flag 1 . ps \\n[PS-SH]u -. ft B +. ft \\*[HF] . ne (2v + 1u) . if \\n[.$] \&\\$* .. @@ -296,7 +314,7 @@ . nr an-no-space-flag 1 . nr an-break-flag 1 . ps \\n[PS-SS]u -. ft B +. ft \\*[HF] . ne (2v + 1u) . if \\n[.$] \&\\$* .. |