Skip to content
Prev 15061 / 63421 Next

link to an alias in another package

On Tue, 8 Feb 2005 07:18:28 +0000 (GMT), Prof Brian Ripley
<ripley@stats.ox.ac.uk> wrote :
This is not a bug, but is it a design flaw?  The problem is that Paul
wants to refer to the documentation for promax.  Currently that's in
the varimax topic, but if someone were to split the topics, that
wouldn't be true any more: and then Paul's link would point to the
wrong place.

It is inconsistent that \link{foo} looks for the alias foo, but
\link[pkg]{foo} and \link[pkg:foo]{bar} look for the topic foo.

It is probably impossible to implement links to aliases perfectly
(e.g. if pkg is unavailable at the time the .html file for Paul's
topic is being built, it's not clear what the link should be), but 
doing at least as well as \link{foo} does would take very little work.
The algorithm could be:

 - attempt to look up the alias foo in pkg.  If that succeeds, use the
resulting topic in the link.
 - if pkg exists but the lookup fails, that's an error.
 - if the lookup fails because pkg does not exist, print a warning, 
and create a link as though the alias is a topic.

This would mean \link[stats]{promax} would be fine, and would survive
the addition of a promax topic to another package, or the splitting of
promax out of the varimax topic.
Duncan Murdoch