Display Documentation From Function
I haven't figured out how to do this without having the documentation pop up for a second but this is the basic idea.
doc[i_] := (
n = Documentation`HelpLookup[i]; nG = NotebookGet[n];
NotebookClose[n];
CellPrint@Replace[nG, Notebook[{x___}, y___] :> {x}]
);
doc["Print"]
This should be a good starting point:
nb = Import@Documentation`ResolveLink["NSolve start:1"];
Cases[nb, Cell[___, "SearchResultCell", ___], Infinity]
There's no popup. start:1
causes this to get the first page of search results (instead of going directly to the NSolve
page).
In v10.1 or later, use
NotebookImport[
Documentation`ResolveLink["NSolve start:1"],
"SearchResultCell"
]