From 47b607f0b4b18f5ac3e54c761e0af5cba19ee548 Mon Sep 17 00:00:00 2001 From: wlemb Date: Sun, 3 Dec 2000 19:55:15 +0000 Subject: * tmac/an-old.tmac: Implementing the -rcR switch (similar to mdoc); if -rcR1 (which is now the default in nroff mode), a single, very long page is created instead of multiple pages: All `.ne' and `.wh' requests are put into conditionals; a new macro `an-end' is added to be called with `.em'. Some other minor cleanups. * NEWS, tmac/groff_man.man, doc/groff.texinfo: Updated. --- tmac/an-old.tmac | 168 ++++++++++++++++++++++++++++++----------------------- tmac/groff_man.man | 7 +++ 2 files changed, 103 insertions(+), 72 deletions(-) (limited to 'tmac') diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac index 1a453320..506f8baf 100644 --- a/tmac/an-old.tmac +++ b/tmac/an-old.tmac @@ -19,12 +19,15 @@ .\" with groff; see the file COPYING. If not, write to the Free Software .\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\" -.\" -rC1 => number pages continuously, rather than start each at 1 -.\" -rD1 => double-sided printing, ie different odd and even page footers -.\" -rPnnn => number first page nnn -.\" -rSxx => use size `xx'pt (either 10, 11, or 12) for document rather -.\" than the default size of 10pt -.\" -rXnnn => number pages after nnn as nnna, nnnb, nnnc, ... +.\" -rcR1 => Create a single, very long page instead of multiple pages. +.\" Useful for online display. Default in nroff mode. +.\" Desactivate with -rcR0. +.\" -rC1 => Number pages continuously, rather than start each at 1. +.\" -rD1 => Double-sided printing, ie different odd and even page footers. +.\" -rPnnn => Number first page nnn. +.\" -rSxx => Use size `xx'pt (either 10, 11, or 12) for document rather +.\" than the default size of 10pt. +.\" -rXnnn => Number pages after nnn as nnna, nnnb, nnnc, ... .\" .\" The file man.local is loaded at the end. Put local additions there. .\" If you need to add things to TH, use `.am TH'. @@ -32,13 +35,18 @@ . .if !\n(.g .ab These man macros work only with groff. . -.nr _C \n(.C +.nr _C \n[.C] .cp 0 . -.if !rD .nr D 0 -.if !rC .nr C 0 -.if !rS .nr S 10 -.if rP .pn 0\nP +.if !r D .nr D 0 +.if !r C .nr C 0 +.if !r S .nr S 10 +.if r P .pn 0\n[P] +.if !r cR \{\ +. ie n .nr cR 1 +. el .nr cR 0 +.\} +. . .de set-an-margin . nr an-margin \\n[IN] @@ -52,42 +60,43 @@ . ds an-title "\\$1 . ds an-section "\\$2 . ds an-extra1 "\\$3 -. ie \\n[.$]>3 .ds an-extra2 "\\$4 -. el .ds an-extra2 \"Sun Release 4.0 -. ie \\n[.$]>4 .ds an-extra3 "\\$5 -. el .ds an-extra3 \"System Programmer's Manual +. ie (\\n[.$] > 3) .ds an-extra2 "\\$4 +. el .ds an-extra2 \"Sun Release 4.0 +. ie (\\n[.$] > 4) .ds an-extra3 "\\$5 +. el .ds an-extra3 \"System Programmer's Manual . ds an-init \\.. . . DT . -.\" use sizes similar to LaTeX -. ie (\\nS == 11) \{\ -. nr PS 10.95z -. nr PS-SS 10.95z -. nr PS-SH 12z -. nr VS 13.6p -. \} -. el \{\ -. ie (\\nS == 12) \{\ -. nr PS 12z -. nr PS-SS 12z -. nr PS-SH 14.4z -. nr VS 14.5p +. nr PS 10z \" default point size +. nr PS-SS 10z +. nr PS-SH 10.95z +. nr VS 12p +. +. \" use sizes similar to LaTeX +. if t \{\ +. ie (\n[S] == 11) \{\ +. nr PS 10.95z +. nr PS-SS 10.95z +. nr PS-SH 12z +. nr VS 13.6p . \} . el \{\ -. nr PS 10z \" default point size -. nr PS-SS 10z -. nr PS-SH 10.95z -. nr VS 12p +. if (\n[S] == 12) \{\ +. nr PS 12z +. nr PS-SS 12z +. nr PS-SH 14.4z +. nr VS 14.5p +. \} . \} . \} . . ps \\n[PS]u . vs \\n[VS]u . -. ie '\*(.T'html' .nr IN 1.2i -. el .nr IN 7.2n +. ie '\*[.T]'html' .nr IN 1.2i +. el .nr IN 7.2n . PD . nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings . nr an-level 1 @@ -99,13 +108,17 @@ . nr an-break-flag 0 . nr an-div? 0 . -. wh 0 an-header -. wh -1i an-footer -. wh -.5i an-p-footer +. ie \n[cR] \ +. an-header +. el \{\ +. wh 0 an-header +. wh -1i an-footer +. wh -.5i an-p-footer +. \} . . if (\\n[nl] > 0) \{\ -. ie \\nC .bp (\\n% + 1) -. el .bp 1 +. ie \n[C] .bp (\\n[%] + 1) +. el .bp 1 . \} .. . @@ -123,7 +136,7 @@ . ev 1 . ps \\n[PS]u . vs \\n[VS]u -. ie '\*(.T'html' \ +. ie '\*[.T]'html' \ . tl '''' . el \{\ . sp .5i @@ -144,23 +157,23 @@ . ev 1 . ps \\n[PS]u . vs \\n[VS]u -. ie '\*(.T'html' \{\ -. ds an-page-string " -. ds an-extra1 " -. ds an-extra2 " +. ie '\*[.T]'html' \{\ +. ds an-page-string +. ds an-extra1 +. ds an-extra2 . \} . el \ -. ds an-page-string \\n% -. if rX \{\ -. if (\\n% > \\nX) \{\ -. nr an-page-letter (\\n% - \\nX) -. ds an-page-string \\nX\\n[an-page-letter] +. ds an-page-string \\n[%] +. if r X \{\ +. if (\\n[%] > \n[X]) \{\ +. nr an-page-letter (\\n[%] - \n[X]) +. ds an-page-string \n[X]\\n[an-page-letter] . \} . \} -. ie '\*(.T'html' \ +. ie '\*[.T]'html' \ . tl '''' . el \{\ -. ie \\nD \{\ +. ie \n[D] \{\ . if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]' . if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]' . \} @@ -170,6 +183,17 @@ . ev .. . +.de an-end +. nr % 1 +. pl +3v +. fl +. sp 3 +. an-p-footer +. pl \\n[nl]u +.. +. +.if \n[cR] .em an-end +. .de SH . sp \\n[PD]u . nr an-level 1 @@ -183,7 +207,7 @@ . nr an-break-flag 1 . ps \\n[PS-SH]u . ft B -. ne (2v + 1u) +. if !\n[cR] .ne (2v + 1u) . if \\n[.$] \&\\$* .. . @@ -200,7 +224,7 @@ . nr an-break-flag 1 . ps \\n[PS-SS]u . ft B -. ne (2v + 1u) +. if !\n[cR] .ne (2v + 1u) . if \\n[.$] \&\\$* .. . @@ -259,7 +283,7 @@ . di . ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\ . in \\n[an-margin]u -. ne (2v + 1u) +. if !\n[cR] .ne (2v + 1u) . an-div . br . in (\\n[an-margin]u + \\n[an-prevailing-indent]u) @@ -268,7 +292,7 @@ . in (\\n[an-margin]u + \\n[an-prevailing-indent]u) . ti -\\n[an-prevailing-indent]u . chop an-div -. ne (1v + 1u) +. if !\n[cR] .ne (1v + 1u) \\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c . \} .. @@ -292,7 +316,7 @@ . vs \\n[VS]u . ft R . sp \\n[PD]u -. ne (1v + 1u) +. if !\n[cR] .ne (1v + 1u) . in (\\n[an-margin]u + \\n[an-prevailing-indent]u) . \} . el \{\ @@ -307,7 +331,7 @@ . vs \\n[VS]u . ft R . sp \\n[PD]u -. ne (1v + 1u) +. if !\n[cR] .ne (1v + 1u) . if \\n[.$] .nr an-prevailing-indent (n;\\$1) . in (\\n[an-margin]u + \\n[an-prevailing-indent]u) . ti \\n[an-margin]u @@ -320,20 +344,20 @@ . ds an-result \&\\$1 . shift . while (\\n[.$] >= 2) \{\ -. as an-result \,\fI\\$1\fR\/\\$2\\*[an-empty] +. as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty] . shift 2 . \} -. if \\n[.$] .as an-result \,\fI\\$1\fR +. if \\n[.$] .as an-result \,\f[I]\\$1\f[R] \\*[an-result] . \} .. . .de IR . if \\n[.$] \{\ -. ds an-result \&\fI\\$1\fR +. ds an-result \&\f[I]\\$1\f[R] . shift . while (\\n[.$] >= 2) \{\ -. as an-result \/\\$1\fI\,\\$2\fR +. as an-result \/\\$1\f[I]\,\\$2\f[R] . shift 2 . \} . if \\n[.$] .as an-result \/\\$1 @@ -343,13 +367,13 @@ . .de IB . if \\n[.$] \{\ -. ds an-result \&\fI\\$1 +. ds an-result \&\f[I]\\$1 . shift . while (\\n[.$] >= 2) \{\ -. as an-result \/\fB\\$1\fI\,\\$2\\*[an-empty] +. as an-result \/\f[B]\\$1\f[I]\,\\$2\\*[an-empty] . shift 2 . \} -. if \\n[.$] .as an-result \/\fB\\$1 +. if \\n[.$] .as an-result \/\f[B]\\$1 \\*[an-result] . ft R . \} @@ -357,13 +381,13 @@ . .de BI . if \\n[.$] \{\ -. ds an-result \&\fB\\$1 +. ds an-result \&\f[B]\\$1 . shift . while (\\n[.$] >= 2) \{\ -. as an-result \,\fI\\$1\fB\/\\$2\\*[an-empty] +. as an-result \,\f[I]\\$1\f[B]\/\\$2\\*[an-empty] . shift 2 . \} -. if \\n[.$] .as an-result \,\fI\\$1 +. if \\n[.$] .as an-result \,\f[I]\\$1 \\*[an-result] . ft R . \} @@ -372,10 +396,10 @@ .de RB . ds an-result \& . while (\\n[.$] >= 2) \{\ -. as an-result \fR\\$1\fB\\$2\\*[an-empty] +. as an-result \f[R]\\$1\f[B]\\$2\\*[an-empty] . shift 2 . \} -. if \\n[.$] .as an-result \fR\\$1 +. if \\n[.$] .as an-result \f[R]\\$1 \\*[an-result] . ft R .. @@ -383,10 +407,10 @@ .de BR . ds an-result \& . while (\\n[.$] >= 2) \{\ -. as an-result \fB\\$1\fR\\$2\\*[an-empty] +. as an-result \f[B]\\$1\f[R]\\$2\\*[an-empty] . shift 2 . \} -. if \\n[.$] .as an-result \fB\\$1 +. if \\n[.$] .as an-result \f[B]\\$1 \\*[an-result] . ft R .. @@ -425,6 +449,6 @@ .\" Load local modifications. .mso man.local . -.cp \n(_C +.cp \n[_C] . .\" end of an-old.tmac diff --git a/tmac/groff_man.man b/tmac/groff_man.man index 27d92a68..79a3717b 100644 --- a/tmac/groff_man.man +++ b/tmac/groff_man.man @@ -64,6 +64,13 @@ The macros understand the following command line options (which define various registers). .TP +.B \-rcR1 +This option (the default if in nroff mode) will create a single, very long +page instead of multiple pages. +Say +.B \-rcR0 +to disable it. +.TP .B \-rC1 If more than one manual page is given on the command line, number the pages continuously, rather than starting each at\ 1. -- cgit v1.2.1