[Rd] Maths in R documentation (PR#523)

maechler@stat.math.ethz.ch maechler@stat.math.ethz.ch
Tue, 18 Apr 2000 14:19:01 +0200 (MET DST)

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


is *the way* ..

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

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

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