diff options
Diffstat (limited to 'contrib/groff/tmac/an-old.tmac')
-rw-r--r-- | contrib/groff/tmac/an-old.tmac | 112 |
1 files changed, 63 insertions, 49 deletions
diff --git a/contrib/groff/tmac/an-old.tmac b/contrib/groff/tmac/an-old.tmac index 3cee907..063ebce 100644 --- a/contrib/groff/tmac/an-old.tmac +++ b/contrib/groff/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) .\" @@ -62,10 +62,15 @@ . ie n .nr LL 78n . el .nr LL 6.5i .\} -.if !r LT \{\ -. ie n .nr LT 78n -. el .nr LT 6.5i -.\} +.if !r LT \ +. nr LT \n[LL] +. +.nr FT -.5i +. +.\" Default heading font +.ds HF B +. +.nr an-first 1 . .nr an-html 0 .if '\*[.T]'html' .nr an-html 1 @@ -92,7 +97,7 @@ .\" .TH title section extra1 extra2 extra3 .de1 TH . if \\n[an-html] \{\ -. HTML-TAG ".tl" +. HTML-TAG-NS ".tl" \\$1 . \} . @@ -136,9 +141,15 @@ . vs \\n[VS]u . ll \\n[LL]u . -. nr IN 7.2n +.\" We must select an integer indentation value for nroff; +.\" see comment in an-do-tag. +. 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] @@ -153,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) @@ -192,8 +203,31 @@ . 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 +. if r ps4html \ +. return +. 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 +. if \\n[cR] \{\ +. ie \\n[an-first] \ +. nr an-first 0 +. el \ +. sp .5i +. \} . ev 1 . ps \\n[PS]u . vs \\n[VS]u @@ -203,7 +237,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 \ @@ -243,12 +277,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 .. . @@ -271,12 +300,12 @@ . fi . in \\n[an-margin]u . ti 0 -. HTML-TAG ".NH \\n[an-level]" +. HTML-TAG-NS ".NH \\n[an-level]" . it 1 an-trap . 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[.$] \&\\$* .. @@ -293,7 +322,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[.$] \&\\$* .. @@ -349,49 +378,32 @@ .. . .de an-do-tag -. nr an-div? 0 . br -. ll . di +. nr an-div? 0 +. ll . ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\ . in \\n[an-margin]u . ne (2v + 1u) . an-div -. br . in (\\n[an-margin]u + \\n[an-prevailing-indent]u) . \} . el \{\ +. \" In nroff mode, if the indentation value is not an integer multiple +. \" of the character cell, it is possible that the following combination +. \" of .in and .ti yields a different result as the .in request in +. \" the .ie part above. . in (\\n[an-margin]u + \\n[an-prevailing-indent]u) . ti -\\n[an-prevailing-indent]u . chop an-div . ne (1v + 1u) -\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c -. \} -.. -. -.de an-do-tag-html -. nr an-div? 0 -. br -. ll -. di -. ie ((\\n[dl] + \\n[an-tag-sep]) > \\n[an-prevailing-indent]) \{\ -. in \\n[an-margin]u -. an-div -. br -. in (\\n[an-margin]u + \\n[an-prevailing-indent]u + \\n[an-tag-sep]u) -. \} -. el \{\ -. in (\\n[an-margin]u + \\n[an-prevailing-indent]u + \\n[an-tag-sep]u) -. ti \\n[an-margin]u -. chop an-div . HTML-TAG-NS ".col 1" -\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\\h'\\n[an-tag-sep]u'\c +\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c . HTML-TAG-NS ".col 2" . \} .. . .de1 LP -. br . sp \\n[PD]u . ps \\n[PS]u . vs \\n[VS]u @@ -509,7 +521,6 @@ .. . .de1 RS -. br . nr an-saved-margin\\n[an-level] \\n[an-margin] . nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent] . ie \\n[.$] .nr an-margin +(n;\\$1) @@ -520,7 +531,6 @@ .. . .de1 RE -. br . ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level]) . el .nr an-level -1 . nr an-level (1 >? \\n[an-level]) @@ -573,11 +583,15 @@ .ds lq \(lq .ds rq \(rq . -.ie \n[an-html] \{\ -. rm an-do-tag -. als an-do-tag an-do-tag-html +.if !\n[an-html] \{\ +. if !rHY \{\ +. ie \n[cR] \ +. nr HY 12 +. el \ +. nr HY 14 +. \} +. hy \n[HY] .\} -.el .hy 14 . .\" Load local modifications. .mso man.local |