From romain.francois at dbmail.com  Thu Sep 24 11:42:40 2009
From: romain.francois at dbmail.com (Romain Francois)
Date: Thu, 24 Sep 2009 11:42:40 +0200
Subject: [Rd] R v2.10.0: Doc clarification for cross references and
 where are we heading?
In-Reply-To: <4ABB3BA2.3020503@stats.uwo.ca>
References: <59d7961d0909231908q4ba58b99gdee28c1c49ffd6bc@mail.gmail.com>	<4ABADF79.9050106@stats.uwo.ca>	<971536df0909232021k2ba884fey43ae89fb5fe474be@mail.gmail.com>
	<4ABB3BA2.3020503@stats.uwo.ca>
Message-ID: <4ABB3F10.9040505@dbmail.com>

On 09/24/2009 11:28 AM, Duncan Murdoch wrote:
>
> On 23/09/2009 11:21 PM, Gabor Grothendieck wrote:
>> On Wed, Sep 23, 2009 at 10:54 PM, Duncan Murdoch
>> <murdoch at stats.uwo.ca> wrote:
>>> - Ways to link from man pages to vignettes. The reverse would be
>>> nice, but
>>> it's not possible with the current design, so that would be far off.
>>>
>>
>> If feasible I would like to be able to link to any text, html or pdf
>> file in the package. For example, it would be nice to be able to link
>> to the NEWS file and pdf files that are included in the package even
>> if they are not vignettes, etc.
>
> The \Sexpr mechanism probably allows this, though there are currently no
> built-in support functions to help you get there. As I mentioned, that
> could all be done by code in a contributed package.
>
> One way would be to have one help page which contains only
>
> \Sexpr[stage=render, results=rd]{generatePage()}
>
> and it will be 100% generated at render time, containing whatever you
> want it to contain. (Presumably you'll have some way to communicate what
> you want through variables that generatePage() can see.) Each time you
> link to it you'll see something different.
>
> Duncan Murdoch

Brilliant. Thanks. That solves my question as well.

I did not see results = documented in ?Rd2HTML, what is allowed ?
Is \Sexpr ignored when rendering other formats (tex, ...) ?
or is there a way (similar to #ifdef) to only provide some content to 
some renderers ?

Romain

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc
|- http://tr.im/yw8E : New R package : sos
`- http://tr.im/y8y0 : search the graph gallery from R



[Rd] R v2.10.0: Doc clarification for cross references and where are we heading?
Romain Francois