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)

7
votes
1answer
1k views

How to add more levels to Outline notebooks

The Outline stylesheet only seems to cover 6 levels of depth. Is there any way to increase that? Here's an example. Hitting tab on the last level just indents its content, but doesn't add another ...
7
votes
1answer
155 views

Inlining calculations in a notebook

Context In $\LaTeX$, I can write something like: Thus, we have $x = \sqrt{2}$, ... the $ ... $, as opposed to $$ ... $$, inline the LaTeX symbols. Now, with ...
7
votes
1answer
149 views

ClearAll just for current notebook

So in my search to fine tune Mathematica to what works for me, I found a nice setting that helps separate variable declaration between notebooks. Under Global Preferences, searching for CellContext ...
7
votes
1answer
126 views

Some way to identify the source of a notebook file?

Is there a way to tell where a Mathematica file came from, meaning some type of machine ID (yes, I know about $MachineID). I want to be able to identify students ...
7
votes
1answer
214 views

How to do computations simultaneously in multiple notebooks? [duplicate]

I have a Mathematica script which takes a few hours to run. I want to be able to open another notebook while it's running and do some other computations. I have enough many cores on my computer for ...
7
votes
3answers
272 views

Keep palette visible when Mathematica application loses focus

When the Mathematica application loses focus, palette windows disappear (normal notebooks and dialogs (CreateDialog) stay). This is usually convenient because the ...
7
votes
1answer
234 views

Setting up TextStyle with initialization cells in Mathematica 6+

It used to be quite straightforward to change the default settings of a notebook in terms of inputs, outputs, text styles and font sizes in previous versions of Mathematica using initialization cells ...
7
votes
3answers
365 views

How to effectively diff a notebook?

How to effectively diff a notebook with another version of it? This is usually needed/encountered in revision control, but can be generally useful. What i currently do is disable notebook history, ...
7
votes
1answer
516 views

Excel-like UI in Mathematica

This is NOT about importing/exporting Excel data to/from Mathematica. This is purely a UI question. The Mathematica notebook interface is very "linear" — I type in an input cell and Mathematica ...
7
votes
1answer
133 views

When are EvaluationNotebook[] and ButtonNotebook[] different?

I am looking for a concrete code example where EvaluationNotebook[] and ButtonNotebook[] will return different results. The ...
7
votes
1answer
161 views

How to sort cells in a notebook based on cell tags?

Suppose I have a notebook with cells tagged with both numbers and words with numbers always list first, and some cells without cell tags e.g.: ...
7
votes
0answers
285 views

Can I modify line-break behavior of inline cells?

When I insert an InlineCell into a TextCell that is too long for the whole InlineCell to fit ...
7
votes
0answers
371 views

How can I export aligned equations to $\LaTeX$?

Using Palettes -> Writing Assistant -> Math Cells, you can enter aligned equations such as: ...
6
votes
3answers
326 views

How do I create a package from an existing notebook?

I have a notebook containing some functions, for example: f[x_] := 2*x g[x_] := x^2 Now I would like to convert this notebook to a package, ...
6
votes
3answers
760 views

Quickly editing the stylesheet and saving it

I have a private stylesheet I'm using. I edit it by going to the menu Edit->Edit Stylesheet and then clicking on the private stylesheet cell. I can modify whatever I want but it never gets saved. The ...
6
votes
2answers
702 views

Converting a notebook to plain text programmatically

It is possible to export a notebook to plain text format (practically just extracting all the text from it and discarding formatting) using the ...
6
votes
4answers
169 views

How to select only NotebookObjects that are referring to ordinary notebooks? (not palettes etc.)

There is of course function Notebooks[] But, unfortunatelly it hasn't got useful options in this context. My question is how to pick ...
6
votes
2answers
303 views

How do I get the equivalent of the $\LaTeX$ \tag{} in Mathematica?

How do I get the equivalent of the $\LaTeX$ \tag{} in Mathematica? $a+b=x \tag{1}$ I'm not necessarily asking how to use the $\LaTeX$ \tag{} itself in ...
6
votes
1answer
150 views

How to modify font for all text fields?

I know that one can modify the StandardForm style so that all input and output codes (and maybe other things too) follow that style. This makes it tricky to make input code different from output code ...
6
votes
1answer
128 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
1answer
97 views

Auto highlighting input cells depending on input expression (eg its Head)

Is it possible to programmatically highlight (eg, by change background color) an input cell conditional on the input expression's Head (or other attributes) upon evaluation? For example, would like ...
6
votes
1answer
187 views

How to create a “standard” CDF programmatically?

How can I programmatically create a CDF which is similar to the CDFs created by File -> CDF Export -> Standalone...? ...
6
votes
2answers
198 views

Automatically use InputOnly style

Some of the built-in Stylesheets (e.g. PastelColor) connect together input and output cells by setting the CellFrame and ...
6
votes
1answer
172 views

Unable to save changes in Option Inspector from one session to another for the Documentation Center

I wanted to change the global option "WindowsSize" to the "large" value using the Option Inspector. It works well for the current session. But then I realize the "Apply" button was greyed and not ...
6
votes
1answer
437 views

Indenting bulleted lists in Notebooks

I currently use Word for notes, making nested bulleted lists as I go. I've just started using Mathematica and would like to do the same in its Notebooks, but it doesn't look like it has that ...
6
votes
1answer
106 views

ClearAll[“Global`*”] stops working with Context set to 'unique to this Notebook'

I just changed my default notebook context to 'unique to this Notebook' so that variables don't roll across numerous open notebooks. Doing this, however, made the command ClearAll["Global*"] stop ...
6
votes
1answer
163 views

How to edit a HYPERLINK once created inside a notebook?

When a hyperlink is created in a notebook, there does not seem to be an easy way to actually edit the hyperlink (maybe to correct the URL). To make some text HYPERLINK, one selects the text using the ...
6
votes
1answer
152 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?
6
votes
1answer
163 views

How to prevent notebook from moving/reshuffling code around while one is typing?

Is there a way to configure Mathematica so that the code does not move around while one is typing? It is driving me crazy and I can't see what I am typing as the code is being reformatted while ...
6
votes
1answer
128 views

Keyboard shortcut for moving to last edit location/cell

When you have long notebook with hundreds of cells, you sometimes need to scroll/jump manually to your last edited cell. I dind't find any shortcut for doing that. Any ideas?
5
votes
3answers
641 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
2answers
280 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
135 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
4answers
171 views

Dialog inside dialog not DialogReturn-ing properly

How can I prevent the DialogInput from failing (or returning early) as soon as I close the "Close this" dialog? ...
5
votes
1answer
216 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
110 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
3answers
297 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
102 views

How to get the list of notebooks that are automatically opened when Mathematica starts?

How to get the list of notebooks that are automatically opened when Mathematica starts programmatically? I know a tedious approach is opening option inspector and finding and copying the list out.
5
votes
1answer
65 views

Custom default ImageSize while allowing inheriting

When displaying graphics in the Mathematica front end, and leaving ImageSize at the default, the result will always keep its previous size. For example, ...
5
votes
1answer
116 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
3answers
242 views

Storing data in the Notebook in readable form

The common problem in my theretical work is a need to import some experimental data to work with. This means that my notebook depends on some external files which makes it difficult to share it with ...
5
votes
1answer
183 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
59 views

Details of automatic cell-grouping w.r.t. cell-style

What determines how a specific cell-style influences grouping of cells? For example "Text" following "Subtitle" is grouped but ...
5
votes
1answer
147 views

Extracting text from cells, preserving non-ASCII characters

Consider the following setup, based on this answer by WReach: ...
5
votes
1answer
147 views

how to select all cells with specific property such as the ones that are closed

I have to close many cells each time before I export a notebook to HTML since I do not want to display many code cells and other cells. I select each cell one by one, and do ...
5
votes
1answer
301 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
101 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
107 views

What is the difference between NotebookEvaluate and FrontEndToken

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

how to efficiently jump between sections in a notebook?

I have functions defined in some section of the notebook and some cells where I use these functions maaaaany pages below in the same notebook. If I want to go and change the definition of the function ...
5
votes
1answer
692 views

Manipulate (Linux version of Mathematica)

I'm runnning Mathematica 9 on Ubuntu 11.10. After installing CDF player I still have problem (most of time) with Manipulate. Only way I'm able to change value of a ...