# Tag Info

34

For this purpose, I wrote a small Symbol Information Palette. This palette let's you quickly look up usages, options and attributes of symbols and was tested on Mac OSX and Linux. Installation The source code is hosted on my GitHub site but to preview or install the palette you only have to evaluate this: Get["http://goo.gl/QPywk"] The link is just ...

23

All palette state (i.e., variables which affect the palette and should be remembered between sessions) should be vectored through the palette's TaggingRules option, and its initialization should be done in the palette's NotebookDynamicExpression option. That, plus context isolation of any kernel functions you need to define should solve all of the points ...

22

as J.M. mentions, the Workbench is an Eclipse plug-in (and is available as such). Now, to display all files in some directory, you can do this: SetDirectory["~/Documents/Projects/other/playing"] (this is an arbitrarily selected directory on my machine). Then define doSomething[fname_] := CreateWindow[ DialogNotebook[ { TextCell[fname], ...

17

This is not documented but I hope it gets better supported in future versions: TableView[] Since the use of TableView is not immediately apparent:

17

I used to think that Mathematica was an incorrigible memory hog until I visited this site and discovered the wonders of $HistoryLength. This seems to be a common complaint that is easily remedied. Below is a scattering of buttons that show the current value and allow it to be easily changed: historyLengthButtons := Grid[{Dynamic[Button[#,$HistoryLength = ...

15

This is inspired by Rolfs answer, but uses the "Copy As Input" functionality as the starting point. My impression is that using that approach will keep more of the original formatting (concerning linebreaks) but it still isn't perfect in that concern. To see the problems, I didn't change what it does to the its own code (it added some empty lines). Other ...

15

Copied from applying the palette on its own source code (kind of self-referential button -:) ): CreatePalette[ {"Copy In/Out as String", Button["Select Notebook and click", (SelectionMove[CreateDocument[#1], All, Notebook] & ) [StringJoin @@ Riffle[ Select[ Partition[ ...

15

You can simply assign the content of the palette to the docked cells, however this won't give any nice results for palettes that where not designed to be used as such: For instance, first open up a palette, I chose Basic Math input, then run plt = Notebooks[][[1]] CreateWindow[DockedCells -> NotebookGet[plt][[1]]] What you then end up with is a ...

14

Mathematica already has some of these features: e.g Regarding your comment about the appearance when you do this in a text cell. Here is what it looks like for me on a Mac: So the font is Courier which, unless you have reconfigured your system, is not the default font for text cells. You can fix this by changing the grid box options: To do this -- in ...

12

I don't know anything about mathStatica, so I can't comment on specifically what it's doing. But I can comment on the various moving parts of the system. The init.m file is created by the paclet manager. It must be that the mathStatica palette is part of a paclet which is under active management by the paclet manager. The paclet manager, as part of its ...

10

The following code should fix the problem: CreatePalette[Pane[InputField["Enter a string"]], WindowFloating -> False, WindowClickSelect -> True]; But as we figured out it is not! I read all available information about WindowClickSelect and WindowFloating options in Mathematica documentation. I didn't find any notices that we can't use the options ...

8

You can use the following command to programmatically refresh the contents of the menus in Mathematica: MathLinkCallFrontEnd[FrontEndResetMenusPacket[{Automatic, Automatic}]] This was mentioned by John Fultz in this MathGroup post as well as this answer.

8

In this answer I posted a large stock of undocumented FE tokens. Per your comment under the question, the required token is in that list: FrontEndTokenExecute["OpenFromPalettesMenu", notebookFileName]

8

mathStatica does not alter, nor seek to alter, the MenuSortingValue. In fact, mathStatica does not alter or seek to alter, in any way, how or where the mathStatica palette is listed in the palette menu... this is left entirely to default Mathematica behaviour. The reason the mathStatica palette appears out of alphabetical order in the Palettes menu seems to ...

8

Here is a bare bones tool to remove a palette and place it in a new directory. You can modify to delete the file entirely if you wish. You can modify the sources. There is an internal FE command to update the palette menu but I do not have that. You'll have to restart Mathematica. DynamicModule[{new, source1 = FileNameJoin[{$BaseDirectory, ... 7 To begin with, if you use menu: Palettes > Install Palette... the palette should open in the place it last appeared every time you start Mathematica. I always have two custom palettes visible when I start Mathematica: A palette to open one of dozen Notebooks I use frequently Szabolcs's Paste Tabular Data These admittedly do not "dock" if I move them ... 6 You could generate the palette from code in a separate notebook, and have the generated palette use a unique context by setting CellContext -> Notebook when creating the palette notebook. I think this should help with items 2, 3, and 5. Example (there may be better ways..) CreateDocument[ {Cell[BoxData[MakeBoxes[x = 2]], "Input"]}, CellContext ... 6 WindowElements -> {"StatusArea"} CreatePalette[ PasteButton[ Style[StatusArea["\[Gamma]", "esc-g-esc"], FontFamily -> "Courier", 12], RawBoxes["\[Gamma]"], ImageSize -> {30, 20}], WindowStatusArea -> ":)", WindowElements -> {"StatusArea"}] Full answer: CreatePalette[ Table[With[{i = i}, ... 6 OK, I guess I found something myself while trying to circumvent RunScheduledTask. DynamicModule[{prog = False}, Column[{ Button[ "Do heavy work", prog = True; Pause[10]; prog = False, Method -> "Queued" ], Dynamic@If[prog, ProgressIndicator[Appearance -> "Percolate"], Invisible[ProgressIndicator[Appearance ... 6 I see two problems here. First, Initialization is not a known option for CreatePalette: Options[CreatePalette, Initialization] Options::optnf: Initialization is not a known option for CreatePalette. >> Second, even if it were your use of Rule rather than RuleDelayed means that your initalization code will only be evaluated when the palette is ... 5 I'm not sure if this is really the best solution as I don't know what causes the particular problem you are encountering, but it seems to work well enough as a quick fix. If you execute this code, clicking the button corresponding to the notebook that's gone out of bounds will make it jump to the mouse cursor so that you can move it to wherever you want it: ... 5 Using PasteButton with a matrix containing the desired matrix is one option. PasteButton["3x3 Matrix", MatrixForm@( { {\[Placeholder], \[Placeholder],\[Placeholder]}, {\[Placeholder], \[Placeholder],\[Placeholder]}, {\[Placeholder], \[Placeholder],\[Placeholder]} } )] PasteButton["1x3 Matrix", MatrixForm@( { {\[Placeholder], ... 5 Here you go: button[tok_][par_] := Button[par, FrontEndTokenExecute[tok, par]] Row /@ { button["FontFamily"] /@ {"Arial", "Bookman", "Times"}, button["FontColor"] /@ {Red, Green, Blue, Brown, Black, White}, button["FontSize"] /@ Range[10, 20, 2] } // Column // CreatePalette 5 I'm not sure if this is exactly what you need but this is what I've recently done to inform the user about ongoing calculation. Usage withProgressIndicator[proc, delay] Performs a proc, and when it lasts longer than delay (default 0), a progress indicator in dialog is created. It will be closed after finishing the proc. It should be run on Main Link, ... 4 This is actually something I am working on for real at the moment. This is what i have got so far: nb = NotebookOpen["path/to/notebook.nb"]; SelectionMove[nb, All, Notebook]; content = NotebookRead[nb]; NotebookDelete[nb]; For searching based on the number listed as the first tag: sorted = SortBy[content, Cases[#, HoldPattern[ Rule[CellTags, {x_ ... 4 Okay, new approach. My old answer is preserved below for reference. I was not aware of this before posting, but there is a MenuPosition option in the Options Inspector, and it does take effect. You will need to first check Editable so that you can edit the palette. Here is the active screen: In the header of a palette .nb file there is this ... 4 Manual approach: evaluate Notebooks[], and locate the palette in the resulting list. Then evaluate the following, with a suitable value of$i\$ filled in: SetOptions[Notebooks[][[i]], WindowMargins -> {{0, 0}, {0, 0}}]

4

I am on Windows and palettes go away just like you describe. It gets fixed by changing the default WindowFrame option away from "Palette" EDIT It seems that changing WindowFrame disables the window floating behaviour also when Mathematica has focus. So, this would be equivalent to setting WindowFloating to False. This last option would at least keep the ...

4

This is a possible solution that I came up with after looking at another answer by @Ragfield: Encoding format used by GraphicsData? I had to modify the function decodePICT in that post to cut out the leading zero bytes: DecodePDF[data_String] := Module[{slash, backslash, zero, LF, CR, decode, codes, len, i}, {slash, backslash, zero, LF, CR} = ...

4

Suppose you have configured kernels "Kernel1" and "Kernel2", then this just works: CreatePalette[test, Evaluator -> "Kernel1"] CreatePalette[test2, Evaluator -> "Kernel2"]

Only top voted, non community-wiki answers of a minimum length are eligible