Re: more documentation finder palettes
- To: mathgroup at smc.vnet.net
- Subject: [mg76177] Re: [mg76120] more documentation finder palettes
- From: Selwyn Hollis <sh2.7183 at earthlink.net>
- Date: Thu, 17 May 2007 06:02:18 -0400 (EDT)
- References: <845718.1179133087873.JavaMail.root@m35> <200705150856.EAA17018@smc.vnet.net> <200705160941.FAA00385@smc.vnet.net> <464B1E1D.3020409@math.umass.edu>
Murray,
It was killed by email line-breaks in the directory names.
But nevermind, I've got something much better already (with thanks to
David Reiss). Rather than include it here, I've posted at
http://www.math.armstrong.edu/faculty/hollis/HelpHelperPalette.nb
Regards,
Selwyn
On May 16, 2007, at 11:07 AM, Murray Eisenberg wrote:
> The first one works, but both the second and third are failing with
> Transpose::nmttx error messages about the first two levels of a one-
> dimensional list cannot be transposed.
>
> Selwyn Hollis 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}]
>
> --
> Murray Eisenberg murray at math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower phone 413 549-1020 (H)
> University of Massachusetts 413 545-2859 (W)
> 710 North Pleasant Street fax 413 545-1801
> Amherst, MA 01003-9305
- References:
- Re: Compatibility woes
- From: DrMajorBob <drmajorbob@bigfoot.com>
- more documentation finder palettes
- From: Selwyn Hollis <sh2.7183@earthlink.net>
- Re: Compatibility woes