⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 g1

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻
字号:
.if t .2C.SC Introduction.PP.UC EQNis aprogram for typesetting mathematicson the Graphics Systems phototypesetters on.UC UNIXand.UC GCOS .The .UC EQNlanguage was designed to be easy to useby people who know neither mathematicsnor typesetting.Thus.UC EQNknows relatively little about mathematics.In particular, mathematical symbols like+, \(mi, \(mu, parentheses, and so on have no special meanings..UC EQNis quite happy to set garbage (but it will look good)..PP.UC EQNworks as a preprocessor for the typesetter formatter,.UC TROFF [1],so the normal mode of operation is to preparea document with both mathematics and ordinary textinterspersed,and let.UC EQNset the mathematics while.UC TROFFdoes the body of the text..PPOn.UC UNIX ,.UC EQNwill also produce mathematics on.UC DASI and.UC GSIterminals and onModel 37 teletypes.The input is identical, but you have to use the programs.UC NEQN and.UC NROFFinstead of.UC EQN and.UC TROFF .Of course, some things won't look as goodbecause terminals don't provide the variety of characters, sizes and fontsthat a typesetter does,but the output is usually adequate for proofreading..PPTo use .UC EQNon.UC UNIX ,.P1eqn files | troff.P2.UC GCOSuse is discussed in section 26..SC Displayed Equations.PPTo tell.UC EQNwhere a mathematical expression begins and ends,we mark it with lines beginning.UC .EQand.UC .EN .Thusif you type the lines.P1^EQx=y+z^EN.P2your output will look like.EQx=y+z.ENThe.UC .EQand.UC .ENare copied through untouched;theyare not otherwise processedby.UC EQN .This means that you have to take careof things like centering, numbering, and so onyourself.The most common way is to use the.UC TROFFand.UC NROFFmacro package package `\(mims'developed by M. E. Lesk[3],which allows you to center, indent, left-justify and number equations..PPWith the `\(mims' package,equations are centered by default.To left-justify an equation, use.UC \&.EQ\ Linstead of.UC .EQ .To indent it, use.UC .EQ\ I .Any of these can be followed by an arbitrary `equation number'which will be placed at the right margin.For example, the input.P1^EQ I (3.1a)x = f(y/2) + y/2^EN.P2produces the output.EQ I (3.1a)x = f(y/2) + y/2.EN.PPThere is also a shorthand notation soin-line expressionslike$pi sub i sup 2$can be entered without.UC .EQand.UC .EN .We will talk about it in section 19..SC Input spaces.PPSpaces and newlines within an expression are thrown away by.UC EQN .(Normal text is left absolutely alone.)Thusbetween.UC .EQand.UC .EN ,.P1x=y+z.P2and.P1x = y + z.P2and.P1x   =   y      + z.P2and so onall produce the sameoutput.EQx=y+z.ENYou should use spaces and newlines freely to make your input equationsreadable and easy to edit.In particular, very long lines are a bad idea,since they are often hard to fix if you make a mistake..SC Output spaces.PPTo force extra spaces into the .uloutput,use a tilde ``\|~\|''for each space you want:.P1x~=~y~+~z.P2gives.EQx~=~y~+~z.ENYou can also use a circumflex ``^'', which gives a space half the width of a tilde.It is mainly useful for fine-tuning.Tabs may also be used to position piecesof an expression,but the tab stops must be set by .UC TROFFcommands..SC "Symbols, Special Names, Greek".PP.UC EQNknows some mathematical symbols,some mathematical names, and the Greek alphabet.For example,.P1x=2 pi int sin ( omega t)dt.P2produces.EQx = 2 pi int sin ( omega t)dt.ENHere the spaces in the input are.Bnecessary.Rto tell.UC EQNthat.ulint,.ulpi,.ulsinand.ulomegaare separate entities that should get special treatment.The.ulsin,digit 2, and parentheses are set in roman type instead of italic;.ulpiand.ulomegaare made Greek;and.ulintbecomes the integral sign..PPWhen in doubt, leave spaces around separate parts of the input.A.ulverycommon error is to type.ulf(pi)without leaving spaces on both sides of the.ulpi.As a result,.UC EQNdoes not recognize.ulpias a special word, and it appears as$f(pi)$instead of$f( pi )$..PPA complete list of.UC EQNnames appears in section 23.Knowledgeable users can also use.UC TROFFfour-character namesfor anything .UC EQNdoesn't know about,like.ul\\(bsfor the Bell System sign \(bs..SC "Spaces, Again".PPThe only way.UC EQNcan deduce that some sequenceof letters might be specialis if that sequence is separated from the letterson either side of it.This can be done by surrounding a special word by ordinary spaces(or tabs or newlines),as we did in the previous section..PP.tr ~~You can also make special words stand out by surrounding themwith tildes or circumflexes:.P1x~=~2~pi~int~sin~(~omega~t~)~dt.P2is much the same as the last example,except that the tildesnot onlyseparate the magic wordslike.ulsin,.ulomega,and so on,but also add extra spaces,one space per tilde:.EQx~=~2~pi~int~sin~(~omega~t~)~dt.EN.PPSpecial words can also be separated by braces { }and double quotes "...",which have special meanings that we willsee soon..tr ~.SC "Subscripts and Superscripts".PPSubscripts and superscripts areobtained with the words.ulsuband.ulsup..P1x sup 2 + y sub k.P2gives.EQx sup 2 + y sub k.EN.UC EQNtakes care of all the size changes and vertical motionsneeded to make the output look right.The words.ulsuband.ulsupmust be surrounded by spaces;.ulx sub2will give you$x sub2$ instead of $x sub 2$.Furthermore, don't forget to leave a space(or a tilde, etc.)to mark the end of a subscript or superscript.A common error is to saysomething like.P1y = (x sup 2)+1.P2which causes.EQy = (x sup 2)+1.ENinstead ofthe intended.EQy = (x sup 2 )+1.EN.PPSubscripted subscripts and superscripted superscriptsalso work:.P1x sub i sub 1.P2is.EQx sub i sub 1.ENA subscript and superscript on the same thingare printed one above the otherif the subscript comes.ulfirst:.P1x sub i sup 2.P2is.EQx sub i sup 2.EN.PPOther than this special case,.ulsuband.ulsupgroup to the right, so.ulx\ sup\ y\ sub\ zmeans$x sup {y sub z}$, not ${x sup y} sub z$..SC "Braces for Grouping".PPNormally, the end of a subscript or superscript is markedsimply by a blank (or tab or tilde, etc.)What if the subscript or superscript is something that has to be typedwith blanks in it?In that case, you can use the braces{ and } to mark thebeginning and end of the subscript or superscript:.P1e sup {i omega t}.P2is.EQe sup {i omega t}.EN.spRule:  Braces can.ulalwaysbe used to force .UC EQNto treat something as a unit,or just to make your intent perfectly clear.Thus:.P1x sub {i sub 1} sup 2.P2is.EQx sub {i sub 1} sup 2.ENwith braces, but.P1x sub i sub 1 sup 2.P2is.EQx sub i sub 1 sup 2.ENwhich is rather different..PPBraces can occur within braces if necessary:.P1e sup {i pi sup {rho +1}}.P2is.EQe sup {i pi sup {rho +1}}.ENThe general rule is that anywhere you could use some singlething like.ulx,you can use an arbitrarily complicated thing if you encloseit in braces..UC EQNwill look after all the details of positioning it and makingit the right size..PPIn all cases, make sure you have theright number of braces.Leaving one out or adding an extra will cause .UC EQNto complain bitterly..PPOccasionally you will have toprint braces.To do this,enclose them in double quotes,like "{".Quoting is discussed in more detail in section 14..SC Fractions.PPTo make a fraction,use the word.ulover:.P1a+b over 2c =1.P2gives.EQa+b over 2c =1.ENThe line is made the right length and positioned automatically.Braces can be used to make clear what goes over what:.P1{alpha + beta} over {sin (x)}.P2is.EQ{alpha + beta} over {sin (x)}.ENWhat happens when there is both an.uloverand a.ulsupin the same expression?In such an apparently ambiguous case,.UC EQNdoes the.ulsupbefore the.ulover,so.P1\(mib sup 2 over pi.P2is$-b sup 2 over pi$instead of$-b sup {2 over pi}$The ruleswhich decide which operation is done first in cases like thisare summarized in section 23.When in doubt, however,.uluse bracesto make clear what goes with what..SC "Square Roots".PPTo draw a square root, use.ulsqrt:.P1 2sqrt a+b + 1 over sqrt {ax sup 2 +bx+c}.P2is.EQsqrt a+b + 1 over sqrt {ax sup 2 +bx+c}.ENWarning _ square roots of tall quantities look lousy,because a root-sign big enough to cover the quantity istoo dark and heavy:.P1sqrt {a sup 2 over b sub 2}.P2is.EQsqrt{a sup 2 over b sub 2}.ENBig square roots are generally better written as somethingto the power \(12:.EQ(a sup 2 /b sub 2 ) sup half.ENwhich is.P1(a sup 2 /b sub 2 ) sup half.P2.SC "Summation, Integral, Etc.".PPSummations, integrals, and similar constructionsare easy:.P1sum from i=0 to {i= inf} x sup i.P2produces.EQsum from i=0 to {i= inf} x sup i.ENNotice that we usedbraces to indicate where the upperpart$i= inf$begins and ends.No braces were necessary for the lower part $i=0$,because it contained no blanks.The braces will never hurt,and if the .ulfromand.ultoparts contain any blanks, you must use braces around them..PPThe.ulfromand.ultoparts are both optional,but if both are used,they have to occur in that order..PPOther useful characters can replace the.ulsumin our example:.P1int   prod   union   inter.P2become, respectively,.EQint ~~~~~~ prod ~~~~~~ union ~~~~~~ inter.ENSince the thing before the .ulfromcan be anything,even something in braces,.ulfrom-tocan often be used in unexpected ways:.P1lim from {n \(mi> inf} x sub n =0.P2is.EQlim from {n-> inf} x sub n =0.EN

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -