[R] help files and vignettes

Ingmar Visser i.visser at uva.nl
Fri Apr 29 16:13:14 CEST 2005


Hi Uwe,
Thanks for that answer. However, one thing remains unclear, which latex file
do I use here, ie the one generated from Rdconv, or the one generated as an
intermediate step in Rd2dvi?
In the latter case, wouldn't I get a double \documentclass statement and the
like?
thanks in advance, ingmar


On 4/29/05 7:48 AM, "Uwe Ligges" <ligges at statistik.uni-dortmund.de> wrote:

> Ingmar Visser wrote:
>> Hi all,
>> I'm writing a vignette for my package, and I would like to include some of
>> the package help files in there as well. Is there an easy way of doing so?
>> I tried using R CMD Rdconv to generate latex files from .Rd files but I am
>> not sure how to include these into a .Rnw file (ie the vignette source). The
>> resulting file from Rdconv do not readily compile using latex ...
>> The other option I tried is to use R CMD Rd2dvi --no-clean etc which will
>> give me a latex'able file Rd2.tex, portions of which I can then include into
>> the vignette source file. However, this takes quite some time given that I
>> have 6 or so .Rd files. Especially when updating them, adding functions and
>> so forth, this process of generating the Rd2.tex files and then copying and
>> pasting into the vignette source is quite tedious.
>> In short, is there a faster way of doing this?
>> best, ingmar
> 
> 
> You can wrap the resulting LaTeX files in
> 
> \documentclass[a4paper]{article}
> \usepackage[ae]{Rd}
> \begin{document}
> 
> % \include{TheLaTeXFile}
> 
> \end{document}
> 
> 
> Relevant files (such as Rd.sty) are available in  .../pathToR/share/texmf
> 
> 
> Hence you can \input or \include it in any other LaTeX files, such as
> vignettes. And you can write Makefiles in order to process automatically.
> 
> Uwe Ligges

-- 
Ingmar Visser
Department of Psychology, University of Amsterdam
Roetersstraat 15, 1018 WB Amsterdam
The Netherlands
http://users.fmg.uva.nl/ivisser/
tel: +31-20-5256735




More information about the R-help mailing list