Hi David, David Walker wrote on Thu, Oct 13, 2011 at 09:54:27AM +1030: > Kristaps Dzonsons <kristaps () bsd ! lv> wrote:
>> Tip: you can usually tell straightaway whether a manual is in mdoc(7) or >> man(7) by looking at the header. If it has the nice volume name as the >> centre of three columns (e.g., "OpenBSD Reference Manuals"), then it's >> most likely in mdoc(7). Oh, by the way, that rule of thumb gives the wrong result for the vast majority of OpenBSD man(7) manuals. Try, for example, dig(1) gcc(1) info(1) ld(1) perl(1) rsa(3) terminfo(5) nsd(8) sudo(8) These are all typical man(7) manuals, but they still have a volume title in the middle of the header line. The man(7) language *does* support setting the volume name, and most manuals use that feature - only some do not, like curses(3) and a few others. > I wondered if there was a simple way to check. > I'll probably develop a habit now ... Actually, a safer way to distinguish the two is to look at the indentation of normal text. In mdoc(7), that's five characters, in man(7), it's seven. And that is not likely to change. Or even better, look at the source if it's available. .Dd .Dt .Os is mdoc(7), .TH is man(7). > I also notice on cgi that man format has the third column (or second > in that case) not fully justified to the right, whereas mdoc ... looks > good. Don't look too much at any kind of HTML generated from these languages. That's not standardized. ASCII terminal output is what counts. Yours, Ingo

