From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-2.sys.kth.se (smtp-2.sys.kth.se [130.237.32.160]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o65B6ESf028304 for ; Mon, 5 Jul 2010 07:06:14 -0400 (EDT) Received: from smtp-2.sys.kth.se (localhost [127.0.0.1]) by smtp-2.sys.kth.se (Postfix) with ESMTP id C5BA814D79E for ; Mon, 5 Jul 2010 13:06:08 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-2.sys.kth.se ([127.0.0.1]) by smtp-2.sys.kth.se (smtp-2.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id C801ebuaOL4D for ; Mon, 5 Jul 2010 13:06:07 +0200 (CEST) X-KTH-Auth: kristaps [130.237.221.96] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: tech@mdocml.bsd.lv Received: from [130.237.221.96] (ctime.pdc.kth.se [130.237.221.96]) by smtp-2.sys.kth.se (Postfix) with ESMTP id D74A514C12F for ; Mon, 5 Jul 2010 13:06:07 +0200 (CEST) Message-ID: <4C31BC07.3090700@bsd.lv> Date: Mon, 05 Jul 2010 13:03:35 +0200 From: Kristaps Dzonsons User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: tech@mdocml.bsd.lv Subject: Re: Bk -words badness References: <4C31A369.6010005@bsd.lv> <4C31B55E.3030202@bsd.lv> In-Reply-To: <4C31B55E.3030202@bsd.lv> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit >> Ingo, how goes the `Bk' work? Scanning through mandoc's rendering of >> current manuals, I see a lot of the following sort of breakage: >> >> .Bk -words >> .Op Fl a Ar b >> .Op Fl a Ar b >> .Op Fl a Ar b >> .Op Fl a Ar b >> .Op Fl a Ar b >> .Op Fl a Ar b >> .Op Fl a Ar b >> .Op Fl a Ar b >> .Op Fl a Ar b >> .Op Fl a Ar b >> .Op Fl a Ar b >> .Op Fl a Ar b >> ... > > The enclosed patch is a first stab at this. It only works for explicit > `Bk -words' for now; it's trivial to extend this to SYNPRETTY. As you > can see, it simply checks whether it's in a KEEP mode and resets to > PREKEEP if it's a line subsequent the prior node. > > This fixes the badness mentioned above. ...so I visually checked this against /all/ OpenBSD manuals with `Bk' and didn't notice anything out of the ordinary except ssh-keygen(1) and crunchgen(8). Both exhibit block-breaking behaviour regarding `Nm' and `Bk'. The only systematic difference I see between mandoc and groff is that given two `Nm' blocks in the SYNOPSIS, groff remembers the first indentation whilst mandoc will readjust itself. I prefer the latter, but that's just me. Example (edited, as groff doesn't have our awesome -Owidth=xxx option): groff: newfs [-Nq] [-b block-size] [-c fragments-per-cylinder-group] [-f frag-size] [-g avgfilesize] [-h avgfpdir] mount_mfs [-b block-size] [-c fragments-per-cylinder-group] [-f frag-size] [-i bytes] [-m free-space] [-o options] mandoc: newfs [-Nq] [-b block-size] [-c fragments-per-cylinder-group] [-f frag-size] [-g avgfilesize] [-h avgfpdir] mount_mfs [-b block-size] [-c fragments-per-cylinder-group] [-f frag-size] [-i bytes] [-m free-space] If this behaviour is desired, I think it's pretty trivial to implement given an extra state variable. Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv