3
$\begingroup$

Installing Package into $UserBaseDirectory or $BaseDirectory means automatic loading of the documentation (after calling the Package).

However, when I installed a Package into different directory (the directory is add to the $Path) the documentation is not loaded after calling the Package using Needs.

Any idea how to solve this issue?

$\endgroup$
6
  • 1
    $\begingroup$ Add documentation extension to paclet.m file, should work. And the directory // PacletDirectoryAdd. $\endgroup$
    – Kuba
    Mar 24, 2017 at 15:45
  • $\begingroup$ @CarlWoll yes it does. $\endgroup$ Mar 24, 2017 at 15:55
  • $\begingroup$ @Kuba, can't get your idea. more explanation is needed :) $\endgroup$ Mar 24, 2017 at 15:56
  • 1
    $\begingroup$ Analogously to mathematica.stackexchange.com/a/120976/5478 for more info search pacletinfo.m documentation project here. $\endgroup$
    – Kuba
    Mar 24, 2017 at 15:59
  • $\begingroup$ @Kuba, I see. I am using Workbench but I will look at your link and work on the pacletinfo.m itself. Thanks $\endgroup$ Mar 24, 2017 at 16:02

1 Answer 1

3
$\begingroup$

Add the directory containing the package directory to the paclet path.

PacletDirectoryAdd["/dir/to/my/pack"]

assuming that PacletInfo.m is contained within /dir/to/my/pack/PackageName.

This is not permanent. It lasts only until the end of the session.

$\endgroup$
3
  • $\begingroup$ One could put this in init.m if permanence is wanted, no? $\endgroup$ Mar 24, 2017 at 16:59
  • $\begingroup$ @J.M. That would be the thing to try, but I do not know if: (1) there's a better way (2) PacletDirectoryAdd is safe to use during initialization. $\endgroup$
    – Szabolcs
    Mar 24, 2017 at 18:55
  • $\begingroup$ @J.M. I rather add this line before BeginPackage so that it is added only when it is loaded. Not the best way though. $\endgroup$
    – Kuba
    Mar 24, 2017 at 21:14

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.