The document R-exts contains the following example of using mathematics in R documentation. \deqn{p(x) = {\lambda^x\ \frac{e^{-\lambda}}{x!}} {p(x) = lambda^x exp(-lambda)/x!} There is a syntax error in there, but that's not my point. The problem is that using "R CMD Rd2dvi" I find that putting the alternate forms of the equation on top of each other doesn't work. \deqn{foo} {bar} is interpreted as \deqn{foo} bar which causes a number of problems,e.g. you get both forms of the equation printed, LaTeX complains about missing math delimiters, etc. I solved this by putting everything on one line: \deqn{foo}{bar} but there is either a documentation error in there, or a problem with parsing ".Rd" format files. Another problem is that when I type "R CMD Rd2dvi coda" to get a printable reference for all the functions in the coda package, they seem to come out in a more or less random order. I get read.bugs, mcmc, plot.mcmc, codamenu, read.and.check,... I was expecting alphabetical order. What do I have to do to get this? Martyn --please do not edit the information below-- Version: platform = i686-unknown-linux arch = i686 os = linux system = i686, linux status major = 1 minor = 0.1 year = 2000 month = April day = 14 language = R Search Path: .GlobalEnv, Autoloads, package:base -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I pointed this anomaly out sometime ago. It would be nice to either have the documentation change or the behaviour (I would perfer the latter). On Mon, Apr 17, 2000 at 06:09:40PM +0200, plummer@iarc.fr wrote:> The document R-exts contains the following example of using > mathematics in R documentation. > > \deqn{p(x) = {\lambda^x\ \frac{e^{-\lambda}}{x!}} > {p(x) = lambda^x exp(-lambda)/x!} > > There is a syntax error in there, but that's not my point. > The problem is that using "R CMD Rd2dvi" I find that putting > the alternate forms of the equation on top of each other doesn't > work. > > \deqn{foo} > {bar} > > is interpreted as > > \deqn{foo} > bar > > which causes a number of problems,e.g. you get both forms of the > equation printed, LaTeX complains about missing math delimiters, etc. > I solved this by putting everything on one line: > > \deqn{foo}{bar} > > but there is either a documentation error in there, or a problem with > parsing ".Rd" format files. > > Another problem is that when I type "R CMD Rd2dvi coda" to get a printable > reference for all the functions in the coda package, they seem to come out in > a more or less random order. I get > read.bugs, mcmc, plot.mcmc, codamenu, read.and.check,... > I was expecting alphabetical order. What do I have to do to get this? > > Martyn > > --please do not edit the information below-- > > Version: > platform = i686-unknown-linux > arch = i686 > os = linux > system = i686, linux > status > major = 1 > minor = 0.1 > year = 2000 > month = April > day = 14 > language = R > > Search Path: > .GlobalEnv, Autoloads, package:base > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-- +-------------------------------------------------------------------------+ | Robert Gentleman phone : (64-9) 3737-599 ext 3946 | | Senior Lecturer fax : (64-9) 3737-018 | | Department of Statistics office : Room 206 Maths/Physics | | University of Auckland email : rgentlem@stat.auckland.ac.nz | +-------------------------------------------------------------------------+ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> "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 yes. The typo is simply a missing "%" at the end of the first line (which once was there, and "of course" was dropped when that documentation was translated from latex to texinfo ...) The following is correct \deqn{foo}% {bar} (see e.g. src/library/base/man/Special.Rd or ...../symnum.Rd ) I'll fix R-exts.texi. Martyn> which causes a number of problems,e.g. you get both forms of the Martyn> equation printed, LaTeX complains about missing math delimiters, etc. Martyn> I solved this by putting everything on one line: Martyn> \deqn{foo}{bar} Martyn> but there is either a documentation error in there, or a Martyn> problem with parsing ".Rd" format files. Martyn> Another problem is that when I type "R CMD Rd2dvi coda" to get Martyn> a printable reference for all the functions in the coda Martyn> package, they seem to come out in a more or less random Martyn> order. I get read.bugs, mcmc, plot.mcmc, codamenu, Martyn> read.and.check,... I was expecting alphabetical order. What do Martyn> I have to do to get this? The change just been proposed yesterday by Doug Bates: Replace in R..../bin/Rd2dvi , about line 88 files=`find ${dir} -name "*.[Rr]d" -print` by files=`find ${dir} -name "*.[Rr]d" -print | sort` Martyn> --please do not edit the information below-- Martyn> Version: Martyn> platform = i686-unknown-linux Martyn> arch = i686 Martyn> os = linux Martyn> system = i686, linux Martyn> status Martyn> major = 1 Martyn> minor = 0.1 Martyn> year = 2000 Martyn> month = April Martyn> day = 14 Martyn> language = R Martyn> Search Path: Martyn> .GlobalEnv, Autoloads, package:base -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> "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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._