[Rd] help pages base R not rendered correctly?

Duncan Murdoch murdoch.duncan at gmail.com
Tue May 23 15:10:02 CEST 2017


On 23/05/2017 8:39 AM, Joris Meys wrote:
> Hi all,
>
> Don't know if this is a known issue, but I couldn't find anything so I
> report anyway. When checking eg ?qr in both RStudio and the naked R IDE,
> the help page is rendered incorrectly. More specifically, any use of
> \bold{...} is printed as is, rather than interpreted as bold. Same happens
> on ?svd.

In ?qr (and probably in ?svd), \bold is inside \eqn{}, so it is being 
interpreted as LaTeX markup rather than Rd markup, and since no 
alternative was given, is displayed as-is.

If you actually wanted it to display properly in HTML and ascii, the 
current \eqn{\bold{Ax} = \bold{b}} would have to be written as something 
like

\ifelse{latex}{\eqn{\bold{Ax} = \bold{b}}}{\bold{Ax} = \bold{b}}

which is pretty tedious to write, and it's not the only example on that 
page.  So I doubt if anyone will fix it.

>
> According to the manual Writing R Extensions, this should still be
> recognized. When I try to use it in the help pages of my own packages,
> \bold{} is interpreted correctly.

You missed the part about \eqn.

Duncan Murdoch

>
> No idea what is going wrong and it's not that important, but I found it
> curious enough to report.
>
> Cheers
> Joris
>



More information about the R-devel mailing list