Skip to content
Prev 18648 / 63424 Next

\dQuote{} in \code{} not processed

Just wondering if this is the expected behaviour.

I was wanting to produce quoted text within \code{}, without manually
entering the '"'. \dQuote{} seems advisable after reading the Writing R
Extensions manual, so I tried \code{\dQuote{mytext}} expecting it to
produce "mytext" in monospace font (with ' ' round it in the R help
files) but it appears that \dQuote{mytext} is not processed within \code
{} as \dQuote{mytext} is printed literally in the produced
documentation.

Is this intended? I didn't see any statements suggesting \code{} could
not include other markup, and \code{\link{}} works...

You can see an example in the pdf manual for my package on CRAN:

http://www.stats.bris.ac.uk/R/doc/packages/cocorresp.pdf 

in particular the entry for coca().

This is on Fedora Core 3 with:
Version 2.2.0 Patched (2005-11-09 r36252) and
Version 2.3.0 Under development (unstable) (2005-11-30 r36557)

Cheers,

G