The tag has no wiki summary.

learn more… | top users | synonyms (1)

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 ...
14
votes
2answers
373 views

refer to result of cell above current cell?

% allows to refer 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 ...
14
votes
1answer
434 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, ...
12
votes
2answers
407 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), ...
12
votes
1answer
979 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: ...
11
votes
3answers
206 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
154 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 ...
8
votes
2answers
143 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
2answers
181 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
2answers
249 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 ...
7
votes
1answer
81 views

How to sort cells?

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

Hidden parent stylesheet?

Please follow those steps: ...
6
votes
1answer
153 views

Replace content of selected cells, each getting different new content

Let's say I select 2 different cells and then attempt to replace their content using NotebookWrite inside a button. How might I replace each cell's content ...
6
votes
2answers
500 views

Export notebook to pdf in landscape orientation

Assuming the following is a notebook with a linebreak: How might I export a landscape pdf (preferred although other formats could work) such that each cell content each group of cells above and ...
6
votes
1answer
248 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
2answers
165 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 ...
5
votes
1answer
49 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?
5
votes
1answer
116 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 ...
5
votes
1answer
113 views

Maintaining stylesheet information in Cell[]

I am working on formatting a cell for a slideshow presentation format such that a graphics object occupies the left half of the cell and bullets or other items occupy the right. The ancient ...
4
votes
2answers
94 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: ...
4
votes
2answers
235 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
136 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 ...
4
votes
1answer
66 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?
4
votes
2answers
239 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 ...
4
votes
1answer
74 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 ...
4
votes
0answers
99 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 ...
3
votes
4answers
115 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 ...
3
votes
1answer
82 views

How can I programmatically remove tagged cells without scrolling to them?

I've learned a rather succinct way to delete tagged cells using NotebookLocate, but I would prefer the notebook did not scroll to the selection just for a delete ...
3
votes
1answer
81 views

Want actual cell data from CellEvaluationFunction

Let's say I print a cell like so. CellPrint@Cell[ BoxData[" "], "Input", Evaluatable -> True, CellEvaluationFunction -> Function[Print[#];] ] Now I ...
3
votes
1answer
67 views

Column and CellLabel

Is it possible to add a CellLabel over multiple lines? When trying the code SetOptions[ NotebookSelect[mb], CellLabel-> Column@{"line 1", "line 2"} ] with a ...
3
votes
1answer
77 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 ...
3
votes
0answers
55 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
51 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: ...
3
votes
0answers
203 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 ...
2
votes
4answers
148 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 ...
2
votes
2answers
61 views

Get the unevaluated expression from a numbered cell

If a cell exists as below: In[1] := (xyPoints = {{1,2},{2,5},{3,10}}; ListLinePlot[xyPoints]) Is it possible to get at the expression rather than the plot shown ...
2
votes
1answer
113 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 ...
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?
2
votes
1answer
124 views

WholeCellGroupOpener and Hyperlinks

My problem is: I would like to activate WholeCellGroupOpener on a cell containing hyperlinks. But when I do that, the hyperlinks are no longer active. Is there a way to change the order of the two, so ...
2
votes
1answer
83 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
39 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
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: ...
2
votes
1answer
49 views

Why TeXForm[] do not display to notebook if followed by OutputForm[] in same cell?

Can someone please explain to me the logic of this: In one cell, when writing ...
2
votes
1answer
49 views

Options CellLabel not showing

I'm back with the labels and tags questions! Here is my code: mb = CreateDocument[Null, ShowCellTags -> True]; In the new document, I create a new cell, add ...
2
votes
1answer
58 views

Label cell goes away with SelectionEvaluate

When a given cell has a label (given with the CellLabel->"label" option of the cell), then this label disappears after calling SelectionEvaluate[ nb ] when the ...
2
votes
1answer
59 views

Prevent Cell Deletion

How might I be able to prevent a Cell form being deleted when you press the Delete key? Maybe there is a way to display some type of ...
2
votes
1answer
53 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 ...
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 ...
2
votes
1answer
92 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 ...
2
votes
1answer
100 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 : ...