From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o65MRoeD029775 for ; Mon, 5 Jul 2010 18:27:50 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1OVu8j-0000H9-36; Tue, 06 Jul 2010 00:27:49 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.71) (envelope-from ) id 1OVu8j-0000U6-21 for tech@mdocml.bsd.lv; Tue, 06 Jul 2010 00:27:49 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1OVu8j-0007oo-0i for tech@mdocml.bsd.lv; Tue, 06 Jul 2010 00:27:49 +0200 Received: from schwarze by usta.de with local (Exim 4.71) (envelope-from ) id 1OVu8j-0001za-02 for tech@mdocml.bsd.lv; Tue, 06 Jul 2010 00:27:49 +0200 Date: Tue, 6 Jul 2010 00:27:48 +0200 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: Bk -words badness Message-ID: <20100705222748.GB5497@iris.usta.de> References: <4C31A369.6010005@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C31A369.6010005@bsd.lv> User-Agent: Mutt/1.5.20 (2009-06-14) Hi Kristaps, Kristaps Dzonsons wrote on Mon, Jul 05, 2010 at 11:18:33AM +0200: > Ingo, how goes the `Bk' work? Not. I was slacking in Bob's garden, then on the plane, then sleeping, then at work. Now i'm catching up on my mail. :-) > 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 [...] > Which will, for obvious reasons, continue eternally past rmargin. Right, that is one of the most annoying problems we still have. > I have an intuition for how to implement an implied `Bk' for all > SYNPRETTY blocks: to hook into print_mdoc_node() and set/unset the > PREKEEP flag depending on the line number as reported in mdoc_node. Sounds good. > Would this sort of behaviour satisfy you? The effect would be: > > .Op Fl a Ar b > .Op Fl a Ar b Yes, if i understand correctly, that is what groff does. It also ought to allow almost any desired formatting, and it is somewhat intuitive: People are likely to put on one input line whatever belongs closely together, even when they don't remember the rule. > The `Bk' handler would then be responsible for simply setting the > flag that would be OR'd in print_mdoc_node() for keeps > (SYNPRETTY|KEEPPRETTY or whatever). > > This way, we can simply say that SYNOPSIS implies a `Bk -words' for > the entire section (i.e., SYNPRETTY) and that `Bk -words' means that > contained macro lines aren't space-broken between words. Yes, you are right, the documentation is also very simple to write and very simple to understand. > Thoughts? [x] Try that! Yours, Ingo -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv