I am trying to write documentation for a package I made, using Workbench. Let's say I have a function test
, first I write a usage message as:
usage::test = "Description of test."
This is located in the .m file, outside of the private context.
Then using workbench I create a documentation page for this symbol.
Having done this, and after building the documentation and deploying the package, this documentation page for test
is indeed accessible through the standard documentation menu by searching for test
.
However, what I have been unable to do is to get a link to this page when evaluating ?test
, as the built-in functions have, something like:
?test
(*Description of test. >> *)
I have also tried with the ApplicationMaker package, where it does work. However, before moving everything there I'd like to know if there's a simple fix for Workbench.
edit: I've tried editing the PacletInfo.m, to read:
Paclet[
Name -> "testPackage",
Version -> "0.0.1",
MathematicaVersion -> "9+",
Extensions -> {
{
"Kernel",
Context->{"testPackage`"}
},
{
"Documentation",
Resources->{"ReferencePages/Symbols/test"},
Language -> "English",
LinkBase->"testPackage"
}
}
]
(Compared to what Workbench creates, I added the "Kernel"
extension, the Resources
and the LinkBase
)
But this doesn't fix the problem.
PacletInfo.m
has proper "Documentation" and "Kernel"Extensions
. By default Workbench (at least version 2) createsPacletInfo.m
file that doesn't have sufficientExtensions
for Mathematica versions 9+. $\endgroup$<< testPackage
` it doesn't work, but when I load it withNeeds["testPackage
"] it does work, and any subsequent time I load it with<< testPackage
` it now does work, even in a new Mathematica session. This is in Mathematica 11, OSX. Anyway it does work now, so thanks :) $\endgroup$