📄 tbl
字号:
.I entrycontaining only a string of the form $fat "\e"$\f3R\f2x\f1where.I xis any character is replaced by repetitions of the character.I xas wide as the data in the column.The sequence of.I x 'sis not extended to meet adjoining columns..IP "\fI##Vertically spanned items\fR#"\(em An input table entry containing only thecharacter string.ft B\e\s+2\v'2p'^\v'-2p'\s0.ft Rindicates that the table entry immediatelyabove spans downward over this row. It is equivalentto a table format key-letter of `^'..IP "\fI##Text blocks\fR#"\(em In order to include a block of text as a table entry,precede it by $fat roman "T{" $ and followit by $fat roman "T}" $.Thus the sequence.in +2.nf \*. \*. \*. $fat roman "T{"$.I block of text.R $fat roman "T}"$ \*. \*. \*..in -2.fiis the way to enter, as a single entry in the table, somethingthat cannot conveniently be typed as a simple string betweentabs.Note that the $fat roman "T}" $ end delimiter must begin a line;additional columns of data may follow after a tab on the same line.See the example on page 10 for an illustration of included text blocks.e1 aa 10in a table.If more than twenty or thirty text blocks are used in a table,various limits in the.Itroff.Rprogram are likely to be exceeded,producing diagnostics such as `too many string/macro names' or `too manynumber registers.'.IPText blocks are pulled out from the table, processed separately by.Itroff,.Rand replaced in the table as a solid block. If no line lengthis specified in the.Iblock of text.Ritself, or in the table format,the default is to use$ L times C / (N+1) $where.IL.Ris the current line length,.IC.Ris the number of table columns spanned by the text,and.IN.Ris the total number of columns in the table.The other parameters (point size, font, etc.) used in setting the.Iblock of text.Rare those in effect at the beginning of the table (includingthe effect of the ``\*.TS'' macro)and any table format specifications of size, spacing and font,using the \fBp\fR, \fBv\fR and \fBf\fR modifiers to the column key-letters.Commands within the text block itself are also recognized, of course.However,.I troffcommands within the table data but not within the text blockdo not affect that block..br.di RR. this is going down a rathole.EQdelim off.EN.di.rm RR.IP "##\fBWarnings:\fR#"\(em Although any number of lines may be present in a table,only the first 200 lines are used in calculatingthe widths of the various columns. A multi-page table,of course, may be arranged as several single-page tablesif this proves to be a problem.Other difficulties with formatting may arise because,in the calculation of column widths all table entriesare assumed to be in the font and size being used whenthe ``\*.TS'' command was encountered, except for font and size changesindicated (a) in the table format section and (b)within the table data (as in the entry\es+3\efIdata\efP\es0\|).Therefore, although arbitrary.Itroff.Rrequests may be sprinkled in a table, care must be takento avoid confusing the width calculations;use requests such as `\*.ps' with care..tr ##.sp .5v.RE.IP 4)A\s-2DDITIONAL COMMAND LINES\s0.If the format of a table must be changed aftermany similar lines, as with sub-headings or summarizations, the ``\*.T&''(table continue)command can be usedto change column parameters.The outline of such a table input is:.DS.ft R\&\*.TS.ft I\&options \fB;\fP\&format \*.\&data\&\*. \*. \*..ft R\&\*.T&.ft I\&format \*.\&data.ft R\&\*.T&.ft I\&format \*.\&data.ft R\&\*.TE.DEas in the examples on pages 10 and 12..e1 ab 10.e1 ac 12Using this procedure, each table line can be close to its corresponding format line..bd I 3.br.sp 3p.ft IWarning:.ft R.bd Iit is not possible to change the number of columns, the spacebetween columns, the global options such as \fIbox,\fRor the selection of columns to be made equal width..SHUsage..PPOn\s-2UNIX\s0,.Itbl.Rcan be run on a simple table with the command.DStbl input-file | troff.DEbutfor more complicated use, where there are several input files,and they contain equations and \fIms\fR memorandum layout commands as wellas tables, the normal command would be.DStbl file-1 file-2 \*. \*. \*. | eqn | troff \-ms.DEand, of course, the usual options may be used on the.Itroff.Rand.Ieqn.Rcommands. The usage for.Inroff.Ris similarto that for.Itroff,.Rbut only\s-2TELETYPE\s+2\(rg Model 37 andDiablo-mechanism (\s-2DASI\s0 or \s-2GSI\s0)terminals can print boxed tables directly..PPFor the convenience of users employing line printers withoutadequate driving tables or post-filters, there is a special.I \-TXcommand line option to.I tblwhich produces output that does not have fractional linemotions in it.The only other command line options recognized by.I tblare.I \-msand.I \-mmwhich are turned intocommands to fetch the corresponding macro files;usually it is more convenient to place these argumentson the.I troffpart of the command line,but they are accepted by.I tblas well..PPNote that when.Ieqn.Rand.Itbl.Rare used together on the same file.Itbl.Rshould be used first.If there are no equations within tables,either order works, but it is usually fasterto run.Itbl.Rfirst, since.Ieqn.Rnormally produces a larger expansion of the inputthan.Itbl..RHowever, if there are equations within tables(using the.Idelim.Rmechanism in.Ieqn\fR),.Itbl.Rmust be first or the output will be scrambled.Users must also beware of using equations in\fBn\fR-style columns; this is nearly always wrong,since.Itbl.Rattempts to split numerical format items into two parts and thisis not possible with equations.The user can defend against this by giving the.I delim(xx)table option;this prevents splitting of numerical columns within the delimiters.For example, if the.I eqndelimitersare.I $$ ,giving.I delim($$)a numerical column such as``1245 $+- 16$''will be divided after 1245, not after 16..PP.ITbl.Rlimits tables to twenty columns; however,use of more than 16 numerical columns may fail because oflimits in.Itroff,.Rproducing the `too many number registers' message.\fITroff\fR number registers used by.Itbl.Rmust be avoided by the user within tables;these include two-digit names from 31 to 99,and names of the forms#\fIx\fR, \fIx\fR+, \fIx\fR\ |, \v'3p'^\v'-3p'\fIx\fR, and \fIx\fR\(mi,where\fIx\fR is any lower case letter.The names##, #\(mi, and #^ are also used in certain circumstances.To conserve number register names, the\fBn\fRand\fBa\fRformats share a register;hence the restriction above that they may not be used in the same column..PPFor aid in writing layout macros,.Itbl.Rdefines a number register TW which isthe table width; it is defined by the time that the ``\*.TE'' macrois invoked and may be used in the expansion of that macro.More importantly, to assist in laying out multi-page boxed tablesthe macro T# is defined to produce the bottom lines and side lines of a boxedtable, and then invoked at its end. By use of this macroin the page footer a multi-page table can be boxed.In particular, the.Ims.Rmacros can be used to print a multi-page boxed table with a repeated headingby giving theargument H to the ``\*.TS'' macro.If the table start macro is written.br \&\*.TS H.bra line of the form.br \&\*.TH.brmust be given in the table after any table heading (or at the start if none).Material up to the ``\*.TH'' is placed at the top of each page of table;the remaining lines in the table are placed on several pages as required.Note that this is.Inot.Ra feature of.Itbl,.Rbut of the \fIms\fR layout macros..SHExamples..PPHere are some examples illustrating features of.Itbl..R.ds T \|\h'.4n'\v'-.2n'\s6\zT\s0\s10\v'.2n'\h'-.4n'\(ci\|\s0The symbol \*T in the input represents a tab character..de IN.po \\n(POu.sp |\\n(.hu.sp.ne \\$1.mk.BInput:.R.sp .5.nf.in +3n...de OU.br.in -3n.rt.po +3i.BOutput:.R.sp .5...rm TS.rm TE.nf.IN 2.5i\&\*.TS\&box;\&c c c\&l l l\*.\&Language\*TAuthors\*TRuns on\&\&Fortran\*TMany\*TAlmost anything\&PL/1\*TIBM\*T360/370\&C\*TBTL\*T11/45,H6000,370\&BLISS\*TCarnegie-Mellon\*TPDP-10,11\&IDS\*THoneywell\*TH6000\&Pascal\*TStanford\*T370\&\*.TE.OU.TSbox;c c cl l l.Language Authors Runs onFortran Many Almost anythingPL/1 IBM 360/370C BTL 11/45,H6000,370BLISS Carnegie-Mellon PDP-10,11IDS Honeywell H6000Pascal Stanford 370.TE.IN 2.8i\&\*.TS\&allbox;\&c s s\&c c c\&n n n\*.\&AT&T Common Stock\&Year\*TPrice\*TDividend\&1971\*T41-54\*T$2\*.60\&2\*T41-54\*T2\*.70\&3\*T46-55\*T2\*.87\&4\*T40-53\*T3\*.24\&5\*T45-52\*T3\*.40\&6\*T51-59\*T\*.95*\&\*.TE\&* (first quarter only).OU.TSallbox;c s sc c cn n n.AT&T Common StockYear Price Dividend1971 41-54 $2.602 41-54 2.703 46-55 2.874 40-53 3.245 45-52 3.406 51-59 .95*.TE* (first quarter only).IN 4i\&\*.TS\&box;\&c s s\&c | c | c\&l | l | n\*.\&Major New York Bridges\&=\&Bridge\*TDesigner\*TLength\&\(ul\&Brooklyn\*TJ\*. A\*. Roebling\*T1595\&Manhattan\*TG\*. Lindenthal\*T1470\&Williamsburg\*TL\*. L\*. Buck\*T1600\&\(ul\&Queensborough\*TPalmer &\*T1182\&\*T Hornbostel\&\(ul\&\*T\*T1380\&Triborough\*TO\*. H\*. Ammann\*T\(ul\&\*T\*T383\&\(ul\&Bronx Whitestone\*TO\*. H\*. Ammann\*T2300\&Throgs Neck\*TO\*. H\*. Ammann\*T1800\&\(ul\&George Washington\*TO\*. H\*. Ammann\*T3500\&\*.TE.OU.TSbox;c s sc | c | cl | l | n.Major New York Bridges=Bridge Designer Length_Brooklyn J. A. Roebling 1595Manhattan G. Lindenthal 1470Williamsburg L. L. Buck 1600_Queensborough Palmer & 1182 Hornbostel_ 1380Triborough O. H. Ammann _ 383_Bronx Whitestone O. H. Ammann 2300Throgs Neck O. H. Ammann 1800_George Washington O. H. Ammann 3500.TE.IN 3.0i\&\*.TS\&c c\&np-2 | n | \*.\&\*TStack\&\*T\(ul\&1\*T46\&\*T\(ul\&2\*T23\&\*T\(ul\&3\*T15\&\*T\(ul\&4\*T6\*.5\&\*T\(ul\&5\*T2\*.1\&\*T\(ul\&\*.TE.OU.TSc cnp-2 | n |. Stack _1 46 _2 23 _3 15 _4 6.5 _5 2.1 _.TE.IN 2.5i\&\*.TS\&box;\&L L L\&L L \(ul\&L L | LB\&L L \(ul\&L L L\*.\&january\*Tfebruary\*Tmarch\&april\*Tmay\&june\*Tjuly\*TMonths\&august\*Tseptember\&october\*Tnovember\*Tdecember\&\*.TE.OU.TSbox;L L LL L _L L | LBL L _L L L.january february marchapril mayjune july Monthsaugust septemberoctober november december.TE.IN 5.0i.e2 ab\&\*.TS\&box;\&cfB s s s\*.\&Composition of Foods\&\(ul\&\*.T&\&c | c s s\&c | c s s\&c | c | c | c\*.\&Food\*TPercent by Weight\&\e^\*T\(ul\&\e^\*TProtein\*TFat\*TCarbo-\&\e^\*T\e^\*T\e^\*Thydrate\&\(ul\&\*.T&\&l | n | n | n\*.\&Apples\*T\*.4\*T\*.5\*T13\*.0\&Halibut\*T18\*.4\*T5\*.2\*T\*. \*. \*.\&Lima beans\*T7\*.5\*T\*.8\*T22\*.0\&Milk\*T3\*.3\*T4\*.0\*T5\*.0\&Mushrooms\*T3\*.5\*T\*.4\*T6\*.0\&Rye bread\*T9\*.0\*T\*.6\*T52\*.7\&\*.TE.OU.TSbox;cfB s s s.Composition of Foods_.T&c |c s sc |c s sc |c |c |c.Food Percent by Weight\^ _\^ Protein Fat Carbo-\^ \^ \^ hydrate_.T&l |n |n |n.Apples .4 .5 13.0Halibut 18.4 5.2 ...Lima beans 7.5 .8 22.0Milk 3.3 4.0 5.0Mushrooms 3.5 .4 6.0Rye bread 9.0 .6 52.7.TE.IN 3.7i.e2 aa\&\*.TS\&allbox;\&cfI s s\&c cw(1i) cw(1i)\&lp9 lp9 lp9\*.\&New York Area Rocks\&Era\*TFormation\*TAge (years)\&Precambrian\*TReading Prong\*T>1 billion\&Paleozoic\*TManhattan Prong\*T400 million\&Mesozoic\*TT{\&\*.na\&Newark Basin, incl\*.\&Stockton, Lockatong, and Brunswick\&formations; also Watchungs\&and Palisades\*.\&T}\*T200 million\&Cenozoic\*TCoastal Plain\*TT{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -