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
1
vote
1answer
30 views

Is there a way to disable or enable text wrapping in cells?

I am trying to generate "Program" cells but my issue is unlike "Code" cells, "Program" cells ...
2
votes
0answers
26 views

How to configure cells **not** to evaluate via “Evaluate Notebook”

Is there a way to configure certain cells/sections not to evaluate under "Evaluate Notebook," while still being able to "manually" evaluate them with Shift+Enter? I have a large notebook with ...
0
votes
0answers
30 views

How can I ensure initialization cells are evaluated in order of definition?

I have a cell: Unprotect[Plus]; followed by a cell: Plus[label[t1_, l1_], label[t2_, l1_]] := label[t1 + t2, l1] If I ...
1
vote
0answers
20 views

Style options to make initialization cells appear like regular cells?

I find the discontinuous grey rectangles around those cells to be distracting. Any way I can make them look like regular cells?
4
votes
2answers
66 views

How to run all cells above current one? [duplicate]

In Jupyter notebook, there is a Run All Above (a certain cell) option. Is there something like Run All Above in Mathematica?
3
votes
1answer
23 views

NotebookImporting sections from documention notebook?

How can I use NotebookImport for grabbing "ExampleSection" cells? ...
5
votes
1answer
60 views

Color of the evaluating cell brackets

What is the option to use in a stylesheet that controls the color of the brackets for cells in the evaluation queue?
2
votes
1answer
82 views

Typesetting LaTeX in a text cell

I recently started trying to use stylesheets and different cell types to organize and explain my logic. Often I try to type equations into my text cells to explain what I'm doing, but this can be ...
0
votes
0answers
32 views

Mouse wheel scrolling doesn't work in Pane inside ExpressionCell

Essentially what the title says - Consider the following example: ...
0
votes
0answers
71 views

How can I programmatically extract the text content from a Notebook's cell definition? [duplicate]

Given the Notebook cell definition below from the Wolfram Function Repository as an example: ...
6
votes
2answers
67 views

How to mix text and formulas in a single cell in the Wolfram Cloud Notebook?

How to mix text and formulas in a single cell in the Wolfram Cloud Notebook? The shortcuts Ctrl+( and Ctrl+( don't work (they probably are intercepted by the browser)
0
votes
1answer
51 views

Retrieving a list of tagged output cells and a list of variables from various Notebooks into a new Notebook

The table below provides the information needed to formulate my question: how can I gather a selected number of tagged output cells and variables in a new notebook? I have two notebooks ...
0
votes
0answers
64 views

Obtaining the results of tagged cells in a notebook from another notebook

My objective is to read the results of several tagged cells in a notebook NB1 from another notebook NB2. Following the ...
1
vote
0answers
52 views

Create new cell that is not part of any group of cells (not grouped)

I'd like to create a new cell that is not grouped with the previous cell The documentation on creating a new cell says this: To Create a New Cell: Move the pointer in the notebook window until it ...
1
vote
0answers
29 views

How to add the cell style popup menu to my customized toolbar

I use a customized toolbar in all of my notebooks: I would like to add the cell style popup menu that is part of the built-in formatting toolbar to my own toolbar. A code snippit for my toolbar is ...
0
votes
1answer
53 views

How to restore broken Automatic cell grouping behavior?

By default output cells are grouped with the input cell from which they are generated (note the nested cell brackets on the right): Sometimes it is desirable to group manually input cell with ...
1
vote
2answers
64 views

Delete pre-existing output under EvaluationCell[] from CellProlog

We know that there is an efficient way to delete all output from the EvaluationNotebook[]: ...
7
votes
1answer
236 views

How to open a Python interpreter input cell?

Something weird just happened to me: I mis-typed a keyboard shortcut, hitting the wrong keys, and a new notebook opened up with a Python prompt! Just for grins, I tried entering some simple Python ...
5
votes
1answer
85 views

Is there a (simple!) way to convert all initialization cells of a document to normal cells?

I like to work with initialization cells. During the different stages of development of my notebooks, I however often need to change those. If they are scattered throughout the notebook, it is ...
1
vote
2answers
75 views

How to export a cell in Messages console to PDF?

Using V12 on windows. This is the problem. I am calling an external function (Rubi in this case, but it could be anything), which ends up printing a cell (image) to the Console. I simply want to ...
3
votes
1answer
70 views

How to export the cell above to pdf using the Export[] command (not using GUI)

Sorry if this was asked before. I googled and could not find anything. Many times I need to export a cell to a PDF. It is always the cell above. Currently I do this using the GUI, by selecting the ...
9
votes
1answer
123 views

Notebook with version-dependent cells

I want to make a notebook with the following special feature: some of its cells show up only when the notebook is opened in for instance versions 11 and 12, but are hidden if the notebook is opened in ...
1
vote
1answer
32 views

How to create inline math with CellPrint within Text cell?

I can create a text cell with text like this: CellPrint@Cell[ "this is a function call: f[x,y]", "Text" ] This produces: this is a function call: f[x,...
2
votes
1answer
51 views

Hiding an evaluated cell as the evaluation completes - Self-hiding

I use expressions to create "control panels" to set dynamic variables to control the evaluation of other expressions in a large notebook. For example: I would like the expressions that create these ...
4
votes
3answers
153 views

Mathematica 12 Frontend for Mac: cell grouping messed up upon copy/paste

Bug introduced in 12.0 or earlier and persisting through 12.1 or later I am not sure whether this has been addressed somewhere already, I couldn't find any comment. I suffer from an annoying bug: ...
0
votes
0answers
53 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 ...
4
votes
1answer
381 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. ...
7
votes
1answer
193 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
12 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
167 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
51 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
77 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
74 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
54 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
44 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
153 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
435 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), ...
4
votes
1answer
140 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
91 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
21 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
90 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
94 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
45 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
67 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 ...
3
votes
1answer
76 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
105 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
148 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
84 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
64 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
407 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!

1
2 3 4 5
7