tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* roff conditionals inside .Bd
@ 2010-06-01 10:10 Ulrich Spörlein
  2010-06-01 12:03 ` Kristaps Dzonsons
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Spörlein @ 2010-06-01 10:10 UTC (permalink / raw)
  To: tech

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-01 12:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-01 10:10 roff conditionals inside .Bd Ulrich Spörlein
2010-06-01 12:03 ` Kristaps Dzonsons
2010-06-01 12:09   ` Ulrich Spörlein

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