Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Adding hyperlinks to help browser files in function::usage

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47537] Re: Adding hyperlinks to help browser files in function::usage
  • From: Mike <m.HoneychurcNOSPAMh at uq.edu.au>
  • Date: Thu, 15 Apr 2004 03:40:36 -0400 (EDT)
  • Organization: University of Queensland
  • References: <c5gf9t$am8$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On a related subject I recently asked tech support why extra formatting is
generated which overrides (or adds to) the stylesheet configuration for
Print output.

Eg. 

1. Select the default (or any actually) stylesheet.

2. open it and have a look at the setting for Print cells.

3. now open a notebook and type ?*List* then press enter.

4. note the output. Use show expression to have a look at what has been
generated.

5. Extra cell options have been added.

6. why?  What is the point of setting a stylesheet if the system
automatically overrides or adds to the style?

7. tech support advise that you have to manually remove the extra options
that have been added. You cannot automatically remove this or prevent this
from occurring.

8. this is crazy.

Mike



On 13/4/04 8:27 PM, in article c5gf9t$am8$1 at smc.vnet.net, "John Fultz"
<jfultz at wolfram.com> wrote:

> As fascinating as the idea is that I work in a grand conspiracy covering up
> Knowledge Mankind Was Not Meant To Know (maybe working next door to Elvis),
> the actual reasons for information like this not being available is usually
> much more boring and involves priorities, resources, and deadlines.
> 
> The More button is coded up in the DownValues for Information.  But
> changing that code isn't a good idea since your code may break when moved
> to a different version of M--.  I like the idea of writing a function which
> generates the messages in the style you already outlined below.
> 
> MakeMyUsageMessage[symbol_, string_] := (symbol::usage =
>  string <> 
>   " \!\(\*ButtonBox[\(More?\),ButtonStyle->\"AddOnsLink\",ButtonData:>\""
>   <> ToString[symbol] <> "\"]\)")
> 
> 
> MakeMyUsageMessage[HexGraph,
> "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."];
> 
> Sincerely,
> 
> John Fultz
> jfultz at wolfram.com
> User Interface Group
> Wolfram Research, Inc.
> 
> 
> On Sun, 11 Apr 2004 04:44:05 -0400 (EDT), Bobby R. Treat wrote:
>> Wolfram clearly doesn't want us to know such tricks, my friend. It's a
>> bit like that "tree of the knowledge of good and evil", maybe.
>> 
>> Bobby
>> 
>> "J. McKenzie Alexander" <jalex at lse.ac.uk> wrote in message
>> news:<c582lt$nos$1 at smc.vnet.net>...
>>> 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
>>> installed under "Add-Ons & Links" in the help browser, define
>>> 
>>> 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.
>>> \!\(\*ButtonBox[\(More?\),ButtonStyle->\"AddOnsLink\",ButtonData:
>>>> \"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
> 


  • Prev by Date: RE: Re: Regarding a 3D plot in mathematica
  • Next by Date: RE: Re: Adding hyperlinks to help browser files in function::usage
  • Previous by thread: Re: Adding hyperlinks to help browser files in function::usage
  • Next by thread: RE: Re: Adding hyperlinks to help browser files in function::usage