[Rd] translation with Rd.sty, Sweave and tex4th (PR#8016)

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Tue Jul 19 15:05:29 CEST 2005


Why not report this as a bug *in tex4th* that conflicts with R?  LaTeX has 
no namespaces, and unfortunately name conflicts are common.  Doing as you 
suggest and allowing one package to clobber another is much worse.

On Tue, 19 Jul 2005 paulojus at est.ufpr.br wrote:

> Full_Name: Paulo Ribeiro
> Version: 2.1-1
> OS: Debian Linux
> Submission from: (NULL) (200.103.144.24)
>
>
> I'm using Sweave with tex4th to generate xhtml documents
> from documents created using Sweave which include \usepackage{Rd}
> in the preamble
>
> However there seems to be a problem with \Link defined in
> Rd.sty, since this is also defined in tex4ht.sty
>
> My workaround was to replace the lines with
> \newcommand{\Link} by \providecommand{\Link}
> in Rd.sty
>
> I'm therefore wondering whether this is the best solution, if there is any
> other
> and, if so, whether this could be modified in the original Rd.sty shipped with
> R.
>
> A possible inconvenient of the suggested above
> is that \providecommand seems to be specific to
> LaTeX and apparently does not work with TeX.

Nor does \newcommand.  It is part of LaTeX's extra care in finding 
conflicting definitions.

> Another possibility, as suggested by Kurt, would be "emulate" namespaces
> with something of the type \Rd at Link

Really a general-purpose package like tex4th should be doing that, not R. 
As many R installations have lots of prebuilt latex files installed, 
changing R's macros can only be done for 3.0.0.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list