Skip to main content
9 votes
Accepted

How to condition all cells of a notebook to a specific SeedRandom?

SetOptions[EvaluationNotebook[], CellProlog :> (SeedRandom[45])] Then before evaluating any cell SeedRandom[45] is evaluated....
azerbajdzan's user avatar
  • 18.8k
6 votes
Accepted

Implementation of rainbow style for multiple cells in a notebook

Is this what you are after? ...
Kuba's user avatar
  • 137k
4 votes
Accepted

Setting WholeCellGroupOpener only for some cells

WholeCellGroupOpener can be set per cell, not only per whole notebook. Therefore, you can set it only to the cells you want by finding them with ...
Domen's user avatar
  • 26.4k
3 votes
Accepted

Notebook key shortcut to move current cell group up/down/in/out?

I dug up my old custom key events answer to get this to work, but here's the real deal, a key event to move your cell up by one which also has protection against being at the top of the notebook. ...
b3m2a1's user avatar
  • 46.9k
2 votes
Accepted

Stylesheet that assigns CellIDs as CellTags

I would add: Initialization :> SetOptions[EvaluationCell[], CellTags -> ToString @ CurrentValue[EvaluationCell[], CellID]] to your cell style.
Carl Woll's user avatar
  • 131k
2 votes
Accepted

Coloring text in Mathematica

Here is an image exemplifying my comment:
Anton Antonov's user avatar
2 votes

Export Notebook as Text (in 13.3 &14)

I recently found myself in a similar situation where I wanted text-only but structured files generated from my notebooks for source control and revision tracking. I could not find an optimal solution, ...
MarcoB's user avatar
  • 67.3k
2 votes

How to refer to result of cell above the current cell?

All of the answers above assume that the output can be once again be made into a Mathematica statement by relying on the function ToExpression, which is not always ...
José Ferreira's user avatar
1 vote
Accepted

Close all subgroups, programmatically

This seems to work: SelectionMove[InputNotebook[], All, Notebook]; FrontEndTokenExecute["SelectionCloseAllGroups"]
lericr's user avatar
  • 29.1k
1 vote

How to protect generated inline cells from editing?

This is not an answer. It is just too much code for a comment. The following code generates a cell, without any subcells. This cell has an Editable -> False ...
Gustavo Delfino's user avatar
1 vote

How to force GeneratedCell -> True for non-editable cells?

Addressing a comment: I have Graphics that a user can draw on. But it can be anything, this problem happens with any control if a key is pressed attempting to edit non-editable content of a cell, ...
Kuba's user avatar
  • 137k
1 vote

How to write code realizing this manual operation?

N[Round[E, 10^-15], 15] (* 2.71828182845905 *) You can copy it with CTRL+C or by code ...
azerbajdzan's user avatar
  • 18.8k
1 vote
Accepted

How to clear all definitions/symbols declared in all sections with the given tag?

...
Athanasios Paraskevopoulos's user avatar
1 vote
Accepted

Print into different cell groups inside module

You can observe how grouping is implemented if you do it manually (under the menu Cell > Grouping > Group Cells), and then inspect the cell expressions (...
Domen's user avatar
  • 26.4k
1 vote

Overlay two cells without changing size

A start: ...
David G. Stork's user avatar
1 vote

Is there a way to construct more/deeper layer of subsection?

I could not figure out how the tab/backspace thing from Kuba's answer is working. But in Mathematica 13.2 you can click the plus that appears once you click in an empty cell, then choose Other style ...
infinitezero's user avatar
  • 1,419

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