Camford Oxbridge
Camford Oxbridge

Reputation: 894

Include TeX in Roxygen comments

I want to use TeX in Roxygen comments.

E.g.,

#' @title   $f(y|\theta)$
#'
#'@description  
#'
#'  \begin{eqnarray*}
#'         a + b &=& c \\
#'         a + b &=& c \\
#'         \theta &=& \beta \\
#'  \end{eqnarray*}
#'
#'
#'@references  
#'@param  
#'@importFrom 
#'@seealso  
#'@inheritParams  

Is there some methods such that the PDF manual reflects TeX scripts in Roxygen comments .

Upvotes: 0

Views: 438

Answers (1)

Stéphane Laurent
Stéphane Laurent

Reputation: 84519

Use eqn for inline equations: \eqn{f(x|theta)}. See here about how to document an inline equation for PDF, HTML and ASCII.

Use deqn for equations in blocks. I don't think that the environment eqnarray is available, but the array environment is available:

\deqn{\begin{array}[ccc] a + b &=& c \\ a + b &=& c \\ \theta &=& \beta \end{array}}

Upvotes: 1

Related Questions