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.
4
votes
1answer
91 views
how to select all cells with specific property such as the ones that are closed
I have to close many cells each time before I export a notebook to HTML since I do not want to display many code cells and other cells.
I select each cell one by one, and do ...
4
votes
1answer
120 views
Tweaking Prime[n] to return 1 when n==0
I manually evaluate this cell to set Prime[0]
Unprotect[Prime]
Prime[0] = 1
Protect[Prime]
I manually evaluate this cell to reset Prime[0]
...
4
votes
1answer
131 views
Searching Notebooks for String Patterns using Workbench v2
The Workbench webpage describing new features in version 2 lists the ability to "Search notebook documents with the Mathematica pattern search utility" under the heading Mathematica Front End ...
4
votes
0answers
55 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 ...
4
votes
0answers
81 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 ...
3
votes
3answers
253 views
Is it possible to typeset left and right angle brackets?
I would like to typeset the following in a Mathematica notebook:
$$\langle P \rangle$$
Is it possible to typeset left and right angle brackets? In $\LaTeX$, they are given by ...
3
votes
2answers
407 views
Quickly editing the stylesheet and saving it
I have a private stylesheet I'm using. I edit it by going to the menu Edit->Edit Stylesheet and then clicking on the private stylesheet cell. I can modify whatever I want but it never gets saved.
The ...
3
votes
3answers
91 views
In Grid and using Frame, how can I only frame the header cells?
Suppose that I use Grid to display a table tab. I did the following, which frames all cells:
...
3
votes
1answer
57 views
Use NotebookWrite with Graphics?
I am trying to use NotebookWrite to paste a plot into another notebook. The code looks something like:
...
3
votes
3answers
154 views
Subscripts in programatically generated section headers
Consider the following command:
TextCell["\!\(\*SubscriptBox[\(H\), \(2\)]\)", "Section"]
How can I display the string as section header and get the DisplayForm? ...
3
votes
1answer
60 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 ...
3
votes
1answer
86 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...? ...
3
votes
2answers
110 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 ...
3
votes
1answer
97 views
How to edit the text coming together with the numeration of pages in pdf produced out of a notebook?
I am writing a text that I am going to publish on-line. When I transform it from the notebook into the pdf format I get the numeration style typical for Mathematica:
I would like to edit the text ...
3
votes
1answer
46 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:
...
3
votes
2answers
82 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 ...
3
votes
3answers
97 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.
...
3
votes
1answer
115 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 ...
3
votes
2answers
172 views
Page breaks appearing as thick line on actual print-out
I'm using Insert->Page Break to do just that, but thick black lines are appearing on the actual printed copy wherever I indicated a break. Can this be turned off?
3
votes
1answer
148 views
Mathematica 8 and window names for modified files
I do not know if this is particular to Mac OS, but with version 8, the window name of a notebook no longer changes (with an appended *) when it is modified, as it used to do with version 7 (as well as ...
3
votes
2answers
115 views
Deleting Print results
While playing around with $Pre and $Post I created this very annoying piece of code:
...
3
votes
1answer
164 views
Can Mathematica check spelling during typing?
I can't see a way to get Mathematica to check my spelling as I type. Is this feature not supported? I've done everything I can think of with my options:
Is there a setting I'm missing?
3
votes
1answer
75 views
automatically add Global` to $ContextPath for all notebooks when using CellContext->Notebook
I have some definitions in my init.m. E.g. my init.m contains this:
...
3
votes
0answers
79 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 ...
3
votes
0answers
117 views
Notebook function formatting
I've recently started a course in which I am learning how to solve different problems using Mathematica. A large part of the course covers creating your own functions. The thing is I don't like how my ...
3
votes
0answers
71 views
Sometimes notation gets auto-converted from traditional to raw input and won't convert back
For example, I'm typing this:
When upon hitting the last character it gets converted to:
And trying to Convert To TraditionalForm has no effect. This glitch has happened a few times and on ...
3
votes
1answer
230 views
Option to change cursor/caret shape
While editing on a Mathematica notebook, I often find myself needing to do something else outside of Mathematica for a few hours. After finishing such outside tasks, I resume to work on the notebook.
...
2
votes
2answers
129 views
Is there a way to “lock” some cells in a notebook?
Is there a way to "lock" some cells in a notebook so they can't be edited? It's usually input cell that's documenting some functionality. I'd like other readers of the notebook to be able to execute ...
2
votes
1answer
117 views
How to make a notebook that will be window maximized when open?
I use
CreateDocument[cells, opts]
to create a notebook. When the notebook is open, it has a small default windows size and I need to manually maximize it every ...
2
votes
3answers
131 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 ...
2
votes
2answers
88 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
2answers
89 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
118 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
178 views
Creating a “Live” Index Notebook --to load other Notebooks
I am new here, so let me know if this question is inappropriate. I've been stuck for many hours on this puzzle. I know it should be easy, but for me...?
I want to create a Notebook (call it "Index ...
2
votes
2answers
85 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 ...
2
votes
2answers
78 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
1answer
62 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
44 views
Use different kernels for different Notebooks
I know that the command LaunchKernels[] starts up four kernels on my machine:
...
2
votes
1answer
232 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 ...
2
votes
2answers
178 views
How can Magnify be forced to ignore the notebook's window width?
In a new notebook, I can illustrate how the action of Magnify is cut off by the window width:
...
2
votes
1answer
63 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
103 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
60 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
102 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 ...
2
votes
0answers
68 views
Can I customize In[] and Out[] headers?
Can I customize the In[] and Out[] headers? I'd like to add $UserName, ...
2
votes
0answers
34 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
78 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 ...
2
votes
0answers
75 views
How do I direct output to a specific notebook or cell? [duplicate]
Possible Duplicate:
How to pipe a stream to another notebook?
Is there any way to create a stream so that all output to the stream (from Write or ...
1
vote
3answers
73 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
78 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?




