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). Clearly I can fix this by editing the tex file that is generated, but the build infrastructure would still get things wrong in automatic processing. So that gives rise to 3 questions: 1) How do I adjust the DESCRIPTION file to avoid too long a line (optimx uses a lot of other packages). I can add \cr elements to the Rd files to control those lines, but DESCRIPTION doesn't allow this. 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. 3) To avoid running the whole of R CMD check to rebuild the manual, do I need to dig into R CMD check to find the bits that just build the manual, or is there an option to Rd2pdf to do this? I've found how to process a list of files with Rd2pdf, but need to add the DESCRIPTION stuff. Best John Nash
overly long lines in pdf output of manual from package
3 messages · John C Nash, Brian Ripley
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). Clearly I can fix this by editing the tex file that is generated, but the build infrastructure would still get things wrong in automatic processing. So that gives rise to 3 questions: 1) How do I adjust the DESCRIPTION file to avoid too long a line (optimx uses a lot of other packages). I can add \cr elements to the Rd files to control those lines, but DESCRIPTION doesn't allow this.
Wrap lines? And is this R 2.14.0, as the issues are easier with the fonts used there?
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.
3) To avoid running the whole of R CMD check to rebuild the manual, do I need to dig into R CMD check to find the bits that just build the manual, or is there an option to Rd2pdf to do this? I've found how to process a list of files with Rd2pdf, but need to add the DESCRIPTION stuff.
R CMD R2pdf on a package source directory is what R CMD check uses.
Best John Nash
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
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
Thanks for quick reply. To help others I'll put in short comments in edited thread.
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 misunderstood the Rd2pdf manual about directories. My bad. JN