From Tim.Keighley at csiro.au  Wed Oct 29 02:05:28 2003
From: Tim.Keighley at csiro.au (Tim.Keighley@csiro.au)
Date: Wed Oct 29 02:04:23 2003
Subject: [Rd] Rdconv Rd->Ssgm doesn't convert aliases (PR#4838)
Message-ID: <200310290105.h9T15S0P001868@pubhealth.ku.dk>

Hi,

When using Rdconv to convert R documentation to S-PLUS SGML documentation,
the \name{} is converted to <s-topic> but the \alias{}es are not. Below is a
(crude) patch to fix this problem:

Compare: (<)D:\Apps\R\R-1.8.0\share\perl\R\Rdconv.pm.orig (88302 bytes)
   with: (>)D:\Apps\R\R-1.8.0\share\perl\R\Rdconv.pm (88481 bytes)

3188c3188,3197
<     $retval .= "<s-topics>\n
<s-topic>".$name."</s-topic>\n</s-topics>\n\n";
---
> 
>     $retval .= "<s-topics>\n  <s-topic>" . $name . "</s-topic>\n";
> 
>     my $alias;
>     for $alias (@aliases) {
>         next if ($alias eq $name);
>         $retval .= "  <s-topic>" . $alias . "</s-topic>\n";
>     }
>     $retval .= "</s-topics>\n\n";
> 

Note, this relies on the global variable @aliases. Perhaps this code should
be modified so that @aliases is passed into the Ssgm_functionhead function
as an argument.

I have not tested this extensively but it seems to work on the few small
tests I have done.

For the record I am using:

platform i386-pc-mingw32
arch     i386
os       mingw32
system   i386, mingw32
status
major    1
minor    8.0
year     2003
month    10
day      08
language R

Cheers,
Tim Keighley

PS. Please let me know if this is not the correct forum or format for this
type of report, or if you need any more information.

	[[alternative HTML version deleted]]


[Rd] Rdconv Rd->Ssgm doesn't convert aliases (PR#4838)
Tim.Keighley@csiro.au