[R-pkg-devel] Warnings if Carriage Returns in Code Elements of R Documentation
Henric Winell
nilsson.henric at gmail.com
Fri Mar 9 16:22:42 CET 2018
On 2018-03-05 10:00, Dario Strbenac wrote:
> Good day,
>
> The package checking software emits a warning if \cr is used inside \code. The reason I'd like to do that is to avoid a S4 constructor specification being limited to one line and running off the side of the PDF page of the PDF manual, as happens by default. The style of the documentation which I wrote is:
See WRE. First, get of \cr. Second, replacing \code{} with
\preformatted{} and your manual formatting will be preserved.
Henric Winell
>
> \section{Constructor}{
> \describe{
> \item{}{
> \code{DataClass(parameter1, parameter2, parameter3, parameter4,\cr
> parameter5, parameter6)
> }
See WRE. Get rid of \cr and use \preformatted instead of \code. But
note that it often requires padding with spaces to get exactly the
result you want.
Henric Winell
> }
> } \describe{
> \item{\code{parameter1}}{A description of the requirements of the first parameter.}
> }
> }
>
> How can wrapping be forced without causing a warning during checking?
>
> --------------------------------------
> Dario Strbenac
> University of Sydney
> Camperdown NSW 2050
> Australia
>
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
More information about the R-package-devel
mailing list