# [Rd] overly long lines in pdf output of manual from package

John C Nash nashjc at uottawa.ca
Wed Nov 2 21:45:42 CET 2011

```Thanks for quick reply.

On 11/02/2011 03:54 PM, Prof Brian Ripley wrote:
> On Wed, 2 Nov 2011, John C Nash wrote:
>
>> In re-factoring my optimx package, I'm finding that the pdf output has some lines that are
>> outside the margins (and there are warnings in R CMD check optimx).

>> 1) How do I adjust the DESCRIPTION file to avoid too long a line. I can add \cr elements to the Rd...
>
> Wrap lines?  And is this R 2.14.0, as the issues are easier with the fonts used there?

R 2.14.0 -- installed from M Rutter repository today. I don't know why it wraps sometimes
and not others, but have occasionally seen similar over-long lines with other TEX files
with the TeXlive I'm using, even with the texlive-fonts-extra installed.

>
>> 2) Is there an option control that does the job? I've not found one in searching, but
>> could easily have chosen poor search terms.
>
> R has ways to reformat description files.  See ?write.dcf.

Thanks. I would not have found that! Hence example lines would be

Depends: pkg1, pkg2, pkg3,
pkg4, pkg5, pkg6.

i.e., spaces on second line.

>> 3) To avoid running the whole of R CMD check ...
>
> R CMD R2pdf on a package source directory is what R CMD check uses.
>
When in directory just above that with optimx package in it:

R CMD Rd2pdf optimx

works quickly and well. Note Rd2pdf not R2pdf (I only noticed just now). I had