How to list all functions in a package? [duplicate]

This question already has an answer here:

Listing the functions defined in a package

3 answers

I got a package which can be loaded in MMA. The manual for the package does not give demonstrations of all functions/commands. Hoe can i find all the commands in the package?

=================

=================

1 Answer
1

=================

Once you’ve loaded the package in with Needs then you can find all the included functions using Names with a wildcard:

Needs[“VariationalMethods`”]
Names[“VariationalMethods`*”]

(* {“EulerEquations”, “FirstIntegral”, “FirstIntegrals”,
“NVariationalBound”, “VariationalBound”, “VariationalD”} *)

or

Needs[“PolyhedronOperations`”]
Names[“PolyhedronOperations`*”]

(* {“Geodesate”, “OpenTruncate”, “Stellate”, “Truncate”} *)

This works with user-installed packages as well, like MaTeX

Needs[“MaTeX`”]
Names[“MaTeX`*”]
(* {“BlackFrame”, “ClearMaTeXCache”, “ConfigureMaTeX”, “MaTeX”} *)

You can even use it to see the private function names, here again on a user-defined package, but this one is likely to give a long list, giving any variables that are defined within scoping constructs like Module in the package,

Needs[“DivergentColorMaps`”]
Names[“DivergentColorMaps`*”]
Names[“DivergentColorMaps`Private`*”]
(* {“CoolToWarm”, “DivergentColorFunc”, “DivergentColorScheme”, “DivergentMaps”} *)

(* {“DivergentColorMaps`Private`a”,
“DivergentColorMaps`Private`adjusthue”,……
“DivergentColorMaps`Private`rgb2msh”,
“DivergentColorMaps`Private`rgb2xyz”, ……….
“DivergentColorMaps`Private`z”, “DivergentColorMaps`Private`zi”, \
“DivergentColorMaps`Private`z$”} *)