Runlong Tang
2011-Jun-20 18:52 UTC
[R] Can mathematical formula be used in the help file of a R function or package?
Hi everyone, I am writing help files for some R functions in an R package. I am wondering if we can use the Latex mathematical formula when editing those *.Rd files and then obtain a pdf manual with beautiful mathematical formula. I tried it with the default R CMD check command but could not get the desired mathematical formula. That is, $f(x)$ is not recognized as a math formulas. I think the R CMD check command invokes pdfLatex. Is it possible to do some setting to make the R CMD check command recognize $f(x)$ as a math formulas? Thanks, Runlong [[alternative HTML version deleted]]
Rolf Turner
2011-Jun-20 21:38 UTC
[R] Can mathematical formula be used in the help file of a R function or package?
On 21/06/11 06:52, Runlong Tang wrote:> Hi everyone, > > > > I am writing help files for some R functions in an R package. I am wondering > if we can use the Latex mathematical formula when editing those *.Rd files > and then obtain a pdf manual with beautiful mathematical formula. I tried it > with the default R CMD check command but could not get the desired > mathematical formula. That is, $f(x)$ is not recognized as a math formulas. > I think the R CMD check command invokes pdfLatex. Is it possible to do some > setting to make the R CMD check command recognize $f(x)$ as a math formulas?See Writing R Extensions --> Writing R Documentation Files --> Mathematics You need eqn{} and/or deqn{}. cheers, Rolf Turner