Tag Info

Hot answers tagged

25

While trying to debug this issue myself, I stumbled across Todd Gayley's name in the source of one of the documentation .m files and contacted him directly. Todd was super great to work with---and at the end of an hour of screensharing he provided an easy workaround. The workaround essentially short-circuits one tiny feature of a normal documentation ...


17

Possibly this way: << PrimalityProving` ?PrimalityProving`* or alternatively (see the copy&paste issue in the comments) ?"PrimalityProving`*" See also the help under ref/Information, subsection "Generalizations & Extensions". In some cases you have to provide a string argument: Information["*Values"]


16

The function you are looking for is Documentation`HelpLookup["some input"]. This is the function that is executed when you hit F1 (after the front end figures out what is under the cursor).


15

I will answer the technical part of the question - namely, how to get the entire graph. How one would go about analyzing and visualizing it, is another story. This will open and parse a given guide notebook, and get the links to other notebooks: ClearAll[getLinks]; getLinks[file_] := With[{nb = NotebookOpen[file]}, With[{result = ...


15

As of Mathematica 9, multiple autocomplete templates are supported and the different templates are delimited by newlines. So for your example, you'll need to define them as: myfunc::usage = "foo[x,y,z] will combine x, y and z for you. foo[x,y,z,w] will be even better.";


15

Even though documentation indices built with Mathematica 8 or older are not compatible with Mathematica 9, indices built with 9 are compatible with 8 or older. And even though Mathematica 9 can choke up converting documentation notebooks, it has no problems generating documentation indices. So the workaround to points 1 and 4 in the question above is to ...


14

/: is the short-hand notation for TagSetDelayed, which is creating UpValues. It's useful for over-loading how a particular function behaves with a specific head. For example: In[1]:= h /: Plus[x : h[arg1_, arg2_], y : h[arg3_, arg4_]] := Plus[arg1, arg2, arg3, arg4] In[2]:= h[1, 2] + h[3, 4] Out[2]= 10 The benefit being you don't have to ...


13

Another possibility: << PrimalityProving` Names["PrimalityProving`*"] {CertificateDiscriminant, CertificateK, CertificateM, CertificateNextPrime, CertificatePoint, CertificatePrime, fact, HilbertPolynomial, ModularInvariantj, PointEC, PointECQ, PrimeQCertificate, PrimeQCertificateCheck, ProvablePrimeQ}


13

Using this webcrawler code from Wolfram site, and Guides page in online docs as the starting url: webcrawler[rooturl_, depth_] := Flatten[Rest[NestList[Union[Flatten[Thread[# -> Import[#, "Hyperlinks"]] & /@ Last /@ #]] &, {"" -> rooturl}, depth]]]; style = {VertexStyle -> White, VertexShapeFunction -> "Point", EdgeStyle -> ...


13

This is from Wolfram technical support: De-select Help > Internet Connectivity > "Allow Mathematica to access the Internet" and then try using the Documentation Center. If this fixes the hang then have them allow internet connectivity again and test the Documentation Center again. Finally, setting my proxy settings to "Direct connection to ...


12

The notebook DocumentationNavigator.nb has all the inter-dependencies built-in (they're arguments supplied to TreeBrowse`LoadVirtualCells and other undocumented functions that build up the documentation center. We can then parse the raw text contents of this notebook to pull out this list. I do that in the following, but I haven't restricted it solely to ...


12

Do you mean a list of functions ending in Q? ?*Q


11

This answer is intended to be progressively updated as I gain experience with this functionality myself. I assume you are using Wolfram Workbench and the documentation authoring tools it provides. As the documentation describes, you need to make sure that your package(s) are in a proper directory structure for a Mathematica application. You can do this by ...


11

I've always considered the "suitable for symbolic manipuation" line to be a bit of truth wrapped in marketing speak and not meant to mean anything mathematically precise. The documentation center guides and tutorials are good examples of hyperbole in technical documentation (see for instance, the opening lines in Mathematical Typesetting). Coming to the ...


11

Your g[1] and g[2] are simply acting as Head: g[1] := Plus; So there is no mystery in this syntax: {g[1][a, b], Plus[a, b]} {a + b, a + b} Head /@ {g[1][a, b], Plus[a, b]} {Plus, Plus} So you need to read: Head Everything Is an Expression But maybe there is a bit more to it than meets the eye. You actually almost wondered into ...


11

A Graphics object describes what amounts to a state-machine. Each object allowed in the primitive list has one of three actions associated with it add to state, display something while accounting for the current state, and save/restore state. Note, this can be modeled by a stack based system quite easily. According to the documentation, the first two ...


9

Names["*Graph*"] (* {"AcyclicGraphQ", ..... , "WheelGraph"} *) or Information["*Graph*"]


9

Thanks to @acl's link, I found the hot key combination: CtrlShift/, which launches the browser and navigates to the Mathematica documentation website.


9

According to the help page ref/menuitem/DocumentationCenter, the keyboard shortcuts to navigate one page backward or forward in Mathematica for OS X are ⌘ [ and ⌘ ] (or alternatively ⌥ ⌘ ← and ⌥ ⌘ → ), so you could use a third-party app like for example MagicPrefs to bind those keys to a trackpad gesture. For the sake of completeness, the corresponding ...


9

I'm going to answer this as I think it is helpful to gather multiple methods in one place, and such a list is not, as far as I know, easily found in the documentation. a = FactorInteger[269325]; (* sample data *) a[[All, 1]] First[a\[Transpose]] a.{1, 0} First /@ a # & @@@ a #[[1]] & /@ a All lines output: {3, 5, 7, 19}. a[[All, 1]] is I ...


9

Update: Thanks to Simon Woods comment below, 3 more are added to list. Now total is 21. I could not find complete list in one place. Over the years, I collected them from here and there in the docs. Looked at my cheat sheet now and I only see the list. (I should have written the document pages where I got there but did not). This is what I have so far, 18 ...


8

It is the same F1 key. If the cursor is anywhere in the name of the function adjacent to any function-name letter, then pressing F1 will bring the corresponding function documentation page. Mathematica 9 Context-Sensitive Input Assistant (or see this video) provide a set of useful options. For example this will appear as you type and clicking red-circled ...


8

You may also use Ctrl+Shift+K, or ⌘+Shift+K to insert a template with the basic syntax already filled in with named placeholders.


8

I made a little interactive thing ('reportPackages') that often proves helpful. It lives in my own utilities package: ?? reportPackages reportPackages::usage = "reportPackages produces a window with a SetterBar and a button. The SetterBar lists all currently linked Packages (from $Packages). The button produces a clickable ...


8

The simplest (and canonical) method is to place the keyboard cursor in the Symbol name, or select it with a double-click, and press F1 if you use Windows/Linux or Command-Shift-F if you use OS X. This will bring up the Help for that item. This also works with compound operators, e.g. /;. Nevertheless I like a challenge, therefore: $PreRead = # /. ...


7

Edit: Since my old approach with TeXForm turned out to be quite a bad idea, here is a new one that uses InputForm. It is much more stable and already correctly covers many, many symbols. Let's start with the code: usageString[s_Symbol] := Module[{string, rules = { "\\\"" ~~ a___ ~~ "\\\"" /; StringFreeQ[a, "\\"] :> a, "\"" ~~ a__ ~~ "\"" ...


7

This is a workaround for point 2 and 5 in the question, suppressing the "This notebook was created in a more recent version of Mathematica" dialog warnings and improving the rendering of the MORE INFORMATION button a bit. The idea here is to do an Ant search-and-replace after building the doc notebooks, replacing and removing the bits in the notebooks we ...


7

After some tinkering, I found an acceptable solution. The first step is to simply structure the application project in Workbench such that the top package mainPackage is not there, and merge all the sub-packages into myPackage. After building the package and documentation, which then more or less works out of the box, I can then place the package inside the ...


7

You could add a trap to Documentation`HelpLookup which is called when F1 is pressed: Unprotect[Documentation`HelpLookup]; Documentation`HelpLookup[link_String, nb_, lang_String, opts : OptionsPattern[]] := Block[{$inblock = True}, lookedup[link] = True; Documentation`HelpLookup[link, nb, opts]] /; ! TrueQ[$inblock] You can add whatever code ...


6

Just to add to Vitaliy's answer: You can see what happens with g[1] := Plus; FullForm /@ (g[1][3, 4] // Trace) So, on evaluating g[1][3,4], Mathematica looks up g[1] and sees it evaluates to Plus; it's then left with Plus[3,4] which evaluates to 7.



Only top voted, non community-wiki answers of a minimum length are eligible