[Roxygen-devel] usage section and long equasions

meik michalke Meik.Michalke at uni-duesseldorf.de
Thu Feb 9 14:56:59 CET 2012


hi hadley,

Am Donnerstag, 9. Februar 2012 05:03:28 schrieb Hadley Wickham:
> > the first is regarding the automatically generated usage section. this
> > usally works great, except when an option is very long. some automatic
> > line breaks and additional indentation would be great here. see this
> > generated doc, page 70, on the function "readability":
> >  o http://r.reaktanz.de/pckg/koRpus/koRpus.pdf
> 
> This is a little tricky because it's hard (in general) to tell when
> whitespace matters (i.e. inside a string) and when it doesn't (between
> commas of a list).

sure, but couldn't roxygen2 just ignore spaces inside quotes, then? even if it 
didn't, there're obviously two alternatives: *possibly* seeing a line break to 
many in the PDF, or *definitely* not seeing most of the other options at all. 
i'd prefer it the first way ;-)

> > the second problem is similar and can be seen in the details section of
> > the same function, p. 71ff., this time regarding the documented
> > formulas. in theory LaTeX is capable of nicely displaying an equasion
> > over several lines, is there a way to get this into the Rd file via
> > roxygen2?
> 
> Can you introduce latex line breaks with \\ ?

no, line breaks are ignored in \deqn{}. to typeset this nicely, Rd files would 
need to support something like the LaTeX eqnarray environment. but i'm afraid 
we won't see that for a while:
 o http://bugs.r-project.org/bugzilla3/show_bug.cgi?id=13287
so this is not something which could be fixed by roxygen2, sorry for the fuzz.

the workaround is to use several \deqn{} calls for one equasion, but that of 
course looks pretty ugly. it would be really nice if both sides of the 
equasion could be aligned relative to the "=" sign, as eqnarray allows.


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  abt. f"ur diagnostik und differentielle psychologie
  institut f"ur experimentelle psychologie
  heinrich-heine-universit"at d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.r-forge.r-project.org/pipermail/roxygen-devel/attachments/20120209/97ce555c/attachment.pgp>


More information about the Roxygen-devel mailing list