Tag Info

Hot answers tagged

33

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


19

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

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


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: MathLink`CallFrontEnd[FrontEnd`ResetMenusPacket[{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

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]


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

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

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

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

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


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


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.


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


2

Did you try opening the palette, going to the options inspector, selecting it and in Windows properties, setting the location?


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


2

Why not myApplication/FrontEnd/Palettes and myApplication/FrontEnd/StyleSheets (where myApplication is the name of the aplication)? Many applications in my $UserBaseDirectory <> "Applications" directory use that.


2

If presentation / formatting is a priority then I would use a program that excels in that and export / import the Mathematica results I need. See this Wolfram note: http://library.wolfram.com/howtos/exporting/


2

In the Option Inspector there is the option Notebook Options >> Window Properties >> WindowFloating. If I make a palette editable and set this option to False, the palette loses the behavior you want to suppress.



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