[R] Rd files, \itemize in \value

Duncan Murdoch murdoch at stats.uwo.ca
Fri Oct 2 17:02:40 CEST 2009


On 10/2/2009 9:05 AM, Gábor Csárdi wrote:
> Dear All,
> 
> how can I create a list in the \value{} section of an Rd file? The
> things I have tried:
> 
> 1.
> 
> \value{
> text text
> \item more text
> \item even more
> }
> 
> ******* Syntax error: \item in
> /-----
> \item more text
> \item even more\-----
> 
> 2.
> 
> \value{
> text text
> \item{more text}
> \item{even more}
> }
> 
> This gives no error or warning, but the manual page looks as

The value section is like the \arguments section, there's an implicit 
\describe around everything.

> --------------------
> Value:
>      text text
> 
> more text: Numeric scalar giving the minimum correlation for
>           convergence.
> 
> even more: Numeric scalar giving the minimum correlation for
>           convergence.

That looks like a bug:  you should have got nothing for the second arg 
(or an error/warning that it was missing).

> --------------------
> 
> The "Numeric..." text is coming from the last \item{} in arguments{}...
> 
> 3.
> 
> \value{
> text text
> \itemize{
> \item{more text}
> \item{even more}
> }
> }
> 
> Gives the same result as 2, but with a warning....

The itemize style of list has zero-arguments on \item.  So that's really 
a bug if "Numeric scalar..." is showing up here.

> Is there a proper way?

If you want a \describe style of list, just enter items as

\item{name}{description}

If you want an itemize style of list, enter it as

\itemize{
   \item content
   \item more content
}

Thanks for the report...

Duncan Murdoch




More information about the R-help mailing list