Tag Info

Hot answers tagged

33

Between Versions 7 and 8 Hash now gives the hash of a raw sequence of characters when applied to Strings. In past versions the string characters (quotation marks) were included in the calculation of the hash. (Reference) Use "\"" <> string <> "\"" before hashing if you want output to match older versions. \[Dash], \[LongDash] and ...


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


23

I use this function getList[name_String] := Module[{options, idx}, options = Names[name <> "`*"]; options = ToExpression /@ options; options = {#, Options[#]} & /@ options; idx = Range[Length[options]]; options = {#[[1]], TableForm[#[[2]]]} & /@ options; options = Insert[options[[#]], #, 1] & /@ idx; options = ...


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


16

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


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

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


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


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


12

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


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

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


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


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

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


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

Update 4: The code in this answer has been incorporated into @jkuczm's WWBCommon package. I encourage everyone creating cross-version documentation in Workbench to use it. This is a workaround for Point 5 in the question, allowing cross-version documentation to be built that fixes the layout and text problems in version 9 (and 10), while still displaying ...


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


8

Indeed, StringCases does not have an operator form in 10.0.1. The documentation and usage message appear to be in error. StringCases does not appear on the list TypeSystem`$OperatorForms -- although that is by no means conclusive as discussed here. I would argue that it should have an operator form, in symmetry with Cases. In any event, there is a bug ...



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