[Rd] parsing Rd files and \deqn{}

Robin Hankin rksh1 at cam.ac.uk
Fri May 1 10:25:56 CEST 2009



I am having difficulty including a LaTeX formula in an Rd

The example given in section 2.7 in 'Parsing Rd files' is:

    \deqn{ f(x) = \left\{
      0 & x<0 \\
      1 & x\ge 0
      \right. }{non latex}

For me, this gives:

\deqn{ f(x) = \left\{
0 \& x<0 \bsl{}
1 \& x\ge 0
\right. }{}

in the tex file, which is not  desired because the ampersand
is escaped; the '&' symbol appears in the dvi file, and I
want an ampersand  to indicate  alignment.

Also, the '\\' appears as \bsl{}, which is undesired; the
 resulting dvi file (made by R CMD Rd2dvi) looks wrong.

How do I write the Rd file so as to produce non-escaped

Robin K. S. Hankin
Uncertainty Analyst
University of Cambridge
19 Silver Street
Cambridge CB3 9EP

More information about the R-devel mailing list