I was reading the manpage for gdb and I came across the line:
You can use GDB to debug programs written in C, C@t{++}, Fortran and Modula-2.
The C@t{++} looks like a regex but I can't seem to decode it.
What does it mean?
I was reading the manpage for gdb and I came across the line:
You can use GDB to debug programs written in C, C@t{++}, Fortran and Modula-2.
The C@t{++} looks like a regex but I can't seem to decode it.
What does it mean?
GNU hates man pages, so they usually write documentation in another format and generate a man page from that, without really caring if the result is usable.
C@t{++}
is some texinfo markup which didn't get translated. It wasn't intended to be part of the user-visible documentation. It should simply say C++
(possibly with some special font for the ++
to make it look nice).
The sequence @t{...}
is the texinfo markup to typeset a sequence using fixed-width font (see the Fonts section of the texinfo manual for more details and some examples.)
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.
This issue seems to have been introduced in a commit from April 2013 where the man pages were converted to texinfo and that specific markup was introduced. It seems the script now used to generate the man pages (texi2man.pl
) doesn't recognize or properly convert that sequence.
pod2man
provides a roff macro for "a nicer C++" that does not get used because its recognition code only kicks in for the string "C++".
– JdeBP
Oct 18 '18 at 05:25
C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
troff expansion from a labbie at Murray Hill during the initial evangelism of the C++ language back when we were typesetting USENIX proceedings for those early C++ events. The labbies were pretty serious about their troff. :)
– tchrist
Oct 19 '18 at 00:21
++
somehow – thrig Oct 18 '18 at 02:04C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
– tchrist Oct 19 '18 at 00:23