MathGroup Archive 2004

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47526] RE: [mg47499] Re: Adding hyperlinks to help browser files in function::usage
  • From: "Bobby" <drbob at bigfoot.com>
  • Date: Thu, 15 Apr 2004 03:39:44 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Here's the result of following instructions in Help for AuthorTools. The
notebook had been saved, BTW.

<<AuthorTools`
Notebooks[];
nb=%[[1]]

NotebookObject[\[LeftSkeleton]C:\Documents and Settings\All
Users\Application \
Data\Mathematica\Applications\DrBob\Documentation\English\Triangular \
Partition.nb\[RightSkeleton]]

MakeBrowserCategories[nb,"Full"]

NotebookSaveWarning::nbmod: The notebook must be saved to use the function \
MakeBrowserCategories.

$Aborted

OK, I played guess-the-problem and put that code in a DIFFERENT notebook,
and it worked (not that it did anything useful; I suppose I need to put a
bunch of tags in the document first). But couldn't Help say "Execute this
code from a separate notebook"?

Bobby R. Treat

StringReplace["lAWyerbillAtsmallfoot.com"//ToLowerCase,Rule@@@Reverse/@ToLow
erCase//@{{"dR","lAwyer"},{"@","AT"},{"bIg","small"},{"bOb","bill"}}]


-----Original Message-----
From: John Fultz [mailto:jfultz at wolfram.com] 
To: mathgroup at smc.vnet.net
Subject: [mg47526] Re: [mg47499] Re: Adding hyperlinks to help browser files in
function::usage

No, it wasn't pasted as garbage.  What I put in the message is precisely 
what, if typed into Mathematica, will work.  Try evaluating it.

To your other comment, for anybody who would like to author help files, I 
encourage you to check out AuthorTools (which comes with v5).  It has some 
tools which are helpful in this process.  Sure, even with AuthorTools, 
there are still some hurdles to overcome in the process, and we are looking 
into those, but I wanted to make sure to plug AuthorTools since the helpful 
functionality that is in there is slipping under a lot of people's radar, I 
suspect.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


On Wed, 14 Apr 2004 07:16:58 -0400 (EDT), Bobby R. Treat wrote:
> Your posted solution pastes as garbage into Mathematica, so could you
> show that to us in InputForm?
>
> Not for MY benefit, understand... I don't need to write my own Help
> files badly enough to put in the solid WEEK it would take to figure
> out how it's done. (If it's that involved and that undocumented
> because it's low priority, fine; I can live with that answer if you
> can.)
>
> The following link might help next time you want to paste code into
> e-mail (another common task that shouldn't be so hard!).
>
> http://groups.google.com/groups?q=copy+as+inputform+group:comp.soft-
> sys.math.mathematica&hl=en&lr=&ie=UTF-8&group=comp.soft-
> sys.math.mathematica&selm=bruqgf%24sv6%241%40smc.vnet.net&rnum=1
>
> Bobby
>
> John Fultz <jfultz at wolfram.com> wrote in message
> news:<c5gf9t$am8$1 at smc.vnet.net>...
>> 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: Adding hyperlinks to help browser files in function::usage
  • Next by Date: Re: Number to Binary
  • Previous by thread: RE: Re: Adding hyperlinks to help browser files in function::usage
  • Next by thread: Differential Equations