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)

0
votes
1answer
49 views

Global variables [on hold]

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
85 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 ...
4
votes
1answer
68 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: ...
1
vote
1answer
41 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
124 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) ...
1
vote
1answer
61 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 ...
0
votes
1answer
34 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: ...
1
vote
1answer
57 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 ...
4
votes
1answer
59 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!
7
votes
1answer
111 views
0
votes
0answers
14 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
99 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 ...
8
votes
1answer
167 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 ...
6
votes
3answers
203 views
3
votes
1answer
235 views

Welcome screen (V9): selecting notebook from Open Recent … results in initialization cells not evaluating

The following represents an abbreviated example of more complicated code, but it replicates a problem the more complicated code encounters. ...
3
votes
0answers
46 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
73 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?
2
votes
1answer
56 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
2answers
218 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 ...
7
votes
1answer
85 views

How to sort cells?

Is there a way to programmatically reorder the section cells in a notebook alphabetically? For example:
0
votes
0answers
35 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
28 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 ...
4
votes
1answer
81 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 ...
5
votes
1answer
53 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?
2
votes
1answer
72 views

Programmatically selecting non adjacent Cells

One can of course Ctrl + MouseClick to select 1st and 3rd cell. But how to select non adjacent Cells programmatically? I was looking for neat examples here or in ...
3
votes
4answers
156 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 ...
14
votes
1answer
436 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, ...
3
votes
4answers
120 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 ...
5
votes
2answers
172 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 ...
2
votes
1answer
104 views

What is “ (Dialog) Input [ ] := ” after evaluating a cell?

I have done a time-consuming run and calculation. After many hours ( about 7 hours!), the black color which shows that the cell is evaluating, turn into gray and a strange text appears like this : ...
2
votes
2answers
68 views

What is the fastest way to get notebook CellGroups / Cells structure?

So the question is how to get this kind of information: from This is one of my ideas: ...
4
votes
2answers
103 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
71 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 ...
0
votes
1answer
34 views

How can i specify a NotebookSelection by a given CellObject?

My Questing is very simple. If I have a CellObject e.g. CellObject[Text], I can move the selection to this ...
2
votes
0answers
80 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 ...
23
votes
4answers
5k 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 ...
13
votes
2answers
450 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), ...
1
vote
1answer
97 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 ...
3
votes
0answers
56 views

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

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
0answers
53 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: ...
5
votes
1answer
128 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
138 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 ...
2
votes
1answer
84 views

How can I make new outline cells be created above the current cell on return?

When you hit enter inside an item styled cell (e.g. Cell["", "Outline1"]), a new cell of the same type is created underneath the cell you are currently editing. ...
2
votes
1answer
119 views

How to mimic Org-Mode with cell dingbats?

I love using org-mode to organize my to-do lists, the functionality is amazing, but it suffers from being stuck inside the emacs terminal... I'm hoping to replicate some basic features into a ...
0
votes
1answer
45 views

How make first automatic numbering cell for a style number 1 not 0?

I have a cell style "Figure" for a notebook, defined as: Cell[StyleData["Figure", StyleDefinitions -> StyleData["Text"]], MenuSortingValue->10000] In ...
3
votes
1answer
97 views

Evaluate specific cells in Mathematica

I have a very simple problem with Mathematica that I couldn't find an easy answer to. I have long notebook with a lot of cells and want to evaluate a specific cells inline from another cell. So far I ...
2
votes
1answer
62 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?
0
votes
1answer
122 views

Front-end: How can one programmatically extract window titles?

I would like to programmatically get the titles that appear at the top of notebook windows, particularly for notebooks that have not yet been saved (if they have been saved, I can get the information ...
1
vote
1answer
64 views

Converting a testing notebook to a notebook

I build a testing notebook and it got too slow and unreliable with many test cases. I want to have a new (classical) notebook with all the the inputs I have in the testing one. Is there an automatic ...
2
votes
1answer
111 views

Deleting empty cells and selecting cells matching a pattern

Is there any way for me to automatically select all cells that are completely empty? You know, those cells that you create but end up cutting what's in them and paste it somewhere else, so after a ...