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 786fdbcd for ; Fri, 23 Jun 2017 16:24:11 -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 1dOW3l-0002Yi-UV; Fri, 23 Jun 2017 23:24:10 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1dOW3l-0007MD-K8; Fri, 23 Jun 2017 23:24:09 +0200 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1dOW3l-0003f7-FV; Fri, 23 Jun 2017 23:24:09 +0200 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id 31549420; Fri, 23 Jun 2017 23:24:09 +0200 (CEST) Date: Fri, 23 Jun 2017 23:24:09 +0200 From: Ingo Schwarze To: "Anthony J. Bentley" , tech@mdocml.bsd.lv Subject: Re: MathML and , , Message-ID: <20170623212409.GB33360@athene.usta.de> References: <45090.1497945869@cathet.us> <20170623025712.GE77030@athene.usta.de> 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: <20170623025712.GE77030@athene.usta.de> User-Agent: Mutt/1.6.2 (2016-07-01) Hi Anthony, Ingo Schwarze wrote on Fri, Jun 23, 2017 at 04:57:12AM +0200: > Anthony J. Bentley wrote on Tue, Jun 20, 2017 at 02:04:29AM -0600: >> Consider the quadratic formula: >> x={-b +- sqrt{b sup 2 - 4ac}} over 2a > After committing the patch appended below, mandoc now renders > as follows: > > > x > = > > [...] > > 2 > a > > I just fixed this with the following commit, to render as: 2 a Yours, Ingo Log Message: ----------- splitting a text box sometimes requires wrapping it in a list Modified Files: -------------- mandoc: eqn.c Revision Data ------------- Index: eqn.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/eqn.c,v retrieving revision 1.68 retrieving revision 1.69 diff -Leqn.c -Leqn.c -u -p -r1.68 -r1.69 --- eqn.c +++ eqn.c @@ -1139,7 +1139,25 @@ this_tok: break; if (ccln == ccl) continue; - /* Boundary found, add a new box. */ + /* Boundary found, split the text. */ + if (parent->args == parent->expectargs) { + /* Remove the text from the tree. */ + if (cur->prev == NULL) + parent->first = cur->next; + else + cur->prev->next = NULL; + parent->last = cur->prev; + parent->args--; + /* Set up a list instead. */ + nbox = eqn_box_alloc(ep, parent); + nbox->type = EQN_LIST; + /* Insert the word into the list. */ + nbox->first = nbox->last = cur; + cur->parent = nbox; + cur->prev = NULL; + parent = nbox; + } + /* Append a new text box. */ nbox = eqn_box_alloc(ep, parent); nbox->type = EQN_TEXT; nbox->text = mandoc_strdup(cpn); -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv