[Rd] \dQuote{} in \code{} not processed
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Dec 1 08:14:35 CET 2005
On Wed, 30 Nov 2005, Gavin Simpson wrote:
> Just wondering if this is the expected behaviour.
Yes. The only command processed inside \code is \link (plus support for
\example and \usage which go through the same processing).
> 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...
Hmm, \dQuote is described in a section called
Marking text
The following logical markup commands are available for emphasizing or
quoting text.
and \code is described as
Indicate text that is a literal example of a piece of a program, e.g., a
fragment of @R{} code or the name of an @R{} object, using
@code{typewriter} font if possible.
Is `literal example' not warning enough? I'll add an explicit statement,
but this is the first time I have seen any indication that anyone thought
otherwise.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list