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.

42 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
34
votes
0answers
929 views

Changing FrontEnd automatic scrolling in version 8

In Mathematica versions < 8, the FrontEnd has a very intelligent behavior: On evaluation, it by default automatically scrolls down the Notebook window to the last printed Output cell but also ...
8
votes
0answers
159 views

What is a full list of cell styling options and sub-options?

I'm trying to customize a style sheet and have hit a few speed bumps and walls. Firstly, I can't see how to do a few specific things, like to set the color of the cell's left side label: Or how to ...
7
votes
0answers
74 views

Option precedence for CellLabel

In Mathematica, when an option is specified multiple times with different values, the first one will take precedence. This works with Cell and ...
7
votes
0answers
364 views

Rearrange cells without cut-paste

When working in a Mathematica notebook, I often want to reorder cells. Most of the time, I am adding cells at the bottom of the notebook, until I realize it may be better to insert this calculation at ...
6
votes
0answers
107 views

How is CellContext->CellGroup supposed to work?

After reading the documentation on the subject, I still cannot get CellContext->CellGroup to work. Here's a simple example. (Unfortunately, I cannot easily ...
5
votes
0answers
92 views

Line wrapping in a TextCell within an extensible window

Bug introduced in V9 or earlier and persisting through V11.3. [...] I sent your comments and my test results to developers for analysis. I do not know when a correction for this will be ...
5
votes
0answers
67 views

Collapse cell groups when you close parent group?

I have a particularly long notebook. Here's what I'd like to do: to say in my stylesheet that upon closing certain types of cell-groups that all the cell-groups inside should close as well. That way ...
4
votes
0answers
93 views

How to reset $Line in each section?

When I evaluate my entire notebook, I'd like to reset $Line=0 at each section heading so all the code cells in that section are numbered starting from 1? So in the above example I'd like ...
4
votes
0answers
63 views

How to control indentation of a cell relative to it's parent?

Is there a stylesheet property that can be set to control the extra level of indentation of a cell in its group (I don't want to specify absolute CellMargins)? Carl suggests in the comments to use ...
4
votes
0answers
62 views

Am I using the cell option setting PageBreakWithinGroup->False correctly?

I had expected that this option would prevent a page break occurring within a group of cells of which this cell is the "group leader". In my case it is a ...
4
votes
0answers
376 views

How copy a large cell into clipboard using `input text`?

This is a strange problem and everything I tried did not work. I have a very large single Manipulate cell (it is a demonstration stylesheet notebook, hence this cell have to be one), and I simply ...
3
votes
0answers
299 views

How to Print a Cell Landscape in a Portrait Orientation Notebook?

I have a few cells in a report (notebook or CDF) that need to be printed "Landscape" where the rest of the report is printed ...
2
votes
0answers
79 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 ...
2
votes
0answers
31 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 ...
2
votes
0answers
55 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
84 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. ...
2
votes
0answers
41 views

Centering CellLabels

Is there a way to get cell labels to vertically center next to the input text? It always looks like the CellLabels are offset a bit too low:
2
votes
0answers
157 views

How to expand and collapse multiple cells inside a frame while keeping all in a single frame

I am trying to create a framed cell around cells that collapse and expand. Mr. Wizard's answer below almost does it, however, when the cells are collapsed I lose the lower frame border. I'd like to ...
2
votes
0answers
115 views

How to convert a notebook to an association and back?

I have a notebook that serves as a nice readable document but is it a database of sorts, I'd like to transform this into an association so I can manipulate and export it as a dataset. Here is a sample ...
2
votes
0answers
834 views

Button to run a group of cells

I'm not sure how to create a minimal working example since I don't know how to post code that appears as cells but hopefully my question is simple enough that it won't be necessary. My apologies all ...
2
votes
0answers
84 views

Unique CellID in-between notebooks

Documentation says that CellID is guaranteed to be unique for a given notebook. I've noticed that CellID are fairly high numbers and although probabilistically speaking the odds of coincidence are low,...
1
vote
0answers
22 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?
1
vote
0answers
71 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
33 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 ...
1
vote
0answers
123 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 ...
1
vote
0answers
52 views

Change GroupOpener in OptionsInspector or Stylesheet?

The accepted answer in How to change the appearance of a Cell GroupOpener? gives programmatic methods for changing the shape, color, or other appearance of a cell ...
1
vote
0answers
89 views

How to center a graphic inside a framed cell without using another cell

Below is a gif of the situation I am having. First, notice I am working inside a framed cell. Within this cell I placed two graphics. The first (on top) is left aligned. The second, is centered. ...
1
vote
0answers
55 views

Hiding '//*Form' in output cell labels?

Is there a way to hide the '//form' part of Output cell labels but keep the Input cell labels the same? For example, I'd like to keep "In[2]:=" but get rid of the "TreeForm=" here:
1
vote
0answers
75 views

Gallery of different style cells?

I'm looking for some nice new cell styles for my stylesheets, are there any galleries of cells from which I can mix and match?
1
vote
0answers
93 views

Weird Copy Paste Behavior

Since 11 I've been seeing this weird copying and pasting behavior for cell groups. Here's an example where I copied and pasted a cell group below: Is there any way to change this back to the usual ...
1
vote
0answers
19 views

Removing HyperlinkedDefinitionSymbol's in a generated cell?

Is there a way to print out the definitions of a symbol with GeneralUtilities`PrintDefinitionsLocal without any hyperlinks (just the plain text of it in the code cell)? ...
1
vote
0answers
237 views

How to export a notebook to google docs (without losing image quality)

I have a large notebook with many text cells some containing images and I need to import it to a google document that is editable. (so not pdf or html). So far no luck! Exporting to rich text format ...
1
vote
0answers
92 views

Distribute Definitions to different Evaluator

I would like to pass on a definition from one Kernel to the other. With that I mean manually configured Kernels. In this case, I do not want to use the inbuilt Parallelization options, in order to ...
0
votes
0answers
14 views

How to reverse or restore the order of my cells in Wolfram Mathematica Cloud?

I was completing my assignment and I have no idea what I clicked but all the cells got reversed that is the 1st one on the last and the last is the first cell in my file. I want to restore it back. I ...
0
votes
0answers
23 views

Broken sub-/super-/overscripts after reopening file

I'm entering something like $a_1$ by using Ctrl -. After I reopen the file, instead of a nice subscript, every instance of $a_1$ now reads ...
0
votes
0answers
36 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 ...
0
votes
0answers
36 views

Mouse wheel scrolling doesn't work in Pane inside ExpressionCell

Essentially what the title says - Consider the following example: ...
0
votes
0answers
66 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 ...
0
votes
0answers
63 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 ...
0
votes
0answers
483 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
157 views

Fold/unfold all groups at given level via keyboard shortcut

The combination ctrl+' can be used to fold/unfold a selected group. Is there a way to fold/unfold all cells at a given nesting level, and possibly also to fold/...
-1
votes
1answer
106 views

Is it possible to split the last cell in a group of cells, such that the split-off part remains grouped with the old group? How can one achieve this?

I have a notebook with several groups of cells grouped with their respective headlines (Title ... down to Subsubsection). I grouped them all manually. It often becomes necessary, to add something to ...