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
38 views

Run a loop without merging the cells

I have to run a loop of a certain variable than spans through the entire notebook. However the notebook has already been divided into different sections; merging these sections will be a pain and ...
2
votes
1answer
321 views

Can a Mathematica notebook be programmed to work as a LaTeX editor? [duplicate]

A short example code will show that the answer to this question is yes. The example code (which I give in my answer) is for a simple LaTeX editor that is almost a drop-in replacement for TeXworks. ...
5
votes
1answer
90 views

Show timing of every output

I know I can follow Wolfram's guide and enable "ShowTiming" to show the timing of the previous command at the bottom of the window. Additionally, I can enable <...
0
votes
0answers
11 views

Parallel evaluate a cell distributing the definitions

In Cell evaluation and parallel kernels a solution is proposed for how to evaluate multiple cells in parallel. I tried it, but ran into the problem that definitions do not get distributed to the new ...
6
votes
1answer
141 views

Given a cell in a Voronoi diagram, which point did it come from? [duplicate]

Given a set of points pts = Table[{RandomReal[], RandomReal[]}, {i, 1, 10}]; and their Voronoi diagram ...
1
vote
1answer
41 views

Adjusting cell hierarchy?

I'm very much a beginner in Mathematica, so first of all sorry to waste you time with my problem. To learn the cell-structuring of a project I'm working on using the different format types available. ...
0
votes
2answers
50 views

How does one use option CellGroupingRules?

It seems that Manual Cell Grouping is broken in 12.0.0.0 (at least in Linux). If one pastes a cell, then any cell bracketing gets "chopped" at the paste position. This bug affects a large project of ...
6
votes
1answer
64 views

New input cell style with a custom evaluator

I'm interested to implement a custom input style which would appear (mostly?) like a normal "Input" Cell, but which would ...
1
vote
2answers
48 views

How to read the data from output cells?

I have results of some calculation as a number of output cells in the saved .nb file. Since these results are obtained before (not during this run of Mathematica), I cannot use % to access previous ...
3
votes
1answer
40 views

Using an image as a CellDingbat

I'm writing code that generates a report notebook using a defined style. I would like to display an image (a logo) in the title cell along with the title itself. How can this be done? Example: ...
4
votes
2answers
126 views

How do I add into a text cell a reference to a numbered function?

I have a document with lots of numbered equations in their own cells (which I numbered through Format->Style->DisplayFormulaNumbered). I also have lots of ...
3
votes
1answer
375 views

Is there a way to convert Wolfram Language expression to string?

Is there a way to convert a Wolfram Language expression / code into a string expression? For example, Convert the following including its indentations (very important), ...
2
votes
0answers
53 views

Cell Bracket Clarification

I am running a very simple program that uses NotebookEvaluate to evaluate an open notebook that only has the context of saving and closing, and while it completes that task, the program gets stuck in ...
6
votes
2answers
77 views

Store Dynamic-accessible hidden metadata in a cell

Is there a way to store metadata in a cell in such a way that it can be accessed with Dynamic? Think of e.g. how ExternalLanguage cells work. We can select whether ...
0
votes
1answer
17 views

How to collapse a cell group behind its 2nd cell with same functionality as WholeCellGroupOpener

Given a cell group containing two subcells... If you double click the bracket of the first cell, you collapse the group behind the first cell in that group. If, instead, you double click on the ...
3
votes
1answer
64 views

Correct way to make groups of cells (not) evaluable

Let us say that I want to make all the cells within a section not evaluable. In principle, I would simply highlight the relevant section, then go to ...
4
votes
3answers
63 views

Redirecting CellPrint output

How can I make g[]; or h[]; print the same output as f[];? I am trying to capture the ...
2
votes
1answer
42 views

Typing Control-6 makes text cell disappear

This morning, I opened a document I worked on last week, and all the lines of text that had Control-9 functions in them where the function involved a power written by typing Control-6 were completely ...
2
votes
1answer
52 views

Modify CellLabel of Print cell in stylesheet

I would like to modify the style of Print in a Mathematica notebook. Locally, I can do so by toggling on Show Cell Expression of ...
2
votes
1answer
67 views

How to Text justify that includes StringSplit and MapAt in it?

I am preparing a practical class of physics in which I need to justify the following text that is very extensive. But when I use StringSplit or ...
5
votes
2answers
95 views

Set notebook sections one level up

Suppose I have a notebook filled with many chapters, sections, subsections, subsubsections and so on. Instead of changing the style of each of them manually, is there a clever way to set all or part ...
3
votes
1answer
84 views

Evaluate notebook without opening cell groups

I have a notebook with grouped cells, where the input cells are hidden and only output cells open. Is it possible in an easy way to evaluate the whole notebook and preventing opening all groups, ...
2
votes
1answer
52 views

How to select Input|Output Cell Groups in the Notebook?

I am trying to convert a Cell expression to an image. I created a new notebook and copied the cells that need to be rendered. ...
2
votes
1answer
54 views

Automatic space after comma in Code cell style

"Input" cell style automatically inserts a space after each comma, with natural exceptions such as when quotation marks are open. ...
0
votes
0answers
230 views

The expression can't be used as part specification error

Mathematica newbie here! Could you help with the following error: Any help would be appreciated!
0
votes
0answers
42 views

Programmatically change cell style [duplicate]

I have been trying unsuccessfully to programmatically change a cell style in order to change it to a text-style cell as I just want to put some text in it that should not be evaluated: ...
1
vote
1answer
71 views

need help with remembering a name of a function

I have an output cell and want to see the input that led to that output. How do I tell Mathematica to display that input?
4
votes
1answer
56 views

Strange behavior of Print, Do, and merged output cells

The command Do[Print[i], {i, 1, 3}] does what you expect: creates 3 output lines of 1, 2 and ...
11
votes
1answer
207 views

MousePosition in AttachedCell?

I can't figure out why the following stops working when "WindowAbsolute" is replaced with "Graphics"? ...
3
votes
0answers
42 views

How to make custom attached menubars? [duplicate]

I would like to understand how to build an attached menubar. For example, Image has the following bar - an attached cell that arises when clicked on: ...
2
votes
1answer
58 views

shorcut key of Cell->Cell Properties->Open

Is there a shortcut key to control the Open property of cell? Thanks!
4
votes
1answer
58 views

Navigate to cell in a notebook

Assume the following notebook of Rubi rules ...
3
votes
2answers
76 views

How to assign a tag to a cell

I want to assign each cell in my current notebook a tag so that I can rerun cells with specific tags later in the notebook (Using a method similar to this answer). My questions are How do I assign ...
5
votes
1answer
95 views

Why Text Cells converted with Alt-7 have different fonts

So I am writing a report in Mathematica and experiencing a problem. First I create an input cell. Then write some text into it. Afterwards convert it to text cell with Alt-7. As a result some cells ...
3
votes
2answers
190 views

Finding sums of magic square cells (The “magic square” of the Sagrada Familia)

Update Finally got the background origin of this. And a more comprehensive article is here. This has has a total of 310 combinations that add up to 33. And this IS more interesting way of ...
1
vote
1answer
68 views

How to creat a pyramid like grid? [duplicate]

I'd like to create some pyramid that looks like this, The numbers/cells are easy to do ...
2
votes
0answers
46 views

How to remove “⍰” from parent cells with collapsed child cells in MMA 11.3?

I like to work with notebooks and collapse cells containing computations. This gives me a manuscript-like feel for the notebook, and I like the aesthetics of it. MMA 11.3 introduced a new "feature" ...
2
votes
0answers
73 views

Sequentially displaying bullet comments in a Mathematica presentation

Playing around with the 11.3 presenter tools today. I have generated a presentation entitled "Polynomials". 10 slides with Title and 9 sections. My goal was to create a presentation with 5 slides. ...
7
votes
1answer
213 views

Is there a way to obtain the time when an input was executed in a notebook?

I have a notebook with lots of In[n] in my current session. The notebook has been open for over three days. I would like to get the timestamps for when certain old ...
1
vote
1answer
51 views

Add cell dingbat to cell, to display using DisplayForm

I'm programically constructing a palette, and trying to add items/cells to the palette with a dingbat. The cells themselves have a style of "Item" which should ...
3
votes
1answer
51 views

How to add a Button on a slideshow that on click get me to the specific slides on the slideshow

How can I add buttons on a slide that on click takes me to specific slides on the slideshow?
14
votes
1answer
428 views

ShowGroupOpener's behavior change in 11.3

Among many settings for a fresh installation I have CurrentValue[$FrontEnd, ShowGroupOpener] = True in order to have sections openers always visible. It does ...
9
votes
2answers
96 views

Use new cellgroup opener button for closing too?

Is there some way to keep the (new in v11.3) cell group opener button: So I can use it to close the group? Such a feature/hack would be nice as it takes me more effort to find the exact tiny ...
2
votes
1answer
124 views

How do I reset Mathematica's DisplayFormulaNumbered cell style numbering?

Since I am writing many equations, in various chapters, I need a way to reset numbering in this cell style. The following shows what I need: x + y = 15 (1) x - z = ...
1
vote
1answer
93 views

Is there a way to hide input cells, that have no output?

I can easily hide output cells, or hide the input cell if it produces output (just double click the side bracket for both). My Question is how can I hide input cells that have no output? Examples ...
2
votes
1answer
54 views

CellGroup[] in current Notebook

I have used the Option Inspector to set CellGrouping to Manual for the current, selected Notebook. Nonetheless, the following ...
8
votes
2answers
904 views

Delete all output in notebooks

I want to delete in all notebooks in a certain root directory all output cells as well as all other output generated during evaluation (e.g. from print and other) and afterwards save the cleaned ...
1
vote
0answers
85 views

How to get the CellID of a cell

I can count how many cells there are in a notebook up to and including the one whose ID i need, and then evaluate Cells[EvaluationNotebook[]][[number, 1]]. How to ...
2
votes
2answers
122 views

How to highlight the cells that satisfies the condition?

MemberQ[IntegerDigits [#], 3] & /@ Range[100] Grid[ArrayReshape[Range[100], {10, 10}], Frame -> All] I want to get a 10 by 10 grid, that highlights all ...
0
votes
1answer
240 views

Cell splitting in mathematica

I have multiple lines in a cell in mathematica created by pressing enter like: In[12]:= 1 + 2 3 + 4 5 + 6 Out[12]= 3 Out[13]= 7 Out[14]= 11 I want to separate ...