Tim.Keighley@csiro.au
2003-Oct-29 02:04 UTC
[Rd] Rdconv Rd->Ssgm doesn't convert aliases (PR#4838)
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]]
Reasonably Related Threads
- R CMD Rdconv file.Rd --type=Ssgm \code{x} should use <code> (PR#8290)
- Rdconv --type=Ssgm drops singleton keywords (PR#9051)
- Problems with R CMD Rdconv and R CMD Sd2Rd (PR#8661)
- R CMD Rdconv drops sections: arguments, seealso, examples (PR#9649)
- R CMD Rdconv drops sections: arguments, seealso, examples (PR#9645)