From p.dalgaard at biostat.ku.dk  Fri Dec 19 11:31:01 2008
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Fri, 19 Dec 2008 11:31:01 +0100
Subject: [Rd] Misuse of $<matn expressions>$ in Rd files
In-Reply-To: <alpine.LFD.2.00.0812190831550.27469@gannet.stats.ox.ac.uk>
References: <alpine.LFD.2.00.0812190831550.27469@gannet.stats.ox.ac.uk>
Message-ID: <494B77E5.4060201@biostat.ku.dk>

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



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