MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Mathematica Book and Documentation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85516] Mathematica Book and Documentation
  • From: "David Park" <djmpark at comcast.net>
  • Date: Wed, 13 Feb 2008 04:14:16 -0500 (EST)

There were some postings in the 'How should I get started with Mathematica' 
thread about the lack of a printed book.

In August 2007 there were postings on the question of the old book 
organization and Thomas Muench posted some code that would create a Virtual 
Mathematica Book from the documentation material. I have pasted his code at 
the end of this posting. Paste it into a blank notebook and evaluate. It 
will create a Virtual Book notebook.  One nice thing about this virtual book 
is that it has a listing of all the supplied 'standard' packages, which I 
find otherwise difficult to find.

I do not think an actual printed book is that useful with the new 
Mathematica 6 because it is impossible to reproduce dynamic behavior on a 
static printed page. The world changes and the elderly can adapt as well as 
the young. We've had more practice.

I think that one way to improve the new Version 6 documentation would be to 
increase the density of information on the 'index pages'. One should not 
have to go through a number of levels of index pages to get to the required 
information. I think this would go a long way to decreasing complaints.

-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


Notebook[{
Cell[BoxData[
 RowBox[{
  RowBox[{"(*", " ",
   RowBox[{"-=",
    RowBox[{"=",
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"-", "Make"}], " ", "\"\<The Mathematica Book\>\"",
        " ", "based", " ", "on", " ", "\"\<...Overview.nb\>\"", " ",
        "files", " ", "in", " ", "the", " ", "tutorials", " ",
        "directory"}], "-="}], "=", "-"}]}]}], "*)"}],
  RowBox[{
   RowBox[{
    RowBox[{"fn", "=",
     RowBox[{"FileNames", "[",
      RowBox[{"\"\<*Overview.nb\>\"", ",",
       RowBox[{"ToFileName", "[",
        RowBox[{"{",
         RowBox[{
         "$InstallationDirectory", ",", "\"\<Documentation\>\"", ",",
          "\"\<English\>\"", ",", "\"\<System\>\"", ",",
          "\"\<Tutorials\>\""}], "}"}], "]"}]}], "]"}]}], ";"}], "\n",

   RowBox[{"(*",
    RowBox[{
     RowBox[{
     "Find", " ", "\"\<Overview.nb\>\"", " ", "files", " ", "in", " ",
       "the", " ", "tutorials"}], "-", "directory"}], "*)"}],
   "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"nameList", "=",
     RowBox[{
      RowBox[{
       RowBox[{"{",
        RowBox[{
         RowBox[{"StringTake", "[",
          RowBox[{"#", ",",
           RowBox[{"{",
            RowBox[{
             RowBox[{
              RowBox[{
               RowBox[{"StringPosition", "[",
                RowBox[{"#", ",", "$PathnameSeparator"}], "]"}], "[",

               RowBox[{"[",
                RowBox[{
                 RowBox[{"-", "1"}], ",", "1"}], "]"}], "]"}], "+",
              "1"}], ",",
             RowBox[{"-", "12"}]}], "}"}]}], "]"}], ",",
         RowBox[{"\"\<paclet:tutorial/\>\"", "<>",
          RowBox[{"StringTake", "[",
           RowBox[{"#", ",",
            RowBox[{"{",
             RowBox[{
              RowBox[{
               RowBox[{
                RowBox[{"StringPosition", "[",
                 RowBox[{"#", ",", "$PathnameSeparator"}], "]"}], "[",

                RowBox[{"[",
                 RowBox[{
                  RowBox[{"-", "1"}], ",", "1"}], "]"}], "]"}], "+",
               "1"}], ",",
              RowBox[{"-", "4"}]}], "}"}]}], "]"}]}], ",", "#"}],
        "}"}], "&"}], "/@", "fn"}]}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
    "create", " ", "a", " ", "list", " ", "of", " ", "strings", " ",
     "needed", " ", "for", " ", "future", " ", "code"}], "*)"}],
   "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"Do", "[",
     RowBox[{
      RowBox[{
       RowBox[{"nameList", "[",
        RowBox[{"[",
         RowBox[{"i", ",", "1"}], "]"}], "]"}], "=",
       RowBox[{"\"\<New: \>\"", "<>",
        RowBox[{"nameList", "[",
         RowBox[{"[",
          RowBox[{"i", ",", "1"}], "]"}], "]"}]}]}], ",",
      RowBox[{"{",
       RowBox[{"i", ",",
        RowBox[{"{",
         RowBox[{
         "3", ",", "6", ",", "7", ",", "8", ",", "18", ",", "28", ",",
           "29", ",", "40", ",", "41", ",", "46", ",", "48"}],
         "}"}]}], "}"}]}], "]"}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
    "mark", " ", "the", " ", "chapter", " ", "not", " ", "present",
     " ", "in", " ", "v5", ".2", " ", "with", " ", "\"\<New: \>\""}],
    "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"orderOfChapters", "=",
     RowBox[{"{",
      RowBox[{
       RowBox[{"{",
        RowBox[{
        "36", ",", "3", ",", "8", ",", "31", ",", "4", ",", "47", ",",
          "1", ",", "39", ",", "32", ",", "14", ",", "20", ",", "16",
         ",", "18", ",", "17", ",", "11", ",", "43"}], "}"}], ",",
       RowBox[{"{",
        RowBox[{
        "10", ",", "13", ",", "35", ",", "48", ",", "22", ",", "45",
         ",", "9", ",", "27", ",", "38", ",", "42", ",", "44", ",",
         "23", ",", "12", ",", "26", ",", "15", ",", "40", ",",
         "41"}], "}"}], ",",
       RowBox[{"{",
        RowBox[{
        "30", ",", "25", ",", "2", ",", "21", ",", "5", ",", "7", ",",
          "37", ",", "19", ",", "33", ",", "34", ",", "28", ",", "29",
          ",", "6", ",", "46", ",", "24"}], "}"}]}], "}"}]}], ";"}],
   "\n",
   RowBox[{"(*",
    RowBox[{
     RowBox[{
     "The", " ", "file", " ", "list", " ", "is", " ",
      "alphabetical"}], "-",
     RowBox[{
     "this", " ", "is", " ", "the", " ", "order", " ", "in", " ",
      "which", " ", "the", " ", "chapters", " ", "should", " ",
      "appear"}]}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"structure", "=",
     RowBox[{"Table", "[",
      RowBox[{
       RowBox[{"nameList", "[",
        RowBox[{"[", "i", "]"}], "]"}], ",",
       RowBox[{"{",
        RowBox[{"k", ",", "3"}], "}"}], ",",
       RowBox[{"{",
        RowBox[{"i", ",",
         RowBox[{"orderOfChapters", "[",
          RowBox[{"[", "k", "]"}], "]"}]}], "}"}]}], "]"}]}], ";"}],
   "\n",
   RowBox[{"(*",
    RowBox[{
     RowBox[{
     "needed", " ", "for", " ", "the", " ", "code", " ", "further",
      " ", "down"}], "-",
     RowBox[{
     "represents", " ", "the", " ", "structure", " ", "of", " ",
      "the", " ", "Mathematica", " ", "book"}]}], "*)"}],
   "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"mainChapters", "=",
     RowBox[{"{",
      RowBox[{
      "\"\<Getting Started\>\"", ",",
       "\"\<A Practical Introduction to Mathematica\>\"", ",",
       "\"\<Principles of Mathematica\>\"", ",",
       "\"\<Advanced Mathematics in Mathematica\>\"", ",",
       "\"\<Reference Guide\>\"", ",", "\"\<Further Tutorials\>\"",
       ",", "\"\<Packages\>\""}], "}"}]}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{"The", " ", "three", " ", "main", " ", "headings"}],
    "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{
     RowBox[{"beautify", "[", "ugly_", "]"}], ":=",
     RowBox[{"StringReplace", "[",
      RowBox[{
       RowBox[{"StringReplace", "[",
        RowBox[{"ugly", ",",
         RowBox[{"{",
          RowBox[{
           RowBox[{
            RowBox[{"l1_", "?", "LowerCaseQ"}], "~~",
            RowBox[{"l2_", "?", "UpperCaseQ"}]}], "\[RuleDelayed]",
           RowBox[{"l1", "<>", "\"\< \>\"", "<>", "l2"}]}], "}"}]}],
        "]"}], ",",
       RowBox[{"{",
        RowBox[{
         RowBox[{"\"\< And \>\"", "\[Rule]", "\"\< and \>\""}], ",",
         RowBox[{"\"\< Of \>\"", "\[Rule]", "\"\< of \>\""}], ",",
         RowBox[{"\"\< In \>\"", "\[Rule]", "\"\< in \>\""}], ",",
         RowBox[{"\"\< The \>\"", "\[Rule]", "\"\< the \>\""}], ",",
         RowBox[{"\"\< For \>\"", "\[Rule]", "\"\< for \>\""}]}],
        "}"}]}], "]"}]}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
     RowBox[{
     "based", " ", "on", " ", "code", " ", "by", " ", "Selwyn", " ",
      "Hollis"}], "-",
     RowBox[{"Thanks", "!"}]}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"d", "[",
     RowBox[{"x_", ",",
      RowBox[{"style_:", " ", "\"\<Section\>\""}], ",",
      RowBox[{"margin_:", " ",
       RowBox[{"{",
        RowBox[{
         RowBox[{"{",
          RowBox[{"36", ",", "0"}], "}"}], ",",
         RowBox[{"{",
          RowBox[{"5", ",", "5"}], "}"}]}], "}"}]}]}], "]"}], ":=",
    RowBox[{"Module", "[",
     RowBox[{
      RowBox[{"{",
       RowBox[{"sectitle", "=",
        RowBox[{"beautify", "[",
         RowBox[{"x", "[",
          RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "}"}], ",",
      RowBox[{"Cell", "[",
       RowBox[{
        RowBox[{"BoxData", "[",
         RowBox[{"ButtonBox", "[",
          RowBox[{
           RowBox[{"PaneSelectorBox", "[",
            RowBox[{
             RowBox[{"{",
              RowBox[{
               RowBox[{"False", "\[Rule]", "sectitle"}], ",",
               RowBox[{"True", "\[Rule]",
                RowBox[{"StyleBox", "[",
                 RowBox[{"sectitle", ",", "\"\<HyperlinkActive\>\""}],
                  "]"}]}]}], "}"}], ",",
             RowBox[{"Dynamic", "[",
              RowBox[{"CurrentValue", "[", "\"\<MouseOver\>\"", "]"}],
               "]"}]}], "]"}], ",",
           RowBox[{"BaseStyle", "\[Rule]",
            RowBox[{"{",
             RowBox[{"\"\<Link\>\"", ",", "style"}], "}"}]}], ",",
           RowBox[{"ButtonData", "\[Rule]",
            RowBox[{"x", "[",
             RowBox[{"[", "2", "]"}], "]"}]}], ",",
           RowBox[{"ButtonNote", "\[Rule]",
            RowBox[{"x", "[",
             RowBox[{"[", "2", "]"}], "]"}]}]}], "]"}], "]"}], ",",
        "style", ",",
        RowBox[{"CellDingbat", "\[Rule]", "None"}], ",",
        RowBox[{"ShowGroupOpener", "\[Rule]", "True"}], ",",
        RowBox[{"CellMargins", "\[Rule]", "margin"}]}], "]"}]}],
     "]"}]}], "\n",
   RowBox[{"(*",
    RowBox[{
    "Cell", " ", "representing", " ", "a", " ", "hyperlink", " ",
     "to", " ", "a", " ", "file"}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"nb", "=",
     RowBox[{"NotebookPut", "[", "]"}]}], ";",
    RowBox[{"SetOptions", "[",
     RowBox[{"nb", ",",
      RowBox[{"StyleDefinitions", "\[Rule]",
       RowBox[{"ToFileName", "[",
        RowBox[{"\"\<Wolfram\>\"", ",", "\"\<Reference.nb\>\""}],
        "]"}]}]}], "]"}], ";"}], "\[IndentingNewLine]",
   RowBox[{"(*",
    RowBox[{"Open", " ", "new", " ", "Notebook"}], "*)"}],
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"NotebookWrite", "[",
     RowBox[{"nb", ",",
      RowBox[{"{",
       RowBox[{
        RowBox[{"Cell", "[",
         RowBox[{
          RowBox[{"Row", "[",
           RowBox[{"{",
            RowBox[{
             RowBox[{"ToBoxes", "[",
              RowBox[{"Import", "[",
               RowBox[{
                RowBox[{"ToFileName", "[",
                 RowBox[{
                 "\"\<ExampleData\>\"", ",", "\"\<spikey.tiff\>\""}],
                 "]"}], ",", "\"\<Graphics\>\"", ",",
                RowBox[{"ImageSize", "\[Rule]", "70"}]}], "]"}],
              "]"}], ",",
             RowBox[{"Cell", "[",
              RowBox[{
              "\"\<The Virtual Mathematica Book (v6)\>\"", ",",
               "\"\<Title\>\"", ",",
               RowBox[{"TextAlignment", "\[Rule]", "Center"}]}],
              "]"}]}], "}"}], "]"}], ",", "\"\<Title\>\"", ",",
          RowBox[{"TextAlignment", "\[Rule]", "Center"}]}], "]"}],
        ",",
        RowBox[{"Cell", "[",
         RowBox[{
         "\"\<A collection of links to the tutorials present in the \
Mathematica 6.0 Documentation Center, arranged in the order of \
chapters in \\\"The Mathematica Book\\\".\>\"", ",", "\"\<Text\>\"",
          ",",
          RowBox[{"TextAlignment", "\[Rule]", "Center"}]}], "]"}]}],
       "}"}]}], "]"}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{"Print", " ", "the", " ", "titel"}], "*)"}],
   "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"Do", "[",
     RowBox[{
      RowBox[{
       RowBox[{"NotebookWrite", "[",
        RowBox[{"nb", ",",
         RowBox[{"Cell", "[",
          RowBox[{
           RowBox[{"StringJoin", "[",
            RowBox[{"Table", "[",
             RowBox[{"\"\<xxxxxxxxxx\>\"", ",",
              RowBox[{"{", "k", "}"}]}], "]"}], "]"}], ",",
           "\"\<Text\>\""}], "]"}]}], "]"}], ";",
       "\[IndentingNewLine]",
       RowBox[{"If", "[",
        RowBox[{
         RowBox[{"2", "\[LessEqual]", "k", "\[LessEqual]", "4"}], ",",

         RowBox[{"Do", "[",
          RowBox[{
           RowBox[{
            RowBox[{"NotebookWrite", "[",
             RowBox[{"nb", ",",
              RowBox[{"d", "[", "i", "]"}]}], "]"}], ";",
            "\[IndentingNewLine]",
            RowBox[{"With", "[",
             RowBox[{
              RowBox[{"{",
               RowBox[{"nb1", "=",
                RowBox[{"NotebookOpen", "[",
                 RowBox[{
                  RowBox[{"i", "[",
                   RowBox[{"[", "3", "]"}], "]"}], ",",
                  RowBox[{"Visible", "\[Rule]", "False"}]}], "]"}]}],
               "}"}], ",",
              RowBox[{
               RowBox[{"SelectionMove", "[",
                RowBox[{"nb1", ",", "All", ",", "Notebook"}], "]"}],
               ";", "\[IndentingNewLine]",
               RowBox[{"NotebookWrite", "[",
                RowBox[{"nb", ",",
                 RowBox[{
                  RowBox[{"NotebookRead", "[", "nb1", "]"}], "//.",
                  RowBox[{"{",
                   RowBox[{
                    RowBox[{"\"\<TOCChapter\>\"", "\[Rule]",
                    RowBox[{"Sequence", "@@",
                    RowBox[{"{",
                    RowBox[{"\"\<Subsection\>\"", ",",
                    RowBox[{"CellDingbat", "\[Rule]", "None"}], ",",
                    RowBox[{"ShowGroupOpener", "\[Rule]", "True"}],
                    ",",
                    RowBox[{"CellMargins", "\[Rule]",
                    RowBox[{"{",
                    RowBox[{
                    RowBox[{"{",
                    RowBox[{"48", ",", "0"}], "}"}], ",",
                    "Inherited"}], "}"}]}]}], "}"}]}]}], ",",
                    RowBox[{"\"\<TOCSection\>\"", "\[Rule]",
                    RowBox[{"Sequence", "@@",
                    RowBox[{"{",
                    RowBox[{"\"\<Subsubsection\>\"", ",",
                    RowBox[{"CellDingbat", "\[Rule]", "None"}], ",",
                    RowBox[{"ShowGroupOpener", "\[Rule]", "True"}],
                    ",",
                    RowBox[{"CellMargins", "\[Rule]",
                    RowBox[{"{",
                    RowBox[{
                    RowBox[{"{",
                    RowBox[{"58", ",", "0"}], "}"}], ",",
                    "Inherited"}], "}"}]}]}], "}"}]}]}], ",",
                    RowBox[{"\"\<TOCSubsection\>\"", "\[Rule]",
                    RowBox[{"Sequence", "@@",
                    RowBox[{"{",
                    RowBox[{"\"\<Subsubsubsection\>\"", ",",
                    RowBox[{"CellDingbat", "\[Rule]", "None"}], ",",
                    RowBox[{"ShowGroupOpener", "\[Rule]", "True"}],
                    ",",
                    RowBox[{"CellMargins", "\[Rule]",
                    RowBox[{"{",
                    RowBox[{
                    RowBox[{"{",
                    RowBox[{"68", ",", "0"}], "}"}], ",",
                    "Inherited"}], "}"}]}]}], "}"}]}]}], ",",
                    RowBox[{"\"\<TOCSubsubsection\>\"", "\[Rule]",
                    RowBox[{"Sequence", "@@",
                    RowBox[{"{",
                    RowBox[{"\"\<Text\>\"", ",",
                    RowBox[{"CellDingbat", "\[Rule]", "None"}], ",",
                    RowBox[{"ShowGroupOpener", "\[Rule]", "True"}],
                    ",",
                    RowBox[{"CellMargins", "\[Rule]",
                    RowBox[{"{",
                    RowBox[{
                    RowBox[{"{",
                    RowBox[{"78", ",", "0"}], "}"}], ",",
                    "Inherited"}], "}"}]}]}], "}"}]}]}], ",",
                    RowBox[{"ShowCellBracket", "\[Rule]", "True"}]}],
                   "}"}]}]}], "]"}], ";", "\[IndentingNewLine]",
               RowBox[{"NotebookClose", "[", "nb1", "]"}]}]}],
             "]"}]}], ",",
           RowBox[{"{",
            RowBox[{"i", ",",
             RowBox[{"structure", "[",
              RowBox[{"[",
               RowBox[{"k", "-", "1"}], "]"}], "]"}]}], "}"}]}],
          "]"}]}], "]"}]}], ",",
      RowBox[{"{",
       RowBox[{"k", ",",
        RowBox[{"Length", "[", "mainChapters", "]"}]}], "}"}]}],
     "]"}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
     RowBox[{
     "write", " ", "all", " ", "the", " ", "links", " ", "to", " ",
      "the", " ", "main", " ", "chapters"}], ",",
     RowBox[{
      RowBox[{"as", " ", "well", " ", "as", " ", "to", " ", "sub"}],
      "-", "chapters"}]}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"Do", "[",
     RowBox[{
      RowBox[{
       RowBox[{"NotebookFind", "[",
        RowBox[{
        "nb", ",", "cellsToDelete", ",", "All", ",", "CellStyle"}],
        "]"}], ";", "\[IndentingNewLine]",
       RowBox[{"NotebookDelete", "[", "nb", "]"}]}], ",",
      RowBox[{"{",
       RowBox[{"cellsToDelete", ",",
        RowBox[{"{",
         RowBox[{
         "\"\<SymbolColorBar\>\"", ",", "\"\<AnchorBarGrid\>\"", ",",
          "\"\<FooterCell\>\"", ",", "\"\<TOCDocumentTitle\>\""}],
         "}"}]}], "}"}]}], "]"}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
    "Delete", " ", "unnecessary", " ", "styling", " ", "cells", " ",
     "that", " ", "are", " ", "part", " ", "of", " ", "the", " ",
     "tutorial", " ", "notebooks"}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"SetOptions", "[",
     RowBox[{"nb", ",",
      RowBox[{"StyleDefinitions", "\[Rule]",
       RowBox[{"ToFileName", "[",
        RowBox[{"\"\<Book\>\"", ",", "\"\<Textbook.nb\>\""}],
        "]"}]}]}], "]"}], ";"}], "\n",
   RowBox[{
    RowBox[{"Do", "[",
     RowBox[{
      RowBox[{
       RowBox[{"NotebookFind", "[",
        RowBox[{"nb", ",",
         RowBox[{"StringJoin", "[",
          RowBox[{"Table", "[",
           RowBox[{"\"\<xxxxxxxxxx\>\"", ",",
            RowBox[{"{", "k", "}"}]}], "]"}], "]"}], ",", "All"}],
        "]"}], ";", "\[IndentingNewLine]",
       RowBox[{"SelectionMove", "[",
        RowBox[{"nb", ",", "All", ",", "Cell"}], "]"}], ";",
       "\[IndentingNewLine]",
       RowBox[{"NotebookWrite", "[",
        RowBox[{"nb", ",",
         RowBox[{"Cell", "[",
          RowBox[{
           RowBox[{"mainChapters", "[",
            RowBox[{"[", "k", "]"}], "]"}], ",", "\"\<Subtitle\>\"",
           ",",
           RowBox[{"ShowGroupOpener", "\[Rule]", "True"}], ",",
           RowBox[{"CellMargins", "\[Rule]",
            RowBox[{"{",
             RowBox[{
              RowBox[{"{",
               RowBox[{"10", ",", "0"}], "}"}], ",",
              RowBox[{"{",
               RowBox[{"5", ",", "10"}], "}"}]}], "}"}]}], ",",
           RowBox[{"CellTags", "\[Rule]",
            RowBox[{"\"\<Section\>\"", "<>",
             RowBox[{"ToString", "[", "k", "]"}]}]}], ",",
           RowBox[{"CellFrame", "\[Rule]",
            RowBox[{"If", "[",
             RowBox[{
              RowBox[{"MemberQ", "[",
               RowBox[{
                RowBox[{"{",
                 RowBox[{"1", ",", "6", ",", "7"}], "}"}], ",", "k"}],
                "]"}], ",",
              RowBox[{"{",
               RowBox[{
                RowBox[{"{",
                 RowBox[{"0", ",", "0"}], "}"}], ",",
                RowBox[{"{",
                 RowBox[{"0", ",", "2"}], "}"}]}], "}"}], ",",
              "False"}], "]"}]}]}], "]"}]}], "]"}]}], ",",
      RowBox[{"{",
       RowBox[{"k", ",",
        RowBox[{"Length", "[", "mainChapters", "]"}], ",", "1", ",",
        RowBox[{"-", "1"}]}], "}"}]}], "]"}], ";"}],
   "\[IndentingNewLine]",
   RowBox[{"(*",
    RowBox[{"Finishing", " ", "touches"}], "*)"}],
   "\[IndentingNewLine]", "\n",
   RowBox[{"(*", " ",
    RowBox[{"-=",
     RowBox[{"=",
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"-", "Add"}], " ", "links", " ", "to", " ",
         "tutorials", " ", "that", " ", "are", " ", "not", " ",
         "linked", " ", "yet"}], "-="}], "=", "-"}]}]}], "*)"}],
   "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"SelectionMove", "[",
     RowBox[{"nb", ",", "All", ",", "Notebook"}], "]"}], ";"}], "\n",

   RowBox[{
    RowBox[{"links", "=",
     RowBox[{"StringCases", "[",
      RowBox[{
       RowBox[{"ToString", "[",
        RowBox[{
         RowBox[{"NotebookRead", "[", "nb", "]"}], ",", "InputForm"}],
         "]"}], ",",
       RowBox[{
        RowBox[{"Shortest", "[",
         RowBox[{"(",
          RowBox[{
          "\"\<\\\"paclet:tutorial/\>\"", "~~", "y__", "~~",
           "\"\<\\\"\>\""}], ")"}], "]"}], "\[RuleDelayed]", "y"}]}],
      "]"}]}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
     RowBox[{
     "Extract", " ", "all", " ", "links", " ", "to", " ", "tutorials",
       " ", "present", " ", "in", " ", "\"\<The Book\>\""}], "..."}],
    "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"linkedFiles", "=",
     RowBox[{"Union", "[",
      RowBox[{"Flatten", "[",
       RowBox[{
        RowBox[{
         RowBox[{"If", "[",
          RowBox[{
           RowBox[{"StringFreeQ", "[",
            RowBox[{"#", ",",
             RowBox[{"\"\<#\>\"", "~~",
              RowBox[{"DigitCharacter", "..."}]}]}], "]"}], ",",
           RowBox[{"#", "<>", "\"\<.nb\>\""}], ",",
           RowBox[{"StringCases", "[",
            RowBox[{"#", ",",
             RowBox[{
              RowBox[{"(",
               RowBox[{"y__", "~~", "\"\<#\>\"", "~~",
                RowBox[{"DigitCharacter", "..."}]}], ")"}],
              "\[RuleDelayed]",
              RowBox[{"y", "<>", "\"\<.nb\>\""}]}]}], "]"}]}], "]"}],
         "&"}], "/@", "links"}], "]"}], "]"}]}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{"...", " ", "and", " ", "their", " ", "filenames"}],
    "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"allTutorials", "=",
     RowBox[{"Flatten", "[",
      RowBox[{
       RowBox[{
        RowBox[{"StringTake", "[",
         RowBox[{"#", ",",
          RowBox[{"{",
           RowBox[{
            RowBox[{
             RowBox[{
              RowBox[{"StringPosition", "[",
               RowBox[{"#", ",", "$PathnameSeparator"}], "]"}], "[",
              RowBox[{"[",
               RowBox[{
                RowBox[{"-", "1"}], ",", "1"}], "]"}], "]"}], "+",
             "1"}], ",",
            RowBox[{"-", "1"}]}], "}"}]}], "]"}], "&"}], "/@",
       RowBox[{"FileNames", "[",
        RowBox[{"\"\<*.nb\>\"", ",",
         RowBox[{"ToFileName", "[",
          RowBox[{"{",
           RowBox[{
           "$InstallationDirectory", ",", "\"\<Documentation\>\"",
            ",", "\"\<English\>\"", ",", "\"\<System\>\"", ",",
            "\"\<Tutorials\>\""}], "}"}], "]"}]}], "]"}]}], "]"}]}],
    ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
    "all", " ", "tutorials", " ", "in", " ", "the", " ", "tutorial",
     " ", "directory"}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"notUsed", "=",
     RowBox[{"Complement", "[",
      RowBox[{"allTutorials", ",", "linkedFiles"}], "]"}]}], ";"}],
   "\n",
   RowBox[{"(*",
    RowBox[{
     RowBox[{
     "all", " ", "tutorials", " ", "not", " ", "linked", " ", "to",
      " ", "in", " ", "\"\<The Book\>\"", " ", "so", " ", "far", " ",

      RowBox[{"(",
       RowBox[{"in", " ", "alphabetical", " ", "order"}], ")"}]}],
     ";",
     RowBox[{
     "these", " ", "are", " ", "76", " ", "tutorial", " ",
      "notebooks"}]}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"nameList", "=",
     RowBox[{
      RowBox[{
       RowBox[{"{",
        RowBox[{
         RowBox[{"StringTake", "[",
          RowBox[{"#", ",",
           RowBox[{"{",
            RowBox[{"1", ",",
             RowBox[{"-", "4"}]}], "}"}]}], "]"}], ",",
         RowBox[{"\"\<paclet:tutorial/\>\"", "<>",
          RowBox[{"StringTake", "[",
           RowBox[{"#", ",",
            RowBox[{"{",
             RowBox[{"1", ",",
              RowBox[{"-", "4"}]}], "}"}]}], "]"}]}], ",",
         RowBox[{
          RowBox[{"ToFileName", "[",
           RowBox[{"{",
            RowBox[{
            "$InstallationDirectory", ",", "\"\<Documentation\>\"",
             ",", "\"\<English\>\"", ",", "\"\<System\>\"", ",",
             "\"\<Tutorials\>\""}], "}"}], "]"}], "<>", "#"}]}],
        "}"}], "&"}], "/@", "notUsed"}]}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
    "create", " ", "a", " ", "list", " ", "of", " ", "strings", " ",
     "needed", " ", "for", " ", "future", " ", "code"}], "*)"}],
   "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"GettingStarted", "=",
     RowBox[{"{",
      RowBox[{"21", ",", "18", ",", "75"}], "}"}]}], ";",
    RowBox[{"GraphPlotting", "=",
     RowBox[{"{",
      RowBox[{"27", ",", "28", ",", "36", ",", "71"}], "}"}]}], ";",
    RowBox[{"MathematicaReferenceGuide", "=",
     RowBox[{"{",
      RowBox[{
      "7", ",", "31", ",", "64", ",", "19", ",", "57", ",", "20", ",",
        "37", ",", "33", ",", "30"}], "}"}]}], ";",
    RowBox[{"MatrixAndVectorOperations", "=",
     RowBox[{"{",
      RowBox[{
      "10", ",", "26", ",", "6", ",", "3", ",", "73", ",", "16", ",",
       "42", ",", "45", ",", "62", ",", "52", ",", "65", ",", "69"}],
      "}"}]}], ";",
    RowBox[{"Statistics", "=",
     RowBox[{"{",
      RowBox[{"11", ",", "15", ",", "13", ",", "58"}], "}"}]}], ";",
    RowBox[{"DynamicFeatures", "=",
     RowBox[{"{",
      RowBox[{"35", ",", "2", ",", "34", ",", "1"}], "}"}]}], ";",
    RowBox[{"SystemSpecificTopics", "=",
     RowBox[{"{",
      RowBox[{
      "17", ",", "32", ",", "60", ",", "50", ",", "51", ",", "53",
       ",", "41", ",", "44", ",", "38", ",", "39", ",", "40"}],
      "}"}]}], ";",
    RowBox[{"FurtherNDSolveTutorials", "=",
     RowBox[{"{",
      RowBox[{"46", ",", "47", ",", "48", ",", "49"}], "}"}]}], ";",
    RowBox[{"FrontendAndFormattingTopics", "=",
     RowBox[{"{",
      RowBox[{
      "5", ",", "22", ",", "24", ",", "25", ",", "29", ",", "67", ",",
        "70", ",", "74"}], "}"}]}], ";"}], "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"topics", "=",
     RowBox[{"{",
      RowBox[{
      "GettingStarted", ",", "MathematicaReferenceGuide", ",",
       "GraphPlotting", ",", "MatrixAndVectorOperations", ",",
       "Statistics", ",", "DynamicFeatures", ",",
       "SystemSpecificTopics", ",", "FurtherNDSolveTutorials", ",",
       "FrontendAndFormattingTopics"}], "}"}]}], ";"}], "\n",
   RowBox[{
    RowBox[{"FurtherTopics", "=",
     RowBox[{"Complement", "[",
      RowBox[{
       RowBox[{"Range", "[",
        RowBox[{"Length", "[", "notUsed", "]"}], "]"}], ",",
       RowBox[{"Flatten", "[", "topics", "]"}]}], "]"}]}], ";"}],
   "\n",
   RowBox[{
    RowBox[{"topics", "=",
     RowBox[{"Join", "[",
      RowBox[{"topics", ",",
       RowBox[{"{", "FurtherTopics", "}"}]}], "]"}]}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
    "trying", " ", "to", " ", "get", " ", "some", " ", "order", " ",
     "into", " ", "these", " ", "tutorials"}], "*)"}],
   "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"topicNames", "=",
     RowBox[{"{",
      RowBox[{
      "\"\<Getting Started\>\"", ",",
       "\"\<Mathematica Reference Guide\>\"", ",",
       "\"\<Graph Plotting\>\"", ",",
       "\"\<Matrix And Vector Operations\>\"", ",",
       "\"\<Statistics\>\"", ",", "\"\<Dynamic Features\>\"", ",",
       "\"\<System Specific Topics\>\"", ",",
       "\"\<Further NDSolve Tutorials\>\"", ",",
       "\"\<FrontEnd and Formatting Topics\>\"", ",",
       "\"\<Others\>\""}], "}"}]}], ";"}], "\[IndentingNewLine]",
   "\n",
   RowBox[{
    RowBox[{"NotebookFind", "[",
     RowBox[{
     "nb", ",", "\"\<Section1\>\"", ",", "After", ",", "CellTags"}],
     "]"}], ";",
    RowBox[{"SelectionMove", "[",
     RowBox[{"nb", ",", "After", ",", "Cell"}], "]"}], ";"}],
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"Do", "[",
     RowBox[{
      RowBox[{"NotebookWrite", "[",
       RowBox[{"nb", ",",
        RowBox[{"d", "[",
         RowBox[{
          RowBox[{"nameList", "[",
           RowBox[{"[", "i", "]"}], "]"}], ",", "\"\<Subsection\>\"",
          ",",
          RowBox[{"{",
           RowBox[{
            RowBox[{"{",
             RowBox[{"48", ",", "0"}], "}"}], ",", "Inherited"}],
           "}"}]}], "]"}]}], "]"}], ",",
      RowBox[{"{",
       RowBox[{"i", ",", "GettingStarted"}], "}"}]}], "]"}], ";"}],
   "\n",
   RowBox[{"(*",
    RowBox[{
    "Add", " ", "links", " ", "to", " ", "\"\<getting Started\>\"",
     " ", "topics"}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"NotebookFind", "[",
     RowBox[{
     "nb", ",", "\"\<Section5\>\"", ",", "After", ",", "CellTags"}],
     "]"}], ";",
    RowBox[{"SelectionMove", "[",
     RowBox[{"nb", ",", "After", ",", "Cell"}], "]"}], ";"}],
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"Do", "[",
     RowBox[{
      RowBox[{"NotebookWrite", "[",
       RowBox[{"nb", ",",
        RowBox[{"d", "[",
         RowBox[{
          RowBox[{"nameList", "[",
           RowBox[{"[", "i", "]"}], "]"}], ",", "\"\<Subsection\>\"",
          ",",
          RowBox[{"{",
           RowBox[{
            RowBox[{"{",
             RowBox[{"48", ",", "0"}], "}"}], ",", "Inherited"}],
           "}"}]}], "]"}]}], "]"}], ",",
      RowBox[{"{",
       RowBox[{"i", ",", "MathematicaReferenceGuide"}], "}"}]}],
     "]"}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
    "Add", " ", "links", " ", "to", " ", "\"\<Refrence Guides\>\"",
     " ", "topics"}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"NotebookFind", "[",
     RowBox[{
     "nb", ",", "\"\<Section6\>\"", ",", "After", ",", "CellTags"}],
     "]"}], ";",
    RowBox[{"SelectionMove", "[",
     RowBox[{"nb", ",", "After", ",", "Cell"}], "]"}], ";"}],
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"Do", "[",
     RowBox[{
      RowBox[{
       RowBox[{"NotebookWrite", "[",
        RowBox[{"nb", ",",
         RowBox[{"Cell", "[",
          RowBox[{
           RowBox[{"topicNames", "[",
            RowBox[{"[", "i", "]"}], "]"}], ",", "\"\<Section\>\"",
           ",",
           RowBox[{"CellDingbat", "\[Rule]", "None"}], ",",
           RowBox[{"ShowGroupOpener", "\[Rule]", "True"}], ",",
           RowBox[{"CellMargins", "\[Rule]",
            RowBox[{"{",
             RowBox[{
              RowBox[{"{",
               RowBox[{"36", ",", "0"}], "}"}], ",",
              RowBox[{"{",
               RowBox[{"5", ",", "5"}], "}"}]}], "}"}]}]}], "]"}]}],
        "]"}], ";", "\[IndentingNewLine]",
       RowBox[{"Do", "[",
        RowBox[{
         RowBox[{"NotebookWrite", "[",
          RowBox[{"nb", ",",
           RowBox[{"d", "[",
            RowBox[{
             RowBox[{"nameList", "[",
              RowBox[{"[", "k", "]"}], "]"}], ",",
             "\"\<Subsection\>\"", ",",
             RowBox[{"{",
              RowBox[{
               RowBox[{"{",
                RowBox[{"48", ",", "0"}], "}"}], ",", "Inherited"}],
              "}"}]}], "]"}]}], "]"}], ",",
         RowBox[{"{",
          RowBox[{"k", ",",
           RowBox[{"topics", "[",
            RowBox[{"[", "i", "]"}], "]"}]}], "}"}]}], "]"}]}], ",",
      RowBox[{"{",
       RowBox[{"i", ",", "3", ",",
        RowBox[{"Length", "[", "topics", "]"}]}], "}"}]}], "]"}],
    ";"}], "\[IndentingNewLine]",
   RowBox[{"(*",
    RowBox[{
    "Add", " ", "links", " ", "to", " ", "all", " ", "other", " ",
     "topics"}], "*)"}], "\[IndentingNewLine]", "\n",
   RowBox[{"(*", " ",
    RowBox[{"-=",
     RowBox[{"=",
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"-", "Add"}], " ", "links", " ", "to", " ",
         "Packages"}], "-="}], "=", "-"}]}]}], "*)"}],
   "\[IndentingNewLine]", "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"fnpdir", "=",
     RowBox[{"FileNames", "[",
      RowBox[{"\"\<*\>\"", ",",
       RowBox[{"ToFileName", "[",
        RowBox[{"{",
         RowBox[{
         "$InstallationDirectory", ",", "\"\<Documentation\>\"", ",",
          "\"\<English\>\"", ",", "\"\<Packages\>\""}], "}"}],
        "]"}]}], "]"}]}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
    "Directory", " ", "names", " ", "of", " ", "the", " ",
     "Packages"}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"fnptut", "=",
     RowBox[{
      RowBox[{
       RowBox[{"FileNames", "[",
        RowBox[{"\"\<*.nb\>\"", ",",
         RowBox[{"ToFileName", "[",
          RowBox[{"{",
           RowBox[{
           "#", ",", "\"\<Documentation\>\"", ",", "\"\<English\>\"",
            ",", "\"\<Tutorials\>\""}], "}"}], "]"}], ",",
         "Infinity"}], "]"}], "&"}], "/@", "fnpdir"}]}], ";"}], "\n",

   RowBox[{"(*",
    RowBox[{
    "tutorial", " ", "notebooks", " ", "of", " ", "the", " ",
     "Packages"}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"fnpguid", "=",
     RowBox[{
      RowBox[{
       RowBox[{"FileNames", "[",
        RowBox[{"\"\<*.nb\>\"", ",",
         RowBox[{"ToFileName", "[",
          RowBox[{"{",
           RowBox[{
           "#", ",", "\"\<Documentation\>\"", ",", "\"\<English\>\"",
            ",", "\"\<Guides\>\""}], "}"}], "]"}], ",", "Infinity"}],
        "]"}], "&"}], "/@", "fnpdir"}]}], ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
    "guide", " ", "notebooks", " ", "of", " ", "the", " ",
     "Packages"}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"NotebookFind", "[",
     RowBox[{
     "nb", ",", "\"\<Section7\>\"", ",", "After", ",", "CellTags"}],
     "]"}], ";",
    RowBox[{"SelectionMove", "[",
     RowBox[{"nb", ",", "After", ",", "Cell"}], "]"}], ";"}],
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"Do", "[",
     RowBox[{
      RowBox[{"With", "[",
       RowBox[{
        RowBox[{"{",
         RowBox[{"packageName", "=",
          RowBox[{
           RowBox[{
            RowBox[{"StringTake", "[",
             RowBox[{"#", ",",
              RowBox[{"{",
               RowBox[{
                RowBox[{
                 RowBox[{
                  RowBox[{"StringPosition", "[",
                   RowBox[{"#", ",", "$PathnameSeparator"}], "]"}],
                  "[",
                  RowBox[{"[",
                   RowBox[{
                    RowBox[{"-", "1"}], ",", "1"}], "]"}], "]"}], "+",
                  "1"}], ",",
                RowBox[{"-", "1"}]}], "}"}]}], "]"}],
            StyleBox["&",
             FontVariations->{"Underline"->True},
             FontColor->RGBColor[0., 0., 1.]]}],
           StyleBox["@",
            FontVariations->{"Underline"->True},
            FontColor->RGBColor[0., 0., 1.]],
           RowBox[{
            StyleBox["fnpdir",
             FontVariations->{"Underline"->True},
             FontColor->RGBColor[0., 0., 1.]],
            StyleBox["[",
             FontVariations->{"Underline"->True},
             FontColor->RGBColor[0., 0., 1.]],
            RowBox[{
             StyleBox["[",
              FontVariations->{"Underline"->True},
              FontColor->RGBColor[0., 0., 1.]],
             StyleBox["package",
              FontVariations->{"Underline"->True},
              FontColor->RGBColor[0., 0., 1.]], "]"}], "]"}]}]}],
         "}"}], ",",
        RowBox[{
         RowBox[{"NotebookWrite", "[",
          RowBox[{"nb", ",",
           RowBox[{"Cell", "[",
            RowBox[{
             RowBox[{"beautify", "@", "packageName"}], ",",
             "\"\<Section\>\"", ",",
             RowBox[{"CellDingbat", "\[Rule]", "None"}], ",",
             RowBox[{"ShowGroupOpener", "\[Rule]", "True"}], ",",
             RowBox[{"CellMargins", "\[Rule]",
              RowBox[{"{",
               RowBox[{
                RowBox[{"{",
                 RowBox[{"36", ",", "0"}], "}"}], ",",
                RowBox[{"{",
                 RowBox[{"5", ",", "5"}], "}"}]}], "}"}]}]}], "]"}]}],
           "]"}], ";", "\n",
         RowBox[{"If", "[",
          RowBox[{
           RowBox[{
            RowBox[{"Length", "[",
             RowBox[{"fnptut", "[",
              RowBox[{"[", "package", "]"}], "]"}], "]"}], ">", "0"}],
            ",",
           RowBox[{
            RowBox[{"level", "=",
             RowBox[{"If", "[",
              RowBox[{
               RowBox[{
                RowBox[{
                 RowBox[{"StringTake", "[",
                  RowBox[{
                   RowBox[{"fnptut", "[",
                    RowBox[{"[", "package", "]"}], "]"}], ",",
                   RowBox[{
                    RowBox[{"{",
                    RowBox[{"1", ",",
                    RowBox[{"-", "1"}]}], "}"}], "+",
                    RowBox[{
                    RowBox[{"(",
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{"Take", "[",
                    RowBox[{
                    RowBox[{"#", "[",
                    RowBox[{"[", "1", "]"}], "]"}], ",",
                    RowBox[{"{",
                    RowBox[{
                    RowBox[{"-", "2"}], ",",
                    RowBox[{"-", "1"}]}], "}"}]}], "]"}], "&"}], "@",

                    RowBox[{"Transpose", "[",
                    RowBox[{"StringPosition", "[",
                    RowBox[{"#", ",", "$PathnameSeparator"}], "]"}],
                    "]"}]}], "&"}], "/@",
                    RowBox[{"fnptut", "[",
                    RowBox[{"[", "package", "]"}], "]"}]}], ")"}],
                    "[",
                    RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], "[",
                 RowBox[{"[", "1", "]"}], "]"}], "\[Equal]",
                "\"\<Tutorials\>\""}], ",", "1", ",", "2"}], "]"}]}],
            ";", "\[IndentingNewLine]",
            RowBox[{"nameList", "=",
             RowBox[{
              RowBox[{
               RowBox[{"{",
                RowBox[{
                 RowBox[{"\"\<Tutorial: \>\"", "<>",
                  RowBox[{"StringTake", "[",
                   RowBox[{"#", ",",
                    RowBox[{"{",
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{"StringPosition", "[",
                    RowBox[{"#", ",", "$PathnameSeparator"}], "]"}],
                    "[",
                    RowBox[{"[",
                    RowBox[{
                    RowBox[{"-", "level"}], ",", "1"}], "]"}], "]"}],
                    "+", "1"}], ",",
                    RowBox[{"-", "4"}]}], "}"}]}], "]"}]}], ",",
                 RowBox[{
                 "\"\<paclet:\>\"", "<>", "packageName", "<>",
                  "\"\</tutorial/\>\"", "<>",
                  RowBox[{"StringReplace", "[",
                   RowBox[{
                    RowBox[{"StringTake", "[",
                    RowBox[{"#", ",",
                    RowBox[{"{",
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{"StringPosition", "[",
                    RowBox[{"#", ",", "$PathnameSeparator"}], "]"}],
                    "[",
                    RowBox[{"[",
                    RowBox[{
                    RowBox[{"-", "level"}], ",", "1"}], "]"}], "]"}],
                    "+", "1"}], ",",
                    RowBox[{"-", "4"}]}], "}"}]}], "]"}], ",",
                    RowBox[{
                    "\"\<\\\\\>\"", "\[Rule]", "\"\</\>\""}]}],
                   "]"}]}]}], "}"}], "&"}], "/@",
              RowBox[{"fnptut", "[",
               RowBox[{"[", "package", "]"}], "]"}]}]}], ";",
            "\[IndentingNewLine]",
            RowBox[{"Do", "[",
             RowBox[{
              RowBox[{"NotebookWrite", "[",
               RowBox[{"nb", ",",
                RowBox[{"d", "[",
                 RowBox[{
                  RowBox[{"nameList", "[",
                   RowBox[{"[", "k", "]"}], "]"}], ",",
                  "\"\<Subsection\>\"", ",",
                  RowBox[{"{",
                   RowBox[{
                    RowBox[{"{",
                    RowBox[{"48", ",", "0"}], "}"}], ",",
                    "Inherited"}], "}"}]}], "]"}]}], "]"}], ",",
              RowBox[{"{",
               RowBox[{"k", ",",
                RowBox[{"Length", "[",
                 RowBox[{"fnptut", "[",
                  RowBox[{"[", "package", "]"}], "]"}], "]"}]}],
               "}"}]}], "]"}]}]}], "]"}], ";", "\n",
         RowBox[{"If", "[",
          RowBox[{
           RowBox[{
            RowBox[{"Length", "[",
             RowBox[{"fnpguid", "[",
              RowBox[{"[", "package", "]"}], "]"}], "]"}], ">", "0"}],
            ",",
           RowBox[{
            RowBox[{"level", "=",
             RowBox[{"If", "[",
              RowBox[{
               RowBox[{
                RowBox[{
                 RowBox[{"StringTake", "[",
                  RowBox[{
                   RowBox[{"fnpguid", "[",
                    RowBox[{"[", "package", "]"}], "]"}], ",",
                   RowBox[{
                    RowBox[{"{",
                    RowBox[{"1", ",",
                    RowBox[{"-", "1"}]}], "}"}], "+",
                    RowBox[{
                    RowBox[{"(",
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{"Take", "[",
                    RowBox[{
                    RowBox[{"#", "[",
                    RowBox[{"[", "1", "]"}], "]"}], ",",
                    RowBox[{"{",
                    RowBox[{
                    RowBox[{"-", "2"}], ",",
                    RowBox[{"-", "1"}]}], "}"}]}], "]"}], "&"}], "@",

                    RowBox[{"Transpose", "[",
                    RowBox[{"StringPosition", "[",
                    RowBox[{"#", ",", "$PathnameSeparator"}], "]"}],
                    "]"}]}], "&"}], "/@",
                    RowBox[{"fnpguid", "[",
                    RowBox[{"[", "package", "]"}], "]"}]}], ")"}],
                    "[",
                    RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], "[",
                 RowBox[{"[", "1", "]"}], "]"}], "\[Equal]",
                "\"\<Guides\>\""}], ",", "1", ",", "2"}], "]"}]}],
            ";", "\[IndentingNewLine]",
            RowBox[{"nameList", "=",
             RowBox[{
              RowBox[{
               RowBox[{"{",
                RowBox[{
                 RowBox[{"\"\<Guide: \>\"", "<>",
                  RowBox[{"StringTake", "[",
                   RowBox[{"#", ",",
                    RowBox[{"{",
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{"StringPosition", "[",
                    RowBox[{"#", ",", "$PathnameSeparator"}], "]"}],
                    "[",
                    RowBox[{"[",
                    RowBox[{
                    RowBox[{"-", "1"}], ",", "1"}], "]"}], "]"}], "+",
                     "1"}], ",",
                    RowBox[{"-", "4"}]}], "}"}]}], "]"}]}], ",",
                 RowBox[{
                 "\"\<paclet:\>\"", "<>", "packageName", "<>",
                  "\"\</guide/\>\"", "<>",
                  RowBox[{"StringReplace", "[",
                   RowBox[{
                    RowBox[{"StringTake", "[",
                    RowBox[{"#", ",",
                    RowBox[{"{",
                    RowBox[{
                    RowBox[{
                    RowBox[{
                    RowBox[{"StringPosition", "[",
                    RowBox[{"#", ",", "$PathnameSeparator"}], "]"}],
                    "[",
                    RowBox[{"[",
                    RowBox[{
                    RowBox[{"-", "level"}], ",", "1"}], "]"}], "]"}],
                    "+", "1"}], ",",
                    RowBox[{"-", "4"}]}], "}"}]}], "]"}], ",",
                    RowBox[{
                    "\"\<\\\\\>\"", "\[Rule]", "\"\</\>\""}]}],
                   "]"}]}]}], "}"}], "&"}], "/@",
              RowBox[{"fnpguid", "[",
               RowBox[{"[", "package", "]"}], "]"}]}]}], ";",
            "\[IndentingNewLine]",
            RowBox[{"Do", "[",
             RowBox[{
              RowBox[{"NotebookWrite", "[",
               RowBox[{"nb", ",",
                RowBox[{"d", "[",
                 RowBox[{
                  RowBox[{"nameList", "[",
                   RowBox[{"[", "k", "]"}], "]"}], ",",
                  "\"\<Subsection\>\"", ",",
                  RowBox[{"{",
                   RowBox[{
                    RowBox[{"{",
                    RowBox[{"48", ",", "0"}], "}"}], ",",
                    "Inherited"}], "}"}]}], "]"}]}], "]"}], ",",
              RowBox[{"{",
               RowBox[{"k", ",",
                RowBox[{"Length", "[",
                 RowBox[{"fnpguid", "[",
                  RowBox[{"[", "package", "]"}], "]"}], "]"}]}],
               "}"}]}], "]"}]}]}], "]"}]}]}], "\n", "]"}], ",",
      RowBox[{"{",
       RowBox[{"package", ",",
        RowBox[{"Length", "[", "fnpdir", "]"}]}], "}"}]}], "]"}],
    ";"}], "\n",
   RowBox[{"(*",
    RowBox[{
    "Add", " ", "links", " ", "to", " ", "package", " ", "tutorials",
     " ", "and", " ", "guides"}], "*)"}], "\[IndentingNewLine]",
   "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"SelectionMove", "[",
     RowBox[{"nb", ",", "All", ",", "Notebook"}], "]"}], ";",
    RowBox[{"FrontEndExecute", "[",
     RowBox[{
     "FrontEndToken", "[", "\"\<SelectionCloseAllGroups\>\"", "]"}],
     "]"}], ";"}], "\[IndentingNewLine]",
   RowBox[{
    RowBox[{"FrontEndExecute", "[",
     RowBox[{"FrontEndToken", "[", "\"\<OpenCloseGroup\>\"", "]"}],
     "]"}], ";"}], "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{3.411770874483*^9}]
},
WindowSize->{607, 750},
WindowMargins->{{2, Automatic}, {44, Automatic}},
FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, \
2007)",
StyleDefinitions->"Default.nb"
]





  • Prev by Date: Re: Sphere through 4 points
  • Next by Date: RE: Re: How should I start with mathematica?
  • Previous by thread: Re: Troubles with HarmonicNumber, empty sums, and Zeta
  • Next by thread: Re: Mathematica Book and Documentation