Skip to content
Prev 5339 / 12125 Next

[R-pkg-devel] [FORGED] Math symbols in .Rd files

On 23/04/20 11:03 am, Bert Gunter wrote:

            
My understanding is that \eqn{...} doesn't really work with html, only 
with LaTeX.  You need to do something like:

\eqn{\hat{\theta} \pm 1.96 \times SE}{theta.hat +/- 1.96*SE}

which (for me at least) gives a nicely rendered result in LaTeX -> pdf 
and the kludgy workaround in html.

As for the degree sign I find that \eqn{42^\circ} gives acceptable 
results in LaTeX, but of course doesn't work in html.

My understanding is that if you enclose things like "?" or "?" in 
\enc{...} and have

\encoding{UTF-8}

as the very first line of your *.Rd file, then CRAN won't complain about 
the presence of these symbols.  But this doesn't work inside \eqn{...}; 
there the "\enc{...}" gets rendered literally.

So for html I think you are stuck with the kludgy fallback to plain text.

cheers,

Rolf