Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: 6.0 Standard Packages?, New Style Documentation?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77517] Re: 6.0 Standard Packages?, New Style Documentation?
  • From: David Reiss <dbreiss at gmail.com>
  • Date: Mon, 11 Jun 2007 04:26:30 -0400 (EDT)
  • References: <f4dspd$hiv$1@smc.vnet.net>

here is some code that "improves" upon the other code in these
postings.  I have put a notebook linked to the WorkLife FrameWork blog
from a posting on this at:

http://scientificarts.com/worklife/wlfwblog/index.html

wiht a permalink at

http://scientificarts.com/worklife/wlfwblog/BE3390503366/BE3390503366.html

--David


One comment--the use of Quiet in this is to surprss some no context
messages that are generated because the contexts of many of these
packages do not reflect the directrly structure that they exist in.
So the packages, I beleive, load properly, but the contexts that they
end up existing in are not the same as those of the artument to the
Needs statements that load them.

Here's he code (I am sure that it can be further improved upon--
remember of course that this is intended for Mathematica 6), I hope
that it is useful...


ClearAll[StandardPackagesPalette];

StandardPackagesPalette::usage =
  "StandardPackagesPalette[], generates a palette of pull-down menus
that allow you to load the standard
  packages. StandardPackagesPalette[\"LegacyPackages\"] does the same
for those legacy packages that are included in the Mathematica
  distribution. Similarly for StandardPackagesPalette[\"ExtraPackages
\"]. ";


StandardPackagesPalette[
   root : "Packages" | "LegacyPackages" | "ExtraPackages"] :=

  Module[{directories, context, packageFiles, packageData, toMenuData,
     menuData, menus},

   context[dir_] :=

    StringReplace[
     dir, {DirectoryName[dir] -> "", $PathnameSeparator -> ""}];

   packageFiles[dir_] :=
    DeleteCases[StringDrop[
      StringReplace[#, DirectoryName[#] -> ""] & /@
       FileNames[{"*.m"}, {dir}],
      -2],
     "PacletInfo" | "Usage", \[Infinity]];

   directories = FileNames[{"*"},
     {ToFileName[{$InstallationDirectory, "AddOns", root}]}];

   directories = Select[directories, FileType[#] === Directory &];

   packageData = {context[#], packageFiles[#]} & /@ directories;

   packageData = DeleteCases[packageData, {_, {}}];

   toMenuData[{cont_, files_}] :=

    With[{topContext = cont <> "`"},

     {cont, # :> Quiet[Needs[topContext <> # <> "`"]] & /@ files}
     ];

   menuData = toMenuData /@ packageData;

   menus = ActionMenu[Sequence @@ #,
       BaseStyle -> {FontSize -> 10, FontFamily -> "Helvetica"},
       FieldSize -> 12,
       Background -> Blue] & /@ menuData;


   CreatePalette[
    Column[Flatten[{
       Button["Close", NotebookClose[ButtonNotebook[]],
        BaseStyle -> {FontSize -> 10, FontFamily -> "Helvetica",
          FontColor -> RGBColor[.4, 0, 0]}, Appearance -> "Palette"],
       menus}]],
    WindowSize -> {All, 350},
    WindowElements -> {"VerticalScrollBar", "StatusArea"},
    WindowTitle -> "Load " <> root,
    WindowMargins -> {{Automatic, 10}, {Automatic, 5}}]

   ];

StandardPackagesPalette[] := StandardPackagesPalette["Packages"];




On Jun 9, 5:44 am, Donald DuBois <don... at comcast.net> wrote:
> > 1) Is there anyplace in the documentation where one
> > can find all the
> > 'standard packages' listed together in one place like
> > they were in the 5.2
> > Help Browser?
>
> > 2) Is there anyplace in the documentation that tell
> > how to construct the new
> > style documentation, how to get a documentation style
> > sheet, where to put
> > the documentation, and how to make sure that users
> > have access to it?
>
> > --
> > David Park
> > djmp... at comcast.net
> >http://home.comcast.net/~djmpark/
>
> I would very much like to know the answer to Question 2 but can only help, perhaps, with Question 1.
>
> The following function  will list all the packages
> in a single grid (thanks to Harry Chalkin, WRI, for this):
>
> Grid[Partition[
>   SetDirectory[
>    ToFileName[{$InstallationDirectory, "AddOns", "Packages"}]];
>   FileNames[], 2], Frame -> All]
>
> To get the function names in a Package define the
> following function:
>
> GetNames[pack_String] := (Needs[StringJoin[pack, "`"]];
>   Names[StringJoin[pack, "`*"]])
>
> Example of use:
>
> GetNames["ANOVA"]
>
> results in:
>
> {"ANOVA", "Bonferroni", "CellMeans", "Duncan", "Dunnett", \
> "PostTests", "StudentNewmanKeuls", "Tukey"}
>
> I have found it useful to go directly to some of the folders for documentation on a particular package.
> For instance, (on a Windows Ver. 6 machine), documentation (Guides and Tutorials)
> can be found on the StatisticalPlots Package at
>
> C:\Program Files\Wolfram Research\Mathematica\6.0\Documentation\English\Packages\StatisticalPlots\Do cumentation\English
>
> The root folder for documentation on all the packages
> is at:
>
> C:\Program Files\Wolfram Research\Mathematica\6.0\Documentation\English\Packages
>
> and then it's possible to go from there to a given package.
>
> There are no "Standard Packages" as such.  They seem to fall into 4 categories: "Applications", "ExraPackages", "Legacy Packages" and "Packages".
>
> This structure shows up in the following path  (Window machine, Ver. 6):
>
> C:\Program Files\Wolfram Research\Mathematica\6.0\AddOns
>
> Regards,
>
> Don DuBois




  • Prev by Date: Re: Re: Re: Re: Re: v6: still no multiple undo?
  • Next by Date: Re: Simplify 0/0 to 1?
  • Previous by thread: Re: 6.0 Standard Packages?, New Style Documentation?
  • Next by thread: Re: Re: 6.0 Standard Packages?, New Style Documentation?