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

📄 troff.man

📁 早期freebsd实现
💻 MAN
📖 第 1 页 / 共 3 页
字号:
.\" -*- nroff -*-.\" define a string tx for the TeX logo.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X.el .ds tx TeX.de TQ.br.ns.TP \\$1...\" Like TP, but if specified indent is more than half.\" the current line-length - indent, use the default indent..de Tp.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP.el .TP "\\$1"...\" The BSD man macros can't handle " in arguments to font change macros,.\" so use \(ts instead of "..tr \(ts".TH @G@TROFF 1 "@MDATE@" "Groff Version @VERSION@".SH NAME@g@troff \- format documents.SH SYNOPSIS.nr a \n(.j.ad l.nr i \n(.i.in +\w'\fB@g@troff 'u.ti \niu.B @g@troff.de OP.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]".el .RB "[\ " "\\$1" "\ ]"...OP \-abivzCER.OP \-w name.OP \-W name.OP \-d cs.OP \-f fam.OP \-m name.OP \-n num.OP \-o list.OP \-r cn.OP \-T name.OP \-F dir.OP \-M dir.RI "[\ " files\|.\|.\|. "\ ]".br.ad \na.SH DESCRIPTIONThis manual page describes the GNU version of.BR troff ,which is part of the groff document formatting system.It is highly compatible with Unix troff.Usually it should be invoked using the groff command, which willalso run preprocessors and postprocessors in the appropriateorder and with the appropriate options..SH OPTIONS.TP \w'\-dname=s'u+2n.B \-aGenerate an.SM ASCIIapproximation of the typeset output..TP.B \-bPrint a backtrace with each warning or error message.  This backtraceshould help track down the cause of the error.  The line numbers givenin the backtrace may not always be correct: troff's idea of line numbersgets confused by.B asor .B amrequests..TP.B \-iRead the standard input after all the named input files have beenprocessed..TP.B \-vPrint the version number..TP.BI \-w nameEnable warning.IR  name .Available warnings are described inthe Warnings subsection below.Multiple.B \-woptions are allowed..TP.BI \-W nameInhibit warning.IR name .Multiple.B \-Woptions are allowed..TP.B \-EInhibit all error messages..TP.B \-zSuppress formatted output..TP.B \-CEnable compatibility mode..TP.BI \-d cs.TQ.BI \-d name = sDefine.I cor.I nameto be a string.IR s ;.I cmust be a one letter name..TP.BI \-f famUse.I famas the default font family..TP.BI \-m nameRead in the file.BI tmac. name\fR.Normally this will be searched for in @MACRODIR@..TP.B \-RDon't load.BR troffrc ..TP.BI \-n numNumber the first page.IR num ..TP.BI \-o listOutput only pages in.IR list ,which is a comma-separated list of page ranges;.I nmeans print page.IR n ,.IB m \- nmeans print every page between.I mand.IR n ,.BI \- nmeans print every page up to.IR n ,.IB n \-means print every page from.IR n ..TP.BI \-r cn.TQ.BI \-r name = nSet number register.I cor.I nameto.IR n ;.I cmust be a one character name;.I ncan be any troff numeric expression..TP.BI \-T namePrepare output for device.IR name ,rather than the default.BR @DEVICE@ ..TP.BI \-F dirSearch.I dirfor subdirectories.BI dev name.RI ( nameis the name of the device)for the.B DESCfile and font files before the normal.BR @FONTDIR@ ..TP.BI \-M dirSearch directory.I dirfor macro files before the normal.BR @MACRODIR@ ..SH USAGEOnly the features not in Unix troff are described here..SS Long namesThe names of number registers, fonts, strings/macros/diversions,special characters can be of any length. In escape sequences, whereyou can use .BI ( xxfor a two character name, you can use.BI [ xxx ]for a name of arbitrary length:.TP.BI \e[ xxx ]Print the special character called.IR xxx ..TP.BI \ef[ xxx ]Set font.IR xxx ..TP.BI \e*[ xxx ]Interpolate string.IR xxx ..TP.BI \en[ xxx ]Interpolate number register.IR xxx ..SS Fractional pointsizesA.Iscaled pointis equal to 1/sizescalepoints, wheresizescale is specified in the.B DESCfile (1 by default.)There is a new scale indicator.B zwhich has the effect of multiplying by sizescale.Requests and escape sequences in troff interpret arguments that represent a pointsize as being in unitsof scaled points, but they evaluate each such argumentusing a default scale indicator of.BR z .Arguments treated in this way arethe argument to the.B psrequest,the third argument to the.B csrequest,the second and fourth arguments to the.B tkfrequest,the argument to the.B \eHescape sequence,and those variants of the.B \esescape sequence that take a numeric expression as their argument..LPFor example, suppose sizescale is 1000;then a scaled point will be equivalent to a millipoint;the request.B .ps 10.25is equivalent to.B .ps 10.25zand so sets the pointsize to 10250 scaled points,which is equal to 10.25 points..LPThe number register.B \en(.sreturns the pointsize in points as a decimal fraction.There is also a new number register.B \en[.ps]that returns the pointsize in scaled points..LPIt would make no sense to use the.B zscale indicator in a numeric expressionwhose default scale indicator was neither.B unor.BR z ,and so.B troffdisallows this.Similarily it would make no sense to use a scaling indicatorother than.B zor.B uin a numeric expression whose default scale indicator was.BR z ,and so.B troffdisallows this as well..LPThere is also a new scale indicator.B swhich multiplies by the number of units in a scaled point.So, for example,.B \en[.ps]sis equal to.BR 1m .Be sure not to confuse the.B sand.B zscale indicators..SS Numeric expressions.LPSpaces are permitted in a number expression within parentheses..LP.B Mindicates a scale of 100ths of an em..TP.IB e1 >? e2The maximum of.I e1and.IR e2 ..TP.IB e1 <? e2The minimum of.I e1and.IR e2 ..TP.BI ( c ; e )Evaluate.I eusing.I cas the default scaling indicator.If.I cis missing, ignore scaling indicators in the evaluation of.IR e ..SS New escape sequences.TP.BI \eA' anything 'This expands to.B 1or.B 0according as.I anythingis or is not acceptable as the name of a string, macro, diversion,number register, environment or font.It will return.B 0if.I anythingis empty.This is useful if you want to lookup user input in some sort ofassociative table..TP.BI \eC' xxx 'Typeset character named.IR xxx .Normally it is more convenient to use.BI \e[ xxx ]\fR.But.B \eChas the advantage that it is compatible with recent versions of.SM UNIXand is available in compatibility mode..TP.B \eEThis is equivalent to an escape character,but it's not interpreted in copy-mode.For example, strings to start and end superscripting could be definedlike this:.RS.IP\&.ds { \ev'\-.3m'\es'\eEn[.s]*6u/10u'.br\&.ds } \es0\ev'.3m'.LPThe use of.B \eEensures that these definitions will work even if.B \e*{gets interpreted in copy-mode(for example, by being used in a macro argument.).RE.TP.BI \eN' n 'Typeset the character with code.I nin the current font..I ncan be any integer.Most devices only have characters with codes between 0 and 255.If the current font does not contain a character with that code,special fonts will.I notbe searched.The.B \eNescape sequence can be conveniently used on conjunction with the.B charrequest:.RS.IP.B\&.char \e[phone] \ef(ZD\eN'37'.RE.IPThe code of each character is given in the fourth column in the fontdescription file after the.B charsetcommand.It is possible to include unnamed characters in the font descriptionfile by using a name of.BR \-\-\- ;the.B \eNescape sequence is the only way to use these..TP.BI \eR' name\ \(+-n 'This has the same effect as.RS.IP.BI .nr\  name\ \(+-n.RE.TP.BI \es( nn.TQ.BI \es\(+-( nnSet the point size to.I nnpoints;.I nnmust be exactly two digits..TP.BI \es[\(+- n ].TQ.BI \es\(+-[ n ].TQ.BI \es'\(+- n '.TQ.BI \es\(+-' n 'Set the point size to.I nscaled points;.I nis a numeric expression with a default scale indicator of.BR z ..TP.BI \eV x.TQ.BI \eV( xx.TQ.BI \eV[ xxx ]Interpolate the contents of the environment variable.I xxx ,as returned by.BR getenv (3)..B \eVis interpreted in copy-mode..TP.BI \eY x.TQ.BI \eY( xx.TQ.BI \eY[ xxx ]This is approximately equivalent to.BI \eX'\e*[ xxx ]'\fR.However the contents of the string or macro.I xxxare not interpreted;also it is permitted for.I xxxto have been defined as a macro and thus contain newlines(it is not permitted for the argument to.B \eXto contain newlines).The inclusion of newlines requires an extension to the Unix troff outputformat, and will confuse drivers that do not know about thisextension..TP.BI \eZ' anything 'Print anything and then restore the horizontal and verticalposition;.I anythingmay not contain tabs or leaders..TP.B \e$0The name by which the current macro was invoked.The.B alsrequest can make a macro have more than one name..TP.B \e$*In a macro, the concatenation of all the arguments separated by spaces..TP.B \e$@In a macro, the concatenation of all the arguments with each surrounded bydouble quotes, and separated by spaces. .TP.BI \e$( nn.TQ.BI \e$[ nnn ]In a macro, this gives the.IR nn -thor.IR nnn -thargument.Macros can have a unlimited number of arguments..TP.BI \e? anything \e?When used in a diversion, this will transparently embed.I anythingin the diversion..I anythingis read in copy mode.When the diversion is reread,.I anythingwill be interpreted..I anythingmay not contain newlines; use.B \e!if you want to embed newlines in a diversion.The escape sequence.B \e?is also recognised in copy mode and turned into a single internalcode; it is this code that terminates.IR anything .Thus.RS.RS.ft B.nf.ne 15\&.nr x 1\&.nf\&.di d\e?\e\e?\e\e\e\e?\e\e\e\e\e\e\e\enx\e\e\e\e?\e\e?\e?\&.di\&.nr x 2\&.di e\&.d\&.di\&.nr x 3\&.di f\&.e\&.di\&.nr x 4\&.f.fi.ft.RE.RE.IPwill print.BR 4 ..TP.B \e/This increases the width of the preceding character so thatthe spacing between that character and the following characterwill be correct if the following character is a roman character.For example, if an italic f is immediately followed by a romanright parenthesis, then in many fonts the top right portion of the fwill overlap the top left of the right parenthesis producing \fIf\fR)\fR,which is ugly.Inserting.B \e/produces.ie \n(.g \fIf\/\fR)\fR.el \fIf\|\fR)\fRand avoids this problem.It is a good idea to use this escape sequence whenever anitalic character is immediately followed by a roman character without anyintervening space..TP.B \e,This modifies the spacing of the following character so that the spacingbetween that character and the preceding character will correct ifthe preceding character is a roman character.For example, inserting.B \e,between the parenthesis and the f changes\fR(\fIf\fR to.ie \n(.g \fR(\,\fIf\fR..el \fR(\^\fIf\fR.It is a good idea to use this escape sequence whenever aroman character is immediately followed by an italic character without anyintervening space..TP.B \e)Like.B \e&except that it behaves like a character declared with the.B cflagsrequest to be transparent for the purposes of end of sentence recognition..TP.B \e~This produces an unbreakable space that stretches like a normal inter-wordspace when a line is adjusted..TP.B \e#Everything up to and including the next newline is ignored.This is interpreted in copy mode.This is like.B \e%except that.B \e%does not ignore the terminating newline..SS New requests.TP.BI .aln\  xx\ yyCreate an alias.I xxfor number register object named.IR yy .The new name and the old name will be exactly equivalent.If.I yyis undefined, a warning of type.B regwill be generated, and the request will be ignored..TP.BI .als\  xx\ yyCreate an alias.I xxfor request, string, macro, or diversion object named.IR yy .The new name and the old name will be exactly equivalent (it is similar to ahard rather than a soft link).If.I yyis undefined, a warning of type.B macwill be generated, and the request will be ignored.The.BR de ,.BR am ,.BR di ,.BR da ,.BR ds ,and.B asrequests only create a new object if the name of the macro, diversionor string diversion is currently undefined or if it is defined to be arequest; normally they modify the value of an existing object..TP.BI .asciify\  xxThis request only exists in order to make it possibleto make certain gross hacks work with GNU troff.It `unformats' the diversion.I xxin such a way that.SM ASCIIcharacters that were formatted and diverted into.I xxwill be treated like ordinary input characters when.I xxis reread.For example, this.RS.IP.ne 7v+\n(.Vu.ft B.nf.ss 24\&.tr @.\&.di x\&@nr\e n\e 1\&.br\&.di\&.tr @@\&.asciify x\&.x.ss 12.fi.RE.IPwill set register

⌨️ 快捷键说明

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