Georgi Boshnakov
2011-Jan-10 21:16 UTC
[Rd] overfilled signature lines in documentation shell for methods
The documentation shells created by the utility functions for classes and methods contain section "Methods". Due to a slight difference in the layout and the underlying Rd code, function signatures are wrapped on the following line (if necessary) in the "methods" section in a class description (xxx-class.Rd) but not in xxx.-methods.Rd. As a result long signatures may overfill lines or go off the page. For example, some entries for "[<-" are wrapped on two lines in 'Matrix-class.Rd' below and do not overfill the line, while in the second case they do.> library(Matrix) > promptClass("Matrix")A shell of class documentation has been written to the file 'Matrix-class.Rd'.> promptMethods("[<-",file="proba.Rd")A shell of methods documentation has been written to the file 'proba.Rd'. The syntax is very similar in both cases and uses \item{}{}, except that in the case of class the first argument is the function name (printed in bold). The signature is put in the second argument together with the explanation of the method. In the "methods" case, the function name is redundant and not included, the signature is put in the first argument, and the explanation in the second. The first argument of \item is not justified but the second is, hence the difference. A simple fix (if needed) for the methods case might be to leave the first argument empty and put everything in the second, e.g. \item{}{signature(x = "numeric",y = character, ....): this method ...}. Georgi -- Dr Georgi Boshnakov tel: (+44) (0)161 306 3684 School of Mathematics fax: (+44) (0)161 306 3669 Alan Turing Building 1.125 The University of Manchester email: Georgi.Boshnakov at manchester.ac.uk Oxford Road Manchester M13 9PL UK