Date: Sun, 6 Aug 2023 08:27:46 -0700 From: Bakul Shah <bakul@iitbombay.org> To: Graham Perrin <grahamperrin@freebsd.org> Cc: freebsd-hackers <hackers@freebsd.org> Subject: Re: deroff(1) and deroff (1b) with mdoc(7) (was: demandoc(1)) Message-ID: <D96A5794-0B06-43A0-9FC1-50E40A33AB88@iitbombay.org> In-Reply-To: <238083d9-c937-930c-9f15-7f8708c4205a@freebsd.org> References: <0345d177-0da2-e41b-6a49-b3fe06e52be0@freebsd.org> <79117D20-0A32-4548-9250-27CCF6650403@iitbombay.org> <238083d9-c937-930c-9f15-7f8708c4205a@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 6, 2023, at 4:32 AM, Graham Perrin <grahamperrin@freebsd.org> = wrote: >=20 > deroff(1) /usr/local/heirloom/usr/5bin/deroff is potentially more = useful than > deroff(1b) /usr/local/heirloom/usr/ucb/deroff however > deroff(1) removes a little too much; = <https://reviews.freebsd.org/P600$148-153>. Heirloom deroff was derived from plan9 deroff. >=20 > <https://www.freshports.org/devel/plan9port/> >=20 > deroff(1) in Plan 9 from User Space has: >=20 > - a manual page that differs from deroff(1) and deroff(1b) in the = Heirloom Toolchest >=20 > - the same glitch (below). >=20 >=20 > % cat /usr/src/share/man/man8/rc.8 | grep Operation\ of > .Ss Operation of Nm > .Ss Operation of Nm rc.shutdown > % /usr/local/plan9/bin/deroff /usr/src/share/man/man8/rc.8 | grep = Operation > Operation > Operation rc.shutdown > % Why not try to fix deroff to also support mdoc just as it supports mm = and ms macros? I hope you are not talking about adding demandoc to the base! Incidentally FreeBSD man fails at properly formatting deroff.1 man page. It produces -mm Remove titles, attachments, etc., as well as ordinary = troff constructs, from or mm documents. nroff -man produces this: -mm Remove titles, attachments, etc., as well as ordinary = troff con=E2=80=90 structs, from ms(7) or mm(7) documents. 9 man -mm Remove titles, attachments, etc., as well as ordinary troff constructs, from ms(7) or mm documents.=20 =09 mandoc man page says: By default, the input language is automatically detected for each file: if = the first macro is Dd or Dt, the mdoc(7) parser is used; = otherwise, the man(7) parser is used. With other arguments, -m is = silently ignored. So either it is using the wrong parser or the parser is doing the wrong = thing!=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D96A5794-0B06-43A0-9FC1-50E40A33AB88>