tt13

来自「unix v7是最后一个广泛发布的研究型UNIX版本」· 代码 · 共 57 行

TXT
57
字号
.NHEnvironments.PPAs we mentioned, there is a potential problemwhen going across a page boundary:parameters like size and fontfor a page title may well be different from thosein effect in the text when the page boundary occurs..UL troffprovides a very general way to deal with this andsimilar situations.There are three `environments',each of which has independently settable versions ofmany of the parameters associated with processing,including size, font, line and title lengths,fill/nofill mode, tab stops, and even partially collected lines.Thus the titling problem may be readily solved by processing the main textin one environment and titles in a separate onewith its own suitable parameters..PPThe command.BD .ev\ nshifts to environment.BD n ;.BD nmust be 0, 1 or 2.The command.BD .evwith no argument returns to theprevious environment.Environment names are maintained in a stack, so callsfor different environments may be nested and unwound consistently..PPSuppose we say that the main text is processed in environment 0,which is where .UL troffbegins by default.Then we can modify the new page macro.BD .NPto process titles in environment 1 like this:.P1 2^de NP^ev 1	\e" shift to new environment^lt 6i	\e" set parameters here^ft R^ps 10\&... any other processing ...^ev	\e" return to previous environment^^.P2It is also possible to initialize the parameters for an environmentoutside the.BD .NPmacro,but the version shown keeps all the processing in one placeand is thus easier to understand and change.

⌨️ 快捷键说明

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