0

在编写 UNIX 手册页时,我意识到某些短语出现了多次。我想定义一次并重用它(而不是通过编辑器复制)。我看到我可以将变量 ( .ds) 用于多行文本,但是当短语包含点命令 (如.B foo) 时它会失败。是否有解决方案(除了包含文件和 C 预处理器)?

4

1 回答 1

0

您可以将多行文本变成宏。缺点是要插入它,您必须调用宏而不是插入字符串。

.de Us
The usage example is
.B very
important
..

Text text text
.Us
more text more text

如果您只需要在字符串中加粗,则可以包括字体更改:

.ds Us You can use \fB bold \fR text in your strings \
and it will work fine

text text \*(Us
于 2017-09-28T01:19:16.450 回答