5
$\begingroup$

If one evaluates ?GoochShading, the output is some info about the function as well as links to its documentation:

popup

One can click the circled i or the Local » link to open the documentation for it. How can I write that link which opens local docs in text or a Hyperlink? I'm going to self answer about the Local » link, but is the circled i link the same?

$\endgroup$
1

2 Answers 2

6
$\begingroup$

You may use WolframLanguageData.

To get a formatted hyperlink.

doclink = WolframLanguageData["GoochShading"]["WolframDocumentationLink"]

To view the InputForm

InputForm[doclink]
Hyperlink["GoochShading", "paclet:ref/GoochShading"]

Hope this helps.

$\endgroup$
4
$\begingroup$

I was going to use FullForm to see the link used in the InformationData result, but apparently that's not necessary: Information[GoochShading,"Documentation"] yields

<|
"Local" -> "paclet:ref/GoochShading", 
"Web" -> "http://reference.wolfram.com/language/ref/GoochShading.html"
|>

and Hyperlink@"paclet:ref/GoochShading" works to open the docs. Now I can both pester people to search the docs themselves, and actually point them to specific doc pages.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.