📄 meintro.me
字号:
.\" Copyright (c) 1986 The Regents of the University of California..\" All rights reserved..\".\" Redistribution and use in source and binary forms are permitted.\" provided that the above copyright notice and this paragraph are.\" duplicated in all such forms and that any documentation,.\" advertising materials, and other materials related to such.\" distribution and use acknowledge that the software was developed.\" by the University of California, 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'' AND WITHOUT ANY EXPRESS OR.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE..\".\" @(#)intro.me 6.4 (Berkeley) 7/17/89.\".\" Modified for groff by jjc@jclark.com..\"UC 7.ll 6.5i.lt 6.5i.ds MO @VERSION@.nr si 3n.he 'USING GROFF AND \-ME''%'.\"eh 'USD:22-%''Writing Papers with NROFF using \-me'.\"oh 'Writing Papers with NROFF using \-me''USD:22-%'.ds U \s-1UNIX\s0.ds N \s-1NROFF\s0.ds T \s-1TROFF\s0.ds G \s-1GROFF\s0.+c.(l C.sz 14.b "Writing Papers with GROFF using \-me".sz.sp 2.ulEric P. Allman*.(f*Author's current address:Britton Lee, Inc.,1919 Addison Suite 105,Berkeley, California 94704..)f.spProject INGRESElectronics Research LaboratoryUniversity of California, BerkeleyBerkeley, California 94720.sp 2.i "Modified for \*G by James Clark".)l.sp 4.ppThis document describesthe text processing facilitiesavailable on the \*U\(dg.(f\(dg\*U is a trademarkof AT&T Bell Laboratories.)foperating systemvia \*G and the\-memacro package.It is assumedthat the readeralready is generally familiarwith the \*U operating systemand a text editorsuch as.b ex .This is intended to be a casual introduction,andas such not all material is covered.In particular,many variations and additional featuresof the \-me macro packageare not explained.For a complete discussion of thisand other issues,see.ulThe \-me Reference Manualand.ulThe \*N/\*T Reference Manual..pp\*G, a computer programthat runs on the \*U operating system,reads an input fileprepared by the userand outputs a formatted papersuitable for publication or framing.The input consists of.i text ,or words to be printed,and.i requests ,which give instructionsto the \*G programtelling how to format the printed copy..ppSection 1describes the basicsof text processing.Section 2describes the basic requests.Section 3introduces displays.Annotations,such as footnotes,are handled insection 4.The more complex requestswhich are not discussed in section 2are covered in section 5.Finally,section 6discusses things you will needto knowif you want to typeset documents.If you are a novice,you probably won't want to read beyond section 4until you have tried some of the basic features out..ppWhen you have your raw text ready,call the \*G formatter by typingas a request to the \*U shell:.(bgroff \-me \-T\c.i "type files".)bwhere.i typedescribes the type ofoutput device you are using.A complete description of optionsto the \*G command can be found in.b groff (1)..ppThe word.i argumentis used in this manualto mean a word or numberwhich appears on the same lineas a requestwhich modifies the meaningof that request.For example,the request.(b\&.sp.)bspaces one line,but.(b\&.sp 4.)bspaces four lines.The number.b 4is an.i argumentto the.b .sprequestwhich says to space four linesinstead of one.Arguments are separated from the requestand from each otherby spaces..sh 1 "Basics of Text Processing".ppThe primary functionof \*Gis to.i collectwords from input lines,.i filloutput lines with those words,.i justifythe right hand margin by inserting extra spacesin the line,and output the result.For example,the input:.(bNow is the timefor all good mento come to the aidof their party.Four score and sevenyears ago,....)bwill be read,packed onto output lines,and justifiedto produce:.(b FNow is the timefor all good mento come to the aidof their party.Four score and sevenyears ago,....)bSometimes you may want to start a new output lineeven though the line you are onis not yet full;for example,at the end of a paragraph.To do thisyou can cause a.i break ,whichstarts a new output line.Some requestscause a break automatically,as do blank input linesand input lines beginning with a space..ppNot all input linesare text to be formatted.Some of the input linesare.i requestswhich describehow to format the text.Requests always have a periodor an apostrophe(\c.q "\|\(aa\|" )as the first characterof the input line..ppThe text formatteralso does more complex things,such as automatically numbering pages,skipping over page folds,putting footnotes in the correct place,and so forth..ppI can offer you a few hintsfor preparing textfor input to \*G.First,keep the input lines short.Short input lines are easier to edit,and \*G will pack words onto longer linesfor you anyhow.In keeping with this,it is helpfulto begin a new lineafter every period,comma,or phrase,since common correctionsare to add or delete sentencesor phrases.Second,do not put spaces at the end of lines,since this can sometimes confuse the \*Nprocessor.Third,do not hyphenate words at the end of lines(except words that should have hyphens in them,such as.q mother-in-law );\*G is smart enough to hyphenate wordsfor you as needed,but is not smart enoughto take hyphens outand join a word back together.Also,words such as.q mother-in-lawshould not be brokenover a line,since then you will get a spacewhere not wanted,such as.tr @-.nh.q "mother@\ in@law" ..br.tr @@.hy 14.sh 1 "Basic Requests".sh 2 "Paragraphs".ppParagraphs are begunby using the.b .pprequest.For example,the input:.(b\&.ppNow is the time for all good mento come to the aid of their party.Four score and seven years ago,....)bproduces a blank linefollowed by an indented first line.The result is:.(b F.ti +\n(piuNow is the time for all good mento come to the aid of their party.Four score and seven years ago,....)b.ppNotice that the sentencesof the paragraphs.i "must not"begin with a space,since blank linesand lines beginning with spacescause a break.For example,if I had typed:.(b\&.ppNow is the time for all good men to come to the aid of their party.Four score and seven years ago,....)bThe output would be:.(b F.ti +\n(piuNow is the time for all good men to come to the aid of their party.Four score and seven years ago,....)bA new line begins after the word.q menbecause the second line began with a space character..ppThere are manyfanciertypes of paragraphs,which will be described later..sh 2 "Headers and Footers".ppArbitrary headers and footerscan be putat the top and bottomof every page.Two requestsof the form.b .he \ \c.i titleand.b .fo \ \c.i titledefine the titles to put at the head and the footof every page,respectively.The titles are called.i three-parttitles,that is,there is a left-justified part,a centered part,and a right-justified part.To separate these three partsthe first character of.i title(whatever it may be)is used as a delimiter.Any character may be used,butbackslashand double quote marksshould be avoided.The percent signis replaced by the current page numberwhenever found in the title.For example,the input:.(b\&.he \(aa\(aa%\(aa\(aa\&.fo \(aaJane Jones\(aa\(aaMy Book\(aa.)bresults in the page numbercentered at the topof each page,.q "Jane Jones"in the lower left corner,and.q "My Book"in the lower right corner..sh 2 "Double Spacing".pp.ls 2\*G will double space output text automatically if youuse the request.b ".ls\ 2" ,as is done in this section.You can revert to single spaced modeby typing.b ".ls\ 1" ..ls 1.sh 2 "Page Layout".ppA number of requests allowyou to change the way the printed copy looks,sometimes called the.i layoutof the output page.Most of these requests adjust the placingof.q "white space"(blank lines or spaces).In these explanations,characters in italicsshould be replaced with values you wish to use;bold charactersrepresent characters which should actually be typed..ppThe.b .bprequeststarts a new page..ppThe request.b .sp \ \c.i Nleaves.i Nlines of blank space..i Ncan be omitted(meaning skip a single line)or can be of the form.i N \^\c.b i(for.i Ninches)or.i N \^\c.b c(for.i Ncentimeters).For example, the input:.(b\&.sp 1.5iMy thoughts on the subject\&.sp.)bleaves one and a half inches of space,followed by the line.q "My thoughts on the subject" ,followed by a single blank line..ppThe.b .in \ \c.i +Nrequestchanges the amount of white spaceon the left of the page(the.i indent ).The argument.i Ncan be of the form.b + \c.i N(meaning leave.i Nspaces more than you are already leaving),.b \- \c.i N(meaning leave less than you do now),or just.i N(meaning leave exactly.i Nspaces)..i Ncan be of the form.i N \^\c.b ior.i N \^\c.b calso.For example,the input:.(binitial text\&.in 5some text\&.in +1imore text\&.in \-2cfinal text.)bproduces.q "some text"indented exactly five spacesfrom the left margin,.q "more text"indented five spacesplus one inchfrom the left margin(fifteen spaceson a pica typewriter),and.q "final text"indented five spacesplus one inchminus two centimetersfrom the margin.That is,the output is:.(binitial text.in +5some text.in +1imore text.in -2cfinal text.)b.ppThe.b .ti \ \c.i +N(temporary indent)request is used like.b .in \ \c.i +Nwhen the indentshould apply to one line only,after which it should revertto the previous indent.For example,the input:.(b\&.in 1i\&.ti 0Ware, James R. The Best of Confucius,Halcyon House, 1950.An excellent book containing translations ofmost of Confucius\(aa most delightful sayings.A definite must for anyone interested in the early foundationsof Chinese philosophy..)bproduces:.in 1i+\n($iu.ti \n($iuWare, James R. The Best of Confucius,Halcyon House, 1950.An excellent book containing translations ofmost of Confucius' most delightful sayings.A definite must for anyone interested in the early foundationsof Chinese philosophy..ppText lines can be centeredby using the.b .cerequest.The line after the.b .ceis centered(horizontally)on the page.To center more than one line,use.b .ce \ \c.i N(where.i Nis the number of lines to center),followed by the.i Nlines.If you want to center many linesbut don't want to count them,type:.(b\&.ce 1000lines to center\&.ce 0.)bThe.b ".ce\ 0"request tells \*G to center zero more lines,in other words,stop centering..ppAll of these requestscause a break;that is,they always starta new line.If you want to start a new linewithout performing any other action,use.b .br ..sh 1 "Displays".ppDisplays are sections of textto be set offfrom the body of the paper.Major quotes,tables,and figuresare types of displays,as are all the examplesused in this document.All displaysexcept centered blocksare outputsingle spaced..sh 2 "Major Quotes".ppMajor quotesare quotes which are several lines long,and hence are set in from the restof the textwithout quote marksaround them.These can be generatedusing the commands.b .(qand.b .)qto surround the quote.For example,the input:.(bAs Weizenbaum points out:\&.(qIt is said that to explain is to explain away.This maxim is nowhere so well fulfilledas in the areas of computer programming,...\&.)q.)bgenerates as output:.lpAs Weizenbaum points out:.(qIt is said that to explain is to explain away.This maxim is nowhere so well fulfilledas in the areas of computer programming,....)q.sh 2 "Lists".ppA.i listis an indented,single spaced,unfilled display.Lists should be usedwhen the material to be printedshould not be filled and justifiedlike normal text,such as columns of figuresor the examples used in this paper.Lists are surroundedby the requests.b .(land.b .)l .For example,type:.(bAlternatives to avoid deadlock are:\&.(lLock in a specified orderDetect deadlock and back out one processLock all resources needed before proceeding\&.)l.)bwill produce:.brAlternatives to avoid deadlock are:.(lLock in a specified orderDetect deadlock and back out one processLock all resources needed before proceeding.)l.sh 2 "Keeps".ppA.i keepis a display of lineswhich are kept on a single pageif possible.An example of where you would use a keepmight be a diagram.Keeps differ from listsin that lists may be brokenover a page boundarywhereas keeps will not..ppBlocks are the basic kind of keep.They begin with the request.b .(band end with the request.b .)b .If there is not room on the current pagefor everything in the block,a new page is begun.This has the unpleasant effectof leaving blank spaceat the bottom of the page.When this is not appropriate,you can use the alternative,called.i "floating keeps" ..pp.i "Floating keeps"move relative to the text.Hence,they are good for thingswhich will be referred toby name,such as.q "See figure 3" .A floating keep will appearat the bottom of the current pageif it will fit;otherwise,it will appear at the topof the next page.Floating keeps begin with the line.b .(zand end with the line.b .)z .For an example of a floating keep,see figure 1..(z.in 1i.xl -1i.hl\&.(z\&.hlText of keep to be floated.\&.sp\&.ceFigure 1. Example of a Floating Keep.\&.hl\&.)z
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -