📄 troff.man
字号:
when reread, will cause the contents of.I filenameto be transparently copied through to the output.In Unix troff, thecontents of.I filenameis immediately copied through to the output regardless of whetherthere is a current diversion; this behavior is so anomalous that itmust be considered a bug..TP.BI .ev\ xxIf.I xxis not a number, this will switch to a named environment called.IR xx .The environment should be popped with a matching.B evrequest without any arguments, just as for numbered environments.There is no limit on the number of named environments; they will becreated the first time that they are referenced..TP.BI .fp\ n\ f1\ f2The.B fprequest has an optional third argument.This argument gives the external name of the font,which is used for finding the font description file.The second argument gives the internal name of the fontwhich is used to refer to the font in troff after it has been mounted.If there is no third argument then the internal name will be usedas the external name.This feature allows you to use fonts with long names in compatibility mode..TP.BI .ss\ m\ nWhen two arguments are given to the.B ssrequest, the second argument gives the.IR "sentence space size" .If the second argument is not given, the sentence space sizewill be the same as the word space size.Like the word space size, the sentence space is in units ofone twelfth of the spacewidth parameter for the current font.Initially both the word space size and the sentencespace size are 12.The sentence space size is used in two circumstances:if the end of a sentence occurs at the end of a line in fill mode, thenboth an inter-word space and a sentence space will be added;if two spaces follow the end of a sentence in the middle of a line,then the second space will be a sentence space.Note that the behaviour of Unix troff will be exactlythat exhibited by GNU troff if a second argument is never given to the.B ssrequest.In GNU troff, as in Unix troff, you should alwaysfollow a sentence with either a newline or two spaces..TP.BI .ta\ n1\ n2\|.\|.\|.nn \ T\ r1\ r2\|.\|.\|.\|rnSet tabs at positions.IR n1 ,.IR n2 ,\|.\|.\|.\|,.I nnand then set tabs at.IR nn + r1 ,.IR nn + r2 ,\|.\|.\|.\|.\|,.IR nn + rnand then at.IR nn + rn + r1 ,.IR nn + rn + r2 ,\|.\|.\|.\|,.IR nn + rn + rn ,and so on.For example,.RS.IP.B\&.ta T .5i.LPwill set tabs every half an inch..RE.SS New number registersThe following read-only registers are available:.TP.B \en[.C]1 if compatibility mode is in effect, 0 otherwise..TP.B \en[.cdp]The depth of the last character added to the current environment.It is positive if the character extends below the baseline..TP.B \en[.ce]The number of lines remaining to be centered, as set by the.B cerequest..TP.B \en[.cht]The height of the last character added to the current environment.It is positive if the character extends above the baseline..TP.B \en[.csk]The skew of the last character added to the current environment.The.I skewof a character is how far to the right of the center of a characterthe center of an accent over that character should be placed..TP.B \en[.ev]The name or number of the current environment.This is a string-valued register..TP.B \en[.fam]The current font family.This is a string-valued register..TP.B \en[.fp]The number of the next free font position..TP.B \en[.g]Always 1.Macros should use this to determine whether they are runningunder GNU troff..TP.B \en[.hla]The current hyphenation language as set by the.B hlarequest..TP.B \en[.hlc]The number of immediately preceding consecutive hyphenated lines..TP.B \en[.hlm]The maximum allowed number of consecutive hyphenated lines, as set by the.B hlmrequest..TP.B \en[.hy]The current hyphenation flags (as set by the.B hyrequest.).TP.B \en[.hym]The current hyphenation margin (as set by the.B hymrequest.).TP.B \en[.hys]The current hyphenation space (as set by the.B hysrequest.).TP.B \en[.in]The indent that applies to the current output line..TP.B \en[.kern].B 1if pairwise kerning is enabled,.B 0otherwise..TP.B \en[.lg]The current ligature mode (as set by the.B lgrequest.).TP.B \en[.ll]The line length that applies to the current output line..TP.B \en[.lt]The title length as set by the.B ltrequest..TP.B \en[.ne]The amount of space that was needed in the last.B nerequest that caused a trap to be sprung.Useful in conjunction with the.B \en[.trunc]register..TP.B \en[.pn]The number of the next page:either the value set by a.B pnrequest, or the number of the current page plus 1..TP.B \en[.ps]The current pointsize in scaled points..TP.B \en[.psr]The last-requested pointsize in scaled points..TP.B \en[.rj]The number of lines to be right-justified as set by the.B rjrequest..TP.B \en[.sr]The last requested pointsize in points as a decimal fraction.This is a string-valued register..TP.B \en[.tabs]A string representation of the current tab settings suitable for use asan argument to the.B tarequest..TP.B \en[.trunc]The amount of vertical space truncated by the most recently sprungvertical position trap, or,if the trap was sprung by a.B nerequest,minus the amount of vertical motion produced by the.B nerequest.In other words, at the point a trap is sprung, it represents the differenceof what the vertical position would have been but for the trap,and what the vertical position actually is.Useful in conjunction with the.B \en[.ne]register..TP.B \en[.ss].TQ.B \en[.sss]These give the values of the parameters set by thefirst and second arguments of the.B ssrequest..TP.B \en[.vpt]1 if vertical position traps are enabled, 0 otherwise..TP.B \en[.warn]The sum of the numbers associated with each of the currently enabledwarnings.The number associated with each warning is listed in the `Warnings'subsection..TP.B \en(.xThe major version number.For example, if the version number is.B 1.03then.B \en(.xwill contain.BR 1 ..TP.B \en(.yThe minor version number.For example, if the version number is.B 1.03then.B \en(.ywill contain.BR 03 ..LPThe following registers are set by the.B \ewescape sequence:.TP.B \en[rst].TQ.B \en[rsb]Like the.B stand.B sbregisters, but takes account of the heights and depths of characters..TP.B \en[ssc]The amount of horizontal space (possibly negative) that shouldbe added to the last character before a subscript..TP.B \en[skw]How far to right of the center of the last characterin the.B \ewargument,the center of an accent from a roman font should be placed over that character..LPThe following read/write number registers are available:.TP.B \en[systat]The return value of the system() function executed by the last.B syrequest..TP.B \en[slimit]If greater than 0, the maximum number of objects on the input stack.If less than or equal to 0, there is no limit on the number of objectson the input stack. With no limit, recursion can continue untilvirtual memory is exhausted..SS Miscellaneous.LPFonts not listed in the.SM DESCfile are automatically mounted on the next available font positionwhen they are referenced.If a font is to be mounted explicitly with the.B fprequest on an unused font position,it should be mounted on the first unused font position,which can be found in the.B \en[.fp]register;although.B troffdoes not enforce this strictly,it will not allow a font to be mounted at a position whose number is muchgreater than that of any currently used position..LPInterpolating a string does not hide existing macro arguments.Thus in a macro, a more efficient way of doing.IP.BI . xx\ \e\e$@.LPis.IP.BI \e\e*[ xx ]\e\e .LPIf the font description file contains pairwise kerning information,characters from that font will be kerned.Kerning between two characters can be inhibited by placing a.B \e&between them..LPIn a string comparison in a condition, characters that appear at different input levelsto the first delimiter character will not be recognizedas the second or third delimiters.This applies also to the.B tlrequest.In a.B \ewescape sequence,a character that appears at a different input level tothe starting delimiter character will not be recognisedas the closing delimiter character.When decoding a macro argument that is delimitedby double quotes, a character that appears at a differentinput level to the starting delimiter character will notbe recognised as the closing delimiter character.The implementation of.B \e$@ensures that the double quotes surrounding an argumentwill appear at the same input level, which will be differentto the input level of the argument itself.In a long escape name.B ]will not be recognized as a closing delimiter exceptwhen it occurs at the same input level as the opening.BR ] .In compatibility mode, no attention is paid to the input-level..LPThere are some new types of condition:.TP.BI .if\ r xxxTrue if there is a number register named.IR xxx ..TP.BI .if\ d xxxTrue if there is a string, macro, diversion, or request named.IR xxx ..TP.BI .if\ c chTrue if there is a character.IR chavailable;.I chis either an.SM ASCIIcharacteror a special character.BI \e( xxor.BI \e[ xxx ]\fR;the condition will also be true if.I chhas been defined by the.B charrequest..SS WarningsThe warnings that can be given by.B troffare divided into the following categories.The name associated with each warning is used by the.B \-wand.B \-Woptions;the number is used by the.B warnrequest, and by the.B .warnregister..nr x \w'\fBright-brace'+1n+\w'0000'u.ta \nxuR.TP \nxu+3n.BR char \t1Non-existent characters.This is enabled by default..TP.BR number \t2Invalid numeric expressions.This is enabled by default..TP.BR break \t4In fill mode, lines which could not be broken so that their length wasless than the line length.This is enabled by default..TP.BR delim \t8Missing or mismatched closing delimiters..TP.BR el \t16Use of the.B elrequest with no matching.B ierequest..TP.BR scale \t32Meaningless scaling indicators..TP.BR range \t64Out of range arguments..TP.BR syntax \t128Dubious syntax in numeric expressions..TP.BR di \t256Use of.B dior.B dawithout an argument when there is no current diversion..TP.BR mac \t512Use of undefined strings, macros and diversions.When an undefined string, macro or diversion is used,that string is automatically defined as empty.So, in most cases, at most one warning will be given foreach name..TP.BR reg \t1024Use of undefined number registers.When an undefined number register is used,that register is automatically defined to have a value of 0.a definition is automatically made with a value of 0.So, in most cases, at most one warning will be given foruse of a particular name..TP.BR tab \t2048Use of a tab character where a number was expected..TP.BR right-brace \t4096Use of.B \e}where a number was expected..TP.BR missing \t8192Requests that are missing non-optional arguments..TP.BR input \t16384Illegal input characters..TP.BR escape \t32768Unrecognized escape sequences.When an unrecognized escape sequence is encountered,the escape character is ignored..TP.BR space \t65536Missing space between a request or macro and its argument.This warning will be given when an undefined name longer than two characters is encountered,and the first two characters of the name make a defined name.The request or macro will not be invoked.When this warning is given, no macro is automatically defined.This is enabled by default.This warning will never occur in compatibility mode..TP.BR font \t131072Non-existent fonts.This is enabled by default..LPThere are also names that can be used to refer to groups of warnings:.TP.B allAll warnings except.BR di ,.B macand.BR reg .It is intended that this covers all warningsthat are useful with traditional macro packages..TP.B wAll warnings..SS Incompatibilities.LPLong names cause some incompatibilities.Unix troff will interpret.IP.B\&.dsabcd.LPas defining a string.B abwith contents.BR cd .Normally, GNU troff will interpret this as a call of a macro named.BR dsabcd .Also Unix troff will interpret.B \e*[or.B \en[as references to a string or number register called.BR [ .In GNU troff, however, this will normally be interpreted as the startof a long name.In.I compatibility modeGNU troff will interpret these things in the traditional way.In compatibility mode, however, long names are not recognised.Compatibility mode can be turned on with the.B \-Ccommand line option, and turned on or off with the.B cprequest.The number register.B \en(.Cis 1 if compatibility mode is on, 0 otherwise..LPGNU troffdoes not allow the use of the escape sequences.BR \\e\e|\e^\e&\e}\e{\e (space) \e'\e`\e-\e_\e!\e%\ecin names of strings, macros, diversions, number registers,fonts or environments; Unix troff does.The.B \eAescape sequence may be helpful in avoiding use of theseescape sequences in names..LPFractional pointsizes cause one noteworthy incompatibility.In Unix troff the.B ps request ignores scale indicators and so.IP.B .ps\ 10u.LPwill set the pointsize to 10 points, whereas inGNU troff it will set the pointsize to 10 scaled points..LPIn GNU troff there is a fundamental difference between unformatted,input characters, and formatted, output characters.Everything that affects how an output characterwill be output is stored with the character; once an outputcharacter has been constructed it is unaffected by any subsequentrequests that are executed, including.BR bd ,.BR cs ,.BR tkf ,.BR tr ,or.B fprequests.Normally output characters are constructed from inputcharacters at the moment immediately before the characteris added to the current output line.Macros, diversions and strings are all, in fact, the same typeof object; they contain lists of input characters and outputcharacters in any combination.An output character does not behave like an input characterfor the purposes of macro processing; it does not inherit anyof the special properties that the input character from which itwas constructed might have had.For example,.IP.nf.ft B\&.di x\e\e\e\e\&.br\&.di\&.x.ft.fi.LPwill print.B \e\ein GNU troff;each pair of input.BR \e sis turned into one output.B \eand the resulting output.BR \e sare not interpreted as escape characters when they are reread.Unix troff would interpret them as escape characterswhen they were reread and would end up printing one.BR \e .The correct way to obtain a printable.B \eis to use the.B \eeescape sequence: this will always print a single instance of thecurrent escape character, regardless of whether or not it is used in adiversion; it will also work in both GNU troff and Unix troff.If you wish for some reason to store in a diversion an escapesequence that will be interpreted when the diversion is reread,you can either use the traditional.B \e!transparent output facility, or, if this is unsuitable, the new.B \e?escape sequence..SH ENVIRONMENT.TP.SM.B GROFF_TMAC_PATHA colon separated list of directories in which to search formacro files..TP.SM.B GROFF_TYPESETTERDefault device..TP.SM.B GROFF_FONT_PATHA colon separated list of directories in which to search for the.BI dev namedirectory..B troffwill search in directories given in the.B \-Foption before these, and in standard directories.RB ( @FONTPATH@ )after these..SH FILES.Tp \w'@FONTDIR@/devname/DESC'u+3n.B @MACRODIR@/troffrcInitialization file.TP.BI @MACRODIR@/tmac. nameMacro files.TP.BI @FONTDIR@/dev name /DESCDevice description file for device.IR name ..TP.BI @FONTDIR@/dev name / FFont file for font.I Fof device.IR name ..SH "SEE ALSO".BR groff (@MAN1EXT@).BR @g@tbl (@MAN1EXT@),.BR @g@pic (@MAN1EXT@),.BR @g@eqn (@MAN1EXT@),.BR grops (@MAN1EXT@),.BR grodvi (@MAN1EXT@),.BR grotty (@MAN1EXT@),.BR groff_font (@MAN5EXT@),.BR groff_out (@MAN5EXT@),.BR groff_char (@MAN7EXT@)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -