\- vs - (Was [Re: [PATCH 2/3] system_data_types.7: Add 'clock_t'])

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2020-10-18 07:56, Michael Kerrisk (man-pages) wrote:
Hi Alex,

On 10/17/20 11:37 PM, Alejandro Colomar wrote:
Signed-off-by: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx>
---

Hi Michael,

Does that dash (in "real-floating") need to be escaped?

No.

In my terminal I see it correctly,
but I've seen you escaping some of them and don't know the reason why.

See man-pages(7):

    Real minus character
        Where a real minus character is required (e.g., for  numbers  such
        as  -1,  for  man  page cross references such as utf-8(7), or when
        writing options that have a leading dash, such as in  ls -l),  use
        the following form in the man page source:

            \-

        This guideline applies also to code examples.

The point is that a real-minux sign is needed to that code snippets
can be cut and pasted.

Should they be escaped always, or is it only sometimes, and when?

In normal text, no escape is needed.


Hi Michael,

Then, in the following code (taken from printf.3)
the escape is wrong (unneeded) by those guidelines?:

[[
.SH NAME
printf, fprintf, dprintf, sprintf, snprintf, vprintf, vfprintf, vdprintf,
vsprintf, vsnprintf \- formatted output conversion
]]

Thanks,

Alex



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux