With respect, I believe Begin["`Private`"]
is acceptable, and perhaps preferable. Begin["Private`"]
establishes a context "Private`"
. This is fine, but if two packages do that they will share that context. Begin["`Private`"]
establishes context HNotation2`Private`
. This will be private to this package only.
The reason HTransR
appears to be undefined is that it is defined within context HNotation2`Private`
, which is not on the $ContextPath
-- it can be accessed by its full name as HNotation2`Private`HTranR
.
If you wish it to be accessible by its short nme, you could place a usage statement for it before Begin["`Private`"]
, or just define it there. Then it will be in the package context, which is placed on the context path when the package is loaded.
Begin["Private`"];
. Afterwards, you will findHTransR
in the context"HNotation2`Private`"
. Unless you let appear the symbolHTransR
already beforeBegin["Private`"];
, you have to refer to it byHNotation2`Private`HTransR
from outside that package. $\endgroup$Begin["`Private`"]
$\endgroup$Begin["HNotation2 `Private`"];
), but of course that is a bit redundant and error prone. Once again, sorry guys for the confusion caused by me. $\endgroup$