Questions tagged [notebooks]

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.

Filter by
Sorted by
Tagged with
26 votes
6 answers
4k 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 ...
  • 8,621
66 votes
7 answers
18k 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 ...
  • 5,291
82 votes
2 answers
9k 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 ...
  • 2,563
42 votes
4 answers
11k views

How to Keep Input Cells Hidden After Evaluating Notebook

I've created a notebook for use in an in-class presentation. There is a fair amount of MMA code, and my students know nothing about MMA nor do they need to. I don't want to distract them with the code....
  • 1,429
22 votes
2 answers
5k 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 ...
19 votes
8 answers
7k 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 ...
  • 6,278
34 votes
3 answers
3k 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 ...
  • 6,605
20 votes
3 answers
5k 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, ...
  • 287
11 votes
1 answer
373 views

Programming scripts to create and modify stylesheets: problems with contexts

I am trying to emulate the shift and shift+tab feature in the Outline.nb stylesheet that comes with Mathematica. I added the following code to a private ...
  • 5,211
40 votes
3 answers
9k 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 ...
user avatar
67 votes
5 answers
5k 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: I ...
  • 127k
48 votes
7 answers
19k views

Is there a way to hide or toggle the visibility of code?

Many of my notebooks have a similar repeating structure, which is very convenient and reliable for my workflow: a chunk of code defining a Manipulate for exploring ...
  • 12.7k
17 votes
4 answers
1k 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 ...
  • 13k
11 votes
4 answers
982 views

Set the style of a cell

I know it's possible to programmatically change options on the selection in a notebook. I'd like to create a button that lets me change the style of a cell. It's a style that doesn't have a keyboard ...
  • 3,718
54 votes
5 answers
4k 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 ...
46 votes
1 answer
3k views

How to export a Mathematica notebook into Markdown?

Is there a way to export a Mathematica notebook into Markdown? I'm sure it's possible to implement rules for converting each Mathematica cell subexpression into Markdown, but I'm also sure that I ...
  • 30.8k
13 votes
2 answers
687 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 ...
  • 135k
36 votes
2 answers
3k 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?
  • 30.8k
33 votes
2 answers
22k 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 ...
  • 1,627
31 votes
1 answer
2k views

How to write documentation in Wolfram Style?

Rather than craft my own stylesheets for documentation, I'd like to emulate (copy? ape? borrow?) the Wolfram style. Here is a very small example (type this in the help-box, which you get by pressing <...
  • 8,621
17 votes
3 answers
4k 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, ...
  • 18k
13 votes
3 answers
2k 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 ...
  • 42.1k
12 votes
5 answers
1k views

Searching a phrase in all *.nb files

I have so many *.nb files in a folder. In one of them I have written a phrase, unfortunately I cannot remember that file. I am searching about it and the file in ...
  • 4,737
59 votes
5 answers
4k 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 ...
  • 6,726
32 votes
4 answers
9k views

Relative paths for portable notebooks in Mathematica

I cannot find how to use relative paths in Mathematica. My directory structure is simple. ...
29 votes
2 answers
1k 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 ...
27 votes
1 answer
2k 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 ...
  • 4,461
17 votes
1 answer
2k 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 ...
  • 127k
11 votes
1 answer
2k views

Triangle that collapse cells

I'm not very good in English , so is hard to explain but how put the triangle in the left that deploy or collapse a group of cells ?
  • 619
30 votes
4 answers
8k 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 ...
  • 3,034
27 votes
2 answers
2k 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..." ...
24 votes
5 answers
17k views

How to change default notebook background color?

How does one change the default notebook background color?
  • 385
20 votes
1 answer
619 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 (...
  • 231k
18 votes
3 answers
4k 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 File -> Save As......
  • 231k
17 votes
3 answers
2k 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....
16 votes
3 answers
493 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: ...
  • 231k
12 votes
1 answer
348 views

Notebook's WindowSize interference with contents' Dynamic ImageSizes

Bug introduced in 8 or earlier and persists through 11.3 Consider the following MWE: ...
  • 135k
11 votes
2 answers
473 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 ...
8 votes
1 answer
858 views

Can I enter the traditional form for Binomial as input in an expression?

Is there a way to enter the traditional form of a binomial coefficient, i.e. ${n \choose k}$ instead of Binomial[n,k], like I would enter a radical sign $\sqrt{x}$ ...
  • 4,919
8 votes
3 answers
494 views

Friendly way to make previous large calculation results reusable in a new session

Very often, I need to do same calculations under different parameters for comparing the results. Every calculation may generate a large data set; for example, the calculation result of ...
  • 16.6k
8 votes
1 answer
2k views

new kernel for notebook

I know I can create a new kernel for my notebook from the evaluation menu but is there a command for this? I'd really like some of my notebooks to startup their own kernel as the first line of code.
6 votes
1 answer
699 views

How can I make an invisible Cell?

Notebooks have a Visible option, but Cell // Options doesn't mention any equivalent for <...
95 votes
5 answers
9k 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 ...
user avatar
20 votes
2 answers
3k 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,621
19 votes
1 answer
469 views

Any manual on cell grouping management?

Recently I come back to the problem of cell grouping and performed extensive search on this site and on MathGroup archive for information on how to use the possible values of the ...
18 votes
3 answers
6k views

Keeping Text Size the Same Throughout Entire Notebook File

Is there a way in which when you choose to format the size of the font within your notebook, for a particular cell, when you go into another cell, the default size font (12pt) will not be re-activated....
  • 1,699
17 votes
2 answers
500 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?
  • 30.8k
15 votes
3 answers
3k views

How do I remove the top bar and bottom bar from the Students 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 steals ...
  • 251
14 votes
2 answers
813 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 <...
12 votes
2 answers
1k 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 <...
  • 135k

1
2 3 4 5
8