Skip to content
Prev 9323 / 12125 Next

[R-pkg-devel] A replacement idiom for \value{\item{\var{...}}{}}

Am 10.07.23 um 16:30 schrieb Ivan Krylov:
Thank you for the report. AFAICS, this only affects HTML conversion in R 
 >= 4.3.0. It is an "internally" known limitation (see corresponding 
source code comment in Rd2HTML).

OTOH, WRE does not clearly specify that \item labels in \arguments or 
\value could actually contain any markup. That said, the referenced 
"Parsing Rd files" document 
(<https://developer.r-project.org/parseRd.pdf>) does tell us that 
\item{}{} arguments are parsed as LaTeX-like text, \dots probably being 
the most common example.
Yes, I think this belongs to "R-devel" and a problem report in Bugzilla 
would be useful; the problem being that Rd markup in \item labels is 
handled inconsistently by the Rd converters. It is currently unclear to 
me, however, which one is at fault here. Your example at least provides 
one (admittedly quiet special) use case for LaTeX-like content in an 
\item label of the \value section.
I think a workaround that currently works for your use case is to use 
\code{fooval.\var{m}} as the label (i.e., wrapped inside \code).

Best regards,

	Sebastian Meyer