nroff
rose1 发表于 2020-10-21 09:05浏览次数:
在类似Unix的操作系统上,nroff命令(“新径流”的缩写)用于格式化(“径流”)文档以进行显示或定宽打印。除了用户功能以外,系统内部还使用它来格式化手册页中的文本格式。
本文档介绍nroff的GNU / Linux版本。
On Unix-like operating systems, the nroff command (short for "new runoff"), is used to format ("run off") documents for display or fixed-width printing. In addition to user functions, internally, the system uses it to format the text in man pages.
This document covers the GNU/Linux version of nroff.
目录:
1 nroff 运行系统环境
2 nroff 语法
3 nroff 例子
nroff 运行系统环境
nroff 语法
nroff [-e] [-h] [-i] [-q] [-mname] [-nN] [-opagelist] [-raN] [-sN] [-Tname]
选件
-e
|
使用完整的终端分辨率,在调整的行中产生等距的单词。
|
-h
|
在水平间距期间使用输出制表 符可加快输出速度并减少输出字符数。选项卡设置假定为每8个标称字符宽度。
|
-i
|
输入文件用完后,请阅读标准输入。
|
-q
|
调用rd请求的同时输入输出模式。
|
-m名称
|
在宏文件/ usr / share / lib / tmac / tmac之前。输入文件的名称。
|
-nN
|
数第一生成的页面N。
|
-o页面列表
|
仅打印页码显示在数字和范围的逗号分隔列表中的页面。范围N - M表示页面N到M ; 首字母-N表示从开始到第N页;和最终N -手段从N到最后。
|
-raN
|
组注册一个(单字符)来N。
|
-sN
|
每N页停止一次。nroff将在每N页之前停止(默认N = 1)以允许装入或更换纸张,并且将在收到NEWLINE后恢复。
|
-T名称
|
为指定名称的设备准备输出。已知名称为:
37
|
TeleType Corporation Model 37终端,这是默认设置。
|
lp | tn300
|
GE-任何没有半线功能的线式打印机或终端。
|
300
|
DASI-300。
|
3300-12
|
12 DASI-300-12间距。
|
300S
|
DASI-300S。
|
300S-12
|
DASI-300S。
|
382
|
DASI-382(精美的DTC 382)。
|
450
|
DASI-450(暗黑破坏神Hyterm)。
|
450-12
|
DASI-450(Diablo Hyterm)-12间距。
|
832
|
AJ 832
|
|
nroff [-e] [-h] [-i] [-q] [-mname] [-nN] [-opagelist] [-raN] [-sN] [-Tname]
Options
-e
|
Produce equally-spaced words in adjusted lines, using full terminal resolution.
|
-h
|
Use output Tab characters during horizontal spacing to speed output and reduce output character count. Tab settings are assumed to be every 8 nominal character widths.
|
-i
|
Read the standard input after the input files are exhausted.
|
-q
|
Invoke the simultaneous input-output mode of the rd request.
|
-mname
|
Prepend the macro file /usr/share/lib/tmac/tmac.name to the input files.
|
-nN
|
Number first generated page N.
|
-opagelist
|
Print only pages whose page numbers appear in the comma-separated list of numbers and ranges. A range N-M means pages N through M; an initial -N means from the beginning to page N; and a final N- means from N to the end.
|
-raN
|
Set register a (one-character) to N.
|
-sN
|
Stop every N pages. nroff will halt prior to every N pages (default N=1) to allow paper loading or changing, and will resume upon receipt of a NEWLINE.
|
-Tname
|
Prepare output for a device of the specified name. Known names are:
37
|
TeleType Corporation Model 37 terminal this is the default.
|
lp | tn300
|
GE - any line printer or terminal without half-line capability.
|
300
|
DASI-300.
|
3300-12
|
12 DASI-300 - 12-pitch.
|
300S
|
DASI-300S.
|
300S-12
|
DASI-300S.
|
382
|
DASI-382 (fancy DTC 382).
|
450
|
DASI-450 (Diablo Hyterm).
|
450-12
|
DASI-450 (Diablo Hyterm) - 12-pitch.
|
832
|
AJ 832
|
|
nroff 例子
nroff -s4 -me users.guide
使用-me宏程序包格式化users.guide。
nroff -s4 -me users.guide
Formats users.guide using the -me macro package.