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)

1
vote
0answers
71 views

Ergonomic night time reading settings [duplicate]

I was wondering if Mathematica had a built-in ergonomically safe night time reading mode for the notebooks. I was thinking of setting something up myself but I do not know the ergonomics/eye safety ...
5
votes
1answer
114 views

How to set different background, input and output colors

I want to create a notebook where the background is one color, the input cells are another color, and the output cells are white. I have tried messing around with Option Inspector and creating a ...
1
vote
1answer
45 views

How can I change focus if 2 or more notebooks are open?

Having opened and executed a notebook using NotebookOpen and NotebookEvaluate, I want to return the EvaluationNotebook to the foreground
3
votes
2answers
92 views

CDF format - disable cell selection?

Is there any way/option in order to make Cells not selectable in exported CDF files? I know how to hide the cells until you go with the mouse over them on the ...
10
votes
2answers
174 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 ...
2
votes
0answers
76 views

plot focused spot [closed]

I want to plot the first row of Figure 2 and Figure 3 on page 3 in this paper: http://www.eng.yale.edu/groberlab/pdf/spot.pdf So I am really stuck and I can not find my mistake where it went wrong ...
1
vote
0answers
73 views

In a Template Notebook how to make a Repeating Block loop over a local variable

I have a template notebook that takes in some parameters to get raw data and then process it. In this processing a few subsets of data are calculated. However, I don't know how many subsets will be ...
8
votes
1answer
81 views

On an existing notebook, how to transform all “double brackets” into “DoubleBracket”

Sometimes, having all double brackets [[...]] transformed into \\[LeftDoubleBracket] ... \\[RightDoubleBracket] can really ...
13
votes
1answer
165 views

What is “MemoryMonitor”?

Evaluating one of the following inputs ...
3
votes
3answers
173 views

Making large calculation results persistent

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 ...
0
votes
0answers
54 views

Can I use a variable name based on the results of a calculation? [duplicate]

How can I use the notebook filename as a variable? e.g. I have a notebook named notebook1.nb so I want the output of this: ...
2
votes
0answers
42 views

DisplayFormulaNumbered

I'm using Mathematica 10.3 and have a question regarding the DisplayFormulaNumbered Style: is there a way to tell Mathematica to number the formulas not only 1,2,3... but 1.1, 1.2, 1.3 when it has ...
5
votes
1answer
102 views

Split screen view in notebook interface?

Is there a way to get a split screen in the notebook interface? I want a movable horizontal bar in a window with two views into the same notebook, each of which is independently scrollable. An ...
1
vote
0answers
43 views

Notebook cell properties: Count cell number. Count edited cells [closed]

I have a Mathematica notebook with more than 20 cells, including some closed. How can I programmatically count the exact number of cells? How can I know how many of them have not been edited?
0
votes
1answer
41 views

Construct a function whose definition depends on the values of its arguments and evaluates a Section

I have defined a function that returns different output according to the values of the axes of an ellipsoidal. If none of the Which statement cases is satisfied then the function evaluates the ...
2
votes
1answer
68 views

NotebookEvaluate with InsertResults -> True from the command line

Suppose I have a notebook template.nb like this: and I want to evaluate this notebook from the command line. So I wrote this Mathematica script: ...
2
votes
0answers
49 views

Why do notebooks reset themselves now and then? [closed]

Now and then I am working on a notebook and suddenly it reset itself. What I mean is that I am entering commands and when I type enter, the notebook command number goes to 1 and I have lost all ...
1
vote
0answers
39 views

Referencing cells after reopening a saved notebook

I'm looking for a way to reference certain cells when opening a saved notebook. That is, assume I ran some commands in a notebook, got some output, saved the notebook, then reopened it in a new kernel ...
5
votes
2answers
256 views

Evaluate notebook from other notebook

I have a notebook ("notebook 1") which in the beginning sets some parameters, does something depending on their value and saves the result to a file, say: ...
0
votes
0answers
85 views

Recognizing text and Mathematica special characters when copying expressions from a PDF

I could not find something relevant. Last days I am reading Leonid Shifrin's masterpiece but I cannot copy-paste either from the pdf or from the electronic version. Consider the function ...
0
votes
1answer
46 views

How to set zoom and screen environment from GenerateDocument?

GenerateDocument does not have any options for settings on the notebook it creates. How do I generate a document with ...
1
vote
0answers
50 views

How validate hyperlinks in a notebook?

Is there any easy way to scan through a notebook in order to validate hyperlinks there that point to targets (tagged cells) within the same notebook? By this I mean at least that the hyperlink's ...
5
votes
2answers
51 views

How to disable user-interaction with Notebook during manipulating it from the Kernel?

When manipulating a Notebook from the Kernel using such functions as NotebookLocate, SelectionMove, ...
1
vote
0answers
28 views

Find NotebookObject from a list [closed]

I can create a new notebook, write to that notebook and then save the notebook with a new name. Having done this how do I now find the notebook object that corresponds to the one I have just saved? I ...
4
votes
1answer
43 views

Make Rasterize/Export use Notebook-specific options?

Sometimes I need Notebook-specific options such as Background color or FontProperties -> "ScreenResolution". (Ref: How to ...
0
votes
1answer
26 views

How can I update the contents of or overwite a cell contained inside another cell?

Suppose I have a notebook consisting of these cells: Cell G, containing a grid Cell I, containing a program that produces a graphic and places it in a cell Cell E, a cell which successfully receives ...
3
votes
0answers
43 views

How to inherit indentation in cell groups?

In my notebook the text cells "stick out" like this: Instead, I'd like the to be left aligned (plus some margin) with the cell they are grouped under... How can I achieve this from the stylesheet? ...
1
vote
1answer
236 views

Mathematica Wont Open [duplicate]

Mathematica 10 will not open on my computer which runs Windows 8. It is stuck on the initializing kernals screen regardless of whether I try to open the program or open an old document. The problem ...
3
votes
0answers
36 views

NotebookAutoSave -> True “partially” working?

I am a novice to Mathematica (using v10.2) and was wondering why: SetOptions[SelectedNotebook[], NotebookAutoSave -> True] does not switch on ...
5
votes
3answers
171 views

How to center a graphic in its output cell

Say I have produced a single graphic ouput, perhaps a plot. Instead of displaying left-aligned in the notebook, I would like it to display in the center of the output cell. I would like it to stay ...
3
votes
1answer
193 views

notebook scrolling problem in 10.2: worse than ever? how to fix?

I use Mma notebooks to present in the classroom, so for me this is a serious problem. Before starting a class, I close all the sections, subsections, and subsubsections. During a lecture, I open ...
13
votes
1answer
225 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
270 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 ...
5
votes
1answer
127 views

How to close all tagged input cells without closing their output cells?

I have tagged certain Input cells I want to be closed during a presentation. I close them as follows: ...
6
votes
2answers
154 views

How to group cell type A under cell type B?

My notebook's groupings for "Subsection" and "SubitemNumbered" are broken: And by broken, I mean I wanted it to automatically group like this which I did manually (with lots of control+shift+g) ...
1
vote
0answers
41 views

Loading a notebook to a website [closed]

When I upload a Mathematica notebook to my website, when I click on the link, it opens, but as text, not a Mathematica notebook. At some sites, when I click on a Mathematica notebook, the notebook ...
4
votes
1answer
376 views

How can I remove I a horizontal line I inserted into my notebook?

Inserted a horizontal line with Right click > Insert > Thin Horizontal Line. Cannot see a way to remove such a line. Help!
3
votes
0answers
84 views

Change the background color of matched strings when doing find-and-replace

This is not a fundamental question, but it puzzles me. In doing a Find & Replace for some string in a notebook, the matched string is highlighted temporarily with some background color (green for ...
6
votes
1answer
76 views

Why does NotebookDelete fail on cells with Copyable set to False? Bug?

Bug introduced in 9.0 or earlier and fixed in 10.3 Consider this: ...
7
votes
1answer
158 views

How to programmatically mark and then select a subset of input cells?

I'm developing a package that needs to exert significant control over a notebook while a user interacts with it. One specific thing that it needs to do, programmatically, is to select a specific ...
1
vote
3answers
271 views

How can I clear the content of my notebook in Mathematica? [closed]

The Clear command is for clearing definitions of symbols. Is there any built-in function to clear the work area of my Notebook?
4
votes
0answers
63 views

String option names for Cells

They seem to be correctly interpreted. I'm asking because of some minor reasons and a major one: NotebookWrite a Cell with WholeCellGroupOpener option I don't know any official confirmation so let ...
9
votes
2answers
278 views

How to return notebook's own file name

What command within a notebook will return the file name of that notebook?
1
vote
0answers
142 views

How can I protect my notebook file with a password to open and save changes?

I want to protect my .nb file with a password, because now I'm using a free access computer in my university. Everybody student in my university can use that computer and I do not want my .nb file can ...
4
votes
1answer
118 views

Changing one line in code to Traditional Form?

I was watching this video: Animating Heat Equation. The speaker had this code (just prior to the 60 second time level): ...
8
votes
1answer
103 views

Framing a combination of cells in the notebook

In my notebook, I have the following cells, which I tried to put around a single frame with a light blue background color. After entering the cells, I selected all four, then clicked the frame ...
3
votes
1answer
62 views

SelectionEvaluate executes out of turn

I'm seeing some unexpected (to me) behavior from SelectionEvaluate. I've got a notebook with two sections. In section 2, I've got code that clears the notebook's ...
10
votes
2answers
164 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 ...
7
votes
2answers
115 views

How to make a notebook take action whenever a particular symbol is defined or redefined?

For teaching purposes, I want to create a Mathematica notebook that will "notice" when the user defines or redefines a variable or function of a particular name, so that it can check the value and ...
9
votes
0answers
155 views

Wrapping text around pasted graphic

I would like to use Mathematica to create all my documents for my high school math class. I cannot, however, find a way to copy and paste a diagram (let's say from Geogebra) and then place it where I ...