Re: more documentation finder palettes
- To: mathgroup at smc.vnet.net
- Subject: [mg76181] Re: [mg76120] more documentation finder palettes
- From: DrMajorBob <drmajorbob at bigfoot.com>
- Date: Thu, 17 May 2007 06:04:22 -0400 (EDT)
- References: <845718.1179133087873.JavaMail.root@m35> <200705150856.EAA17018@smc.vnet.net> <20467413.1179319928628.JavaMail.root@m35>
- Reply-to: drmajorbob at bigfoot.com
This fails. The slashes are backward. SetDirectory[$InstallationDirectory <> "/Documentation/English/Packages/Compatibility/Documentation/ English/Guides"] Bobby On Wed, 16 May 2007 04:41:42 -0500, Selwyn Hollis <sh2.7183 at earthlink.ne= t> = wrote: > > (* This is a vastly improved version of the previous palette for > opening tutorial overviews: *) > > columns = 3; > SetDirectory[$InstallationDirectory <> > "/Documentation/English/System/Tutorials"]; > overviewNames = > StringReplace[#, {".nb" -> ""}] & /@ FileNames["*Overview.nb"]; > SetDirectory[$HomeDirectory]; docpaths = > FileNames[ > "*Overview.nb", {$InstallationDirectory <> > "/Documentation/English/System/Tutorials"}, Infinity]; > CellPrint@Cell[BoxData[GridBox[ > Partition[PadRight[#, columns*Ceiling[Length[#]/columns], " "], > columns] &[ > ((ButtonBox[((l = StringLength[#]; > If[l < 25, #, StringTake[#, 23] <> "..."]) &)@ > StringReplace[ > First[#], {"Overview" -> "", "And" -> "&", > StartOfString ~~ "The" -> "", "Administration" -> "Admin= ", > "TwoDimensional" -> "2D", "Operations" -> "Ops"} ], > ButtonFunction :> (NotebookOpen[Last[#]]), > Evaluator -> Automatic] &) /@ > Transpose[{overviewNames, docpaths}])]]], > ButtonBoxOptions -> {BaseStyle -> {FontSize -> 9, FontFamily -> > "Arial", > Bold}, FrameMargins -> {{2, 2}, {0, 0}}, > Background -> RGBColor[1, 0.96, 0.87]}, > GridBoxOptions -> {RowSpacings -> 0, ColumnSpacings -> 0}] > > (* This one opens package guides: *) > > columns = 3; > SetDirectory[$InstallationDirectory <> "/Documentation/English/ > Packages"]; > pkgnames = FileNames[]; > SetDirectory[$HomeDirectory]; docpaths = > FileNames[ > "*", {$InstallationDirectory <> > "/Documentation/English/Packages/*/Documentation/English/Guides"}= , > Infinity]; > CellPrint@Cell[BoxData[GridBox[ > Partition[PadRight[#, columns*Ceiling[Length[#]/columns], " "], > columns] &[ > ((ButtonBox[((l = StringLength[#]; > If[l < 25, #, StringTake[#, 23] <> "..."]) &)@First[#],= > ButtonFunction :> (NotebookOpen[Last[#]]), > Evaluator -> Automatic] &) /@ > Transpose[{Flatten[pkgnames /. "Compatibility" -> {}], > Flatten[ > If[Not@StringMatchQ[#, {"*Package.nb"}], {}, #] & /@ > docpaths]}])]]], > ButtonBoxOptions -> {BaseStyle -> {FontSize -> 9, FontFamily -> > "Arial", > Bold}, FrameMargins -> {{2, 2}, {0, 0}}, > Background -> RGBColor[1, 0.96, 0.87]}, > GridBoxOptions -> {RowSpacings -> 0, ColumnSpacings -> 0}] > > > (* This one opens the compatibility guides: *) > > columns = 1; > SetDirectory[$InstallationDirectory <> > "/Documentation/English/Packages/Compatibility/Documentation/ > English/\ > Guides"]; > pkgnames = FileNames[]; > SetDirectory[$HomeDirectory]; docpaths = > FileNames[ > "*", {$InstallationDirectory <> > "/Documentation/English/Packages/Compatibility/Documentation/ > English/\ > Guides/*"}, Infinity]; > CellPrint@Cell[BoxData[GridBox[ > Partition[PadRight[#, columns*Ceiling[Length[#]/columns], " "], > columns] &[ > ((ButtonBox[((l = StringLength[#]; > If[l < 25, #, StringTake[#, 23] <> "..."]) &)@First[#],= > ButtonFunction :> (NotebookOpen[Last[#]]), > Evaluator -> Automatic] &) /@ Transpose[{pkgnames, > docpaths}])]]], > ButtonBoxOptions -> {BaseStyle -> {FontSize -> 10, FontFamily -> > "Arial", > Bold}, FrameMargins -> {{10, 10}, {0, 0}}, > Background -> RGBColor[1, 0.96, 0.87]}, > GridBoxOptions -> {RowSpacings -> 0, ColumnSpacings -> 0}] > > > > > -- = DrMajorBob at bigfoot.com
- References:
- Re: Compatibility woes
- From: DrMajorBob <drmajorbob@bigfoot.com>
- Re: Compatibility woes