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)

53
votes
4answers
3k 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 ...
39
votes
0answers
796 views

Numbered equations/formulas

How do you number equations in Mathematica notebooks so that they are exported correctly into latex? In case you don't know how to put numbered equations here is quick review. Open a new notebook ...
36
votes
2answers
1k 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 ...
32
votes
5answers
2k views

Can the banner in the Home Edition be removed?

The Mathematica Home Edition shows a banner at the top of every notebook: Is there a way to (permanently) get rid of it, without violating the EULA? Edit Yesterday, I sent this message to WRI ...
28
votes
2answers
800 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?
27
votes
4answers
2k 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 ...
27
votes
1answer
399 views

Do Mathematica notebooks include personal metadata?

I am about to send a Mathematica notebook to someone and I would like to make sure it does not contain any information that could personally identify me. I would also like to produce pdf files from ...
26
votes
1answer
741 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. ...
26
votes
2answers
924 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 ...
25
votes
4answers
995 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 ...
24
votes
1answer
377 views

Tool to locate bloat in a notebook?

In developing a notebook, I often find I have created a very boated file that takes a long time to save. I would like to slim it down. It is usually the result of graphics and images, but they may be ...
22
votes
3answers
984 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 ...
21
votes
0answers
211 views

Managing Stack Exchange favorites via Documentation Center

My Stack Exchange favorites are getting bigger and bigger. It is becoming unmanageable and is getting hard to find what I look for. A related question is Sort favorite questions. Is it possible to ...
20
votes
2answers
481 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 ...
20
votes
2answers
466 views

How to disable the small pop-up windows when mouse is over a Mathematica command in V10?

In version 10, when the mouse is over a Mathematica command, a small pop-up window comes up that one can click on for help on the command. Is there an option to disable this feature? Screen shot: ...
20
votes
3answers
981 views

How to find pieces of code responsible for syntax errors?

Especially: How to find the piece of code responsible for a missing parenthesis problem caused by a misplaced SuperScriptBox For last 30 minutes (and I was lucky ...
18
votes
3answers
4k views

What are the advantages of using .nb rather than .m files?

I can edit a notebook within the mathematica front end and then Save As a .m file, which produces output like this: ...
18
votes
2answers
581 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 ...
18
votes
2answers
433 views

Publishing a Mathematica notebook

I am considering publishing a Mathematica notebook, used for analysis of some data, as a “supporting information” file alongside a research paper. What are the common practices for doing so, and what ...
17
votes
6answers
1k 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 ...
17
votes
2answers
522 views

Attaching a file to a notebook

Is there a way to attach a file into a notebook and open it later with, for instance, a double click (or another action button)? In Mathematica windows version, the insert menu has the "object..." ...
17
votes
1answer
462 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 ...
16
votes
3answers
442 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 ...
16
votes
2answers
3k views

Pasting $\LaTeX$ into a Mathematica notebook

I have read that $\LaTeX$ source can be directly pasted into a Mathematica notebook. However, I have been unsuccessful in this regard. An example of the errors received are: ...
16
votes
1answer
211 views

Exclude Sections/Subsections/… from evaluation

I'm working on a large notebook and I want to exclude some sections and subsections from being evaluated when I evaluate the whole notebook. Is there a way to exclude specific sections or ...
16
votes
1answer
299 views

How does the built-in debugger decide what to highlight?

How does the built-in debugger decide which definition to highlight in the notebook when Break on messages" is enabled? Here's an example to illustrate what I mean. First, enable the debugger ...
16
votes
1answer
447 views

NotebookFind and String Pattern Expressions

Is there a way that NotebookFind can be used to match string pattern expressions rather than just strings? The documentation for ...
16
votes
0answers
638 views

How would I improve this Karaoke machine code?

I was looking at a large collection of Import/Export user suggestions the other day and it dawned on me that we finally have MIDI import in Mathematica 9, which is rather interesting since MIDI ...
15
votes
2answers
308 views

Automatically close Mathematica

It seems there are a lot of related topics but I haven't found an answer. I want to automatically quit Mathematica after some procedures are done but dialog window appears: ...
15
votes
2answers
640 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?
14
votes
2answers
301 views

refer to result of cell above current cell?

% allows to refer to the result of the preceding calculation (preceding in time) but this seems not necessarily to be the cell just above a given cell. How can ...
14
votes
3answers
2k 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 ...
14
votes
2answers
240 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?
14
votes
2answers
385 views

How to write plain Greek in a text cell

If I create a text cell and type some greek text, most of the symbols are italics as if the cell had an Input style. It doesn't happen with latin characters. I recollect that it is impossible to fix ...
13
votes
2answers
1k views

Relative paths for portable notebooks in Mathematica

I cannot find how to use relative paths in Mathematica. My directory structure is simple. ...
13
votes
1answer
246 views

Problems with images caused by which stylesheet is used

Update This looks now like it was a bug in Mathematica version 8, because everything works as expected - at least for this minimal example - in version 9. (As an aside, I couldn't seem to find ...
13
votes
1answer
375 views

Is it possible to colorize brackets in the notebook editor to see matches more easily?

I've seen that if I click on a square bracket [, I can then use "Check Balance" in the right click menu to see where the matching bracket is. Is there a way to see ...
12
votes
3answers
1k views

Collapse a section of a huge function

Is there an elegant way of hiding/collapsing/folding only a portion of a function? If functions could span multiple cells, this would have been straight-forward!
12
votes
2answers
3k 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 ...
12
votes
2answers
684 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 ...
12
votes
2answers
464 views

Saving a notebook without output lines

Is it possible to change the way Mathematica saves so that Out[] lines are never included? I have a .nb file that processes a ...
12
votes
3answers
290 views

Notebook vs. DocumentNotebook; display a Notebook inline, like a DocumentNotebook

If you evaluate a DocumentNotebook[] expression in the front-end, it nicely displays inline, inside of an output cell in the current notebook: For my purposes, ...
12
votes
1answer
483 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 ...
12
votes
1answer
105 views

Is there a callback for notebook exit?

I know that $Epilog is called when Mathematica is exited; is there a callback upon exiting the notebook? If so, what is it?
12
votes
2answers
818 views

How to export to HTML and not lose Grid Frame in the generated HTML?

This is a known issue for me with Mathematica. When I export a notebook to HTML, Mathematica loses some decorations such as Grid Frame lines (in grid and like objects). For example, creating this ...
12
votes
1answer
246 views

How to make an unremovable modal window?

Is there any way to securely stick a notebook window (e.g. a dialog) on screen that it cannot be closed/removed/hidden by any of the standard OS shortcuts, like AltF4 or AltTab under Windows? The ...
12
votes
0answers
113 views

How to keep the ctrl+shift+k help menu remain in display while typing?

In Mathematica 9, one can type ctrl+shift+k to display menu which has all the possible signatures/definitions for the function or command in question. One can ...
11
votes
4answers
3k views

How to change default notebook background color?

How does one change the default notebook background color?
11
votes
3answers
2k 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, ...
11
votes
3answers
186 views

How to collect expressions from cells created by Print?

I have a notebook where evaluation of a certain cell produced hundreds of adjacent output cells using Print. I need to create a list containing all expressions from ...