?? ms
字號:
.RP....TM 76-1274-16 39199 39199-11....ND October 8, 1976.nr CW 2.85i.nr GW .3i.TLTyping Documents on the UNIX System:.br\!.brUsing the \-ms Macros with Troff and Nroff.AU "MH 2C-572" 6377M. E. Lesk.AI.MH.OKText FormattingPhototypesetting.ABThis document describes a set of easy-to-use macrosfor preparing documents on the UNIX system.Documents may be produced on either thephototypesetter or a on a computer terminal,without changing the input..PPThe macros provide facilities for paragraphs, sections (optionallywith automatic numbering), page titles, footnotes,equations,tables, two-column format, andcover pages for papers..PPThis memo includes, as an appendix,the text of the ``Guide to PreparingDocuments with \-ms''which contains additional examplesof features of \-ms..PPThis manual is a revision of, and replaces,``Typing Documents on UNIX,''dated November 22, 1974..AE.CS 6 6 12 1 0 8.bd I 3.PP.IIntroduction..RThis memorandum describes a package of commands to producepapersusing the.bd I.Itroff.Rand.I nroffformatting programs on the.SMUNIX.NLsystem.As with other.I roff -derivedprograms,text is prepared interspersed with formatting commands.However, this package,which itself is written in.I troffcommands,provides higher-level commandsthan those provided with the basic.I troffprogram.The commands available in this package are listed inAppendix A..bd I 3.PP.IText..RType normally, except that instead of indenting for paragraphs,place a line reading ``.PP'' before each paragraph.This will produce indenting and extra space..LPAlternatively, the command .LP that was used here will producea left-aligned (block) paragraph.The paragraph spacing can be changed: see below under ``Registers.''.PP.IBeginning..RFor a document with a paper-type cover sheet, the input should start as follows:.DS L [optional overall format .RP \- see below] .TL Title of document (one or more lines) .AU Author(s) (may also be several lines) .AI Author's institution(s) .AB Abstract; to be placed on the cover sheet of a paper. Line length is 5/6 of normal; use .ll here to change. .AE (abstract end) text ... (begins with .PP, which see).DETo omit some of the standard headings(e.g. no abstract, or no author's institution) justomit the corresponding fields and command lines.The word.SMABSTRACT.NLcan be suppressed by writing ``.AB no'' for ``.AB''.Several interspersed .AU and .AI lines can be used for multiple authors.The headings are not compulsory: beginningwith a .PP command is perfectly OK and will juststart printing an ordinary paragraph..I Warning:You can't just begin a document with a line of text.Some \-ms command mustprecede any text input. When in doubt, use .LPto get proper initialization, although any ofthe commands .PP, .LP, .TL, .SH, .NH is good enough.Figure 1 shows the legal arrangement of commands at thestart of a document..PP.ICover Sheets and First Pages..RThe first lineof a document signals the general format of the first page.In particular, if it is ".RP" a cover sheet with title andabstract is prepared.The default formatis useful for scanning drafts..PPIn general \-ms is arranged so that only one formof a document need be stored, containing allinformation; the first command gives the format,and unnecessary items for that format are ignored..PPWarning: don't put extraneous materialbetween the .TL and .AE commands. Processingof the titling items isspecial, and other data placed in them may not behaveas you expect.Don't forget that some \-ms command must precede any input text..PP.IPage headings..RThe \-ms macros, by default, will print a page heading containinga page number (if greater than 1).A default page footer is provided only in.I nroff ,where the date is used.The user can make minor adjustments to the page headings/footingsby redefining thestringsLH, CH, and RHwhich are the left, center and right portions of the page headings,respectively; and thestringsLF, CF, and RF,which are the left, center and right portions of the page footer.For more complex formats, the user can redefinethe macros PT and BT, which are invoked respectively at the topand bottom of each page.The margins (taken from registers HM and FM for the top and bottommargin respectively) are normally 1 inch; the page header/footer arein the middle of that space.The user who redefines these macros should be carefulnot to change parameters such as point size or fontwithout resetting them to default values..PP.2C.IMulti-column formats..RIf you place the command ``.2C'' in your document, the document willbe printed in double column format beginningat that point. This feature is not too useful in computerterminal output, but is often desirable on the typesetter.The command ``.1C'' will goback to one-column format and also skip to a new page.The ``.2C'' command is actually a special case of the command.DS L .MC [column width [gutter width]].DEwhich makes multiple columns with the specified columnand gutter width; as many columns as will fit across the pageare used.Thus triple, quadruple, ... column pages can be printed.Whenever the number of columns is changed (except going fromfull width to some larger number of columns)a new page is started..PP.IHeadings..RTo produce a special heading, there are two commands.If you type.DS L .NH type section heading here may be several lines.DEyou will get automatically numbered section headings (1, 2, 3, ...),in boldface.For example,.DS L .NH Care and Feeding of Department Heads.DEproduces.NHCare and Feeding of Department Heads.PPAlternatively,.DS L .SH Care and Feeding of Directors.DEwill print the heading with no number added:.SHCare and Feeding of Directors.PPEvery section heading, of either type, should be followedby a paragraph beginning with .PP or .LP, indicatingthe end of the heading.Headings may contain more than one lineof text..PPThe .NH command also supports more complex numbering schemes.If a numerical argument is given, it is taken to be a``level'' number and an appropriate sub-sectionnumber is generated.Larger level numbers indicate deepersub-sections, as in this example:.DS L .NH Erie-Lackawanna .NH 2 Morris and Essex Division .NH 3 Gladstone Branch .NH 3 Montclair Branch .NH 2 Boonton Line.DEgenerates:.NHErie-Lackawanna.NH 2Morris and Essex Division.NH 3Gladstone Branch.NH 3Montclair Branch.NH 2Boonton Line.PPAn explicit ``.NH 0'' will reset the numbering of level 1to one, as here:.DS L .NH 0 Penn Central.DE.ft 3.if n .ul 1.sp 11. Penn Central.PP.IIndented paragraphs..R(Paragraphs with hanging numbers, e.g. references.)The sequence.DS L .IP [1] Text for first paragraph, typed normally for as long as you would like on as many lines as needed. .IP [2] Text for second paragraph, ....DEproduces.IP [1]Text for first paragraph, typed normally for as longas you would like on as many lines asneeded..IP [2]Text for second paragraph, ....LPA series of indented paragraphs may be followed by an ordinary paragraphbeginning with .PP or .LP,depending on whether you wish indenting or not.The command .LP was used here..PPMore sophisticated uses of .IP are also possible.If the label is omitted, for example, a plain block indentis produced..DS L .IP This material will just be turned into a block indent suitable for quotations or such matter. .LP.DEwill produce.IPThis materialwill just be turnedinto a block indentsuitable forquotations or such matter..LPIf a non-standard amount of indenting is required,it may be specified after the label (in character positions)and will remain in effect until the next .PP or .LP.Thus, the general form of the .IP commandcontains two additional fields: the label and the indentinglength. For example,.DS L .IP first: 9 Notice the longer label, requiring larger indenting for these paragraphs. .IP second: And so forth. .LP.DEproduces this:.IP first: 9Notice the longer label, requiring largerindenting for these paragraphs..IP second:And so forth..LPIt is also possible to produce multiple nested indents;the command .RS indicates that the next .IP starts from thecurrent indentation level.Each .RE will eat up one level of indentingso you should balance .RS and .RE commands.The .RS command should be thought of as ``move right'' andthe .RE command as ``move left''.As an example.DS L .IP 1. Bell Laboratories .RS .IP 1.1 Murray Hill .IP 1.2 Holmdel .IP 1.3 Whippany .RS .IP 1.3.1 Madison .RE .IP 1.4 Chester .RE .LP.DEwill result in.IP 1.Bell Laboratories.RS.IP 1.1Murray Hill.IP 1.2Holmdel.IP 1.3Whippany.RS.IP 1.3.1Madison.RE.IP 1.4Chester.RE.LPAll of these variations on .LP leave the rightmargin untouched. Sometimes, for purposessuch as setting off a quotation, a paragraph indentedon both right and left is required..QPA single paragraphlike this is obtainedby preceding it with .QP.More complicated material (several paragraphs) should bebracketed with .QS and .QE..LP.IEmphasis..RTo getitalics(on the typesetter) or underlining (on the terminal)say.DS L .I as much text as you want can be typed here .R.DE.bd I.bras was done for.Ithese three words..RThe .R command restores the normal (usually Roman) font.If only one word is to be italicized, itmay be just given on the line with the .I command,.br.bd I 3.DS .I word.DEand in this case no .R is needed to restorethe previous font..BBoldface.Rcan be produced by.DS L .B Text to be set in boldface goes here .R.DEand also will be underlined on the terminal or line printer.As with .I, a single word can be placed in boldfaceby placing it on the same line as the .B command..PPA few size changescan be specified similarly withthe commands .LG (make larger), .SM (make smaller), and .NL(return to normal size).The size changeis two points; the commands may be repeated for.SMincreased.SMeffect.NL(here one .NL canceled two .SM commands)..PPIf actual.UL underliningas opposed to italicizing is required on the typesetter,the command.DS .UL word.DEwill underline a word. There is no way to underlinemultiple words on the typesetter..PP
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -