[Rd] Rdconv Rd->Ssgm doesn't convert aliases (PR#4838)

Tim.Keighley at csiro.au Tim.Keighley at csiro.au
Wed Oct 29 02:05:28 MET 2003


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]]



More information about the R-devel mailing list