📄 tmac.groff_me
字号:
.\" @(#)tmac.e 2.31 (Berkeley) 5/21/88.\" Modified by James Clark for use with groff..\".\" Copyright (c) 1988 Regents of the University of California..\" All rights reserved..\".\" Redistribution and use in source and binary forms are permitted.\" provided that this notice is preserved and that due credit is given.\" to the University of California at Berkeley. The name of the University.\" may not be used to endorse or promote products derived from this.\" software without specific prior written permission. This software.\" is provided ``as is'' without express or implied warranty..\" %beginstrip%.\".\"**********************************************************************.\"* *.\"* ****** - M E N R O F F / T R O F F M A C R O S ****** *.\"* *.\"* Produced for your edification and enjoyment by: *.\"* Eric Allman *.\"* Electronics Research Laboratory *.\"* U.C. Berkeley. *.\"* current address: *.\"* Britton-Lee, Inc. *.\"* 1919 Addison Street Suite 105 *.\"* Berkeley, California 94704 *.\"* *.\"* VERSION 2.31 First Release: 11 Sept 1978 *.\"* *.\"* Documentation is available. *.\"* *.\"**********************************************************************.\".\" Code on .de commands:.\" *** a user interface macro..\" &&& a user interface macro which is redefined.\" when used to be the real thing..\" $$$ a macro which may be redefined by the user.\" to provide variant functions..\" --- an internal macro..\".if !\n(.g .ig.de @R \" --- initialize number register to 0, if undefined.if !r\\$1 .nr \\$1 0...@R pf.if \n(pf .nx.if !\n(.g .ig.de @S \" --- initialize string/macro to empty, if undefined.if !d\\$1 .ds \\$1 \" empty...@R @\" \" debugging level.\" *** INTERNAL GP MACROS ***.de @C \" --- change ev's, taking info with us.nr _S \\n(.s.nr _V \\n(.v.nr _F \\n(.f.do ds _A \\n[.fam].nr _I \\n(.i.ev \\$1.ps \\n(_S.vs \\n(_Vu.ft \\n(_F.do @fam \\*(_A'in \\n(_Iu.xl \\n($lu.lt \\n($lu.rr _S.rr _V.rr _F.rr _I.ls 1'ce 0...de @D \" --- determine display type (Indent, Left, Center).ds |p "\\$3.nr _d 0.if "\\$2"C" \. nr _d 1.if "\\$2"L" \. nr _d 2.if "\\$2"I" \. nr _d 3.if "\\$2"M" \. nr _d 4.if !\\n(_d \{\. nr _d \\$1. ds |p "\\$2.\}...de @z \" --- end macro.if \n@>1 .tm >> @z, .z=\\n(.z ?a=\\n(?a.if !"\\n(.z"" \\{\. tm Line \\n(c. -- Unclosed block, footnote, or other diversion (\\n(.z). di. ex.\}.if \\n(?a \. bp \" force out final table.ds bp.ds @b\" \" don't start another page.br.if \n@>1 .tm << @z...\" *** STANDARD HEADERS AND FOOTERS ***.ie \n(.g .ds $* \\\\$*.el .ds $* \\\\$1 \\\\$2 \\\\$3 \\\\$4 \\\\$5 \\\\$6 \\\\$7 \\\\$8 \\\\$9.de he \" *** define header.ie !\\n(.$ \\{\. rm |4. rm |5.\}.el \\{\. ds |4 "\*($*. ds |5 "\*($*.\}...de eh \" *** define even header.ie !\\n(.$ \. rm |4.el \. ds |4 "\*($*...de oh \" *** define odd header.ie !\\n(.$ \. rm |5.el \. ds |5 "\*($*...de fo \" *** define footer.ie !\\n(.$ \\{\. rm |6. rm |7.\}.el \\{\. ds |6 "\*($*. ds |7 "\*($*.\}...de ef \" *** define even foot.ie !\\n(.$ \. rm |6.el \. ds |6 "\*($*...de of \" *** define odd footer.ie !\\n(.$ \. rm |7.el \. ds |7 "\*($*...de ep \" *** end page (must always be followed by a .bp).if \\n(nl>0 \\{\. wh 0. rs. @b.\}...\" *** INTERNAL HEADER AND FOOTER MACROS ***.de @h \" --- header.if \n@>1 .tm >> @h %=\\n% ?a=\\n(?a ?b=\\n(?b ?w=\\n(?w.if (\\n(.i+\\n(.o)>=\\n(.l \. tm Line \\n(c. -- Offset + indent exceeds line length.\" initialize a pile of junk.nr ?h \\n(?H \" transfer "next page" to "this page".nr ?H 0.nr ?c \\n(?C.nr ?C 0.rn |4 |0.rn |5 |1.rn |6 |2.rn |7 |3.nr _w 0 \" reset max footnote width.nr ?W 0 \" no wide floats this page (yet).nr ?I 1.\" begin actual header stuff.ev 2.rs.if \\n(hm>0 \. sp |\\n(hmu \" move to header position.@t $h \" output header title.if \\n(tm<=0 \. nr tm \n(.Vu.sp |\\n(tmu \" move to top of text.ev.mk _k \" for columned output.if \\n(?n .nm 1 \" restore line numbering if n1 mode.nr $c 1 \" set first column.if \n@>4 .tm -- @h >> .ns nl=\\n(nl %=\\n% _k=\\n(_k tm=\\n(tm.ie \\n(?s \\{\. nr ?s 0. rs' @b.\}.el \. @n \" begin the column.if \n@>2 .tm << @h...de @n \" --- new column or page.if \n@>3 .tm >> @n nl=\\n(nl %=\\n% ?f=\\n(?f ?o=\\n(?o.if \\n(bm<=0 \. nr bm \\n(.Vu.if (\\n(_w<=\\n($l)&(\\n(?W=0) \\{\. nr _b (\\n(ppp*\\n($vu)/200u \" compute fudge factor (must be < 1P). if \\n(_bu>((\\n(bmu-\\n(fmu-((\\n(tpp*\\n($vu)/100u))/2u) \. nr _b (\\n(ppp*\\n($vu)/100u-\n(.Vu. nr _b +\\n(bmu.\}.nr _B \\n(_bu.ch @f.wh -\\n(_bu @f.nr _b +(\\n(ppp*\\n($vu)/100u \" add 1 paragraph v in case of sweep past.if \n@>2 .tm @n .p=\\n(.p bm=\\n(bm _b=\\n(_b _B=\\n(_B.nr ?f 0 \" reset footnote flag.if \\n(?o \\{\. (f _ \" reprocess footnotes which run off page. nf. |o. fi. )f. rm |o.\}.nr ?o 0.if \\n(?T \\{\. nr _i \\n(.i. in \\n($iu. |h \" output the table header. in \\n(_iu. rr _i. mk #T \" for tbl commands. ns.\}.if (\\n(?a)&((\\n($c<2):(\\n(?w=0)) \\{\. nr ?a 0 \" output floating keep. @k |t. if \\n(?w \. mk _k \" don't overstrike wide keeps. nr ?w 0.\}.os.$H \" special column header macro.ns...de @f \" --- footer.if \n@>1 .tm >> @f %=\\n% nl=\\n(nl ?a=\\n(?a ?b=\\n(?b ?f=\\n(?f.if \n@>2 .nr VL \\n(.pu-\\n(nlu.if \n@>2 .tm @f bm=\\n(bm _B=\\n(_B _b=\\n(_b .p-nl=\\n(VL.ec.if \\n(?T \\{\. nr T. 1 \" for tbl commands (to output bottom line). T# 1 \" output the sides and bottom lines. br.\}.ev 2.ce 0.if \\n(?b \\{\. nr ?b 0. @k |b\" \" output bottom of page tables.\}.if \\n(?f \. @o \" output footnote if present.ie \\n($c<\\n($m \. @c \" handle new column.el \. @e \" new page.ev.if \n@>2 .tm << @f...de @o \" --- output footnote.nf.ls 1.in 0.if \n@>2 .tm @o last printed text = \\n(nl placing @r trap at -\\n(_B.wh -\\n(_Bu @r.|f.fi.if \n@>2 .tm @o triggered @r (?o) = \\n(?o.if \\n(?o \\{\. di \" just in case triggered @r. if \\n(dn=0 \\{\. rm |o. nr ?o 0. \}. nr dn \\n(_D. rr _D.\}.rm |f.ch @r...de @c \" --- new column.if \n@>2 .tm >> @c %=\\n%.rs.sp |\\n(_ku.@O +\\n($lu+\\n($su.nr $c +1.@n...de @e \" --- end page.if \n@>2 .tm >> @e.@O \\n(_ou.rs.sp |\\n(.pu-\\n(fmu-((\\n(tpp*\\n($vu)/100u) \" move to footer position.@t $f \" output footer title.nr ?h 0.bp...de @t \" --- output header or footer title.if !\\n(?h \\{\. sz \\n(tp \" set header/footer type fonts, etc.. @F \\n(tf. lt \\n(_Lu \" make title span entire page. nf. \\$1. br.\}...de $h \" $$$ print header.ds |z.if !\\n(?c \\{\. if e .ds |z "\\*(|0. if o .ds |z "\\*(|1.\}.if !\(ts\\*(|z\(ts\(ts \' tl \\*(|z.rm |z...de $f \" $$$ print footer.ds |z.if \\n(?c \\{\. if e .ds |z "\\*(|0. if o .ds |z "\\*(|1.\}.if \(ts\\*(|z\(ts\(ts \\{\. if e .ds |z "\\*(|2. if o .ds |z "\\*(|3.\}.if !\(ts\\*(|z\(ts\(ts \' tl \\*(|z.rm |z...de @r \" --- reprocess overflow footnotes.if \n@>3 .tm >> @r .z=\\n(.z ?f=\\n(?f ?a=\\n(?a ?b=\\n(?b _b=\\n(_b.di |o \" save overflow footnote.nr ?o 1.nr _D \\n(dn.ns...\" *** COMMANDS WITH VARIANT DEFINITIONS ***.rn bp @b \" --- begin page.de bp \" *** begin new page (overrides columns).nr $c \\n($m \" force new page, not new column.ie \\n(nl>0 \. @b \\$1.el \\{\. if \\n(.$>0 \. pn \\$1. if \\n(?I \. @h \" 'spring' the header trap.\}.br.wh 0 @h \" reset header...rn ll xl \" *** special line length (local).de ll \" *** line length (global to environments).xl \\$1.lt \\$1.nr $l \\n(.l.if (\\n($m<=1):(\\n($l>\\n(_L) \. nr _L \\n(.l...rn po @O \" --- local page offset.de po \" *** page offset.@O \\$1.nr _o \\n(.o...\" Redefine the fam request to set the family in.\" environment 2 as well as the current environment..if !\n(.g .ig.do rn fam @fam \" --- set family in current environment.do de fam \" *** set font family in ev 2 and current ev.do @fam \\$1.ev 2.do @fam \\$1.ev...\" *** MISCELLANEOUS ROFF COMMANDS ***.de hx \" *** suppress headers and footers next page.nr ?H 1...de ix \" *** indent, no break'in \\$1...de bl \" *** contiguous blank lines.br.ne \\$1.rs.sp \\$1...de n1 \" *** line numbering 1.nm 1.xl -\w'0000'u.nr ?n 1...de n2 \" *** line numbering 2.nm \\$1.ie \\n(.$ \. xl -\w'0000'u.el \. xl \\n($lu...de pa \" *** new page.bp \\$1...de ro \" *** roman page numbers.af % i...de ar \" *** arabic page numbers.af % 1...de m1 \" *** position one space.nr _0 \\n(hmu.nr hm \\$1v.nr tm +\\n(hmu-\\n(_0u.rr _0...de m2 \" *** position two space.nr tm \\n(hmu+\\n(tpp+\\$1v...de m3 \" *** position three space.nr bm \\n(fmu+\\n(tpp+\\$1v...de m4 \" *** position four space.nr _0 \\n(fmu.nr fm \\$1v.nr bm +\\n(fmu-\\n(_0u...de sk \" *** leave a blank page (next page).if \\n(.$>0 \. tm Line \\n(c. -- I cannot skip multiple pages.nr ?s 1...\" *** MISCELLANEOUS USER SUPPORT COMMANDS ***.if !\n(.g .ig.de re \" *** reset tabs (TROFF defines 15 stops default).ta T 0.5i...if \n(.g .ig.de re.ta 0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i...de ba \" *** set base indent.ie \\n(.$ \. nr $i \\$1n.el \. nr $i \\n(siu*\\n($0u...de hl \" *** draw horizontal line.br\l'\\n(.lu-\\n(.iu'.sp...\" *** PARAGRAPHING ***.de pp \" *** paragraph.lp \\n(piu...de lp \" *** left aligned paragraph.@p.if \\n(.$ \. ti +\\$1.nr $p 0 1...de ip \" *** indented paragraph w/ optional tag.if (\\n(ii>0)&(\\n(ii<1n) \. nr ii \\n(iin.nr _0 \\n(ii.if \\n(.$>1 \. nr _0 \\$2n.@p \\n(_0u.if \\w"\\$1" \\{\. ti -\\n(_0u. ie \\w"\\$1">=\\n(_0 \\{\\&\\$1. br. \}. el \&\\$1\h'|\\n(_0u'\c.\}.rr _0...de np \" *** numbered paragraph.\" use string comparison in case user has changed format of $p.if '\\n($p'-1' \. nr $p 0 \" reset number after .bu.nr $p +1 \" increment paragraph number.@p \w'\0(000)\0'u.ti -\w'\0(000)\0'u\0(\\n($p)\h'|\w'\0(000)\0'u'\c...de bu \" *** bulleted paragraph.br.\" use string comparison in case user has changed format of $p.if '\\n($p'-1' \. ns \" don't space between .bu paragraphs.nr $p 0-1 \" mark "bulleted paragraph" mode.@p \w'\0\(bu\0'u.ti -\w'\0\(bu\0'u\0\(bu\0\c...de @p \" --- initialize for paragraph.if "\\n(.z"|e" .tm Line \\n(c. -- Unmatched continued equation.in \\n($iu+\\n(pou.if \\n(.$ \. in +\\$1n.ce 0.fi.@F \\n(pf.sz \\n(pp.sp \\n(psu.ne \\n(.Lv+\\n(.Vu.ns...\" *** SECTION HEADINGS ***.de sh \" *** section heading.fi.if (\\n(si>0)&(\\n(si<1n) \. nr si \\n(sin.ce 0.@d "\\$1" +1 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8.if !"\\$2"_" \\{\. ds |n \&\\$2. $p "\\*(|n" "\\*($n" \\n($0. $0 "\\*(|n" "\\*($n" \\n($0. rm |n.\}.nr $p 0 1 \" reset .np count...de @d \" --- change section depth.if !""\\$1" \. nr $0 \\$1.if \\n($0&(\\n(.$>1) \. nr $\\n($0 \\$2.ds $n \&\".ie \\n($0>=1 \\{\. if '\\n($1'0' \. nr $1 1. if (\\n(.$>=3) .if !"\\$3"-" \. nr $1 \\$3. as $n \\n($1.\}.el \. nr $1 0.ie \\n($0>=2 \\{\. if '\\n($2'0' \. nr $2 1. if (\\n(.$>=4) .if !"\\$4"-" \. nr $2 \\$4. as $n .\\n($2.\}.el \. nr $2 0.ie \\n($0>=3 \\{\. if '\\n($3'0' \. nr $3 1. if (\\n(.$>=5) .if !"\\$5"-" \. nr $3 \\$5. as $n .\\n($3.\}.el \. nr $3 0.ie \\n($0>=4 \\{\. if '\\n($4'0' \. nr $4 1. if (\\n(.$>=6) .if !"\\$6"-" \. nr $4 \\$6. as $n .\\n($4.\}.el \. nr $4 0.ie \\n($0>=5 \\{\. if '\\n($5'0' \. nr $5 1. if (\\n(.$>=7) .if !"\\$7"-" \. nr $5 \\$7. as $n .\\n($5.\}.el \. nr $5 0.ie \\n($0>=6 \\{\. if '\\n($6'0' \. nr $6 1. if (\\n(.$>=8) .if !"\\$8"-" \. nr $6 \\$8. as $n .\\n($6.\}.el \. nr $6 0...de sx \" *** heading up, no increment (2.1.1 -> 2.1).ce 0.ul 0.nr _0 \\n($0-1.if \\n(.$ .nr _0 +1.if \\n(.$ .nr _0 \\$1.@d \\n(_0.rr _0.$p "" "" \\n($0.nr $p 0 1 \" reset .np count...de uh \" *** unnumbered section heading.$p "\\$1".$0 "\\$1"...de $p \" $$$ print section heading.if (\\n(si>0)&(\\n(.$>2) \. nr $i \\$3*\\n(si.in \\n($iu.ie !"\\$1\\$2"" \\{\. sp \\n(ssu \" one of them is non-null. ne \\n(.Lv+\\n(.Vu+\\n(psu+((\\n(spp*\\n($vu*\\n(.Lu)/100u). \" exdent if \\$3 > 0. ie 0\\$3 \. ti -(\\n(siu-\\n(sou). el \. ti +\\n(sou. @F \\n(sf. sz \\n(sp. if \\$3>0 \. $\\$3. if \w"\\$2">0 \\$2.. if \w"\\$1">0 \\$1\f1\ \ \&.\}.el \. sp \\n(psu.@F \\n(pf.sz \\n(pp...\" *** COLUMNNED OUTPUT ***.de 2c \" *** double columned output.br.if \\n($m>1 \. 1c \" revert to 1c if already 2c.nr $c 1.nr $m 2.if \\n(.$>1 \. nr $m \\$2.if \\n(.$>0 \. nr $s \\$1n \" param 1: column seperation.nr $l (\\n(.l-((\\n($m-1)*\\n($s))/\\n($m.xl \\n($lu.mk _k.ns...de 1c \" *** single columned output.br.nr $c 1.nr $m 1.ll \\n(_Lu \" return to normal output.sp |\\n(.hu.@O \\n(_ou...de bc \" *** begin column.sp 24i...\" *** FLOATING TABLES AND NONFLOATING BLOCKS ***.de (z \" *** begin floating keep.if \n@>4 .tm >> (z, .z=\n(.z.@D 4 \\$1 \\$2.@(.nr ?T 0...de )z \" *** end floating keep.if \n@>4 .tm >> )z, .z=\n(.z.sp \\n(zsu.@).if \n@>4 .tm -- )z << @), .z=\n(.z.rr _0.if !\\n(?b \. nr dn +(\\n(ppp*\\n($vu)/200u+\\n(zsu.nr dl -\n(.H \" fudge factor necessary to make it work.ie ((\\n(dn+\n(.V)>=\\n(.t):(\\n(?a):((\\n(dl>\\n($l)&(\\n($c>1)) \\{\. nr ?a 1. if (\\n(dl>\\n($l)&(\\n($m>1) \. nr ?w 1 \" mark wider than one column (top). ds |x |t.\}.el \\{\. nr ?b 1. if (\\n(dl>\\n($l)&(\\n($m>1) \. nr ?W 1 \" mark wider than one column (bottom). nr _b +\\n(dnu. \" avoid moving @f back past the current position. if \\n(.p-\\n(nl-\n(.V<\\n(_b \. nr _b \\n(.p-\\n(nl-\n(.V. ch @f -\\n(_bu. ds |x |b.\}.da \\*(|x \" copy to save macro.nf.ls 1.nr ?k 1.if \n@>4 .tm -- )z >> \\*(|x\!.if \\\\n(nl>(\\\\n(tm+2v) .ne \\n(dnu-\\n(zsu.|k\" \" and the body.ec.if \n@>4 .tm -- )z << \\*(|x, .z=\\n(.z.nr ?k 0.rm |k\" \" remove the temp macro.da.in 0.ls 1.xl \\n($lu.ev.if \n@>4 .tm << )z, .z=\\n(.z...de @k \" --- output floating keep.if \n@>4 .tm >> @k, $1=\\$1, .z=\\n(.z.ev 1.nf.ls 1.in 0.sp \\n(zsu.\\$1.ec.br.rm \\$1.ev.nr ?T 0...de (t \" XXX temp ref to (z.(z \\$1 \\$2...de )t \" XXX temp ref to )t.)z \\$1 \\$2...de (b \" *** begin block.br.@D 3 \\$1 \\$2.sp \\n(bsu.@(...de )b \" *** end block.br.@).if (\\n(bt=0):(\\n(.t<\\n(bt) \. ne \\n(dnu \" make it all on one page.ls 1.nf.|k.ec.fi.in 0.xl \\n($lu.ev.rm |k.sp \\n(bsu+\\n(.Lv-1v...de @( \" --- begin keep.if !"\\n(.z"" .tm Line \\n(c. -- Illegal nested keep \\n(.z.@M.di |k\!'rs...de @M \" --- set modes for display.nr ?k 1.@C 1.@F \\n(df.if \\n($R .@V.vs \\n(.sp*\\n($Vu/100u.nf.if "\\*(|p"F" \. fi \" set fill mode if "F" parameter.if \\n(_d=4 \. in 0.if \\n(_d=3 \\{\. in +\\n(biu. xl -\\n(biu.\}.if \\n(_d=1 \. ce 10000...de @) \" --- end keep.br.if !"\\n(.z"|k" .tm Line \\n(c. -- Close of a keep which has never been opened.nr ?k 0.di.in 0.ce 0...de (c \" *** begin block centered text.if "\\n(.z"|c" .tm Line \\n(c. -- Nested .(c requests.di |c...de )c \" *** end block centered text
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -