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)

27
votes
4answers
7k views

How to Keep Input Cells Hidden After Evaluating Notebook

I've created a notebook for use in an in-class presentation. There is a fair amount of MMA code, and my students know nothing about MMA nor do they need to. I don't want to distract them with the ...
15
votes
2answers
2k views

Any way to make my equations look better, more Latex like?

I find that the equations I write in Mathematica are not always publication quality. Here is a typical example: If I copy as Latex, then I get the following code: ...
6
votes
2answers
253 views

Set the style of a cell

I know it's possible to programmatically change options on the selection in a notebook. I'd like to create a button that lets me change the style of a cell. It's a style that doesn't have a keyboard ...
9
votes
1answer
201 views

What is FrontEnd`AttachedCell?

Perhaps it's not accessible from the front end, but what is this so-called attached cell? ...
14
votes
2answers
548 views

how to make cursor jump automatically to next input cell after evaluating previous one?

When making separate cells in order to make separate computations to better see the result of each one before going to the next cell to do the next computation (which is a good way of doing things), ...
14
votes
1answer
163 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 ...
7
votes
1answer
156 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 ...
14
votes
1answer
440 views

What is the real default CellEvaluationFunction?

The default CellEvaluationFunction is Identity but one can quickly see that this is handled specially as an equivalent function, ...
11
votes
1answer
171 views

Functions returns Command Completion Output

Is there a function that returns the output as if you invoked Command Completion. To help clarify I am looking for a function that returns the Cell Data as if you invoked ...
5
votes
2answers
341 views

How to fold output cells by default?

In Mathematica the default behavior of output cells is to pop up after the kernel has processed the input cells and got a result. I know I could add ; in the end of ...
4
votes
2answers
152 views

Headings, subheadings, text cells etc and Alt+n

This is a minor point but annoying. I have just upgraded to version 10.0.2.0 and discovered that you must select a bracket before doing Alt+1, or Alt +7 to make a cell a heading or text cell. This was ...
1
vote
1answer
63 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 ...
11
votes
1answer
158 views

How can I make a stylesheet that counts subcells?

The example cells in the documentation each have count of the cells inside their section: ...
8
votes
1answer
99 views

How to sort cells?

Is there a way to programmatically reorder the section cells in a notebook alphabetically? For example:
1
vote
1answer
127 views

How can I copy & paste cell styles?

In Mac's mail app the key shortcut "command + option + c" gives a copy selected text style and "cmd + opt + v" pastes the style. Is there a way to achieve this with cell styles? The keyboard part is ...
7
votes
4answers
188 views

Cell sizing and labeling for $\textit{MaTeX}$ equations

I am writing a book in the Wolfram CDF format and would like to improve upon the default equation typesetting of Mathematica. To this end I've loaded @Szabolcs' valuable MaTeX, which imports $\LaTeX$ ...
3
votes
4answers
176 views

Frontend: Adding cell-type choices to the “Choose how to enter input” drop-down [duplicate]

In most of the notebooks I work in, I find myself using 2 or three cell-types almost exclusively (typically regular input, and some subset of section/subsection/chapter). A minor annoyance I run into ...
11
votes
3answers
219 views

How to collect expressions from cells created by Print?

I have a notebook where evaluation of a certain cell produced hundreds of adjacent output cells using Print. I need to create a list containing all expressions from ...
10
votes
1answer
265 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 ...
5
votes
1answer
68 views

How can I make an invisible Cell?

Notebooks have a Visible option, but Cell // Options doesn't mention any equivalent for ...
5
votes
1answer
184 views

How to move a cell up or down with a keystroke?

It is very useful during refactoring to move lines around. All popular IDEs or text editors have this feature (PyCharm, Vim, Sublime, etc..) for example in Xcode you press: ⌥⌘[ or ⌥⌘] to move lines up ...
4
votes
2answers
252 views

Modified Cell Different Display

Is there a way to show maybe a slightly different color, or change the cell bracketing color of a Mathematica cell when it has been modified? Ideally it would be nice to follow the standard of ...
3
votes
0answers
70 views

How can I set up a cell style that is ascending dates? [closed]

Outline style notebooks have cell counters that are simply ascending numbers, but what if I want to apply a function to them and have descending dates like this: So that they auto format and the ...
3
votes
2answers
159 views

Overwrite contents of a cell

I am trying to figure out a way to change the contents of a cell that has previously been evaluated in my notebook. To do this, I'd like to overwrite the cell. I've seen questions like How to pipe ...
7
votes
1answer
136 views

Hidden parent stylesheet?

Please follow those steps: ...
6
votes
3answers
261 views

Creating centered inline cell in text cell

The cell corresponds to the textual form ...
5
votes
1answer
72 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 ...
4
votes
0answers
63 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 ...
4
votes
1answer
457 views

Is there a method to send different Cell evaluation to different core?

I am running Mathematica on a computer with multi CPU and every CPU has multicore. I am wondering if there exist a method to send different cell evaluation to different core? So if I already have a ...
1
vote
1answer
107 views

how to make cells independent with each other in notebook

If we open DocumentationCenter and then run code, we will find that the Cells are independent from each other. For example: ...
0
votes
1answer
102 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: ...
8
votes
2answers
157 views

Alternative to NotebookLocate or NotebookFind

In Mathematica 8.0 and older, there are two ways to select cells based on cell tags. NotebookLocate["CellTag"]; NotebookGet[EvaluationNotebook[]] and ...
7
votes
1answer
343 views

How to evaluate an input cell automatically after evaluating the previous one

Is there any way to automatically evaluate an input cell after evaluating the previous one without the need to press ENTER?
5
votes
1answer
76 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
123 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: ...
4
votes
2answers
129 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: ...
2
votes
1answer
76 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 ...
2
votes
1answer
76 views

How to get the content size (in pixels) of the output in an output cell?

How to get the content size (in pixels, width and height) of the output in an output cell?
2
votes
1answer
47 views

Inserting a closed section

Is there a way to insert a closed section? I know in .m files if you do (* ::Section::Closed:: *) and open the .m file using system editor, a closed section will be ...
2
votes
1answer
87 views

Palette to set Cell Options such as Background Editable and Initialization property?

Hello I have found examples of codes that generate palettes to format the text of a cell (or a portion of it). I have also found codes for palettes that change the style of a cell. The latter is ...
2
votes
0answers
236 views

Is it possible to frame a group of cells? [duplicate]

Is it possible to put a frame around a group of cells (e.g. a numbered list)? My problem is, that if I select the cell group and then click frame on the writing assistant, then it puts a frame around ...
0
votes
1answer
100 views

Select parts of Input Cell

One of my cells contains some Text and Input: some text 3+5, so the expression underlying this looks like ...