8
expr = 3 - Sqrt[2];
Use ToNumberField to convert the expression to an AlgebraicNumber
expr2 = expr // ToNumberField
The short form display of the AlgebraicNumber is similar to that of Root
RootReduce will convert the expression back to the radical representation.
expr2 // RootReduce
(* 3 - Sqrt[2] *)
7
It's just no longer the default. You can turn it back on via CurrentValue[$FrontEnd, "EvaluationQueueActions"] = Append[CurrentValue[$FrontEnd, "EvaluationQueueActions"], "Icon"].
6
The functionality is controlled by setting the cell option on the desired cell(s):
CodeAssistOptions -> {"AutoDetectHyperlinks" -> False} (* Off *)
CodeAssistOptions -> {"AutoDetectHyperlinks" -> True} (* On *)
The option can also be applied globally by setting it for the Front End:
SetOptions[$FrontEndSession,
...
6
By default Mathematica uses $HistoryLength = Infinity, so it stores every output expression since you started Mathematica in the data associated with the System symbol Out. If a lot of your output takes a lot of memory, you can easily slow down your computer. Instead, you could use this
$HistoryLength = 2;
Then Mathematica will only remember the two most ...
5
You can discover the polynomial with MinimalPolynomial:
p = MinimalPolynomial[3 - Sqrt[2]]
(* 7 - 6 #1 + #1^2 & *)
p[x]
(* 7 - 6 x + x^2 *)
Root[p, 1]
(* 3 - Sqrt[2] *)
From the documentation of Root:
For linear and quadratic polynomials f[x], Root[f,k] is automatically reduced to explicit rational or radical form.
3
In V12.0, I get graphics to be broken across pages if I set their ImageSize to be wider than the page width, even though PageBreakWithin is set to False. For instance, it happens with ImageSize -> 1000 for me, which setting is the same as in the OP.
Try ImageSize -> Full if you want the graphics as wide as the page.
[In V12.1/12.2, the graphics are ...
2
The past few weeks I've gotten into customizing my Mathematica keybindings so I figured I'd share them and share what I've learned. This all works as stated on my system ($Version is 12.1.1 for Linux x86 (64-bit) (June 19, 2020)) but I have not tested these elsewhere so YMMV.
If you like to use input aliases and find hitting Esc twice inconvienent then add ...
2
You can wrap HoldForm only around Root.
Edit
p = MinimalPolynomial[ro = 3 - Sqrt[2]];
a = Select[Range[10], Root[p, #] == ro &][[1]] // Quiet;
hf = HoldForm[Root][p, a]
(* Root(#1^2-6 #1+7&,1) *)
hf // ReleaseHold
(* 3 - Sqrt[2] *)
1
We have two questions: 1) How to make a PDF from a grid of graphics (output of Plot), and 2) How to make a PDF for a whole notebook.
For the second question... Here's a way to make a PDF of a whole notebook including inputs and outputs. NotebookPrint saves a print-ready form of a notebook to a file in the format indicated by a file extension. First, open a ...
1
On an Apple, simply printing to a file works.
Why not print to a file, and then see what your print settings are set at?
Can you print to a printer?
UPDATE (see comments below)
Please try updating to Mathematica Version 12.1 or 12.2.
1
It sounds like your use-case was similar to mine, where you just need certain settings to be always applied to a single output cell, and be re-applied e.g. if that cell is deleted and re-created.
Note that GeneratedCellStyles can be applied directly to a single cell programatically, without touching a single stylesheet:
SetOptions[EvaluationCell[],
"...
1
Here are two other alternatives:
SetOptions[EvaluationCell[],
"GeneratedCellStyles" -> {"Output" -> {"Output", CellOpen -> False}}]
And:
Dynamic[
SetOptions[EvaluationCell[], CellOpen -> False];
myHiddenContent
]
You could even make a one-shot, so that the cell initially displays unopened, but the user has the ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
front-end × 1607notebooks × 313
customization × 171
bugs × 142
cells × 128
dynamic × 125
gui-construction × 90
stylesheet × 84
keyboard × 80
options × 76
formatting × 74
graphics × 62
output-formatting × 46
evaluation × 42
boxes × 42
undocumented × 41
windows × 40
autocomplete × 37
kernel × 36
performance-tuning × 34
fonts × 34
syntax-highlighting × 34
programming × 33
export × 32
style × 32