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 p15EP4LS031430 for ; Sat, 5 Feb 2011 09:25:05 -0500 (EST) 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 1Plj4Q-0005DQ-Sb; Sat, 05 Feb 2011 15:25:02 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1Plj4Q-0001wO-P9 for tech@mdocml.bsd.lv; Sat, 05 Feb 2011 15:25:02 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1Plj4Q-0003LB-Me for tech@mdocml.bsd.lv; Sat, 05 Feb 2011 15:25:02 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1Plj4Q-0007Ve-Gs for tech@mdocml.bsd.lv; Sat, 05 Feb 2011 15:25:02 +0100 Date: Sat, 5 Feb 2011 15:25:02 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: [PATCH] Understand EQ/EN blocks. Message-ID: <20110205142502.GA22129@iris.usta.de> References: <4D4A82E6.9090402@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: <4D4A82E6.9090402@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Kristaps, > Enclosed is a patch that sets us down the road of understanding > EQ/EN blocks. >From reading, merging and running it, this makes sense to me. [...] > The equations themselves are thrown away. This is only because I > wanted to float a patch early with the libroff framework. It's > trivial to put an addspan() style routine to both libmdoc and libman > that at least print out the data. I'll do that with an Ok or two. That is indeed the logical next step. > Thoughts? I guess i would merge it for release if we get at least a bit added value compared to just ignoring the .EQ lines with an ERROR, as we currently do. After looking at http://heirloom.sourceforge.net/doctools/eqn.1b.html i think the easiest and most useful bits that could make rendering better are: * remove "left" and "right" * pass through strings enclosed in double quotes "..." untouched, removing the quotes * convert "over" to "/" * convert "x sub i" to "x_i" and "x sup n" to "x^n" * replace ~ and ^ by a space, and collapse multiple spaces, tabs, and/or newlines to become a single space * remove spaces after ({[ and before )}] A bit less important: * remove "size [+|-]n", roman, italic, bold, "font n", * remove "mark" and "lineup" Much less important: * implement roman, italic, bold * implement under Everything else should probably just be passed through, at least for now: * Let braces { } be braces, converting them to parentheses ( ) would just make the eqn text harder to grok, having lots of adjacent, similar tokens in some formulae. * just keep keywords like: sqrt, from, to, pile, matrix, ccol, dot, hat, tilde, bar, vec, sum, int, inf * leave "define" untouched * don't worry about GNU extensions for now > By the way, we'll be able to fully support "delim", as libroff > allows us to chop up its input lines and send them to the other > backends, so > > foo $a + b$ bar > > assuming `$$' are the EQN delimiters, would be passed back as > > foo > EQN:a + b > bar That does seem worthwhile, too, maybe even more useful than the two items marked "less important" above. Thanks for getting this started, Ingo -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv