根據info groff
(5.11節中的字符轉換), \.
應該只打印點。但是,這不是看起來發生的事情。 如果我使這個手冊頁groff中的轉義點
.TH x x x x
\.SH foo
我得到呈現爲節標題foo
,而不是打印.SH
。
那麼,爲什麼會發生這種情況,以及如何避免在groff中起始行的 點(和撇號)?
根據info groff
(5.11節中的字符轉換), \.
應該只打印點。但是,這不是看起來發生的事情。 如果我使這個手冊頁groff中的轉義點
.TH x x x x
\.SH foo
我得到呈現爲節標題foo
,而不是打印.SH
。
那麼,爲什麼會發生這種情況,以及如何避免在groff中起始行的 點(和撇號)?
要在行寫入使用\[char46]
年初逃脫點:
\[char46]SH foo
打印
.SH foo
這是預期的行爲,但應固定在手冊頁。 Here是一個錯誤報告。
您可以在下面閱讀\\
(縮寫) 和\.
(來自信息頁)的說明。
-- Escape: \\
[...]
`\\' is a `delayed' backslash; more precisely, it is the default
escape character followed by a backslash, which no longer has
special meaning due to the leading escape character. It is _not_
an escape sequence in the usual sense! In any unknown escape
sequence `\X' the escape character is ignored and X is printed.
But if X is equal to the current escape character, no warning is
emitted.
As a consequence, only at top-level or in a diversion a backslash
glyph is printed; in copy-in mode, it expands to a single
backslash which then combines with the following character to an
escape sequence.
[...]
-- Escape: \.
Similar to `\\', the sequence `\.' isn't a real escape sequence.
As before, a warning message is suppressed if the escape character
is followed by a dot, and the dot itself is printed.
只需預先設置點與零寬度字:
\&. -- this a a dot.
或暫時切換到另一個控制字符:
.cC#
. -- this is a dot.
#cc