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)

2
votes
2answers
133 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
2answers
138 views

How do I make Mathematica copy a cell after I re-evaluate it?

When I edit a cell in the notebook and re-evaluate it, it "overwrites" the input and the output of the previous edit. I want it to copy my edited version to the bottom or something and give me a ...
2
votes
2answers
185 views

Evaluation of Notebook chosen by FileNameSetter

Please consider the following: I have created a GUI where I can choose the path of a notebook (which I need for later calculation) via ...
2
votes
2answers
96 views

Capturing an F1

I teach an Intro to Mathematica course, and one of the things I try to reinforce early on is just how helpful Mathematica's help is. In the very first lab for the course, I even give the students a ...
2
votes
2answers
104 views

How can I change mouse hover behavior for hyperlinks in a notebook?

When I create a Hyperlink to a Youtube video in a text cell the link is colored blue like it would be in a browser. However, the mouse cursor does not change when ...
2
votes
1answer
148 views

How to calculate the whole run time in a specific notebook?

I have found a way to show the run time in a specific cell in a notebook (.nb). Now, I want to have the whole run time including all cells in a specific notebook. How is it possible to calculate it ...
2
votes
1answer
78 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?
2
votes
1answer
70 views

Cell format for screen headers

If one picks the menu option Format->Edit Stylesheet and then one opens the "Default.nb" link, the newly opened notebook has a header that reads "Deafult.nb" style definitions. In one navigates down ...
2
votes
1answer
95 views

Hide both input cell and output cell

You can double-click the right gutter of a input cell to hide a corresponding output cell or double-click the gutter of the output cell to hide the input cell. I would like to hide both the input and ...
2
votes
1answer
66 views

WholeCellGroupOpener and Hyperlinks

My problem is: I would like to activate WholeCellGroupOpener on a cell containing hyperlinks. But when I do that, the hyperlinks are no longer active. Is there a way to change the order of the two, so ...
2
votes
1answer
49 views

How do I force all Graphics Text to be StandardForm?

I've been playing around for while trying to determine how to get all graphic objects to use StandardForm fonts. That is, I want all axes labelling, titling, legends, inserted text, etc., for 2D/3D ...
2
votes
1answer
64 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: ...
2
votes
1answer
76 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: ...
2
votes
1answer
34 views

Options CellLabel not showing

I'm back with the labels and tags questions! Here is my code: mb = CreateDocument[Null, ShowCellTags -> True]; In the new document, I create a new cell, add ...
2
votes
1answer
49 views

Label cell goes away with SelectionEvaluate

When a given cell has a label (given with the CellLabel->"label" option of the cell), then this label disappears after calling SelectionEvaluate[ nb ] when the ...
2
votes
1answer
122 views

Dynamic [ NotebookEvaluate [“_”] ]

A nice way to centralize various tasks in one notebook is the NotebookEvaluation function. For instance I can evaluate ten notebooks from a single notebook (e.g. ...
2
votes
1answer
98 views

NotebookWrite undo

Is there way to make NotebookWrites undooable? For example let's say I open a new notebook and then run. ...
2
votes
1answer
46 views

Prevent Cell Deletion

How might I be able to prevent a Cell form being deleted when you press the Delete key? Maybe there is a way to display some type of ...
2
votes
1answer
94 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
248 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 ...
2
votes
1answer
117 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 ...
2
votes
1answer
34 views

Is it possible to merge cells excluding results with one click?

Now when I merge two cells with right-click "Merge Cells", they merge with the results included, while I only want the commands merged. Can I make it a one-click button? Now I have to delete the ...
2
votes
0answers
37 views

$Failed below input area of new cell in notebook

The Mathematica 9 installation on my laptop has developed an odd feature. Just underneath the grey line indicating the input area for a new cell, the expression ...
2
votes
0answers
52 views

Maintaining postfix convention for directives in notebooks

It seems to be a fairly common convention to write certain 'meta' functions in postfix form like f[x] // Simplify to keep the the mathematical content at the ...
2
votes
0answers
30 views

Am I using the cell option setting PageBreakWithinGroup->False correctly?

I had expected that this option would prevent a page break occurring within a group of cells of which this cell is the "group leader". In my case it is a "Subsubsection" containing a group of ...
2
votes
1answer
102 views

How do I switch between two notebooks in Mathematica 9 interface? [duplicate]

How do I switch between two notebook windows in the Mathematica 9 interface? I would like to use a keyboard shortcut such as Ctrl+Tab or Alt+ Tab as with windows or tabs in programs like Firefox.
2
votes
0answers
102 views

Mouse cursor disappears

After working on a notebook for a while sometimes my mouse cursor disappears. I can click on different cells and the text cursor will move accordingly but I just can't see the mouse cursor. Just now ...
2
votes
0answers
99 views

Navigation a la XPath for Mathematica notebooks

In Mathematica, notebooks (in fact all expressions) have a tree-like structure. In this regard, they are similar to XML files. For XML, one can travel through the document structure using tools like ...
2
votes
0answers
80 views

Counter assignments [duplicate]

I'm trying to create a specific outline format to match some course materials I am required to submit in a particular way. I know how to create auto-numbered cells using ...
2
votes
0answers
54 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 ...
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 ...
2
votes
0answers
97 views

“automated” image embedding app

Based on the following image attach procedure, can a Dynamic app be developed that: at start, only shows a small import button once clicked, opens a choose image ...
1
vote
3answers
113 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 ...
1
vote
2answers
163 views

Run entire notebook

I have created a notebook, with functions. The only thing that I want to change in the notebook later is the input file. I therefor want to have a button that runs every input step-by-step so that I ...
1
vote
1answer
199 views

Why isn't autosave enabled by default? [closed]

While I've come across several ways to implement/enable autosave (see: Is there a notebook autosave frequency configuration?, Saving my code before cell evaluations: Insurance against front end ...
1
vote
1answer
40 views

expression contained across multiple cells

Is it possible to span one expression across multiple cells? E.g. long if statement or function evaluation. I looked in documentation and searched forum/google and could not find.
1
vote
2answers
85 views

How to evaluate Modules in a notebook from another notebook?

I would like to create a notebook populated with several modules and be able to evaluate these modules by running a separate notebook. I have attempted several uses of the ...
1
vote
2answers
73 views

How to run all command with same name into a notebook

I have a very big notebook with a command repeated a lot of times but with different parameters each time and I want to run all these commands at the same time without having to run separately all of ...
1
vote
1answer
65 views

Editing the Virtual Book?

It's my understanding that the Virtual Book (of mathematica 9) is in notebook (.nb) format. It appears to be a very polished style of documentation which I want to reuse (parts) of it to create my own ...
1
vote
2answers
61 views

NotebookWrite Cell with Grid

I'd like to NotebookWrite a Cell in StandardForm with a ...
1
vote
1answer
130 views

How to open/close all collapsed/open cells?

Is there a way to open/close all collapsed/open cells? The reason is for a long notebook, it is convenient to see all the section and subsection headings at once.
1
vote
1answer
62 views

Creating hyperlinks from a list of file names

Suppose I use FileNames to get a list of file names. I know that it's possible to make a hyperlink using this kind of pattern.... ...
1
vote
1answer
50 views

How to get the time when a notebook is saved and closed

I want to get the time when a notebook is created and the time when the notebook is saved and closed, that is to say, the whole time when a notebook exist. What should I do? Thank you!
1
vote
1answer
66 views

StringForm and NotebookWrite

I'm trying to get my head around NotebookWrite for the last few days. I can't understand why ...
1
vote
1answer
100 views

Is it possible to create a styled cell with pre-defined content?

When you create a new styled notebook from the Stylesheets chooser dialag, you get a new notebook using the chosen style with some sample content provided. But if you apply styles from the same ...
1
vote
2answers
100 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?
1
vote
1answer
84 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 ...
1
vote
1answer
147 views

keyboard sequence for Magnify in version 8?

It used to be that you could find a Magnify item in the Format menu of the Mathematica front-end, at the very bottom if I remember correctly. You could get at the item in Windows by a keyboard ...
1
vote
1answer
31 views

How to create a user interface, that when a user clicks a button the entire display changes? [closed]

For example, the 'main menu' user interface has three buttons each labeled with a different level. Whenever button is clicked how do you display that level of the game without creating a new notebook? ...
1
vote
1answer
98 views

Comment color in a notebook

My requirement: Comments should appear within a notebook in blue and font size 12 and in Courier by default. This should work on not just my machine (by tweaking the preference of MY Mathematica) ...