From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-01.scc.kit.edu (scc-mailout-kit-01.scc.kit.edu [129.13.231.81]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id be3b6017 for ; Tue, 23 Apr 2019 17:34:00 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-01.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1hJ3zD-0004Ic-6n; Wed, 24 Apr 2019 00:33:59 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1hJ3zC-0006ln-GL; Wed, 24 Apr 2019 00:33:58 +0200 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1hJ3zC-0004W0-Bp; Wed, 24 Apr 2019 00:33:58 +0200 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id e392b0ee; Wed, 24 Apr 2019 00:33:58 +0200 (CEST) Date: Wed, 24 Apr 2019 00:33:58 +0200 From: Ingo Schwarze To: Stephen Gregoratto Cc: tech@mandoc.bsd.lv Subject: Re: [docbook2mdoc] Treat as Message-ID: <20190423223358.GM64114@athene.usta.de> References: <20190423150147.ylbr34gnsdb6txda@BlackBox> <20190423150424.tzxnjp2bpngt6sn7@BlackBox> X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190423150424.tzxnjp2bpngt6sn7@BlackBox> User-Agent: Mutt/1.8.0 (2017-02-23) Hi Stephen, Stephen Gregoratto wrote on Wed, Apr 24, 2019 at 01:04:24AM +1000: > On 2019-04-24 01:01, Stephen Gregoratto wrote: >> In DocBook 5.x, morphed into , but docbook2mdoc >> does not format them the same way. On my files, info is printed at the >> top before NAME. Fixed with the commit shown below. >> I tried aliasing info to refentry info but the output >> became mangled, with PREFACE's and mutiple SYNOPSIS' inserted. Indeed, the element is used in very different contexts. Trying to handle them all in the same way won't make you happy. > Forgot to say that this is found extensively in the OpenGL refpages > project, That hint was indeed crucial. Without it, i wouldn't have had examples to look at and wouldn't have known where to start. Thanks for the report, Ingo Log Message: ----------- handle like inside the document element and inside ; issue found in OpenGL-Refpages by Stephen Gregoratto Modified Files: -------------- docbook2mdoc: docbook2mdoc.c Revision Data ------------- Index: docbook2mdoc.c =================================================================== RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v retrieving revision 1.133 retrieving revision 1.134 diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.133 -r1.134 --- docbook2mdoc.c +++ docbook2mdoc.c @@ -812,6 +812,8 @@ pnode_printrefentry(struct format *f, st pnode_unlink(info); info = NULL; } + if (info == NULL) + info = pnode_takefirst(n, NODE_INFO); meta = pnode_takefirst(n, NODE_REFMETA); if (meta != NULL && TAILQ_FIRST(&meta->childq) == NULL) { pnode_unlink(meta); -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv