Dis*_*ame 16 man documentation gdb
我正在阅读 gdb 的联机帮助页,但遇到了以下问题:
You can use GDB to debug programs written in C, C@t{++}, Fortran and Modula-2.
Run Code Online (Sandbox Code Playgroud)
C@t{++} 看起来像一个正则表达式,但我似乎无法解码它。
这是什么意思?
小智 28
GNU 讨厌手册页,因此他们通常以另一种格式编写文档并从中生成手册页,而并不真正关心结果是否可用。
C@t{++}
是一些未翻译的 texinfo 标记。它不打算成为用户可见文档的一部分。它应该简单地说C++
(可能带有一些特殊字体++
以使其看起来不错)。
fil*_*den 18
序列@t{...}
是使用固定宽度字体排版序列的 texinfo 标记(有关更多详细信息和一些示例,请参阅texinfo 手册的字体部分。)
It looks like they were trying to write "C++" and have the "++" use a fixed width font (like "++
".) Perhaps someone found that yields better results with specific fonts while rendering documentation in PostScript or PDF or some format that uses variable-width fonts by default.
The reason why this doesn't seem to work and you're seeing the unprocessed sequence is that texinfo is used by the info
documentation system, while man
uses nroff which is a different language with different commands (for instance, the command to switch to a constant width font in nroff is \f(CW
), so it of course didn't recognize the @t{...}
sequence unchanged.
这个问题似乎是在2013 年 4 月的一次提交中引入的,其中手册页被转换为 texinfo 并引入了特定的标记。现在用于生成手册页 ( texi2man.pl
)的脚本似乎无法识别或正确转换该序列。