(**************** Content-type: application/mathematica **************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 324895, 7302]*) (*NotebookOutlinePosition[ 330199, 7436]*) (* CellTagsIndexPosition[ 328991, 7405]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Source code for ButtonTools", "Title"], Cell["June 9th 2002", "Subsubtitle"], Cell[CellGroupData[{ Cell[TextData[{ "ButtonTools 3.0.2, Rolf Mertig, ", ButtonBox["(Mertig Consulting)", ButtonData:>{ URL[ "http://www.mertig.com"], None}, ButtonStyle->"Hyperlink"] }], "Subtitle"], Cell["\<\ Selecting this notebook and clicking on the HP button of the ButtonTools \ palette will create a horizontal palette. You can eliminate or add your own buttons and create your custom palette. \ Each button is created by clicking inside its code (inside the section cell) \ and clicking the F2B button.\ \>", "Text"], Cell[CellGroupData[{ Cell["Tools for manipulating Notebooks and the Front End", "Section"], Cell[TextData[{ "This version should be used with ", StyleBox["Mathematica", FontSlant->"Italic"], " 4.0 and newer, though some buttons will also work in 3.0" }], "Text"], Cell[CellGroupData[{ Cell[TextData[StyleBox["Help", FontColor->RGBColor[0.8, 0.200015, 0.2], Background->GrayLevel[1]]], "Subsection"], Cell["\<\ NotebookPut@Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ \"ButtonTools 3.0.2 \", ButtonBox[\" Mertig Consulting\", ButtonData:>{ URL[ \"http://www.mertig.com\"], None}, ButtonStyle->\"Hyperlink\"] }], \"Title\"], Cell[CellGroupData[{ Cell[\"Tools for manipulating Notebooks and the Front End\", \"Section 1\"], Cell[TextData[{ \"Working with the \", StyleBox[\"Mathematica\", FontSlant->\"Italic\"], \" FrontEnd one often needs certain actions which are not readily \ available. \\ Over the years I programmed some buttons which I found useful. All of this \\ code may be modified, copied, etc. . Let me know if you have a nicer design \ \\ on how to label the buttons (or use icons) and how to color them.\" }], \"Text\"], Cell[TextData[{ \"This version should be used with \", StyleBox[\"Mathematica\", FontSlant->\"Italic\"], \" 4.0 or higher, though some buttons will also work in 3.0.\\nIf you want \ to \\ use the JURL button, get JLink 2.0 .\" }], \"Text\"] }, Open ]], Cell[CellGroupData[{ Cell[\"Legal notice and Credits\", \"Section 1\"], Cell[\"\\<\\ For the moment all Butons of ButtonTools are free software. You may use and \ \\ redistribute, but not sell it. If you find any problems you may write me an email but I may ignore you \\ (unless you pay for my time \\[HappySmiley]).\\ \\>\", \"Text\"], Cell[\"\\<\\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS \\\"AS IS\\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \\ \\>\", \"Text\"], Cell[TextData[{ \"Credits: \\n\\nJURL is based on the NotebookOpenURL and the GetURL \ function \\ from J/Link as described in section 1.3.3 of the J/Link manual by Todd Gayley \ \\ to be found at \", ButtonBox[\"http://www.wolfram.com/solutions/mathlink/jlink\", ButtonData:>{ URL[ \"http://www.wolfram.com/solutions/mathlink/jlink\"], None}, ButtonStyle->\"Hyperlink\"], \".\\n\\nThe FrontEnd dialog in BRP is based on a program by John Novak.\" }], \"Commentary\"] }, Closed]], Cell[CellGroupData[{ Cell[\"June 9th 2002, Rolf Mertig\", \"Section 1\"], Cell[\"Changes: Modified JURL. Added evaluation buttons.\", \"Text\"], Cell[TextData[{ \"These buttons were developed over the last year for working quicker with \ \\ the \", StyleBox[\"Mathematica\", FontSlant->\"Italic\"], \" front end and for producing buttons with functional (side) effects quick \ \\ and easy.\\nWhile most buttons do work in \", StyleBox[\"Mathematica\", FontSlant->\"Italic\"], \" 3.0 it is advised (at least on X) to use \", StyleBox[\"Mathematica\", FontSlant->\"Italic\"], \" 4.\" }], \"Text\"], Cell[TextData[{ \"All buttons except \", Cell[BoxData[ StyleBox[ ButtonBox[ StyleBox[\"BRP\", \"Section\", FontColor->GrayLevel[1]], ButtonEvaluator->None, Background->RGBColor[0.2, 0.4, 0]], FontColor->RGBColor[0, 0, 1]]], ShowGroupOpenCloseIcon->True], \", \", Cell[BoxData[ ButtonBox[ StyleBox[\"CN\", \"Subsubsection\"], Background->RGBColor[0, 0.8, 0.900008]]], ShowGroupOpenCloseIcon->True], \", \", Cell[BoxData[ ButtonBox[ StyleBox[\"Qu\", \"Subsection\", ShowStringCharacters->True, FontFamily->\"Helvetica\", FontWeight->\"Bold\", FontColor->GrayLevel[0]], ButtonFunction:>CompoundExpression[ Quit[ ]], ButtonEvaluator->Automatic, Background->GrayLevel[1]]], CellMargins->{{Inherited, Inherited}, {7, Inherited}}, PageBreakAbove->True, LineSpacing->{1.25, 0}, ScriptMinSize->9, CounterIncrements->\"Text\", StyleMenuListing->None, FontFamily->\"Courier\"], \"and \", Cell[BoxData[ ButtonBox[ StyleBox[\"GV\", \"Subsubsection\", ShowStringCharacters->True, FontColor->RGBColor[0, 0.500008, 0]], ButtonFunction:>Module[ {}, CompoundExpression[ If[ Not[ MatchQ[ NotebookInformation[ System`Private`$GlobalValueDisplayNotebook], { BlankSequence[ Rule]}]], Set[ System`Private`$GlobalValueDisplayNotebook, NotebookPut[ Notebook[ {}, WindowTitle -> \"Values\", WindowMargins -> \ {{ 0, Automatic}, {0, Automatic}}, WindowSize -> {250, 444}]]], SetSelectedNotebook[ System`Private`$GlobalValueDisplayNotebook]], SelectionMove[ System`Private`$GlobalValueDisplayNotebook, All, Notebook], NotebookWrite[ System`Private`$GlobalValueDisplayNotebook, Prepend[ Map[ Cell[ BoxData[ StringJoin[ \"? \", #]], \"Input\", GeneratedCell -> False]&, Select[ Names[ \"Global`*\"], UnsameQ[ Function[ {y}, { Apply[ DefaultValues, y], Apply[ NValues, y], Apply[ SubValues, y], Apply[ DownValues, y], Apply[ OwnValues, y], Apply[ UpValues, y], Apply[ FormatValues, y]}][ ToExpression[ #, StandardForm, Hold]], {{}, {}, {}, {}, {}, {}, {}}]&]], Cell[ TextData[ \"variables with values:\"], \"Text\"]], \ After]]], ButtonEvaluator->Automatic]], GeneratedCell->True], \" work on the selected notebook. I.e., first click on the notebook you \ want \\ to act on with the button.\" }], \"Text\"], Cell[TextData[{ Cell[BoxData[ ButtonBox[ StyleBox[\"JURL\", \"Subsection\", ShowStringCharacters->True, FontFamily->\"Helvetica\", FontWeight->\"Bold\", FontColor->RGBColor[0, 0.4, 1]], Background->GrayLevel[1]]], ShowGroupOpenCloseIcon->True], \" and \", Cell[BoxData[ ButtonBox[\"URL\", ButtonEvaluator->Automatic]], NotebookDefault, CellTags->\"GeneratedButtonBoxURL\"], \" work on a selected string (in a Text or similar non-math cell). The \\ resulting hyperlink from appliation of the \", Cell[BoxData[ RowBox[{ ButtonBox[ StyleBox[\"JURL\", \"Subsection\", ShowStringCharacters->True, FontFamily->\"Helvetica\", FontWeight->\"Bold\", FontColor->RGBColor[0, 0.4, 1]], Background->GrayLevel[1]], \" \"}]]], \" button will only work if J/Link (see \", ButtonBox[\"http://www.wolfram.com/solutions/mathlink/jlink\", ButtonData:>{ URL[ \"http://www.wolfram.com/solutions/mathlink/jlink\"], None}, ButtonStyle->\"Hyperlink\"], \" ) is properly installed.\" }], \"Text\"], Cell[\"\\<\\ Notice: most buttons below are \\\"crippled\\\" (i.e. the ButtonFunction \ settings \\ removed) in order to save space.\\ \\>\", \"Commentary\"] }, Open ]], Cell[CellGroupData[{ Cell[TextData[Cell[BoxData[ ButtonBox[ StyleBox[\"URL\", FontColor->RGBColor[0, 0, 1]], ButtonEvaluator->Automatic]]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[TextData[{ \"Select a URL of the form http://www.mertig.com or rolf@mertig.com or \\ ftp://ftp.nluug.nl in a text cell, then click on the \", Cell[BoxData[ ButtonBox[ StyleBox[\"URL\", FontColor->RGBColor[0, 0, 1]], ButtonEvaluator->Automatic]]], \" button. This will produce a hyperlink of the form: \\n\\n\\ Cell[TextData[ButtonBox[\\\"http://www.mertig.com\\\",\\n ButtonData:>{\\n \ URL[ \\ \\\"http://www.mertig.com\\\"], None},\\n ButtonStyle->\\\"Hyperlink\\\"]], \ \\\"Text\\\",\\ \\n GeneratedCell->True]\\n\" }], \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[ StyleBox[\"RGL\", \"Subsection\", ShowStringCharacters->True, FontColor->RGBColor[0.400015, 0.6, 0.2]], ButtonFunction:>CompoundExpression[ Module[ {r, nr}, CompoundExpression[ Set[ r, NotebookRead[ InputNotebook[ ]]], Set[ R, r], If[ UnsameQ[ r, {}], CompoundExpression[ Set[ nr, ButtonBox[ r, ButtonStyle -> \"RefGuideLink\"]], NotebookWrite[ InputNotebook[ ], nr]]]]]], ButtonEvaluator->Automatic, Background->GrayLevel[1]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[TextData[{ \"Select a word, then click on the RGL button and get a hyperlink to the \ \", StyleBox[\"Mathematica\", FontSlant->\"Italic\"], \" Reference Guide. Like: \", Cell[BoxData[ ButtonBox[\"Derivative\", ButtonStyle->\"RefGuideLink\"]]] }], \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[\"PG\"]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ \\\"Program Generator\\\" : All Cells of type \\\"Program\\\" in a section \ are \\ exported to an ASCII file with the name of the section heading. E.g.: Save the notebook which you get by executing\\ \\>\", \"Text\"], Cell[\"\\<\\ NotebookPut[Notebook[{Cell[\\\"test.ssc\\\", \\\"Section\\\"], Cell[\\\"testfun <- function(x) print(2*x)\\\", \\\"Program\\\"]}]];\\ \\>\", \"Input\"], Cell[\"\\<\\ Click on it with the PG button which will write a file test.ssc to the same \ \\ directory where the notebook is stored.\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[ StyleBox[\"JURL\", \"Subsection\", ShowStringCharacters->True, FontFamily->\"Helvetica\", FontWeight->\"Bold\", FontColor->RGBColor[0, 0.4, 1]], Background->GrayLevel[1]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[TextData[Cell[BoxData[ ButtonBox[ StyleBox[\"JURL\", \"Subsection\", ShowStringCharacters->True, FontFamily->\"Helvetica\", FontWeight->\"Bold\", FontColor->RGBColor[0, 0.4, 1]], Background->GrayLevel[1]]], ShowGroupOpenCloseIcon->True]], \"Text\"], Cell[TextData[{ \"Credits: JURL is based on the NotebookOpenURL and the GetURL function \ from \\ J/Link as described in section 1.3.3 of the J/Link manual by Todd Gayley to \ \\ be found at \", ButtonBox[\"http://www.wolfram.com/solutions/mathlink/jlink\", ButtonData:>{ URL[ \"http://www.wolfram.com/solutions/mathlink/jlink\"], None}, ButtonStyle->\"Hyperlink\"], \".\" }], \"Commentary\"], Cell[TextData[{ \"Select a URL to a \", StyleBox[\"Mathematica\", FontSlant->\"Italic\"], \" notebook or .m file in a text cell, e.g.:\\n\\ http://www.feyncalc.com/Contract/Contract.nb\\nThen click on the \", Cell[BoxData[ ButtonBox[ StyleBox[\"JURL\", \"Subsection\", ShowStringCharacters->True, FontFamily->\"Helvetica\", FontWeight->\"Bold\", FontColor->RGBColor[0, 0.4, 1]], Background->GrayLevel[1]]], ShowGroupOpenCloseIcon->True], \"button.\\nThis produces a hyperlink which when clicked on will fetch the \ \\ notebook Contract.nb with the help of J/Link, which has to be properly \\ installed, see, e.g., : \", ButtonBox[\"http://www.wolfram.com/solutions/mathlink/jlink\", ButtonData:>{ URL[ \"http://www.wolfram.com/solutions/mathlink/jlink\"], None}, ButtonStyle->\"Hyperlink\"], \", save the notebook to the directory as specified by the \", StyleBox[\"Mathematica\", FontSlant->\"Italic\"], \" global variable $TemporaryPrefix (i.e., /tmp/ for Unix and \ C:\\\\TEMP\\\\ for \\ Windows)\" }], \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[\"SD\"]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ Click on a notebook. Hitting SD will change the kernel directory \\ (Directory[]) to the directory where the notebook is saved.\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[ StyleBox[\"F2B\", \"Subsection\", ShowStringCharacters->True, FontColor->RGBColor[0, 0.2, 0.8]], Background->RGBColor[1, 0.700008, 0]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ Function to Button. This is useful to generate buttons with special \\ ButtonFunction settings from a notebook.\\ \\>\", \"Text\"], Cell[\"\\<\\ Create a Subsubsction Cell and place a function (e.g. NotebookCreate[]) in \ \\ an input cell.\\ \\>\", \"Text\"], Cell[CellGroupData[{ Cell[\"name\", \"Subsubsection\"], Cell[BoxData[ \\(NotebookCreate[]\\)], \"Input\"], Cell[TextData[{ \"Select the cells (or inside the Cell group) and click on\", Cell[BoxData[ ButtonBox[ StyleBox[\"F2B\", \"Subsection\", ShowStringCharacters->True, FontColor->RGBColor[0, 0.2, 0.8]], Background->RGBColor[1, 0.700008, 0]]], ShowGroupOpenCloseIcon->True], \". This will create a cell:\" }], \"Text\"], Cell[BoxData[ ButtonBox[\"name\", ButtonFunction:>NotebookCreate[ ], ButtonEvaluator->Automatic]], NotebookDefault, GeneratedCell->True], Cell[\"\\<\\ which looks unformatted like: Cell[BoxData[ ButtonBox[\\\"name\\\", ButtonFunction:>NotebookCreate[ ], ButtonEvaluator->Automatic]], NotebookDefault, GeneratedCell->True]\\ \\>\", \"Text\"], Cell[TextData[{ \"Furthermore a button is automatically created from this cell.\\nTo \ compose \\ several of these buttons into a palette copy the created cells in a notebook \ \\ an click on \", Cell[BoxData[ ButtonBox[ StyleBox[\"HP\", \"Subsubsection\", ShowStringCharacters->True, FontColor->RGBColor[0.6, 0, 0.2]]]], GeneratedCell->True], \" (horizontal palette) or \", Cell[BoxData[ ButtonBox[ StyleBox[\"VP\", \"Subsubsection\", ShowStringCharacters->True, FontColor->RGBColor[0.6, 0, 0.2]]]], GeneratedCell->True], \" (vertical palette).\" }], \"Text\"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ StyleBox[ ButtonBox[ StyleBox[\"CN\", \"Subsection\", ShowStringCharacters->True], ButtonEvaluator->Automatic, Background->RGBColor[0.4, 0.6, 1]], Background->RGBColor[0.4, 0.6, 1]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[TextData[{ \"Clear notebooks, i.e., close all Untitled- notebooks. (This will not work \ \\ in \", StyleBox[\"Mathematica\", FontSlant->\"Italic\"], \" 3.0 version for X).\" }], \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[\"CP\", ButtonFunction:>CompoundExpression[ NotebookPut[ NotebookGet[ InputNotebook[ ]]]], ButtonEvaluator->Automatic]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[TextData[{ \"Notebook copy; i.e., make an identical copy of the selected notebook (up \ \\ to the Windows title). (Since there is a bug in the X-version of \", StyleBox[\"Mathematica\", FontSlant->\"Italic\"], \" the WindowMargins are not the same; on other platforms the copied \\ notebook will be placed exactly on top of the selected notebook).\" }], \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ ButtonBox[ StyleBox[\"HP\", \"Subsubsection\", ShowStringCharacters->True, FontColor->RGBColor[0.6, 0, 0.2]]], \",\", \" \", ButtonBox[ StyleBox[\"VP\", \"Subsubsection\", ShowStringCharacters->True, FontColor->RGBColor[0.6, 0, 0.2]]]}]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"Create horizontal and vertical palettes.\", \"Text\"], Cell[TextData[{ \"See notes in\", Cell[BoxData[ ButtonBox[ StyleBox[\"F2B\", \"Subsection\", ShowStringCharacters->True, FontColor->RGBColor[0, 0.2, 0.8]], Background->RGBColor[1, 0.700008, 0]]], ShowGroupOpenCloseIcon->True] }], \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[ StyleBox[\\(150 %\\), \"Subsubsection\"], ButtonFunction:>CompoundExpression[ FrontEndExecute[ { FrontEndToken[ InputNotebook[ ], \"Magnification\", \"1.5\"]}], Null], ButtonEvaluator->Automatic]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ Change the magnification of the selected notebook. (This saves at least one \ \\ click on most platforms ..., and since (at least for me) this is a FOC \\ (frequently occuring click) it is worthwile having).\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[ StyleBox[\"Cl\", FontFamily->\"Helvetica\", FontWeight->\"Bold\", FontColor->GrayLevel[1]], ButtonFunction:>CompoundExpression[ NotebookClose[ InputNotebook[ ]]], ButtonEvaluator->Automatic, Background->RGBColor[0.8, 0, 0]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[TextData[{ \"This close the selected notebook \", StyleBox[\"without\", FontSlant->\"Italic\"], \" asking. Therefore, be sure to have clicked on the right notebook to \ close \\ ...\" }], \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[ StyleBox[\"Qu\", \"Subsection\", ShowStringCharacters->True, FontFamily->\"Helvetica\", FontWeight->\"Bold\", FontColor->GrayLevel[0]], ButtonFunction:>CompoundExpression[ Quit[ ]], ButtonEvaluator->Automatic, Background->GrayLevel[1]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"This quits the kernel.\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[\"ZWT\", ButtonFunction:>CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Cell], SetOptions[ NotebookSelection[ InputNotebook[ ]], ZeroWidthTimes -> Not[ Part[ Options[ NotebookSelection[ InputNotebook[ ]], ZeroWidthTimes], 1, 2]]]], ButtonEvaluator->Automatic]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ This will set the option ZeroWithTimes -> True on the selected Cell(s). This \ \\ is extremely useful when you want to get the spacing right in inline cells. \ \\ The reason is that RowBox has a very inconvenient and undesirable default of \ \\ putting multiplication spaces between its elements, which is in general of \\ course nonsense.\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[\"cd\", Background->RGBColor[0.4, 0.6, 1]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"Change kernel directories from notebook.\", \"Text\"], Cell[TextData[{ \"Create a palette with all subdirectories as seen from the kernel \\ (Directory[]) listed below the current directory (clicking on the top-most \\ green button will move one directory up). The palette created should only be \ \\ used in the current session (i.e., the buttons rely on a temporary functions \ \\ defined in the \", Cell[BoxData[ ButtonBox[\"cd\", Background->RGBColor[0.4, 0.6, 1]]], ShowGroupOpenCloseIcon->True], \" ).\" }], \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[\\(\\(*\\)\\(\\(.\\)\\(nb\\)\\)\\)]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ Paste a palette at the insertion point consisting of all notebooks (files \\ with file extension .nb) in the current kernel directory. Clicking on any of \ \\ the buttons of the palette will open the notebook.\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[\\(\\(*\\)\\(\\(.\\)\\(m\\)\\)\\)]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ Paste a palette at the insertion point consisting of all .m files in the \\ current kernel directory. Clicking on any of the buttons of the palette will \ \\ open the file in a notebook.\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[\\(<< *.m\\)]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ Paste a palette at the insertion point consisting of all .m files in the \\ current kernel directory. Clicking on any of the buttons of the palette will \ \\ load the file. This can be used to load Add-On packages.\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[\"*\"]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ Paste a palette at the insertion point consisting of all files in the current \ \\ kernel directory. Clicking on any of the buttons of the palette will open the \ \\ file in a notebook.\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[ StyleBox[\"GV\", \"Subsubsection\", ShowStringCharacters->True, FontColor->RGBColor[0, 0.500008, 0]]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ This creates a palette with all variables in the Global` context which have \ \\ a value (or function definition). In order to see the value evaluate the \\ relevant cell.\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ \" \", Cell[BoxData[ ButtonBox[ StyleBox[\"{\", \"Subsection\", ShowStringCharacters->True, FontColor->RGBColor[1, 0, 0]], ButtonFunction:>CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Notebook], FrontEndExecute[ { FrontEndToken[ InputNotebook[ ], \"SelectionOpenAllGroups\"]}]], ButtonEvaluator->Automatic]]] }], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ Select any cell group(s). Clicking on this button will open all Cell \\ subgroups.\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox[\"E\\[DownArrow]\", Background->RGBColor[0.100008, 0.6, 0.6]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[TextData[{ \"Click somewhere in the notebook where you want to evaluate cells, between \ \\ cells or in a Cell. Clicking then on the \", StyleBox[\"E\\[DownArrow]\", Background->RGBColor[0.100008, 0.6, 0.6]], \" button evaluates all Input cells downwards.\" }], \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ ButtonBox[\"ENB\", ButtonFunction:>CompoundExpression[ SelectionMove[ InputNotebook[ ], Before, Notebook], SelectionMove[ InputNotebook[ ], All, Notebook], SelectionEvaluate[ InputNotebook[ ]], SelectionMove[ InputNotebook[ ], After, Notebook]], ButtonEvaluator->Automatic]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ This evaluates the whole notebook. (functionally the same as using the Kernel \ \\ / Evaluation / Evaluate Notebook menu item).\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox[\"E\\[UpArrow]\", Background->RGBColor[0.100008, 0.6, 0.6]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[TextData[{ \"Click somewhere in the notebook where you want to evaluate cells, between \ \\ cells or in a Cell. Clicking then on the \", StyleBox[\"E\\[UpArrow]\", Background->RGBColor[0.100008, 0.6, 0.6]], \" button evaluates all Input cells from the beginning of the notebook \ until \\ the cell where you clicked.\" }], \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ \" \", Cell[BoxData[ ButtonBox[ StyleBox[\"}\", \"Subsection\", ShowStringCharacters->True, FontColor->RGBColor[1, 0, 0]], ButtonFunction:>CompoundExpression[ FrontEndExecute[ { FrontEndToken[ InputNotebook[ ], \"SelectionCloseAllGroups\"]}]], ButtonEvaluator->Automatic]]] }], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ Select any cell group(s). Clicking on this button will close all Cell \\ subgroups.\\ \\>\", \"Text\"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ StyleBox[ ButtonBox[ StyleBox[\"BRP\", \"Section\", FontColor->GrayLevel[1]], ButtonEvaluator->None, Background->RGBColor[0.2, 0.4, 0]], FontColor->RGBColor[0, 0, 1]]], \"Section\", ShowGroupOpenCloseIcon->True], Cell[\"\\<\\ This button initializes the BRP[ expr ] function. BRP[expr] can be used as a \ \\ break point in programs. It will open a new notebook window with the value of \ \\ anyexpression in it. The flow of the program is interrupted, until the OK \\ button in the new notebook is pressed.\\ \\>\", \"Text\"], Cell[\"\\<\\ Furthermore the following symbols are colored when a cell is converted to \\ StandardForm (i.e., there are MakeBoxes rules on those symbols).\\ \\>\", \"Text\"], Cell[TextData[{ StyleBox[\"*Notebook*\", FontColor->RGBColor[0.2, 0, 1]], StyleBox[\" *Select*\", FontColor->RGBColor[1, 0.4, 0]], StyleBox[\" *Cell*\", FontColor->RGBColor[0.4, 0.6, 0]], StyleBox[\"\\nDo\", FontSize->18, FontColor->RGBColor[0, 0.4, 0]], StyleBox[\", \", FontColor->RGBColor[0, 0.4, 0]], StyleBox[\"Block\", FontSize->18, FontColor->RGBColor[0, 0.4, 0]], StyleBox[\", \", FontColor->RGBColor[0, 0.4, 0]], StyleBox[\"Module\", FontSize->18, FontColor->RGBColor[0, 0.4, 0]], StyleBox[\"\\nFrontEndExecute BrowserCategory TaggingRules\", FontSize->18, FontSlant->\"Italic\", FontColor->RGBColor[0.6, 0.8, 0.100008]] }], \"Text\"] }, Closed]] }, Open ]] }, FrontEndVersion->\"4.1 for Microsoft Windows\", ScreenRectangle->{{0, 1600}, {0, 1127}}, WindowToolbars->\"EditBar\", WindowSize->{999, 915}, WindowMargins->{{Automatic, 257}, {Automatic, 81}}, Magnification->1, StyleDefinitions -> \"Report.nb\" ] \ \>", "Input", PageWidth->Infinity, ShowSpecialCharacters->False], Cell[BoxData[ ButtonBox[ StyleBox["Help", "Subsection", ShowStringCharacters->True, FontColor->RGBColor[0.8, 0.200015, 0.2]], ButtonFunction:>CompoundExpression[ NotebookPut[ Notebook[ { Cell[ CellGroupData[ { Cell[ TextData[ {"ButtonTools 3.0.2 ", ButtonBox[ " Mertig Consulting", ButtonData :> { URL[ "http://www.mertig.com"], None}, ButtonStyle -> "Hyperlink"]}], "Title"], Cell[ CellGroupData[ { Cell[ "Tools for manipulating Notebooks and the Front End", "Section 1"], Cell[ TextData[ {"Working with the ", StyleBox[ "Mathematica", FontSlant -> "Italic"], " FrontEnd one often needs certain actions which \ are not readily available. Over the years I programmed some buttons which I \ found useful. All of this code may be modified, copied, etc. . Let me know if \ you have a nicer design on how to label the buttons (or use icons) and how to \ color them."}], "Text"], Cell[ TextData[ {"This version should be used with ", StyleBox[ "Mathematica", FontSlant -> "Italic"], " 4.0 or higher, though some buttons will also work \ in 3.0.\nIf you want to use the JURL button, get JLink 2.0 ."}], "Text"]}, Open]], Cell[ CellGroupData[ { Cell[ "Legal notice and Credits", "Section 1"], Cell[ "For the moment all Butons of ButtonTools are free \ software. You may use and redistribute, but not sell it.\nIf you find any \ problems you may write me an email but I may ignore you (unless you pay for \ my time \[HappySmiley]).", "Text"], Cell[ " THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND \ CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, \ BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \ FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR \ CONTRIBUTORS BE LIABLE\n FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, \ EXEMPLARY, OR CONSEQUENTIAL\n DAMAGES (INCLUDING, BUT NOT LIMITED TO, \ PROCUREMENT OF SUBSTITUTE GOODS\n OR SERVICES; LOSS OF USE, DATA, OR \ PROFITS; OR BUSINESS INTERRUPTION)\n HOWEVER CAUSED AND ON ANY THEORY OF \ LIABILITY, WHETHER IN CONTRACT, STRICT\n LIABILITY, OR TORT (INCLUDING \ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n OUT OF THE USE OF THIS \ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.\n", "Text"], Cell[ TextData[ { "Credits: \n\nJURL is based on the NotebookOpenURL \ and the GetURL function from J/Link as described in section 1.3.3 of the \ J/Link manual by Todd Gayley to be found at ", ButtonBox[ "http://www.wolfram.com/solutions/mathlink/jlink", ButtonData :> { URL[ "http://www.wolfram.com/solutions/mathlink/jlink"]\ , None}, ButtonStyle -> "Hyperlink"], ".\n\nThe FrontEnd dialog in BRP is based on a \ program by John Novak."}], "Commentary"]}, Closed]], Cell[ CellGroupData[ { Cell[ "June 9th 2002, Rolf Mertig", "Section 1"], Cell[ "Changes: Modified JURL. Added evaluation buttons.", "Text"], Cell[ TextData[ { "These buttons were developed over the last year \ for working quicker with the ", StyleBox[ "Mathematica", FontSlant -> "Italic"], " front end and for producing buttons with \ functional (side) effects quick and easy.\nWhile most buttons do work in ", StyleBox[ "Mathematica", FontSlant -> "Italic"], " 3.0 it is advised (at least on X) to use ", StyleBox[ "Mathematica", FontSlant -> "Italic"], " 4."}], "Text"], Cell[ TextData[ {"All buttons except ", Cell[ BoxData[ StyleBox[ ButtonBox[ StyleBox[ "BRP", "Section", FontColor -> GrayLevel[ 1]], ButtonEvaluator -> None, Background -> RGBColor[ .20000000000000001, \ .40000000000000002, 0]], FontColor -> RGBColor[ 0, 0, 1]]], ShowGroupOpenCloseIcon -> True], ", ", Cell[ BoxData[ ButtonBox[ StyleBox[ "CN", "Subsubsection"], Background -> RGBColor[ 0, .80000000000000004, .90000800000000003]]], ShowGroupOpenCloseIcon -> True], ", ", Cell[ BoxData[ ButtonBox[ StyleBox[ "Qu", "Subsection", ShowStringCharacters -> True, FontFamily -> "Helvetica", FontWeight -> "Bold", FontColor -> GrayLevel[ 0]], ButtonFunction :> CompoundExpression[ Quit[ ]], ButtonEvaluator -> Automatic, Background -> GrayLevel[ 1]]], CellMargins -> {{Inherited, Inherited}, {7, Inherited}}, PageBreakAbove -> True, LineSpacing -> {1.25, 0}, ScriptMinSize -> 9, CounterIncrements -> "Text", StyleMenuListing -> None, FontFamily -> "Courier"], "and ", Cell[ BoxData[ ButtonBox[ StyleBox[ "GV", "Subsubsection", ShowStringCharacters -> True, FontColor -> RGBColor[ 0, .50000800000000001, 0]], ButtonFunction :> Module[ {}, CompoundExpression[ If[ Not[ MatchQ[ NotebookInformation[ System`Private`$\ GlobalValueDisplayNotebook], { BlankSequence[ Rule]}]], Set[ System`Private`$\ GlobalValueDisplayNotebook, NotebookPut[ Notebook[ {}, WindowTitle -> "Values", WindowMargins -> {{0, Automatic}, {0, Automatic}}, WindowSize -> {250, 444}]]], SetSelectedNotebook[ System`Private`$\ GlobalValueDisplayNotebook]], SelectionMove[ System`Private`$\ GlobalValueDisplayNotebook, All, Notebook], NotebookWrite[ System`Private`$\ GlobalValueDisplayNotebook, Prepend[ Map[ Cell[ BoxData[ StringJoin[ "? ", #]], "Input", GeneratedCell -> False]&, Select[ Names[ "Global`*"], UnsameQ[ Function[ {y}, { Apply[ DefaultValues, y], Apply[ NValues, y], Apply[ SubValues, y], Apply[ DownValues, y], Apply[ OwnValues, y], Apply[ UpValues, y], Apply[ FormatValues, y]}][ ToExpression[ #, StandardForm, Hold]], {{}, {}, {}, {}, {}, {}, \ {}}]&]], Cell[ TextData[ "variables with values:"], "Text"]], After]]], ButtonEvaluator -> Automatic]], GeneratedCell -> True], " work on the selected notebook. I.e., first click \ on the notebook you want to act on with the button."}], "Text"], Cell[ TextData[ { Cell[ BoxData[ ButtonBox[ StyleBox[ "JURL", "Subsection", ShowStringCharacters -> True, FontFamily -> "Helvetica", FontWeight -> "Bold", FontColor -> RGBColor[ 0, .40000000000000002, 1]], Background -> GrayLevel[ 1]]], ShowGroupOpenCloseIcon -> True], " and ", Cell[ BoxData[ ButtonBox[ "URL", ButtonEvaluator -> Automatic]], NotebookDefault, CellTags -> "GeneratedButtonBoxURL"], " work on a selected string (in a Text or similar \ non-math cell). The resulting hyperlink from appliation of the ", Cell[ BoxData[ RowBox[ { ButtonBox[ StyleBox[ "JURL", "Subsection", ShowStringCharacters -> True, FontFamily -> "Helvetica", FontWeight -> "Bold", FontColor -> RGBColor[ 0, .40000000000000002, 1]], Background -> GrayLevel[ 1]], " "}]]], " button will only work if J/Link (see ", ButtonBox[ "http://www.wolfram.com/solutions/mathlink/jlink", ButtonData :> { URL[ "http://www.wolfram.com/solutions/mathlink/jlink"]\ , None}, ButtonStyle -> "Hyperlink"], " ) is properly installed."}], "Text"], Cell[ "Notice: most buttons below are \"crippled\" (i.e. the \ ButtonFunction settings removed) in order to save space.", "Commentary"]}, Open]], Cell[ CellGroupData[ { Cell[ TextData[ Cell[ BoxData[ ButtonBox[ StyleBox[ "URL", FontColor -> RGBColor[ 0, 0, 1]], ButtonEvaluator -> Automatic]]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ TextData[ { "Select a URL of the form http://www.mertig.com or \ rolf@mertig.com or ftp://ftp.nluug.nl in a text cell, then click on the ", Cell[ BoxData[ ButtonBox[ StyleBox[ "URL", FontColor -> RGBColor[ 0, 0, 1]], ButtonEvaluator -> Automatic]]], " button. This will produce a hyperlink of the \ form: \n\nCell[TextData[ButtonBox[\"http://www.mertig.com\",\n ButtonData:>{\ \n URL[ \"http://www.mertig.com\"], None},\n \ ButtonStyle->\"Hyperlink\"]], \"Text\",\n GeneratedCell->True]\n"}], "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ StyleBox[ "RGL", "Subsection", ShowStringCharacters -> True, FontColor -> RGBColor[ .40001500000000001, \ .59999999999999998, .20000000000000001]], ButtonFunction :> CompoundExpression[ Module[ {r, nr}, CompoundExpression[ Set[ r, NotebookRead[ InputNotebook[ ]]], Set[ R, r], If[ UnsameQ[ r, {}], CompoundExpression[ Set[ nr, ButtonBox[ r, ButtonStyle -> "RefGuideLink"]], NotebookWrite[ InputNotebook[ ], nr]]]]]], ButtonEvaluator -> Automatic, Background -> GrayLevel[ 1]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ TextData[ { "Select a word, then click on the RGL button and \ get a hyperlink to the ", StyleBox[ "Mathematica", FontSlant -> "Italic"], " Reference Guide. Like: ", Cell[ BoxData[ ButtonBox[ "Derivative", ButtonStyle -> "RefGuideLink"]]]}], "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ "PG"]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "\"Program Generator\" : All Cells of type \"Program\" \ in a section are exported to an ASCII file with the name of the section \ heading.\nE.g.: Save the notebook which you get by executing", "Text"], Cell[ "NotebookPut[Notebook[{Cell[\"test.ssc\", \"Section\"], \ \n Cell[\"testfun <- function(x) print(2*x)\", \"Program\"]}]];", "Input"], Cell[ "Click on it with the PG button which will write a file \ test.ssc to the same directory where the notebook is stored.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ StyleBox[ "JURL", "Subsection", ShowStringCharacters -> True, FontFamily -> "Helvetica", FontWeight -> "Bold", FontColor -> RGBColor[ 0, .40000000000000002, 1]], Background -> GrayLevel[ 1]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ TextData[ Cell[ BoxData[ ButtonBox[ StyleBox[ "JURL", "Subsection", ShowStringCharacters -> True, FontFamily -> "Helvetica", FontWeight -> "Bold", FontColor -> RGBColor[ 0, .40000000000000002, 1]], Background -> GrayLevel[ 1]]], ShowGroupOpenCloseIcon -> True]], "Text"], Cell[ TextData[ { "Credits: JURL is based on the NotebookOpenURL and \ the GetURL function from J/Link as described in section 1.3.3 of the J/Link \ manual by Todd Gayley to be found at ", ButtonBox[ "http://www.wolfram.com/solutions/mathlink/jlink", ButtonData :> { URL[ "http://www.wolfram.com/solutions/mathlink/jlink"]\ , None}, ButtonStyle -> "Hyperlink"], "."}], "Commentary"], Cell[ TextData[ {"Select a URL to a ", StyleBox[ "Mathematica", FontSlant -> "Italic"], " notebook or .m file in a text cell, e.g.:\n\ http://www.feyncalc.com/Contract/Contract.nb\nThen click on the ", Cell[ BoxData[ ButtonBox[ StyleBox[ "JURL", "Subsection", ShowStringCharacters -> True, FontFamily -> "Helvetica", FontWeight -> "Bold", FontColor -> RGBColor[ 0, .40000000000000002, 1]], Background -> GrayLevel[ 1]]], ShowGroupOpenCloseIcon -> True], "button.\nThis produces a hyperlink which when \ clicked on will fetch the notebook Contract.nb with the help of J/Link, which \ has to be properly installed, see, e.g., : ", ButtonBox[ "http://www.wolfram.com/solutions/mathlink/jlink", ButtonData :> { URL[ "http://www.wolfram.com/solutions/mathlink/jlink"]\ , None}, ButtonStyle -> "Hyperlink"], ", save the notebook to the directory as specified \ by the ", StyleBox[ "Mathematica", FontSlant -> "Italic"], " global variable $TemporaryPrefix (i.e., /tmp/ for \ Unix and C:\\TEMP\\ for Windows)"}], "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ "SD"]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Click on a notebook. Hitting SD will change the kernel \ directory (Directory[]) to the directory where the notebook is saved.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ StyleBox[ "F2B", "Subsection", ShowStringCharacters -> True, FontColor -> RGBColor[ 0, .20000000000000001, .80000000000000004]], Background -> RGBColor[ 1, .70000799999999996, 0]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Function to Button. This is useful to generate buttons \ with special ButtonFunction settings from a notebook.", "Text"], Cell[ "Create a Subsubsction Cell and place a function (e.g. \ NotebookCreate[]) in an input cell.", "Text"], Cell[ CellGroupData[ { Cell[ "name", "Subsubsection"], Cell[ BoxData[ RowBox[ {"NotebookCreate", "[", "]"}]], "Input"], Cell[ TextData[ { "Select the cells (or inside the Cell group) \ and click on", Cell[ BoxData[ ButtonBox[ StyleBox[ "F2B", "Subsection", ShowStringCharacters -> True, FontColor -> RGBColor[ 0, .20000000000000001, \ .80000000000000004]], Background -> RGBColor[ 1, .70000799999999996, 0]]], ShowGroupOpenCloseIcon -> True], ". This will create a cell:"}], "Text"], Cell[ BoxData[ ButtonBox[ "name", ButtonFunction :> NotebookCreate[ ], ButtonEvaluator -> Automatic]], NotebookDefault, GeneratedCell -> True], Cell[ "which looks unformatted like:\nCell[BoxData[\n \ ButtonBox[\"name\",\n ButtonFunction:>NotebookCreate[ ],\n \ ButtonEvaluator->Automatic]], NotebookDefault,\n GeneratedCell->True]", "Text"], Cell[ TextData[ { "Furthermore a button is automatically created \ from this cell.\nTo compose several of these buttons into a palette copy the \ created cells in a notebook an click on ", Cell[ BoxData[ ButtonBox[ StyleBox[ "HP", "Subsubsection", ShowStringCharacters -> True, FontColor -> RGBColor[ .59999999999999998, 0, .20000000000000001]]]], GeneratedCell -> True], " (horizontal palette) or ", Cell[ BoxData[ ButtonBox[ StyleBox[ "VP", "Subsubsection", ShowStringCharacters -> True, FontColor -> RGBColor[ .59999999999999998, 0, .20000000000000001]]]], GeneratedCell -> True], " (vertical palette)."}], "Text"]}, Closed]]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ StyleBox[ ButtonBox[ StyleBox[ "CN", "Subsection", ShowStringCharacters -> True], ButtonEvaluator -> Automatic, Background -> RGBColor[ .40000000000000002, \ .59999999999999998, 1]], Background -> RGBColor[ .40000000000000002, .59999999999999998, 1]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ TextData[ { "Clear notebooks, i.e., close all Untitled- \ notebooks. (This will not work in ", StyleBox[ "Mathematica", FontSlant -> "Italic"], " 3.0 version for X)."}], "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ "CP", ButtonFunction :> CompoundExpression[ NotebookPut[ NotebookGet[ InputNotebook[ ]]]], ButtonEvaluator -> Automatic]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ TextData[ { "Notebook copy; i.e., make an identical copy of the \ selected notebook (up to the Windows title). (Since there is a bug in the \ X-version of ", StyleBox[ "Mathematica", FontSlant -> "Italic"], " the WindowMargins are not the same; on other \ platforms the copied notebook will be placed exactly on top of the selected \ notebook)."}], "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ RowBox[ { ButtonBox[ StyleBox[ "HP", "Subsubsection", ShowStringCharacters -> True, FontColor -> RGBColor[ .59999999999999998, 0, .20000000000000001]]], ",", " ", ButtonBox[ StyleBox[ "VP", "Subsubsection", ShowStringCharacters -> True, FontColor -> RGBColor[ .59999999999999998, 0, .20000000000000001]]]}]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Create horizontal and vertical palettes.", "Text"], Cell[ TextData[ {"See notes in", Cell[ BoxData[ ButtonBox[ StyleBox[ "F2B", "Subsection", ShowStringCharacters -> True, FontColor -> RGBColor[ 0, .20000000000000001, .80000000000000004]], Background -> RGBColor[ 1, .70000799999999996, 0]]], ShowGroupOpenCloseIcon -> True]}], "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ StyleBox[ RowBox[ {"150", "%"}], "Subsubsection"], ButtonFunction :> CompoundExpression[ FrontEndExecute[ { FrontEndToken[ InputNotebook[ ], "Magnification", "1.5"]}], Null], ButtonEvaluator -> Automatic]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Change the magnification of the selected notebook. \ (This saves at least one click on most platforms ..., and since (at least for \ me) this is a FOC (frequently occuring click) it is worthwile having).", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ StyleBox[ "Cl", FontFamily -> "Helvetica", FontWeight -> "Bold", FontColor -> GrayLevel[ 1]], ButtonFunction :> CompoundExpression[ NotebookClose[ InputNotebook[ ]]], ButtonEvaluator -> Automatic, Background -> RGBColor[ .80000000000000004, 0, 0]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ TextData[ {"This close the selected notebook ", StyleBox[ "without", FontSlant -> "Italic"], " asking. Therefore, be sure to have clicked on the \ right notebook to close ..."}], "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ StyleBox[ "Qu", "Subsection", ShowStringCharacters -> True, FontFamily -> "Helvetica", FontWeight -> "Bold", FontColor -> GrayLevel[ 0]], ButtonFunction :> CompoundExpression[ Quit[ ]], ButtonEvaluator -> Automatic, Background -> GrayLevel[ 1]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "This quits the kernel.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ "ZWT", ButtonFunction :> CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Cell], SetOptions[ NotebookSelection[ InputNotebook[ ]], ZeroWidthTimes -> Not[ Part[ Options[ NotebookSelection[ InputNotebook[ ]], ZeroWidthTimes], 1, 2]]]], ButtonEvaluator -> Automatic]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "This will set the option ZeroWithTimes -> True on the \ selected Cell(s). This is extremely useful when you want to get the spacing \ right in inline cells. The reason is that RowBox has a very inconvenient and \ undesirable default of putting multiplication spaces between its elements, \ which is in general of course nonsense.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ "cd", Background -> RGBColor[ .40000000000000002, .59999999999999998, 1]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Change kernel directories from notebook.", "Text"], Cell[ TextData[ { "Create a palette with all subdirectories as seen \ from the kernel (Directory[]) listed below the current directory (clicking on \ the top-most green button will move one directory up). The palette created \ should only be used in the current session (i.e., the buttons rely on a \ temporary functions defined in the ", Cell[ BoxData[ ButtonBox[ "cd", Background -> RGBColor[ .40000000000000002, \ .59999999999999998, 1]]], ShowGroupOpenCloseIcon -> True], " )."}], "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ RowBox[ {"*", RowBox[ {".", "nb"}]}]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Paste a palette at the insertion point consisting of \ all notebooks (files with file extension .nb) in the current kernel \ directory. Clicking on any of the buttons of the palette will open the \ notebook.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ RowBox[ {"*", RowBox[ {".", "m"}]}]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Paste a palette at the insertion point consisting of \ all .m files in the current kernel directory. Clicking on any of the buttons \ of the palette will open the file in a notebook.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ RowBox[ {"<<", "*.m"}]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Paste a palette at the insertion point consisting of \ all .m files in the current kernel directory. Clicking on any of the buttons \ of the palette will load the file. This can be used to load Add-On packages.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ "*"]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Paste a palette at the insertion point consisting of \ all files in the current kernel directory. Clicking on any of the buttons of \ the palette will open the file in a notebook.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ StyleBox[ "GV", "Subsubsection", ShowStringCharacters -> True, FontColor -> RGBColor[ 0, .50000800000000001, 0]]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "This creates a palette with all variables in the \ Global` context which have a value (or function definition). In order to see \ the value evaluate the relevant cell.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ TextData[ {" ", Cell[ BoxData[ ButtonBox[ StyleBox[ "{", "Subsection", ShowStringCharacters -> True, FontColor -> RGBColor[ 1, 0, 0]], ButtonFunction :> CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Notebook], FrontEndExecute[ { FrontEndToken[ InputNotebook[ ], "SelectionOpenAllGroups"]}]], ButtonEvaluator -> Automatic]]]}], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Select any cell group(s). Clicking on this button will \ open all Cell subgroups.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ TextData[ StyleBox[ "E\[DownArrow]", Background -> RGBColor[ .100008, .59999999999999998, \ .59999999999999998]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ TextData[ { "Click somewhere in the notebook where you want to \ evaluate cells, between cells or in a Cell. Clicking then on the ", StyleBox[ "E\[DownArrow]", Background -> RGBColor[ .100008, .59999999999999998, \ .59999999999999998]], " button evaluates all Input cells downwards."}], "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ ButtonBox[ "ENB", ButtonFunction :> CompoundExpression[ SelectionMove[ InputNotebook[ ], Before, Notebook], SelectionMove[ InputNotebook[ ], All, Notebook], SelectionEvaluate[ InputNotebook[ ]], SelectionMove[ InputNotebook[ ], After, Notebook]], ButtonEvaluator -> Automatic]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "This evaluates the whole notebook. (functionally the \ same as using the Kernel / Evaluation / Evaluate Notebook menu item).", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ TextData[ StyleBox[ "E\[UpArrow]", Background -> RGBColor[ .100008, .59999999999999998, \ .59999999999999998]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ TextData[ { "Click somewhere in the notebook where you want to \ evaluate cells, between cells or in a Cell. Clicking then on the ", StyleBox[ "E\[UpArrow]", Background -> RGBColor[ .100008, .59999999999999998, \ .59999999999999998]], " button evaluates all Input cells from the \ beginning of the notebook until the cell where you clicked."}], "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ TextData[ {" ", Cell[ BoxData[ ButtonBox[ StyleBox[ "}", "Subsection", ShowStringCharacters -> True, FontColor -> RGBColor[ 1, 0, 0]], ButtonFunction :> CompoundExpression[ FrontEndExecute[ { FrontEndToken[ InputNotebook[ ], "SelectionCloseAllGroups"]}]], ButtonEvaluator -> Automatic]]]}], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "Select any cell group(s). Clicking on this button will \ close all Cell subgroups.", "Text"]}, Closed]], Cell[ CellGroupData[ { Cell[ BoxData[ StyleBox[ ButtonBox[ StyleBox[ "BRP", "Section", FontColor -> GrayLevel[ 1]], ButtonEvaluator -> None, Background -> RGBColor[ .20000000000000001, \ .40000000000000002, 0]], FontColor -> RGBColor[ 0, 0, 1]]], "Section", ShowGroupOpenCloseIcon -> True], Cell[ "This button initializes the BRP[ expr ] function. \ BRP[expr] can be used as a break point in programs. It will open a new \ notebook window with the value of anyexpression in it. The flow of the \ program is interrupted, until the OK button in the new notebook is pressed.", "Text"], Cell[ "Furthermore the following symbols are colored when a \ cell is converted to StandardForm (i.e., there are MakeBoxes rules on those \ symbols).", "Text"], Cell[ TextData[ { StyleBox[ "*Notebook*", FontColor -> RGBColor[ .20000000000000001, 0, 1]], StyleBox[ " *Select*", FontColor -> RGBColor[ 1, .40000000000000002, 0]], StyleBox[ " *Cell*", FontColor -> RGBColor[ .40000000000000002, .59999999999999998, 0]], StyleBox[ "\nDo", FontSize -> 18, FontColor -> RGBColor[ 0, .40000000000000002, 0]], StyleBox[ ", ", FontColor -> RGBColor[ 0, .40000000000000002, 0]], StyleBox[ "Block", FontSize -> 18, FontColor -> RGBColor[ 0, .40000000000000002, 0]], StyleBox[ ", ", FontColor -> RGBColor[ 0, .40000000000000002, 0]], StyleBox[ "Module", FontSize -> 18, FontColor -> RGBColor[ 0, .40000000000000002, 0]], StyleBox[ "\nFrontEndExecute BrowserCategory TaggingRules", FontSize -> 18, FontSlant -> "Italic", FontColor -> RGBColor[ .59999999999999998, .80000000000000004, \ .100008]]}], "Text"]}, Closed]]}, Open]]}, FrontEndVersion -> "4.1 for Microsoft Windows", ScreenRectangle -> {{0, 1600}, {0, 1127}}, WindowToolbars -> "EditBar", WindowSize -> {999, 915}, WindowMargins -> {{Automatic, 257}, {Automatic, 81}}, Magnification -> 1, StyleDefinitions -> "Report.nb"]]], ButtonEvaluator->Automatic, Background->GrayLevel[1]]], NotebookDefault, CellTags->"GeneratedButtonBoxHelp"] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["URL", FontColor->RGBColor[0, 0, 1]]], "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({m = False, r, nr, r2, r3, r4}\), ",", RowBox[{ RowBox[{"r", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], ";", RowBox[{"If", "[", RowBox[{\(StringQ[r]\), ",", RowBox[{ RowBox[{"If", "[", RowBox[{\(StringMatchQ[r, "\<*\\@*.*\>"]\), ",", RowBox[{"m", "=", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"m", "||", RowBox[{"StringMatchQ", "[", RowBox[{"r", ",", "\"\<*:*.*\>\"", ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}], ",", RowBox[{\(nr = ButtonBox[r, ButtonData \[Rule] {URL[ If[m, "\", "\<\>"] <> r], None}, ButtonStyle \[Rule] "\"]\), ";", RowBox[{"SetOptions", "[", RowBox[{ RowBox[{ StyleBox["NotebookSelection", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}], ",", RowBox[{ StyleBox["TaggingRules", FontSize->18, FontSlant->"Italic", FontColor->RGBColor[0.6, 0.8, 0.100008]], "\[Rule]", "\"\\""}]}], "]"}], ";", RowBox[{"r2", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "All", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{"r3", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], ";", RowBox[{"r4", "=", RowBox[{"r3", "/.", "\:f360", RowBox[{ RowBox[{"StyleBox", "[", RowBox[{"s_", ",", RowBox[{ StyleBox["TaggingRules", FontSize->18, FontSlant->"Italic", FontColor->RGBColor[0.6, 0.8, 0.100008]], "\[RuleDelayed]", "\"\\""}]}], "]"}], "\[RuleDelayed]", "nr"}]}]}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "r4"}], "]"}]}]}], "]"}]}]}], "]"}]}]}], "]"}]], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["URL", "Subsection", ShowStringCharacters->True, FontColor->RGBColor[0, 0, 1]], ButtonFunction:>CompoundExpression[ Module[ { Set[ m, False], r, nr, r2, r3, r4}, CompoundExpression[ Set[ r, NotebookRead[ InputNotebook[ ]]], If[ StringQ[ r], CompoundExpression[ If[ StringMatchQ[ r, "*\\@*.*"], Set[ m, True]], If[ Or[ m, StringMatchQ[ r, "*:*.*", IgnoreCase -> True]], CompoundExpression[ Set[ nr, ButtonBox[ r, ButtonData -> { URL[ StringJoin[ If[ m, "mailto:", ""], r]], None}, ButtonStyle -> "Hyperlink"]], SetOptions[ NotebookSelection[ InputNotebook[ ]], TaggingRules -> "wwwtag"], Set[ r2, NotebookRead[ InputNotebook[ ]]], SelectionMove[ InputNotebook[ ], All, Cell], Set[ r3, NotebookRead[ InputNotebook[ ]]], Set[ r4, ReplaceAll[ r3, StyleBox[ Pattern[ s, Blank[ ]], TaggingRules :> "wwwtag"] :> nr]], NotebookWrite[ InputNotebook[ ], r4]]]]]]]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBoxURL"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["RGL", FontColor->RGBColor[0.400015, 0.6, 0.2], Background->GrayLevel[1]]], "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({r, nr}\), ",", RowBox[{ RowBox[{"r", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], ";", \(R = r\), ";", RowBox[{"If", "[", RowBox[{\(r =!= {}\), ",", RowBox[{\(nr = ButtonBox[r, ButtonStyle \[Rule] "\"]\), ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "nr"}], "]"}]}]}], "]"}]}]}], "]"}]], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["RGL", "Subsection", ShowStringCharacters->True, FontColor->RGBColor[0.400015, 0.6, 0.2]], ButtonFunction:>CompoundExpression[ Module[ {r, nr}, CompoundExpression[ Set[ r, NotebookRead[ InputNotebook[ ]]], Set[ R, r], If[ UnsameQ[ r, {}], CompoundExpression[ Set[ nr, ButtonBox[ r, ButtonStyle -> "RefGuideLink"]], NotebookWrite[ InputNotebook[ ], nr]]]]]], ButtonEvaluator->Automatic, Background->GrayLevel[1]]], NotebookDefault, CellTags->"GeneratedButtonBoxRGL"] }, Closed]], Cell[CellGroupData[{ Cell["PG", "Subsection", GeneratedCell->True], Cell["Generate an ASCII file.", "Text", GeneratedCell->True], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({spcodestyle = "\"}\), ",", RowBox[{\(opened = {}\), ";", \(fixstring[z_String] := FixedPoint[ StringReplace[#1, {"\< \>" \[Rule] "\<\>", "\<\n\>" \[Rule] "\<\ \>", "\<\t\>" \[Rule] "\<\>", "\<:\>" \[RuleDelayed] "\<\>"}] &, z]\), ";", \(strrep[z_] := z /. \[InvisibleSpace]s_String \[RuleDelayed] StringReplace[ s, {"\<\[Rule]\>" \[Rule] "\<->\>", "\<\[Null]\>" \[Rule] "\ \<\>", "\<\[LeftArrow]\>" \[Rule] "\<<-\>"}]\), ";", \(openwrite[ z_String] := \((op = OpenWrite[z, PageWidth \[Rule] \[Infinity]]; AppendTo[opened, op]; op)\)\), ";", \(closeit := Close /@ opened\), ";", RowBox[{ RowBox[{"makestring", "[", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[t1_List], ___\), "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[t2_List], ___\), "]"}], ",", "c___"}], "]"}], ":=", RowBox[{"makestring", "[", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[Join[t1, {"\<\n\>"}, t2]]\), "]"}], ",", "c"}], "]"}]}], ";", \(makestring[s_String] := s\), ";", RowBox[{ RowBox[{"makestring", "[", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[t_], ___\), "]"}], "]"}], ":=", \(makestring[TextData[t]]\)}], ";", RowBox[{\(makestring[TextData[{s__}]]\), ":=", RowBox[{"makestring2", "[", RowBox[{"strrep", "[", RowBox[{\({s}\), "//.", "\[InvisibleSpace]", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", "__", "]"}], "\[RuleDelayed]", \(Sequence[]\)}], ",", \(ButtonBox[b_, __] \[RuleDelayed] b\), ",", \(StyleBox[a_, ___] \[RuleDelayed] a\)}], "}"}]}], "]"}], "]"}]}], ";", \(makestring2[{st__String}] := StringJoin[st]\), ";", RowBox[{"SetDirectory", "[", RowBox[{ RowBox[{ RowBox[{"\"\\"", "/.", "\[InvisibleSpace]", RowBox[{"NotebookInformation", "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], "/.", "\[InvisibleSpace]", \(FrontEnd`FileName[ d_, __] \[RuleDelayed] ToFileName[d]\)}], "/.", "\[InvisibleSpace]", \("\" \[Rule] $Failed\)}], "]"}], ";", RowBox[{"tmp1", "=", RowBox[{ RowBox[{ StyleBox["NotebookGet", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}], "//.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ StyleBox["CellGroupData", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \({a__}, _\), "]"}], "]"}], "\[RuleDelayed]", "a"}]}]}], ";", RowBox[{"tmp2", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{\(tmp1\[LeftDoubleBracket]1\[RightDoubleBracket]\ \), "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(a_, b_, __\), "]"}], "\[RuleDelayed]", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(a, b\), "]"}]}]}], "/.", "\[InvisibleSpace]", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[StyleBox[a_String, ___]], st_, ___\), "]"}], "\[RuleDelayed]", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[{a}], st\), "]"}]}], ",", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(_, "\", ___\), "]"}], "\[RuleDelayed]", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[{"\<\n\>"}], spcodestyle\), "]"}]}]}], "}"}]}], "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(x_, st_String, ___\), "]"}], "\[RuleDelayed]", \(Sequence[] /; \(\(\[InvisibleSpace]\ \)\(! \((MemberQ[{"\", spcodestyle}, st])\)\)\)\)}]}], "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(s_, "\", __\), "]"}], "\[RuleDelayed]", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(s, "\"\), "]"}]}]}], "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[{___, s_String}], "\"\), "]"}], "\[RuleDelayed]", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(s, "\"\), "]"}]}]}], "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(s_String, "\"\), "]"}], "\[RuleDelayed]", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(fixstring[s], "\"\), "]"}]}]}]}], ";", \(tete = tmp2\), ";", RowBox[{"If", "[", RowBox[{ RowBox[{"FreeQ", "[", RowBox[{"tmp2", ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(_, "\", ___\), "]"}]}], "]"}], ",", RowBox[{"PrependTo", "[", RowBox[{"tmp2", ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \("\", "\"\), "]"}]}], "]"}]}], "]"}], ";", RowBox[{"tmp2b", "=", RowBox[{"tmp2", "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(s_String, spcodestyle, ___\), "]"}], "\[RuleDelayed]", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[{s}], spcodestyle\), "]"}]}]}]}], ";", \(tmp3 = Split[tmp2b, #1\[LeftDoubleBracket]2\[RightDoubleBracket] =!= \ "\" && #2\[LeftDoubleBracket]2\[RightDoubleBracket] =!= \ "\" &]\), ";", "closeit", ";", \(tbl = Table[\(Hold[WriteString]\)[ openwrite[ makestring[ tmp3\[LeftDoubleBracket]i, 1, 1\[RightDoubleBracket]]], makestring[ Sequence @@ tmp3\[LeftDoubleBracket]i + 1\[RightDoubleBracket]]], {i, 1, Length[tmp3] - 1, 2}]\), ";", \(ReleaseHold[tbl]\), ";", "closeit", ";"}]}], "]"}]], "Input", GeneratedCell->True], Cell[BoxData[ ButtonBox["PG", ButtonFunction:>CompoundExpression[ Module[ { Set[ spcodestyle, "Program"]}, CompoundExpression[ Set[ opened, {}], SetDelayed[ fixstring[ Pattern[ z, Blank[ String]]], FixedPoint[ StringReplace[ #, {" " -> "", "\n" -> "", "\t" -> "", ":" :> ""}]&, z]], SetDelayed[ strrep[ Pattern[ z, Blank[ ]]], ReplaceAll[ z, Pattern[ s, Blank[ String]] :> StringReplace[ s, {"\[Rule]" -> "->", "\[Null]" -> "", "\[LeftArrow]" -> "<-"}]]], SetDelayed[ openwrite[ Pattern[ z, Blank[ String]]], CompoundExpression[ Set[ op, OpenWrite[ z, PageWidth -> Infinity]], AppendTo[ opened, op], op]], SetDelayed[ closeit, Map[ Close, opened]], SetDelayed[ makestring[ Cell[ TextData[ Pattern[ t1, Blank[ List]]], BlankNullSequence[ ]], Cell[ TextData[ Pattern[ t2, Blank[ List]]], BlankNullSequence[ ]], Pattern[ c, BlankNullSequence[ ]]], makestring[ Cell[ TextData[ Join[ t1, {"\n"}, t2]]], c]], SetDelayed[ makestring[ Pattern[ s, Blank[ String]]], s], SetDelayed[ makestring[ Cell[ TextData[ Pattern[ t, Blank[ ]]], BlankNullSequence[ ]]], makestring[ TextData[ t]]], SetDelayed[ makestring[ TextData[ { Pattern[ s, BlankSequence[ ]]}]], makestring2[ strrep[ ReplaceRepeated[ {s}, {Cell[ BlankSequence[ ]] :> Sequence[ ], ButtonBox[ Pattern[ b, Blank[ ]], BlankSequence[ ]] :> b, StyleBox[ Pattern[ a, Blank[ ]], BlankNullSequence[ ]] :> a}]]]], SetDelayed[ makestring2[ { Pattern[ st, BlankSequence[ String]]}], StringJoin[ st]], SetDirectory[ ReplaceAll[ ReplaceAll[ ReplaceAll[ "FileName", NotebookInformation[ InputNotebook[ ]]], FrontEnd`FileName[ Pattern[ d, Blank[ ]], BlankSequence[ ]] :> ToFileName[ d]], "FileName" -> $Failed]], Set[ tmp1, ReplaceRepeated[ NotebookGet[ InputNotebook[ ]], Cell[ CellGroupData[ { Pattern[ a, BlankSequence[ ]]}, Blank[ ]]] :> a]], Set[ tmp2, ReplaceAll[ ReplaceAll[ ReplaceAll[ ReplaceAll[ ReplaceAll[ ReplaceAll[ Part[ tmp1, 1], Cell[ Pattern[ a, Blank[ ]], Pattern[ b, Blank[ ]], BlankSequence[ ]] :> Cell[ a, b]], {Cell[ TextData[ StyleBox[ Pattern[ a, Blank[ String]], BlankNullSequence[ ]]], Pattern[ st, Blank[ ]], BlankNullSequence[ ]] :> Cell[ TextData[ {a}], st], Cell[ Blank[ ], "Subsection", BlankNullSequence[ ]] :> Cell[ TextData[ {"\n"}], spcodestyle]}], Cell[ Pattern[ x, Blank[ ]], Pattern[ st, Blank[ String]], BlankNullSequence[ ]] :> Condition[ Sequence[ ], Not[ MemberQ[ {"Section", spcodestyle}, st]]]], Cell[ Pattern[ s, Blank[ ]], "Section", BlankSequence[ ]] :> Cell[ s, "Section"]], Cell[ TextData[ { BlankNullSequence[ ], Pattern[ s, Blank[ String]]}], "Section"] :> Cell[ s, "Section"]], Cell[ Pattern[ s, Blank[ String]], "Section"] :> Cell[ fixstring[ s], "Section"]]], Set[ tete, tmp2], If[ FreeQ[ tmp2, Cell[ Blank[ ], "Section", BlankNullSequence[ ]]], PrependTo[ tmp2, Cell[ "Script.ssc", "Section"]]], Set[ tmp2b, ReplaceAll[ tmp2, Cell[ Pattern[ s, Blank[ String]], spcodestyle, BlankNullSequence[ ]] :> Cell[ TextData[ {s}], spcodestyle]]], Set[ tmp3, Split[ tmp2b, And[ UnsameQ[ Part[ #, 2], "Section"], UnsameQ[ Part[ #2, 2], "Section"]]&]], closeit, Set[ tbl, Table[ Hold[ WriteString][ openwrite[ makestring[ Part[ tmp3, i, 1, 1]]], makestring[ Apply[ Sequence, Part[ tmp3, Plus[ i, 1]]]]], {i, 1, Plus[ Length[ tmp3], -1], 2}]], ReleaseHold[ tbl], closeit, Null]]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBoxPG"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["JURL", FontFamily->"Helvetica", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 1], Background->GrayLevel[1]]], "Subsection", GeneratedCell->True], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({r, nr, r2, r3, r4}\), ",", RowBox[{ RowBox[{"r", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], ";", \($ProxyHost = None\), ";", \($ProxyPort = 8080\), ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"StringMatchQ", "[", RowBox[{"r", ",", "\<\"http:/*.m\"\>", ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], "||", RowBox[{"StringMatchQ", "[", RowBox[{"r", ",", "\<\"http:/*.nb\"\>", ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], "||", RowBox[{"Or", "@@", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"StringMatchQ", "[", RowBox[{"r", ",", \("http:/*." <> #1\), ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], "&"}], ")"}], "/@", \(Join[$ImportFormats, {"JPG", "HTM", "HTML", "TXT"}]\)}]}]}], ",", RowBox[{ RowBox[{"nr", "=", RowBox[{\(Hold[ButtonBox]\), "[", RowBox[{ RowBox[{"StyleBox", "[", RowBox[{ "r", ",", \(FontColor \[Rule] RGBColor[0, 0.5`, 0.5`]\), ",", RowBox[{"FontVariations", "\[Rule]", RowBox[{"{", RowBox[{"\<\"Underline\"\>", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "}"}]}]}], "]"}], ",", \(ButtonEvaluator \[Rule] Automatic\), ",", \(ButtonNote \[Rule] "Open " <> r\), ",", RowBox[{"With", "[", RowBox[{\({rr = r}\), ",", RowBox[{"ButtonFunction", "\[RuleDelayed]", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({openRemoteFileAsNotebook, retrieveRemoteFile, winsize = {590, 500}}\), ",", RowBox[{\(Off[General::"spell1"]\), ";", \(Off[Get::"noopen"]\), ";", \(Off[Needs::"nocont"]\), ";", \(System`Private`checkifjlinkisthere = Needs["JLink`"]\), ";", RowBox[{"If", "[", RowBox[{\(System`Private`\ checkifjlinkisthere === $Failed\), ",", RowBox[{ StyleBox["NotebookPut", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{"{", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[{"Please install \ J/Link. See: ", ButtonBox["http://www.wolfram.com/solutions/mathlink/jlink", ButtonData \[RuleDelayed] {URL[ "http://www.wolfram.com/solutions/\ mathlink/jlink"], None}, ButtonStyle \[Rule] "Hyperlink"]}], "Subtitle"\), "]"}], "}"}], ",", \(WindowSize \[Rule] {677, 192}\), ",", \(WindowMargins \[Rule] \ {{Automatic, 195}, {Automatic, 118}}\), ",", \(StyleDefinitions \[Rule] "NaturalColor.nb"\)}], "]"}], "]"}], ",", RowBox[{\(On[Get::"noopen"]\), ";", \(On[Needs::"nocont"]\), ";", RowBox[{\(openRemoteFileAsNotebook[ url_String]\), ":=", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({rf, rf1, rf2, nbnew, nbnew2}\), ",", RowBox[{\(rf = retrieveRemoteFile[url]\), ";", \(rf1 = rf\), ";", RowBox[{"If", "[", RowBox[{\(StringQ[rf]\), ",", RowBox[{"If", "[", RowBox[{ RowBox[{"Or", "@@", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"StringMatchQ", "[", RowBox[{ "rr", ",", \("http:/*." <> #1\), ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], "&"}], ")"}], "/@", \(Join[$ImportFormats, {"JPG"}]\ \)}]}], ",", RowBox[{ RowBox[{"nbnew", "=", RowBox[{ StyleBox["NotebookPut", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{"{", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \("temp=Import[" <> "\"" <> rf <> "\"" <> "]", "Input"\), "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \ \("If[Head[temp]===Graphics,Show[temp]]", "Input"\), "]"}]}], "}"}], "]"}], "]"}]}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{"nbnew", ",", "All", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}], ";", RowBox[{ StyleBox["SelectionEvaluate", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", "nbnew", "]"}]}], ",", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"StringMatchQ", "[", RowBox[{ "rf", ",", "\<\"*.nb\"\>", ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], ",", \(rf2 = rf\), ",", \(rf2 = rf <> ".nb"; CopyFile[rf, rf2]\)}], "]"}], ";", RowBox[{"nbnew", "=", RowBox[{ StyleBox["NotebookOpen", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "rf2", "]"}]}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{"nbnew", ",", "All", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}], ";", RowBox[{"nbnew2", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "nbnew", "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"!", RowBox[{"StringMatchQ", "[", RowBox[{ "rf1", ",", "\<\"*.nb\"\>", ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}], ",", RowBox[{"nbnew2", "=", RowBox[{"nbnew2", "/.", "\:f360", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(a_, "Input", ___\), "]"}], "\[RuleDelayed]", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(a, "Program"\), "]"}]}]}]}]}], "]"}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", \(nbnew, nbnew2\), "]"}], ";", \(SetOptions[nbnew, WindowSize \[Rule] winsize]\), ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{"nbnew", ",", "Before", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}], ";", RowBox[{ StyleBox["SetSelectedNotebook", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", "nbnew", "]"}], ";", RowBox[{ StyleBox["NotebookSave", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "nbnew", "]"}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{"nbnew", ",", "All", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}]}]}], "]"}]}], "]"}], ";"}]}], "]"}]}], ";", RowBox[{\(retrieveRemoteFile[ url_String, opts___?OptionQ]\), ":=", RowBox[{\(ToExpression[ "JLink`JavaBlock"]\), "[", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", \({u, stream, numRead, outFile, buf, prxyHost, prxyPort, javanew = ToExpression["JLink`JavaNew"], filename}, {prxyHost, prxyPort} = \({ProxyHost, ProxyPort} /. \:f360 Flatten[{opts}]\) /. \:f360 Options[ retrieveRemoteFile]; \(ToExpression[ "JLink`StartJava"]\)[]; filename = StringDrop[url, Last[Last[StringPosition[url, "/"]]]]; FL = filename; If[StringQ[ prxyHost], \(ToExpression[ "JLink`SetInternetProxy"]\)[prxyHost, prxyPort]]; u = javanew["java.net.URL", url]; stream = u[openStream[]]; If[stream === $Failed, Return[$Failed]]; buf = javanew["[B", 5000]; outFile = OpenWrite[$TemporaryPrefix <> filename, DOSTextFormat \[Rule] False]; While[\((numRead = stream[read[buf]])\) > 0, WriteString[outFile, FromCharacterCode[\((If[#1 < 0, #1 + 256, #1] &)\) /@ Take[\(ToExpression["JLink`Val"]\)[ buf], numRead]]]]; stream[close[]]; Close[outFile]\), "]"}], "]"}]}], ";"}]}], "]"}], ";", \(openRemoteFileAsNotebook[rr]\), ";"}]}], "]"}]}]}], "]"}]}], "]"}]}], ";", RowBox[{"SetOptions", "[", RowBox[{ RowBox[{ StyleBox["NotebookSelection", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}], ",", RowBox[{ StyleBox["TaggingRules", FontSize->18, FontSlant->"Italic", FontColor->RGBColor[0.6, 0.8, 0.100008]], "\[Rule]", "\<\"wwwtag\"\>"}]}], "]"}], ";", RowBox[{"r2", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "All", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{"r3", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], ";", RowBox[{"r4", "=", RowBox[{"r3", "/.", "\:f360", RowBox[{ RowBox[{"StyleBox", "[", RowBox[{"s_", ",", RowBox[{ StyleBox["TaggingRules", FontSize->18, FontSlant->"Italic", FontColor->RGBColor[0.6, 0.8, 0.100008]], "\[RuleDelayed]", "\<\"wwwtag\"\>"}]}], "]"}], "\[Rule]", \(ReleaseHold[nr]\)}]}]}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "r4"}], "]"}]}]}], "]"}]}]}], "]"}]], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["JURL", "Subsection", ShowStringCharacters->True, FontFamily->"Helvetica", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 1]], ButtonFunction:>CompoundExpression[ Module[ {r, nr, r2, r3, r4}, CompoundExpression[ Set[ r, NotebookRead[ InputNotebook[ ]]], Set[ $ProxyHost, None], Set[ $ProxyPort, 8080], If[ Or[ StringMatchQ[ r, "http:/*.m", IgnoreCase -> True], StringMatchQ[ r, "http:/*.nb", IgnoreCase -> True], Apply[ Or, Map[ StringMatchQ[ r, StringJoin[ "http:/*.", #], IgnoreCase -> True]&, Join[ $ImportFormats, {"JPG", "HTM", "HTML", "TXT"}]]]], CompoundExpression[ Set[ nr, Hold[ ButtonBox][ StyleBox[ r, FontColor -> RGBColor[ 0, 0.5, 0.5], FontVariations -> {"Underline" -> True}], ButtonEvaluator -> Automatic, ButtonNote -> StringJoin[ "Open ", r], With[ { Set[ rr, r]}, ButtonFunction :> Module[ {openRemoteFileAsNotebook, retrieveRemoteFile, Set[ winsize, {590, 500}]}, CompoundExpression[ Off[ MessageName[ General, "spell1"]], Off[ MessageName[ Get, "noopen"]], Off[ MessageName[ Needs, "nocont"]], Set[ System`Private`checkifjlinkisthere, Needs[ "JLink`"]], If[ SameQ[ System`Private`checkifjlinkisthere, $Failed], NotebookPut[ Notebook[ { Cell[ TextData[ {"Please install J/Link. See: ", ButtonBox[ "http://www.wolfram.com/solutions/\ mathlink/jlink", ButtonData :> { URL[ "http://www.wolfram.com/solutions/\ mathlink/jlink"], None}, ButtonStyle -> "Hyperlink"]}], "Subtitle"]}, WindowSize -> {677, 192}, WindowMargins -> {{Automatic, 195}, { Automatic, 118}}, StyleDefinitions -> "NaturalColor.nb"]], CompoundExpression[ On[ MessageName[ Get, "noopen"]], On[ MessageName[ Needs, "nocont"]], SetDelayed[ openRemoteFileAsNotebook[ Pattern[ url, Blank[ String]]], Module[ {rf, rf1, rf2, nbnew, nbnew2}, CompoundExpression[ Set[ rf, retrieveRemoteFile[ url]], Set[ rf1, rf], If[ StringQ[ rf], If[ Apply[ Or, Map[ StringMatchQ[ rr, StringJoin[ "http:/*.", #], IgnoreCase -> True]&, Join[ $ImportFormats, {"JPG"}]]], CompoundExpression[ Set[ nbnew, NotebookPut[ Notebook[ { Cell[ StringJoin[ "temp=Import[", "\"", rf, "\"", "]"], "Input"], Cell[ "If[Head[temp]===Graphics,Show[temp]]\ ", "Input"]}]]], SelectionMove[ nbnew, All, Notebook], SelectionEvaluate[ nbnew]], CompoundExpression[ If[ StringMatchQ[ rf, "*.nb", IgnoreCase -> True], Set[ rf2, rf], CompoundExpression[ Set[ rf2, StringJoin[ rf, ".nb"]], CopyFile[ rf, rf2]]], Set[ nbnew, NotebookOpen[ rf2]], SelectionMove[ nbnew, All, Notebook], Set[ nbnew2, NotebookRead[ nbnew]], If[ Not[ StringMatchQ[ rf1, "*.nb", IgnoreCase -> True]], Set[ nbnew2, ReplaceAll[ nbnew2, Cell[ Pattern[ a, Blank[ ]], "Input", BlankNullSequence[ ]] :> Cell[ a, "Program"]]]], NotebookWrite[ nbnew, nbnew2], SetOptions[ nbnew, WindowSize -> winsize], SelectionMove[ nbnew, Before, Notebook], SetSelectedNotebook[ nbnew], NotebookSave[ nbnew], SelectionMove[ nbnew, All, Notebook]]]], Null]]], SetDelayed[ retrieveRemoteFile[ Pattern[ url, Blank[ String]], PatternTest[ Pattern[ opts, BlankNullSequence[ ]], OptionQ]], ToExpression[ "JLink`JavaBlock"][ Module[ {u, stream, numRead, outFile, buf, prxyHost, prxyPort, Set[ javanew, ToExpression[ "JLink`JavaNew"]], filename}, CompoundExpression[ Set[ {prxyHost, prxyPort}, ReplaceAll[ ReplaceAll[ {ProxyHost, ProxyPort}, Flatten[ {opts}]], Options[ retrieveRemoteFile]]], ToExpression[ "JLink`StartJava"][ ], Set[ filename, StringDrop[ url, Last[ Last[ StringPosition[ url, "/"]]]]], Set[ FL, filename], If[ StringQ[ prxyHost], ToExpression[ "JLink`SetInternetProxy"][ prxyHost, prxyPort]], Set[ u, javanew[ "java.net.URL", url]], Set[ stream, u[ openStream[ ]]], BRP[ stream], If[ SameQ[ stream, $Failed], Return[ $Failed]], Set[ buf, javanew[ "[B", 5000]], Set[ outFile, OpenWrite[ StringJoin[ $TemporaryPrefix, filename], DOSTextFormat -> False]], While[ Greater[ Set[ numRead, stream[ read[ buf]]], 0], WriteString[ outFile, FromCharacterCode[ Map[ If[ Less[ #, 0], Plus[ #, 256], #]&, Take[ ToExpression[ "JLink`Val"][ buf], numRead]]]]], stream[ close[ ]], Close[ outFile]]]]], Null]], openRemoteFileAsNotebook[ rr], Null]]]]], SetOptions[ NotebookSelection[ InputNotebook[ ]], TaggingRules -> "wwwtag"], Set[ r2, NotebookRead[ InputNotebook[ ]]], SelectionMove[ InputNotebook[ ], All, Cell], Set[ r3, NotebookRead[ InputNotebook[ ]]], Set[ r4, ReplaceAll[ r3, StyleBox[ Pattern[ s, Blank[ ]], TaggingRules :> "wwwtag"] -> ReleaseHold[ nr]]], NotebookWrite[ InputNotebook[ ], r4]]]]]], ButtonEvaluator->Automatic, Background->GrayLevel[1]]], NotebookDefault, CellTags->"GeneratedButtonBoxJURL"] }, Closed]], Cell[CellGroupData[{ Cell["SD", "Subsection"], Cell[BoxData[ RowBox[{"SetDirectory", "[", RowBox[{ RowBox[{ RowBox[{"\<\"FileName\"\>", "/.", "\[InvisibleSpace]", RowBox[{"NotebookInformation", "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], "/.", "\[InvisibleSpace]", \(FrontEnd`FileName[d_, __] \[RuleDelayed] ToFileName[d]\)}], "/.", "\[InvisibleSpace]", \("FileName" \[Rule] $Failed\)}], "]"}]], "Input"], Cell[BoxData[ ButtonBox["SD", ButtonFunction:>SetDirectory[ ReplaceAll[ ReplaceAll[ ReplaceAll[ "FileName", NotebookInformation[ InputNotebook[ ]]], FrontEnd`FileName[ Pattern[ d, Blank[ ]], BlankSequence[ ]] :> ToFileName[ d]], "FileName" -> $Failed]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBoxSD"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["F2B", FontColor->RGBColor[0, 0.2, 0.8], Background->RGBColor[1, 0.700008, 0]]], "Subsection"], Cell[BoxData[ RowBox[{ RowBox[{"ButtonTools`F2B", "=", RowBox[{"Function", "[", RowBox[{\({nb}\), ",", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({backgr, busu, butbox, buttontitle, bts, f, funhead, holdSequence, NBMessage, newcell, nf, r, readit, text, writeit}\), ",", RowBox[{ RowBox[{"r", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "nb", "]"}]}], ";", \(FunctionToButton::"errorbox" = "ErrorBox encountered. Change the source cell to \ InputForm,then to StandardForm and try again"\), ";", RowBox[{\(NBMessage["errorBox"]\), ":=", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({mnb}\), ",", RowBox[{ RowBox[{"mnb", "=", RowBox[{ StyleBox["NotebookPut", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{"{", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{\(BoxData[ "Message[FunctionToButton::errorbox]"]\ \), ",", "\<\"Input\"\>", ",", RowBox[{ StyleBox["CellOpen", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", "False"}]}], "]"}], "}"}], ",", \(WindowElements \[Rule] \ {"MagnificationPopUp", "VerticalScrollBar"}\), ",", \(WindowMargins \[Rule] {{5, Automatic}, {Automatic, 5}}\), ",", \(WindowSize \[Rule] {580, 270}\), ",", \(Magnification \[Rule] 2\), ",", \(Background \[Rule] RGBColor[0.9, 0.9, 0.7]\), ",", RowBox[{ StyleBox["ShowCellBracket", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", "False"}]}], "]"}], "]"}]}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{"mnb", ",", "All", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}], ";", RowBox[{ StyleBox["SelectionEvaluate", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", "mnb", "]"}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{"mnb", ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ RowBox[{"BoxData", "[", RowBox[{"ButtonBox", "[", RowBox[{\(StyleBox["Close", "Subtitle"]\), ",", RowBox[{ "ButtonFunction", "\[RuleDelayed]", RowBox[{ StyleBox["NotebookClose", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["ButtonNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], ",", \(ButtonEvaluator \[RuleDelayed] Automatic\)}], "]"}], "]"}], ",", StyleBox["NotebookDefault", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], ",", \(TextAlignment \[Rule] Center\), ",", RowBox[{"Active", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}], "]"}], ";", RowBox[{ StyleBox["SetSelectedNotebook", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", "mnb", "]"}], ";"}]}], "]"}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"\[InvisibleSpace]", "!", RowBox[{"(", RowBox[{"MatchQ", "[", RowBox[{"r", ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ StyleBox["CellGroupData", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", "__", "]"}], "]"}]}], "]"}], ")"}]}], ",", RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{"nb", ",", "All", ",", StyleBox["CellGroup", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{"readit", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "nb", "]"}]}]}], ",", \(readit = r\)}], "]"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"\[InvisibleSpace]", "!", RowBox[{"(", RowBox[{"MatchQ", "[", RowBox[{"readit", ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ StyleBox["CellGroupData", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(__, _\), "]"}], "]"}]}], "]"}], ")"}]}], ",", \(NBMessage["Please select a Cell group"]\), ",", RowBox[{ RowBox[{"r", "=", RowBox[{\(Flatten[{readit}]\), "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(es_String, "Input", rest___\), "]"}], "\[RuleDelayed]", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(BoxData[es], "Input", rest\), "]"}]}]}]}], ";", RowBox[{"r", "=", RowBox[{"r", "//.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ StyleBox["CellGroupData", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ RowBox[{"{", RowBox[{"cels", ":", RowBox[{"BlankSequence", "[", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "]"}]}], "}"}], ",", "_"}], "]"}], "]"}], "\[RuleDelayed]", "cels"}]}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"MatchQ", "[", RowBox[{\(r\[LeftDoubleBracket]1\ \[RightDoubleBracket]\), ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData[a_], style_ /; style =!= "Input", ___\), "]"}]}], "]"}], ",", RowBox[{\(text = RowBox[ Flatten[{r\[LeftDoubleBracket]1, 1, 1\[RightDoubleBracket]}]]\), ";", RowBox[{"If", "[", RowBox[{\(MatchQ[ r\[LeftDoubleBracket]1, 1, 1\[RightDoubleBracket], StyleBox[_String, __]]\), ",", RowBox[{"buttontitle", "=", RowBox[{"Replace", "[", RowBox[{\(r\[LeftDoubleBracket]1, 1, 1\[RightDoubleBracket]\), ",", RowBox[{\(StyleBox[a_, b__]\), "\[Rule]", RowBox[{"StyleBox", "[", RowBox[{ RowBox[{"StyleBox", "[", RowBox[{ "a", ",", \(r\[LeftDoubleBracket]1, 2\[RightDoubleBracket]\), ",", RowBox[{ "ShowStringCharacters", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], ",", "b", ",", RowBox[{ "ShowStringCharacters", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}]}], "]"}]}], ",", RowBox[{"buttontitle", "=", RowBox[{"StyleBox", "[", RowBox[{ "text", ",", \(r\[LeftDoubleBracket]1, 2\[RightDoubleBracket]\), ",", RowBox[{ "ShowStringCharacters", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}]}], "]"}]}]}], "]"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"MatchQ", "[", RowBox[{\(r\[LeftDoubleBracket]1\ \[RightDoubleBracket]\), ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(es_String, style_ /; style =!= "Input", ___\), "]"}]}], "]"}], ",", RowBox[{"If", "[", RowBox[{\(StringMatchQ[ r\[LeftDoubleBracket]1, 1\[RightDoubleBracket], "*\"*"]\), ",", RowBox[{"buttontitle", "=", RowBox[{"StyleBox", "[", RowBox[{\(r\[LeftDoubleBracket]1, 1\[RightDoubleBracket]\), ",", RowBox[{ "ShowStringCharacters", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}], ",", \(buttontitle = r\[LeftDoubleBracket]1, 1\[RightDoubleBracket]\)}], "]"}]}], "]"}], ";", RowBox[{"r", "=", RowBox[{ RowBox[{ RowBox[{"r", "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(a_, b_ /; b =!= "Input", ___\), "]"}], "\[RuleDelayed]", \(Sequence[]\)}]}], "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(_, "Input", ___, Evaluatable \[Rule] False, ___\), "]"}], "\[RuleDelayed]", \(Sequence[]\)}]}], "/.", "\[InvisibleSpace]", \(TextData \[Rule] BoxData\)}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"MatchQ", "[", RowBox[{\(r\[LeftDoubleBracket]1\ \[RightDoubleBracket]\), ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(BoxData[_], "Input", ___\), "]"}]}], "]"}], ",", RowBox[{\(f = MakeExpression[ r\[LeftDoubleBracket]1, 1\[RightDoubleBracket], StandardForm]\), ";", RowBox[{ StyleBox["Do", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", \(If[ MatchQ[ nf = MakeExpression[ r\[LeftDoubleBracket]j, 1\[RightDoubleBracket], StandardForm] \ /. \[InvisibleSpace]HoldComplete[a_; __] \[Rule] HoldComplete[a], HoldComplete[_[__] := _]], Return[ funhead = Extract[nf, {1, 1, 0}]]], {j, Length[r]}\), "]"}]}]}], "]"}], ";", \(If[\(\(\[InvisibleSpace]\)\(! \((ValueQ[ funhead])\)\)\), funhead = "function"]\), ";", \(If[\(\(\[InvisibleSpace]\)\(! \((ValueQ[ buttontitle])\)\)\), buttontitle = funhead]\), ";", \(f = Prepend[ Table[MakeExpression[ r\[LeftDoubleBracket]i, 1\[RightDoubleBracket], StandardForm], {i, 2, Length[r]}], f]\), ";", \(If[\(\(\[InvisibleSpace]\)\(! \((FreeQ[f, ErrorBox[__]])\)\)\) && FreeQ[f, HoldPattern[ErrorBox[_BlankSequence]]], NBMessage["errorBox"]]\), ";", \(backgr = Sequence @@ Cases[buttontitle, HoldPattern[Background \[Rule] _], \(-1\)]\), ";", \(buttontitle = buttontitle /. \[InvisibleSpace]\((Background \ \[Rule] _)\) \[RuleDelayed] Sequence[]\), ";", \(butbox = \(ButtonBox[buttontitle, RuleDelayed @@ {ButtonFunction, \(Hold[ CompoundExpression]\)[ Sequence @@ f]}, backgr, ButtonEvaluator \[Rule] Automatic] /. \[InvisibleSpace]{Hold[ CompoundExpression] \[RuleDelayed] CompoundExpression, HoldComplete[z_] \[RuleDelayed] z}\) /. \[InvisibleSpace]Hold @@ {funhead} \ \[Rule] funhead\), ";", \(butbox = butbox //. \[InvisibleSpace]{HoldPattern[a___; Null; b___] \[RuleDelayed] \((a; b)\), HoldPattern[a___; b__; c___] \[RuleDelayed] \((a; b; c)\)}\), ";", \(butbox = butbox /. \[InvisibleSpace]HoldPattern[ CompoundExpression[a_]] \[RuleDelayed] a\), ";", \(bts = buttontitle //. \[InvisibleSpace]StyleBox[ a_, ___] \[RuleDelayed] a\), ";", RowBox[{"writeit", "=", RowBox[{"readit", "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{"__", ",", RowBox[{ StyleBox["CellTags", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", \("GeneratedButtonBox" <> bts\)}], ",", "___"}], "]"}], "\[RuleDelayed]", \(Sequence[]\)}]}]}], ";", \(If[\(\(\[InvisibleSpace]\)\(! \((StringQ[ bts])\)\)\), bts = "BU"]\), ";", RowBox[{"newcell", "=", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{\(BoxData[butbox]\), ",", "\<\"NotebookDefault\"\>", ",", RowBox[{ StyleBox["CellTags", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", \("GeneratedButtonBox" <> bts\)}]}], "]"}]}], ";", RowBox[{"writeit", "=", RowBox[{"writeit", "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ StyleBox["CellGroupData", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \({c__}, oc_\), "]"}], "]"}], "\[RuleDelayed]", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ StyleBox["CellGroupData", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \({c, newcell}, oc\), "]"}], "]"}]}]}]}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", \(nb, writeit\), "]"}], ";", RowBox[{ StyleBox["NotebookFind", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ "nb", ",", \("GeneratedButtonBox" <> bts\), ",", "All", ",", StyleBox["CellTags", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{"If", "[", RowBox[{\(buttontitle =!= "Action"\), ",", RowBox[{ RowBox[{ StyleBox["FrontEndExecute", FontSize->18, FontSlant->"Italic", FontColor->RGBColor[0.6, 0.8, 0.100008]], "[", \({FrontEnd`FrontEndToken[nb, "GeneratePalette"]}\), "]"}], ";"}]}], "]"}], ";", RowBox[{ StyleBox["FrontEndExecute", FontSize->18, FontSlant->"Italic", FontColor->RGBColor[0.6, 0.8, 0.100008]], "[", \(FrontEnd`SetSelectedNotebook[nb]\), "]"}]}]}], "]"}]}]}], "]"}]}], "]"}]}], ";"}]], "Input"], Cell[BoxData[ RowBox[{"ButtonTools`F2B", "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["F2B", "Subsection", ShowStringCharacters->True, FontColor->RGBColor[0, 0.2, 0.8]], ButtonFunction:>CompoundExpression[ CompoundExpression[ Set[ ButtonTools`F2B, Function[ {nb}, Module[ {backgr, busu, butbox, buttontitle, bts, f, funhead, holdSequence, NBMessage, newcell, nf, r, readit, text, writeit}, CompoundExpression[ Set[ r, NotebookRead[ nb]], Set[ MessageName[ FunctionToButton, "errorbox"], "ErrorBox encountered. Change the source cell to \ InputForm,then to StandardForm and try again"], SetDelayed[ NBMessage[ "errorBox"], Module[ {mnb}, CompoundExpression[ Set[ mnb, NotebookPut[ Notebook[ { Cell[ BoxData[ "Message[FunctionToButton::errorbox]"], "Input", CellOpen -> False]}, WindowElements -> {"MagnificationPopUp", "VerticalScrollBar"}, WindowMargins -> {{5, Automatic}, {Automatic, 5}}, WindowSize -> { 580, 270}, Magnification -> 2, Background -> RGBColor[ 0.90000000000000002, 0.90000000000000002, 0.69999999999999996], ShowCellBracket -> False]]], SelectionMove[ mnb, All, Notebook], SelectionEvaluate[ mnb], NotebookWrite[ mnb, Cell[ BoxData[ ButtonBox[ StyleBox[ "Close", "Subtitle"], ButtonFunction :> NotebookClose[ ButtonNotebook[ ]], ButtonEvaluator :> Automatic]], NotebookDefault, TextAlignment -> Center, Active -> True]], SetSelectedNotebook[ mnb], Null]]], If[ Not[ MatchQ[ r, Cell[ CellGroupData[ BlankSequence[ ]]]]], CompoundExpression[ SelectionMove[ nb, All, CellGroup], Set[ readit, NotebookRead[ nb]]], Set[ readit, r]], If[ Not[ MatchQ[ readit, Cell[ CellGroupData[ BlankSequence[ ], Blank[ ]]]]], NBMessage[ "Please select a Cell group"], CompoundExpression[ Set[ r, ReplaceAll[ Flatten[ {readit}], Cell[ Pattern[ es, Blank[ String]], "Input", Pattern[ rest, BlankNullSequence[ ]]] :> Cell[ BoxData[ es], "Input", rest]]], Set[ r, ReplaceRepeated[ r, Cell[ CellGroupData[ { Pattern[ cels, BlankSequence[ Cell]]}, Blank[ ]]] :> cels]], If[ MatchQ[ Part[ r, 1], Cell[ TextData[ Pattern[ a, Blank[ ]]], Condition[ Pattern[ style, Blank[ ]], UnsameQ[ style, "Input"]], BlankNullSequence[ ]]], CompoundExpression[ Set[ text, RowBox[ Flatten[ { Part[ r, 1, 1, 1]}]]], If[ MatchQ[ Part[ r, 1, 1, 1], StyleBox[ Blank[ String], BlankSequence[ ]]], Set[ buttontitle, Replace[ Part[ r, 1, 1, 1], StyleBox[ Pattern[ a, Blank[ ]], Pattern[ b, BlankSequence[ ]]] -> StyleBox[ StyleBox[ a, Part[ r, 1, 2], ShowStringCharacters -> True], b, ShowStringCharacters -> True]]], Set[ buttontitle, StyleBox[ text, Part[ r, 1, 2], ShowStringCharacters -> True]]]]], If[ MatchQ[ Part[ r, 1], Cell[ Pattern[ es, Blank[ String]], Condition[ Pattern[ style, Blank[ ]], UnsameQ[ style, "Input"]], BlankNullSequence[ ]]], If[ StringMatchQ[ Part[ r, 1, 1], "*\"*"], Set[ buttontitle, StyleBox[ Part[ r, 1, 1], ShowStringCharacters -> True]], Set[ buttontitle, Part[ r, 1, 1]]]], Set[ r, ReplaceAll[ ReplaceAll[ ReplaceAll[ r, Cell[ Pattern[ a, Blank[ ]], Condition[ Pattern[ b, Blank[ ]], UnsameQ[ b, "Input"]], BlankNullSequence[ ]] :> Sequence[ ]], Cell[ Blank[ ], "Input", BlankNullSequence[ ], Evaluatable -> False, BlankNullSequence[ ]] :> Sequence[ ]], TextData -> BoxData]], If[ MatchQ[ Part[ r, 1], Cell[ BoxData[ Blank[ ]], "Input", BlankNullSequence[ ]]], CompoundExpression[ Set[ f, MakeExpression[ Part[ r, 1, 1], StandardForm]], Do[ If[ MatchQ[ Set[ nf, ReplaceAll[ MakeExpression[ Part[ r, j, 1], StandardForm], HoldComplete[ CompoundExpression[ Pattern[ a, Blank[ ]], BlankSequence[ ]]] -> HoldComplete[ a]]], HoldComplete[ SetDelayed[ Blank[ ][ BlankSequence[ ]], Blank[ ]]]], Return[ Set[ funhead, Extract[ nf, {1, 1, 0}]]]], {j, Length[ r]}]]], If[ Not[ ValueQ[ funhead]], Set[ funhead, "function"]], If[ Not[ ValueQ[ buttontitle]], Set[ buttontitle, funhead]], Set[ f, Prepend[ Table[ MakeExpression[ Part[ r, i, 1], StandardForm], {i, 2, Length[ r]}], f]], If[ And[ Not[ FreeQ[ f, ErrorBox[ BlankSequence[ ]]]], FreeQ[ f, HoldPattern[ ErrorBox[ Blank[ BlankSequence]]]]], NBMessage[ "errorBox"]], Set[ backgr, Apply[ Sequence, Cases[ buttontitle, HoldPattern[ Background -> Blank[ ]], -1]]], Set[ buttontitle, ReplaceAll[ buttontitle, (Background -> Blank[ ]) :> Sequence[ ]]], Set[ butbox, ReplaceAll[ ReplaceAll[ ButtonBox[ buttontitle, Apply[ RuleDelayed, {ButtonFunction, Hold[ CompoundExpression][ Apply[ Sequence, f]]}], backgr, ButtonEvaluator -> Automatic], {Hold[ CompoundExpression] :> CompoundExpression, HoldComplete[ Pattern[ z, Blank[ ]]] :> z}], Apply[ Hold, {funhead}] -> funhead]], Set[ butbox, ReplaceRepeated[ butbox, {HoldPattern[ CompoundExpression[ Pattern[ a, BlankNullSequence[ ]], Null, Pattern[ b, BlankNullSequence[ ]]]] :> CompoundExpression[ a, b], HoldPattern[ CompoundExpression[ Pattern[ a, BlankNullSequence[ ]], Pattern[ b, BlankSequence[ ]], Pattern[ c, BlankNullSequence[ ]]]] :> CompoundExpression[ a, b, c]}]], Set[ butbox, ReplaceAll[ butbox, HoldPattern[ Pattern[ a, Blank[ ]]] :> a]], Set[ bts, ReplaceRepeated[ buttontitle, StyleBox[ Pattern[ a, Blank[ ]], BlankNullSequence[ ]] :> a]], Set[ writeit, ReplaceAll[ readit, Cell[ BlankSequence[ ], CellTags -> StringJoin[ "GeneratedButtonBox", bts], BlankNullSequence[ ]] :> Sequence[ ]]], If[ Not[ StringQ[ bts]], Set[ bts, "BU"]], Set[ newcell, Cell[ BoxData[ butbox], "NotebookDefault", CellTags -> StringJoin[ "GeneratedButtonBox", bts]]], Set[ writeit, ReplaceAll[ writeit, Cell[ CellGroupData[ { Pattern[ c, BlankSequence[ ]]}, Pattern[ oc, Blank[ ]]]] :> Cell[ CellGroupData[ {c, newcell}, oc]]]], NotebookWrite[ nb, writeit], NotebookFind[ nb, StringJoin[ "GeneratedButtonBox", bts], All, CellTags], If[ UnsameQ[ buttontitle, "Action"], CompoundExpression[ FrontEndExecute[ { FrontEnd`FrontEndToken[ nb, "GeneratePalette"]}], Null]], FrontEndExecute[ FrontEnd`SetSelectedNotebook[ nb]]]]]]]], Null], ButtonTools`F2B[ InputNotebook[ ]]], ButtonEvaluator->Automatic, Background->RGBColor[1, 0.700008, 0]]], NotebookDefault, CellTags->"GeneratedButtonBoxF2B"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["CN", Background->RGBColor[0.4, 0.6, 1]]], "Subsection"], Cell[BoxData[ \(ButtonTools`CN = NotebookClose /@ Select[Notebooks[], FreeQ[NotebookInformation[#], "FileName"] &]; \)], "Input"], Cell[BoxData[ \(ButtonTools`CN\)], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["CN", "Subsection", ShowStringCharacters->True], ButtonFunction:>CompoundExpression[ CompoundExpression[ Set[ ButtonTools`CN, Map[ NotebookClose, Select[ Notebooks[ ], FreeQ[ NotebookInformation[ #], "FileName"]&]]], Null], ButtonTools`CN], ButtonEvaluator->Automatic, Background->RGBColor[0.4, 0.6, 1]]], NotebookDefault, CellTags->"GeneratedButtonBoxCN"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["HP", FontColor->RGBColor[0.6, 0, 0.2]]], "Subsection"], Cell[BoxData[ \(NotebookFind[InputNotebook[], "\", All, CellStyle]; \)], "Input"], Cell[BoxData[ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["NotebookPut", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{"{", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ RowBox[{"BoxData", "[", RowBox[{"GridBox", "[", RowBox[{ RowBox[{"Transpose", "[", RowBox[{ RowBox[{"Select", "[", RowBox[{ RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}], ",", \(\(\(\[InvisibleSpace]\)\(! \ \((FreeQ[#1, ButtonBox])\)\)\) &\)}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(BoxData[a_], __\), "]"}], "\[RuleDelayed]", \({a}\)}]}], "]"}], ",", \(RowSpacings \[Rule] 0\), ",", \(ColumnSpacings \[Rule] 0\)}], "]"}], "]"}], ",", "\"\\""}], "]"}], "}"}], ",", \(Magnification \[Rule] 1\)}], "]"}], "]"}], ",", "All", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ StyleBox["FrontEndExecute", FontSize->18, FontSlant->"Italic", FontColor->RGBColor[0.6, 0.8, 0.100008]], "[", \({FrontEndToken[ FrontEnd`SelectedNotebook[], "\"]}\), "]"}]], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["HP", "Subsection", ShowStringCharacters->True, FontColor->RGBColor[0.6, 0, 0.2]], ButtonFunction:>CompoundExpression[ CompoundExpression[ NotebookFind[ InputNotebook[ ], "NotebookDefault", All, CellStyle], Null], SelectionMove[ NotebookPut[ Notebook[ { Cell[ BoxData[ GridBox[ Transpose[ ReplaceAll[ Select[ NotebookRead[ InputNotebook[ ]], Not[ FreeQ[ #, ButtonBox]]&], Cell[ BoxData[ Pattern[ a, Blank[ ]]], BlankSequence[ ]] :> {a}]], RowSpacings -> 0, ColumnSpacings -> 0]], "NotebookDefault"]}, Magnification -> 1]], All, Notebook], FrontEndExecute[ { FrontEndToken[ FrontEnd`SelectedNotebook[ ], "GeneratePalette"]}]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBoxHP"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["VP", FontColor->RGBColor[0.6, 0, 0.2]]], "Subsection"], Cell[BoxData[ \(\(NotebookFind[InputNotebook[], "\", All, CellStyle];\)\)], "Input"], Cell[BoxData[ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["NotebookPut", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{"{", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ RowBox[{"BoxData", "[", RowBox[{"GridBox", "[", RowBox[{ RowBox[{ RowBox[{"Select", "[", RowBox[{ RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}], ",", \(\(\(\[InvisibleSpace]\)\(! \((FreeQ[#1, ButtonBox])\)\)\) &\)}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(BoxData[a_], __\), "]"}], "\[RuleDelayed]", \({a}\)}]}], ",", \(RowSpacings \[Rule] 0\), ",", \(ColumnSpacings \[Rule] 0\)}], "]"}], "]"}], ",", "\"\\""}], "]"}], "}"}], "]"}], "]"}], ",", "All", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ StyleBox["FrontEndExecute", FontSize->18, FontSlant->"Italic", FontColor->RGBColor[0.6, 0.8, 0.100008]], "[", \({FrontEndToken[ FrontEnd`SelectedNotebook[], "\"]}\), "]"}]], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["VP", "Subsection", ShowStringCharacters->True, FontColor->RGBColor[0.6, 0, 0.2]], ButtonFunction:>CompoundExpression[ CompoundExpression[ NotebookFind[ InputNotebook[ ], "NotebookDefault", All, CellStyle], Null], SelectionMove[ NotebookPut[ Notebook[ { Cell[ BoxData[ GridBox[ ReplaceAll[ Select[ NotebookRead[ InputNotebook[ ]], Not[ FreeQ[ #, ButtonBox]]&], Cell[ BoxData[ Pattern[ a, Blank[ ]]], BlankSequence[ ]] :> {a}], RowSpacings -> 0, ColumnSpacings -> 0]], "NotebookDefault"]}]], All, Notebook], FrontEndExecute[ { FrontEndToken[ FrontEnd`SelectedNotebook[ ], "GeneratePalette"]}]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBoxVP"] }, Closed]], Cell[CellGroupData[{ Cell["CP", "Subsection"], Cell[BoxData[ \(NotebookPut[NotebookGet[InputNotebook[]]]\)], "Input"], Cell[BoxData[ ButtonBox["CP", ButtonFunction:>CompoundExpression[ NotebookPut[ NotebookGet[ InputNotebook[ ]]]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBoxCP"] }, Closed]], Cell[CellGroupData[{ Cell["150%", "Subsection"], Cell[BoxData[ \(FrontEndExecute[{FrontEndToken[InputNotebook[], "Magnification", "1.5"]}]\)], "Input"], Cell[BoxData[ ButtonBox[\(150 %\), ButtonFunction:>FrontEndExecute[ { FrontEndToken[ InputNotebook[ ], "Magnification", "1.5"]}], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBox150%"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Cl", FontColor->RGBColor[0.699992, 0, 0]]], "Subsection"], Cell[BoxData[ \(NotebookClose[InputNotebook[]]\)], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["Cl", "Subsection", ShowStringCharacters->True, FontColor->RGBColor[0.699992, 0, 0]], ButtonFunction:>CompoundExpression[ NotebookClose[ InputNotebook[ ]]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBoxCl"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Qu", FontFamily->"Helvetica", FontWeight->"Bold", FontColor->GrayLevel[0], Background->GrayLevel[1]]], "Subsection"], Cell[BoxData[ \(Quit[]\)], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["Qu", "Subsection", ShowStringCharacters->True, FontFamily->"Helvetica", FontWeight->"Bold", FontColor->GrayLevel[0]], ButtonFunction:>CompoundExpression[ Quit[ ]], ButtonEvaluator->Automatic, Background->GrayLevel[1]]], NotebookDefault, CellTags->"GeneratedButtonBoxQu"] }, Closed]], Cell[CellGroupData[{ Cell["ZWT", "Subsection"], Cell[BoxData[ \(SelectionMove[InputNotebook[], All, Cell]\)], "Input"], Cell[BoxData[ \(SetOptions[NotebookSelection[InputNotebook[]], ZeroWidthTimes \[Rule] Not[\(Options[NotebookSelection[InputNotebook[]], ZeroWidthTimes]\)[\([\)\(1, 2\)\(]\)]]]\)], "Input"], Cell[BoxData[ ButtonBox["ZWT", ButtonFunction:>CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Cell], SetOptions[ NotebookSelection[ InputNotebook[ ]], ZeroWidthTimes -> Not[ Part[ Options[ NotebookSelection[ InputNotebook[ ]], ZeroWidthTimes], 1, 2]]]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBoxZWT"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["cd", Background->RGBColor[0.4, 0.6, 1]]], "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({}\), ",", RowBox[{ RowBox[{\(System`Private`dir`PastePalette[___]\), ":=", RowBox[{"(", RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "All", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{\(BoxData[ System`Private`dir`ListDirectories[]]\), ",", "\<\"Text\"\>", ",", RowBox[{"Active", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}], "]"}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Previous", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}]}], ")"}]}], ";", \(Options[ System`Private`dir`ListDirectories] = {ExcludeDirectories \ \[Rule] {".*"}, PrologButtons \[RuleDelayed] {ButtonBox[ "\[UpArrow] " <> System`Private`dir`LastDirectory[Directory[]], ButtonFunction \[RuleDelayed] \((SetDirectory[ ParentDirectory[]]; System`Private`dir`PastePalette[])\), ButtonEvaluator \[Rule] Automatic, Background \[Rule] RGBColor[0.4, 0.6, 0]]}}\), ";", RowBox[{\(System`Private`dir`LastDirectory[s_String]\), ":=", RowBox[{"Catch", "[", RowBox[{\(If[$OperatingSystem === "MacOS", If[ParentDirectory[] === s, Throw[s]]]\), ";", RowBox[{"If", "[", RowBox[{\(Directory[] == ParentDirectory[]\), ",", "s", ",", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", \({t = StringTake[s, \(-1\)], j = 1, n}, While[j < StringLength[s], \(j++\); n = StringTake[s, {\(-j\), \(-j\)}]; If[StringMatchQ[n, $PathnameSeparator], Return[t], t = n <> t]]; \), "]"}]}], "]"}]}], "]"}]}], ";", RowBox[{\(System`Private`dir`ListDirectories[opts___Rule]\), ":=", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({dirs, dirs2, exclude, gridboxops, macfix, InputttNotebook, prologbuttons}\), ",", RowBox[{\(If[$OperatingSystem =!= "MacOS", dirs = Select[FileNames["*", "*", 0], FileType[#1] === Directory &], dirs = Select[FileNames["*", "*", 0], FileType[#1] === Directory || FileType[#1] === None && \(! StringMatchQ[#1, "*.*"]\) &]; dirs = dirs /. \:f360 s_String \[RuleDelayed] StringDrop[s, 1]]\), ";", \(exclude = \(ExcludeDirectories /. \:f360 {opts}\) /. \ \:f360 Options[System`Private`dir`ListDirectories]\), ";", RowBox[{ StyleBox["Do", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", \(dirs = Select[dirs, \(! StringMatchQ[#1, exclude\[LeftDoubleBracket]i\ \[RightDoubleBracket]]\) &], {i, Length[exclude]}\), "]"}], ";", \(prologbuttons = \(PrologButtons /. \:f360 {opts}\) /. \ \:f360 Options[System`Private`dir`ListDirectories]\), ";", \(prologbuttons = List /@ Flatten[{prologbuttons}] /. \:f360 HoldPattern[ParentDirectory[]] \[Rule] ParentDirectory[]\), ";", \(gridboxops = Sequence[RowSpacings \[Rule] 0, ColumnAlignments \[Rule] {Left}]\), ";", \(macfix[s_String] := If[$OperatingSystem === "Ma\.1acOS", StringReplace[s, "::" \[Rule] ":"], s]\), ";", RowBox[{"dirs2", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"GridBox", "[", RowBox[{ RowBox[{"Join", "[", RowBox[{"prologbuttons", ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{"ButtonBox", "[", RowBox[{"#1", ",", RowBox[{"ButtonFunction", "\[Rule]", RowBox[{\(Hold[CompoundExpression]\), "[", RowBox[{\(\(Hold[SetDirectory]\)[ macfix[ Directory[] <> $PathnameSeparator <> \ #1]]\), ",", RowBox[{ RowBox[{"Hold", "[", StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "]"}], "[", RowBox[{\(InputttNotebook[]\), ",", "All", ",", StyleBox["ButtonCell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ",", RowBox[{ RowBox[{"Hold", "[", StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "]"}], "[", RowBox[{\(InputttNotebook[]\), ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{\(BoxData[\(Hold[ System`Private`dir`ListDirectories]\)[\ ]]\), ",", "\<\"Text\"\>", ",", RowBox[{"Active", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], ",", RowBox[{"ZeroWidthTimes", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], ",", "All"}], "]"}]}], "]"}]}], ",", \(ButtonEvaluator \[Rule] Automatic\)}], "]"}], "}"}], "&"}], ")"}], "/@", "dirs"}]}], "]"}], ",", "gridboxops"}], "]"}], "/.", "\:f360", \(\((ButtonFunction \[Rule] b_)\) \[Rule] \(ButtonFunction \ \[RuleDelayed] b\)\)}], "/.", "\:f360", \(Hold[CompoundExpression] \[RuleDelayed] CompoundExpression\)}], "/.", "\:f360", \(Hold[a_] \[RuleDelayed] a\)}], "/.", "\:f360", RowBox[{"InputttNotebook", "\[Rule]", StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}]}], ";", "dirs2"}]}], "]"}]}], ";", \(System`Private`dir`PastePalette[]\)}]}], "]"}]], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["cd", "Subsection", ShowStringCharacters->True], ButtonFunction:>CompoundExpression[ Module[ {}, CompoundExpression[ SetDelayed[ System`Private`dir`PastePalette[ BlankNullSequence[ ]], CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Cell], NotebookWrite[ InputNotebook[ ], Cell[ BoxData[ System`Private`dir`ListDirectories[ ]], "Text", Active -> True]], SelectionMove[ InputNotebook[ ], Previous, Cell]]], Set[ Options[ System`Private`dir`ListDirectories], { ExcludeDirectories -> {".*"}, PrologButtons :> { ButtonBox[ StringJoin[ "\[UpArrow] ", System`Private`dir`LastDirectory[ Directory[ ]]], ButtonFunction :> CompoundExpression[ SetDirectory[ ParentDirectory[ ]], System`Private`dir`PastePalette[ ]], ButtonEvaluator -> Automatic, Background -> RGBColor[ 0.40000000000000002, 0.59999999999999998, 0]]}}], SetDelayed[ System`Private`dir`LastDirectory[ Pattern[ s, Blank[ String]]], Catch[ CompoundExpression[ If[ SameQ[ $OperatingSystem, "MacOS"], If[ SameQ[ ParentDirectory[ ], s], Throw[ s]]], If[ Equal[ Directory[ ], ParentDirectory[ ]], s, Module[ { Set[ t, StringTake[ s, -1]], Set[ j, 1], n}, CompoundExpression[ While[ Less[ j, StringLength[ s]], CompoundExpression[ Increment[ j], Set[ n, StringTake[ s, { Times[ -1, j], Times[ -1, j]}]], If[ StringMatchQ[ n, $PathnameSeparator], Return[ t], Set[ t, StringJoin[ n, t]]]]], Null]]]]]], SetDelayed[ System`Private`dir`ListDirectories[ Pattern[ opts, BlankNullSequence[ Rule]]], Module[ {dirs, dirs2, exclude, gridboxops, macfix, InputttNotebook, prologbuttons}, CompoundExpression[ If[ UnsameQ[ $OperatingSystem, "MacOS"], Set[ dirs, Select[ FileNames[ "*", "*", 0], SameQ[ FileType[ #], Directory]&]], CompoundExpression[ Set[ dirs, Select[ FileNames[ "*", "*", 0], Or[ SameQ[ FileType[ #], Directory], And[ SameQ[ FileType[ #], None], Not[ StringMatchQ[ #, "*.*"]]]]&]], Set[ dirs, ReplaceAll[ dirs, Pattern[ s, Blank[ String]] :> StringDrop[ s, 1]]]]], Set[ exclude, ReplaceAll[ ReplaceAll[ ExcludeDirectories, {opts}], Options[ System`Private`dir`ListDirectories]]], Do[ Set[ dirs, Select[ dirs, Not[ StringMatchQ[ #, Part[ exclude, i]]]&]], {i, Length[ exclude]}], Set[ prologbuttons, ReplaceAll[ ReplaceAll[ PrologButtons, {opts}], Options[ System`Private`dir`ListDirectories]]], Set[ prologbuttons, ReplaceAll[ Map[ List, Flatten[ {prologbuttons}]], HoldPattern[ ParentDirectory[ ]] -> ParentDirectory[ ]]], Set[ gridboxops, Sequence[ RowSpacings -> 0, ColumnAlignments -> {Left}]], SetDelayed[ macfix[ Pattern[ s, Blank[ String]]], If[ SameQ[ $OperatingSystem, "Ma\.1acOS"], StringReplace[ s, "::" -> ":"], s]], Set[ dirs2, ReplaceAll[ ReplaceAll[ ReplaceAll[ ReplaceAll[ GridBox[ Join[ prologbuttons, Map[ { ButtonBox[ #, ButtonFunction -> Hold[ CompoundExpression][ Hold[ SetDirectory][ macfix[ StringJoin[ Directory[ ], $PathnameSeparator, \ #]]], Hold[ SelectionMove][ InputttNotebook[ ], All, ButtonCell], Hold[ NotebookWrite][ InputttNotebook[ ], Cell[ BoxData[ Hold[ System`Private`dir`ListDirectories][ \ ]], "Text", Active -> True, ZeroWidthTimes -> True], All]], ButtonEvaluator -> Automatic]}&, dirs]], gridboxops], ( ButtonFunction -> Pattern[ b, Blank[ ]]) -> (ButtonFunction :> b)], Hold[ CompoundExpression] :> CompoundExpression], Hold[ Pattern[ a, Blank[ ]]] :> a], InputttNotebook -> InputNotebook]], dirs2]]], System`Private`dir`PastePalette[ ]]]], ButtonEvaluator->Automatic, Background->RGBColor[0.4, 0.6, 1]]], NotebookDefault, CellTags->"GeneratedButtonBoxcd"] }, Closed]], Cell[CellGroupData[{ Cell["*.nb", "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({}\), ",", RowBox[{\(Options[ System`Private`dir`ListFilenames] = {ExcludeFilenames \[Rule] \ {}, RestrictFileNames \[Rule] "*.nb"}\), ";", RowBox[{\(System`Private`dir`PasteFilePalette[___]\), ":=", RowBox[{"(", RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "All", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{\(BoxData[System`Private`dir`ListFilenames[]]\), ",", "\<\"Text\"\>", ",", RowBox[{"Active", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], ",", RowBox[{"ZeroWidthTimes", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}], "]"}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Previous", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}]}], ")"}]}], ";", RowBox[{\(System`Private`dir`ListFilenames[opts___Rules]\), ":=", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({exclude, fils, fils2, gridboxops, macfix, restrict}\), ",", RowBox[{\(fils = Select[FileNames["*", "*", 0], FileType[#1] === File &]\), ";", \(If[$OperatingSystem === "MacOS", fils = fils /. \[InvisibleSpace]s_String \[RuleDelayed] If[StringMatchQ[s, ":*"], StringDrop[s, 1], s]]\), ";", \(exclude = \(ExcludeFilenames \ /. \[InvisibleSpace]{opts}\) /. \[InvisibleSpace]Options[ System`Private`dir`ListFilenames]\), ";", RowBox[{ StyleBox["Do", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", \(fils = Select[fils, \(\(\[InvisibleSpace]\)\(! \ \((StringMatchQ[#1, exclude\[LeftDoubleBracket]i\ \[RightDoubleBracket]])\)\)\) &], {i, Length[exclude]}\), "]"}], ";", \(restrict = \(RestrictFileNames \ /. \[InvisibleSpace]{opts}\) /. \[InvisibleSpace]Options[ System`Private`dir`ListFilenames]\), ";", RowBox[{"If", "[", RowBox[{\(StringQ[restrict]\), ",", RowBox[{"fils", "=", RowBox[{"Select", "[", RowBox[{"fils", ",", RowBox[{ RowBox[{"StringMatchQ", "[", RowBox[{"#1", ",", "restrict", ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], "&"}]}], "]"}]}]}], "]"}], ";", \(gridboxops = Sequence[RowSpacings \[Rule] 0, ColumnAlignments \[Rule] {Left}]\), ";", \(macfix[s_String] := If[$OperatingSystem === "MacOS", StringReplace[s, "::" \[Rule] ":"], s]\), ";", RowBox[{"If", "[", RowBox[{\(fils === {}\), ",", \(fils2 = "no files found"\), ",", RowBox[{ RowBox[{"fils2", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"GridBox", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{"ButtonBox", "[", RowBox[{"#1", ",", RowBox[{"ButtonFunction", "\[Rule]", RowBox[{ RowBox[{"Hold", "[", StyleBox["NotebookOpen", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "]"}], "[", \(macfix[ Directory[] <> $PathnameSeparator <> \ #1]\), "]"}]}], ",", \(ButtonEvaluator \[Rule] Automatic\)}], "]"}], "}"}], "&"}], ")"}], "/@", "fils"}], ",", "gridboxops"}], "]"}], "/.", "\[InvisibleSpace]", \(\((ButtonFunction \ \[Rule] b_)\) \[Rule] \(ButtonFunction \[RuleDelayed] b\)\)}], "/.", "\[InvisibleSpace]", \(Hold[ CompoundExpression] \[RuleDelayed] CompoundExpression\)}], "/.", "\[InvisibleSpace]", \(Hold[a_] \[RuleDelayed] a\)}], "/.", "\[InvisibleSpace]", RowBox[{ StyleBox["InputttNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "\[Rule]", StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}]}], ";", "fils2"}]}], "]"}]}]}], "]"}]}], ";", \(System`Private`dir`PasteFilePalette[]\)}]}], "]"}]], "Input"], Cell[BoxData[ ButtonBox[\(\(*\)\(\(.\)\(nb\)\)\), ButtonFunction:>Module[ {}, CompoundExpression[ Set[ Options[ System`Private`dir`ListFilenames], { ExcludeFilenames -> {}, RestrictFileNames -> "*.nb"}], SetDelayed[ System`Private`dir`PasteFilePalette[ BlankNullSequence[ ]], CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Cell], NotebookWrite[ InputNotebook[ ], Cell[ BoxData[ System`Private`dir`ListFilenames[ ]], "Text", Active -> True, ZeroWidthTimes -> True]], SelectionMove[ InputNotebook[ ], Previous, Cell]]], SetDelayed[ System`Private`dir`ListFilenames[ Pattern[ opts, BlankNullSequence[ Rules]]], Module[ {exclude, fils, fils2, gridboxops, macfix, restrict}, CompoundExpression[ Set[ fils, Select[ FileNames[ "*", "*", 0], SameQ[ FileType[ #], File]&]], If[ SameQ[ $OperatingSystem, "MacOS"], Set[ fils, ReplaceAll[ fils, Pattern[ s, Blank[ String]] :> If[ StringMatchQ[ s, ":*"], StringDrop[ s, 1], s]]]], Set[ exclude, ReplaceAll[ ReplaceAll[ ExcludeFilenames, {opts}], Options[ System`Private`dir`ListFilenames]]], Do[ Set[ fils, Select[ fils, Not[ StringMatchQ[ #, Part[ exclude, i]]]&]], {i, Length[ exclude]}], Set[ restrict, ReplaceAll[ ReplaceAll[ RestrictFileNames, {opts}], Options[ System`Private`dir`ListFilenames]]], If[ StringQ[ restrict], Set[ fils, Select[ fils, StringMatchQ[ #, restrict, IgnoreCase -> True]&]]], Set[ gridboxops, Sequence[ RowSpacings -> 0, ColumnAlignments -> {Left}]], SetDelayed[ macfix[ Pattern[ s, Blank[ String]]], If[ SameQ[ $OperatingSystem, "MacOS"], StringReplace[ s, "::" -> ":"], s]], If[ SameQ[ fils, {}], Set[ fils2, "no files found"], CompoundExpression[ Set[ fils2, ReplaceAll[ ReplaceAll[ ReplaceAll[ ReplaceAll[ GridBox[ Map[ { ButtonBox[ #, ButtonFunction -> Hold[ NotebookOpen][ macfix[ StringJoin[ Directory[ ], $PathnameSeparator, \ #]]], ButtonEvaluator -> Automatic]}&, fils], gridboxops], (ButtonFunction -> Pattern[ b, Blank[ ]]) -> (ButtonFunction :> b)], Hold[ CompoundExpression] :> CompoundExpression], Hold[ Pattern[ a, Blank[ ]]] :> a], InputttNotebook -> InputNotebook]], fils2]]]]], System`Private`dir`PasteFilePalette[ ]]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBox*.nb"] }, Closed]], Cell[CellGroupData[{ Cell["*.m", "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({}\), ",", RowBox[{ RowBox[{\(System`Private`dir`PasteFilePalette[___]\), ":=", RowBox[{"(", RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "All", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{\(BoxData[System`Private`dir`ListFilenames[]]\), ",", "\<\"Text\"\>", ",", RowBox[{"Active", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], ",", RowBox[{"ZeroWidthTimes", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}], "]"}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Previous", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}]}], ")"}]}], ";", \(Options[ System`Private`dir`ListFilenames] = {ExcludeFilenames \[Rule] \ {}, RestrictFileNames \[Rule] "*.m"}\), ";", RowBox[{\(System`Private`dir`ListFilenames[opts___Rules]\), ":=", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({exclude, fils, fils2, gridboxops, macfix, restrict}\), ",", RowBox[{\(fils = Select[FileNames["*", "*", 0], FileType[#1] === File &]\), ";", \(If[$OperatingSystem === "MacOS", fils = fils /. \[InvisibleSpace]s_String \[RuleDelayed] If[StringMatchQ[s, ":*"], StringDrop[s, 1], s]]\), ";", \(exclude = \(ExcludeFilenames \ /. \[InvisibleSpace]{opts}\) /. \[InvisibleSpace]Options[ System`Private`dir`ListFilenames]\), ";", RowBox[{ StyleBox["Do", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", \(fils = Select[fils, \(\(\[InvisibleSpace]\)\(! \ \((StringMatchQ[#1, exclude\[LeftDoubleBracket]i\ \[RightDoubleBracket]])\)\)\) &], {i, Length[exclude]}\), "]"}], ";", \(restrict = \(RestrictFileNames \ /. \[InvisibleSpace]{opts}\) /. \[InvisibleSpace]Options[ System`Private`dir`ListFilenames]\), ";", RowBox[{"If", "[", RowBox[{\(StringQ[restrict]\), ",", RowBox[{"fils", "=", RowBox[{"Select", "[", RowBox[{"fils", ",", RowBox[{ RowBox[{"StringMatchQ", "[", RowBox[{"#1", ",", "restrict", ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], "&"}]}], "]"}]}]}], "]"}], ";", \(gridboxops = Sequence[RowSpacings \[Rule] 0, ColumnAlignments \[Rule] {Left}]\), ";", \(macfix[s_String] := If[$OperatingSystem === "MacOS", StringReplace[s, "::" \[Rule] ":"], s]\), ";", RowBox[{"If", "[", RowBox[{\(fils === {}\), ",", \(fils2 = "no files found"\), ",", RowBox[{ RowBox[{"fils2", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"GridBox", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{"ButtonBox", "[", RowBox[{"#1", ",", RowBox[{"ButtonFunction", "\[Rule]", RowBox[{ RowBox[{"Hold", "[", StyleBox["NotebookOpen", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "]"}], "[", \(macfix[ Directory[] <> $PathnameSeparator <> \ #1]\), "]"}]}], ",", \(ButtonEvaluator \[Rule] Automatic\)}], "]"}], "}"}], "&"}], ")"}], "/@", "fils"}], ",", "gridboxops"}], "]"}], "/.", "\[InvisibleSpace]", \(\((ButtonFunction \ \[Rule] b_)\) \[Rule] \(ButtonFunction \[RuleDelayed] b\)\)}], "/.", "\[InvisibleSpace]", \(Hold[ CompoundExpression] \[RuleDelayed] CompoundExpression\)}], "/.", "\[InvisibleSpace]", \(Hold[a_] \[RuleDelayed] a\)}], "/.", "\[InvisibleSpace]", RowBox[{ StyleBox["InputttNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "\[Rule]", StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}]}], ";", "fils2"}]}], "]"}]}]}], "]"}]}], ";", \(System`Private`dir`PasteFilePalette[]\)}]}], "]"}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["<<*.m", "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({}\), ",", RowBox[{ RowBox[{\(System`Private`dir`PasteFilePalette[___]\), ":=", RowBox[{"(", RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "All", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{\(BoxData[System`Private`dir`ListFilenames[]]\), ",", "\<\"Text\"\>", ",", RowBox[{"Active", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], ",", RowBox[{"ZeroWidthTimes", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}], "]"}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Previous", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}]}], ")"}]}], ";", \(Options[ System`Private`dir`ListFilenames] = {ExcludeFilenames \[Rule] \ {}, RestrictFileNames \[Rule] "*.m"}\), ";", RowBox[{\(System`Private`dir`ListFilenames[opts___Rules]\), ":=", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({exclude, fils, fils2, gridboxops, macfix, restrict}\), ",", RowBox[{\(fils = Select[FileNames["*", "*", 0], FileType[#1] === File &]\), ";", \(If[$OperatingSystem === "MacOS", fils = fils /. \[InvisibleSpace]s_String \[RuleDelayed] If[StringMatchQ[s, ":*"], StringDrop[s, 1], s]]\), ";", \(exclude = \(ExcludeFilenames \ /. \[InvisibleSpace]{opts}\) /. \[InvisibleSpace]Options[ System`Private`dir`ListFilenames]\), ";", RowBox[{ StyleBox["Do", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", \(fils = Select[fils, \(\(\[InvisibleSpace]\)\(! \ \((StringMatchQ[#1, exclude\[LeftDoubleBracket]i\ \[RightDoubleBracket]])\)\)\) &], {i, Length[exclude]}\), "]"}], ";", \(restrict = \(RestrictFileNames \ /. \[InvisibleSpace]{opts}\) /. \[InvisibleSpace]Options[ System`Private`dir`ListFilenames]\), ";", RowBox[{"If", "[", RowBox[{\(StringQ[restrict]\), ",", RowBox[{"fils", "=", RowBox[{"Select", "[", RowBox[{"fils", ",", RowBox[{ RowBox[{"StringMatchQ", "[", RowBox[{"#1", ",", "restrict", ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], "&"}]}], "]"}]}]}], "]"}], ";", \(gridboxops = Sequence[RowSpacings \[Rule] 0, ColumnAlignments \[Rule] {Left}]\), ";", \(macfix[s_String] := If[$OperatingSystem === "MacOS", StringReplace[s, "::" \[Rule] ":"], s]\), ";", RowBox[{"If", "[", RowBox[{\(fils === {}\), ",", \(fils2 = "no files found"\), ",", RowBox[{ RowBox[{"fils2", "=", RowBox[{\(\(\(GridBox[\(({ButtonBox["<<" <> #1, ButtonFunction \[Rule] \(Hold[Get]\)[ macfix[ Directory[] <> $PathnameSeparator <> \ #1]], ButtonEvaluator \[Rule] Automatic]} &)\) /@ fils, gridboxops] \ /. \[InvisibleSpace]\((ButtonFunction \[Rule] b_)\) \[Rule] \(ButtonFunction \ \[RuleDelayed] b\)\) /. \[InvisibleSpace]Hold[ CompoundExpression] \[RuleDelayed] CompoundExpression\) \ /. \[InvisibleSpace]Hold[a_] \[RuleDelayed] a\), "/.", "\[InvisibleSpace]", RowBox[{ StyleBox["InputttNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "\[Rule]", StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}]}], ";", "fils2"}]}], "]"}]}]}], "]"}]}], ";", \(System`Private`dir`PasteFilePalette[]\)}]}], "]"}]], "Input"], Cell[BoxData[ ButtonBox[\(<< *.m\), ButtonFunction:>Module[ {}, CompoundExpression[ SetDelayed[ System`Private`dir`PasteFilePalette[ BlankNullSequence[ ]], CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Cell], NotebookWrite[ InputNotebook[ ], Cell[ BoxData[ System`Private`dir`ListFilenames[ ]], "Text", Active -> True, ZeroWidthTimes -> True]], SelectionMove[ InputNotebook[ ], Previous, Cell]]], Set[ Options[ System`Private`dir`ListFilenames], { ExcludeFilenames -> {}, RestrictFileNames -> "*.m"}], SetDelayed[ System`Private`dir`ListFilenames[ Pattern[ opts, BlankNullSequence[ Rules]]], Module[ {exclude, fils, fils2, gridboxops, macfix, restrict}, CompoundExpression[ Set[ fils, Select[ FileNames[ "*", "*", 0], SameQ[ FileType[ #], File]&]], If[ SameQ[ $OperatingSystem, "MacOS"], Set[ fils, ReplaceAll[ fils, Pattern[ s, Blank[ String]] :> If[ StringMatchQ[ s, ":*"], StringDrop[ s, 1], s]]]], Set[ exclude, ReplaceAll[ ReplaceAll[ ExcludeFilenames, {opts}], Options[ System`Private`dir`ListFilenames]]], Do[ Set[ fils, Select[ fils, Not[ StringMatchQ[ #, Part[ exclude, i]]]&]], {i, Length[ exclude]}], Set[ restrict, ReplaceAll[ ReplaceAll[ RestrictFileNames, {opts}], Options[ System`Private`dir`ListFilenames]]], If[ StringQ[ restrict], Set[ fils, Select[ fils, StringMatchQ[ #, restrict, IgnoreCase -> True]&]]], Set[ gridboxops, Sequence[ RowSpacings -> 0, ColumnAlignments -> {Left}]], SetDelayed[ macfix[ Pattern[ s, Blank[ String]]], If[ SameQ[ $OperatingSystem, "MacOS"], StringReplace[ s, "::" -> ":"], s]], If[ SameQ[ fils, {}], Set[ fils2, "no files found"], CompoundExpression[ Set[ fils2, ReplaceAll[ ReplaceAll[ ReplaceAll[ ReplaceAll[ GridBox[ Map[ { ButtonBox[ StringJoin[ "<<", #], ButtonFunction -> Hold[ Get][ macfix[ StringJoin[ Directory[ ], $PathnameSeparator, \ #]]], ButtonEvaluator -> Automatic]}&, fils], gridboxops], (ButtonFunction -> Pattern[ b, Blank[ ]]) -> (ButtonFunction :> b)], Hold[ CompoundExpression] :> CompoundExpression], Hold[ Pattern[ a, Blank[ ]]] :> a], InputttNotebook -> InputNotebook]], fils2]]]]], System`Private`dir`PasteFilePalette[ ]]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBox<<*.m"] }, Closed]], Cell[CellGroupData[{ Cell["*.m", "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({}\), ",", RowBox[{ RowBox[{\(System`Private`dir`PasteFilePalette[___]\), ":=", RowBox[{"(", RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "All", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{\(BoxData[System`Private`dir`ListFilenames[]]\), ",", "\<\"Text\"\>", ",", RowBox[{"Active", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], ",", RowBox[{"ZeroWidthTimes", "\[Rule]", StyleBox["False", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}], "]"}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Previous", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}]}], ")"}]}], ";", \(Options[ System`Private`dir`ListFilenames] = {ExcludeFilenames \[Rule] \ {}, RestrictFileNames \[Rule] "*.m"}\), ";", RowBox[{\(System`Private`dir`ListFilenames[opts___Rules]\), ":=", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({exclude, fils, fils2, gridboxops, macfix, restrict}\), ",", RowBox[{\(fils = Select[FileNames["*", "*", 0], FileType[#1] === File &]\), ";", \(If[$OperatingSystem === "MacOS", fils = fils /. \[InvisibleSpace]s_String \[RuleDelayed] If[StringMatchQ[s, ":*"], StringDrop[s, 1], s]]\), ";", \(exclude = \(ExcludeFilenames \ /. \[InvisibleSpace]{opts}\) /. \[InvisibleSpace]Options[ System`Private`dir`ListFilenames]\), ";", RowBox[{ StyleBox["Do", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", \(fils = Select[fils, \(\(\[InvisibleSpace]\)\(! \ \((StringMatchQ[#1, exclude\[LeftDoubleBracket]i\ \[RightDoubleBracket]])\)\)\) &], {i, Length[exclude]}\), "]"}], ";", \(restrict = \(RestrictFileNames \ /. \[InvisibleSpace]{opts}\) /. \[InvisibleSpace]Options[ System`Private`dir`ListFilenames]\), ";", RowBox[{"If", "[", RowBox[{\(StringQ[restrict]\), ",", RowBox[{"fils", "=", RowBox[{"Select", "[", RowBox[{"fils", ",", RowBox[{ RowBox[{"StringMatchQ", "[", RowBox[{"#1", ",", "restrict", ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], "&"}]}], "]"}]}]}], "]"}], ";", \(gridboxops = Sequence[RowSpacings \[Rule] 0, ColumnAlignments \[Rule] {Left}]\), ";", \(macfix[s_String] := If[$OperatingSystem === "MacOS", StringReplace[s, "::" \[Rule] ":"], s]\), ";", RowBox[{"If", "[", RowBox[{\(fils === {}\), ",", \(fils2 = "no files found"\), ",", RowBox[{ RowBox[{"fils2", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"GridBox", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{"ButtonBox", "[", RowBox[{"#1", ",", RowBox[{"ButtonFunction", "\[Rule]", RowBox[{ RowBox[{"Hold", "[", StyleBox["NotebookOpen", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "]"}], "[", \(macfix[ Directory[] <> $PathnameSeparator <> \ #1]\), "]"}]}], ",", \(ButtonEvaluator \[Rule] Automatic\)}], "]"}], "}"}], "&"}], ")"}], "/@", "fils"}], ",", "gridboxops"}], "]"}], "/.", "\[InvisibleSpace]", \(\((ButtonFunction \ \[Rule] b_)\) \[Rule] \(ButtonFunction \[RuleDelayed] b\)\)}], "/.", "\[InvisibleSpace]", \(Hold[ CompoundExpression] \[RuleDelayed] CompoundExpression\)}], "/.", "\[InvisibleSpace]", \(Hold[a_] \[RuleDelayed] a\)}], "/.", "\[InvisibleSpace]", RowBox[{ StyleBox["InputttNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "\[Rule]", StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}]}], ";", "fils2"}]}], "]"}]}]}], "]"}]}], ";", \(System`Private`dir`PasteFilePalette[]\)}]}], "]"}]], "Input"], Cell[BoxData[ ButtonBox[\(\(*\)\(\(.\)\(m\)\)\), ButtonFunction:>Module[ {}, CompoundExpression[ SetDelayed[ System`Private`dir`PasteFilePalette[ BlankNullSequence[ ]], CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Cell], NotebookWrite[ InputNotebook[ ], Cell[ BoxData[ System`Private`dir`ListFilenames[ ]], "Text", Active -> True, ZeroWidthTimes -> True]], SelectionMove[ InputNotebook[ ], Previous, Cell]]], Set[ Options[ System`Private`dir`ListFilenames], { ExcludeFilenames -> {}, RestrictFileNames -> "*.m"}], SetDelayed[ System`Private`dir`ListFilenames[ Pattern[ opts, BlankNullSequence[ Rules]]], Module[ {exclude, fils, fils2, gridboxops, macfix, restrict}, CompoundExpression[ Set[ fils, Select[ FileNames[ "*", "*", 0], SameQ[ FileType[ #], File]&]], If[ SameQ[ $OperatingSystem, "MacOS"], Set[ fils, ReplaceAll[ fils, Pattern[ s, Blank[ String]] :> If[ StringMatchQ[ s, ":*"], StringDrop[ s, 1], s]]]], Set[ exclude, ReplaceAll[ ReplaceAll[ ExcludeFilenames, {opts}], Options[ System`Private`dir`ListFilenames]]], Do[ Set[ fils, Select[ fils, Not[ StringMatchQ[ #, Part[ exclude, i]]]&]], {i, Length[ exclude]}], Set[ restrict, ReplaceAll[ ReplaceAll[ RestrictFileNames, {opts}], Options[ System`Private`dir`ListFilenames]]], If[ StringQ[ restrict], Set[ fils, Select[ fils, StringMatchQ[ #, restrict, IgnoreCase -> True]&]]], Set[ gridboxops, Sequence[ RowSpacings -> 0, ColumnAlignments -> {Left}]], SetDelayed[ macfix[ Pattern[ s, Blank[ String]]], If[ SameQ[ $OperatingSystem, "MacOS"], StringReplace[ s, "::" -> ":"], s]], If[ SameQ[ fils, {}], Set[ fils2, "no files found"], CompoundExpression[ Set[ fils2, ReplaceAll[ ReplaceAll[ ReplaceAll[ ReplaceAll[ GridBox[ Map[ { ButtonBox[ #, ButtonFunction -> Hold[ NotebookOpen][ macfix[ StringJoin[ Directory[ ], $PathnameSeparator, \ #]]], ButtonEvaluator -> Automatic]}&, fils], gridboxops], (ButtonFunction -> Pattern[ b, Blank[ ]]) -> (ButtonFunction :> b)], Hold[ CompoundExpression] :> CompoundExpression], Hold[ Pattern[ a, Blank[ ]]] :> a], InputttNotebook -> InputNotebook]], fils2]]]]], System`Private`dir`PasteFilePalette[ ]]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBox*.m"] }, Closed]], Cell[CellGroupData[{ Cell["*", "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({}\), ",", RowBox[{ RowBox[{\(System`Private`dir`PasteFilePalette[___]\), ":=", RowBox[{"(", RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "All", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{\(BoxData[System`Private`dir`ListFilenames[]]\), ",", "\<\"Text\"\>", ",", RowBox[{"Active", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], ",", RowBox[{"ZeroWidthTimes", "\[Rule]", StyleBox["False", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}]}], "]"}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Previous", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}]}], ")"}]}], ";", \(Options[ System`Private`dir`ListFilenames] = {ExcludeFilenames \[Rule] \ {}, RestrictFileNames \[Rule] "*"}\), ";", RowBox[{\(System`Private`dir`ListFilenames[opts___Rules]\), ":=", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({exclude, fils, fils2, gridboxops, macfix, restrict}\), ",", RowBox[{\(fils = Select[FileNames["*", "*", 0], FileType[#1] === File &]\), ";", \(If[$OperatingSystem === "MacOS", fils = fils /. \[InvisibleSpace]s_String \[RuleDelayed] If[StringMatchQ[s, ":*"], StringDrop[s, 1], s]]\), ";", \(exclude = \(ExcludeFilenames \ /. \[InvisibleSpace]{opts}\) /. \[InvisibleSpace]Options[ System`Private`dir`ListFilenames]\), ";", RowBox[{ StyleBox["Do", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", \(fils = Select[fils, \(\(\[InvisibleSpace]\)\(! \ \((StringMatchQ[#1, exclude\[LeftDoubleBracket]i\ \[RightDoubleBracket]])\)\)\) &], {i, Length[exclude]}\), "]"}], ";", \(restrict = \(RestrictFileNames \ /. \[InvisibleSpace]{opts}\) /. \[InvisibleSpace]Options[ System`Private`dir`ListFilenames]\), ";", RowBox[{"If", "[", RowBox[{\(StringQ[restrict]\), ",", RowBox[{"fils", "=", RowBox[{"Select", "[", RowBox[{"fils", ",", RowBox[{ RowBox[{"StringMatchQ", "[", RowBox[{"#1", ",", "restrict", ",", RowBox[{"IgnoreCase", "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}], "]"}], "&"}]}], "]"}]}]}], "]"}], ";", \(gridboxops = Sequence[RowSpacings \[Rule] 0, ColumnAlignments \[Rule] {Left}]\), ";", \(macfix[s_String] := If[$OperatingSystem === "MacOS", StringReplace[s, "::" \[Rule] ":"], s]\), ";", RowBox[{"If", "[", RowBox[{\(fils === {}\), ",", \(fils2 = "no files found"\), ",", RowBox[{ RowBox[{"fils2", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"GridBox", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{"ButtonBox", "[", RowBox[{"#1", ",", RowBox[{"ButtonFunction", "\[Rule]", RowBox[{ RowBox[{"Hold", "[", StyleBox["NotebookOpen", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "]"}], "[", \(macfix[ Directory[] <> $PathnameSeparator <> \ #1]\), "]"}]}], ",", \(ButtonEvaluator \[Rule] Automatic\)}], "]"}], "}"}], "&"}], ")"}], "/@", "fils"}], ",", "gridboxops"}], "]"}], "/.", "\[InvisibleSpace]", \(\((ButtonFunction \ \[Rule] b_)\) \[Rule] \(ButtonFunction \[RuleDelayed] b\)\)}], "/.", "\[InvisibleSpace]", \(Hold[ CompoundExpression] \[RuleDelayed] CompoundExpression\)}], "/.", "\[InvisibleSpace]", \(Hold[a_] \[RuleDelayed] a\)}], "/.", "\[InvisibleSpace]", RowBox[{ StyleBox["InputttNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "\[Rule]", StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}]}]}], ";", "fils2"}]}], "]"}]}]}], "]"}]}], ";", \(System`Private`dir`PasteFilePalette[]\)}]}], "]"}]], "Input"], Cell[BoxData[ ButtonBox["*", ButtonFunction:>Module[ {}, CompoundExpression[ SetDelayed[ System`Private`dir`PasteFilePalette[ BlankNullSequence[ ]], CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Cell], NotebookWrite[ InputNotebook[ ], Cell[ BoxData[ System`Private`dir`ListFilenames[ ]], "Text", Active -> True, ZeroWidthTimes -> True]], SelectionMove[ InputNotebook[ ], Previous, Cell]]], Set[ Options[ System`Private`dir`ListFilenames], { ExcludeFilenames -> {}, RestrictFileNames -> "*"}], SetDelayed[ System`Private`dir`ListFilenames[ Pattern[ opts, BlankNullSequence[ Rules]]], Module[ {exclude, fils, fils2, gridboxops, macfix, restrict}, CompoundExpression[ Set[ fils, Select[ FileNames[ "*", "*", 0], SameQ[ FileType[ #], File]&]], If[ SameQ[ $OperatingSystem, "MacOS"], Set[ fils, ReplaceAll[ fils, Pattern[ s, Blank[ String]] :> If[ StringMatchQ[ s, ":*"], StringDrop[ s, 1], s]]]], Set[ exclude, ReplaceAll[ ReplaceAll[ ExcludeFilenames, {opts}], Options[ System`Private`dir`ListFilenames]]], Do[ Set[ fils, Select[ fils, Not[ StringMatchQ[ #, Part[ exclude, i]]]&]], {i, Length[ exclude]}], Set[ restrict, ReplaceAll[ ReplaceAll[ RestrictFileNames, {opts}], Options[ System`Private`dir`ListFilenames]]], If[ StringQ[ restrict], Set[ fils, Select[ fils, StringMatchQ[ #, restrict, IgnoreCase -> True]&]]], Set[ gridboxops, Sequence[ RowSpacings -> 0, ColumnAlignments -> {Left}]], SetDelayed[ macfix[ Pattern[ s, Blank[ String]]], If[ SameQ[ $OperatingSystem, "MacOS"], StringReplace[ s, "::" -> ":"], s]], If[ SameQ[ fils, {}], Set[ fils2, "no files found"], CompoundExpression[ Set[ fils2, ReplaceAll[ ReplaceAll[ ReplaceAll[ ReplaceAll[ GridBox[ Map[ { ButtonBox[ #, ButtonFunction -> Hold[ NotebookOpen][ macfix[ StringJoin[ Directory[ ], $PathnameSeparator, \ #]]], ButtonEvaluator -> Automatic]}&, fils], gridboxops], (ButtonFunction -> Pattern[ b, Blank[ ]]) -> (ButtonFunction :> b)], Hold[ CompoundExpression] :> CompoundExpression], Hold[ Pattern[ a, Blank[ ]]] :> a], InputttNotebook -> InputNotebook]], fils2]]]]], System`Private`dir`PasteFilePalette[ ]]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBox*"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["GV", FontColor->RGBColor[0, 0.500008, 0]]], "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({}\), ",", RowBox[{ RowBox[{"If", "[", RowBox[{\(! MatchQ[ NotebookInformation[ System`Private`$GlobalValueDisplayNotebook], {__Rule}]\), ",", RowBox[{"System`Private`$GlobalValueDisplayNotebook", "=", RowBox[{ StyleBox["NotebookPut", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", \({}, WindowTitle \[Rule] "Values", WindowMargins \[Rule] {{0, Automatic}, {0, Automatic}}, WindowSize \[Rule] {250, 444}\), "]"}], "]"}]}], ",", RowBox[{ StyleBox["SetSelectedNotebook", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", "System`Private`$GlobalValueDisplayNotebook", "]"}]}], "]"}], ";", RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ "System`Private`$GlobalValueDisplayNotebook", ",", "All", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}], ";", RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{"System`Private`$GlobalValueDisplayNotebook", ",", RowBox[{"Prepend", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{\(BoxData["? " <> #1]\), ",", "\<\"Input\"\>", ",", RowBox[{ StyleBox["GeneratedCell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", "False"}]}], "]"}], "&"}], ")"}], "/@", \(Select[ Names["Global`*"], \(Function[{y}, {DefaultValues @@ y, NValues @@ y, SubValues @@ y, DownValues @@ y, OwnValues @@ y, UpValues @@ y, FormatValues @@ y}]\)[ ToExpression[#1, StandardForm, Hold]] =!= {{}, {}, {}, {}, {}, {}, {}} &]\)}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(TextData["variables with values:"], "Text"\), "]"}]}], "]"}], ",", "After"}], "]"}]}]}], "]"}]], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["GV", "Subsection", ShowStringCharacters->True, FontColor->RGBColor[0, 0.500008, 0]], ButtonFunction:>CompoundExpression[ Module[ {}, CompoundExpression[ If[ Not[ MatchQ[ NotebookInformation[ System`Private`$GlobalValueDisplayNotebook], { BlankSequence[ Rule]}]], Set[ System`Private`$GlobalValueDisplayNotebook, NotebookPut[ Notebook[ {}, WindowTitle -> "Values", WindowMargins -> {{ 0, Automatic}, {0, Automatic}}, WindowSize -> {250, 444}]]], SetSelectedNotebook[ System`Private`$GlobalValueDisplayNotebook]], SelectionMove[ System`Private`$GlobalValueDisplayNotebook, All, Notebook], NotebookWrite[ System`Private`$GlobalValueDisplayNotebook, Prepend[ Map[ Cell[ BoxData[ StringJoin[ "? ", #]], "Input", GeneratedCell -> False]&, Select[ Names[ "Global`*"], UnsameQ[ Function[ {y}, { Apply[ DefaultValues, y], Apply[ NValues, y], Apply[ SubValues, y], Apply[ DownValues, y], Apply[ OwnValues, y], Apply[ UpValues, y], Apply[ FormatValues, y]}][ ToExpression[ #, StandardForm, Hold]], {{}, {}, {}, {}, {}, {}, {}}]&]], Cell[ TextData[ "variables with values:"], "Text"]], After]]]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBoxGV"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["{", FontColor->RGBColor[1, 0, 0]]], "Subsection"], Cell[BoxData[ \(SelectionMove[InputNotebook[], All, Cell]\)], "Input"], Cell[BoxData[ \(SelectionMove[InputNotebook[], All, Cell]\)], "Input"], Cell["SelectionMove[InputNotebook[],All,Notebook]", "Text"], Cell["SelectionMove[InputNotebook[],All,Notebook]", "Text"], Cell[BoxData[ \(FrontEndExecute[{FrontEndToken[InputNotebook[], "SelectionOpenAllGroups"]}]\)], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["{", "Subsection", ShowStringCharacters->True, FontColor->RGBColor[1, 0, 0]], ButtonFunction:>CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Cell], SelectionMove[ InputNotebook[ ], All, Cell], FrontEndExecute[ { FrontEndToken[ InputNotebook[ ], "SelectionOpenAllGroups"]}]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBox{"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["E\[UpArrow]", Background->RGBColor[0.100008, 0.6, 0.6]]], "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "After", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ "\"\\"", ",", "\"\\"", ",", RowBox[{ StyleBox["CellOpen", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", "False"}], ",", RowBox[{ StyleBox["ShowCellBracket", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", "False"}], ",", RowBox[{ StyleBox["CellElementSpacings", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", \({"\" \[Rule] 0}\)}], ",", RowBox[{ StyleBox["CellMargins", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", \({{0, 0}, {0, 0}}\)}]}], "]"}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Before", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"Catch", "[", RowBox[{ StyleBox["Do", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Next", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({r}\), ",", RowBox[{"If", "[", RowBox[{ RowBox[{"MatchQ", "[", RowBox[{ RowBox[{"r", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \("\", "\", \ ___\), "]"}]}], "]"}], ",", RowBox[{ RowBox[{ StyleBox["NotebookDelete", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}], ";", \(Throw[0]\)}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"MatchQ", "[", RowBox[{"r", ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(_, "\", ___\), "]"}]}], "]"}], ",", RowBox[{ StyleBox["SelectionEvaluate", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], ",", \({10000}\)}], "]"}], "]"}]], "Input"], Cell[BoxData[ ButtonBox[ StyleBox[\(\(E\)\(\[UpArrow]\)\), "Subsection", ShowStringCharacters->True], ButtonFunction:>CompoundExpression[ SelectionMove[ InputNotebook[ ], After, Cell], NotebookWrite[ InputNotebook[ ], Cell[ "bishierherundnichtweiter", "Input", CellOpen -> False, ShowCellBracket -> False, CellElementSpacings -> { "CellMinHeight" -> 0}, CellMargins -> {{0, 0}, {0, 0}}]], SelectionMove[ InputNotebook[ ], Before, Notebook], Catch[ Do[ CompoundExpression[ SelectionMove[ InputNotebook[ ], Next, Cell], Module[ {r}, If[ MatchQ[ Set[ r, NotebookRead[ InputNotebook[ ]]], Cell[ "bishierherundnichtweiter", "Input", BlankNullSequence[ ]]], CompoundExpression[ NotebookDelete[ InputNotebook[ ]], Throw[ 0]], If[ MatchQ[ r, Cell[ Blank[ ], "Input", BlankNullSequence[ ]]], SelectionEvaluate[ InputNotebook[ ]]]]]], {10000}]]], ButtonEvaluator->Automatic, Background->RGBColor[0.100008, 0.6, 0.6]]], NotebookDefault, CellTags->"GeneratedButtonBoxE\[UpArrow]"] }, Open ]], Cell[CellGroupData[{ Cell["ENB", "Subsection"], Cell[BoxData[ RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Before", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "All", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ StyleBox["SelectionEvaluate", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "After", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}]], "Input"], Cell[BoxData[ ButtonBox["ENB", ButtonFunction:>CompoundExpression[ CompoundExpression[ SelectionMove[ InputNotebook[ ], Before, Notebook], Null], CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Notebook], Null], CompoundExpression[ SelectionEvaluate[ InputNotebook[ ]], Null], SelectionMove[ InputNotebook[ ], After, Notebook]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBoxENB"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["E\[DownArrow]", Background->RGBColor[0.100008, 0.6, 0.6]]], "Subsection"], Cell[BoxData[ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Before", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ "\"\\"", ",", "\"\\"", ",", RowBox[{ StyleBox["CellOpen", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", StyleBox["True", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], ",", RowBox[{ StyleBox["CellMargins", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", \({{0, 0}, {0, 0}}\)}], ",", RowBox[{ StyleBox["CellTags", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", "\"\\""}]}], "]"}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "After", ",", StyleBox["Notebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]]}], "]"}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ StyleBox["NotebookWrite", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", RowBox[{ "\"\\"", ",", "\"\\"", ",", RowBox[{ StyleBox["CellOpen", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", "True"}], ",", RowBox[{ StyleBox["ShowCellBracket", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", "True"}], ",", RowBox[{ StyleBox["CellMargins", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", \({{0, 0}, {0, 0}}\)}], ",", RowBox[{ StyleBox["CellTags", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "\[Rule]", "\"\\""}]}], "]"}]}], "]"}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "\"\\"", ",", "All", ",", "CellTags"}], "]"}], ";"}]], "Input"], Cell[BoxData[ RowBox[{"Catch", "[", RowBox[{ StyleBox["Do", FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{ RowBox[{ RowBox[{ StyleBox["SelectionMove", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "Next", ",", StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]]}], "]"}], ";", RowBox[{ StyleBox["Module", FontSize->18, FontWeight->"Bold", FontColor->RGBColor[0, 0.4, 0]], "[", RowBox[{\({r}\), ",", RowBox[{"If", "[", RowBox[{ RowBox[{"MatchQ", "[", RowBox[{ RowBox[{"r", "=", RowBox[{ StyleBox["NotebookRead", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \("\", "\", \ ___\), "]"}]}], "]"}], ",", \(Throw[0]\), ",", RowBox[{\(R = r\), ";", RowBox[{"If", "[", RowBox[{ RowBox[{"MatchQ", "[", RowBox[{"r", ",", RowBox[{ StyleBox["Cell", FontWeight->"Bold", FontColor->RGBColor[0.4, 0.6, 0]], "[", \(_, "\", ___\), "]"}]}], "]"}], ",", RowBox[{ StyleBox["SelectionEvaluate", FontWeight->"Bold", FontColor->RGBColor[1, 0.4, 0]], "[", RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], "]"}]}], "]"}]}]}], "]"}]}], "]"}]}], ",", \({100}\)}], "]"}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "\"\\"", ",", "All", ",", "CellTags", ",", \(AutoScroll \[Rule] False\)}], "]"}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "\"\\"", ",", "All", ",", "CellTags", ",", \(AutoScroll \[Rule] False\)}], "]"}], ";"}]], "Input"], Cell[BoxData[ \(NotebookDelete[InputNotebook[]]\)], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "\"\\"", ",", "All", ",", "CellTags"}], "]"}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{ StyleBox["InputNotebook", FontWeight->"Bold", FontColor->RGBColor[0.2, 0, 1]], "[", "]"}], ",", "\"\\"", ",", "All", ",", "CellTags"}], "]"}], ";"}]], "Input"], Cell[BoxData[ \(NotebookDelete[InputNotebook[]]\)], "Input"], Cell[BoxData[ ButtonBox[ StyleBox[\(\(E\)\(\[DownArrow]\)\), "Subsection", ShowStringCharacters->True], ButtonFunction:>CompoundExpression[ SelectionMove[ InputNotebook[ ], Before, Cell], NotebookWrite[ InputNotebook[ ], Cell[ "Start Evaluation here", "SmallText", CellOpen -> True, CellMargins -> {{0, 0}, {0, 0}}, CellTags -> "hiergehtslos"]], CompoundExpression[ SelectionMove[ InputNotebook[ ], After, Notebook], Null], CompoundExpression[ NotebookWrite[ InputNotebook[ ], Cell[ "Stop Evaluation here", "SmallText", CellOpen -> True, ShowCellBracket -> True, CellMargins -> {{0, 0}, {0, 0}}, CellTags -> "undhieristschluss"]], Null], CompoundExpression[ NotebookFind[ InputNotebook[ ], "hiergehtslos", All, CellTags], Null], Catch[ Do[ CompoundExpression[ SelectionMove[ InputNotebook[ ], Next, Cell], Module[ {r}, If[ MatchQ[ Set[ r, NotebookRead[ InputNotebook[ ]]], Cell[ "Stop Evaluation here", "SmallText", BlankNullSequence[ ]]], Throw[ 0], CompoundExpression[ Set[ R, r], If[ MatchQ[ r, Cell[ Blank[ ], "Input", BlankNullSequence[ ]]], SelectionEvaluate[ InputNotebook[ ]]]]]]], {100}]], CompoundExpression[ NotebookFind[ InputNotebook[ ], "hiergehtslos", All, CellTags, AutoScroll -> False], Null], CompoundExpression[ NotebookFind[ InputNotebook[ ], "hiergehtslos", All, CellTags, AutoScroll -> False], Null], NotebookDelete[ InputNotebook[ ]], CompoundExpression[ NotebookFind[ InputNotebook[ ], "undhieristschluss", All, CellTags], Null], CompoundExpression[ NotebookFind[ InputNotebook[ ], "undhieristschluss", All, CellTags], Null], NotebookDelete[ InputNotebook[ ]]], ButtonEvaluator->Automatic, Background->RGBColor[0.100008, 0.6, 0.6]]], NotebookDefault, CellTags->"GeneratedButtonBoxE\[DownArrow]"] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["}", FontColor->RGBColor[1, 0, 0]]], "Subsection"], Cell[BoxData[ \(SelectionMove[InputNotebook[], All, Cell]\)], "Input"], Cell["SelectionMove[InputNotebook[],All,Notebook]", "Text"], Cell["SelectionMove[InputNotebook[],All,Notebook]", "Text"], Cell[BoxData[ \(FrontEndExecute[{FrontEndToken[ InputNotebook[], "\"]}]\)], "Input"], Cell[BoxData[ ButtonBox[ StyleBox["}", "Subsection", ShowStringCharacters->True, FontColor->RGBColor[1, 0, 0]], ButtonFunction:>CompoundExpression[ SelectionMove[ InputNotebook[ ], All, Cell], FrontEndExecute[ { FrontEndToken[ InputNotebook[ ], "SelectionCloseAllGroups"]}]], ButtonEvaluator->Automatic]], NotebookDefault, CellTags->"GeneratedButtonBox}"] }, Closed]], Cell[CellGroupData[{ Cell["BRP", "Subsection"], Cell["\<\ This button is the only one not created by the F2B button. I will document \ its creation process later.\ \>", "Text"], Cell[BoxData[ StyleBox[ ButtonBox[ StyleBox["BRP", "Section", TaggingRules:>{"InitializationNotebook" -> Notebook[ { Cell[ BoxData[ StyleBox[ ButtonBox[ StyleBox[ "start", "Section", FontColor -> GrayLevel[ 1.0]], ButtonFunction :> CompoundExpression[ Null], ButtonEvaluator -> Automatic, Background -> RGBColor[ 0.20000000000000001, 0.40000000000000002, 0.0]], FontColor -> RGBColor[ 0.0, 0.0, 1.0]]], "NotebookDefault"], Cell[ TextData[ StyleBox[ "start", FontColor -> RGBColor[ 0.100008, 0.40000000000000002, 0.300008]]], "Section"], Cell[ BoxData[ RowBox[ { RowBox[ {"Remove", "@@", RowBox[ {"Flatten", "[", RowBox[ {"Names", "/@", RowBox[ {"{", RowBox[ {"\"Global`DD\"", ",", "\"Global`CC\"", ",", "\"Global`BRP\""}], "}"}]}], "]"}]}], ";"}]], "Input"], Cell[ BoxData[ RowBox[ { RowBox[ { RowBox[ {"System`DD", "::", "\"usage\""}], "=", "\"DD is a debug variable in the global context. Its \ only properties are Attributes HoldAllComplete and MakeBoxes rules.\""}], ";"}]], "Input", GeneratedCell -> True], Cell[ BoxData[ RowBox[ { RowBox[ { RowBox[ {"System`CC", "::", "\"usage\""}], "=", "\"CC[string] is a comment.\""}], ";"}]], "Input"], Cell[ BoxData[ RowBox[ { RowBox[ {"MakeBoxes", "[", RowBox[ { RowBox[ {"System`DD", "[", "any__", "]"}], ",", "StandardForm"}], "]"}], ":=", RowBox[ {"StyleBox", "[", RowBox[ { RowBox[ {"RowBox", "[", RowBox[ {"{", RowBox[ {"\"DD\"", ",", "\"[\"", ",", RowBox[ {"MakeBoxes", "[", RowBox[ {"any", ",", "StandardForm"}], "]"}], ",", "\"]\""}], "}"}], "]"}], ",", "\n", " ", RowBox[ {"FontSize", "->", "16"}], ",", "\n", " ", RowBox[ {"FontWeight", "->", "\"Bold\""}], ",", "\n", " ", RowBox[ {"FontColor", "->", RowBox[ {"RGBColor", "[", RowBox[ {"0", ",", "0", ",", "1"}], " ", "]"}]}]}], "]"}]}]], "Input"], Cell[ BoxData[ RowBox[ { RowBox[ {"MakeBoxes", "[", RowBox[ { RowBox[ {"System`CC", "[", "any_String", "]"}], ",", "StandardForm"}], "]"}], ":=", RowBox[ {"InterpretationBox", "@@", RowBox[ {"{", RowBox[ { RowBox[ {"StyleBox", "[", RowBox[ { RowBox[ {"RowBox", "[", RowBox[ {"{", RowBox[ {"\"(\"", ",", "\"*\"", ",", "any", ",", "\"*\"", ",", "\")\""}], "}"}], "]"}], ",", RowBox[ {"FontColor", "\[Rule]", RowBox[ {"RGBColor", "[", RowBox[ {"0", ",", "0.6", ",", "0"}], "]"}]}]}], "]"}], ",", RowBox[ {"System`CC", "[", "any", "]"}]}], "}"}]}]}]], "Input"], Cell[ BoxData[ RowBox[ { RowBox[ { RowBox[ {"System`BRP", "::", "\"usage\""}], "=", "\"BRP[anycomment] sets a break point.\""}], ";"}]], "Input"], Cell[ BoxData[ RowBox[ { RowBox[ {"Begin", "[", "\"System`Private`\"", "]"}], ";"}]], "Input"], Cell[ BoxData[ RowBox[ { RowBox[ { RowBox[ {"MakeBoxes", "[", RowBox[ { RowBox[ {"System`BRP", "[", "any__", "]"}], ",", "StandardForm"}], "]"}], ":=", RowBox[ {"StyleBox", "[", RowBox[ { RowBox[ {"RowBox", "[", RowBox[ {"{", RowBox[ {"\"BRP\"", ",", "\"[\"", ",", RowBox[ {"MakeBoxes", "[", RowBox[ {"any", ",", "StandardForm"}], "]"}], ",", "\"]\""}], "}"}], "]"}], ",", "\n", " ", RowBox[ {"FontSize", "->", "18"}], ",", "\n", " ", RowBox[ {"FontWeight", "->", "\"Bold\""}], ",", "\n", " ", RowBox[ {"FontColor", "->", RowBox[ {"RGBColor", "[", RowBox[ {"1", ",", " ", "0", ",", " ", "0"}], "]"}]}]}], "]"}]}], ";"}]], "Input"], Cell[ BoxData[ RowBox[ { RowBox[ {"SetAttributes", "[", RowBox[ {"BRP", ",", "ReadProtected"}], "]"}], ";"}]], "Input"], Cell[ "BRP[anything_] := Block[{FEInput, CancelButton, \ CancelButtonText, DialogNotebookOptions, OKButtonText, PrologText, \n \ PrologTextStyle, allowedops, myOptionQ}, MakeBoxes[Prompt[s_String], fmt_] := \ \n InterpretationBox[StyleBox[s, Rule[ShowStringCharacters, False]], \ Prompt, Rule[Editable, False]]\n ; Options[FEInput] = {CancelButton -> \ True, CancelButtonText -> \n StyleBox[\"Cancel\", Rule[FontWeight, \ \"Bold\"], Rule[FontSize, 18]]\n , PrologText -> None, PrologTextStyle \ -> \"Text\", WindowTitle -> \"Local FrontEnd Input\", \n TimeConstraint \ -> Infinity, DialogNotebookOptions -> {WindowSize -> {320, 285}, \n \ WindowElements -> {\"VerticalScrollBar\"}, ShowCellBracket -> False, \ Magnification -> 2., \n StyleDefinitions -> \"Default.nb\", Deletable \ -> False}, OKButtonText -> \n StyleBox[\"OK\", Rule[FontWeight, \ \"Bold\"], Rule[FontSize, 24]]\n }; SetAttributes[FEInput, HoldAll]; \ allowedops = First /@ Options[FEInput]; \n myOptionQ[z_ -> _] := \ MemberQ[allowedops, z]; myOptionQ[z_] := False; \n FEInput[Prompt[s_], \ any_ /; !myOptionQ[any], opts___] := FEInput[{Prompt[s], any}, opts]; \n \ FEInput[Prompt[s_], opts___] := FEInput[{Prompt[s]}, opts] /; {opts} === {} \ || \n Union[myOptionQ /@ {opts}] === {True}; FEInput[opts___] := \ FEInput[{Prompt}, opts] /; \n {opts} === {} || Union[myOptionQ /@ \ {opts}] === {True}; \n FEInput[msgs___List, mslast_ /; \ !myOptionQ[mslast], opts___] := \n Block[{inival, val, nbin, nbwatch, \ intime, comment, commentstyle, waittime, ono, windowtitle, readin, msg}, \n \ msg = {msgs, mslast}; waittime = TimeConstraint /. {opts} /. \ Options[FEInput]; \n windowtitle = WindowTitle /. {opts} /. \ Options[FEInput]; comment = PrologText /. {opts} /. Options[FEInput]; \n \ commentstyle = PrologTextStyle /. {opts} /. Options[FEInput]; ono = \ InputNotebook[]; \n nbwatch = NotebookPut[Notebook[{}, Visible -> \ False]]; \n nbin = NotebookPut[Notebook[(If[comment =!= None, \ Prepend[#1, Cell[comment, commentstyle, Selectable -> \n \ False]], #1] & )[Join[Table[Cell[BoxData[If[MatchQ[msg[[jj]], {_, _}], \n \ With[{prom = Extract[msg, {jj, 1}], inival = Extract[msg, {jj, \ 2}]}, MakeBoxes[prom*inival, \n StandardForm]], With[{prom = \ msg[[jj,1]]}, MakeBoxes[prom, StandardForm]]]], \"Input\", \n \ CellFrame -> True, Background -> GrayLevel[1], CellTags -> \"GetThisCell\", \ CellMargins -> {{2, 2}, \n {2, 2}}], {jj, Length[msg]}], \ {(Cell[BoxData[GridBox[{{RowBox[{ButtonBox[OKButtonText /. {opts} /. \n \ Options[FEInput], ButtonFunction :> NotebookWrite[#1, \" \ \"], ButtonMargins -> 10, \n ButtonFrame -> \"DialogBox\ \"], \" \", If[CancelButton /. {opts} /. Options[\n \ FEInput], ButtonBox[CancelButtonText /. {opts} /. \ Options[FEInput], ButtonFunction :> \n \ NotebookWrite[#1, \"$Failed\"], ButtonMargins -> 10, ButtonFrame -> \ \"DialogBox\"], \n \" \"]}]}}]], NotebookDefault, \ Active -> True, CellMargins -> {{2, 2}, {2, 2}}, \n \ TextAlignment -> \"Center\"] & )[nbwatch]}]], Sequence @@ \ (DialogNotebookOptions /. {opts} /. \n Options[FEInput]), \ WindowTitle -> windowtitle, Visible -> False]]; intime = AbsoluteTime[]; \n \ SetSelectedNotebook[nbin]; SetOptions[nbin, Sequence @@ \ (DialogNotebookOptions /. {opts} /. \n Options[FEInput])]; \ NotebookFind[nbin, \"GetThisCell\", All, CellTags]; \n \ SelectionMove[nbin, All, CellContents]; readin = NotebookRead[nbin]; \ If[FreeQ[readin, \" \[Placeholder]\"], \n SelectionMove[nbin, Before, \ CellContents]; Which[ !FreeQ[readin, \"maybenot True\"], \n \ NotebookFind[nbin, \"True\"], !FreeQ[readin, \"False\"], NotebookFind[nbin, \ \"maybenot False\"], True, \n SelectionMove[nbin, After, \ CellContents]], NotebookFind[nbin, \" \[Placeholder]\"]]; \n \ SetOptions[nbin, Visible -> True]; While[First[NotebookGet[nbwatch]] === {}, \ \n If[AbsoluteTime[] - intime > waittime, NotebookWrite[nbwatch, \ \"$Failed\"]]]; \n val = First[First[First[NotebookGet[nbwatch]]]]; \ If[Head[val] === BoxData, val = First[val]]; \n NotebookClose[nbwatch]; \ SetSelectedNotebook[ono]; If[val === \"$Failed\", If[Length[{msgs}] === 0, \n \ If[Head[mslast] === Prompt, val = Null, val = mslast], If[Union[Head \ /@ First[msg]] === {Prompt}, \n val = Table[Null, \ {Length[msg[[1]]]}], val = First[msg]]], \n val = ToExpression /@ \ First /@ Cases[NotebookGet[nbin], Cell[data_, opts1___, CellTags -> \ \"GetThisCell\", \n opts2___] -> data, {1, Infinity}]; \ If[Length[val] === 1, val = First[val]]]; NotebookClose[nbin]; \n \ If[Head[val] === Notebook, Null, val /. {Prompt :> 1, HoldForm[_] :> 1}]]; \n \ FEInput[{Prompt[\"\"], anything}, WindowTitle -> \"Break point \", \ DialogNotebookOptions -> \n {WindowSize -> {333.*GoldenRatio, 333}, \ WindowElements -> {\"VerticalScrollBar\"}, ShowCellBracket -> False, \n \ Magnification -> 2., StyleDefinitions -> \"Default.nb\", Deletable -> False, \ Background -> Hue[0.1]}]]", "Input"], Cell[ BoxData[ RowBox[ { RowBox[ {"End", "[", "]"}], ";"}]], "Input"], Cell[ BoxData[ RowBox[ { RowBox[ { RowBox[ { RowBox[ {"(", RowBox[ { RowBox[ { RowBox[ {"Hold", "[", "SetDelayed", "]"}], "[", RowBox[ { RowBox[ { RowBox[ {"Hold", "[", "MakeBoxes", "]"}], "[", RowBox[ {"#1", ",", "StandardForm"}], "]"}], ",", RowBox[ {"StyleBox", "[", RowBox[ {"#1", ",", RowBox[ {"FontWeight", "\[Rule]", "\"Bold\""}], ",", RowBox[ {"FontColor", "\[Rule]", RowBox[ {"RGBColor", "[", RowBox[ {"0.2", ",", "0", ",", "1"}], "]"}]}]}], "]"}]}], "]"}], "&"}], ")"}], "/@", RowBox[ {"ToExpression", "/@", RowBox[ {"Drop", "[", RowBox[ { RowBox[ {"Names", "[", "\"*Notebook*\"", "]"}], ",", RowBox[ {"-", "1"}]}], "]"}]}]}], "/.", RowBox[ {"{", RowBox[ { RowBox[ { RowBox[ {"Hold", "[", "SetDelayed", "]"}], "\[RuleDelayed]", "SetDelayed"}], ",", RowBox[ { RowBox[ {"Hold", "[", "MakeBoxes", "]"}], "\[RuleDelayed]", "MakeBoxes"}]}], "}"}]}], ";", RowBox[ { RowBox[ { RowBox[ {"(", RowBox[ { RowBox[ { RowBox[ {"Hold", "[", "SetDelayed", "]"}], "[", RowBox[ { RowBox[ { RowBox[ {"Hold", "[", "MakeBoxes", "]"}], "[", RowBox[ {"#1", ",", "StandardForm"}], "]"}], ",", RowBox[ {"StyleBox", "[", RowBox[ {"#1", ",", RowBox[ {"FontWeight", "\[Rule]", "\"Bold\""}], ",", RowBox[ {"FontColor", "\[Rule]", RowBox[ {"RGBColor", "[", RowBox[ {"1", ",", "0.4", ",", "0"}], "]"}]}]}], "]"}]}], "]"}], "&"}], ")"}], "/@", RowBox[ {"ToExpression", "/@", RowBox[ {"Complement", "[", RowBox[ { RowBox[ {"Names", "[", "\"*Select*\"", "]"}], ",", RowBox[ {"{", RowBox[ {"\"Select\"", ",", "\"Selectable\""}], "}"}]}], "]"}]}]}], "/.", RowBox[ {"{", RowBox[ { RowBox[ { RowBox[ {"Hold", "[", "SetDelayed", "]"}], "\[RuleDelayed]", "SetDelayed"}], ",", RowBox[ { RowBox[ {"Hold", "[", "MakeBoxes", "]"}], "\[RuleDelayed]", "MakeBoxes"}]}], "}"}]}], ";", RowBox[ { RowBox[ { RowBox[ {"(", RowBox[ { RowBox[ { RowBox[ {"Hold", "[", "SetDelayed", "]"}], "[", RowBox[ { RowBox[ { RowBox[ {"Hold", "[", "MakeBoxes", "]"}], "[", RowBox[ {"#1", ",", "StandardForm"}], "]"}], ",", RowBox[ {"StyleBox", "[", RowBox[ {"#1", ",", RowBox[ {"FontWeight", "\[Rule]", "\"Bold\""}], ",", RowBox[ {"FontColor", "\[Rule]", RowBox[ {"RGBColor", "[", RowBox[ {"0.4", ",", "0.6", ",", "0"}], "]"}]}]}], "]"}]}], "]"}], "&"}], ")"}], "/@", RowBox[ {"ToExpression", "/@", RowBox[ {"Names", "[", "\"*Cell*\"", "]"}]}]}], "/.", RowBox[ {"{", RowBox[ { RowBox[ { RowBox[ {"Hold", "[", "SetDelayed", "]"}], "\[RuleDelayed]", "SetDelayed"}], ",", RowBox[ { RowBox[ {"Hold", "[", "MakeBoxes", "]"}], "\[RuleDelayed]", "MakeBoxes"}]}], "}"}]}], ";", RowBox[ { RowBox[ {"MakeBoxes", "[", RowBox[ {"Do", ",", "StandardForm"}], "]"}], ":=", RowBox[ {"StyleBox", "[", RowBox[ {"\"Do\"", ",", RowBox[ {"FontWeight", "\[Rule]", "\"Bold\""}], ",", RowBox[ {"FontColor", "\[Rule]", RowBox[ {"RGBColor", "[", RowBox[ {"0", ",", "0.4", ",", "0"}], "]"}]}]}], "]"}]}], ";", RowBox[ { RowBox[ {"MakeBoxes", "[", RowBox[ {"Block", ",", "StandardForm"}], "]"}], ":=", RowBox[ {"StyleBox", "[", RowBox[ {"\"Block\"", ",", RowBox[ {"FontWeight", "\[Rule]", "\"Bold\""}], ",", RowBox[ {"FontSize", "\[Rule]", "18"}], ",", RowBox[ {"FontColor", "\[Rule]", RowBox[ {"RGBColor", "[", RowBox[ {"0", ",", "0.4", ",", "0"}], "]"}]}]}], "]"}]}], ";", RowBox[ { RowBox[ {"MakeBoxes", "[", RowBox[ {"Module", ",", "StandardForm"}], "]"}], ":=", RowBox[ {"StyleBox", "[", RowBox[ {"\"Module\"", ",", RowBox[ {"FontWeight", "\[Rule]", "\"Bold\""}], ",", RowBox[ {"FontSize", "\[Rule]", "18"}], ",", RowBox[ {"FontColor", "\[Rule]", RowBox[ {"RGBColor", "[", RowBox[ {"0", ",", "0.4", ",", "0"}], "]"}]}]}], "]"}]}], ";", RowBox[ { RowBox[ {"MakeBoxes", "[", RowBox[ {"FrontEndExecute", ",", "StandardForm"}], "]"}], ":=", RowBox[ {"StyleBox", "[", RowBox[ {"\"FrontEndExecute\"", ",", RowBox[ {"FontSize", "\[Rule]", "18"}], ",", RowBox[ {"FontSlant", "\[Rule]", "\"Italic\""}], ",", RowBox[ {"FontColor", "\[Rule]", RowBox[ {"RGBColor", "[", RowBox[ {"0.6", ",", "0.8", ",", "0.100008"}], "]"}]}]}], "]"}]}], ";", RowBox[ { RowBox[ {"MakeBoxes", "[", RowBox[ {"BrowserCategory", ",", "StandardForm"}], "]"}], ":=", RowBox[ {"StyleBox", "[", RowBox[ {"\"BrowserCategory\"", ",", RowBox[ {"FontSize", "\[Rule]", "18"}], ",", RowBox[ {"FontSlant", "\[Rule]", "\"Italic\""}], ",", RowBox[ {"FontColor", "\[Rule]", RowBox[ {"RGBColor", "[", RowBox[ {"0.6", ",", "0.8", ",", "0.100008"}], "]"}]}]}], "]"}]}], ";", RowBox[ { RowBox[ {"MakeBoxes", "[", RowBox[ {"TaggingRules", ",", "StandardForm"}], "]"}], ":=", RowBox[ {"StyleBox", "[", RowBox[ {"\"TaggingRules\"", ",", RowBox[ {"FontSize", "\[Rule]", "18"}], ",", RowBox[ {"FontSlant", "\[Rule]", "\"Italic\""}], ",", RowBox[ {"FontColor", "\[Rule]", RowBox[ {"RGBColor", "[", RowBox[ {"0.6", ",", "0.8", ",", "0.100008"}], "]"}]}]}], "]"}]}], ";"}]], "Input", GeneratedCell -> True], Cell[ BoxData[ RowBox[ { RowBox[ {"$Line", "=", "0"}], ";"}]], "Input"]}, FrontEndVersion -> "3.5 for Microsoft Windows", ScreenRectangle -> {{0.0, 1152.0}, {0.0, 808.0}}, CellGrouping -> Manual, WindowSize -> {898.0, 747.0}, WindowMargins -> {{87.0, Automatic}, {-203.0, Automatic}}, Magnification -> 1.0]}, FontColor->GrayLevel[1]], ButtonFunction:>CompoundExpression[ CompoundExpression[ Set[ K[ "t0"], AbsoluteTime[ ]], SelectionMove[ ButtonNotebook[ ], All, ButtonCell], Set[ K[ "filename"], ReplaceAll[ "FileName", NotebookInformation[ ButtonNotebook[ ]]]], If[ UnsameQ[ System`Private`start`AlreadyInitialized[ K[ "filename"]], True], CompoundExpression[ Set[ save$Line, $Line], Set[ save$HistoryLength, $HistoryLength], Set[ $HistoryLength, 0], Set[ K[ "buno"], NotebookRead[ ButtonNotebook[ ]]], SetDelayed[ System`Private`start`EvaluateNotebookAndCloseIt[ Notebook[ { Pattern[ x, BlankSequence[ Cell]]}, Pattern[ y, BlankNullSequence[ ]]]], Block[ { Set[ temporaryNotebook, NotebookCreate[ Visible -> If[ SameQ[ $NotebookVisible, True], True, False]]]}, CompoundExpression[ NotebookWrite[ temporaryNotebook, ReplaceAll[ {x, ReplaceAll[ If[ SameQ[ $NotebookVisible, True], Hold[ Sequence][ ], Cell[ BoxData[ RowBox[ { RowBox[ {"NotebookClose", "[", RowBox[ {"EvaluationNotebook", "[", "]"}], "]"}], ";"}]], "Input"]], Hold[ Sequence] -> Sequence]}, {(InitializationCell -> True) :> (InitializationCell -> False)}]], FrontEndExecute[ { FrontEnd`FrontEndToken[ temporaryNotebook, "EvaluateNotebook"]}]]]], Times[ CompoundExpression[ Set[ K[ "bu"], ReplaceAll[ Cases[ K[ "buno"], HoldPattern[ TaggingRules :> {"InitializationNotebook" -> Blank[ Notebook]}], -1], { Pattern[ a, Blank[ ]], BlankNullSequence[ ]} :> a]], Null], Set[ K[ "tag"], ReplaceAll[ TaggingRules, K[ "bu"]]]], System`Private`start`EvaluateNotebookAndCloseIt[ ReplaceAll[ "InitializationNotebook", K[ "tag"]]], Set[ System`Private`start`AlreadyInitialized[ K[ "filename"]], True], Set[ $Line, save$Line], Clear[ save$Line], Set[ $HistoryLength, save$HistoryLength], Clear[ save$HistoryLength], Null]], Set[ K[ "t"], IntegerPart[ Plus[ AbsoluteTime[ ], Times[ -1, K[ "t0"]]]]]], Null, CompoundExpression[ Null]], ButtonEvaluator->Automatic, Background->RGBColor[0.2, 0.4, 0]], FontColor->RGBColor[0, 0, 1]]], NotebookDefault] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1600}, {0, 1127}}, WindowToolbars->"EditBar", WindowSize->{984, 942}, WindowMargins->{{246, Automatic}, {Automatic, 61}}, CellLabelAutoDelete->True, ShowCellTags->True, Magnification->1, StyleDefinitions -> "Default.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->{ "GeneratedButtonBoxHelp"->{ Cell[29999, 1028, 45257, 858, 45, NotebookDefault, CellTags->"GeneratedButtonBoxHelp"]}, "GeneratedButtonBoxURL"->{ Cell[80867, 2010, 1890, 47, 46, NotebookDefault, CellTags->"GeneratedButtonBoxURL"]}, "GeneratedButtonBoxRGL"->{ Cell[84172, 2101, 772, 22, 46, NotebookDefault, CellTags->"GeneratedButtonBoxRGL"]}, "GeneratedButtonBoxPG"->{ Cell[96037, 2376, 7112, 179, 70, NotebookDefault, CellTags->"GeneratedButtonBoxPG"]}, "GeneratedButtonBoxJURL"->{ Cell[126781, 2983, 11794, 221, 70, NotebookDefault, CellTags->"GeneratedButtonBoxJURL"]}, "GeneratedButtonBoxSD"->{ Cell[139211, 3225, 487, 13, 70, NotebookDefault, CellTags->"GeneratedButtonBoxSD"]}, "GeneratedButtonBoxF2B"->{ Cell[167501, 3751, 14729, 301, 70, NotebookDefault, CellTags->"GeneratedButtonBoxF2B"]}, "GeneratedButtonBoxCN"->{ Cell[182564, 4069, 543, 15, 70, NotebookDefault, CellTags->"GeneratedButtonBoxCN"]}, "GeneratedButtonBoxHP"->{ Cell[186094, 4161, 1288, 32, 44, NotebookDefault, CellTags->"GeneratedButtonBoxHP"]}, "GeneratedButtonBoxVP"->{ Cell[190204, 4268, 1211, 31, 46, NotebookDefault, CellTags->"GeneratedButtonBoxVP"]}, "GeneratedButtonBoxCP"->{ Cell[191556, 4309, 250, 7, 70, NotebookDefault, CellTags->"GeneratedButtonBoxCP"]}, "GeneratedButtonBox150%"->{ Cell[191992, 4327, 254, 6, 70, NotebookDefault, CellTags->"GeneratedButtonBox150%"]}, "GeneratedButtonBoxCl"->{ Cell[192435, 4344, 343, 10, 70, NotebookDefault, CellTags->"GeneratedButtonBoxCl"]}, "GeneratedButtonBoxQu"->{ Cell[193008, 4368, 386, 12, 70, NotebookDefault, CellTags->"GeneratedButtonBoxQu"]}, "GeneratedButtonBoxZWT"->{ Cell[193762, 4396, 499, 13, 70, NotebookDefault, CellTags->"GeneratedButtonBoxZWT"]}, "GeneratedButtonBoxcd"->{ Cell[205182, 4628, 7569, 164, 70, NotebookDefault, CellTags->"GeneratedButtonBoxcd"]}, "GeneratedButtonBox\[RawStar].nb"->{ Cell[220811, 4960, 4323, 96, 70, NotebookDefault, CellTags->"GeneratedButtonBox\[RawStar].nb"]}, "GeneratedButtonBox<<\[RawStar].m"->{ Cell[240171, 5371, 4321, 96, 70, NotebookDefault, CellTags->"GeneratedButtonBox<<\[RawStar].m"]}, "GeneratedButtonBox\[RawStar].m"->{ Cell[252532, 5634, 4320, 96, 70, NotebookDefault, CellTags->"GeneratedButtonBox\[RawStar].m"]}, "GeneratedButtonBox\[RawStar]"->{ Cell[264888, 5897, 4296, 96, 70, NotebookDefault, CellTags->"GeneratedButtonBox\[RawStar]"]}, "GeneratedButtonBoxGV"->{ Cell[272765, 6079, 2074, 47, 70, NotebookDefault, CellTags->"GeneratedButtonBoxGV"]}, "GeneratedButtonBox{"->{ Cell[275354, 6148, 533, 15, 70, NotebookDefault, CellTags->"GeneratedButtonBox{"]}, "GeneratedButtonBoxE\[UpArrow]"->{ Cell[281617, 6314, 1659, 42, 44, NotebookDefault, CellTags->"GeneratedButtonBoxE\[UpArrow]"]}, "GeneratedButtonBoxENB"->{ Cell[285075, 6420, 579, 15, 45, NotebookDefault, CellTags->"GeneratedButtonBoxENB"]}, "GeneratedButtonBoxE\[DownArrow]"->{ Cell[294250, 6676, 2774, 69, 44, NotebookDefault, CellTags->"GeneratedButtonBoxE\[DownArrow]"]}, "GeneratedButtonBox}"->{ Cell[297467, 6764, 465, 13, 46, NotebookDefault, CellTags->"GeneratedButtonBox}"]} } *) (*CellTagsIndex CellTagsIndex->{ {"GeneratedButtonBoxHelp", 325641, 7323}, {"GeneratedButtonBoxURL", 325769, 7326}, {"GeneratedButtonBoxRGL", 325894, 7329}, {"GeneratedButtonBoxPG", 326017, 7332}, {"GeneratedButtonBoxJURL", 326143, 7335}, {"GeneratedButtonBoxSD", 326271, 7338}, {"GeneratedButtonBoxF2B", 326395, 7341}, {"GeneratedButtonBoxCN", 326522, 7344}, {"GeneratedButtonBoxHP", 326645, 7347}, {"GeneratedButtonBoxVP", 326769, 7350}, {"GeneratedButtonBoxCP", 326893, 7353}, {"GeneratedButtonBox150%", 327017, 7356}, {"GeneratedButtonBoxCl", 327141, 7359}, {"GeneratedButtonBoxQu", 327264, 7362}, {"GeneratedButtonBoxZWT", 327388, 7365}, {"GeneratedButtonBoxcd", 327512, 7368}, {"GeneratedButtonBox\[RawStar].nb", 327648, 7371}, {"GeneratedButtonBox<<\[RawStar].m", 327795, 7374}, {"GeneratedButtonBox\[RawStar].m", 327941, 7377}, {"GeneratedButtonBox\[RawStar]", 328083, 7380}, {"GeneratedButtonBoxGV", 328215, 7383}, {"GeneratedButtonBox{", 328338, 7386}, {"GeneratedButtonBoxE\[UpArrow]", 328469, 7389}, {"GeneratedButtonBoxENB", 328603, 7392}, {"GeneratedButtonBoxE\[DownArrow]", 328738, 7395}, {"GeneratedButtonBox}", 328872, 7398} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1739, 51, 44, 0, 115, "Title"], Cell[1786, 53, 36, 0, 53, "Subsubtitle"], Cell[CellGroupData[{ Cell[1847, 57, 197, 6, 64, "Subtitle"], Cell[2047, 65, 325, 6, 52, "Text"], Cell[CellGroupData[{ Cell[2397, 75, 69, 0, 59, "Section"], Cell[2469, 77, 182, 5, 33, "Text"], Cell[CellGroupData[{ Cell[2676, 86, 117, 2, 70, "Subsection"], Cell[2796, 90, 27200, 936, 15996, "Input"], Cell[29999, 1028, 45257, 858, 45, NotebookDefault, CellTags->"GeneratedButtonBoxHelp"] }, Open ]], Cell[CellGroupData[{ Cell[75293, 1891, 77, 1, 47, "Subsection"], Cell[75373, 1894, 5491, 114, 145, "Input"], Cell[80867, 2010, 1890, 47, 46, NotebookDefault, CellTags->"GeneratedButtonBoxURL"] }, Closed]], Cell[CellGroupData[{ Cell[82794, 2062, 116, 2, 31, "Subsection"], Cell[82913, 2066, 1256, 33, 46, "Input"], Cell[84172, 2101, 772, 22, 46, NotebookDefault, CellTags->"GeneratedButtonBoxRGL"] }, Closed]], Cell[CellGroupData[{ Cell[84981, 2128, 47, 1, 31, "Subsection"], Cell[85031, 2131, 62, 1, 32, "Text"], Cell[85096, 2134, 10938, 240, 382, "Input"], Cell[96037, 2376, 7112, 179, 70, NotebookDefault, CellTags->"GeneratedButtonBoxPG"] }, Closed]], Cell[CellGroupData[{ Cell[103186, 2560, 180, 5, 30, "Subsection"], Cell[103369, 2567, 23409, 414, 70, "Input"], Cell[126781, 2983, 11794, 221, 70, NotebookDefault, CellTags->"GeneratedButtonBoxJURL"] }, Closed]], Cell[CellGroupData[{ Cell[138612, 3209, 24, 0, 31, "Subsection"], Cell[138639, 3211, 569, 12, 70, "Input"], Cell[139211, 3225, 487, 13, 70, NotebookDefault, CellTags->"GeneratedButtonBoxSD"] }, Closed]], Cell[CellGroupData[{ Cell[139735, 3243, 121, 2, 31, "Subsection"], Cell[139859, 3247, 27435, 495, 70, "Input"], Cell[167297, 3744, 201, 5, 70, "Input"], Cell[167501, 3751, 14729, 301, 70, NotebookDefault, CellTags->"GeneratedButtonBoxF2B"] }, Closed]], Cell[CellGroupData[{ Cell[182267, 4057, 81, 1, 31, "Subsection"], Cell[182351, 4060, 160, 4, 70, "Input"], Cell[182514, 4066, 47, 1, 70, "Input"], Cell[182564, 4069, 543, 15, 70, NotebookDefault, CellTags->"GeneratedButtonBoxCN"] }, Closed]], Cell[CellGroupData[{ Cell[183144, 4089, 80, 1, 31, "Subsection"], Cell[183227, 4092, 110, 2, 30, "Input"], Cell[183340, 4096, 2467, 53, 150, "Input"], Cell[185810, 4151, 281, 8, 30, "Input"], Cell[186094, 4161, 1288, 32, 44, NotebookDefault, CellTags->"GeneratedButtonBoxHP"] }, Closed]], Cell[CellGroupData[{ Cell[187419, 4198, 80, 1, 31, "Subsection"], Cell[187502, 4201, 115, 2, 27, "Input"], Cell[187620, 4205, 2297, 51, 91, "Input"], Cell[189920, 4258, 281, 8, 29, "Input"], Cell[190204, 4268, 1211, 31, 46, NotebookDefault, CellTags->"GeneratedButtonBoxVP"] }, Closed]], Cell[CellGroupData[{ Cell[191452, 4304, 24, 0, 31, "Subsection"], Cell[191479, 4306, 74, 1, 70, "Input"], Cell[191556, 4309, 250, 7, 70, NotebookDefault, CellTags->"GeneratedButtonBoxCP"] }, Closed]], Cell[CellGroupData[{ Cell[191843, 4321, 26, 0, 31, "Subsection"], Cell[191872, 4323, 117, 2, 70, "Input"], Cell[191992, 4327, 254, 6, 70, NotebookDefault, CellTags->"GeneratedButtonBox150%"] }, Closed]], Cell[CellGroupData[{ Cell[192283, 4338, 83, 1, 31, "Subsection"], Cell[192369, 4341, 63, 1, 70, "Input"], Cell[192435, 4344, 343, 10, 70, NotebookDefault, CellTags->"GeneratedButtonBoxCl"] }, Closed]], Cell[CellGroupData[{ Cell[192815, 4359, 148, 4, 30, "Subsection"], Cell[192966, 4365, 39, 1, 70, "Input"], Cell[193008, 4368, 386, 12, 70, NotebookDefault, CellTags->"GeneratedButtonBoxQu"] }, Closed]], Cell[CellGroupData[{ Cell[193431, 4385, 25, 0, 31, "Subsection"], Cell[193459, 4387, 74, 1, 70, "Input"], Cell[193536, 4390, 223, 4, 70, "Input"], Cell[193762, 4396, 499, 13, 70, NotebookDefault, CellTags->"GeneratedButtonBoxZWT"] }, Closed]], Cell[CellGroupData[{ Cell[194298, 4414, 81, 1, 31, "Subsection"], Cell[194382, 4417, 10797, 209, 70, "Input"], Cell[205182, 4628, 7569, 164, 70, NotebookDefault, CellTags->"GeneratedButtonBoxcd"] }, Closed]], Cell[CellGroupData[{ Cell[212788, 4797, 26, 0, 31, "Subsection"], Cell[212817, 4799, 7991, 159, 70, "Input"], Cell[220811, 4960, 4323, 96, 70, NotebookDefault, CellTags->"GeneratedButtonBox\[RawStar].nb"] }, Closed]], Cell[CellGroupData[{ Cell[225171, 5061, 25, 0, 31, "Subsection"], Cell[225199, 5063, 7971, 158, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[233207, 5226, 27, 0, 31, "Subsection"], Cell[233237, 5228, 6931, 141, 70, "Input"], Cell[240171, 5371, 4321, 96, 70, NotebookDefault, CellTags->"GeneratedButtonBox<<\[RawStar].m"] }, Closed]], Cell[CellGroupData[{ Cell[244529, 5472, 25, 0, 31, "Subsection"], Cell[244557, 5474, 7972, 158, 70, "Input"], Cell[252532, 5634, 4320, 96, 70, NotebookDefault, CellTags->"GeneratedButtonBox\[RawStar].m"] }, Closed]], Cell[CellGroupData[{ Cell[256889, 5735, 23, 0, 31, "Subsection"], Cell[256915, 5737, 7970, 158, 70, "Input"], Cell[264888, 5897, 4296, 96, 70, NotebookDefault, CellTags->"GeneratedButtonBox\[RawStar]"] }, Closed]], Cell[CellGroupData[{ Cell[269221, 5998, 83, 1, 31, "Subsection"], Cell[269307, 6001, 3455, 76, 70, "Input"], Cell[272765, 6079, 2074, 47, 70, NotebookDefault, CellTags->"GeneratedButtonBoxGV"] }, Closed]], Cell[CellGroupData[{ Cell[274876, 6131, 75, 1, 31, "Subsection"], Cell[274954, 6134, 74, 1, 70, "Input"], Cell[275031, 6137, 74, 1, 70, "Input"], Cell[275108, 6140, 59, 0, 70, "Text"], Cell[275170, 6142, 59, 0, 70, "Text"], Cell[275232, 6144, 119, 2, 70, "Input"], Cell[275354, 6148, 533, 15, 70, NotebookDefault, CellTags->"GeneratedButtonBox{"] }, Closed]], Cell[CellGroupData[{ Cell[275924, 6168, 97, 1, 31, "Subsection"], Cell[276024, 6171, 429, 12, 30, "Input"], Cell[276456, 6185, 1342, 35, 50, "Input"], Cell[277801, 6222, 432, 12, 30, "Input"], Cell[278236, 6236, 3378, 76, 92, "Input"], Cell[281617, 6314, 1659, 42, 44, NotebookDefault, CellTags->"GeneratedButtonBoxE\[UpArrow]"] }, Open ]], Cell[CellGroupData[{ Cell[283313, 6361, 25, 0, 47, "Subsection"], Cell[283341, 6363, 487, 14, 27, "Input"], Cell[283831, 6379, 473, 13, 27, "Input"], Cell[284307, 6394, 331, 10, 27, "Input"], Cell[284641, 6406, 431, 12, 27, "Input"], Cell[285075, 6420, 579, 15, 45, NotebookDefault, CellTags->"GeneratedButtonBoxENB"] }, Closed]], Cell[CellGroupData[{ Cell[285691, 6440, 99, 1, 31, "Subsection"], Cell[285793, 6443, 430, 12, 30, "Input"], Cell[286226, 6457, 1223, 32, 50, "Input"], Cell[287452, 6491, 486, 14, 30, "Input"], Cell[287941, 6507, 1418, 37, 50, "Input"], Cell[289362, 6546, 331, 9, 30, "Input"], Cell[289696, 6557, 2993, 67, 72, "Input"], Cell[292692, 6626, 370, 9, 30, "Input"], Cell[293065, 6637, 370, 9, 30, "Input"], Cell[293438, 6648, 64, 1, 30, "Input"], Cell[293505, 6651, 336, 9, 30, "Input"], Cell[293844, 6662, 336, 9, 30, "Input"], Cell[294183, 6673, 64, 1, 30, "Input"], Cell[294250, 6676, 2774, 69, 44, NotebookDefault, CellTags->"GeneratedButtonBoxE\[DownArrow]"] }, Open ]], Cell[CellGroupData[{ Cell[297061, 6750, 75, 1, 47, "Subsection"], Cell[297139, 6753, 74, 1, 27, "Input"], Cell[297216, 6756, 59, 0, 32, "Text"], Cell[297278, 6758, 59, 0, 32, "Text"], Cell[297340, 6760, 124, 2, 27, "Input"], Cell[297467, 6764, 465, 13, 46, NotebookDefault, CellTags->"GeneratedButtonBox}"] }, Closed]], Cell[CellGroupData[{ Cell[297969, 6782, 25, 0, 31, "Subsection"], Cell[297997, 6784, 128, 3, 33, "Text"], Cell[298128, 6789, 26715, 507, 32, NotebookDefault] }, Open ]] }, Open ]] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)