From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from acme.spoerlein.net (acme.spoerlein.net [188.72.220.29]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o51C9KWc009242 for ; Tue, 1 Jun 2010 08:09:20 -0400 (EDT) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o51C9J3V005872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 1 Jun 2010 14:09:19 +0200 (CEST) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1275394159; bh=uvPEcFUdByL9T6p9hefSil67/GsIipdWiFOhVStYarU=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=jwlPNzeeXwMcq2GPmBmwBUShSDjXvGthwJHboPOOp/m5jp3GiLJlSNHCT9i6nFclM aKYyfIYanujlDOnmXpcxuiNnsizsoiMxtBc9TwTH3ZLAh/u0NCIPIr+9/raW+pnxpQ 7rtJn3xTNhm+cdTKdF1ajs5gVFuUD8Ez6fg5sVuY= Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o51C9JPx005871 for tech@mdocml.bsd.lv; Tue, 1 Jun 2010 14:09:19 +0200 (CEST) (envelope-from uqs@spoerlein.net) Date: Tue, 1 Jun 2010 14:09:19 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: tech@mdocml.bsd.lv Subject: Re: roff conditionals inside .Bd Message-ID: <20100601120919.GH91631@acme.spoerlein.net> References: <20100601101033.GE91631@acme.spoerlein.net> <4C04F717.1090300@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4C04F717.1090300@bsd.lv> User-Agent: Mutt/1.5.20 (2009-06-14) On Tue, 01.06.2010 at 14:03:35 +0200, Kristaps Džonsons wrote: > > the .if n/t support is really nice, but I have one mdoc page that still > > barfs, as the .if is used inside .Bd. Markup looks like this: > > > > The > > .Fn erf > > and the > > .Fn erff > > functions calculate the error function of x; where > > .Bd -ragged -offset indent > > .if n \{\ > > erf(x) = 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt. > > \} > > .if t \{\ > > erf\|(x) := > > (2/\(sr\(*p)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. > > \} > > .Ed > > .Pp > > > > % mandoc lib/msun/man/erf.3 > > lib/msun/man/erf.3:61:2: scope broken, syntax violated > > > > mandoc will render it just fine, if > > - the .Bd/.Ed is removed > > - the conditional is removed (duh) > > - the conditional is put on one line, like this: > > > > .Bd -ragged -offset indent > > .if n erf(x) = 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt. > > .if t erf\|(x) := (2/\(sr\(*p)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. > > .Ed > > > > > > Ideas? > > Ulrich, > > Yes: I should fix this. And it's done. This flushed out another bug > such that statements closing a conditional, e.g., > > hello \} there > > should be passed verbatim to the front-ends (if allowed by the > conditional), which would ignore the \}. This has also been fixed, > hence the added escape in chars.{c,in} and mandoc.c update. A > regression test has been added to this effect. I saw the commit, thanks for the quick fix! Uli -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv