(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. 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[ 13170, 423]*) (*NotebookOutlinePosition[ 14030, 454]*) (* CellTagsIndexPosition[ 13986, 450]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{Cell["\<\ Example 02 Enhancing a MMA Notebook on the NeXT\ \>", "Title", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "Copyright ", StyleBox["\[Copyright]", FontSlant->"Plain"], " 1993 by Bill Titus, Carleton College, \nDepartment of Physics and \ Astronomy, Northfield, MN 55057-4025\nSeptember 6, 1993" }], "Subsubtitle", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Topics and Skills", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ 1. The ruler: cells types and alignment. 2. Cell styles. 3. The Style Inspector and its attributes. 4. Editing and closing cells. 5. Printing a notebook or notebook selection.\ \>", "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Exercise", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "Step 1 - Create a new MMA notebook by going to the MMA menu and selecting \ ", StyleBox["Notebook \\ New", FontFamily->"Helvetica"], ". Move windows around until both ", StyleBox["Ex02.ma", FontFamily->"Helvetica"], " and your new notebook can be seen simultaneously." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ " Step 2 - Add a ruler to the top of your new notebook by selecting\n ", StyleBox["Format \\ Show Ruler", FontFamily->"Helvetica"], ". Describe what you see." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Comment 1", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "1. The popup menu contains different types of cells. The important ones \ are ", StyleBox["Input", FontFamily->"Helvetica"], ", ", StyleBox["Output", FontFamily->"Helvetica"], ", ", StyleBox["Graphics", FontFamily->"Helvetica"], ", and various documentation cells. The default cell is ", StyleBox["Input", FontFamily->"Helvetica"], ". Why?\n2. Different documentation cells have different styles (font, \ alignment, ...). Select ", StyleBox["Format \\ Styles", FontFamily->"Helvetica"], StyleBox[" ", FontFamily->"Helvetica"], " and look through the various possibilities. Then close the Style cell \ that just came up.\n3. What do you think the three rectangles do in the \ ruler?\n4. Note the margin symbols and the paper marker triangles." }], "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[TextData[{ "Step 3 - Add the title \"", StyleBox["Mathematica", FontSlant->"Italic"], StyleBox[" ", FontWeight->"Plain", FontSlant->"Italic"], "Workshop\" to your new notebook. To do so, produce a new cell and type in \ \"Mathematica Workshop\". Then highlight the cell bracket, go to the popup \ menu on the ruler, and select ", StyleBox["Title", FontFamily->"Helvetica"], ". What happens? Play with the alignment rectangles." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Comment 3", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "1. Note that when you type \"", StyleBox["Mathematica", FontSlant->"Italic"], "\" it automatically becomes italicized; if it's not bold, you can make it \ bold by selecting ", StyleBox["Format \\ Font \\ Font Panel", FontFamily->"Helvetica"], "." }], "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[TextData[{ "Step 4 - Add the ", StyleBox["Subtitle", FontFamily->"Helvetica"], " \"Notebook Enhancement - Example 2\" to your notebook." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "Step 5 - Add a ", StyleBox["Subsubtitle", FontFamily->"Helvetica"], " to your notebook which consists of your name and the date." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "Step 6 - Add a ", StyleBox["Section", FontFamily->"Helvetica"], " to your notebook with the title \"Arithmetic Examples\"." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "Step 7 - In the next two cells in your new notebook, type in \"Addition\" \ and \"Multiplication\", respectively. Select both cell simultaneously by \ clicking and dragging on the cell brackets. Then convert the cells to ", StyleBox["Subsection", FontFamily->"Helvetica"], "." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Comment 7", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "1. You can also select a consecutive range of cells by clicking on the \ first cell bracket and shift clicking on the last one. \n2. For selecting \ nonconsecutive cells, use ", StyleBox["-click", FontFamily->"Helvetica"], "." }], "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[TextData[{ "Step 8 - Add some descriptive text to a new cell just below the \"Addition\ \" subsection; for example, \"Here's an example that illustrates \ addition.\". Transform the cell into a ", StyleBox["Text", FontFamily->"Helvetica"], " cell. Now adjust the left margin of the cell so that it's at 1.25 \ inches." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Step 9 - Add in addition and multiplication examples below the respective \ subsections. Send the results to the MMA kernel.\ \>", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "Step 10 - Use the Style Inspector to gain greater control of cell \ appearance and type. To do so, select ", StyleBox["Format \\ Style Inspector", FontFamily->"Helvetica"], ". Describe what you see." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Comment 10", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "1. Examine the organization of the Style Inspector: ", StyleBox["Cell Style", FontFamily->"Helvetica"], ", ", StyleBox["Text Attributes", FontFamily->"Helvetica"], ", ", StyleBox["Space", FontFamily->"Helvetica"], ", ", StyleBox["Cell Attributes", FontFamily->"Helvetica"], ", ", StyleBox["Graphics", FontFamily->"Helvetica"], " ", StyleBox["Attributes", FontFamily->"Helvetica"], ", ", StyleBox["Page Break", FontFamily->"Helvetica"], " ", StyleBox["Attributes", FontFamily->"Helvetica"], ", ", StyleBox["Display Attributes", FontFamily->"Helvetica"], ", and ", StyleBox["Kernel Connections", FontFamily->"Helvetica"], ".\n2. Note the ", StyleBox["Help", FontFamily->"Helvetica"], " button." }], "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell["\<\ Step 11 - Play with the Style Inspector. Make your title cell have red text \ and a light blue background. To do so, first highlight the title cell. \ Then for the text color, go to the Style Inspector, and click on the border \ of the text color well. What happens? Move around on the color wheel until \ you get a satisfying \"red\". Repeat the procedure to get the desire \ background color for the cell itself.\ \>", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Comment 11", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "1. Remember, there are a variety of ways to select colors. \n2. You can \ also bring up the Color panel by selecting ", StyleBox["Format \\ Colors", FontFamily->"Helvetica"], "." }], "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[TextData[{ "Step 12 - Go to one of your output cells, center the output, put a box \ around it, add a light yellow background to the cell, and put a page break \ below it. To see the page break, select ", StyleBox["Format \\ Show Page Breaks", FontFamily->"Helvetica"], ". Change the font size for this cell output to 24 points." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Comment 12", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ 1. Pagebreaks: soft versus hard. There's a dash at the very top. 2. Note that you can't select the text in an output cell; you can only \ select the cell itself. Why?\ \>", "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell["\<\ Step 13 - Convert one of your output cells to an input cell. What do you \ observe happening when you do this conversion?\ \>", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Comment 13", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["1. Why might such a conversion process be useful?", "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[TextData[{ "Step 14 - Remove the cell you just converted by selecting the cell and \ using ", StyleBox["-x", FontFamily->"Helvetica"], ". This process actually saves the cell to the pasteboard and you can \ press ", StyleBox["-v", FontFamily->"Helvetica"], " to bring it back. Do so, but then remove the cell again. Finally, \ reactivate the original input cell so you end up two input and two output \ cells in your notebook." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Step 15 - Double-click on the cell bracket surrounding \"Addition\" and \ its associated input and output cells. What do you find? To the same with \ the \"Multiplication\" section. Now double-click on the cells again. What \ happens?\ \>", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Comment 15 ", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["1. Why might grouping cells be useful?", "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[TextData[{ "Step 16 - Close all cell groupings in your notebook except for the title. \ To reopen all the cells in a single move, go to ", StyleBox["Edit", FontFamily->"Helvetica"], " and choose ", StyleBox["Select All Cells", FontFamily->"Helvetica"], ". Then select ", StyleBox["Cell \\ Open All Subgroups", FontFamily->"Helvetica"], ". What happens?" }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Comment 16", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ 1. You can also use this process to close all the cells at once.\ \>", "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[TextData[{ "Step 17 - Now you're going to print your notebook. To do so, first select \ ", StyleBox["Format \\ Page Layout", FontFamily->"Helvetica"], ". After the Page Layout panel comes up, use the popup Layout menu to \ select two MMA pages on a single sheet of paper. Press ", StyleBox["OK", FontFamily->"Helvetica"], ". Now select ", StyleBox["Print \\ Print", FontFamily->"Helvetica"], "." }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Comment 17", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "1. What do you think ", StyleBox["Print \\ Print Selection", FontFamily->"Helvetica"], " does? Try it out.\n2. When working in notebooks, you should save \ frequently. Why?" }], "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Save Your Notebook", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "Use ", StyleBox["Save ", FontFamily->"Helvetica"], " to save the notebook you just created under the name ", StyleBox["myEx02_NoteBook", FontFamily->"Helvetica"], "." }], "Special1", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{499, 599}, WindowMargins->{{110, Automatic}, {Automatic, 0}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False} ] (******************************************************************* 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[1727, 52, 105, 4, 70, "Title"], Cell[1835, 58, 265, 7, 70, "Subsubtitle"], Cell[CellGroupData[{ Cell[2123, 67, 69, 1, 70, "Section"], Cell[2195, 70, 243, 7, 70, "Special1"] }, Open ]], Cell[CellGroupData[{ Cell[2470, 79, 60, 1, 70, "Section"], Cell[2533, 82, 357, 10, 70, "Subsection"], Cell[2893, 94, 236, 6, 70, "Subsection"], Cell[CellGroupData[{ Cell[3152, 102, 64, 1, 70, "Subsection"], Cell[3219, 105, 868, 24, 70, "Special1"] }, Open ]], Cell[4099, 131, 517, 14, 70, "Subsection"], Cell[CellGroupData[{ Cell[4639, 147, 64, 1, 70, "Subsection"], Cell[4706, 150, 333, 10, 70, "Special1"] }, Open ]], Cell[5051, 162, 205, 6, 70, "Subsection"], Cell[5259, 170, 209, 6, 70, "Subsection"], Cell[5471, 178, 205, 6, 70, "Subsection"], Cell[5679, 186, 360, 8, 70, "Subsection"], Cell[CellGroupData[{ Cell[6062, 196, 64, 1, 70, "Subsection"], Cell[6129, 199, 314, 8, 70, "Special1"] }, Open ]], Cell[6455, 209, 390, 9, 70, "Subsection"], Cell[6848, 220, 188, 4, 70, "Subsection"], Cell[7039, 226, 280, 7, 70, "Subsection"], Cell[CellGroupData[{ Cell[7342, 235, 65, 1, 70, "Subsection"], Cell[7410, 238, 857, 36, 70, "Special1"] }, Open ]], Cell[8279, 276, 484, 8, 70, "Subsection"], Cell[CellGroupData[{ Cell[8786, 286, 65, 1, 70, "Subsection"], Cell[8854, 289, 258, 7, 70, "Special1"] }, Open ]], Cell[9124, 298, 400, 8, 70, "Subsection"], Cell[CellGroupData[{ Cell[9547, 308, 65, 1, 70, "Subsection"], Cell[9615, 311, 232, 5, 70, "Special1"] }, Open ]], Cell[9859, 318, 186, 4, 70, "Subsection"], Cell[CellGroupData[{ Cell[10068, 324, 65, 1, 70, "Subsection"], Cell[10136, 327, 103, 1, 70, "Special1"] }, Open ]], Cell[10251, 330, 527, 13, 70, "Subsection"], Cell[10781, 345, 304, 6, 70, "Subsection"], Cell[CellGroupData[{ Cell[11108, 353, 66, 1, 70, "Subsection"], Cell[11177, 356, 92, 1, 70, "Special1"] }, Open ]], Cell[11281, 359, 443, 13, 70, "Subsection"], Cell[CellGroupData[{ Cell[11747, 374, 65, 1, 70, "Subsection"], Cell[11815, 377, 126, 3, 70, "Special1"] }, Open ]], Cell[11953, 382, 484, 14, 70, "Subsection"], Cell[CellGroupData[{ Cell[12460, 398, 65, 1, 70, "Subsection"], Cell[12528, 401, 255, 7, 70, "Special1"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[12824, 410, 70, 1, 70, "Section"], Cell[12897, 413, 252, 9, 70, "Special1"] }, Open ]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)