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)

4
votes
1answer
119 views

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

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

How to make a notebook not savable?

How to make a particular notebook not savable? Optionally, how to do this by evaluating a command in the notebook?
4
votes
1answer
91 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 ...
11
votes
2answers
396 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: ...
3
votes
1answer
171 views

Use different kernels for different Notebooks

I know that the command LaunchKernels[] starts up four kernels on my machine: ...
7
votes
2answers
578 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 ...
2
votes
0answers
59 views

How to retroactively merge cell change history according to a merge interval

I recently noted that there is an option in the options inspector to set a merge interval for cell changes. This (I think) prevents a quick series of changes from spamming your notebook history with a ...
3
votes
1answer
118 views

Use NotebookWrite with Graphics?

I am trying to use NotebookWrite to paste a plot into another notebook. The code looks something like: ...
7
votes
1answer
149 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 ...
1
vote
1answer
57 views

How to change Compiled->False to Method->{Compiled->False} in multiple notebooks?

I have a collection of about 40 notebooks where the options for ParametricPlot and ParametricPlot3D have: Compiled->False and I need to switch any/all ...
1
vote
2answers
105 views

How to set the background of a section to light gray?

How to set the background of a section to light gray and leave background of content below and above the section as default?
11
votes
2answers
243 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 ...
5
votes
3answers
242 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 ...
4
votes
2answers
677 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 ...
3
votes
3answers
126 views

How to create a button that colors a selected piece of text in a cell?

I use Mathematica 9.0.1 and I want change the color of a selection in a text cell using a button. But when I use this code it changes the color of the entire cell. ...
4
votes
2answers
169 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 ...
2
votes
2answers
140 views

How to find out if invisible notebooks are still open

If I create a notebook CreateDocument and I set options such that Visible -> False, is there any way to tell if it's still ...
2
votes
0answers
38 views

Does an equivalent of marks in vim exist for navigating notebooks quickly? [duplicate]

Is it possible in the Mathematica front-end to associate a keyboard shortcut with a cursor location in the notebook (kind of like marks in vim) so that one can return to them quickly later? (Just ...
1
vote
1answer
97 views

Controlling preferences of deployed notebooks

The following screenshot shows a toy example to illustrate what I want to accomplish: The above mimics the structure a type of notebook that I want to deploy for both Mathematica and PlayerPro ...
4
votes
0answers
81 views

Is there a way to check whether two notebooks share the same variables?

When I code in Mathematica, I often re-use code from old notebooks which fulfilled a specific purpose; for example, one testing for soft matches in strings, or one that identifies outliers on a graph ...
3
votes
1answer
199 views

How to build and operate a master Notebook?

Suppose you have some notebooks, they work for a family of related tasks, each one doing a certain task. Lets say Notebook 1 gets two inputs from its variables in11 ...
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?
0
votes
2answers
268 views

Creating an API or Widget based on a Mathematica notebook

I'm trying to create a matrix calculator and graph tools for our website and was wondering if there is a way to create Wolfram API or Widgets based on a Mathematica notebook.
5
votes
1answer
690 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 ...
1
vote
3answers
132 views

Entering Sum in traditional form

The documentation for Sum says that it is possible to replace Sum by EscsumEsc. The limits ($i_\max$ and $i_\min$) should be ...
8
votes
1answer
186 views

How can I add a background to a stylesheet?

In version 9 we can set the background to an image, however I'd like to save this into a stylesheet that can be installed.
2
votes
1answer
105 views

Cell background color changes cell layout

When I change the background color of a cell like in the colored cells become slightly indented and their line spacing is increased. How can I change the cell background color while keeping the ...
2
votes
2answers
393 views

Copy last/second last (etc.) input from history into current cell

I like to use terminals (e.g. gnome-terminal) where you can use the up key to copy the last command into the current input 'field'. For example, to repeat the last ...
4
votes
1answer
135 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 ...
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 ...
5
votes
1answer
147 views

Extracting text from cells, preserving non-ASCII characters

Consider the following setup, based on this answer by WReach: ...
4
votes
1answer
123 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 ...
16
votes
1answer
215 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 ...
0
votes
1answer
165 views

Cell output controlled by CellFrameLabel Checkbox?

The following generates a Cell that returns the state of the checkbox when evaluated: ...
4
votes
1answer
194 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 ...
16
votes
0answers
651 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 ...
1
vote
1answer
196 views

Welcome screen (V9): selecting notebook from Open Recent … results in initialization cells not evaluating

The following represents an abbreviated example of more complicated code, but it replicates a problem the more complicated code encounters. ...
3
votes
2answers
1k views

Taking class notes with a Mathematica Notebook

Dose anyone take notes in a technical class using a Mathematica notebook? If anyone does, how does it compare to paper and are there useful commands? I have a hard time remembering ctrl/alt/esc ...
5
votes
0answers
621 views

Automatic recovery after crash

I want Mathematica to periodically autosave my notebooks to the temp folder. And in case of front-end crash i want to see the dialog after restart with the following choices: recover from autosaved ...
6
votes
1answer
186 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...? ...
2
votes
2answers
150 views

Programmatically writing to a notebook in TraditionalForm

I'm trying to get a Cell to appear in TraditionalForm when using NotebookWrite. Here is the closest I can get: ...
2
votes
3answers
230 views

Making data persistent, as in xmgrace

I've been using xmgrace for quite a long time as my favorite solution for scientific data manipulation and plotting. These data often come from home-made fortran programs, in the form of, e.g., a ...
3
votes
2answers
230 views

Deleting Print results

While playing around with $Pre and $Post I created this very annoying piece of code: ...
3
votes
2answers
172 views

how to open Hyperlinked files by default software?

Non-Mathematica formats, e.g. .doc or .txt files, are directly shown in a new notebook when I click on a hyperlink pointing at these objects. But I would rather have (for example) .doc files opened ...
8
votes
1answer
418 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 ...
2
votes
1answer
140 views

What Cell Option Controls Group Indentation?

I am working on a stylesheet for a handout I am making and I want to make my own "definition" box format. So I use the "Format"->"Edit Stylesheet" menu option and get the stylesheet inspector. I then ...
8
votes
1answer
195 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
2answers
302 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 ...
1
vote
1answer
189 views

Export notebook file without launching front-end

I am using a Mathematica script to programmatically generate a Mathematica notebook. The script generates a Notebook expression and then uses ...
7
votes
0answers
284 views

Can I modify line-break behavior of inline cells?

When I insert an InlineCell into a TextCell that is too long for the whole InlineCell to fit ...