2

我需要使用 groff -mm 宏格式化文档,并且在一些问题上需要帮助: 显示问题的图像

============
你可以看到它在顶部放置了一些空白行和一个页码。我需要它从文件的第一行开始运行一个连续的列。
它使用 ansi 转义码,我需要它严格使用 ascii 文本字符。
我也不需要默认缩进,并且页面宽度需要为 80 个字符宽,因为我将其发送到文本文件而不是打印机。

4

1 回答 1

4

您可以使用 重新格式化页面.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 ....

编辑

通过以下调用,您可以使用 -Z 关闭对 grotty 的隐藏调用,并使用 -c 标志将输出通过管道传输到对 grotty 的显式调用。

groff  -mm -Tascii conimp.mm -Z|grotty -c
于 2015-09-15T14:37:44.293 回答