1

I use roxygen2 to document my R package texreg. In the package, I define a generic S4 function called extract along with dozens of methods that enhance functionality from other R packages. In the documentation, I use the @family extract tag to create cross-references that appear under "See also" at the bottom of the respective help page of each method. Here is an example screenshot from the PDF manual that is automatically created:

enter image description here

As you can see, there are overfull boxes in the documentation, some even touching the page border. This in and of itself does not bother me too much (though obviously it does not look professional). But it happens on most of the 204 pages of the manual, and this leads to a giant log file. A consequence of this is that travis-ci no longer builds the package successfully on GitHub. It ends with the following log:

...

Overfull \hbox (25.84094pt too wide) in paragraph at lines 3987--4093
[][]\T1/zi4/m/n/10 extract,clm-method[][][]\T1/ptm/m/n/10 , [][]\T1/zi4/m/n/10 
extract,clmm-method[][][]\T1/ptm/m/n/10 , [][]\T1/zi4/m/n/10 extract,clogit-met
hod[][][]\T1/ptm/m/n/10 , [][]\T1/zi4/m/n/10 extract,coeftest-method[][][]\T1/p
tm/m/n/10 ,
 []

Overfull \hbox (55.84094pt too wide) in paragraph at lines 3987--4093
[][]\T1/zi4/m/n/10 extract,coxph-method[][][]\T1/ptm/m/n/10 , [][]\T1/zi4/m/n/1
0 extract,coxph.penal-method[][][]\T1/ptm/m/n/10 , [][]\T1/zi4/m/n/10 extract,c
oxreg-method[][][]\T1/ptm/m/n/10 , [][]\T1/zi4/m/n/10 extract,dynlm-method[][][
]\T1/ptm/m/n/10 ,
 []

Overfull \hbox (10.84094pt too wide) in paragraph at lines 3987--4093
[][]\T1/zi4/m/n/10 extract,ergm-method[][][]\T1/ptm/m/n/10 , [][]\T1/zi4/m/n/10
 extract,ets-method[][][]\T1/ptm/m/n/10 , [][]\T1/zi4/m/n/10 extract,fGARCH-met
hod[][][]\T1/ptm/m/n/10 , [][]\T1/zi4/m/n/10 extract,feglm-method[][][]\T1/ptm/
m/n/10 ,
 []

Overfull \hbox (15.84094pt too wide) in paragraph at lines 3987--4093
[][]\T1/zi4/m/n/10 extract,feis-method[][][]\T1/ptm/m/

The job exceeded the maximum log length, and has been terminated.

This is unfortunate because it doesn't just look ugly but also prevents automated testing of the package. How can I solve this problem, apart from the obvious choice of not using @family as it is intended (and hence limiting users' overview of the package functionality)?

Philip Leifeld
  • 2,253
  • 15
  • 24

0 Answers0