(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of 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[ 7959, 220]*) (*NotebookOutlinePosition[ 8625, 244]*) (* CellTagsIndexPosition[ 8581, 240]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " Pearls: Problems and Solutions" }], "Title"], Cell["\<\ The editor discovers new problems and solutions while usingVersion \ 3.0's palettes to construct a notebook of probability simulations.\ \>", "Subsubtitle"], Cell[CellGroupData[{ Cell["Edited by Don Piele", "Section"], Cell[TextData[{ "I have to agree palettes are cool, and the ones that come configured with \ ", StyleBox["Mathematica", FontSlant->"Italic"], " 3.0 are very useful. But when I tried to think how I would use them in my \ notebooks, I made many false starts. Sure, it is a snap to make a palette \ with the", StyleBox[" ", FontWeight->"Bold"], "Input > Create > Table/Matrix/Palette command. But you need to have a good \ reason to build one. It is easy to do: Will it really add something to the \ notebook? \n\n\tRecently I have been re-writing some simulations in \ introductory probability to go with the college-level manuscript ", StyleBox[" Introduction to Probability", FontSlant->"Italic"], " by Snell and Grinstead, soon to be published by the American \ Mathematical Society. I wrote and tested the programs in ", StyleBox["Mathematica", FontSlant->"Italic"], " 2.2.2. When Version 3.0 became available, I converted them and began \ looking for ways to apply the new 3.0 features." }], "InlineFormula"] }, Open ]], Cell[CellGroupData[{ Cell["Outlining", "Section"], Cell["\<\ The first feature I went after was outlining, found in the Option \ Inspector in its pull-down menu. Here the triangles that appear in the left \ margin let you close and open the items that are nested beneath it. To do \ this you open the Options Inspector under Format and select the Show option \ value for Notebook. Now select Cell Options > Display Options > \ ShowGroupOpenCloseIcon -> True. If you like, you can turn off the normal \ right hand cell brackets with Cell Options > Display Options > \ ShowCellBracket -> False.\ \>", "Text"], Cell["\<\ \tTo remove the cell \"dingbats\" (those black and gray squares at \ the beginning of each section and subsection) execute Cell Options > Display \ Options > CellDingbat -> False. You would probably need to set this option at \ the cell style level since, unfortunately, this option has no effect at the \ global or notebook level, which may be a bug. You can see the resulting \ format of the notebook below. [Editor's note: You can run the actual notebook \ in the electronic version of this journal.]\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Palettes", "Section", CellDingbat->None, ShowGroupOpenCloseIcon->True], Cell[TextData[{ "The application I had in mind was to automatically produce a palette \ containing the functions defined in the notebook. I wanted this palette to \ appear in the upper right hand corner as soon as the notebook was opened. \ This required that I know the path to the palette on the disk. First I \ needed to make a palette which contains the seven functions defined in the \ chapter. This is done with the string of commands: ", StyleBox[" ", FontWeight->"Bold"], "Input > Create/Table/ Matrix/Palette > Make Palette > 8 rows by 1 column. \ Select each button and enter the names of the functions. For the placeholder \ I used ESCAPE spl ESCAPE. For the heading, I typed Chapter 1. The result is \ shown under Palette in the notebook.\n\n\tNow to generate the palette, select \ the palette and under File > Generate Palette from ", StyleBox[" ", FontWeight->"Bold"], "Selection. Next I placed the palette in the upper right-hand corner of \ the screen. From this position I saved the palette.nb on the disk named \ Classes in the folder Chapter1 where I also saved the notebook.nb." }], "Text", CellDingbat->None, ShowGroupOpenCloseIcon->True] }, Open ]], Cell[CellGroupData[{ Cell["Initialization", "Section", CellDingbat->None, ShowGroupOpenCloseIcon->True], Cell[TextData[{ "In ", StyleBox["Mathematica", FontSlant->"Italic"], " 3.0, a notebook with initialized cells will not immediately ask if you \ want to run the initialization cells, unless you set this condition. This is \ done again with the Options Inspector, where you will want to set Show option \ values for the Notebook. Now make the selection under Notebook Options > \ Evaluate Options > InitializationCellLoading -> True.\n\n\tFinally, we need \ to write a notebook command which will immediately bring up the palette upon \ initialization of the notebook. This is done by writing \ NotebookOpen[\"classes:chapter1:palette.nb\"]; in a cell that is \ initialized. I put it in the area where I load the graphics functions. Don't \ forget to add your own path name to the palette.nb when you set up your own \ notebook.\n\t\n\tNow save your notebook.nb, and you are ready to roll. When \ you open the notebook, you have a palette that is ready for use in any \ notebook. It is also a good idea to keep a copy of your palette within the \ notebook, in case you give it to someone and forget to give them the palette. \ " }], "Text", CellDingbat->None, ShowGroupOpenCloseIcon->True] }, Open ]], Cell[CellGroupData[{ Cell["The completed notebook", "Section"], Cell["\<\ See the other electronic submission included with this article, completedNotebook.nb.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["SUBMITTING PROBLEMS AND SOLUTIONS", "Section"], Cell["\<\ The preferred way to submit problems or solutions is via email. \ They may also be sumbitted on paper or on a disk through the regular mail. \ When you submit your work, include a brief English description of your \ solution, or use comments in your program to help the reader follow your \ ideas. Of course, you should include your name, institution, category (high \ school, college undergraduate, other) and mail or email address.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["CONTACTING THE EDITOR", "Section"], Cell["\<\ Donald T. Piele Mathematics Department University of Wisconsin-Parkside 900 Wood Road Kenosha, WI 53141 email: piele@cs.uwp.edu phone: 414-595-2231 fax: 414-595-2056\ \>", "Text"] }, Open ]] }, Open ]] }, FrontEndVersion->"NeXT 3.0", ScreenRectangle->{{0, 1053}, {0, 832}}, AutoGeneratedPackage->None, WindowSize->{560, 436}, WindowMargins->{{Automatic, 234}, {Automatic, 2}} ] (*********************************************************************** 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->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 116, 4, 136, "Title"], Cell[1850, 57, 169, 4, 67, "Subsubtitle"], Cell[CellGroupData[{ Cell[2044, 65, 38, 0, 52, "Section"], Cell[2085, 67, 1047, 22, 148, "InlineFormula"] }, Open ]], Cell[CellGroupData[{ Cell[3169, 94, 28, 0, 52, "Section"], Cell[3200, 96, 556, 9, 110, "Text"], Cell[3759, 107, 530, 8, 94, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[4326, 120, 80, 2, 52, "Section"], Cell[4409, 124, 1183, 21, 206, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[5629, 150, 86, 2, 52, "Section"], Cell[5718, 154, 1204, 21, 222, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[6959, 180, 41, 0, 52, "Section"], Cell[7003, 182, 109, 3, 46, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[7149, 190, 52, 0, 52, "Section"], Cell[7204, 192, 457, 7, 94, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[7698, 204, 40, 0, 52, "Section"], Cell[7741, 206, 190, 10, 158, "Text"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)