我需要使用 groff -mm 宏格式化文档,并需要有关某些问题的帮助:
============
您可以看到它在顶部放置了一些空行和页码。我需要它从文件的第一行开始运行一个连续的列。
它使用 ansi 转义码,我需要它严格使用 ascii 文本字符。
我也希望没有默认缩进,并且页面宽度需要为 80 个字符宽,因为我将其发送到文本文件而不是打印机。
最佳答案
您可以使用 .PGFORM <line length> <page length> <page offset> <line break>
重新设置页面格式。 .PGNH
跳过第一页上的页眉打印。
.PGFORM 80 0 0 1
.PGNH
ConImp [-a] [-t] [n<name>] [m<time>] [e<editor>]
-a = non-ANSI terminal
-t = use test port
-n = force user name
-m = maximum play time
-e<editor> = allow external editor
-a:
If your terminal is not ANSI compatible use this to prevent ANSI codes being sent
-t:
Use the testing port
-n<name>:
Force the username to this user, used in BBS doors
-m<time>:
Set maximim play time
-e<editor>:
Set the external editor, if any. For example to use VI editor
上面的文字只是猜测;-)
我猜转义字符是由 tty 输出设备( -T ascii
)添加的,这很糟糕。 grotty 允许您通过 -c 选项禁用颜色和转义序列。如果你调用groff -c ...
,这个标志应该被设置为grotty。 。
编辑
通过以下调用,您可以使用 -Z 关闭对 grotty 的隐藏调用,并使用 -c 标志将输出通过管道传输到 grotty 的显式调用。
groff -mm -Tascii conimp.mm -Z|grotty -c
关于text - Groff 文本输出处理问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32583607/