• To: mathgroup at smc.vnet.net
• From: "J. McKenzie Alexander" <jalex at lse.ac.uk>
• Date: Sat, 10 Apr 2004 02:01:19 -0400 (EDT)
• References: <c527dc\$dtu\$1@smc.vnet.net> <200404090845.EAA03148@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```I have a question regarding the interaction between usage notes for
user-defined functions and custom help documents written for inclusion
in the Mathematica help browser.

As you all know, the usage notes for a built-in function like Abs have
the form

"Abs[z] gives the absolute value of the real or complex number z.
More..."

where the "More..." is a hyperlink that, when clicked on, takes you to
the appropriate help page.

Looking at the actual definition of Abs::usage, though, reveals that
the hyperlink isn't part of the usage notes.  In
/Applications/Mathematica
5.0.app/SystemFiles/Kernel/TextResources/English/Usage.m (I'm running
OS X) it is defined as:

Abs::usage = "Abs[z] gives the absolute value of the real or complex
number z.";

So the hyperlink is being added automatically some way.  How?  And what
is the "proper" way to get this behaviour for the usage notes of
functions I define in packages I write?

After a lot of poking around, the only solution I've found (which is
hardly elegant) is to do the following.  Assuming that HexGraph.nb is

HexGraph::usage="HexGraph[cols, rows] creates a hexagonal lattice
having cols 'columns' and rows 'rows'. Setting the option
EqualColumnHeights->False indicates that only odd numbered columns
should have the specified number of rows.
>\"HexGraph\"]\)";

I suspect, though, given the definition of Abs::usage, that adding the
hyperlink can be automated in some way when the help files are built or
installed in the browser.

Cheers,

Jason
--
Dr J. McKenzie Alexander
Department of Philosophy, Logic and Scientific Method
London School of Economics and Political Science
Houghton Street, London WC2A 2AE

```

• Prev by Date: Re: Strongly connected digraph
• Next by Date: Re: Two speed challenges
• Previous by thread: RE: Errors with decimal addition in Mathematica 5.0