Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2010

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

Search the Archive

How to bring up specific doc page programmatically?

  • To: mathgroup at
  • Subject: [mg114325] How to bring up specific doc page programmatically?
  • From: kj < at>
  • Date: Wed, 1 Dec 2010 02:10:57 -0500 (EST)

Is there a way to bring up a specific documentation page
programmatically?  IOW, is there some Mathematica expression whose
evaluation would cause some specific Documentation Center page
(e.g., the one for tutorial/Operators) to come come up? (BTW,
tutorial/Operators here is just a random example; I want to be able
to do this for any arbitrary documentation page, or indeed any
string, as one would type it in the location bar of the documentation

This is the best I've managed so far:

PopDoc[s_] := Module[{nb},
  nb = First@Notebooks[];
  NotebookWrite[nb, s, All];
  NotebookWrite[nb, "", All];

Evaluating PopDoc["tutorial/Operators"] does indeed bring up the
corresponding doc page, but the process has two problems: 1) it
clutters the notebook with an unnecessary cell; and 2) it BEEPS.
I can live with the clutter, but the beep drives me nuts.

Both problems are related to the fact that the only way I have
found to bring up a doc page programmatically requires that the
notebook's current selection be set to the string representing the
page (e.g.  "tutorial/Operators").  This is what causes the first
problem (the unnecessary cell is where the this dummy selection
gets placed).  The second problem occurs when I wipe out the dummy
selection.  Help > Why the Beep? says that

  There is a problem with the position of the text insertion point.
  The insertion point might not be where you intended.

The optimal solution, of course, would be a way to bring up the
desired page without having to fiddle with the selection at all.
That would solve both problems in one swoop.  The next best solution
would be a way to set the selection that is invisible to the user,
so that no extra cells get created, and there's no need to wipe
out the dummy selection.  Absent any of these alternatives, I'd
settle for some way to turn off the beeping (or even just muting
the volume just long enough to make the beep inaudible). 



  • Prev by Date: Re: Why ParallelTable does not use CUDA
  • Next by Date: Re: multiple outputs from compiled function
  • Previous by thread: Re: Why ParallelTable does not use CUDA
  • Next by thread: Re: How to bring up specific doc page programmatically?