Skip to content
Prev 4284 / 12125 Next

[R-pkg-devel] Literal LaTeX Text in Function Arguments

HI Bill, 

I checked this as well, using the package you put on github for this purpose (note that the link you gave didn't work for me).
I tried a few variants but the bottom line is that "\ldots" and "\dots" are expanded even if the backslash is escaped. 

It is a feature rather than a bug, see towards the bottom of p. 8 in parseRd (https://developer.r-project.org/parseRd.pdf). 
In R strings, macros starting with "\l" are expanded (this is how \code{\link{sss}} works). 

But '\dots' is also expanded and this seems undocumented. I now recall that I have seen similar behaviour for "\dots" in R strings in the Examples section. 

I tried some hacks, such as redefining the '\ldots' but they don't work, since the Rd parser works recursively.
 


Georgi Boshnakov