(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 8.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[      4608,        205]
NotebookOptionsPosition[      2944,        143]
NotebookOutlinePosition[      3402,        161]
CellTagsIndexPosition[      3359,        158]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Package Template", "Section",
 InitializationGroup->True],

Cell[TextData[{
 "Support for ",
 StyleBox["Programming with Mathematica: An Introduction.",
  FontSlant->"Italic"],
 " Cambridge University Press, 2012."
}], "Text"],

Cell[CellGroupData[{

Cell["BeginPackage", "Subsection"],

Cell[BoxData[
 RowBox[{"BeginPackage", "[", "\"\<packageName`\>\"", "]"}]], "Input"]
}, Open  ]],

Cell[CellGroupData[{

Cell["\<\
Usage messages for public functions\
\>", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"functionName", "::", "usage"}], "=", 
   "\"\<functionName[x] computes the\[Ellipsis]\>\""}], ";"}]], "Input"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Warning messages", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"functionName", "::", "messname"}], "=", 
   "\"\<Argument `1`\[Ellipsis]\>\""}], ";"}]], "Input"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Options", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Options", "[", "functionName", "]"}], "=", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"opt1", "\[Rule]", "value1"}], ",", 
     RowBox[{"opt2", "\[Rule]", "value2"}]}], "}"}]}], ";"}]], "Input"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Private context", "Subsection"],

Cell[BoxData[
 RowBox[{"Begin", "[", "\"\<`Private`\>\"", "]"}]], "Input"]
}, Open  ]],

Cell[CellGroupData[{

Cell["\<\
Function definitions (public and private)\
\>", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"functionName", "[", "x_", "]"}], ":=", "\[Ellipsis]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"fun", "[", 
   RowBox[{"x_", ",", "y_"}], "]"}], ":=", "\[Ellipsis]"}]], "Input"]
}, Open  ]],

Cell[CellGroupData[{

Cell["End private context", "Subsection"],

Cell[BoxData[
 RowBox[{"End", "[", "]"}]], "Input"]
}, Open  ]],

Cell[CellGroupData[{

Cell["EndPackage", "Subsection"],

Cell[BoxData[
 RowBox[{"EndPackage", "[", "]"}]], "Input"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Examples", "Section"],

Cell["Load package:", "Text"],

Cell[BoxData[
 RowBox[{"<<", "packageName`"}]], "Input"],

Cell["\<\
Test usage message for functions:\
\>", "Text"],

Cell[BoxData[
 RowBox[{"?", "functionName"}]], "Input"],

Cell["\<\
Exercise the functions and options for the functions:\
\>", "Text"],

Cell[BoxData[
 RowBox[{"functionName", "[", "x", "]"}]], "Input"]
}, Open  ]]
},
WindowSize->{740, 867},
WindowMargins->{{512, Automatic}, {Automatic, 110}},
Magnification:>FEPrivate`If[
  FEPrivate`Equal[FEPrivate`$VersionNumber, 6.], 1.25, 1.25 Inherited],
FrontEndVersion->"8.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (October 5, \
2011)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[579, 22, 63, 1, 83, "Section",
 InitializationGroup->True],
Cell[645, 25, 166, 5, 32, "Text"],
Cell[CellGroupData[{
Cell[836, 34, 34, 0, 42, "Subsection"],
Cell[873, 36, 84, 1, 33, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[994, 42, 65, 2, 42, "Subsection"],
Cell[1062, 46, 157, 4, 33, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[1256, 55, 38, 0, 42, "Subsection"],
Cell[1297, 57, 144, 4, 33, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[1478, 66, 29, 0, 42, "Subsection"],
Cell[1510, 68, 242, 7, 33, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[1789, 80, 37, 0, 42, "Subsection"],
Cell[1829, 82, 74, 1, 33, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[1940, 88, 71, 2, 42, "Subsection"],
Cell[2014, 92, 100, 2, 33, "Input"],
Cell[2117, 96, 116, 3, 33, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[2270, 104, 41, 0, 42, "Subsection"],
Cell[2314, 106, 51, 1, 33, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[2402, 112, 32, 0, 42, "Subsection"],
Cell[2437, 114, 58, 1, 33, "Input"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[2544, 121, 27, 0, 83, "Section"],
Cell[2574, 123, 29, 0, 32, "Text"],
Cell[2606, 125, 56, 1, 33, "Input"],
Cell[2665, 128, 57, 2, 32, "Text"],
Cell[2725, 132, 55, 1, 33, "Input"],
Cell[2783, 135, 77, 2, 32, "Text"],
Cell[2863, 139, 65, 1, 33, "Input"]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
