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)

14
votes
4answers
397 views

Is there a way to make links to functions in a notebook?

Frequently I'm working on a function that's at the top of my notebook in a "functions" section, but I'm looking at the output of it in a lower "body" section of the notebook. When I want to edit the ...
14
votes
1answer
978 views

How to copy code out of notebook to an external text editor without extra line feeds being added?

I am simply trying to copy code from a cell (input cell) in a notebook, to paste the code into a plain text editor, and not have some lines wrap in the middle. I need to copy the code, as is, to a ...
13
votes
4answers
6k views

How to change default notebook background color?

How does one change the default notebook background color?
13
votes
3answers
803 views

Is it possible to insert an animated image into Mathematica notebook?

I find it very convenient to use Mathematica notebooks to organize the codes + results. I was wondering if it is possible to insert an animated image (say an animated gif) in the middle of a notebook....
13
votes
2answers
974 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 ...
13
votes
1answer
167 views

What is “MemoryMonitor”?

Evaluating one of the following inputs ...
13
votes
1answer
256 views

How to share a notebook?

I have a folder in dropbox syncing to my desktop. I tried sharing a notebook file this way, but this generates lots of errors, conflicts, and data loss: I have notebooks with Dynamic and other ...
13
votes
1answer
289 views

How to restore corrupted files?

I have a file that I can't reopen because MMa was "Not Responding" and I had to shut it down. I found links online to this: http://support.wolfram.com/kb/12423 I executed those two instructions in a ...
13
votes
1answer
124 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?
13
votes
1answer
606 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 ...
13
votes
1answer
294 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 ...
13
votes
1answer
508 views

Saving a notebook as a $\LaTeX$ file, with syntax highlighting preserved

How can I save a notebook as a $\LaTeX$ file, while preserving the syntax highlighting (such as input/output boxes)?
13
votes
1answer
281 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 ...
12
votes
3answers
595 views

Multiple notebooks in Mathematica

While working with multiple files in Mathematica, is there a way to have the names of the files appear along with the minimized window of the file. I mean that sometimes I forget which file was places ...
12
votes
1answer
430 views

“Choose how to enter input” - leave me alone

How do I get rid of this: I can't find the appropriate entry in Option Inspector or in WolframPredictiveInterface.
12
votes
3answers
791 views

Opening new notebooks with a non-default window size

I'd like to set Mathematica (8.0.4.0) up so it opens new notebooks with the "NaturalColor" stylesheet and with a WindowSize like ...
12
votes
1answer
299 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: ...
12
votes
1answer
217 views

Cell brackets on left side?

Is it possible to have the cell brackets on the left? I looked through the options and couldn't find anything, but maybe it's some kind of esoteric style setting or something. The reason I'm looking ...
12
votes
1answer
528 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 ...
12
votes
0answers
196 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 ...
11
votes
2answers
392 views

Create new notebook at fixed size

Using Ctrl+n we are effectively doing FrontEndTokenExecute["New"] and, at least on Windows, a new window has a WindowSize equal ...
11
votes
3answers
219 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 ...
11
votes
3answers
487 views

Drawing an arrow pointing at the “Enable Dynamics” button

Sometimes my students are given Mathematica notebooks as part of an assignment, and asked to go through some demonstrations contained in the .nb file. A lot of times I get complaints that the "graphs ...
11
votes
2answers
552 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 <...
11
votes
2answers
465 views

How can I make a cell that contains an image which can be shifted?

When you're looking at some help pages, they may have cells containing images which can be shifted within the cell by left-clicking and dragging the mouse. Here is a sample: tutorial/...
11
votes
1answer
337 views

Docked Cell lesson chooser

I have a question about creating a docked cell that will let me choose files. This is just as much a "design" question as a Mathematica question. I'm a math teacher and I want to bundle a bunch of ...
11
votes
2answers
319 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 ...
11
votes
3answers
303 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.: ...
11
votes
2answers
183 views

stop notebook evaluation when Assert fails

I would like a notebook evaluation to entirely stop when an Assert fails, without quitting the kernel. Is this possible (e.g., by setting ...
11
votes
1answer
105 views

Is there a way to change the indentation behavior of the postfix operator //?

For example, using newlines after // results in some really weird indentation: Ideally, I'd love to be able to do something like this: ...
11
votes
3answers
447 views

Typeset unbalanced brackets

In LaTeX, you can typeset expressions containing unbalanced brackets, by balancing them with an invisible delimiter \left. or ...
11
votes
1answer
1k 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 ...
10
votes
3answers
2k 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, ...
10
votes
2answers
377 views

Prevent text from wrapping in a notebook

By default in the Notebook interface the text wraps. Is it possible to prevent this wrapping?
10
votes
3answers
1k 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: $ \...
10
votes
3answers
3k 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 ...
10
votes
2answers
219 views

What are the purposes of functions in FrontEnd` context which are duplicates of those in System`?

I noticed that for notebook-related heads, there are usually a pair of same functions, one in System context, another in FrontEnd...
10
votes
2answers
267 views

Backslash commands in strings?

I discovered by playing around that Text[DisplayForm@SubscriptBox["\[Lambda]", "k"]] produces the same result as ...
10
votes
1answer
563 views

Why is plot legend unsafe?

It has been fixed in version 10. Every time I open a notebook contains a legend, I get the message warning that it's not safe. The file contains potentially unsafe dynamic content. Why does ...
10
votes
1answer
255 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 ...
10
votes
3answers
792 views

How do I remove the top bar and bottom bar from the Mathematica window?

Any idea how to remove the top bar saying "Wolfram Mathematica .... Demonstrations MathWorld Studenforum Help" from the Mathematica main window (see screenshot). It has no use to me and it ...
10
votes
2answers
173 views

List of Recently Opened Files

If I go to the menu bar and press File I get a list of recently opened files.This would be useful except they are edited and mostly replaced by dots thus making choosing difficult. See the screen shot ...
10
votes
2answers
236 views

How can I set a fixed cell height?

I did this often in previous versions of the Mathematica notebook front end. I would have a cell with lots of raw data, e.g. a very long list. The list might go on for pages. I would set the cell ...
10
votes
3answers
749 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, ...
10
votes
1answer
127 views

Creating Saveable->False notebooks

Bug introduced in 10.3 or earlier and persisting through 10.4.1 Reproduced on Windows 7, 10 Bug confirmed by WRI: [...] It does appear that the Saveable Notebook Option on Windows is not ...
10
votes
1answer
375 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?
10
votes
1answer
213 views

Notebook's WindowSize interference with contents' Dynamic ImageSizes

Bug introduced in 8 or earlier and persists through 10.4.0 or later Consider the following MWE: ...
10
votes
1answer
179 views

Accessing the Options of the parent Cell

From within the Kernel, it is possible to access a Cell's options using CurrentValue. For instance, in a ...
9
votes
5answers
2k 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 ...
9
votes
2answers
281 views

How to return notebook's own file name

What command within a notebook will return the file name of that notebook?