[R] Tildes in R docmentation.
Rolf Turner
rolf at math.unb.ca
Thu Sep 27 22:40:49 CEST 2001
I'm getting flummoxed when trying to putting a tilde (``~'') --- as
in a formula --- into an R documentation file, or rather in getting
one to appear in the *.dvi output that results from converting a *.Rd
file.
In my *.Rd file I wrote an expression of the form
\code{cbind(x,y) ~ z}
This shows up in the appropriate way in the plain text help,
and in the html help. But if I do
R CMD Rd2dvi foo.Rd
I get hang-ups at the latex processing stage. I get told
===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===
! Undefined control sequence.
<argument> cbind(x,y) \textasciitilde
{} z
l.93 \code{cbind(x,y) \textasciitilde{} z}
===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===
The documentation on writing documentation tells me that I
should, in ``regular text'' enter ~ as
\eqn{\mbox{\textasciitilde}}{~} or \eqn{\sim}{~}
but that no characters other than ``%'' and ``\'' are ``special''
inside verbatim environments such as \code{}.
However the Rd to latex processor seems to be converting the ~
into ``\textasciitilde{}'' --- with a pair of braces on the end
as if there should be an argument to the control sequence. And
then latex is unable to find that control sequence.
Can anyone explain to me what's going on, and how to go about
solving the problem?
Is this a bug, or am I doing something wrong? Presumably
``\textasciitilde'' ought to be lurking about somewhere, but
it ain't lurking about on our system. Where could I get it?
I.e. what latex package or *.sty file would it be found in,
and where would that package/*.sty file be located?
Thanks.
cheers,
Rolf Turner
rolf at math.unb.ca
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list