# Tag Info

0

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

4

To add a cell below is trivial because we have the built in option ReturnCreatesNewCell which can be set to True for a given cell style. To add a cell above when you hit Return you can use CellEventActions like this: Cell[StyleData["ToDo", StyleDefinitions -> StyleData["Text"]], CellDingbat->StyleBox["\[FilledSmallSquare]", Alignment -> Baseline, ...

7

Yes! It is possible, although it takes some spelunking. Upon some searching with Names, I came across three relevant contexts where the predictive interface functions live: PredictiveInterface, PredictiveInterfaceDump, and Predictions`. This last one is where the action happens. Luckily, the symbols were only ReadProtected, and their source code was ...

1

It is possible to change the style used for output with this Front End option: "GeneratedCellStyles" -> {"Output" -> (* style *)} One can change this style as part of the output formatting routine using $PrePrint, like this: defaultOut[] := SetOptions[EvaluationNotebook[], "GeneratedCellStyles" -> {"Output" -> "Output"}] altOut[] := ... 3 For Graphics output specifically there is a nice approach using$DisplayFunction: (* create a new output style -- overwrites existing custom style sheet *) SetOptions[EvaluationNotebook[], StyleDefinitions -> Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]], Cell[StyleData["altOutput"], TextAlignment -> Center]}, ...

3

An alternative is to use \$Post to post-process output automatically as it is generated. For instance, the following outputs anything with the head Graphics in a style "centeredOutput", which could be defined in whatever manner one wants. centerGraphics[g_Graphics | g_Graphics3D] := CellPrint@ExpressionCell[g, "centeredOutput"]; centerGraphics[x_] := x; ...

5

If you want to do it all programmatically you could import the notebook containing the cells with graphics and change the cell style for cells containing graphics: changeStyle[file_String, newStyle_String] := Module[{nb = NotebookOpen[file], nb1}, nb1 = NotebookGet[nb]; NotebookClose[nb]; nb = nb1 /. (p1 : Cell[BoxData[GraphicsBox[_, ___]], ...

Top 50 recent answers are included