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.

learn more… | top users | synonyms (1)

1
vote
0answers
30 views

Shortcuts for Indentation in Text Cells?

Marking a cell's bracket and then using Alt-7 I can make it a Text cell using the formatting set forth in Default.nb or in a modification of it stored with the notebook itself (so called "private ...
5
votes
1answer
67 views

What are “\<” and “\>” delimiters in box expressions?

If I enter a string (say, "abc") in a cell, and then switch to box representation (Shift+Ctrl+E or menu item ...
5
votes
1answer
64 views

hotkey to mark the current cell and make it a text cell

In order to write to a Text cell, you usually just start typing. Then you find out that you are writing in an Input cell. Then you want to convert the current cell to a Text cell. In order to to this ...
1
vote
1answer
49 views

Temporary/popup Output Progress Boxes

In recent versions of Mathematica, a number of functions have the feature that, while they are thinking (or, for example, loading data from Mathematica servers), they pop-up a little light-blue box ...
1
vote
1answer
68 views

How to use an ExpressionCell to display e.g. an Input cell inside a generated output?

It's not that I can't live with that but I don't understand why e.g: ExpressionCell[ Defer @ Style["string", Red], "Input"] is not showing quote marks? This ...
13
votes
1answer
130 views

How to make a dynamic nested menu?

There is no dynamic controller that can represent a hierarchical menu structure: ActionMenu can only handle flat action lists. Thanks to Kuba, we know a lot about ...
5
votes
1answer
85 views

Close or Open, not OpenClose CellGroups for specific CellStyle

I am aware of the question Close programmatically all cell groups in Mathematica but I am trying to find out how to close only one kind of Cells in a notebook, ...
5
votes
1answer
51 views

Exclude cells for cdf deployment

I have a demonstration notebook with a code development chapter and a demonstration chapter with a manipulate environment, like this depicted minimal example I know how to export a cdf but is there ...
2
votes
0answers
74 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 ...
5
votes
1answer
199 views

How to construct a tree from a notebook?

Given the notebook itself we can think of it as a tree graph: the root vertex is the empty notebook itself, the headers of cell groups are vertices, and all other cells as leaf vertices. I'd like to ...
8
votes
2answers
94 views

Seeking for method to speedup and get more flexable control Notebook History

When doing calculations in notebook, I modify the code a lot, and there are several versions of similar codes in the same notebook. But I found myself easily forgot which version is the newest, and I ...
2
votes
0answers
61 views

Docked Cell that scrolls?

I use two finger movement on my trackpad for scrolling a notebook page up and down. Is it possible to make a docked cells that scrolls to the left and right using a two finger movement on the ...
6
votes
2answers
257 views

Add semicolon at the end of code line programmatically

Suppose we have several lines of code in a cell: a b; Module[{}, c d] e How can we wrap them in a CompoundExpression i.e. ...
9
votes
1answer
187 views

What is FrontEnd`AttachedCell?

Perhaps it's not accessible from the front end, but what is this so-called attached cell? ...
5
votes
1answer
60 views

Toggle close all input cells in a notebook, keeping output cells open

For presentations, can all input cells in a notebook be toggled open/closed, while keeping output cells open? Either through menu or palette. Probably would not work well programmatically. Related ...
3
votes
2answers
74 views

CDF format - disable cell selection?

Is there any way/option in order to make Cells not selectable in exported CDF files? I know how to hide the cells until you go with the mouse over them on the ...
5
votes
2answers
100 views

Retrieving normal looking Mathematica input from a cell expression

After a bad saving, I had problems with my Mathematica notebook. I have expressions in this form: ...
1
vote
0answers
33 views

Notebook cell properties: Count cell number. Count edited cells [closed]

I have a Mathematica notebook with more than 20 cells, including some closed. How can I programmatically count the exact number of cells? How can I know how many of them have not been edited?
1
vote
1answer
47 views

How do I dynamically update “name” of Action Menu?

I have created an action menu that allows you to change the style of a cell. It works. However, I would like it to dynamically update the action menu "name". I can't get the name to refresh. ...
0
votes
2answers
55 views

Notebook output in single place

I find that cell output below each cell terrible for organizational purposes. Is there another way to display the output of each cell?
1
vote
0answers
32 views

Referencing cells after reopening a saved notebook

I'm looking for a way to reference certain cells when opening a saved notebook. That is, assume I ran some commands in a notebook, got some output, saved the notebook, then reopened it in a new kernel ...
2
votes
2answers
74 views

How create hyperlink with number of an automatically numbered cell?

In my stylesheet I have a particular style of cell, Exercise, that has a corresponding counter object. In a notebook with that stylesheet, there are several Exercise cells in each of which I've ...
0
votes
1answer
25 views

How can I update the contents of or overwite a cell contained inside another cell?

Suppose I have a notebook consisting of these cells: Cell G, containing a grid Cell I, containing a program that produces a graphic and places it in a cell Cell E, a cell which successfully receives ...
3
votes
0answers
40 views

How to inherit indentation in cell groups?

In my notebook the text cells "stick out" like this: Instead, I'd like the to be left aligned (plus some margin) with the cell they are grouped under... How can I achieve this from the stylesheet? ...
8
votes
0answers
68 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 ...
0
votes
1answer
56 views

Global variables [closed]

I have a workbook I am writing, there are 2 cells in it and then each cell is divided into sub cells. At the top of the first cell i made a bunch of variable assignments such as length=10, x=6, d=4, ...
7
votes
1answer
108 views

How to add a caption below a cell?

How can I change my stylesheet definition for a cell to optionally add a caption below? For example, I would like to add a caption to my "Program" cells shown here: like this (but with the option ...
5
votes
1answer
101 views

How to close all tagged input cells without closing their output cells?

I have tagged certain Input cells I want to be closed during a presentation. I close them as follows: ...
2
votes
1answer
47 views

How to programatically remove an option for all cells?

I'm trying to remove the CellGroupingRules options in every cell in a notebook. Eventually I opened the Notebook in a text ...
6
votes
2answers
144 views

How to group cell type A under cell type B?

My notebook's groupings for "Subsection" and "SubitemNumbered" are broken: And by broken, I mean I wanted it to automatically group like this which I did manually (with lots of control+shift+g) ...
0
votes
1answer
77 views

How to implement specific cell grouping behavior?

Here's the situation in my Mathematica notebook: I'd like the bottom cell to be grouped with the cells above it. Here are those same cells toggled into code: ...
4
votes
1answer
182 views

How can I remove I a horizontal line I inserted into my notebook?

Inserted a horizontal line with Right click > Insert > Thin Horizontal Line. Cannot see a way to remove such a line. Help!
1
vote
0answers
24 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 ...
7
votes
1answer
135 views

How to programmatically mark and then select a subset of input cells?

I'm developing a package that needs to exert significant control over a notebook while a user interacts with it. One specific thing that it needs to do, programmatically, is to select a specific ...
10
votes
1answer
221 views

How to change the font color of a variable in whole input cell

I want to track the occurrence of a particular variable in a code. So the idea is to change its color. Usually I do it in a crude way - convert the code into text and then use ...
4
votes
0answers
57 views

String option names for Cells

They seem to be correctly interpreted. I'm asking because of some minor reasons and a major one: NotebookWrite a Cell with WholeCellGroupOpener option I don't know any official confirmation so let ...
7
votes
1answer
125 views

Hidden parent stylesheet?

Please follow those steps: ...
4
votes
1answer
105 views

Split/unmerge merged cells in notebook file

I have merged cells in a Notebook file. Is there a way to split such a merged cell group back to single cells, in each of them being one command?
7
votes
2answers
275 views

How to copy and paste $n$ lines from a text editor to $n$ cells?

If I copy from an external editor to Mathematica notebook a block of lines (with a code) line 1 line 2 ... line n then whole text is copied to a single cell. I ...
2
votes
1answer
78 views

Tab in Input cell

Why is it impossible to use tab to indent e.g. an inline comment i.e. (* ... *) in an Input cell? However, I have seen that it is possible, if I use Cell>ConvertTo>TextDisplay. The cell remains ...
7
votes
1answer
96 views

How to sort cells?

Is there a way to programmatically reorder the section cells in a notebook alphabetically? For example:
0
votes
0answers
37 views

About making grouping cells

I would like to present the outputs of my code in a notebook with grouped cells as with a hierarchical structure like this: Section 1 Sub-section 1 Result 1 Sub-section 2 Result 2 ...
1
vote
1answer
34 views

Removing vertical/horizontal edges from some cell frames

I recently asked a question regarding adjusting adjacent cells' margins to make their background color appear continuous. With these settings in place, I'd like to put a single frame around the ...
1
vote
1answer
61 views

Table of sections with CellPrint

I am trying to produce a table of sections with each section containing a DynamicModule. My two questions are: (1) How do I produce grouped sections that are folded ...
5
votes
1answer
62 views

How to set different default cell per section?

In various sections in my notebook I'd like the default cell type to be different, if possible, how can I specify this?
4
votes
1answer
93 views

How can I import html fragments as formatted cells?

I see that there is limited support for "HTMLFragment" in Export, but I figured with all the work that went into porting Mathematica into the Wolfram Cloud there should be a way to Import ...
3
votes
4answers
125 views

How to combine selected out cells into a list? [closed]

I have a loop that was printing out results, and now I'm left with many cells in different sections and I need to combine them (the values in them) into a list I can work with. For example, applied to ...
4
votes
2answers
123 views

How can I get the style of a CellObject?

I want to work on a notebook programmatically with CellObjects. lets create a notebook for example: ...
1
vote
1answer
87 views

Writing cells from other notebooks into current notebook?

I have a large number of Mathematica notebooks which contain study notes for different topics (as opposed to actual Mathematica Code). I'm trying to develop some code to randomly pull parts of a ...
1
vote
1answer
82 views

How would I set the equation number for an EquationNumbered cell?

Regardless of how many EquationNumbered cells are above or below, every new EquationNumbered cell that I add in my notebook shows (1) as the equation number. Is there a way to correct the equation ...