


On 5/11/11 3:13 PM, "Dan Tenenbaum" <dtenenba@fhcrc.org> wrote:

> On Wed, May 11, 2011 at 12:08 PM, Sean Robert McGuffee
> <sean.mcguffee@gmail.com> wrote:
>> Hi,
>> Išm trying to figure out how to put images into my packagešs help
>> documentation. Išve gotten to the point where I can put the images in the
>> /inst/doc/ directory. I have also gotten to the point where I have package
>> checks without any warnings. I couldnšt find the terms łpicture,˛ łimage,˛
>> or łgraphic˛ in a text search within the Writing R Extensions: 2 Writing R
>> documentation files
>> <http://cran.r-project.org/doc/manuals/R-exts.html#Writing-R-documentation-f
>> iles>
>> I tried a couple of LaTeX guesses, but they lead to the following errors on
>> check:
>> Warning: /LAB/SRM/PROGS/R_PACKAGES/Ralign/man/Ralign139.Rd:3: unexpected
>> UNKNOWN '\usepackage'
>> Warning: /LAB/SRM/PROGS/R_PACKAGES/Ralign/man/Ralign139.Rd:36: unknown macro
>> '\includegraphics'
>> What is the right way to do this?
>> Thanks,
>> Sean
>> 
> 
> Given a graphics file called foo.png, you can include it in a vignette
> as follows:
> \includegraphics[width=0.5\textwidth]{foo}

I've tried adding this in a man/*.Rd file, but I get the following warning:
Warning: /LAB/SRM/PROGS/R_PACKAGES/Ralign/man/Ralign139.Rd:16: unknown macro
'\includegraphics' 
In particular, I put
\includegraphics{../doc/Sean.jpg}
inside a \details{} section.
It seems that the term "vignette" may somehow be different than the man/*.Rd
files. As is somewhat typical of the R documentation, there is a whole
section on 1.4 Writing package vignettes without a definition of "vignette"
as far as I can tell. I want to clarify that I'm trying to put the images in
a file that will come up when I type ??myPackageName or
library(myPackageName);help(myPackageName).
I'm not sure if that's the same as a vignette or not, but either way, that
command isnšt working inside the file I want to put the images in. Right now
the help command brings up my man/*.Rd files, which seem to be in LaTeX with
the exception of not handling much of what is written about LaTeX formats
from Google searches. First of all, are vignettes the same or different than
the man/*.Rd files? Secondly, is it possible to show an images inside the
man/*.Rd files? I think I started using man/*.Rd files because they were
part of what a package skeleton started me with. I literally have everything
I need working in man/*.Rd files except image references. Do I have to learn
about vignettes now after all that work to get the man/*.Rd files going? Išm
so confused. It seems like there should be something like the \link{}
command that simply shows an image inside the man/*.Rd files.

> http://amath.colorado.edu/documentation/LaTeX/reference/figures.html
> Dan
> 
> 
>> 
>> ______________________________________________
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>> 


	[[alternative HTML version deleted]]

