[Rd] Misuse of $<matn expressions>$ in Rd files
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Dec 19 12:32:52 CET 2008
On Fri, 19 Dec 2008, Peter Dalgaard wrote:
> 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
Actually, it renders (e.g. in 2.8.0) as '$mu$g/l', which is less sensible
that what you read it as, but in my experience only people from the more
mathematical sciences are likely to be aware of TeX notation.
> 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.
Well, why try an abbreviation that is unclear? E.g. other examples are
trying to get a degree sign as $^\circ$C, and why not just say 'degrees
Celsius'?
You probably not had a copy-editor make you write out DNA ....
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list