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 o4PIR86h001234 for ; Tue, 25 May 2010 12:27:08 -0600 (MDT) 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 1OGyqJ-0006dK-1U; Tue, 25 May 2010 20:27:07 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.71) (envelope-from ) id 1OGyqJ-00048W-0A for discuss@mdocml.bsd.lv; Tue, 25 May 2010 20:27:07 +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 1OGyqI-0000bn-Vo for discuss@mdocml.bsd.lv; Tue, 25 May 2010 20:27:06 +0200 Received: from schwarze by usta.de with local (Exim 4.71) (envelope-from ) id 1OGyqI-0004aQ-Kk for discuss@mdocml.bsd.lv; Tue, 25 May 2010 20:27:06 +0200 Date: Tue, 25 May 2010 20:27:06 +0200 From: Ingo Schwarze To: discuss@mdocml.bsd.lv Subject: Re: mandoc vs Xo in It argument Message-ID: <20100525182706.GA7295@iris.usta.de> References: <20100525155838.GA49421@acme.spoerlein.net> <20100525175653.GI8074@bramka.kerhand.co.uk> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100525175653.GI8074@bramka.kerhand.co.uk> User-Agent: Mutt/1.5.20 (2009-06-14) Hi Jason, hi Ulrich, Jason McIntyre wrote on Tue, May 25, 2010 at 06:56:29PM +0100: > On Tue, May 25, 2010 at 05:58:38PM +0200, Ulrich Spoerlein wrote: >> while further cleaning up the FreeBSD manpages, I'm now at a point where >> I have to fix the Xo/Xc fallout. Why exactly is this allowed: >> >> .Bl -tag -width indent -compact >> .It Xo >> .Ft void >> .Xc Because i implemented plain .It Xo support long ago. ;-) >> .It Xo >> .Fn auth_destroy "AUTH *auth" >> .Xc >> .Pp >> A macro that destroys the authentication information associated with >> >> But not this >> >> .Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" >> .It Dv CLSET_TIMEOUT Ta Xo >> .Vt "struct timeval" Ta "set total timeout" >> .Xc >> .It Dv CLGET_TIMEOUT Ta Xo >> .Vt "struct timeval" Ta "get total timeout" >> .Xc >> .El Because Kristaps did not yet implement support for .Ta as a full-blown macro, so you can't extend it yet with .Xo. But, unless i'm quite mistaken, he is going to, this will be the next step after the next release, which is expected to happen very soon. >> And is there a better way to rewrite this other than putting all the >> arguments to .It on the same line (which quickly runs over 80 columns). Hmmm, probably you will not need to rewrite that code at all. On the other hand, the .Ta in the middle of the .Xo/.Xc does look a bit ugly. But i also have some code written that is nearly finished, improving support for badly nested blocks, like .Ao ao .Bo bo .Ac ac .Bc bc and .Aq aq Bo bo .Bc bc So, when Kristaps is finished with .Ta, let's see whether i can put the pieces together and get .It it Xo xo .Ta ta .Xc xc supported too. If you are lucky, it may take a week or two, if you are less lucky, perhaps after the c2k10 hackathon, that is mid-July. >> People really seem to like these three column tables ... Sure, people are really creative, with .Bl -column in particular. > i'm not going to answer any questions here, just fuel the fire a bit ;) > > Xo/Xc and -column are both steeped in dark magic. We are trying hard to make that obscurity go away. Without .Xo, and since the m2k10 hackathon, mandoc is already handling .Bl -column more gracefully than groff, i think. Take block nesting (including .Xo/.Xc) alone, and expect the remaining dark magic to be gone in about two week's time. > put them together, and expect everything to break. Still true, but the clear goal is to change that. > do yourself a favour: whenever you have something that makes you think > "that'll make a nice table", just paste it in, and wrap it in a literal > display. no one will be any the wiser, and the poor bastard who needs to > add column 4 will be forever grateful to you. Still true, and .Bd -literal will of course remain a good option for many cases, but we are trying hard to make .Bl -column work reliably. > you could also try formatting your problem list in a way similar to the > first, simpler, example you gave. but if it works it will be trial and > error, and not because those macros follow any kind of logic. The hard part implementing them will be to make them do what you want, reliably, even in cases that used to break for no obvious reason in groff, and still remain compatible with existing usage in manuals. But i suspect that is an achievable goal now, though certainly non-trivial. Yours, Ingo -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv