Questions on Notebooks (*.nb, *.ma in earlier versions), structured interactive documents produced by Mathematica that can contain text, graphics, sound, calculations, typeset expressions, and user interface elements.

learn more… | top users | synonyms (1)

6
votes
1answer
206 views

Extracting text from cells, preserving non-ASCII characters

Consider the following setup, based on this answer by WReach: ...
6
votes
1answer
2k views

Automatic recovery after crash

I want Mathematica to periodically autosave my notebooks to the temp folder. And in case of front-end crash i want to see the dialog after restart with the following choices: recover from autosaved ...
6
votes
1answer
290 views

Context “Unique to This Notebook” makes variables black even if they're not defined?

I'm trying to use this technique to keep variables separated between different notebooks. It seems to be working fine, except that variables turn black as soon as they are evaluated — any ideas why ...
6
votes
1answer
118 views

Make all new cells have a specific style as a function of the Mathematica installation

I would like all new Input and Output cells, in fact all new cells including section headers and such, to have a specific stylistic property (...
6
votes
0answers
271 views

Bug report: Attempting to Save Selection As… in a magnified Notebook fails with errors [duplicate]

Bug introduced in 9.0.1 or earlier and persisting through 10.0.2 or later I have found that attempting to Save Selection As... in a magnified Notebook fails with errors. On my system it can be ...
6
votes
0answers
219 views

What is the difference between NotebookEvaluate and FrontEndToken

I am wondering what exactly are the differences in using NotebookEvaluate[filename] vs ...
5
votes
3answers
1k views

Is it possible to typeset left and right angle brackets?

I would like to typeset the following in a Mathematica notebook: $$\langle P \rangle$$ Is it possible to typeset left and right angle brackets? In $\LaTeX$, they are given by ...
5
votes
3answers
174 views

How to center a graphic in its output cell

Say I have produced a single graphic ouput, perhaps a plot. Instead of displaying left-aligned in the notebook, I would like it to display in the center of the output cell. I would like it to stay ...
5
votes
4answers
130 views

How to set the output be generated in a cell different from “Output”

I would have some functions, for instance Plot, to generate their output using a different Cell's style rather than "Output". The reason is that I'm producing some documents with many images and, for ...
5
votes
2answers
358 views

Adjusting size and positioning of math notation in a Mathematica notebook? [duplicate]

Writing mathematics in a notebook is OK, but consider the following image: In LaTeX, I can write: $$y^2=\frac{1+2\sin^{-1}x}{2}$$ which displays as: ...
5
votes
3answers
312 views

How to highlight the whole selected cell

Is there any way to highlight the whole selected cell? some times if I want to delete a certain cell and if the code is long and cells are without output, it is hard to know which cell that you are ...
5
votes
2answers
355 views

What kind of Mathematica license do i need to create cdf documents for my students and put them on my (academic) page at the university?

I'm an enthusiastic university teacher willing to exploit Mathematica for teaching purposes. I would like to know what kind of Mathematica license would let me: create notebooks and cdf documents to ...
5
votes
2answers
329 views

How to make a notebook that will be window maximized when open?

I use CreateDocument[cells, opts] to create a notebook. When the notebook is open, it has a small default windows size and I need to manually maximize it every ...
5
votes
2answers
257 views

Evaluate notebook from other notebook

I have a notebook ("notebook 1") which in the beginning sets some parameters, does something depending on their value and saves the result to a file, say: ...
5
votes
2answers
3k views

Run entire notebook

I have created a notebook, with functions. The only thing that I want to change in the notebook later is the input file. I therefor want to have a button that runs every input step-by-step so that I ...
5
votes
2answers
178 views

Capturing an F1

I teach an Intro to Mathematica course, and one of the things I try to reinforce early on is just how helpful Mathematica's help is. In the very first lab for the course, I even give the students a ...
5
votes
2answers
158 views

How can I determine the hyperlink of a currently opened documentation page programmatically?

Every pages in the documentation has a hyperlink. Here are some examples: ...
5
votes
1answer
441 views

Setting a Counter in Mathematica Notebook

I would like to write a book using Mathematica, but I will write one chapter on several files. How to tell Mathematica that the BookChapterNumber pointer has the ...
5
votes
1answer
132 views

Remove CellMargins option from many cells

I have a very old notebook in which many cells had the CellMargins option set manually. What's the easiest way to remove all those manual option settings?
5
votes
1answer
176 views

How can I get osx split screen to work

OSX on Mac now allows two apps to split the screen. https://support.apple.com/en-us/HT204948 Doesn't seem to work in Mathematica, even though the full-screen button displays an icon suggesting that it ...
5
votes
3answers
344 views

More structure in Source Code/Notebooks

Mathematica is great for small and quick projects and has a great syntax. However as soon as a project grows I run into trouble. How do you scale and maintain projects in Mathematica? What is beyond ...
5
votes
1answer
150 views

How do I force columns in a Grid to be equally spaced?

Suppose that I have this table tab, which I display using Grid. Is it possible to force the columns to be equally spaced? All ...
5
votes
1answer
33 views

How to print cell exactly at the bottom of a notebook?

I have a notebook used as "to do list" at whose top I want place a button to add automatically, at the end of the notebook, a cell containing the current date and time, and one for the "to do" note. ...
5
votes
2answers
2k views

Taking class notes with a Mathematica Notebook

Dose anyone take notes in a technical class using a Mathematica notebook? If anyone does, how does it compare to paper and are there useful commands? I have a hard time remembering ctrl/alt/esc ...
5
votes
1answer
71 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
96 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
143 views

How to stop V10 asking to continue with updated styling each time I open a new notebook

Each time I open a new notebook, using File->New->Notebook, I get this message Then I check on the "Do this for all notebooks". But when I repeat this and want to create a new notebook, it asks ...
5
votes
1answer
966 views

Automatically dealing with “disable dynamic updating”

I'm programmatically creating notebooks containing dynamic content. When a new notebook is being created, a window pops up: I then manually click on "Continue" and it will create the notebook. The ...
5
votes
2answers
874 views

Deleting Print results

While playing around with $Pre and $Post I created this very annoying piece of code: ...
5
votes
1answer
83 views

How to get “one Cell - one line” code format inside of NB files?

The PageWidth option controls the way the Cell's content is displayed, not the manner it's written in a ...
5
votes
1answer
115 views

How to set different background, input and output colors

I want to create a notebook where the background is one color, the input cells are another color, and the output cells are white. I have tried messing around with Option Inspector and creating a ...
5
votes
1answer
190 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
324 views

Reading Early Version Notebooks

I have some very old Mathematica notebooks file (.m) files from Version 2. When I try to open them using Mathematica 8.0 (on a Linux system) Mathematica instantly shuts down (no error message - just ...
5
votes
1answer
295 views

How to replace a string within a selected region in a notebook?

I want to replace a string in a selected region/cell in mathematica notebook/package. I searched but didn' t get any result. I think it' s a quite common feature for editors/programming environments. ...
5
votes
2answers
51 views

How to disable user-interaction with Notebook during manipulating it from the Kernel?

When manipulating a Notebook from the Kernel using such functions as NotebookLocate, SelectionMove, ...
5
votes
1answer
127 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: ...
5
votes
1answer
210 views

DynamicModule inconsistent behavior; was: DynamicModule persistent UI changes

Update: I'll restate the question in hopefully more terse and clearer terms. To illustrate the issue, run this and save the resulting notebook: ...
5
votes
1answer
331 views

Security of Mathematica Demonstrations

Apologies if this is overly paranoid. I recently discovered the Wolfram Demonstrations Project and intend to play with them to understand some of the power of Mathematica. I have one slight concern: ...
5
votes
1answer
104 views

Split screen view in notebook interface?

Is there a way to get a split screen in the notebook interface? I want a movable horizontal bar in a window with two views into the same notebook, each of which is independently scrollable. An ...
5
votes
1answer
128 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 ...
5
votes
0answers
31 views

Is there a way to use iframes in a notebook?

For me, mathematica online is totally unusable, but the EmbeddedServices would be great to use. I wish that these functions worked in Mathematica, is there any hack anyone can think of to get these ...
5
votes
1answer
254 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 ...
5
votes
0answers
166 views

Embed a Microsoft RichEdit 8 control in a Mathematica notebook using .NETLink?

Does anyone know whether or not it's possible to embed a RichEdit 8 control within a Mathematica Notebook using .NETLink? The goal here would be able to both view and edit mathematical text typeset ...
5
votes
0answers
118 views

Clear Citation Style Cache

How can I clear the "Citation Styles Cache" created when you use the EndNote citation management feature for the first time in Mathematica. The Citation Management tutorial indicates that such a ...
4
votes
2answers
1k views

Why isn't autosave enabled by default?

While I've come across several ways to implement/enable autosave (see: Is there a notebook autosave frequency configuration?, Saving my code before cell evaluations: Insurance against front end ...
4
votes
2answers
169 views

Display full path of current notebook on title bar?

Is there a setting in Mathematica notebook interface to get the title bar to display the full path to the current notebook?
4
votes
2answers
215 views

Find a notebook I had open recently

I worked on a notebook a few weeks ago and now I can't find after looking through the most likely directories. The recent list only has 6 items in it, none of them the notebook in question. Is there a ...
4
votes
2answers
89 views

Setting WholeCellGroupOpener [duplicate]

When I write WholeCellGroupOpener, Mathematica autocompletes it, but it doesn't recognize it (it stays blue instead of turning black). Example: ...
4
votes
2answers
130 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
102 views

Save imported sound into a notebook (so I can e-mail it)

At the end of my code I'd like to put an imported (wav) sound. I would then play it with EmitSound[my_sound] when this cell will ...