(***********************************************************************

                    Mathematica-Compatible Notebook

This notebook can be used on any computer system with Mathematica 4.0,
MathReader 4.0, or any compatible application. The data for the notebook 
starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do one of 
the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing the 
word CacheID, otherwise Mathematica-compatible applications may try to 
use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info@wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
***********************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[      9086,        282]*)
(*NotebookOutlinePosition[     12817,        400]*)
(*  CellTagsIndexPosition[     12490,        383]*)
(*WindowFrame->Normal*)



Notebook[{
Cell[TextData[{
  "Utilities",
  StyleBox["`", "MB"],
  "Package",
  StyleBox["`", "MB"]
}], "Subsection",
  CellTags->{"S6.12.1", "1.1"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"FindPackages[\\\\\\\"\\\",\
 \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"path\\\\\\\"\\\", \\\"TI\\\"]\\)\
\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                  
                  RowBox[{"\<\"give a list of files ending in \
\\!\\(\\*StyleBox[\\\"\\\\\\\"\\\\\\\\\\\\\\\".m\\\\\\\\\\\\\\\"\\\\\\\"\\\", \
\\\"MR\\\"]\\) for each directory in \"\>", 
                    StyleBox[\(p  a  t  h\),
                      "InlineFormula"], "\<\" (\"\>", 
                    StyleBox[\(p  a  t  h\),
                      
                      "InlineFormula"], "\<\" may be a single directory of a \
list of directories)\"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"FindPackages[\\\\\\\"\\\",\
 \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"path\\\\\\\"\\\", \\\"TI\\\"]\\)\
\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"pattern\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"give a list of packages containing the given string pattern (the \
string pattern should not look for the \\!\\(\\*StyleBox[\\\"\\\\\\\"\\\\\\\\\
\\\\\\\".m\\\\\\\\\\\\\\\"\\\\\\\"\\\", \\\"MR\\\"]\\))\"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S6.12.1", "1.2"}],

Cell[TextData[{
  "The ",
  StyleBox["FindPackages", "MR"],
  " function. "
}], "Caption",
  CellTags->"S6.12.1"],

Cell[TextData[{
  "The functions in this package are for searching and maintaining ",
  StyleBox["Mathematica", "TI"],
  " packages. ",
  StyleBox["FindPackages", "MR"],
  " will give a list of the packages available, in their context form (",
  StyleBox["e.g.", "TI"],
  ", ",
  StyleBox["\"Utilities`Package`\"", "MR"],
  ") or in a full path name form (",
  StyleBox["e.g.", "TI"],
  ", ",
  StyleBox["\"/usr/local/Mathematica/Packages/Standard/Utilities/Package.m\"",
     "MR"],
  ".) You can specify a list of directories to search. You can also specify a \
string pattern, or a list of patterns, to be matched. Note that a pattern \
should not try to match the ",
  StyleBox["\".m\"", "MR"],
  "; the function handles this. "
}], "Text",
  CellTags->{"S6.12.1", "1.3"}],

Cell["This loads the package.", "MathCaption",
  CellTags->{"S6.12.1", "1.4"}],

Cell["<<Utilities`Package`", "Input",
  CellLabel->"In[1]:= ",
  CellTags->"S6.12.1"],

Cell[TextData[{
  "This gives all packages whose names end in ",
  StyleBox["\"ca\"", "MR"],
  " for each directory in ",
  StyleBox["$Path", "MR"],
  ". Directories containing no packages fitting the pattern give empty lists. \
"
}], "MathCaption",
  CellTags->{"S6.12.1", "1.5"}],

Cell[CellGroupData[{

Cell["FindPackages[$Path, \"*ca\"]", "Input",
  CellLabel->"In[2]:= ",
  CellTags->"S6.12.1"],

Cell["{{}, {}, {}, {DiscreteMath`Combinatorica`}, {}}", "Output",
  CellLabel->"Out[2]= ",
  CellTags->"S6.12.1"]
}, Open  ]],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"FullPath\\\\\\\"\\\", \
\\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"->\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"True\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", \
"\<\"return full path names\"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S6.12.1", "1.6"}],

Cell[TextData[{
  "Option for ",
  StyleBox["FindPackages", "MR"],
  ". "
}], "Caption",
  CellTags->"S6.12.1"],

Cell["\<\
Here the same search is performed, but full path names are \
returned. \
\>", "MathCaption",
  CellTags->{"S6.12.1", "1.7"}],

Cell[CellGroupData[{

Cell["\<\
FindPackages[$Path, \"*ca\",
 FullPath -> True]\
\>", "Input",
  CellLabel->"In[3]:= ",
  CellTags->"S6.12.1"],

Cell["\<\
{{}, {}, {},
 {/usr/local/mathematica/AddOns/StandardPackages/
 DiscreteMath/Combinatorica.m},
 {}}\
\>", "Output",
  CellLabel->"Out[3]= ",
  CellTags->"S6.12.1"]
}, Open  ]],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Annotation[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"package\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", \("return a list of the keywords (as strings) in the annotation \
comment fields of the given package"\)},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Annotation[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"package\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"keyword\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"return the annotation comments that are tagged by \
\\!\\(\\*StyleBox[\\\"\\\\\\\"keyword\\\\\\\"\\\", \\\"TI\\\"]\\)\"\>"}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S6.12.1", "1.8"}],

Cell[TextData[{
  "The ",
  StyleBox["Annotation", "MR"],
  " function. "
}], "Caption",
  CellTags->"S6.12.1"],

Cell[TextData[{
  StyleBox["Mathematica", "TI"],
  " packages contain various annotative comments tagged with keywords. The ",
  StyleBox["Annotation", "MR"],
  " function allows you to discover what keywords are present in a package \
(or list of packages), then retrieve the actual annotation comments \
containing the keywords. This function recognizes a package name in either \
context form or as an explicit file name. "
}], "Text",
  CellTags->{"S6.12.1", "1.9"}],

Cell[TextData[{
  "This finds the annotative keywords in the ",
  StyleBox["Statistics`NonlinearFit`", "MR"],
  " package."
}], "MathCaption",
  CellTags->{"S6.12.1", "1.10"}],

Cell[CellGroupData[{

Cell["Annotation[\"Statistics`NonlinearFit`\"]", "Input",
  CellLabel->"In[4]:= ",
  CellTags->"S6.12.1"],

Cell[BoxData[
    \({"Title", "Context", "Name", "Author", "Summary", "Copyright", 
      "Package Version", "Mathematica Version", "History", "Keywords", 
      "Sources", "Discussion", "Warning", "Example", "Example", 
      "Example"}\)], "Output",
  CellLabel->"Out[4]= ",
  CellTags->"S6.12.1"]
}, Open  ]],

Cell[TextData[{
  "The string ",
  StyleBox["\"Mathematica", "MR"],
  " ",
  StyleBox["Version\"", "MR"],
  " is a useful keyword; it generally indicates the minimum release of ",
  StyleBox["Mathematica", "TI"],
  " required for a particular package."
}], "MathCaption",
  CellTags->{"S6.12.1", "1.11"}],

Cell[CellGroupData[{

Cell["\<\
Annotation[\"Statistics`NonlinearFit`\",
   \"Mathematica Version\"]\
\>", "Input",
  CellLabel->"In[5]:= ",
  CellTags->"S6.12.1"],

Cell[BoxData[
    \({"(* :Mathematica Version: 4.0 *)"}\)], "Output",
  CellLabel->"Out[5]= ",
  CellTags->"S6.12.1"]
}, Open  ]]
},
FrontEndVersion->"4.0 for X",
ScreenRectangle->{{0, 800}, {0, 600}},
WindowSize->{520, 455},
WindowMargins->{{140, Automatic}, {Automatic, 72}},
StyleDefinitions -> "HelpBrowser.nb"
]


(***********************************************************************
Cached data follows.  If you edit this Notebook file directly, not using
Mathematica, you must remove the line containing CacheID at the top of 
the file.  The cache data will then be recreated when you save this file 
from within Mathematica.
***********************************************************************)

(*CellTagsOutline
CellTagsIndex->{
  "S6.12.1"->{
    Cell[1717, 49, 138, 6, 70, "Subsection",
      CellTags->{"S6.12.1", "1.1"}],
    Cell[1858, 57, 1569, 30, 70, "Text",
      CellTags->{"S6.12.1", "1.2"}],
    Cell[3430, 89, 113, 5, 70, "Caption",
      CellTags->"S6.12.1"],
    Cell[3546, 96, 776, 20, 70, "Text",
      CellTags->{"S6.12.1", "1.3"}],
    Cell[4325, 118, 78, 1, 70, "MathCaption",
      CellTags->{"S6.12.1", "1.4"}],
    Cell[4406, 121, 85, 2, 70, "Input",
      CellTags->"S6.12.1"],
    Cell[4494, 125, 281, 8, 70, "MathCaption",
      CellTags->{"S6.12.1", "1.5"}],
    Cell[4800, 137, 93, 2, 70, "Input",
      CellTags->"S6.12.1"],
    Cell[4896, 141, 113, 2, 70, "Output",
      CellTags->"S6.12.1"],
    Cell[5024, 146, 547, 13, 70, "Text",
      CellTags->{"S6.12.1", "1.6"}],
    Cell[5574, 161, 111, 5, 70, "Caption",
      CellTags->"S6.12.1"],
    Cell[5688, 168, 134, 4, 70, "MathCaption",
      CellTags->{"S6.12.1", "1.7"}],
    Cell[5847, 176, 120, 5, 70, "Input",
      CellTags->"S6.12.1"],
    Cell[5970, 183, 173, 7, 70, "Output",
      CellTags->"S6.12.1"],
    Cell[6158, 193, 1110, 21, 70, "Text",
      CellTags->{"S6.12.1", "1.8"}],
    Cell[7271, 216, 111, 5, 70, "Caption",
      CellTags->"S6.12.1"],
    Cell[7385, 223, 470, 9, 70, "Text",
      CellTags->{"S6.12.1", "1.9"}],
    Cell[7858, 234, 175, 5, 70, "MathCaption",
      CellTags->{"S6.12.1", "1.10"}],
    Cell[8058, 243, 105, 2, 70, "Input",
      CellTags->"S6.12.1"],
    Cell[8166, 247, 299, 6, 70, "Output",
      CellTags->"S6.12.1"],
    Cell[8480, 256, 304, 9, 70, "MathCaption",
      CellTags->{"S6.12.1", "1.11"}],
    Cell[8809, 269, 141, 5, 70, "Input",
      CellTags->"S6.12.1"],
    Cell[8953, 276, 117, 3, 70, "Output",
      CellTags->"S6.12.1"]},
  "1.1"->{
    Cell[1717, 49, 138, 6, 70, "Subsection",
      CellTags->{"S6.12.1", "1.1"}]},
  "1.2"->{
    Cell[1858, 57, 1569, 30, 70, "Text",
      CellTags->{"S6.12.1", "1.2"}]},
  "1.3"->{
    Cell[3546, 96, 776, 20, 70, "Text",
      CellTags->{"S6.12.1", "1.3"}]},
  "1.4"->{
    Cell[4325, 118, 78, 1, 70, "MathCaption",
      CellTags->{"S6.12.1", "1.4"}]},
  "1.5"->{
    Cell[4494, 125, 281, 8, 70, "MathCaption",
      CellTags->{"S6.12.1", "1.5"}]},
  "1.6"->{
    Cell[5024, 146, 547, 13, 70, "Text",
      CellTags->{"S6.12.1", "1.6"}]},
  "1.7"->{
    Cell[5688, 168, 134, 4, 70, "MathCaption",
      CellTags->{"S6.12.1", "1.7"}]},
  "1.8"->{
    Cell[6158, 193, 1110, 21, 70, "Text",
      CellTags->{"S6.12.1", "1.8"}]},
  "1.9"->{
    Cell[7385, 223, 470, 9, 70, "Text",
      CellTags->{"S6.12.1", "1.9"}]},
  "1.10"->{
    Cell[7858, 234, 175, 5, 70, "MathCaption",
      CellTags->{"S6.12.1", "1.10"}]},
  "1.11"->{
    Cell[8480, 256, 304, 9, 70, "MathCaption",
      CellTags->{"S6.12.1", "1.11"}]}
  }
*)

(*CellTagsIndex
CellTagsIndex->{
  {"S6.12.1", 9711, 299},
  {"1.1", 11450, 346},
  {"1.2", 11544, 349},
  {"1.3", 11634, 352},
  {"1.4", 11723, 355},
  {"1.5", 11818, 358},
  {"1.6", 11914, 361},
  {"1.7", 12004, 364},
  {"1.8", 12100, 367},
  {"1.9", 12191, 370},
  {"1.10", 12281, 373},
  {"1.11", 12379, 376}
  }
*)

(*NotebookFileOutline
Notebook[{
Cell[1717, 49, 138, 6, 70, "Subsection",
  CellTags->{"S6.12.1", "1.1"}],
Cell[1858, 57, 1569, 30, 70, "Text",
  CellTags->{"S6.12.1", "1.2"}],
Cell[3430, 89, 113, 5, 70, "Caption",
  CellTags->"S6.12.1"],
Cell[3546, 96, 776, 20, 70, "Text",
  CellTags->{"S6.12.1", "1.3"}],
Cell[4325, 118, 78, 1, 70, "MathCaption",
  CellTags->{"S6.12.1", "1.4"}],
Cell[4406, 121, 85, 2, 70, "Input",
  CellTags->"S6.12.1"],
Cell[4494, 125, 281, 8, 70, "MathCaption",
  CellTags->{"S6.12.1", "1.5"}],

Cell[CellGroupData[{
Cell[4800, 137, 93, 2, 70, "Input",
  CellTags->"S6.12.1"],
Cell[4896, 141, 113, 2, 70, "Output",
  CellTags->"S6.12.1"]
}, Open  ]],
Cell[5024, 146, 547, 13, 70, "Text",
  CellTags->{"S6.12.1", "1.6"}],
Cell[5574, 161, 111, 5, 70, "Caption",
  CellTags->"S6.12.1"],
Cell[5688, 168, 134, 4, 70, "MathCaption",
  CellTags->{"S6.12.1", "1.7"}],

Cell[CellGroupData[{
Cell[5847, 176, 120, 5, 70, "Input",
  CellTags->"S6.12.1"],
Cell[5970, 183, 173, 7, 70, "Output",
  CellTags->"S6.12.1"]
}, Open  ]],
Cell[6158, 193, 1110, 21, 70, "Text",
  CellTags->{"S6.12.1", "1.8"}],
Cell[7271, 216, 111, 5, 70, "Caption",
  CellTags->"S6.12.1"],
Cell[7385, 223, 470, 9, 70, "Text",
  CellTags->{"S6.12.1", "1.9"}],
Cell[7858, 234, 175, 5, 70, "MathCaption",
  CellTags->{"S6.12.1", "1.10"}],

Cell[CellGroupData[{
Cell[8058, 243, 105, 2, 70, "Input",
  CellTags->"S6.12.1"],
Cell[8166, 247, 299, 6, 70, "Output",
  CellTags->"S6.12.1"]
}, Open  ]],
Cell[8480, 256, 304, 9, 70, "MathCaption",
  CellTags->{"S6.12.1", "1.11"}],

Cell[CellGroupData[{
Cell[8809, 269, 141, 5, 70, "Input",
  CellTags->"S6.12.1"],
Cell[8953, 276, 117, 3, 70, "Output",
  CellTags->"S6.12.1"]
}, Open  ]]
}
]
*)




(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)

