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)

8
votes
1answer
133 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 ...
1
vote
0answers
50 views

Mathematica interoperability with Max/MSP

A little foreword: I'm an absolute beginner of Mathematica (but I'm a programmer in other languages/software). Now the question: I have a Mathematica Notebook written by a friend of mine which takes ...
0
votes
0answers
52 views

?f returns a weird result [duplicate]

Anybody know why something like this happens?
4
votes
1answer
51 views

Font size for help drop down menu in input cell

Consider: Where do I go and how do I increase the FontSize in this drop down menu to make it more easy to read?
4
votes
1answer
67 views

How to have Tooltip resize with Notebook magnification?

How do you make a Tooltip label expression change magnification when the Notebook magnification changes. The expr of ...
2
votes
0answers
80 views

How to expand and collapse multiple cells inside a frame while keeping all in a single frame

I am trying to create a framed cell around cells that collapse and expand. Mr. Wizard's answer below almost does it, however, when the cells are collapsed I lose the lower frame border. I'd like to ...
7
votes
0answers
195 views

Help with a Mathematica front end touchscreen problem

I really like using my Windows 10 touchscreen to move around in websites, documents, etc. It doesn't work in Mathematica. Can that be fixed by changing a global notebook setting, or is it something ...
6
votes
1answer
264 views

How to construct a tree from a notebook?

Given the notebook itself we can think of it as a tree graph: the root vertex is the empty notebook itself, the headers of cell groups are vertices, and all other cells as leaf vertices. I'd like to ...
4
votes
2answers
97 views

Unescape Formatting in Strings [closed]

Mathematica has a dirty habit of sometimes escaping all the formatting in my strings when loading a .nb. I know this is inevitable for ...
8
votes
2answers
111 views

Seeking for method to speedup and get more flexable control Notebook History

When doing calculations in notebook, I modify the code a lot, and there are several versions of similar codes in the same notebook. But I found myself easily forgot which version is the newest, and I ...
2
votes
0answers
73 views

Docked Cell that scrolls?

I use two finger movement on my trackpad for scrolling a notebook page up and down. Is it possible to make a docked cells that scrolls to the left and right using a two finger movement on the ...
1
vote
1answer
132 views

How can I change the background color of input and output cells [duplicate]

I would like to set automatically the background colour of input and output cells in any newly open notebook. How to do this?
3
votes
0answers
41 views

Scroll Position for a Notebook

If you have a notebook with lot of content open you will see a scroll bar on the far right and bottom. I'm looking for a function that will return the current value of of the scroll bars. I'd also ...
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 ...
2
votes
2answers
97 views

How to show formula and substitute variable values?

I'm looking for an easy way to make a 'dynamic' paper for some engineering calculations (I'm talking about hundreds of pages with lots of different formulas). The problem is hard to describe so I'll ...
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
119 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
46 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
97 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 ...
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 ...
2
votes
0answers
77 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
84 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
85 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
167 views

What is “MemoryMonitor”?

Evaluating one of the following inputs ...
4
votes
3answers
185 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
55 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
109 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
47 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
70 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
50 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 ...
2
votes
1answer
86 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
286 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
86 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
51 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
53 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
46 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
242 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
40 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
186 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
205 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
255 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 ...
5
votes
1answer
132 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
172 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) ...