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
363 views

how to easily find location of hidden characters that causes hard to find syntax error in notebook?

For last 30 minutes (and I was lucky today, sometimes I spend 5 times as much time) I have been removing code little by little from my large one cell, (have to be one cell, it is Manipulate demo ...
8
votes
2answers
137 views

Is it possible to create Evaluatable cell which will be automatically overwritten?

Am trying to generate an Evaluatable cell which itself is an output cell which will be overwritten when the original Input cell ...
8
votes
1answer
120 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.
8
votes
1answer
77 views

Notebook[] vs. DocumentNotebook[]; display a Notebook[] inline, like a DocumentNotebook[]

If you evaluate a DocumentNotebook[] expression in the front-end, it nicely displays inline, inside of an output cell in the current notebook: For my purposes, ...
8
votes
1answer
133 views

Accessing the Options of the parent Cell

From within the Kernel, it is possible to access a Cell's options using CurrentValue. For instance, in a ...
8
votes
0answers
106 views

Is there a convenient/automatic way of uploading a notebook into SE?

This post discusses how to streamline the other way - extracting code from a fragmented and longish SE answer but I imagine a two-way workflow like: Fashion an answer/question in an SE-templated ...
7
votes
3answers
120 views

How to avoid spaces between numbers when displaying TagBox(es)

The instruction : DisplayForm[RowBox[List[0,1,Superscript[2,3],Superscript[1,2],a]]] displays a gap between the first two items of the list but if one is ...
7
votes
2answers
81 views

Substituting confidential tagged cells by a “content removed” cell

When producing a notebook with both code and text, I often end up with pieces of code, or even entire chapters, that I don't want to be shown on the final output. I generally hide or close them by ...
7
votes
1answer
191 views

Customizing the Screen Environment

Is it possible to make Mathematica notebooks as stylish as this below with custom backgrounds and predictive text coloring? As shown in the snippet below? And possibly have the option to save the ...
7
votes
1answer
119 views

Determine page count programmatically [duplicate]

Possible Duplicate: Generating a table of contents By selecting File > Printing Settings > Headers and Footers from the menu, I am able to enter << Total Pages >> to print the total ...
7
votes
1answer
133 views

Inlining calculations in a notebook

Context In $\LaTeX$, I can write something like: Thus, we have $x = \sqrt{2}$, ... the $ ... $, as opposed to $$ ... $$, inline the LaTeX symbols. Now, with ...
7
votes
2answers
234 views

Attaching a file to a notebook

Is there a way to attach a file into a notebook and open it later with, for instance, a double click (or another action button)? In Mathematica windows version, the insert menu has the "object..." ...
7
votes
1answer
432 views

How to add more levels to Outline notebooks

The Outline stylesheet only seems to cover 6 levels of depth. Is there any way to increase that? Here's an example. Hitting tab on the last level just indents its content, but doesn't add another ...
7
votes
1answer
174 views

Setting up TextStyle with initialization cells in Mathematica 6+

It used to be quite straightforward to change the default settings of a notebook in terms of inputs, outputs, text styles and font sizes in previous versions of Mathematica using initialization cells ...
7
votes
1answer
206 views

How to suppress undesirable kerning rules in math inline cells?

Update: (11/29/2012) Looks like Mathematica 9 has the same behavior. The following graphic shows how Mathematica kerns italic characters in an inline math formula cell (first row) where an ...
7
votes
2answers
136 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 ...
7
votes
0answers
72 views

Cell brackets on left side?

Is it possible to have the cell brackets on the left? I looked through the options and couldn't find anything, but maybe it's some kind of esoteric style setting or something. The reason I'm looking ...
7
votes
1answer
147 views

How can I make a cell that contains an image which can be shifted?

When you look at some help pages, they may have cells containing images which are movable within the cell when you left-click and drag the mouse. Here is a sample: ...
7
votes
0answers
306 views

How can I export aligned equations to $\LaTeX$?

Using Palettes -> Writing Assistant -> Math Cells, you can enter aligned equations such as: ...
6
votes
2answers
161 views

Prevent text from wrapping in a notebook

By default in the Notebook interface the text wraps. Is it possible to prevent this wrapping?
6
votes
2answers
193 views

How do I view initialization (or other invisible) cells in a notebook?

I am looking at someone else's notebook, and when I go to evaluate it, it asks whether I want to evaluate the initialization cells. I would like to look at them first, but "I do not see them here nor ...
6
votes
2answers
215 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 ...
6
votes
2answers
304 views

Building documentation with interactive examples in Wolfram Mathematica

There are interactive examples in the documentation in Wolfram Mathematica. Thus to compile them we just need Shift+Enter. I want to develop such examples for functions from my own package, how can I ...
6
votes
1answer
258 views

How to pipe a stream to another notebook?

Can I pipe an OutputStream object created by OpenWrite (or similar) to a notebook instead of a file? I am aware that I can use ...
6
votes
1answer
74 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
165 views

How to see the 'source code' of DockedCells? ALT: How to 'show expression' of DockedCell?

Here is a CDF file with the dockedcells toolbar (at the top). I'm trying to see how he created and positioned the logo, the formatting buttons, table of contents, etc, through a source code of it, but ...
6
votes
1answer
78 views

ClearAll just for current notebook

So in my search to fine tune Mathematica to what works for me, I found a nice setting that helps separate variable declaration between notebooks. Under Global Preferences, searching for CellContext ...
6
votes
1answer
160 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 ...
6
votes
3answers
172 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 ...
6
votes
1answer
214 views

Indenting bulleted lists in Notebooks

I currently use Word for notes, making nested bulleted lists as I go. I've just started using Mathematica and would like to do the same in its Notebooks, but it doesn't look like it has that ...
6
votes
1answer
108 views

Some way to identify the source of a notebook file?

Is there a way to tell where a Mathematica file came from, meaning some type of machine ID (yes, I know about $MachineID). I want to be able to identify students ...
6
votes
1answer
110 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 ...
6
votes
1answer
99 views

When are EvaluationNotebook[] and ButtonNotebook[] different?

I am looking for a concrete code example where EvaluationNotebook[] and ButtonNotebook[] will return different results. The ...
6
votes
1answer
110 views

How to sort cells in a notebook based on cell tags?

Suppose I have a notebook with cells tagged with both numbers and words with numbers always list first, and some cells without cell tags e.g.: ...
6
votes
0answers
73 views

Clear Citation Style Cache

How can I clear the "Citation Styles Cache" created when you use the EndNote citation management feature for the first time in Mathematica. The Citation Management tutorial indicates that such a ...
5
votes
2answers
333 views

Converting a notebook to plain text programmatically

It is possible to export a notebook to plain text format (practically just extracting all the text from it and discarding formatting) using the ...
5
votes
3answers
214 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
4answers
123 views

Dialog inside dialog not DialogReturn-ing properly

How can I prevent the DialogInput from failing (or returning early) as soon as I close the "Close this" dialog? ...
5
votes
2answers
186 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 ...
5
votes
1answer
92 views

Remove CellMargins option from many cells

I have a very old notebook in which many cells had the CellMargins option set manually. What's the easiest way to remove all those manual option settings?
5
votes
3answers
191 views

Storing data in the Notebook in readable form

The common problem in my theretical work is a need to import some experimental data to work with. This means that my notebook depends on some external files which makes it difficult to share it with ...
5
votes
1answer
40 views

Is there a callback for notebook exit?

I know that $Epilog is called when Mathematica is exited; is there a callback upon exiting the notebook? If so, what is it?
5
votes
3answers
186 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, ...
5
votes
1answer
127 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 ...
5
votes
1answer
280 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 ...
5
votes
1answer
261 views

Security of Mathematica Demonstrations

Apologies if this is overly paranoid. I recently discovered the Wolfram Demonstrations Project and intend to play with them to understand some of the power of Mathematica. I have one slight concern: ...
5
votes
0answers
88 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 ...
4
votes
1answer
110 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 ...
4
votes
3answers
188 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 ...
4
votes
1answer
90 views

How do I force columns in a Grid to be equally spaced?

Suppose that I have this table tab, which I display using Grid. Is it possible to force the columns to be equally spaced? All ...