Re: a tutorial finder palette
- To: mathgroup at smc.vnet.net
- Subject: [mg76118] Re: a tutorial finder palette
- From: David Reiss <dbreiss at gmail.com>
- Date: Wed, 16 May 2007 05:40:40 -0400 (EDT)
- References: <1128F500-2F9A-42BC-A25D-7BECDCC7BFE9@EARTHLINK.NET>
Here is a bit of a twist on this using slightly higher level version 6
constructs. (The Hue[Random[]] is just for fun and variety...):
CreateDocument@PaletteNotebook[
Grid[Partition[
(Button[
StringReplace[#1, {"tutorial/" -> "", "Overview" -> "",
"guide/" -> "", z_?UpperCaseQ :> " " <> z}],
Module[{nb},
nb = CreateDocument[TextCell[#, "Input"], Visible -> False];
SelectionMove[nb, Before, Notebook];
SelectionMove[nb, Next, CellContents];
FrontEndExecute[FrontEndToken[nb, "SelectionHelpDialog"]];
FrontEndExecute[FrontEndToken[nb, "Close"]]],
Evaluator -> Automatic,
Appearance -> "Palette",
BaseStyle -> {FontSize -> 9, FontFamily -> "Helvetica", Bold,
ShowStringCharacters -> False},
ImageSize -> Full,
Background -> Hue[Random[]]] &) /@ tutnames, 1
],
Spacings -> {0, 0}]
]
For a narrower palette use something like
ImageSize -> 130
--David
http://scientificarts.com/worklife/
On May 15, 5:37 am, Selwyn Hollis <sh2.7... at earthlink.net> wrote:
> Seems that the navigability of the new Documentation Center leaves a
> couple of things to be desired, in particular a single index of all
> the tutorial material. Here's something that might be useful for the
> time being. It creates a palette with buttons that take you straight
> to many of the tutorial overviews in the new help system. All
> comments, suggestions, and modifications are welcome.
>
> - Selwyn Hollis
>
> tutnames = {
> "tutorial/UsingTheMathematicaSystemOverview",
> "tutorial/NumbersOverview",
> "tutorial/ExpressionsOverview",
> "tutorial/TextualInputAndOutputOverview",
> "tutorial/BuildingUpCalculationsOverview",
> "tutorial/FunctionsAndProgramsOverview",
> "tutorial/PatternsAndTransformationRules",
> "tutorial/StringsAndCharactersOverview",
> "tutorial/ModularityAndTheNamingOfThingsOverview",
> "tutorial/AlgebraicManipulationOverview",
> "tutorial/SymbolicMathematicsOverview",
> "tutorial/ListsOverview",
> "tutorial/MathematicalFunctionsOverview",
> "tutorial/NumericalMathematicsOverview",
> "tutorial/NumericalCalculationsOverview",
> "tutorial/NumericalOperationsOnDataOverview",
> "tutorial/NumericalOperationsOnFunctionsOverview",
> "tutorial/FunctionalOperationsOverview",
> "tutorial/GraphicsAndSoundOverview",
> "tutorial/TheStructureOfGraphicsAndSoundOverview",
> "tutorial/ManipulatingNotebooksOverview",
> "guide/FrontEndTokens",
> "tutorial/FilesAndExternalOperationsOverview"};
> CellPrint[
> Cell[BoxData[
> GridBox[({ButtonBox[
> StringReplace[#1, {"tutorial/" -> "", "Overview" -> "",
> "guide/" -> ""}], ButtonData -> #1,
> ButtonFunction :> (Module[{nb}, nb =
> CreateDocument[#2,
> Saveable -> False, WindowSize -> {1, 1},
> WindowMargins -> {{Automatic, 0}, {Automatic, 0}},
> WindowFrame -> Frameless];
> SelectionMove[nb, Next, CellContents];
> FrontEndExecute[FrontEndToken["SelectionHelpDialog"]];
> FrontEndExecute[FrontEndToken["Close"]]] &),
> Evaluator -> Automatic]} &) /@ tutnames]],
> ButtonBoxOptions -> {BaseStyle -> {FontSize -> 10,
> FontFamily -> "Arial", Bold}, Background -> RGBColor[1, 0.96,
> 0.87]},
> GridBoxOptions -> {RowSpacings -> 0}]]