From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout.scc.kit.edu (mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id sAAM6G6m028712 for ; Mon, 10 Nov 2014 17:06:16 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1Xnx6F-0007L8-4S; Mon, 10 Nov 2014 23:06:15 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1Xnx6E-000544-TF; Mon, 10 Nov 2014 23:06:14 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1Xnx6E-0005H3-RR; Mon, 10 Nov 2014 23:06:14 +0100 Received: from schwarze by usta.de with local (Exim 4.77) (envelope-from ) id 1Xnx6E-0005IO-Qe; Mon, 10 Nov 2014 23:06:14 +0100 Date: Mon, 10 Nov 2014 23:06:14 +0100 From: Ingo Schwarze To: Steffen Nurpmeso Cc: tech@mdocml.bsd.lv Subject: Re: Nested list spacing issue Message-ID: <20141110220614.GD20056@iris.usta.de> References: <20141110174010.Dcr6rYrG%sdaoden@yandex.com> <20141110190318.BxZAODsW%sdaoden@yandex.com> 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: <20141110190318.BxZAODsW%sdaoden@yandex.com> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Steffen, Steffen Nurpmeso wrote on Mon, Nov 10, 2014 at 08:03:18PM +0100: > forget about this, this is an issue with mawk(1) which doesn't [...] > Sorry for the noise. Well, i didn't look at the mawk(1) issue, but your bug report with respect to mandoc(1) is valid in any case, and i have fixed it. > I'm sure it's known This bug was not known, thanks for reporting. > but i can't find a TODO entry in cvs(1) HEAD: > suppose this > > .Sh TABLE OF CONTENTS > .Bl -inset > .It Sx "DESCRIPTION" > .Bl -tag -offset indent > .It Sx "Creating a table of contents" > ... > .El > ... > .El > > In groff v1.22.3 you will see > > TABLE OF CONTENTS > DESCRIPTION > > Creating a table of contents > > but in mandoc v1.13.1 you get > > TABLE OF CONTENTS > DESCRIPTION > Creating a table of contents > > which i think lacks an initial vertical space when the .Bl is > opened? Correct analysis. > A different approach could be found below, but i don't > know if it's always like that (and am too lazy to evaluate). Frankly, the COMPATIBILITY section is a mess. It lists minor issues that probably aren't worth it while lacking warnings about more important issues at the same time. One day, i'll have to clean it up. Yours, Ingo Log Message: ----------- add required vertical spacing before lists that begin at the beginning of the first item of an enclosing list right at the beginning of a new section or subsection; minibug reported by Steffen Nurpmeso Modified Files: -------------- mdocml: mdoc_term.c Revision Data ------------- Index: mdoc_term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v retrieving revision 1.288 retrieving revision 1.289 diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.288 -r1.289 --- mdoc_term.c +++ mdoc_term.c @@ -572,16 +572,18 @@ print_bvspace(struct termp *p, /* Do not vspace directly after Ss/Sh. */ - for (nn = n; nn; nn = nn->parent) { - if (MDOC_BLOCK != nn->type) - continue; - if (MDOC_Ss == nn->tok) + nn = n; + while (nn->prev == NULL) { + do { + nn = nn->parent; + if (nn->type == MDOC_ROOT) + return; + } while (nn->type != MDOC_BLOCK); + if (nn->tok == MDOC_Sh || nn->tok == MDOC_Ss) return; - if (MDOC_Sh == nn->tok) - return; - if (NULL == nn->prev) - continue; - break; + if (nn->tok == MDOC_It && + nn->parent->parent->norm->Bl.type != LIST_item) + break; } /* A `-column' does not assert vspace within the list. */ -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv