[Rd] Line breaks in mathematical formulae in Rd files (PR#13287)

xieyihui at gmail.com xieyihui at gmail.com
Fri Nov 14 14:15:03 CET 2008


Hi,

This is a problem about writing R documentation (R-exts 2.6). The
command "\deqn" defined in "Rd.sty" is:

\newcommand{\deqn}[2]{\[#1\]}

which will put mathematical formulae in the "displaymath" environment;
that means line breaks are not allowed (or will not be shown) in
formulae, but sometimes we do need multiple lines of formulae. One
solution is to write several equations using "\deqn", but I think to
change the definition of "\deqn" is better:

\newcommand{\deqn}[2]{\begin{eqnarray*}#1\end{eqnarray*}}

This will not change the pdfLaTeX output effect, moreover, line breaks
and alignments using "&" will be available in math formulae.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China



More information about the R-devel mailing list