tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: "Ulrich Spörlein" <uqs@spoerlein.net>
To: tech@mdocml.bsd.lv
Subject: roff conditionals inside .Bd
Date: Tue, 1 Jun 2010 12:10:33 +0200	[thread overview]
Message-ID: <20100601101033.GE91631@acme.spoerlein.net> (raw)

Hi guys,

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?
Uli
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 10:10 Ulrich Spörlein [this message]
2010-06-01 12:03 ` Kristaps Dzonsons
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=20100601101033.GE91631@acme.spoerlein.net \
    --to=uqs@spoerlein.net \
    --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).