[Rd] Misuse of $<matn expressions>$ in Rd files

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri Dec 19 11:31:01 CET 2008

Prof Brian Ripley wrote:
> 'Writing R Extensions' tells you that $ needs to be escaped in Rd files 
> outside \code and similar.  So I was surprised to find that ca 80 CRAN 
> packages have constructions like (from ISwR)
>   \item{\code{folate}}{
>     a numeric vector, folate concentration ($\mu$g/l).
>   }
> This does not render sensibly in non-latex conversions, and it is what 
> we have \eqn{} for.

I suspect last I looked at this was in copy editing that getting the 
LaTeX to look right took priority.

It renders as "$\mu$g/l" (for now) which is semi-sensible to my eyes. I 
can see that I have \eqn{\mu}g/l in other places, but that comes out as 
"mug/l" which looks like an inverted measure for coffee cups. I probably 
gave up deciding a good incantation for "microgram per liter" in text 
mode. Possibly \eqn{\mu}{u} is the best on can do.

    O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907

More information about the R-devel mailing list