(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.0' 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[ 89746, 1957]*) (*NotebookOutlinePosition[ 90440, 1981]*) (* CellTagsIndexPosition[ 90396, 1977]*) (*WindowFrame->Normal*) Notebook[{ Cell[GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg_[?oP_J[ogKJ]on2mZP?ofkb/00Ooh;fZon:e[?oK_:cofkb/on:e[?oK_:coh;fZ00?ofkb/00Wo h[F/on2mZ_oR]Jcoh[F/on>_[?oQaKCoh[F/om^l[?oR]J`00_oK_:`00ooP_J[ohjn/omk4ZP02om^l [005on:e[?oP_J[og<6eon:e[?oK_:`00ooR]J`02?oK_:coh[F/om^l[?oR]Jcog<6eom^l[?oR]Jco fkb/0_oR]J`01_oK_:coh;fZom^l[?oR]Jcofkb/on2mZP;ofkb/00Coi;beomk4Z_oS[jcoh;fZ0_oK _:`2on:e[007omW2ZooQaKCohjn/on:e[?oK_:coh;fZom^l[002on:e[009om^l[?oP_J[oh[F/om^l [?oT_;Gofkb/omff[OoR]Jcofkb/00;oh[F/1?oK_:`02?oP_J[oh[F/omff[OoR]Jcofkb/onBl]OoR ]Jcoh;fZ0_oK_:`02ooT_;Goh[F/omc1]OoNa:[ohjn/omc1]OoK_:coh[F/on75]?oR]Jcofkb/00;o h[F/00Wofkb/onBl]OoR]Jcofkb/on:e[?oS[jcog/BZonBl]OoR]J`00_oK_:`00ooR]Jcoh;fZon:e [002om^l[005onBl]OoP_J[ofkb/on:e[?o[`[`00_oSbK/02_o[`[coj];5on?9^oo/b/Ooion[BaOoVeLh3on_Fc@08oo?BcOo[e/gojmK=ooCGe?o[e/gokMgEoo;Mdoo]gMD2ooCG e00Eoo[Qg_o`hm7ol]gCooGNgoo`hm7on^7NoncRgOodhmcol]gCooCSg?odj>Com>?Loo;Mdoodj>Co m>?LooCXi?ojhMkom>STooOZg?ofiNSon?;T00;om>ST00_omn[LooG_kOohl^ComNo]ooCXi?ojjnKo m>SToo_akOoimnconnOXoo[[iP02oo_ak@09ooG_kOoklNgono7]oo_akOolmoKono7]ooG_kOoklNgo o?Of00;ono7]0_olmoH2oo_ak@;oo?Of0_oklNd6oocgmP06ooclo?olmoKoo?Ofooclo?olmoKoo?cl 0_olmoH00oolo?coo?Ofooclo002ooclo003oocgm_olo?coo?cl06goo?cl00000onE6`KoU2D6oi@U 1P02oi@U1P06oiDK1_nD9@KoUA/6oi@U1_nN7@OoUA/60_nD9@H00onE6`KoU2D6oi@U1P02oiDK1P;o U2D600CoUA/6oi@U1_nE6`KoSBh70_nD9@H06?nE6`KoSBh7oihM1onD9@KoUA/6oi@U1_nE6`KoU2D6 oil?1_nD9@KoUA/6oi@U1_nE6`KoU2D6oiDK1_nD9@KoSBh7oiDK1_nD9@KoWQd7oi@U1_nE6`KoU2D6 oihM1`;oU2D600OoUA/6oi@U1_nE6`KoU2D6oiDK1_n=90OoU2D600;oUA/60_nD9@H02OnE6`KoU2D6 oi@U1_nE6`KoWQd7oi@U1_nE6`KoU2D6oiDK1P03oi@U1P07ohdT1onD9@KoUA/6oi@U1_nE6`KoU2D6 oiDK1P02oi@U1P05oiDK1_nD9@KoU2D6oi@U1_nE6`H00_nD9@H01?nE6`KoU2D6oiDK1_nE6`H2oi@U 1P05oiDK1_nD9@KoQaD6ohLE1_mn9`H00_n75@H01?mn9`KoQaD6ohLE1_mn9`H2ohLE1P04ohHP1on7 5@KoOaX5ohHP1`;oQaD600goORL6ohLE1_n75@KoQR07oglJ1On75@KoQR07oglJ1On75@KoQR07oglJ 1On75@KoSQT600;oQR0700OoSQT6ohdT1onE6`KoSB@7oi/f2?nV7POoVTdG00;oXT0:00?oXDdQoj5E 8OnWB2400_nWFc@2ojmM@00FojmS@?nbIDoo/6Q6okQYAonbLeOo/Fi?okB1HOnmN67o^W=GokmoJ_nf QF[oa7UZokf9JOo0QG;o_XiaolFGLOo5RG7o`99iolN>N_o8U8;oaY^1olRDPP;oaY^101oocifooG?dooYgL_ojmK=onKE c_o]gMGom=ODon[TdoodemCojmK=oo;Mdoo`hm7om=ODoncRgOodemCol>?AooCSg?ojhMkokNSUooCS g?obgM?om^GXooOZg?okinSom>?Looc^l_odhmconOO/ooG_kOojjnKoo?Ojoo[[i_ofm_H2oo_ak@05 oocgm_oklNgoo?cloocgm_oklNd00_olmoH00oolo?coo?OfoocgmP1Looclo00000koZ58doj=O=?nW Cb7o[E8coj5J;?nWFcCoXEDQojMK=?nXDSCoXeldojMK=?nQCB7oYe/dojQB=0;oYe/d00KoYdlQoj=O =?nWCb7o[E8cojMK=?nQCB43ojMK=00@oj5E8On^Cb_oZ58dojM?8OnSGcCoYe/dojQB=?nWFcCoXEDQ ojMK=?nSGcCoZ58doj=O=?nWCb7o[Tl[oj5E8@;oYe/d00oo[TPQoj=O=?nWB27oXeldojeBN_o2VH;oaIEiolj?P_o6Vh7ob9B2olnX T_o:X8coc9N1olnXT_oAXY?ocjRBomZYW?oAXY?odkFUomNTTooLZ:God:nKomR`VooI]Z<2omZ_Y00? om^l[?oJ[jCofkb/omVfXooL`KGofkb/on:e[?oL`KGoh;fZomc1]OoSbK_oi;beomo9/oo[`[coi<:m 00CohlVk00cok<[7onC?a_oSbK_oion[BaOo]clh5on_F c@;okMgE00com=ODon_FcOobgM?okMgEoo;Mdoo`hm7on]KHongMeOodhmcomMkOoo;ZfooifMH2ooCS g00BooCXi?ojhMkom>SToo_Wj?odhmcomNo]oo[[i_odj>Con?;TooCXi?olk_;on^_VooKfm_ojjnKo o?OfooSbi?olmoKoo>kb0ooklNd2oocgmP03oo_akOolo?coo?Of00?oo?OfH_olo?`00004oj5E8OnW B27oVTdGoidY1`;oYQh700SoYdlQoj5E8OnX>PWoXT0:oj5E8OnWCb7oWBT7oj@^1`;oWBT7037oYQh7 oj@^1onM:@OoXT0:oj5E8OnWB27oVcH8ojHN1onK=PSoXT0:oi/f2?nV7POoWBT7oj@^1onRB@coYdlQ oj902_nV7POoVcH8ojHN1onK=PSoYdPQoiY=5onM:@OoYQh7oidY1onR@0[oVDH;ojHN1onK=PSoYQh7 oi/f2?nV7POoVcH8oj@^1onR@0[oWBT7oj@^1onR@0[oYdlQoiYA8_nT;POoXEDQojM03?nT;POoVc07 ojHN1onK=PSoYQh700;oWBT700?oYdlQoj5=8OnT;PL00_nM:@L04?nT;POoZ3X9oidY1onK=PSoYQh7 oi/f2?nWB27oYdlQoj902_nK=PSoYQh7oidY1onQAQOoXEDQojM?8OnV7PL3oidY1`0XoiY=5onR@0[o YQh7oi/f2?nX>PWoXEDQoj565onM:@OoY2h7oidY1onX>PWo[dH[oj=O=?nQCB7oYdPQojM?8OnSF3Co YdPQoj5E8OnWB27oYe/doj5E8OnWB27oYe@Zoj=H=?nWB27oYdlQoj5E8OnXDSCoXEDQojM?8OnWBb[o XEDQojM?8OnXDSCoXEDQojMK=?nQCB7oZ68doj5J;0;o[ee001koZg=@ojmS@?nYKTKo^6U7ojaeEonk JeOo/GUGokmcH_neN6;o]85Qol>4J_nfQF[o`hAZokmoJ_o5RG7o_XiaolN>N_o5UGWo`YV2olFENOo8 U8;obi1iolRDP_oAXY?obZ2on_FcOo]clkolm;=onKEc_obcLKom=OD0oo]gMD01_obgM?ok]kRooCSg?o`hm7onmoS ooCGe0;om>?L00?ok>;MooCSg?odhm`00oodhm`03_odj>ConnOXooCSg?odj>ComNo]oo_Wj?oklNgo m>SToo_akOokinSono7]ooCXi?olmoKomNo]0_oklNd00oolmoKono7]oocgmP02oocgmP03oo_akOol o?coo?Of00;oo?Of00Coo?cloocgm_olo?coo?OfG_olo?`0001ZojM?8OnR@0[oahijon_2_?o@[i_o hlVkoj=V?on]9@Ko_GQQol2BNOnT;POoXeldonBl]OoI]Z?ocifLOo6Vh7oh[F/olbGPOoK_:cofZnTomVfXooSbK_o cHUjok5iEooT_;Gofkb/olJKPOnK=PSo[ee0olFENOnV7POo]GQRon?9^ooGY9?od:nKomZ_Y?oI]Z?o fkb/omR`VonV7POoYdlQonBl]OoJW9Cof;2Kom:WWOndPF7ohlVkolnMS?oI]Z?of;2KojPj2OnIAP_o aY^1on?9^oo?WHcogKJ]olfSRonS=PWoU2D6on?9^oolk_;oj];5ooCGe?n_Hd3o`8Ebon2mZ_oT`[go _HUYoj@^1onmRFWoi;beolZPS?oQaKCo_XiaoiY=5onWB27oYdlQoj=O=0;oYdlQ00ooXEDQojQB=?nW Cb7oXEDQojM?8OnXDSCoXEDQojM?8OnQEB7oZ58dojM?8OnQEB7oYdlQojQB=?nQEB400_nWCb406onQ CB7oYdlQoj5=8OnWFcCoYe@ZojeL>LOo2VH;oaHUaolN>NP02olJKP@09olRDP_o: YY?oaY^1olnMS?o=Xh_ocif;00;ofZVL0_o@[i/2omZ_Y008om>eYOoH/9_ofKJS omVfXooJ[jCoi;beomVfXooL`KD3om^l[003omc1]OoP_J[og?AongMeOodhmcok>;Moo[Qg_o/ h]d00_odhm`00oo]j>Gon^7NooCSg003ooCXi009ooWUgOolk_;omn[Looc^l_odj>ConOO/oo_Wj?oi mncoo>kb00;ono7]00?oo?Ofoo_akOolmoH00_oklNd3oocgmP06ooclo?olmoKoo?cloocgm_olo?co o?OfGoolo?`0000Roj5=8OnW@0coZFE6on?9^oolo?cob9B2ojM?8OnC<0OocJ>;ooclo?nE6`KoXT0: olN>N_odhmcoo?cloo[Qg_nYJCooo?clomVfXonSGcCoZ3X9oj=O=?oJZIcoo?cloo_akOnIAP_oZF0o ooG_kOolo?cod:nKojeBLOolo?co^f]GonWMboolo?coYdlQoj@^1onaNEOo o?cloi@U1_nWFcCo/Fi?00;oo?cl00OoYe@Zon_FcOolo?coYe/doj5E8OnQAQOo/W=G00;oo?cl00?o [f=0ojM?8Oo3RgX00_olo?`02OnaKTooXTh:ojPj2OnYH3ooejBCooclo?ojjnKoXeldoi@U1P02oocl o00IojeL4J_noOf[o_HUYokmoJ_o5 UGWo`8Ebol>>LOo2VH;oaIEiolN>N_o8U8;oaIEiolbGPOo:YY?oc9N1olZVT`;ocjRB00SodJ:ColnX T_oAXY?od:nKomZYW?o@[i_ofZVLomR`V`;ofZnT00CofKJSomZ_Y?oG^Z;ofKJS0_oK_:`03?oR]Jco g<6eon:e[?oT`[gof/Ndon2mZ_oLakcohLFdonBl]OoT`[gohM2jon^f]0?ohlVk00cok<[7on?9^oo/ b/Ook<[7onO@^Oo/b/Ooj];5ong?c_o/b/OojMg;ong?c_obcLH2on_Fc@04ooCGe?o[e/gom=ODon_F c@;okMgE00col]gCongMeOodemCok>;Moo[Ff?obj]_okMgEooCSg?obj]_on^7NoncRgOojhMh3ooCX i00=ooCSg?okinSom>STooG_kOogj]comNo]oo_Wj?ojjnKoo>kbooWgk?olk_;on^_Vooc^lP02oo_a k@05ooc^l_oklNgoo?Ofoo_akOolmoX01_olmoH4ooclo003oocgm_olo?coo?cl05[oo?cl0000IonW Cb7oXePdoj565onE6`Koo?OfoihM1onQCB7oWBT7omVfXoolo?coaHUaoidY1onT;POoXDHGooclo?nn SW7oUA/6okB1HOoR]JcoWBT7ojM?8OnN7@Oo_8=Qooclo?nSGcCoY2h7ojHN1onhJDOoo?clojMD:_nK =PSoYdPQoj5=8On=90Ooo?clooCGe?nD9@KoXeldoj@^1onM:@Ooo?clokf9JOnV7POoVcH8oj@^1ool o?co]GQRoidY1onX>PWoWQd7okJ5J_odhmcoWQd7ooCGe?nC<0OoYQh7ol2BNOolo?cofkb/oihM1onD 9@Kom>?Looclo?nE6`KoU2D6ooCXi?nN7@OoYdPQoj5E8On=90Ooo?clon?9^onN7@OoXDdQoiDK1_ol o?comn[LoiDK1_nWB27oYe/doj902_n>6@Koo?clomJfV_nE6`KobZ2NP08 olFENOo8U8;oaY^1olZPS?o>Sh;oaY^1olZVToo=Xh/2olnMS004om:WWOo?Z9;od:nKomZYW0;od:nK 00OofZVLom>j[OoH/9_ogKJ]omZ_Y?oI]Z?ogKJ]00;ofkb/00gohK2Tomc1]OoR]Jcog/BZom^l[?oQ aKCoi;beon75]?oT`[gog<6eon?9^oo[`[cohM2j00;ohlVk01[ojl:lon?9^ooSbK_ojl:lonC?a_o/ b/OojMg;onc:aooTclKojMg;onc:aoo[e/goi]G>on_FcOo]clkojmK=ooCGe?oZi=?om=ODongMeOod emCojmK=oo;Mdoo/h]gol]O=oncRg@;om>?L01col]gCoo[Qg_o/h]gom>?LooCXi?obgM?om>STooCS g?odj>Com>?LooG_kOodhmcoo>kbooSbi?odj>ComNo]oo[[i_olk_;ono7]ooSbi?olmoKomNo]oocg m_oklNgoo?Ofoo_akOolo?cono7]0_olmoH01?olo?coo?Ofooclo?olmoH2ooclo003oocgm_olo?co o?cl05coo?cl00002OnQCB7oYdlQoj=O=?nV7POok<[7okj>LOnX>PWoWBT7oo?Bc@02ooclo00>oidY 1onIAP_oY2h7ooclo?oQaKCoTc07oihM1oolo?coYQh7oi<`1onE6`Kojl:looclo?nN7@L2oj5=8@1/ oiY=5oolo?cobZ2?LojPj2OnM:@OohK2T ooclo?oklNgoY2h7oi@U1_o[`[coo?cloihM1onV7POoglVcolfSRonD9@KoWQd7ojM?8Oolo?coahij oi/f2?nWCb7oWBT7ooCSg?olo?coU2D6ojMK=?nQEB7oYe/doi@U1_olo?cono7]ohhI1_odhmcoo?cl oiDK1_nWFcCoXEDQojM?8OnC<0Ooah5boidY1oolmoKoY2h7oidY1onF2PKojLZjooclo?nN7@OoXEDQ okU4=OnWFcCoYdlQojeBLOo3Q6[o `99iokj>LOo5RG7o`99iolN>N_o6WGWocXn2ol^@NOo6Vh7obZJColbGPOoBU8god:nKolnMS?o>[Y;o g:>Mom6RToo@[i_ofZVLom>eYOoH/9_ofZVLom>j[OoH/9_ofKJSomff[OoI]Z?ofZnTon:e[?oL`KD2 om^l[00=onC2_OoK_:coi;beomo9/ooT_;GohLFdonBl]OoObK?ohlVkon_2_?oTclKoi<:monC?aP02 onc:a`05onSGa?oSbK_ok<[7onc:aooXel@00_o/b/L05_oYgL_olm;=on_FcOo]clkojmK=onkFeoo[ e/golm;=on[TdoodemCol>?AooCGe?o]gMGol]gConkNh_obgM?om=ODooGNgoo/h]gom>?Loo[Qg_o` hm42ooCXi00AooCSg?okinSom>?LooCXi?oiiMgomNo]ooCSg?olk_;on^_VooG_kOohl^Coo>kbooG_ kOolk_;on?;Toocgm_oimn`00_oklNd01?olo?cono7]ooclo?oklNd4oocgmP05ooclo?olmoKoo?cl ooclo?olmoH0GOolo?`00008ojMK=?nWCb7oYdPQoj902_o0TWWoi]G>oi/f2?nN7@L2ooclo00?A0_olo?`0B_nD9@KoZ58d oj5E8OnN7@Ooo?clon6`Y?nM:@OoYe/doj5=8OnM:@Ooj];5ooclo?n>6@KoWBT7oj@^1on=90Ooo?cl ooSbi?nN7@OoXEX/oihM1oolo?colm;=ohhI1_nM:@OonNGMoi<`1onWCb7oY2h7on2mZ_nnSW7oUA/6 oocgm_olo?coZFToon_FcOnE6`KofKJSooclo?nD9@KoXTT?A0_olo?`02OnD9@Ko YdPQokTm;_nWFcCoYdPQoj5=8OnWCb7oZ58doj5E8@02ojM88@06oj=O=?nWCb7oXDdQojM?8OnWFcCo XDdQ0_nWCb403?nSF3CoYdlQoj5E8OnWB27oYdlQoj5E8OnXDSCoYdPQoj=O=?nWCb7oYe/doj=O=0;o [ee000go/Fi?ojUY?on`J4Ko^Fi?ojaeEonjJ4oo/GUGokehHOneN6;o_HUYokehHOnmRFWoa7UZ00;o _Xia00?oaHUaol2BNOo8U8800_o7SWX03?o:X8cob9B2olZVTooonWMboo/b/OojmK=ong?c_o[e/gokMgEon[BaOo[ e/gokMgEooCGe?o[e/gom=ODongMeOodemComMkOoo;Md`02ongMe@?om>?L013ol>?AoocWkOobgM?o m^GXooCXi?obj]_onnOXooCXi?oekngomn[LooG_kOohl^Coo>kbooSbi?olk_;on?;T0_oklNd01Ool mo[onnOXoocgm_oklNgoo?Of00?ono7]00Coo?Ofooclo?olmoKoo?cl0oolmoIPooclo00000koXDdQ oj5E8OnWCb7oXDdQoj@^1oojjnKoWQd7oi@U1_olo?con?;TohhI1_olo?coYQh7oi@U1P;oo?cl00Wo WQd7ojM?8OnN7@Ooo?Ofoj@^1onN7@Ooo?clonc:aonM:@L00_nWCb403OnE6`Koo?cloo[[i_nD9@Ko YdlQojMK=?nM:@OoeYN:ooclo?o=Xh_ofZnTomVfXoo?WH`00_olo?`0?OnN7@OoYdlQoihM1oodj>Co o?clon2mZ_olmoKoo?cloihM1onQEB7oXDHGokEhH_o/b/OoQR07ooclo?odhmcoQR07oo_akOnN7@Oo _HUYooclo?nR@0[oXDdQoidY1oo/b/OoaY^1oihM1oodemCoo?cloihM1onWCb7oZ58doidY1oo6Vh7o o?cloj565onX>PWoXeldojM?8OnM:@Ooi;beooclo?n75@Kolm;=ooclo?nD9@KoYdlQojMK=?nWCb7o XEDQoj5=8OnWCb7oWQd7ooclo?nT;POoWQd7ooclo?oZd/GoTc07ojQB=?n_@2<00_nQEB404_nWFcCo XEDQojM88OnWCb7oXeldojM?8OnWB27oXEDQojQB=?nQEB7oYdPQojM?8OnSF3CoYdlQojM88OnQEB7o Z58doj5E8@;oYdlQ00CoXDdQojM?8OnWCb7oXeld0_n^Cb/05onSISoo[f=0ojUY?on`HDKo/Fi?ojU^ A_njLeOo/W=GokYXConeN6;o^GaFokmcH_noOf[o]XEZokf9JOo4NF[o_XiaolN>N_o5RG7oaIEiolN> N_o:X8coahij00;oaY^100gobZ2Mom2_ VooJ[jCoe[JJ00;ofZnT01cofKJSomZ_Y?oM]Zgofkb/omVfXooO]j?ogKJ]omk4Z_oR]Jcog<6eonBl ]OoQaKCog<6eonBl]OoQd;[ohlVkomc7_?o[`[cohlVkonC2_OoSbK_ok<[7onC?a_oSbK_ok<[7onC? a_o/b/Ooj=O40_o/b/L09OoYgL_okLo>on_FcOo[e/goi]G>oo?BcOo]gMGojmK=ongMeOobelgokMgE oo;Mdoo]gMGol]gCongMeOojhMkomMkOongMeOobj]_on]KHooCSg?obj]_onnOXooKTdoofiNSom>ST ooCSg?ojhMkom>STooc^l_oiiMgom>STooSbi?olk_;on^_Voocgn_ojjnH00_oimn`01?olmoKoo>kb oocgm_oklNd4oocgmP07oo_akOolmoKoo?Ofooclo?olmoKoo?cloocgmP1Oooclo00000koYdlQojM8 8OnSGcCoYdlQoidY1oo]gMGoYd0;N_n_Hd3ojmK=ooclo?nD9@KoXEDQoidY1oo[`[coo?cl ojMK=?o@[i_oo?cloidY1onWB27oXDdQoj@^1oo[e/goU2D6ooclo?oJ[jCoWBT7ol25L_oI]Z?oZ3X9 ooclo?naKToo[BD6oiaG;?nWCb7ojmK=ohLE1P02ooclo00[oi@U1_nWCb7oXEDQojHN1onjLeOoo?cl okU^ConJCAOoYdPQoj5E8OnV7POocjRBooclo?nE6`Ko_HUYooclo?nQEB7oXT0:oj5=8OnSGcCoYdPQ ojM?8OnWFcCoVcH8omR`Voo7PG;oU2D6ooclo?o6Vh7oYQh7ojM?8OnQEB7oYdPQojMK=?nQEB7oYdPQ ojM?8OnSGcCoYdPQojM?8OnQEB7oYe/doj5E8@02ojM?8@06oj=O=?nWCb7oYdlQoj5E8OnWFcCoXEDQ 0_nWCb40LOo5RG7o`YV2olFGLOo8U8;o ahijolJKPOo>Sh;oaY^1olnMS?o6Vh7ocif?LongMeOo`hm7om>?Loo[Qg_obj]_olnoS0_odhm`04OofiNSom>?Loo[Qg_ohl^Com>ST ooG_kOodhmcomNo]ooSbi?omkoWon?;Tooc^l_ohl^Coo>kboo[[i_olmoKonnOX00;ono7]00Ooo?Of ooc^l_olmoKoo?Ofoo_akOolmoKoo?cl00;oo?Of0oolo?`00oolmoKoo?clooclo01Looclo00001oo XDdQojMK=?nWB27oXDdQoj@^1oo@[i_ob9B2okYcEoolo?cobi1ioidY1onD9@Koo?clohdT1oodemCo o?cloihM1onWCb7oXDdQoj5E8Oocd/go^6U7ooclo?n_Hd3oXDHGoj902_nWCb7oTc07on_2_?olo?co WQd700;oYdlQ02koVDH;ojPj2Oolo?cobHIkoi<`1onR@0[oTc07olnMS?olo?coYQh7ojM?8OnC<0Oo d:nKooclo?nE6`KoU2D6ooCSg?n_GD3oVDH;ojM?8OnM:@OohK2TolZPS?olo?co`hAZoi/f2?nN7@Oo l^[KojMK=?olo?coaHUaojoj5E8OnXDSCoYdlQoj5E8OnWB27oXeldojM?8OnWB27oXEDQojMK=?nWB27oXEDQ ojM?8OnSF3@2ojM?8@08oj5E8OnWFcCoYdlQoj5=8On]G3?oZUToojUY?on_GD02ojmS@005ok5iEon` J4Ko^f]Gok9cEonjJ4l00_ndPF401Oo1OV7o]XEZokf9JOo0QG;o_HUY00;o_Xia00OobhAaol2BNOo7 SW[oaIEiolZPS?o5UGWobZ2<00;ocif<01CobZJColnMS?o=Xh_odZNMolnXT_oJZIcocjRBombSWOoG ^Z;ofZVLom^l[?oJZIcofKJSom^l[?oJ[jCofKJSomNjX_oJ[jCoglVcon>_[0;ofkb/01Sog<6eon75 ]?oJakCohLFdomc1]OoY_[?ohM2jonc:aooQaKCoi<:monSGa?oSbK_oi?AooGNgoo/h]gom=ODoo;ZfoojhMkom>?LooGNg`;om>?L01Com>STongXiOojhMko m>STooWUgOoekngon^7NooG_kOohl^Coo>kboo[[i_olk_;om>SToocgm_okinSoo?Ofoo_akOolmoKo no7]oocgmP;ono7]00Coo?cloocgm_olmoKoo?cl0_olmoH00oolo?coo?Ofooclo01Nooclo0000_nW Cb404onQEB7oYdlQoj5E8OnWFcCoh;fZomVfXoolo?coZF0ooj565onK=PSofZnTom6RToo=Xh_oo?cl oidY1onQCB7oYdlQoidY1oo:X8`00_olo?`08?nD9@KoZF0ookUlE_nM:@OoYQh7om2_Voolo?coTc07 ojM88OnK=PSo^W=GoihM1oolo?cofKJSoidY1onWCb7oXT0:okB1HOolo?co/Fi?oiU62onS=PWo_HUY ooclo?naKTooY2h7oj565onT;POo[E`coj=O=?nX>PWoYe/d0_olo?`0:?nJCAOoZ3X9oj902_o0TWWo h[F/ooclo?o:X8coVcH8oj5=8OnR@0[oYdlQooWgk?olo?coahijoidY1oo5RG7oTc07ojM88OnD9@Ko o?clon75]?nM:@OoXDdQojM88OnYJCooY2h7ooclo?o6Vh7oU2D6olnXT_olo?coWBT7oj@^1onQCB7o XE4/ojM?8Oo/b/OoVcH8ojHN1oo:X8`2ooclo01IoiDK1_nV7POoXT0:oj5=8On]DS?oYdlQojMK=?nW Cb7o[E8coj5=8On]DS?oXEDQojeBN_o5RG7o`99iolF9LOo5 UGWob:N;olN>N_o6Vh7ob9B2olnMS?o:X8cocif?LongMe@02ooCSg004ooCXi?ogj]comMkOoo[[iP?o m>ST00con?;TooG_kOogj]comNo]oo[[i_oekngonnOXoocgm_odj>Coo?OfooSbi?olmoH2oo_ak@03 oocgm_oklNgoo?cl00Goo?Of00?oo?cloocgm_olo?`0Goolo?`00007oj5=8OnXDSCoYdlQoj=O=?nW B27oWQd7on7@^P02ooclo00 1Oolo?con^_VoiH:1_nQEB7oYQh7oihM1oolo?coc9N1oihM1onT;POoWQd7ooclo?o3Q6X00_nD9@H0 1OnM:@Ooo?clojM88OnRB@coOaX500;oo?cl05koWBT7oj5=8OnWCb7oWQd7oo3SdOolo?cohLFdoiDK 1_nWCb7oXDdQoihM1oobgM?oo?clojMK=?nM:@Ooi]G>ooWIe_n=90OoQR07ooclo?olmoKoUA/6ohdT 1oolmoKo_Xiaogl>1Oolo?cohLFdoiDK1_n>6@Koo?Ofooclo?nM:@OoYQh7oidY1onmRFWoo?cloihM 1onQEB7oU2D6ooclo?olmoKo]GQRooclo?nmRFWoXDHGoj5E8OnWFcCoYdPQoj5E8OnWCb7oZ58doj5E 8OnWCb7oXDdQojMK=?nWCb7oXDdQojM?8OnWFcCoXDdQojM?8OnQEB7oZ58dojM?8OnSGcCoYdPQojMK =?nQEB7oYdPQojM?8OnXDSCoYe/dojML:_n_Hd3oY6]7ojmM@?n`J4KoZg=@ok1XA_nkJeOo/W=GokUl E_nbLeOo_GQQokb3HOnfQF[o_gmZokf9JOo3Q6[o`8Ebol2BNOo7SW[o`YV20_o7SWX00oo6Vh7oc9Z= olbGP@02olZPS0;ocif<00gocjRBom6RToo?Z9;od:nKolnXT_oJZIcodZNMomR`VooC]JGofKJSomZY W?oI]Z?ofZnT00;ofkb/017ofKJSom^l[?oR]Jcog<6eon:e[?oLakcofkb/onBl]OoQd;[oi;beomc1 ]OoTclKojkJdon7@^_oTclKojl:lon7@^P02onc:a`;oi?AooCGe?o/h]gom>?LonkFeooj hMkol]gCooCSg?oeg]l00_odhm`05_oeg]oom>STooCSg?ofiNSon?;TooCSg?okinSon?;Tooc^l_oj jnKomNo]ooSbi?olmoKonnOXoocgm_oklNgoo>kbooWgk?olmoKoo>kboo_akOolmoH2oo_ak@03oocg m_olo?coo?Of00;oo?Of00?oo?cloocgm_olo?`0G_olo?`000;oYdlQ00GoXDdQojM88OnWCb7oVcH8 ok][E`02ooclo005oi@U1_nWCb7oYe/doidY1oo8U8800_olo?`04onbIDooWBT7ojM?8OnWCb7oWQd7 onO@^OolmoKoWQd7oidY1ooK_:coo?clon75]?o[e/goo?cloocgm_oK_:coo?cloocgm_o@[i/00_ol o?`01?o[e/goYe/dok5^CoojjnH2ooclo003omk0_On`J4Kon?;T00;oo?cl00OohlVkon_2_?olo?co o?cloi@U1_nYJCoolm;=00;oo?cl00GoWQd7ojM?8OnWBb[oVDH;ok5^C`02ooclo009onc:aonSGcCo YdlQoiY=5onWB27oo?cloi<`1onWB27oWBT700;oo?cl00Soh;fZooclo?olo?coekZRoo_Wj?olo?co YdlQon[Ba@;oo?cl00Ook<[7oj5J;?n=90Oom=ODooclo?o@[i_ocif<00;oo?cl04KoWBT7ojM?8OnM :@OohLFdooCXi?o3Q6[oo?clolRDP_nK=PSoZ58dojM88OnQEB7oYdPQojQB=?nQEB7oYdPQoj5=8OnW FcCoYdPQoj5=8OnWCb7oZ58doj5=8OnWCb7oXDdQojQB=?nWCb7oXDdQojM88OnWCb7oXDdQojQB=?nQ EB7oZ58dojM?8OnQFRcoYe/dojUP?on_GD3o/6Q6ojUY?onaKToo^6U7ojaeEonjLeOo/Fi?okehHOne N6;o_GQQokmoJ_nmRFWo`8EbokmoJ_nnSW7oaHUaol>>LOo0TWWob9B2olbGPOo8U8;oaY^1olZPS?o< Uh7ocifon[BaOoTclKojmK=onC? a_ocd/gojmK=ong?c_oVeLkolm;=ongMeOo[e/gom=ODon[TdoodemCokMgEooCGe?o]gMGol]gCooGN goobgM?ol^[KoncRgOojhMkol^[KooKTdoofiNP00_odhm`2ooCXi00=ooCSg?okinSonnOXooG_kOog j]coo>kboo[[i_oklNgom>STooc^l_oimncon^_VoocgmP02oo_ak@?oo?Of00?ono7]ooclo?olmoH0 0_olmoH01Oolo?coo?Ofooclo?olo?coo?Of05koo?cl00003_nQCB7oYe/dojM?8OnWCb7oVU4RojPj 2Oo@[i_oo?cloocgm_nN7@OoXEDQojM88OnWCb7oUA/60_olo?`0:oobgM?oXT0:oj5E8OnWCb7oXDdQ oj59;?n`L4KoXT0:ojM?8OnR@0[o_gmZojUP?onWE2[oWQd7ojMK=?nYH3oo/6Q6okYcEonmRFWoYdPQ oiY=5oo6Vh7oYdPQojUY?oo0TWWoWBT7ojMD:_o3SW7oYe/dokj>LOnM:@OoXEDQolN>N_o3Q6[o]GQR oj993?nR@0[oZ58dolN>N_nSGcCoYdlQoj5=8OnQEB400_nWCb401?nK=PSoYe/dojUP?oo8U882ojM? 8@0XojMK=?nM:@Oo[f=0oj5=8OnQEB7oXShGokB1HOn`J4Ko[ee0oidY1onV7POo/6Q6oj5E8OnoOf[o YdlQolN>N_nT;POoXEDQolFENOnWCb7oXDdQoidY1onQCB7ocjRBom2_VonWCb7oU2D6ojM?8OnSGcCo YdPQoj902_nYH3ooWBT7ojmS@?nK=PSoYdlQoj5E8OnWCb7oYe/doj5E8@;oYdlQ00KoXeldojM?8OnQ EB7oYdlQojMK=?nQEB42ojM?8@06oj=O=?nWCb7oXEDQojM?8OnWFcCoXEDQ0_nWCb408?nQEB7oYdlQ oj5E8OnWFcCo[E8cojML:_nYH3oo[f=0ojUY?onaKToo/656ok5^ConaMDoo^f]GokYcEoneN6;o_8=Q ok5iEoo3Q6[o_gmZokf9JOo3Q6[o`h]jolF9LOo7SW[o_XiaolJKPOo0TWWoaIEiomJ;P_o6Vh7obZ2< 0_o?WH`2om6RT`;ocjRB01Sod:nKolnXT_oLXigodkFUom2_VooH/9_ofkb/omVfXooLZ:Gofkb/omNj X_oJ[jCogKjRomff[OoL`KGog/BZom^l[?oP_J[oi;beomc7_?oQaKCoi;beonC2_OoQaK@2on?9^`0> onC2_OoSbK_ohlVkon?9^oo/b/Ooi?AooCSg?oeg]l00_odhm`2ooCXi003ooCSg?odj>Con^_V00?om>ST00[oo>kbooSbi?oekngonnOX oo_akOohl^Cono7]ooG_kOolk_;oo?Of0_oklNd01OolmoKono7]ooclo?oklNgoo?cl00Goo?Of0_ol o?`00oolmoKoo?clooclo01Kooclo00001CoYdlQoj5E8OnWFcCoXDdQoj@^1oodj>Col]gCon?9^oo? WHcoY2h7ojMK=?nQEB7oYdlQoi/f2?o5RG7ojmK=on?9^oolmoKo[ee0oj5=8@;oYdlQ01koXT0:ojM? 8OnWB27oXEDQoj@^1onR@0[oXEX/ojM?8OnR@0[oYd02_nX>PWoXDHGoj99 3?nWB27oXT0:oj5E8OnX>PWoVTdGojM88OnQAQOoXTT0_o[e/d01?o] clkojmK=on_FcOo[e/d2ongMe@09oo?BcOo]gMGolm;=oo3SdOoeg]ool]gConkFeooifMKol>?A00;o m>?L00Oom>STooCGe?odj>Com>?Loo[Qg_odj>Com>?L00?om>ST00Son^_VooCXi?olk_;om>SToocg m_odj>Cono7]ooc^lPCono7]00Coo?Ofoo_akOolmoKono7]0oolmoH00oolo?coo?OfoocgmP1Qoocl o00009?oXEDQojM88OnWCb7oYe@Zoj5=8OnM:@OoYQh7oidY1onT;POoYdlQoj5=8OnWE2[oYe/dojM8 8OnK=PSoWBT7ojHN1onM:@OoYdlQojM;:_nQEB7oYdlQojQB=?nWCb7oXEDQojM;:_nWFcCoYdlQoj5= 8OnWCb7oYe/dojM88OnQEB7oYe@ZojQB=?nWCb7oXEDQojM88OnWFcCoYdlQoj5=8OnWE2[oYe/dojM8 8OnQEB7oYdlQojQB=?nWCb7oXEDQojM;:_nWFcCoYdlQoj5=8OnWCb7oYe/dojM88OnQEB7oYe@ZojQB =?nWCb7oXEDQojM88OnWFcCoYdlQoj5=8OnWE2[oYe/dojM88OnQEB7oYdlQojQB=?nWCb7oXEDQojM; :_nWFcCoYdlQoj5=8OnWCb7oYe/dojM88OnQEB7oYe@ZojQB=?nWCb7oXEDQojM88OnWFcCoYdlQoj5= 8OnWE2[oYe/dojM88OnQEB7oYdlQojQB=?nWCb7oXEDQojM;:_nWFcCoYdlQoj5=8OnWCb7oYe/dojM8 8OnQEB7oYe@ZojQB=?nWCb7oXEDQojM88OnWFcCoYdlQoj5=8OnWE2[oYe/dojM88OnQEB7oYdlQojQB =?nWCb7oXEDQojM;:_nWFcCoYdlQoj5=8OnWCb7oYe/dojM?8OnQCB7o[UL[oj=V?on_GD3o[f=0ojUY ?on_Hd3o^f]Gok5eConbIDoo^W=Gok5iEoneN6;o_8=QokB1HOnoOf[o]XEZolAiJ_nmRFT00_o0QG80 :_o6Vh7oaHUaol2BNOo5UGWoc9N1olbJSOo6Vh7oc9N1olZVToo?WHcocJ>;olZVTooAXY?ocjRBomZY W?oAXY?ofZVLom>eYOoBYigof;2Kom>j[OoM]ZgofZnTom^l[?oI]Z?ofL:[on>_[?oT_;Gofkb/onBl ]OoK_:cohLFdomc1]OoQaKCog<6eonBl]OoSbK_og?AooCGe?o]gMGomMkOoo;Zfoo/h]gomMkOooCSg?odemCol^[KooCXi?oeg]oom>?L oo;Zfooekngom>STooWUg@?om>ST00KonOO/ooCXi?oklNgonnOXoo_akOoeknd2oo_ak@06ooWgk?ol moKono7]ooc^l_olmoKono7]1_olmoH00oolo?coo?Ofooclo01Oooclo00007ooYdPQojMD:_nWCb7o Ye@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[o YdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7o Ye@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[o YdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7o Ye@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[o YdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7o Ye@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[o YdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7oYe@ZojM?8OnWE2[oYdlQojMD:_nWCb7o Ye@ZojM?8OnWE2[oYdlQ00;oYe@Z00KoXeldojiG:on_Hd3o[ee0ok1XA_nYKTH2ok1XAP05ok5iEoni KToo]GQRokehHOnbLeL00_nmRFT02_o4NF[o_HUYol25L_o7SW[o`hiaol2BNOo5UGWoahijolZPS?o8 U882olJKP@0;olZVTooeYOoJZI`00_oI]Z<0 0ooJZIcofKJSomVfX`02omVfX`06omff[OoO]j?ofkb/omk4Z_oM^kKoh;fZ0_oL`KD02_oT_;GohLFd on7@^_oT`[gohLFdomk>b?o[`[cohM2jon_2_?oSbK/2onC?aP0Fon_2_?o/b/Ooion_FcOo^e]OojMg;oo?BcOoZi=?om=ODoo3SdOodemCol>?AooCGe?obj]_o m=ODoo3Sd@;om=OD01;om>?Loo;Mdoodhmcol]gCooCSg?obgM?oo>O]ooCXi?odhmcon^7NooCXi?ol k_;om>?Loo_akOojhMkono7]oo_Wj?oeknd2oo_ak@05ooc^l_oklNgoo?Ojoo_akOoimn`01OolmoH0 1Oolo?coo?Ofooclo?olo?coo?Of00?oo?cl00?oo?Ofooclo?olo?`0Foolo?`00025oglJ1On75@Ko OaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGo QaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@Ko OaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGo QaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@Ko OaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGo QaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@Ko OaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGo QaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@KoOaX5ohLE1_mo6PGoQaD6oglJ1On75@Ko OaX5ohLE1_mo6PGoQaD6oglJ1On75@KoQR07ohLE1_n680OoSQT6ohH/1`02oiDK1P0YohdT1onE6`Ko U2D6oi@U1_nN7@OoU2D6oidY1onD9@KoYQh7oi/f2?nI?0_oXT0:oiU62onQCB7oYdPQoj5A;?nSGcCo Yd/ZojUY?onYH3oo/656ojU^A_nYIDKo[7EGok5^ConbLeOo[WeRok9cEondPF7o]gmZokYcEonfQF[o `8EbokmoJ_nnSW7o`8Ebol2BNOo7SW[o`99iolN>N_o2VH800_o8U8803oo6Vh7oc9Z=olZPS?o?WHco bZ2eY@;ofZnT00CodkFU omVfXooM]ZgodkZ]0_oK_:`03?oL`KGofkb/omc1]OoL`KGoi;beomc1]OoT`[gogong?c_oVeLkojMg;on[BaOo^e]OojmK=onKIeOo[e/d00oo]gMD01?o/ h]gojmK=oncRgOobgM<2oncRg@08oo;Zfooeg]ool^[KooKUj?odj>Com>?LooCXi?ofiNP2ooCXi00: oo_Wj?oekngom>STooc^l_oklNgomNo]oocgm_olk_;oo?OfoocgnP;oo?Of00?oo?cloocgm_olo?`0 Eoolo?`00001\ \>"], "HeaderCell", Evaluatable->False, ImageSize->{350, 24}, ImageMargins->{{0, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}], Cell["Notebook Manipulation: Making a Calendar", "Title"], Cell[TextData[{ "The new capabilities of ", StyleBox["Mathematica", FontSlant->"Italic"], " add many possibilities for notebook manipulation and interface design. \ This notebook describes a few of those tools by way of a calendar program." }], "Text"], Cell[TextData[{ "Press ", ButtonBox["here", ButtonFunction:>FrontEndExecute[ { FrontEnd`FrontEndToken[ ButtonNotebook[ ], "EvaluateInitialization"]}], Active->True, ButtonStyle->"Hyperlink"], " to do the evaluations immediately that are needed to generate a calendar \ window. " }], "DisplayText"], Cell[CellGroupData[{ Cell["Laying Out the Months", "Section"], Cell[TextData[{ "The first step doesn't involve notebook manipulation at all. We need to \ write the basic code to lay out the days of the month in a grid. Luckily, \ much of what we need can be found in the standard ", StyleBox["Mathematica", FontSlant->"Italic"], " package ", StyleBox["Miscellaneous`Calendar`", "InlineInput", FontWeight->"Plain"], "." }], "Text"], Cell[BoxData[ \(Needs["\"]\)], "Input", InitializationCell->True], Cell["\<\ We first ask, \[OpenCurlyDoubleQuote]What day of the week is the first day of \ the month?\[CloseCurlyDoubleQuote]. It will be convenient for us to number \ the days from 1 to 7.\ \>", "Text"], Cell[BoxData[ \(monthstart[month_, \ year_]\ := \[IndentingNewLine]DayOfWeek[{year, month, 1}] /. {Sunday\ \[Rule] \ 1, Monday\ \[Rule] \ 2, Tuesday\ \[Rule] \ 3, Wednesday\ \[Rule] \ 4, Thursday\ \[Rule] \ 5, Friday\ \[Rule] \ 6, Saturday\ \[Rule] \ 7}\)], "Input", InitializationCell->True], Cell["\<\ Next ask, \[OpenCurlyDoubleQuote]How many days are in a month?\ \[CloseCurlyDoubleQuote] We could of course write a look\[Dash]up table based \ on the famous ditty, but to make certain we handle leap years and oddities \ correctly, let us write a function.\ \>", "Text"], Cell[BoxData[ \(dayspermonth[month_, \ year_]\ := \[IndentingNewLine]DaysBetween[{year, month, 1}, \[IndentingNewLine]{If[month \[Equal] 12, year + 1, year], If[month \[Equal] 12, 1, month + 1], 1}]\)], "Input", InitializationCell->True], Cell["\<\ A month can now be laid out by partitioning the entire list of days in chunks \ of seven, padding the ends with empty strings.\ \>", "Text"], Cell[BoxData[ \(monthlayout[month_, \ year_]\ := Partition[Range[dayspermonth[month, year]], \ 7, 7, {monthstart[month, year], 1}, \ "\<\>"\ ]\)], "Input", InitializationCell->True], Cell[TextData["Let\[CloseCurlyQuote]s try this out."], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(monthlayout[1, 2003] // TableForm\)], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"\<\"\"\>", "\<\"\"\>", "\<\"\"\>", "1", "2", "3", "4"}, {"5", "6", "7", "8", "9", "10", "11"}, {"12", "13", "14", "15", "16", "17", "18"}, {"19", "20", "21", "22", "23", "24", "25"}, {"26", "27", "28", "29", "30", "31", "\<\"\"\>"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$]]]], "Output"] }, Closed]], Cell["\<\ Looks good! We\[CloseCurlyQuote]re most of the way there\[Ellipsis]\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Creating the Grid", "Section"], Cell[TextData[{ "With the grid we\[CloseCurlyQuote]ve already created, we have the elements \ necessary for a bare\[Hyphen]bones calendar. It would be nice to improve the \ appearance a bit, however. For instance, we might give it a 3D look with \ colored backgrounds, as well as names for the days and the months. To do \ this, it is convenient to work with ", StyleBox["GridBox", "InlineInput", FontWeight->"Plain"], " objects." }], "Text"], Cell[TextData[{ "We begin by noting that a ", StyleBox["GridBox", "InlineInput", FontWeight->"Plain"], " accepts a list of lists for its argument; precisely what our layout \ function generates. Note that this grid must be rectangular. For irregular \ numbers of columns, we must nest grid boxes. For instance, we can say:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(CellPrint[ Cell[BoxData[ GridBox[{{"\"}, {GridBox[ Prepend[ monthlayout[1, 2003], {"\", "\", "\", "\", \ "\", "\", "\"}]]}}]], \ "\"]]\)], "Input"], Cell[BoxData[GridBox[{ {\(January\ 2003\)}, {GridBox[{ {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, {"", "", "", "1", "2", "3", "4"}, {"5", "6", "7", "8", "9", "10", "11"}, {"12", "13", "14", "15", "16", "17", "18"}, {"19", "20", "21", "22", "23", "24", "25"}, {"26", "27", "28", "29", "30", "31", ""} }]} }]], "Output"] }, Closed]], Cell[TextData[{ "Here we see the first use of notebook functions. ", StyleBox["CellPrint", "InlineInput", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}], " is one of the most basic functions, which writes the cell expression it \ is given into the current notebook, in much the same way that ", StyleBox["Print", "InlineInput", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}], " works." }], "Text"], Cell[TextData[ "We can tell that we will need the abbreviations of the days of the week \ again; we will probably also need the names of the months. Let\ \[CloseCurlyQuote]s assign them to handy symbols."], "Text"], Cell[BoxData[ \(\(alldays\ = \ {"\", \ "\", \ "\", \ "\", \ \ "\", "\", "\"};\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(allmonths\ = \ {"\", \ "\", \ "\", \ \ "\", \ "\", \ "\", "\", \ "\", \ \ "\", \ "\", \ "\", "\"};\)\)], \ "Input", InitializationCell->True], Cell[TextData[{ "Now let\[CloseCurlyQuote]s enhance the appearance of our grid. We do this \ in two ways: by use of button boxes and by use of style boxes. ", StyleBox["ButtonBox", "InlineInput", FontWeight->"Plain"], " objects are normally used to attach an action that is triggered by a \ mouse click to some box expression. We will see an example of this later. \ However, button boxes also have an appealing 3D visual aspect. We will use \ that here by setting each button\[CloseCurlyQuote]s function to ", StyleBox["Null", "InlineInput", FontWeight->"Plain"], ". ", StyleBox["StyleBox", "InlineInput", FontWeight->"Plain"], " wrappers, in contrast, generically apply options to the enclosed boxes. \ Here, we will be concerned with those options controlling aspects of style: \ fonts, colors, and the like. Finally, we can use various options to the grid \ boxes that affect display to improve the look of the calendar." }], "Text"], Cell["\<\ For example, we can place button boxes around the various pieces and control \ their colors.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(CellPrint[ Cell[BoxData[ GridBox[{{ButtonBox["\", Background \[Rule] RGBColor[0.4, \ 0, \ 0.4], ButtonFunction \[Rule] Null]}, {GridBox[ Prepend[ monthlayout[1, 2003] /. i : \((_Integer\ | \ _String)\) \[RuleDelayed] ButtonBox[i, Background \[Rule] RGBColor[1, \ 0.6, \ 0.8], \ ButtonFunction \[Rule] Null], alldays /. s_String \[RuleDelayed] ButtonBox[s, Background \[Rule] RGBColor[0.8, \ 0.2, \ 0.6], ButtonFunction \[Rule] Null]]]}}]], "\"]]\)], "Input"], Cell[BoxData[GridBox[{ { ButtonBox[\(January\ 2003\), ButtonFunction:>Null, Background->RGBColor[0.4, 0, 0.4]]}, {GridBox[{ { ButtonBox["Sun", ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox["Mon", ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox["Tue", ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox["Wed", ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox["Thu", ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox["Fri", ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox["Sat", ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]]}, { ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["1", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["2", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["3", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["4", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["5", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["6", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["7", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["8", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["9", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["10", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["11", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["12", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["13", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["14", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["15", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["16", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["17", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["18", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["19", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["20", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["21", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["22", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["23", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["24", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["25", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["26", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["27", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["28", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["29", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["30", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["31", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]} }]} }]], "Output"] }, Closed]], Cell[TextData[{ "This will look better if we eliminate the space between the rows and \ columns; it will also help to change the colors of the fonts in the headers. \ Finally, this will probably look better if we use the Helvetica font. Font \ changes can be handled by ", StyleBox["StyleBox", "InlineInput", FontWeight->"Plain"], " wrappers, while the grid alignment is handled by ", StyleBox["GridBox", "InlineInput", FontWeight->"Plain"], " options." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(CellPrint[ Cell[BoxData[ StyleBox[ GridBox[{{ButtonBox[ StyleBox["\", FontWeight \[Rule] "\", FontColor \[Rule] GrayLevel[1]], Background \[Rule] RGBColor[0.4, \ 0, \ 0.4], ButtonFunction \[Rule] Null]}, {GridBox[ Prepend[ monthlayout[1, 2003] /. i : \((_Integer\ | \ _String)\) \[RuleDelayed] ButtonBox[i, Background \[Rule] RGBColor[1, \ 0.6, \ 0.8], \ ButtonFunction \[Rule] Null], alldays /. s_String \[RuleDelayed] ButtonBox[ StyleBox[s, FontWeight \[Rule] "\", FontColor \[Rule] GrayLevel[0.8]], Background \[Rule] RGBColor[0.8, \ 0.2, \ 0.6], \[IndentingNewLine]ButtonFunction \ \[Rule] Null]], \ ColumnSpacings\ \[Rule] \ 0, \[IndentingNewLine]RowSpacings\ \[Rule] \ 0, \[IndentingNewLine]ColumnWidths \[Rule] 3, RowMinHeight \[Rule] 1.5]}}, \[IndentingNewLine]RowSpacings \[Rule] 0], FontFamily \[Rule] "\", FontWeight \[Rule] "\"]], "\"]]\)], "Input"], Cell[BoxData[ StyleBox[GridBox[{ { ButtonBox[ StyleBox[\(January\ 2003\), FontWeight->"Bold", FontColor->GrayLevel[1]], ButtonFunction:>Null, Background->RGBColor[0.4, 0, 0.4]]}, {GridBox[{ { ButtonBox[ StyleBox["Sun", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Mon", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Tue", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Wed", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Thu", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Fri", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Sat", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]]}, { ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["1", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["2", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["3", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["4", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["5", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["6", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["7", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["8", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["9", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["10", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["11", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["12", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["13", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["14", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["15", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["16", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["17", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["18", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["19", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["20", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["21", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["22", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["23", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["24", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["25", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["26", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["27", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["28", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["29", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["30", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["31", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]} }, RowSpacings->0, ColumnSpacings->0, ColumnWidths->3, RowMinHeight->1.5]} }, RowSpacings->0], FontFamily->"Helvetica", FontWeight->"Plain"]], "Output"] }, Closed]], Cell[TextData[{ "This progression of successively adding features to the layout as you \ develop the format you want is natural to ", StyleBox["Mathematica", FontSlant->"Italic"], ". It is very easy to test modifications by interactively adjusting the \ inputs. For instance, suppose we wanted a different color set; it is a matter \ of instants to change the RGB values in the preceding expression to test \ different possibilities. The incremental structure also allows us to test the \ core of our layout before adding less essential aspects (such as color and \ font) to the expression." }], "Text"], Cell[TextData[ "Now that we have a grid we like, let\[CloseCurlyQuote]s put it in a \ function."], "Text"], Cell[BoxData[ \(monthgrid[month_, \ year_]\ := \[IndentingNewLine]StyleBox[ GridBox[{{ButtonBox[ StyleBox[ allmonths\[LeftDoubleBracket] month\[RightDoubleBracket] <> "\< \>" <> ToString[year], FontWeight \[Rule] "\", FontColor \[Rule] GrayLevel[1]], Background \[Rule] RGBColor[0.4, \ 0, \ 0.4], ButtonFunction \[Rule] Null]}, {GridBox[ Prepend[ monthlayout[month, year] /. i : \((_Integer\ | \ _String)\) \[RuleDelayed] ButtonBox[i, Background \[Rule] RGBColor[1, \ 0.6, \ 0.8], \ ButtonFunction \[Rule] Null], alldays /. s_String \[RuleDelayed] ButtonBox[ StyleBox[s, FontWeight \[Rule] "\", FontColor \[Rule] GrayLevel[0.8]], Background \[Rule] RGBColor[0.8, \ 0.2, \ 0.6], ButtonFunction \[Rule] Null]], \ ColumnSpacings\ \[Rule] \ 0, \[IndentingNewLine]\ RowSpacings\ \[Rule] \ 0, \[IndentingNewLine]ColumnWidths \[Rule] 3, \[IndentingNewLine]RowMinHeight \[Rule] 1.5]}}, \[IndentingNewLine]RowSpacings \[Rule] 0], \[IndentingNewLine]FontFamily \[Rule] "\", FontWeight \[Rule] "\"]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(CellPrint[ Cell[BoxData[ monthgrid[3, 2002]], \[IndentingNewLine]"\"]]\)], "Input"], Cell[BoxData[ StyleBox[GridBox[{ { ButtonBox[ StyleBox[\(March\ 2002\), FontWeight->"Bold", FontColor->GrayLevel[1]], ButtonFunction:>Null, Background->RGBColor[0.4, 0, 0.4]]}, {GridBox[{ { ButtonBox[ StyleBox["Sun", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Mon", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Tue", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Wed", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Thu", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Fri", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]], ButtonBox[ StyleBox["Sat", FontWeight->"Bold", FontColor->GrayLevel[0.8]], ButtonFunction:>Null, Background->RGBColor[0.8, 0.2, 0.6]]}, { ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["1", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["2", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["3", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["4", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["5", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["6", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["7", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["8", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["9", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["10", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["11", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["12", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["13", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["14", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["15", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["16", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["17", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["18", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["19", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["20", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["21", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["22", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["23", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["24", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["25", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["26", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["27", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["28", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["29", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["30", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]}, { ButtonBox["31", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]], ButtonBox["", ButtonFunction:>Null, Background->RGBColor[1, 0.6, 0.8]]} }, RowSpacings->0, ColumnSpacings->0, ColumnWidths->3, RowMinHeight->1.5]} }, RowSpacings->0], FontFamily->"Helvetica", FontWeight->"Plain"]], "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Making Cells and Notebooks", "Section"], Cell[TextData[{ "The basic arrangement of a ", StyleBox["Mathematica", FontSlant->"Italic"], " document, or notebook, is a hierarchical nesting of cells (chunks of \ text, typesetting, graphics, etc.). This is easily representable as a ", StyleBox["Mathematica", FontSlant->"Italic"], " expression, and in fact, this is how the front end stores a notebook. For \ example:" }], "Text"], Cell[TextData[{ "Notebook[{\n\tCell[CellGroupData[{\n\t\tCell[", StyleBox["cell contents", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], ", ", StyleBox["style", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], ", ", StyleBox["cell options", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], "],\n\t\tCell[", StyleBox["cell contents", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], ", ", StyleBox["style", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], ", ", StyleBox["cell options", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], "]\n\t\t}, ", StyleBox["group state", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], "]\n\t],\n\tCell[", StyleBox["cell contents", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], ", ", StyleBox["style", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], ", ", StyleBox["cell options", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], "]\n}, ", StyleBox["notebook options", FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], "]" }], "DisplayText", Evaluatable->False, FontFamily->"Courier"], Cell[TextData[{ "If we create an expression of this form, we can direct the front end to \ turn it into a window with the command ", StyleBox["NotebookPut", "InlineInput", FontWeight->"Plain"], ". Alternately, we could create an empty notebook window with ", StyleBox["NotebookCreate", "InlineInput", FontWeight->"Plain"], ", then fill it by writing into it with ", StyleBox["NotebookWrite", "InlineInput", FontWeight->"Plain"], " and setting its options with ", StyleBox["SetOptions", "InlineInput", FontWeight->"Plain"], "." }], "Text"], Cell["\<\ In this case, we would like to create a palette\[Hyphen]style window, and \ fill it as much as possible with the grid specifying the month. We do this by \ creating a notebook with one cell, setting the options of that cell and the \ notebook to control the overall appearance.\ \>", "Text"], Cell["For example, in the simplest form, we can say:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(NotebookPut[ Notebook[{Cell[BoxData[monthgrid[1, 2003]], \ NotebookDefault]}]]\)], "Input"], Cell[BoxData[ InterpretationBox[\(NotebookObject[\[LeftSkeleton]"Untitled-5"\ \[RightSkeleton]]\), NotebookObject[ FrontEndObject[ LinkObject[ "ParentLink", 1, 1]], 69], Editable->False]], "Output"] }, Closed]], Cell[TextData[ "Here, all the cell and notebook options take on default values. We even \ specify a default style for the cell (which means that we don\ \[CloseCurlyQuote]t care to adopt any values from an existing cell style; \ this won\[CloseCurlyQuote]t always be the case)."], "Text"], Cell["\<\ We can write a variant of this that changes the appearance a bit.\ \>", "Text"], Cell[BoxData[ \(\(NotebookPut[ Notebook[{Cell[BoxData[monthgrid[1, 2003]], \ NotebookDefault, CellMargins\ \[Rule] {{0, 0}, {0, 0}}, ShowCellBracket \[Rule] False]}, WindowElements \[Rule] {}, WindowFrameElements \[Rule] "\", WindowSize \[Rule] {252, 134}, WindowFrame \[Rule] "\", WindowTitle \[Rule] "\", Background \[Rule] RGBColor[0.4, \ 0, \ 0.4], \[IndentingNewLine]ScrollingOptions\ \[Rule] \ \ {"\" \[Rule] True, \ "\" \[Rule] True}]];\)\)], "Input"], Cell[TextData[{ "Most of these options are fairly simple. The ", StyleBox["CellMargins", "InlineInput", FontWeight->"Plain"], " option gives the space around the cell, expressed in points, in the order \ {{", StyleBox["left", FontSlant->"Italic"], ", ", StyleBox["right", FontSlant->"Italic"], "}, {", StyleBox["bottom", FontSlant->"Italic"], ", ", StyleBox["top", FontSlant->"Italic"], "}}. The ", StyleBox["WindowElements", "InlineInput", FontWeight->"Plain"], " option controls things at the notebook level like scroll bars and the \ status area, while the ", StyleBox["WindowFrameElements", "InlineInput", FontWeight->"Plain"], " are items that appear in the frame, such as the close box, resize area, \ and zoom box." }], "Text"], Cell[TextData[{ "To this point, we've been writing cell expressions into the current \ notebook with ", StyleBox["CellPrint", "InlineInput", FontWeight->"Plain"], ". However, we may want finer control in some situations, writing the \ expression into an arbitrary notebook. The standard tool for this is ", StyleBox["NotebookWrite", "InlineInput", FontWeight->"Plain"], ", which in one form is expressed as ", StyleBox["NotebookWrite[", "InlineInput", FontWeight->"Plain"], StyleBox["nbobj", "InlineInput", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[", ", "InlineInput", FontWeight->"Plain"], StyleBox["cellexpr", "InlineInput", FontWeight->"Plain", FontSlant->"Italic"], StyleBox["]", "InlineInput", FontWeight->"Plain"], ". Some of the standard notebook objects that can be used for ", StyleBox["nbobj", "InlineInput", FontWeight->"Plain", FontSlant->"Italic"], " include the ", StyleBox["SelectedNotebook[]", "InlineInput", FontWeight->"Plain"], ", the ", StyleBox["ButtonNotebook[]", "InlineInput", FontWeight->"Plain"], ", the ", StyleBox["EvaluationNotebook[]", "InlineInput", FontWeight->"Plain"], ", and the ", StyleBox["InputNotebook[]", "InlineInput", FontWeight->"Plain"], ". If you know the specific notebook object (for instance, returned by ", StyleBox["NotebookPut", "InlineInput", FontWeight->"Plain"], " or selected from the list returned by ", StyleBox["Notebooks", "InlineInput", FontWeight->"Plain"], "), you can use that in the same place as one of these notebooks." }], "Text"], Cell[TextData[{ "Other operations on notebooks include putting or getting entire notebook \ expressions (", StyleBox["NotebookPut", "InlineInput", FontWeight->"Plain"], ", ", StyleBox["NotebookGet", "InlineInput", FontWeight->"Plain"], "), writing to or reading from existing notebooks (", StyleBox["NotebookWrite", "InlineInput", FontWeight->"Plain"], ", ", StyleBox["NotebookRead", "InlineInput", FontWeight->"Plain"], "). There are a host of other operations for manipulating selections and \ notebook contents, which are documented in the ", StyleBox["Mathematica", FontSlant->"Italic"], " book." }], "Text"], Cell["\<\ We will put these concepts into a function after one more issue is handled: \ controlling the calendar.\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Actions in the Interface", "Section"], Cell[TextData[{ "As intimated previously, buttons are commonly used to ", StyleBox["do", FontSlant->"Italic"], " things, not sit around looking pretty. One thing that we might like to do \ in this calendar is to change to different months. The simplest interface for \ this would let us scroll to the next or the previous month from the one \ currently displayed. So, we might create a \[OpenCurlyDoubleQuote]Next\ \[CloseCurlyDoubleQuote] and a \[OpenCurlyDoubleQuote]Previous\ \[CloseCurlyDoubleQuote] button." }], "Text"], Cell[TextData[{ "A button is a box expression with a function attached to it. That function \ is in an option, called, naturally enough, ", StyleBox["ButtonFunction", "InlineInput", FontWeight->"Plain"], ". That function can be any ", StyleBox["Mathematica", FontSlant->"Italic"], " function. Another option, called ", StyleBox["ButtonEvaluator", "InlineInput", FontWeight->"Plain"], ", tells the button where to evaluate the function. A very limited set of \ functions (consisting solely of notebook operations) can be evaluated \ entirely in the front end, but most need to go to the current ", StyleBox["Mathematica", FontSlant->"Italic"], " kernel to be effective. (Others might be directed to a dedicated kernel, \ or to another application connected via ", StyleBox["MathLink", FontSlant->"Italic"], ".) For example, here we use the technique demonstrated in the section on \ writing grids to write out a button that pops up our calendar." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(CellPrint[ Cell[BoxData[ ButtonBox["\", \ \[IndentingNewLine]ButtonEvaluator\ \[Rule] Automatic, \ Active \[Rule] True, \[IndentingNewLine]ButtonFunction \[RuleDelayed] NotebookPut[ Notebook[{Cell[BoxData[monthgrid[1, 2002]], \ NotebookDefault, CellMargins\ \[Rule] {{0, 0}, {0, 0}}, ShowCellBracket \[Rule] False]}, WindowElements \[Rule] {}, WindowFrameElements \[Rule] "\", WindowSize \[Rule] {252, 134}, WindowFrame \[Rule] "\", WindowTitle \[Rule] "\", Background \[Rule] RGBColor[0.4, \ 0, \ 0.4]]]]], "\", \ \[IndentingNewLine]CellEditDuplicate \[Rule] False]]\)], "Input"], Cell[BoxData[ ButtonBox[\(Calendar\ for\ January\ 2002\), ButtonFunction:>NotebookPut[ Notebook[ { Cell[ BoxData[ monthgrid[ 1, 2002]], NotebookDefault, CellMargins -> {{0, 0}, {0, 0}}, ShowCellBracket -> False]}, WindowElements -> {}, WindowFrameElements -> "CloseBox", WindowSize -> {252, 134}, WindowFrame -> "Palette", WindowTitle -> "Calendar", Background -> RGBColor[ 0.40000000000000002, 0, 0.40000000000000002]]], ButtonEvaluator->Automatic, Active->True]], "Output", CellEditDuplicate->False] }, Closed]], Cell[TextData[{ "A button function can actually be a ", StyleBox["Mathematica", FontSlant->"Italic"], " pure function, whose arguments come from the contents of the button box, \ the ", StyleBox["ButtonData", "InlineInput", FontWeight->"Plain"], " option, or a location specified by the ", StyleBox["ButtonSource", "InlineInput", FontWeight->"Plain"], " option. However, for our purposes, we can start with a simpler model, and \ take the data from global variables." }], "Text"], Cell["\<\ Actually, it is, properly speaking, poor form to store the program state in \ global variables when it might be stored in the notebook. Caching information \ in the notebook allows you to save it and reopen it between sessions without \ losing the state of the notebook. The next section will examine this \ alternative.\ \>", "Text"], Cell["\<\ What portion of the state do we want to preserve? The month and the year seem \ the logical canidates.\ \>", "Text"], Cell[BoxData[{ \(\($CurrentCalendarMakerYear\ = \ 2000;\)\), "\n", \(\($CurrentCalendarMakerMonth\ = \ 9;\)\)}], "Input"], Cell["\<\ Then, one button increments the month and displays a calender, while the \ other decrements (both wrapping appropriately at year boundaries).\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(CellPrint[ Cell[BoxData[ RowBox[{\[IndentingNewLine]ButtonBox["\", \ \[IndentingNewLine]ButtonEvaluator\ \[Rule] Automatic, \[IndentingNewLine]Active \[Rule] True, \[IndentingNewLine]ButtonFunction \[RuleDelayed] \ \((\(--$CurrentCalendarMakerMonth\); \ \[IndentingNewLine]If[$CurrentCalendarMakerMonth \[Equal] 0, $CurrentCalendarMakerMonth = 12; \[IndentingNewLine]\(--$CurrentCalendarMakerYear\)\ ]; \[IndentingNewLine]NotebookPut[ Notebook[{Cell[ BoxData[\[IndentingNewLine]monthgrid[$\ CurrentCalendarMakerMonth, $CurrentCalendarMakerYear]], \ \[IndentingNewLine]NotebookDefault, \[IndentingNewLine]CellMargins\ \[Rule] \ {{0, 0}, {0, 0}}, \[IndentingNewLine]ShowCellBracket \[Rule] False]}, \[IndentingNewLine]WindowElements \ \[Rule] {}, WindowFrameElements \[Rule] "\", WindowSize \[Rule] {252, 134}, WindowFrame \[Rule] "\", WindowTitle \[Rule] "\", Background \[Rule] RGBColor[0.4, \ 0, \ 0.4]]])\)], \ \[IndentingNewLine]ButtonBox["\", \[IndentingNewLine]ButtonEvaluator\ \ \[Rule] Automatic, \ Active \[Rule] True, ButtonFunction \[RuleDelayed] \ \((\(++$CurrentCalendarMakerMonth\); If[$CurrentCalendarMakerMonth \[Equal] 13, $CurrentCalendarMakerMonth = 1; \(++$CurrentCalendarMakerYear\)]; NotebookPut[ Notebook[{Cell[ BoxData[\[IndentingNewLine]monthgrid[$\ CurrentCalendarMakerMonth, $CurrentCalendarMakerYear]], \ NotebookDefault, CellMargins\ \[Rule] {{0, 0}, {0, 0}}, ShowCellBracket \[Rule] False]}, WindowElements \[Rule] {}, WindowFrameElements \[Rule] "\", WindowSize \[Rule] {252, 134}, WindowFrame \[Rule] "\", WindowTitle \[Rule] "\", Background \[Rule] RGBColor[0.4, \ 0, \ 0.4]\[IndentingNewLine]]])\)]}]], \ \ "\"]]\)], "Input"], Cell[BoxData[ RowBox[{ ButtonBox["Previous", ButtonFunction:>CompoundExpression[ PreDecrement[ $CurrentCalendarMakerMonth], If[ Equal[ $CurrentCalendarMakerMonth, 0], CompoundExpression[ Set[ $CurrentCalendarMakerMonth, 12], PreDecrement[ $CurrentCalendarMakerYear]]], NotebookPut[ Notebook[ { Cell[ BoxData[ monthgrid[ $CurrentCalendarMakerMonth, \ $CurrentCalendarMakerYear]], NotebookDefault, CellMargins -> {{0, 0}, {0, 0}}, ShowCellBracket -> False]}, WindowElements -> {}, WindowFrameElements -> "CloseBox", WindowSize -> {252, 134}, WindowFrame -> "Palette", WindowTitle -> "Calendar", Background -> RGBColor[ 0.40000000000000002, 0, 0.40000000000000002]]]], ButtonEvaluator->Automatic, Active->True], ButtonBox["Next", ButtonFunction:>CompoundExpression[ PreIncrement[ $CurrentCalendarMakerMonth], If[ Equal[ $CurrentCalendarMakerMonth, 13], CompoundExpression[ Set[ $CurrentCalendarMakerMonth, 1], PreIncrement[ $CurrentCalendarMakerYear]]], NotebookPut[ Notebook[ { Cell[ BoxData[ monthgrid[ $CurrentCalendarMakerMonth, \ $CurrentCalendarMakerYear]], NotebookDefault, CellMargins -> {{0, 0}, {0, 0}}, ShowCellBracket -> False]}, WindowElements -> {}, WindowFrameElements -> "CloseBox", WindowSize -> {252, 134}, WindowFrame -> "Palette", WindowTitle -> "Calendar", Background -> RGBColor[ 0.40000000000000002, 0, 0.40000000000000002]]]], ButtonEvaluator->Automatic, Active->True]}]], "Output"] }, Closed]], Cell["\<\ Well, notwithstanding the redundant code, the principle is sound; but we are \ getting a new window with each button click! This is not good\[Ellipsis] \ However, we can resolve that issue and tie together all the pieces in the \ final section.\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Making the Calendar", "Section"], Cell[TextData[{ "We now have most of the pieces we need to make our calendar application. \ The only remaining tool is one to ", StyleBox["replace", FontSlant->"Italic"], " the current calendar grid with a new one, rather than creating a new \ window. Several techniques are possible. For instance, ", StyleBox["NotebookPut", "InlineInput", FontWeight->"Plain"], " can take an additional argument that is a notebook object; in that case, \ the named notebook will be replaced ", StyleBox["in toto", FontSlant->"Italic"], ". Another method is to move the current location to the top of the \ notebook, then select the first cell in the notebook. This will work if you \ can guarantee the structure of the notebook, but it is usually better (more \ robust) to use a third technique: tag the target cell when it is created, \ then locate it by the ", StyleBox["NotebookFind", "InlineInput", FontWeight->"Plain"], " command. ", StyleBox["NotebookFind", "InlineInput", FontWeight->"Plain"], " is used in general to search a notebook, but with the specific form ", StyleBox["NotebookFind[", "InlineInput", FontWeight->"Plain"], StyleBox["notebook object", FontSlant->"Italic"], StyleBox[", ", "InlineInput"], StyleBox["tag", FontSlant->"Italic"], StyleBox[", ", "InlineInput"], StyleBox["All, CellTags]", "InlineInput", FontWeight->"Plain"], ", it will select the tagged cell(s). Use the ", StyleBox["CellTags \[Rule] \"", "InlineInput", FontWeight->"Plain"], StyleBox["tag", FontSlant->"Italic"], StyleBox["\"", "InlineInput", FontWeight->"Plain"], " option at the cell level to specify a tag." }], "Text"], Cell[TextData[{ "Now, putting everything together in a modular fashion, we start with a \ function that creates the grid cell. We add a fillip to color the current \ date red; we also place the buttons that change the month with the title. In \ principle, we should simply recode ", StyleBox["monthgrid", "InlineInput", FontWeight->"Plain"], ", but as an example of working from an existing code base, we will \ transform our current result." }], "Text"], Cell[BoxData[ \(monthcell[month_, \ year_]\ := \[IndentingNewLine]Cell[ BoxData[monthgrid[month, year] /. Join[{{ButtonBox[ title_, ___]}\ :> {GridBox[{{ButtonBox[ AdjustmentBox[ StyleBox["\<\[DoubleLongLeftArrow]\>", FontColor \[Rule] GrayLevel[1]], BoxMargins\ \[Rule] \ {{0.2, 3}, {0.8, 0.8}}], \[IndentingNewLine]ButtonFrame \ \[Rule] None, \[IndentingNewLine]Active \[Rule] True, ButtonEvaluator \[Rule] Automatic, ButtonFunction \[RuleDelayed] changemonth[ Decrement]], \[IndentingNewLine]AdjustmentBox[ title, BoxMargins\ -> \ {{0, 0}, {0.7, 0.7}}], \[IndentingNewLine]ButtonBox[ AdjustmentBox[ StyleBox["\<\[DoubleLongRightArrow]\>", FontColor \[Rule] GrayLevel[1]], BoxMargins\ \[Rule] \ {{3, 0.2}, {0.8, 0.8}}], \[IndentingNewLine]ButtonFrame \ \[Rule] None, \[IndentingNewLine]Active \[Rule] True, ButtonEvaluator \[Rule] Automatic, ButtonFunction \[RuleDelayed] changemonth[Increment]]}}, ColumnWidths\ \[Rule] {5, 9, 5}, \[IndentingNewLine]RowMinHeight\ \[Rule] \ 2, \[IndentingNewLine]RowAlignments\ \[Rule] \ Top]}}, \[IndentingNewLine]If[{year, month}\ === \ Take[Date[], 2], {ButtonBox[ d : Evaluate[\(Date[]\)\[LeftDoubleBracket]3\ \[RightDoubleBracket]], opts___] \[RuleDelayed] ButtonBox[d, Background \[Rule] RGBColor[1. , \ 0.2, \ 0.4], opts]}, {}]]], \[IndentingNewLine]\ NotebookDefault, CellMargins\ \[Rule] {{0, 0}, {0, 0}}, ShowCellBracket \[Rule] False, \[IndentingNewLine]Active \[Rule] True, CellTags \[Rule] "\"]\)], "Input", InitializationCell->True], Cell[TextData[{ "The button functions for incrementing and decrementing the current month \ can be combined into one function. Here, let ", StyleBox["op", "InlineInput", FontWeight->"Plain"], " be ", StyleBox["Increment", "InlineInput", FontWeight->"Plain"], " or ", StyleBox["Decrement", "InlineInput", FontWeight->"Plain"], ", depending on which way you want to go." }], "Text"], Cell[TextData[{ "We can also handle the issue of storing the state of the calendar \ properly, storing the current month with the notebook rather than depending \ on the global variables. This allows us to have multiple calendars; we can \ also save a calendar, and expect it to work once the supporting functions \ have been evaluated. There exists an option calling ", StyleBox["TaggingRules", "InlineInput", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}], " which can be used to store an arbitrary ", StyleBox["Mathematica", FontSlant->"Italic"], " expression at the notebook, cell, or style box levels. By convention, we \ usually store a list of ", StyleBox["\"", "InlineInput", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}], StyleBox["tagstring", "InlineInput", FontWeight->"Plain", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], StyleBox["\" \[Rule] ", "InlineInput", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}], StyleBox["value", "InlineInput", FontWeight->"Plain", FontSlant->"Italic", FontVariations->{"CompatibilityType"->0}], " rules with the ", StyleBox["TaggingRules", "InlineInput", FontWeight->"Plain", FontVariations->{"CompatibilityType"->0}], ", allowing multiple overlapping uses. Here, we use the ", StyleBox["TaggingRules", "InlineInput", FontWeight->"Plain"], " associated with the whole notebook, which can be accessed via ", StyleBox["Options[ButtonNotebook[], TaggingRules]", "InlineInput", FontWeight->"Plain"], ". The tag string we will call ", StyleBox["\"CalendarInformation\"", "InlineInput", FontWeight->"Plain"], "." }], "Text"], Cell[BoxData[ \(changemonth[ op_]\ := \[IndentingNewLine]Module[{month, \ year}, \[IndentingNewLine]{month, \ year}\ = \ "\" /. \((TaggingRules /. Options[ButtonNotebook[], \ TaggingRules])\); op[month]; \[IndentingNewLine]Switch[month, \[IndentingNewLine]0, month = 12; op[year], \[IndentingNewLine]13, month = 1; op[year]]; \[IndentingNewLine]NotebookFind[ ButtonNotebook[], \ "\", \ All, \ CellTags]; \[IndentingNewLine]SetOptions[ ButtonNotebook[], \[IndentingNewLine]TaggingRules\ \[Rule] \ \ {"\"\ \[Rule] \ {month, \ year}}]; \[IndentingNewLine]NotebookWrite[ButtonNotebook[], monthcell[month, year], AutoScroll \[Rule] False]]\)], "Input", InitializationCell->True], Cell["\<\ Now we write the user\[Dash]level function that initializes the state and \ creates the notebook.\ \>", "Text"], Cell[BoxData[ \(MakeCalendar[month_, \ year_]\ := \[IndentingNewLine]NotebookPut[ Notebook[{monthcell[month, year]}, WindowElements \[Rule] {}, WindowFrameElements \[Rule] "\", WindowSize \[Rule] {Fit, 165}, WindowClickSelect \[Rule] False, WindowFrame \[Rule] "\", WindowTitle \[Rule] "\", \[IndentingNewLine]Active \ \[Rule] True, Background \[Rule] RGBColor[0.4, \ 0, \ 0.4], \[IndentingNewLine]ScrollingOptions\ \[Rule] \ \ {"\" \[Rule] True, \ "\" \[Rule] True}, \[IndentingNewLine]TaggingRules\ \[Rule] \ \ {"\"\ \[Rule] \ {month, \ year}}]]\)], "Input", InitializationCell->True], Cell[TextData[{ "MakeCalendar should accept the standard ", StyleBox["Mathematica", FontSlant->"Italic"], " date format." }], "Text"], Cell[BoxData[ \(MakeCalendar[{y_, m_, ___}] := MakeCalendar[m, y]\)], "Input", InitializationCell->True], Cell[BoxData[ \(MakeCalendar[] := MakeCalendar[Date[]]\)], "Input", InitializationCell->True], Cell["Let\[CloseCurlyQuote]s try it out!", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(MakeCalendar[]\)], "Input", InitializationCell->True], Cell[BoxData[ InterpretationBox[\(NotebookObject[\[LeftSkeleton]"Calendar"\ \[RightSkeleton]]\), NotebookObject[ FrontEndObject[ LinkObject[ "ParentLink", 1, 1]], 71], Editable->False]], "Output"] }, Closed]], Cell[TextData[ "Of course, a very large number of variants are possible. For instance, since \ each day is a button, those buttons could be made to call up a scheduler; \ alternately, they could access data relevant to the date. The days could be \ color\[Dash]coded for your favorite data set, e.g., stock performance or \ maximum temperature."], "Text"], Cell["\<\ Many other notebook manipulation techniques exist, but this example hopefully \ gives a sense of a few of the tools that are available.\ \>", "Text"] }, Closed]] }, FrontEndVersion->"5.0 for Macintosh", ScreenRectangle->{{4, 1152}, {0, 746}}, AutoGeneratedPackage->None, WindowSize->{500, 500}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, StyleDefinitions -> "Demo.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->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[1754, 51, 27476, 343, 24, 27363, 339, "GraphicsData", "Bitmap", \ "HeaderCell", Evaluatable->False], Cell[29233, 396, 57, 0, 97, "Title"], Cell[29293, 398, 262, 6, 57, "Text"], Cell[29558, 406, 334, 10, 61, "DisplayText"], Cell[CellGroupData[{ Cell[29917, 420, 40, 0, 78, "Section"], Cell[29960, 422, 385, 10, 71, "Text"], Cell[30348, 434, 97, 2, 31, "Input", InitializationCell->True], Cell[30448, 438, 202, 4, 43, "Text"], Cell[30653, 444, 361, 7, 95, "Input", InitializationCell->True], Cell[31017, 453, 280, 5, 57, "Text"], Cell[31300, 460, 275, 5, 79, "Input", InitializationCell->True], Cell[31578, 467, 150, 3, 43, "Text"], Cell[31731, 472, 204, 4, 63, "Input", InitializationCell->True], Cell[31938, 478, 62, 0, 29, "Text"], Cell[CellGroupData[{ Cell[32025, 482, 66, 1, 31, "Input"], Cell[32094, 485, 524, 13, 120, "Output"] }, Closed]], Cell[32633, 501, 91, 2, 29, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[32761, 508, 36, 0, 47, "Section"], Cell[32800, 510, 452, 9, 85, "Text"], Cell[33255, 521, 345, 7, 71, "Text"], Cell[CellGroupData[{ Cell[33625, 532, 310, 7, 127, "Input"], Cell[33938, 541, 448, 10, 140, "Output"] }, Closed]], Cell[34401, 554, 455, 11, 57, "Text"], Cell[34859, 567, 214, 3, 57, "Text"], Cell[35076, 572, 167, 3, 47, "Input", InitializationCell->True], Cell[35246, 577, 276, 5, 79, "Input", InitializationCell->True], Cell[35525, 584, 963, 18, 141, "Text"], Cell[36491, 604, 116, 3, 43, "Text"], Cell[CellGroupData[{ Cell[36632, 611, 849, 17, 303, "Input"], Cell[37484, 630, 5647, 139, 182, "Output"] }, Closed]], Cell[43146, 772, 483, 11, 71, "Text"], Cell[CellGroupData[{ Cell[43654, 787, 1573, 30, 495, "Input"], Cell[45230, 819, 7105, 171, 172, "Output"] }, Closed]], Cell[52350, 993, 613, 11, 113, "Text"], Cell[52966, 1006, 106, 2, 29, "Text"], Cell[53075, 1010, 1613, 30, 463, "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[54713, 1044, 128, 3, 47, "Input"], Cell[54844, 1049, 8038, 193, 192, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[62931, 1248, 45, 0, 47, "Section"], Cell[62979, 1250, 402, 10, 71, "Text"], Cell[63384, 1262, 1373, 59, 183, "DisplayText", Evaluatable->False], Cell[64760, 1323, 572, 15, 71, "Text"], Cell[65335, 1340, 301, 5, 71, "Text"], Cell[65639, 1347, 62, 0, 29, "Text"], Cell[CellGroupData[{ Cell[65726, 1351, 130, 3, 79, "Input"], Cell[65859, 1356, 234, 6, 46, "Output"] }, Closed]], Cell[66108, 1365, 288, 4, 57, "Text"], Cell[66399, 1371, 89, 2, 29, "Text"], Cell[66491, 1375, 661, 12, 255, "Input"], Cell[67155, 1389, 792, 26, 85, "Text"], Cell[67950, 1417, 1626, 45, 155, "Text"], Cell[69579, 1464, 654, 19, 85, "Text"], Cell[70236, 1485, 127, 3, 43, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[70400, 1493, 43, 0, 47, "Section"], Cell[70446, 1495, 534, 10, 85, "Text"], Cell[70983, 1507, 1000, 22, 141, "Text"], Cell[CellGroupData[{ Cell[72008, 1533, 973, 20, 351, "Input"], Cell[72984, 1555, 634, 13, 51, "Output"] }, Closed]], Cell[73633, 1571, 505, 13, 71, "Text"], Cell[74141, 1586, 344, 6, 71, "Text"], Cell[74488, 1594, 126, 3, 43, "Text"], Cell[74617, 1599, 132, 2, 47, "Input"], Cell[74752, 1603, 165, 3, 43, "Text"], Cell[CellGroupData[{ Cell[74942, 1610, 2537, 46, 799, "Input"], Cell[77482, 1658, 2032, 45, 51, "Output"] }, Closed]], Cell[79529, 1706, 268, 5, 57, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[79834, 1716, 38, 0, 47, "Section"], Cell[79875, 1718, 1693, 42, 183, "Text"], Cell[81571, 1762, 464, 9, 85, "Text"], Cell[82038, 1773, 2443, 41, 671, "Input", InitializationCell->True], Cell[84484, 1816, 406, 12, 57, "Text"], Cell[84893, 1830, 1738, 42, 169, "Text"], Cell[86634, 1874, 892, 15, 287, "Input", InitializationCell->True], Cell[87529, 1891, 121, 3, 43, "Text"], Cell[87653, 1896, 796, 14, 271, "Input", InitializationCell->True], Cell[88452, 1912, 143, 5, 29, "Text"], Cell[88598, 1919, 110, 2, 31, "Input", InitializationCell->True], Cell[88711, 1923, 99, 2, 31, "Input", InitializationCell->True], Cell[88813, 1927, 50, 0, 29, "Text"], Cell[CellGroupData[{ Cell[88888, 1931, 75, 2, 31, "Input", InitializationCell->True], Cell[88966, 1935, 232, 6, 46, "Output"] }, Closed]], Cell[89213, 1944, 355, 5, 71, "Text"], Cell[89571, 1951, 159, 3, 43, "Text"] }, Closed]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)