Tag Info

Hot answers tagged

23

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"]


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

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 = ...


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 ...


14

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 ...


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 -> ...


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 ...


11

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 ...


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

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

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

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

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 ...


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

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

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 ...


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.


6

This problem exists because WB encourages you to edit the .m file directly. If you created and edited an .nb (package) file -which automatically creates and updates a .m file - this problem (and others) would not exist. Indeed, if you work with the .nb (package) file you have all the cell organizational/styling facilities available. So when I recently ...


6

This is a solution to the problem that seems well-suited to our workflow, which draws on Albert Retey's answer and the answers to @István Zachar's question, but I may decide I hate it after I become more familiar with it. Its main drawbacks are that it requires a separate notebook file that you keep alongside the package file and (potentially) introduces ...


6

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 ...


6

Here's what I did in Workbench 2 to allow documentation editing and building using Mma 6. It's basically a fix for the version 6 half of Point 4 in the question. We need to work with files in the DocumentationTools folder -- in my installation the folder is located at ...


6

Actually this is documented; you need to look under More Information or Details and Options: Further, you should realize that levelspec has special meaning in that is it describes a format that is common to a number of functions. Levelspec is described in: Tutorial Some General Notations and Conventions Tutorial Levels in Expressions Documentation for ...


5

One possibility would be to define those formatted strings in their box form in the package files. It should be pretty straightforward to create boxes from your formatted expressions with ToBoxes and I think that result shouldn't suffer from the problems during copy and paste that you described. You could then use something like that for the definitions of ...


5

Indeed it seems there is a simpler way: Instead of ErrorListPlot[{{{x1, y1}, ErrorBar[err1]}, {{x2, y2}, ErrorBar[err2]}, ...}] Just do ErrorListPlot[{{x1, y1, dy1}, {x2, y2, dy2} ...}, ...}] Here is an example: Needs["ErrorBarPlots`"] ErrorListPlot[{{1, 2, 0.5}, {3, 4, 0.1}, {5, 6, 0}}, PlotRange -> All, Frame -> True, Axes ...


5

This is a workaround for point 3 in the question, making PacletInfo.m files for Mathematica 9 also work on 6. Due to a change in the PacletManager in Mathematica 9, PacletInfo files need an additional line in order for PacletManager to parse them completely. Here's an example: Paclet[ Name -> "xTras", Version -> "1.1.3", ...



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