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.
28
votes
2answers
708 views
Is there a way to separate variables between multiple notebooks?
I often correct homework by checking the calculations in Mathematica. Sometimes you would like to have two solutions open at once. However often defined symbols such as ...
3
votes
2answers
422 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 ...
20
votes
1answer
316 views
Open two copies of the same notebook
Is there a way to open one notebook in two (or more) different windows? This can be helpful when working with a long notebook and one wants to edit one part of it while looking at a different part. ...
21
votes
3answers
636 views
How to place an image inside a notebook, with the minimum memory footprint?
When creating a notebook with images, like photos, the file tends to quickly get big, which makes it difficult to use the notebook format for training material containing a lot of images.
Are there ...
10
votes
2answers
827 views
Delete the current notebook cell using the keyboard
Is there another way than pressing Ctrl+. until the whole cell is selected and then pressing Del?
If this is not built in, can I create some sort of a global macro to do this and bind it to a ...
33
votes
3answers
1k views
Using the Mathematica front-end efficiently for editing notebooks
Background:
I have used Vim for 15+ years. There is a certain "one"-ness with the editor one achieves. Emacs users also experience this. Notepad users do not.
My current interaction with the ...
20
votes
4answers
711 views
Saving data inside a notebook so that I don't have to run it again?
Piggybacking on this, I am somehow not fully convinced that I can't save data generated by a calculation in a mathematica file so that when I re-launch said file, I wouldn't have to run my ...
16
votes
1answer
232 views
Saving my code before cell evaluations: Insurance against front end hanging
I guess my programming working style is not unique. I develop programs one cell at a time, and when I have some confidence about what I did, I put all my mess together refining the code, building up ...
19
votes
2answers
383 views
Programmatically copy code so that all output is commented out
UPDATE: The final palette has a new home here! Please test and provide feedback (usability, suggestions, bugs)
A note to the readers and voters: This is intended for community use, so please test the ...
16
votes
3answers
504 views
Are there suitable versioning systems for Mathematica notebooks?
I am considering a project using Mathematica and openCL. I know that the openCL C source code can be tracked.
Has anyone used a versioning site or software so multiple developers can modify a common ...
22
votes
2answers
481 views
How can I set an image to be the Notebook's background?
Is it possible to set a notebook's background to a nonscrolling image?
14
votes
2answers
480 views
Is it possible to embed the Mathematica editor?
Is it possible to embed a Mathematica window into a .NET application? I mean not just the interop, but actually making the notebook editor window part of a .NET form. Is this possible?
10
votes
3answers
833 views
Programmatically generate packages from notebook files?
Currently, there are two ways I know of to generate a package (.m) file from a notebook file; one is to set the AutoGeneratedPackage option in the Option Inspector, ...
13
votes
2answers
599 views
Relative paths for portable notebooks in Mathematica
I cannot find how to use relative paths in Mathematica. My directory structure is simple.
...
9
votes
1answer
177 views
How to create a notebook element that can replace itself?
I would like to create a notebook element that can replace itself.
Here's an example to illustrate:
...
8
votes
2answers
486 views
Collapse a section of a huge function
(I have recently taken to Mathematica... still a noobie)
Is there an elegant way of hiding/collapsing only a portion of a function (for example, in Matlab, within a function, one can collapse the for ...
12
votes
1answer
296 views
CDF, Player, PlayerPro, or something else?
I have a notebook, which contains a dozen or so custom functions all leading to the production of a simple static report, something like this:
I want to distribute this to a single user who will ...
8
votes
2answers
145 views
Is it possible to create Evaluatable cell which will be automatically overwritten?
Am trying to generate an Evaluatable cell which itself is an output cell which will be overwritten when the original Input cell ...
6
votes
1answer
263 views
How to pipe a stream to another notebook?
Can I pipe an OutputStream object created by OpenWrite (or similar) to a notebook instead of a file? I am aware that I can use ...
5
votes
2answers
199 views
Is there a notebook autosave frequency configuration?
I've had Mathematica crash on me a number of times, and have had to recreate notebook contents from the last save point.
I was looking for something in the preferences like an autosave frequency ...
10
votes
6answers
445 views
Annoying display truncation of numerical results
I have a lot of data to inspect. An example of a number in my program is
123.189094
This gets displayed as
123.189
...
6
votes
2answers
221 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 ...
24
votes
2answers
600 views
Good ways to organize and document collections of mathematica notebooks?
I've now been using Mathematica for about a year, and am starting to get a somewhat unwieldy collection of notebooks. Sometimes I've figured out how to do a particular task in one of them, and want ...
8
votes
3answers
575 views
How to set default magnification for all windows
This is certainly a newbie question but I could not find the answer by searching.
I am using Mathematica 8 under Windows 7. I want to use default magnification of 150% for all notebooks and help ...
16
votes
3answers
331 views
How to get complete Documentation Center graph of guide pages?
On the very last image below you can see a typical path of walking through Documentation Center guide pages. What is the best way to get the graph data and visualize the whole structure of these ...
10
votes
2answers
186 views
How can I access a variable in one evaluator from another evaluator?
I have two notebooks, each with a different kernel. Is there a way to grab the value of a variable in KernelA from KernelB?
8
votes
0answers
106 views
Is there a convenient/automatic way of uploading a notebook into SE?
This post discusses how to streamline the other way - extracting code from a fragmented and longish SE answer but I imagine a two-way workflow like:
Fashion an answer/question in an SE-templated ...
17
votes
2answers
349 views
When to make (file.nb) instead of (file.cdf)?
I started with File > New > FreeCDF so I can save my work in a format compatible with the CDF Player. I can use Mathematica to make new cells, evaluate input and so in the CDF file. What are the ...
10
votes
2answers
366 views
How to make a parallel auto-generated .m package from Initialization cells?
according to the documentation at ref/InitializationCell,
When you first save a notebook that contains initialization cells, you have the option to make a ...
8
votes
3answers
340 views
How can I type left (sub)superscript?
I want to type in my variable next to its plot and I'm typing the text in using Inset. However my variable has superscripts to the left. Say it looks like this:
$ ...
8
votes
2answers
231 views
How do I automatically evaluate a cell when a notebook is opened?
I'm trying to put together a GUI in Mathematica and need to evaluate one cell to kick that off. Is there a way to automatically evaluate that cell when the notebook is opened? Here is an example of ...
4
votes
1answer
92 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 ...
2
votes
2answers
180 views
How can Magnify be forced to ignore the notebook's window width?
In a new notebook, I can illustrate how the action of Magnify is cut off by the window width:
...
9
votes
1answer
172 views
How can I change the style of every newly opened notebook?
I'd like to make Mathematica open a new notebook using the Natural Color template (under the Creative category) by default. Is that possible? If so, how?
7
votes
2answers
141 views
Save notebook without including Front End version information
How can a notebook be saved without including the front end version?
If you open a .nb file, you'll see something like
...
4
votes
1answer
107 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...? ...
3
votes
2answers
84 views
How can I change the highlighting color of an InlineMathCell?
When using the InlineMathCell one types Ctrl+9 within the text cell, and gets a slot for starting typing the InlineMathCell part. When typing the content of the InlineMathCell is slightly highlighted ...
2
votes
2answers
129 views
Evaluation of Notebook chosen by FileNameSetter
Please consider the following:
I have created a GUI where I can choose the path of a notebook (which I need for later calculation) via
...
1
vote
0answers
142 views
Manipulate (linux version of Mathematica)
I'm runnning Mathematica 9 on Ubuntu linux 11.10. After installing CDF player I still have problem (most of time) with Manipulate. Only way I'm able to change value ...
8
votes
4answers
616 views
Automatically counting the number of lines of code in a set of notebooks
How can I automatically count the number of lines of code "Input" existing inside all the notebook files contained in a specified folder?
I know there is the issue of considering or not the automatic ...
5
votes
3answers
196 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 ...
3
votes
0answers
83 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 ...
2
votes
1answer
66 views
Use different kernels for different Notebooks
I know that the command LaunchKernels[] starts up four kernels on my machine:
...
0
votes
1answer
73 views
Move selection to next Output and export to CDF
In my quest to a custom "Save as HTML" (please see context here) I am now able to iterate through the notebook, grab Input cells decorated with a CellTag that, by convention, is going to be a file ...

