When writing a Mathematica package MyPackage, with functions f1, f2 and f3, one can use the template:
BeginPackage["MyPackage`"];
f1::usage = "f1[] ....";
f2::usage = "f2[] ....";
Begin["`Private`"];
f1[]:= code for f1
f2[]:= code for f2
f3[]:= code for f3 (not visible as only in the private context)
End[];
EndPackage[];
My question is linked to the structuration of package. In fact, instead of having a lot of functions in a package, i would like to build subpackages with this kind of structure.
MyPackage
SubMyPackage1
Function1
Function2
SubMyPackage2
Function1
Function2
Function3
Function3
...
Can you help me to define a robust template to make and use a package with different levels of subpackages ?
Thanks a lot for your help.