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
113 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 ...
7
votes
2answers
335 views

How to see the 'source code' of DockedCells? ALT: How to 'show expression' of DockedCell?

Here is a CDF file with the dockedcells toolbar (at the top). I'm trying to see how he created and positioned the logo, the formatting buttons, table of contents, etc, through a source code of it, but ...
7
votes
1answer
335 views

Customizing the Screen Environment

Is it possible to make Mathematica notebooks as stylish as this below with custom backgrounds and predictive text coloring? As shown in the snippet below? And possibly have the option to save the ...
7
votes
2answers
734 views

Viewing Mathematica Demonstrations Project Code

I hope I am going insane and the I'm not seeing the snake about to bite me... How does one view the code in the demonstration projects that one can download from wolfram.com? It seems like all of ...
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
157 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
194 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
129 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
252 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
1answer
120 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 ...
7
votes
3answers
292 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
243 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
405 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
560 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
137 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
0answers
307 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
377 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
831 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
793 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
174 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
313 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
2answers
456 views

How Can Notebook Know When it Called by Another Notebook?

I would like a notebook to behave slightly differently depending on whether it is evaluated from another notebook; i.e., ...
6
votes
1answer
166 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
134 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
196 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
204 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
202 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
480 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
182 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
179 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
168 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
133 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
744 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
312 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
2answers
300 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
145 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
182 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
257 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
113 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
303 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
126 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
111 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
70 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
120 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
245 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
200 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
63 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
156 views

Extracting text from cells, preserving non-ASCII characters

Consider the following setup, based on this answer by WReach: ...
5
votes
1answer
155 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
306 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: ...