Tag Info

Hot answers tagged

8

The reason is that you have empty history because you set $HistoryLength = 0 (as you confirm in the comments). I recommend setting $HistoryLength to be at least 3 in order to get the [Show Full Output] button working in the most practical cases.


7

Mathematica does it internally by using BoxForm`ArrangeSummaryBox, which is quite straightforward to figure out: MakeBoxes[obj_MyObject, fmt_] ^:= Module[{o = List @@ obj, shown, hidden, icon = Graphics[{Blue, Circle[]}, ImageSize -> 70]}, shown = {{ BoxForm`MakeSummaryItem[{"Name: ", "Name" /. o /. "Name" -> Missing[]}, fmt], ...


7

The dimming is controlled by the option PrivateCellOptions->{"EvaluationUnmatchedStyle"}. It must be applied at the cell level, but this is easy to do in your example by using CellPrint with the "Print" style to match what Print does. CellPrint@ ExpressionCell[g, "Print", PrivateCellOptions -> {"EvaluationUnmatchedStyle" -> {}}]


7

Mathematica 10 is not high-DPI-aware on Windows and so Windows renders it at the native resolution and then scales it by a factor of 2 by default to make it readable. Once Mathematica supports high-DPI displays in Windows, they will be able to properly render text and graphics that aren't blurry. If you're running Windows 8.1, you can disable this default ...


4

This infinite evaluation is the result of "cross-linking" the two Dynamic expressions due to the failure to localize your Symbols with DynamicModule, e.g.: DynamicModule[{circle, circle1, circlebase, fin, circlerolled}, Manipulate[ circle = ParametricPlot3D[{Sin[x], Cos[x], 0}, {x, -Pi, Pi}, PerformanceGoal -> "Quality"]; circle1 = ...


3

Ok, let's open new package File -> New -> Package. It was second on my list of Notebooks[]. So: package = Notebooks[][[2]] This is a notebook as any other, it just has different stylesheet ("Package.nb") and we can modify it as any other: SetOptions[ package, { StyleDefinitions -> Notebook[{ Cell[StyleData[StyleDefinitions ...


3

I don't find CellInsertionMenu as a handy place for that. I'd go with one of others suggestions. But let me answer your question anyway. To not mess with $InsallationDirectory let's copy text file where this cell definition is stored to $UserBaseDirectory: CopyFile @@ ( FileNameJoin[{#, "SystemFiles", "FrontEnd", "TextResources", "MiscExpressions.tr"} ...


2

Perhaps something like: Lastt@Reap[For[j = 1, j <= 10, j++,Print[Sow@j]]]


2

Let's say those cells are selected and the parent notebook is nb, you can do something like: RawBoxes /@ NotebookRead[SelectedCells@nb][[;; , 1, 1]]


2

Here's a quick&dirty&buggy solution for your two wishes, although I strongly suggest you to do you works the way as the notebook interface designed to. Cls := (SelectionMove[InputNotebook[], All, Notebook]; FrontEndExecute[FrontEndToken["Clear"]]); $Post = (If[Head@$outputNB == Symbol, $outputNB = CreateNotebook[]]; If[# === Null, 1;, ...


2

Your assumptions are most probably wrong, it seems that this function is meant to change CellStyle. e.g. use this code to convert Input cells to Title cells in current notebook: ( SelectionMove[#, All, Cell]; MathLink`CallFrontEnd[FrontEnd`SelectionSetStyle[#, "Title"]] ) & /@ Cells[CellStyle -> "Input"] Used here: Set the style of a cell ...


2

I don't know if any of them can be callled documented but I know three ways to do this: mentioned above: FrontEndToken way: ( SelectionMove[#, All, Cell]; FrontEndTokenExecute[EvaluationNotebook[], "Style", "Title"] ) & /@ Cells[CellStyle -> "Section"] or SelectionSetStyle way: ( SelectionMove[#, All, Cell]; ...


2

Just for something different, and given you seem to want the values of the print cells, tmp = NotebookGet[EvaluationNotebook[]]; Cases[tmp, Cell[BoxData[p_], "Print", ___] :> p, \[Infinity]] If you have other print cells that you do not want in the list, i.e. non integers, then you can obviously add some tests.


2

Rough approach: Tooltip resources are stored in FileNameJoin[{ $InstallationDirectory, "SystemFiles", "FrontEnd", "TextResources", "ToolTip.tr"}] In order to not mess with installation directory you can copy this file to $UserBaseDirectory/SystemFiles... and replace labels you want. For example: @@resource ToolTipCut Cut (replace this line ...


1

There are some other interesting aspects with this strange behaviour observed by Kuba. LinkSnooper shows a bit more. When the option UpdateInterval is used in a Dynamic expression, the clock of the kernel is used. Indeed, each second the kernel sends a message to the frontend, and the frontend starts an update procedure. So what happens when we close the ...


1

I have no reputation to post this only as a comment, but running your code in Debian with Mathematica 10.0.2 creates the notebook with its top left corner exactly at the mouse position (tested with multiple monitors), not shited as in your image.


1

If the results you wish to collect are all generated by Print, then you can use @Kuba's line in combination with NotebookFind: NotebookFind[EvaluationNotebook[], "Print", All, CellStyle]; printresults = RawBoxes /@ NotebookRead[SelectedCells[]][[;; , 1, 1]];


1

You may consider moving the variables used for the dynamic clock into a dedicated context Dynamic[{clock`d, clock`h, clock`m, clock`s} = List @@ DateDifference[Now, DateObject[{2015, 5, 18}], {"Day", "Hour", "Minute", "Second"}][[1]]; Grid[Transpose@{{"d", clock`d}, {"h", clock`h}, {"m", clock`m}, {"s", Round@clock`s}}, Alignment ...



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