From rksh1 at cam.ac.uk  Fri May  1 10:25:56 2009
From: rksh1 at cam.ac.uk (Robin Hankin)
Date: Fri, 01 May 2009 09:25:56 +0100
Subject: [Rd] parsing Rd files and \deqn{}
Message-ID: <49FAB214.2080802@cam.ac.uk>

Hi

[R-2.9.0]

I am having difficulty including a LaTeX formula in an Rd
file.

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


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


For me, this gives:

\deqn{ f(x) = \left\{
\begin{array}{ll}
0 \& x<0 \bsl{}
1 \& x\ge 0
\end{array}
\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
ampersands?


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



[Rd] parsing Rd files and \deqn{}
Robin Hankin