tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: "tech@mdocml.bsd.lv" <tech@mdocml.bsd.lv>
Subject: Re: roff conditionals inside .Bd
Date: Tue, 01 Jun 2010 14:03:35 +0200	[thread overview]
Message-ID: <4C04F717.1090300@bsd.lv> (raw)
In-Reply-To: <20100601101033.GE91631@acme.spoerlein.net>

> 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.

Thanks!

Kristaps
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2010-06-01 11:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 10:10 Ulrich Spörlein
2010-06-01 12:03 ` Kristaps Dzonsons [this message]
2010-06-01 12:09   ` Ulrich Spörlein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C04F717.1090300@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).