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
137 views

Inheriting Stylesheets when using CreateDocument

I build a lot of presentations and custom notebooks with very different stylesheets, and use Button and CreateDocument quite ...
6
votes
1answer
142 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
158 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
182 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
128 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 ...
6
votes
1answer
353 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
148 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
122 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
110 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?
6
votes
0answers
114 views

How to convert a notebook cell to a string retaining all formatting, colorization of identifiers etc?

I have an opened Mathematica notebook containing several cells. Suppose, I am interested in one of them -- it may contain a complete or incomplete expression (e.g. with syntax errors, highlighted ...
5
votes
3answers
486 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
640 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 ...
5
votes
3answers
167 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, ...
5
votes
2answers
594 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 ...
5
votes
2answers
268 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 ...
5
votes
2answers
122 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
91 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 ...
5
votes
4answers
153 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
2answers
392 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 ...
5
votes
1answer
105 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
284 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
89 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 ...
5
votes
3answers
236 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
158 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
56 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
136 views

Extracting text from cells, preserving non-ASCII characters

Consider the following setup, based on this answer by WReach: ...
5
votes
1answer
131 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
295 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
91 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
76 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
84 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
0answers
115 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
88 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
116 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
1answer
115 views

How to programatically save a notebook created by CreateDocument

I've already written code that generates about 20 notebooks using "CreateDocument" and I was wondering if there exists a method to automatically save them. Is there an easy way to create a notebook ...
4
votes
1answer
151 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 ...
4
votes
1answer
171 views

Embedding Mathematica Console into a Java/.NET Application [duplicate]

I enjoy using Mathematica's notebook interfaces, but more specifically the autocompletion in each notebook. I'm in need of a way to put tons of Mathematica windows on the same page. It would be an ...
4
votes
1answer
76 views

Why selecting text in my notebook become abnormal?

Selecting text in one of my Notebooks becomes abnormal. Here is the unselected text: and here is the partly selected text: When the text being selected, it should be like this: What is wrong ...
4
votes
2answers
482 views

How do you configure Mathematica 9 to automatically evaluate all notebooks?

I have a Mathematica 6 course that I am using in Mathematica 9; there is no updated version. Every time I open a notebook I have to go to the Evaluation menu and click on "Evaluate Notebook". Is there ...
4
votes
1answer
439 views

Keyboard shortcut to evaluate notebook

(If this is entirely trivial, although I couldn't find an answer as much as I searched the archives, I will delete the question.) How could I add a keyboard shortcut to evaluate the entire notebook ...
4
votes
1answer
161 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 ...
4
votes
1answer
113 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 ...
4
votes
1answer
105 views
4
votes
2answers
150 views

Background color of Code cell lost when convert a notebook file to pdf

Well, I have a notebook with the built-in stylesheet Preprint, which I'd like to convert it to pdf. Everything works well except for the code cells(I use the shortcut key alt+8 to create cells of code ...
4
votes
1answer
89 views

Why can't I change the style of a cell repeatedly?

I ran into this when I was working with an example from the Help Pages of V9. Cells is a new function added in V9. The following appears to work the first time it ...
4
votes
2answers
186 views

Adapting “Find and Replace” functionality to work with Patterns

I was thinking if there is something like Find and Replace (Crtl+F) functionality adapted to work with patterns. Probably not, but it seems possible to create this with some effort and skills in ...
4
votes
1answer
126 views

Tweaking Prime[n] to return 1 when n==0

I manually evaluate this cell to set Prime[0] Unprotect[Prime] Prime[0] = 1 Protect[Prime] I manually evaluate this cell to reset Prime[0] ...
4
votes
1answer
56 views

Evaluate open cell segments in a notebook

The Evaluate > EvaluateNotebook evaluates the whole notebook. Is it possible to somehow evaluate ONLY the open sections of a notebook?
4
votes
1answer
113 views

Can I customize In[] and Out[] headers?

Can I customize the In[] and Out[] headers? I'd like to add $UserName, ...
4
votes
1answer
116 views

Unexpected result when reading Cell with comment-lines by NotebookRead

When considering this question about re-formatting Cell (also this one), I encountered an issue which confuses me. I'll let the code itself speak: Consider the ...