# Tag Info

6

What really makes Dialog a model dialog is: WindowFrame -> "ModalDialog" (*or*) WindowFrame -> "MovableModalDialog" So be careful when changing WindowFrame with the expectation that your dialog will remain modal. Funny proof is that the following: CreateDialog[DefaultButton[], WindowFrame -> "ModalDialog", Modal -> False] is a modal ...

6

Somehow I've overlooked this topic on MathGroup earlier: $CellContext Here's what John Fultz said:$CellContext is a symbolic placeholder in cell expressions (most typically Dynamic expressions inside of Cell) which indicates that the ambient context as defined by the CellContext option should be used (which allows you to wall off notebooks, cell ...

4

This points out that Legended is typeset instead of evaluated in the kernel evaluation time. The evidence is in that InputForm[p] still contains two Legendeds and the graphics only one. This is what you need: Show[ListPlot[Range[10], PlotLegends -> {"a"}, PlotStyle -> Red], ListPlot[Range[10] + 2, PlotLegends -> {"b"}, PlotStyle -> Blue]] ...

4

Option hierarchy Quoting John Fultz: Options work on an inheritance model. ... It all starts someplace. That would be the hard-coded option values in the front end C code. The root of the inheritance of options. Then one typically thinks of $FrontEnd as being the next level down, but there's another level in between. That is ... 4 This is a bug in the Mathematica FrontEnd that appears on systems running Mac OS X 10.10. The cause is a change, beginning with Yosemite, in the behavior of the API used to draw the popup arrow. The FrontEnd bug will be fixed in an upcoming release. 4 I have been thinking recently a lot about this mysterious$CellContext, that turns up when we convert a cell with interactivity (such as Button, Slider, DynamicModule, Dynamic) to a cell expression. Just as Kuba, I found that there is not much documentation on this topic, but in MathGroup and SE there are some very valuable comments and remarks, not in the ...

4

While I was working on alternative TeX export, I had similar requirement. I wanted to export annotated Mathematica code to TeX, with annotations reflecting front ends syntax highlighting. Since I couldn't find a way to use front end itself to do it, I decided to write my own package. My SyntaxAnnotations package is now available on GitHub. It works by ...

4

You could use a Palette: CreatePalette @ PasteButton @ Indexed[\[SelectionPlaceholder], \[Placeholder]] Or an Input Alias: AppendTo[ CurrentValue[$FrontEndSession, "InputAliases"], "idx" -> TemplateBox[{"\[SelectionPlaceholder]", "\[Placeholder]"}, "IndexedDefault"] ] For a system-wide keyboard shortcut you can copy KeyEventTranslations.tr from ... 3 I also consider this an inacceptable bug. Nevertheless I wanted to share a workaround which I think avoids the problem but is unfortunately a lot of effort to add to more complicated cases: CreateDocument[ DynamicModule[{x={500,500},lastValue}, Framed[ Slider[Dynamic[x[[1]]],{400,600}], ImageSize->Dynamic[ ... 3 Try running this for autosaving your notebook at fixed periods. At least this way you will only lose a few minutes of work if you get another crash. save=DynamicModule[{autosaveTime = 1, nb = EvaluationNotebook[]}, Row[{ "Autosave every", Spacer[5], Row[{ InputField[Dynamic[autosaveTime], Number, FieldSize -> 1.5], Spacer[3], ... 3 This code is far from being complete, but since I promised to show something this weekend, I decided to publish it anyway. It provides functions for converting Mathematica cells to TeX code compatible with mmacells package. Import["https://raw.githubusercontent.com/jkuczm/MathematicaOptionsUtilities/master/OptionsUtilities/OptionsUtilities.m"] ... 2 It seems indeed that v10 (OSX) is not anymore able to display all the fonts typefaces available on the system, whereas v9 is. You can easily check that using directly the font panel (Menu : "Format -> "Show Fonts ..."). Select some text in the notebook, and try to modify its FontFamily and Typeface. For example choose the font family "Helvetica Neue" and ... 2 This might be of help:$OutputForms is a list of the formatting functions that get stripped off when wrapped around the output. $OutputForms= ... 2 Here is the answer given by Rolf Mertig that includes many additional shortcuts. One of them Ctrl+T, evaluates whatever is stored in joker.m file (invoked by Ctrl+R). There are already two examples, coincidentally the second one is exactly what you need! Ok, so briefly: Get["http://www.mertig.com/shortcuts.m"] reset Mathematica use Ctrl+R to open ... 2 This only happens if you have the Suggestions Bar enabled. Turn that damn thing off already! It is the source of unending grief. (Problem confirmed in 10.0.2 under Windows.) 2 From the Notation.m package: AutoLoadNotationPalette is a boolean variable. If False then the Notation palette will not be loaded when the Notation package is loaded. If the value is undefined or True the Notation palette will be loaded when the Notation package loads. Other package designers can set this variable outside of the Notation package through ... 2 I achieved my goal with this code in MenuSetup.tr. Here is copy-cell-style: MenuItem["Copy Cell Style", FrontEndExecute[{FrontEndSelectionMove[FrontEndEvaluationNotebook[], All, FrontEndEvaluationCell], KernelExecute[$mystyle = FrontEndExecute[FrontEndNotebookRead[FrontEndEvaluationNotebook[]]]; ...

1

Another workaround, which allows to still have slider-like input, but is currently a bit inconvenient (ideas (with code) to improve are welcome!), is making a custom control. I've taken this answer as a starting example and reworked it to make it function when LocatorPane and the like don't work. It appears that MousePosition and EventHandler still appear ...

1

One way to do what it seems me you would like to is to use the InputAliases function by evaluating in your notebook the following expression: SetOptions[InputNotebook[], InputAliases -> {"ind" -> "Evaluate[Indexed[\[SelectionPlaceholder],\[Placeholder]]]"}] After that as soon as you type Esc+ind+Esc placeholders to type in an indexed ...

1

The following worked for me. Needs["Notation"] findNotationPalette[nb_] := If[Options[nb, WindowTitle] == {WindowTitle -> "Notation Palette"}, nb, Null] closeNotationPalette[] := Module[{notationNB}, notationNB = Cases[findNotationPalette /@ Notebooks[], _NotebookObject]; If[Length @ notationNB == 1, ...

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