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
3answers
145 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
194 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
108 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
537 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
149 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
315 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
155 views

Extracting text from cells, preserving non-ASCII characters

Consider the following setup, based on this answer by WReach: ...
4
votes
1answer
125 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
237 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
170 views

Cell output controlled by CellFrameLabel Checkbox?

The following generates a Cell that returns the state of the checkbox when evaluated: ...
4
votes
1answer
210 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
692 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
203 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
1answer
921 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
196 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
166 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
250 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
291 views

Deleting Print results

While playing around with $Pre and $Post I created this very annoying piece of code: ...
3
votes
2answers
183 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 ...
8
votes
1answer
505 views

How to copy code out of notebook to an external text editor without extra line feeds being added?

I am simply trying to copy code from a cell (input cell) in a notebook, to paste the code into a plain text editor, and not have some lines wrap in the middle. I need to copy the code, as is, to a ...
2
votes
1answer
154 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 ...
8
votes
1answer
202 views

Inheriting Stylesheets when using CreateDocument

I build a lot of presentations and custom notebooks with very different stylesheets, and use Button and CreateDocument quite ...
6
votes
2answers
313 views

How do I get the equivalent of the $\LaTeX$ \tag{} in Mathematica?

How do I get the equivalent of the $\LaTeX$ \tag{} in Mathematica? $a+b=x \tag{1}$ I'm not necessarily asking how to use the $\LaTeX$ \tag{} itself in ...
2
votes
1answer
226 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 ...
7
votes
0answers
307 views

Can I modify line-break behavior of inline cells?

When I insert an InlineCell into a TextCell that is too long for the whole InlineCell to fit ...
6
votes
1answer
181 views

How to edit a HYPERLINK once created inside a notebook?

When a hyperlink is created in a notebook, there does not seem to be an easy way to actually edit the hyperlink (maybe to correct the URL). To make some text HYPERLINK, one selects the text using the ...
5
votes
3answers
303 views

More structure in Source Code/Notebooks

Mathematica is great for small and quick projects and has a great syntax. However as soon as a project grows I run into trouble. How do you scale and maintain projects in Mathematica? What is beyond ...
8
votes
2answers
240 views

Save notebook without including Front End version information

How can a notebook be saved without including the front end version? If you open a .nb file, you'll see something like ...
5
votes
0answers
135 views

Embed a Microsoft RichEdit 8 control in a Mathematica notebook using .NETLink?

Does anyone know whether or not it's possible to embed a RichEdit 8 control within a Mathematica Notebook using .NETLink? The goal here would be able to both view and edit mathematical text typeset ...
2
votes
2answers
179 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 ...
7
votes
3answers
761 views

How to export notebook in colored PDF form [duplicate]

Possible Duplicate: Saving a notebook as PDF, preserving syntax highlighting I would like to export my notebook code in a colored PDF form. What I do is select the brace in the right side ...
5
votes
1answer
155 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 ...
8
votes
3answers
219 views

Quickly display a color graphically

When manipulating colors, the output is shown as a textual expression like Hue[1/5], RGBColor[2/3, 1, 1/3], ...
0
votes
1answer
116 views

Move selection to next Output and export to CDF

In my quest to a custom "Save as HTML" (please see context here) I am now able to iterate through the notebook, grab Input cells decorated with a CellTag that, by convention, is going to be a file ...
9
votes
3answers
715 views

How can I type left (sub)superscript?

I want to type in my variable next to its plot and I'm typing the text in using Inset. However my variable has superscripts to the left. Say it looks like this: $ ...
10
votes
3answers
325 views

Typeset unbalanced brackets

In LaTeX, you can typeset expressions containing unbalanced brackets, by balancing them with an invisible delimiter \left. or ...
4
votes
1answer
309 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?
7
votes
3answers
292 views

Keep palette visible when Mathematica application loses focus

When the Mathematica application loses focus, palette windows disappear (normal notebooks and dialogs (CreateDialog) stay). This is usually convenient because the ...
7
votes
3answers
405 views

How to effectively diff a notebook?

How to effectively diff a notebook with another version of it? This is usually needed/encountered in revision control, but can be generally useful. What i currently do is disable notebook history, ...
14
votes
2answers
258 views

How can I access a variable in one evaluator from another evaluator?

I have two notebooks, each with a different kernel. Is there a way to grab the value of a variable in KernelA from KernelB?
19
votes
2answers
453 views

Publishing a Mathematica notebook

I am considering publishing a Mathematica notebook, used for analysis of some data, as a “supporting information” file alongside a research paper. What are the common practices for doing so, and what ...
8
votes
4answers
600 views

Is there a notebook autosave frequency configuration?

I've had Mathematica crash on me a number of times, and have had to recreate notebook contents from the last save point. I was looking for something in the preferences like an autosave frequency ...
3
votes
2answers
274 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 ...
0
votes
0answers
67 views

How to create a dynamically self-updating table of content for a notebook? [duplicate]

Possible Duplicate: Generating a table of contents How to create a dynamically self-updating table of content for a notebook? The TOC should contain the titles for the section, subsection, ...
5
votes
0answers
157 views

Context “Unique to This Notebook” makes variables black even if they're not defined?

I'm trying to use this technique to keep variables separated between different notebooks. It seems to be working fine, except that variables turn black as soon as they are evaluated — any ideas why ...
5
votes
1answer
200 views

Reading Early Version Notebooks

I have some very old Mathematica notebooks file (.m) files from Version 2. When I try to open them using Mathematica 8.0 (on a Linux system) Mathematica instantly shuts down (no error message - just ...
3
votes
1answer
142 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: ...
7
votes
1answer
560 views

Excel-like UI in Mathematica

This is NOT about importing/exporting Excel data to/from Mathematica. This is purely a UI question. The Mathematica notebook interface is very "linear" — I type in an input cell and Mathematica ...
3
votes
2answers
366 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?