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
41
votes
6answers
15k views

Is there a way to hide or toggle the visibility of code?

Many of my notebooks have a similar repeating structure, which is very convenient and reliable for my workflow: a chunk of code defining a Manipulate for exploring ...
39
votes
4answers
10k 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 code....
34
votes
0answers
918 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 ...
23
votes
2answers
729 views

Context unique to each group at a specified level

Are there any new tools in v10 that might be applicable to this problem? Recent versions of Mathematica provide the option of having a unique $Context for each ...
22
votes
2answers
598 views

Shell Emulation inside Mathematica

I am trying to create a Mathematica/shell syntax hybrid. I would like the following command wget -qO- "http://google.com/space line break\"" $var to be ...
22
votes
2answers
558 views

How can I clean up a notebook?

By cleaning up a notebook, I mean how can I hide all the codes in the notebook so that the end-users can't see it? I saw Eric Schulz's famous interactive calculus textbook, the users can't see the ...
21
votes
2answers
1k 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), ...
20
votes
2answers
4k 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: ...
19
votes
1answer
356 views

Any manual on cell grouping management?

Recently I come back to the problem of cell grouping and performed extensive search on this site and on MathGroup archive for information on how to use the possible values of the ...
18
votes
3answers
400 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 ...
17
votes
3answers
450 views

How do I get the timing of an evaluation after it has already finished?

Sometimes I forget to add Timing[] to my evaluation and only notice it once it has already finished. Some of my calculations take hours or even days, so I don't ...
16
votes
3answers
838 views

Refer to result of cell above current cell?

% refers to the result of the preceding calculation (preceding in time) but this seems not necessarily to be the cell just above a given cell. How can one refer ...
16
votes
1answer
2k views

Running an initialization cell on Mathematica start up [duplicate]

I am writing a bash script to run a bunch of Mathematica .nb files serially. So I thought I'd convert my Mathematica cells into ...
16
votes
2answers
507 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, ...
15
votes
1answer
502 views

ShowGroupOpener's behavior change in 11.3

Among many settings for a fresh installation I have CurrentValue[$FrontEnd, ShowGroupOpener] = True in order to have sections openers always visible. It does ...
15
votes
1answer
631 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 <...
13
votes
2answers
576 views

What is FrontEnd`AttachedCell?

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

How can I make a stylesheet that counts subcells?

The example cells in the documentation each have a count of the cells inside their section: ...
12
votes
1answer
632 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 ...
12
votes
2answers
168 views

Ordering Problem With VoronoiMesh

Imagine I want to model 2D cells moving in a tissue. Consider, as an example, Lloyd's relaxation algorithm. Using VoronoiMesh I'm able to mimic some cell movement. ...
11
votes
3answers
258 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 ...
11
votes
1answer
207 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 ...
11
votes
1answer
221 views

MousePosition in AttachedCell?

I can't figure out why the following stops working when "WindowAbsolute" is replaced with "Graphics"? ...
10
votes
1answer
288 views

How can I get the style of selected cells?

How can I get the style such as Input, Text, Code, etc., of a selected cell? If a group of cells is selected, how can I get styles of all the cells in the group?
10
votes
2answers
206 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 ...
10
votes
1answer
813 views

Making cells group

After reading rcollyer's post I'm still not able to understand how grouping rules work. Here is a problem I'm facing. What I want is to create a new title, section and subsection styles. I want the ...
10
votes
2answers
619 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
585 views

SubTitle and SubSubTitle do not group by default

For some reason, the SubTitle and SubSubTitle cell formats do not group automatically on my machine any more, and I cannot ...
10
votes
1answer
151 views

Cell State and Openers in 11.1 documentation

So I've been playing with the new 11.1 documentation style and I noticed that there's something seemingly odd with the openers. If we open any doc page: ...
10
votes
2answers
153 views

Use new cellgroup opener button for closing too?

Is there some way to keep the (new in v11.3) cell group opener button: So I can use it to close the group? Such a feature/hack would be nice as it takes me more effort to find the exact tiny ...
9
votes
4answers
445 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$ ...
9
votes
2answers
505 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 ...
9
votes
2answers
285 views

Select Only Printed Out Cells

Is there a way to select only printed out cells in Mathematica? I'm using version 10. I'm told this works in version 11 almost not sure though ...
9
votes
3answers
710 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
124 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 ...
9
votes
1answer
132 views

How to sort cells?

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

CellDynamicExpression is too sensitive in V11

Bug introduced in V11.0.0 and fixed in 11.1 ...
8
votes
2answers
375 views

Image analysis for extracting lines between cells

I have a 2D image as shown here and need to extract the spatial information about the curves in between each cell division. I have been able to analyze the image ...
8
votes
2answers
1k views

Delete all output in notebooks

I want to delete in all notebooks in a certain root directory all output cells as well as all other output generated during evaluation (e.g. from print and other) and afterwards save the cleaned ...
8
votes
3answers
4k views

How to clear all output cells and run all input cells

I am new to mathematica and I am a little frustrated. There are a few things that I would like to do but I am finding difficult Use a keyboard shortcut to clear all output cells and run all input ...
8
votes
3answers
225 views

What's the point of Cell Dingbats?

Cell dingbats have always seem strange curiosity to me. It seems they are important enough that Wolfram gave them their own place in the format menu. But to me... they seem like novelty items, with ...
8
votes
1answer
240 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 ...
8
votes
1answer
231 views

Is there a way to obtain the time when an input was executed in a notebook?

I have a notebook with lots of In[n] in my current session. The notebook has been open for over three days. I would like to get the timestamps for when certain old ...
8
votes
1answer
633 views

Run several input cells in parallel

I have a notebook with several input cells that produce data which is then plotted into separate graphs. Since I do not want to save the results, because it makes the file huge, I keep the ...
8
votes
1answer
1k 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 ...
8
votes
1answer
119 views

Increasing notebook magnification pushes output onto a new line

When I increase the notebook magnification beyond a certain level, it pushes the output of a command onto a newline. It does this normally when you enter something like ...
8
votes
2answers
218 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 ...
8
votes
1answer
1k 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 ...
8
votes
1answer
677 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?
8
votes
1answer
345 views

How to convert arbitrary raw boxes directly into String?

This question is motivated by the recent question about searching inside of the NB files. According to the Documentation, ToString expects a high-level WL ...

1
2 3 4 5
7