From ripley at stats.ox.ac.uk  Fri Dec 19 12:32:52 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 19 Dec 2008 11:32:52 +0000 (GMT)
Subject: [Rd] Misuse of $<matn expressions>$ in Rd files
In-Reply-To: <494B77E5.4060201@biostat.ku.dk>
References: <alpine.LFD.2.00.0812190831550.27469@gannet.stats.ox.ac.uk>
	<494B77E5.4060201@biostat.ku.dk>
Message-ID: <alpine.LFD.2.00.0812191125450.32165@gannet.stats.ox.ac.uk>

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



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