From maechler@stat.math.ethz.ch  Tue Apr 18 13:19:01 2000
From: maechler@stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Tue, 18 Apr 2000 14:19:01 +0200 (MET DST)
Subject: [Rd] Maths in R documentation (PR#523)
Message-ID: <200004181219.OAA12317@pubhealth.ku.dk>

>>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch> writes:

>>>>> "Martyn" == Martyn Plummer <plummer@iarc.fr> writes:
    Martyn> The document R-exts contains the following example of using 
    Martyn> mathematics in R documentation.

    Martyn> \deqn{p(x) = {\lambda^x\ \frac{e^{-\lambda}}{x!}}
    Martyn> {p(x) = lambda^x exp(-lambda)/x!}

    Martyn> There is a syntax error in there, but that's not my point.
    Martyn> The problem is that using "R CMD Rd2dvi" I find that putting
    Martyn> the alternate forms of the equation on top of each other doesn't
    Martyn> work.

    Martyn> \deqn{foo}
    Martyn> {bar}

    Martyn> is interpreted as

    Martyn> \deqn{foo}
    Martyn> bar

    MM> yes.

    MM> The typo is simply a missing "%" at the end of the first line
    MM> (which once was there, and "of course" was dropped when that documentation
    MM> was translated from latex to texinfo ...)

    MM> The following is correct

    MM> \deqn{foo}%
    MM>      {bar}

NO!  ...dear me... a closer look at these two files
    MM> (see e.g. src/library/base/man/Special.Rd or ...../symnum.Rd )

reveals that

 \deqn{foo}{%
       bar}

is *the way* ..

sorry for the additional confusion I've added...

    MM> I'll fix R-exts.texi.
..yes..

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Maths in R documentation (PR#523)
maechler@stat.math.ethz.ch