Questions tagged [cells]

Questions about cells and functionality related to cell structures, or the notebook cell hierachy which serves to organize the information in a Mathematica notebooks. This includes questions related to properties and options for cells that determine the overall look and behavior of the notebook.

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

How can I Iconize the result of an evaluation so that it isn't overwritten when I repeat the evaluation?

I have a long calculation that produces a list of lists. I would like to be able to make changes in the calculation, and reevaluate it, and then be able to determine if the result is unchanged. I can ...
1
vote
0answers
66 views

Buggy EvaluationUnmatchedStyle for backgrounds with opacity

The EvaluationUnmatchedStyle option of PrivateCellOptions was introduced in v10, wherein any time input is changed, the corresponding output dims to signify that ...
3
votes
1answer
90 views

How to explicitly open or close cell group?

There is a "OpenCloseGroup" in FrontEndTokenExecute. It act like toggle. If the selected cell group is open, ...
3
votes
1answer
56 views

Have Button fire with both Kernel and FrontEnd

Here's some code which, when evaluated, types an expression in the cell below it: ...
0
votes
2answers
79 views

How to put the evaluated result in a text cell?

If I use the function Print, the result is not in a text cell. So I wonder If there's a function that I can use to put behind the function ...
1
vote
0answers
23 views

Deleting Cells in a notebook that is not the evaluation notebook

I use nb = CreateNotebook[] to create notebooks for processing messages. How do I delete anything that had been written previously when I start a new processing run?
0
votes
0answers
13 views

Sorting A Slideshow By Cell Tags

I have a slideshow that is tagged using CellTags. What I'm trying to do is reorder the presentation programmatically. Creating A Notebook I'm going to purposely generate a notebook where the slides ...
2
votes
1answer
65 views

Is it possible to substitute one style with another via Stylesheet?

When thinking on the question How to programmatically change CellStyle of all Cells from "Input" to "Code"? it crossed my mind that it may be possible to "intercept" ...
1
vote
0answers
20 views

Is it possible to insert a fixed-size Input Cell in a DockedCell toolbar that directs output if any to a specified Cell in same Notebook?

Ive been coding Mathematica for over a year but this language can do so much more than any other language hence beginners really do need a much longer gestation period. That is why this rarest of ...
5
votes
0answers
85 views

"Ungroup Cells" broken in 12.3 (Confirmed by WR ... it's a bug)

** Edit: Just got off the phone with WR. Only one other person called in about this bug (although they did call in 3 times). Looks like it won't be fixed anytime soon unless they get more requests ...
13
votes
1answer
180 views

How to create a general AttachedCell toolbar?

For example, when an image is displayed in the frontend, the image suggestion toolbar, which is an AttachedCell, pops up: It can can be found here, among other ...
9
votes
3answers
265 views

How to programmatically change CellStyle of all Cells from "Input" to "Code"?

I have a special notebook styled for only creating functions and their packages. I often lazily do Evaluate Notebook instead of finding and opening all cells I need ...
2
votes
0answers
36 views

How to automatically name a Wolfram Notebook after the first title line of code if present?

I have a goal of somehow using Wolfram Mathematica's Notebook object functionality to program an initialization cell that will automatically save and name a new file after a title line of code ...
5
votes
1answer
111 views

Avoiding Concave Polygons

In a vertex model, vertices in a lattice are modelled by a set of ODEs. A T1 transition is the following: when a certain edge becomes small enough (given a threshold), two cells stop being connected, ...
6
votes
1answer
293 views

A way to contract input in Mathematica

If I input a giant matrix in Mathematica, and it is contained in a cell, is there a way to contract it so that it uses up significantly less space in the notebook?
3
votes
2answers
74 views

Evaluation time for each evaluated cell (as a whole)

I have a Mathematica notebook that has a number of cells, and each cell has a number of code lines. Sometimes it takes long hours to finish evaluating each cell and I want to compare their evaluation ...
4
votes
0answers
47 views

Function for identifying wasteful cells (e.g. needless large graphics) - does this exist already?

I noticed that I have a bad habit of saving notebooks with huge graphics in them and it's starting to impact storage and load times a little much. I figured I could make a routine to point out the few ...
0
votes
0answers
38 views

How to display CellObjects as Cells in PopupWindow

I am attempting to use a celltag ("temp") to display an entire cell in a PopupWindow. To see what I am attempting to do, open a new notebook and evaluate the following: ...
2
votes
0answers
83 views

Realtime background blur

Is it possible to have partially transparent cells (attached or docked) with live background blur? Something like this: Here's what I've tried: ...
0
votes
0answers
58 views

Cell frame bugged?

I used to always have cell frames on as a general option, but then they became bugged for me a little while back, maybe with 12.0 or 12.1. When you have any expression that extends horizontally past ...
1
vote
0answers
24 views

how to navigate to the cell where a user-custom function is defined?

For a large notebook involving many custom functions, I often feel helpless in locating their definitions: there seems to lack an easy to locate the definition of a function. On the contrary, for ...
2
votes
1answer
42 views

CellPrint with grouping the original generating code

I'm creating a large number of cells within a document programmatically, for example: ...
0
votes
0answers
28 views

How to change default cell style of WSL files?

In *.wsl files when I create a new input cell as usual it creates a Code cell as can be seen by inspecting the underlying code: This is how ...
0
votes
0answers
30 views

Automate `select cell` and `evaluate selected cell`

Manually I can select a set of cells (or one grouped cell) and click evaluate cell My questions Is it possible to start this job ...
0
votes
1answer
60 views

Setting automatic dividers when merging groups

Imagine I have my code split into multiple sections, like so Suppose I now select all cells and merge them, getting Is it possible to automatic set a divider between the different code sections? I'm ...
1
vote
1answer
52 views

Deleting all outputs on Notebook close

Is is possible to set up a Mathematica notebook so that all outputs are automatically deleted when the notebook is closed? I was trying to look for some function like ...
3
votes
1answer
91 views

Write commands in a texteditor as a low-level notebook expression

I want to write a notebook file by myself. I use a text editor (such as Vim) to do that, for the purpose of having full control of my code I am writing, and to really understand what is in my .nb file ...
5
votes
1answer
55 views

Show group opener on Notebook startup

When I re-open a previously saved notebook in which a group of cells is expanded, the group opener sign does not appear. See, for example However when I collapse using the right-side group tracks and ...
3
votes
0answers
39 views

How to create a "DisplayFormulaNumbered" cell inside a "Text" cell

Is it possible to put a "DisplayFormulaNumbered" cell (containing just an equation) inside a larger outside cell (a "Text" cell with a thin frame)? See pic below for my desired ...
1
vote
1answer
39 views

Stylesheet that assigns CellIDs as CellTags

For a given notebook, I can turn on CellIDs by opening the notebook's stylesheet and adding the following code: ...
6
votes
1answer
142 views

How insert into Text cell chevron symbols used for Inline GroupOpener icons?

If in OptionInspector I select option "Inline" for Cell Options > Display Options > ShowGroupOpener for section-like cells, then when such a group is closed it shows an icon that is a ...
4
votes
1answer
83 views

Set a background color for several adjacent cells and "page"

I'm using a book style sheet but this question applies to the standard notebook interface as well. I'm writing a sequence of cells in different styles (text, equation, figure, figure caption, ...) in ...
0
votes
1answer
33 views

How to change style/content of cell that is programmatically generated, using a checkbox?

I am programmatically generating some cells that have a checkbox along with some text. The following code creates a button which when clicked, creates such cells. ...
1
vote
1answer
56 views

Check if two cells are identifcal

Is it possible to check whether two cells in a Mathematica notebook have exactly the same code? I'm comparing two bits of code that might be the same, but rather than eye-checking, I wonder if there ...
3
votes
0answers
69 views

Create "Python Code" cells using custom executable

In https://mathematica.stackexchange.com/a/155815/45020 it is explained how to run cells using a custom virtual environment. How can I quickly create a cell that is evaluated using this environment. ...
2
votes
1answer
36 views

How to generate Code cell including newlines

I want to programmatically create a "Code" style cell with commands separated by ; and a new line (from some list). ...
0
votes
1answer
40 views

Save data directly in a cell

How can I save a custom list of data in this style? I would like to save a large imported file in a cell without reading it again.
1
vote
1answer
48 views

How to hide a cell with multiple output?

i'm working on a presentation using a Mathematica notebook. I'd like to hide the code i wrote. I found this answer and red this guide. After 7 years from that first answer that hacky method is still ...
4
votes
1answer
69 views

How to preserve the Checkbox value after closing the notebook

I am trying to create a to-do list style for the stylesheet. The goal is to have a CellDingbat that is a check box. And after pressing enter, a new cell with a ...
2
votes
2answers
101 views

How to create an item list with a checkbox bullet head

Is there a way to replace the red dot bullet head in the Item style cell with a Checkbox[]? And when I press the "Enter&...
3
votes
1answer
46 views

Palette to copy and paste cell reference number

I have the following palette: ...
2
votes
2answers
75 views

Quickly invoking a certain set of commands

Say I want to be able, in an arbitrary notebook, to quickly invoke a cell containing the commands NotebookFileName[] DateString[] What are good ways to get to be ...
0
votes
0answers
24 views

All formatting lost from a working notebook

I had a working notebook with title and normal cells. I opened and all cells were merged to a normal (InputformDisplay type) cell, all titles and text cells are lost, that is, they became the same ...
0
votes
1answer
110 views

Mathematica 12.1 is treating all my cells as raw texts by default

I was once using Mathematica 11 it all works fine - when I create new Notebook (.nb) input like 1+1 and press shift+...
11
votes
1answer
444 views

LyX-like LaTeX in Mathematica Text Cells

Lately I've been learning more about the Wolfram Language, and I've become particularly enamored with the stated goals of the Mathematica notebook interface. I've used Mathematica exclusively as a &...
2
votes
2answers
57 views

Can a Style inherit CellMargins depending how it is grouped?

This is a cross-post from https://community.wolfram.com/groups/-/m/t/2107710?p_p_auth=JoAd1Xpi and is similar to How to inherit indentation in cell groups? I'd like to have the Styles Item, Subitem, ...
0
votes
1answer
80 views

Nested groups of cells

I want to accomplish two things: Be able to minimize long function definitions and other blocks of code. To this end, I grouped each such block with a Text-style title that I can double-click to open ...
3
votes
1answer
44 views

How to make boxes independent from those cell-formatting options?

In a cell whose LanguageCategory option is "Input", boxes will be syntax-highlighted. Is there any way to diasble such ...
2
votes
0answers
94 views

Is there any way to change the box-formatting behavior thoroughly?

Background The box-formmating behavior is affected by the downvalues of the symbol MakeBoxes. But the formatting behavior is not exactly ...
5
votes
1answer
67 views

Make docked cells scale with zoom

Is there any way to make your docked cell contents scale with the notebook magnification?

1
2 3 4 5
8