[Rd] Using \leq for <= in Rd files

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Dec 11 08:00:00 MET 2003


On Thu, 11 Dec 2003 Tim.Keighley at 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 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