From ripley at stats.ox.ac.uk  Thu Dec 11 08:00:00 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu Dec 11 07:58:55 2003
Subject: [Rd] Using \leq for <= in Rd files
In-Reply-To: <FC026A0F0EE43E42A6EE465E2C7FFF78033D6FA3@coxs-nh.nsw.cmis.CSIRO.AU>
Message-ID: <Pine.LNX.4.44.0312110649410.27676-100000@gannet.stats>

On Thu, 11 Dec 2003 Tim.Keighley@csiro.au wrote:

> Hi,
> 
> When writing formulae in Rd files I use \leq to get a less-than-or-equal-to
> sign, as this is what the LaTeX references I consulted suggested. This works
> correctly for the PDF output (Rcmd Rd2dvi.sh --pdf), however when the Rd
> file is converted to text or html this command is converted to "<=q".
> 
> A workaround is to use \le instead of \leq which works with my LaTeX
> distribution (MiKTeX 2.3.?). Another way would be to change Rdconv.pm by
> adding \leq and \geq to the substitution lists in text2html, text2txt and
> the other similar functions.
> 
> I don't know much about LaTeX so it may be that \leq has been phased out in
> favour of \le and the books and websites I read might be out of date.

\leq is not an Rd command, so you should be using e.g.

\eqn{X \leq 4}{X \le 4}

if you want to use it.  You may find that in your setup \le and \leq give 
different glyphs.  Standard latex says

/TeX/fptex/texmf/tex/latex/base/fontmath.ltx:   \let\le=\leq

where \leq is the glyph name in the CM symbol fonts.  MASS is typeset with
\let\le=\leqslant.

-- 
Brian D. Ripley,                  ripley@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] Using \leq for <= in Rd files
Prof Brian Ripley