Tagged Questions

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)

0
votes
1answer
84 views

Evaluation of notebook from chosen cell to end

There is option to evaluate the complete notebook but I wanted to know if its possible to evaluate notebook from some desired cell to end or some other desired cell following?
6
votes
1answer
110 views

ClearAll[“Global`*”] stops working with Context set to 'unique to this Notebook'

I just changed my default notebook context to 'unique to this Notebook' so that variables don't roll across numerous open notebooks. Doing this, however, made the command ClearAll["Global*"] stop ...
2
votes
1answer
78 views

Fastest way to select the longest cell

I'm trying to learn low-level notebook programming and I have a question. Is there faster way to select the longest cell in a notebook than this: ...
3
votes
1answer
140 views

How to replace a string within a selected region in a notebook?

I want to replace a string in a selected region/cell in mathematica notebook/package. I searched but didn' t get any result. I think it' s a quite common feature for editors/programming environments. ...
10
votes
1answer
159 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
3answers
294 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, ...
2
votes
1answer
71 views

Use Initialization Cells to open a CellGroup

I would like to use "Evaluate Initialization Cells" to open a CellGroup in a notebook. However, the following code doesn't work if placed in an initialization cell: ...
4
votes
1answer
121 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
93 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
402 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
189 views

Use different kernels for different Notebooks

I know that the command LaunchKernels[] starts up four kernels on my machine: ...
7
votes
2answers
644 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
120 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
168 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
58 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
250 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
244 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
734 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
176 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
142 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
39 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
101 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
83 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
203 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
279 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
743 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
138 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
191 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
468 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
140 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
306 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
151 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
227 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
168 views

Cell output controlled by CellFrameLabel Checkbox?

The following generates a Cell that returns the state of the checkbox when evaluated: ...
4
votes
1answer
199 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 ...
18
votes
0answers
674 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
197 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
735 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
191 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
159 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
240 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
242 views

Deleting Print results

While playing around with $Pre and $Post I created this very annoying piece of code: ...