# Tag Info

29

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 ...

21

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

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 ...

14

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 ...

14

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[ ...

13

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

12

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

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 ...

11

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 ...

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 ...

7

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.

6

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 ...

6

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 ...

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: ...

4

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 ...

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

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], ...

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 ...

3

As you already have the selection set to the cell and NotebookFind returns that selection, you could just use CurrentValue on it as here: PaletteNotebook[ Button[Style["Blog it", 12, FontFamily -> "Times"], Module[{ nb = InputNotebook[], out = NotebookCreate[], retval }, SelectionMove[nb, Before, Notebook]; retval = ...

3

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_ ...

3

John Fultz posted an answer to this question here. Apparently, in this context, both ButtonNotebook and EvaluationNotebook are identical. The former is kept around for legacy purposes, but the latter is preferable because it is applicable in places other than in buttons.

2

I think this is a bug in the pasting which is attempting to be smart about what to paste, since in the case of pasting into a cell you actually write the box expressions, while when you are working with the cell expression you want the input-form inserted. In any case, this seems to work in both cases: CreatePalette[ Button["Font Color", ...

1

Here is a button that will let you toggle between Editable True/False and set the background to red. You should be able to take this and make another button for initialization. CreatePalette[{ Button["Editable", SelectionMove[InputNotebook[], All, Cell]; If[Options[NotebookSelection[InputNotebook[]], Editable][[1, 2]] === True, ...

1

I'm always suspicious of code using For, so I rewrote your code in a more functional way. It seems to wrong fine. Module[{tags, buttons}, tags = NotebookTools`NotebookCellTags[InputNotebook[]]; buttons = Button[#, NotebookFind[InputNotebook[], #, All, CellTags, AutoScroll -> True]] & /@ tags; CreatePalette[buttons];] I had two cells in ...

1

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} = ...

1

On Mac OS X, drag and drop between apps can work like this. Say you want to drag the Mathematica SE logo from Safari to a Mathematica palette: 1: In Safari, start dragging, click and hold. Other apps may be hidden at this point: 2: While holding the mouse button, use Command-Tab to switch to another app, ie Mathematica. Mathematica returns to the ...

1

Finally I realized what to do: simply delete the MenuPosition expression in the Internal cache information section of the palette notebook. Now it appears in alphabetically correct place among all the other normal, 3rd-part palettes (none of which include a MenuPosition setting). I was misled, by the original form of the palette as distributed by the ...

1

Unfortunately, on my Macbook here I cannot reproduce what you are describing, but you write I feel reluctant to find visually where they are in the display. Did you know, that you can in MacOSX with Ctrl+F6 switch periodically through all opened Panels? These are not the Windows, only the Palettes. Maybe you can prevent this issue by pressing Ctrl+F6 ...

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