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)

11
votes
1answer
333 views

Saving a notebook as a $\LaTeX$ file, with syntax highlighting preserved

How can I save a notebook as a $\LaTeX$ file, while preserving the syntax highlighting (such as input/output boxes)?
10
votes
2answers
206 views

how to make cursor jump automatically to next input cell after evaluating previous one?

When making separate cells in order to make separate computations to better see the result of each one before going to the next cell to do the next computation (which is a good way of doing things), ...
10
votes
3answers
469 views

Is it possible to insert an animated image into Mathematica notebook?

I find it very convenient to use Mathematica notebooks to organise the codes + results. I was wondering if it is possible to insert an animated image (say an animated gif) in the middle of a ...
10
votes
2answers
391 views

Saving a notebook without output lines

Is it possible to change the way Mathematica saves so that Out[] lines are never included? I have a .nb file that processes a ...
10
votes
0answers
138 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 ...
9
votes
2answers
570 views

How do I automatically evaluate a cell when a notebook is opened?

I'm trying to put together a GUI in Mathematica and need to evaluate one cell to kick that off. Is there a way to automatically evaluate that cell when the notebook is opened? Here is an example of ...
9
votes
3answers
565 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: $ ...
9
votes
1answer
157 views

Knowing when a notebook has changed programmatically

Is there any way I can programatically determine whether a notebook has unsaved edits? Is that asterisk on the right of the notebook name represented in a notebook option or something, like ...
9
votes
2answers
156 views

How can I set a fixed cell height?

I did this often in previous versions of the Mathematica notebook front end. I would have a cell with lots of raw data, e.g. a very long list. The list might go on for pages. I would set the cell ...
9
votes
1answer
126 views

How to make certain mathematical characters be written as bold by default

In a notebook, when writing \[RightVector] over a variable I always end up bolding it to make it more visible. But it'd be easier if it could be set up to bold that ...
9
votes
2answers
140 views

A notebook created on demand from a main document showing executable input along with output cells

I would like to make Mathematica documents with hidden calculations, such that they can be visualized on demand. In general it can be done in several forms and I actually use some. I would like to ask ...
9
votes
1answer
146 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 ...
9
votes
1answer
236 views

How can I change the style of every newly opened notebook?

I'd like to make Mathematica open a new notebook using the Natural Color template (under the Creative category) by default. Is that possible? If so, how?
9
votes
3answers
278 views

Typeset unbalanced brackets

In LaTeX, you can typeset expressions containing unbalanced brackets, by balancing them with an invisible delimiter \left. or ...
8
votes
4answers
229 views

Create horizontal list in notebook

I want to create a multiple choice question paper and list the options horizontally. I am only looking at very simple document with horizontal list. What I want: What is 1+1? a) 2 b) 4 c) 3 d) 7 ...
8
votes
3answers
215 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], ...
8
votes
4answers
795 views

Automatically counting the number of lines of code in a set of notebooks

How can I automatically count the number of lines of code "Input" existing inside all the notebook files contained in a specified folder? I know there is the issue of considering or not the automatic ...
8
votes
2answers
132 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 ...
8
votes
2answers
445 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 ...
8
votes
1answer
332 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 ...
8
votes
2answers
108 views

Alternative to NotebookLocate or NotebookFind

In Mathematica 8.0 and older, there are two ways to select cells based on cell tags. NotebookLocate["CellTag"]; NotebookGet[EvaluationNotebook[]] and ...
8
votes
1answer
182 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 ...
8
votes
1answer
264 views

How do you insert more columns into Table cells?

How do you insert more columns into Table cells as shown below? To get to this table, go to File -> New -> Styled Notebook -> Textbook -> New -> Scroll down to the Table Cells.
8
votes
1answer
180 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
250 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 ...
8
votes
2answers
189 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 ...
8
votes
1answer
145 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
103 views

Esc-esc for special characters and autocomplete in Mathematica 9 [duplicate]

I recently upgraded to Mathematica 9 and have noticed a slightly annoying behavior that I was looking to remedy. In the past I would type special characters, e.g. ...
7
votes
2answers
218 views

Prevent text from wrapping in a notebook

By default in the Notebook interface the text wraps. Is it possible to prevent this wrapping?
7
votes
2answers
315 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 ...
7
votes
3answers
142 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
277 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 ...
7
votes
1answer
271 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
149 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
1answer
896 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
119 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 ...
7
votes
1answer
156 views

How to do computations simultaneously in multiple notebooks? [duplicate]

I have a Mathematica script which takes a few hours to run. I want to be able to open another notebook while it's running and do some other computations. I have enough many cores on my computer for ...
7
votes
1answer
322 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 ...
7
votes
3answers
242 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
1answer
219 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
116 views

After modifying expression, new result doesn't replace old one

After I modify and re-evaluate an expression, the new result doesn't replace the old one. Rather, what happens is that the old result gets pushed down and Mathematica displays the current result at ...
7
votes
3answers
311 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, ...
7
votes
1answer
394 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 ...
7
votes
1answer
127 views

When are EvaluationNotebook[] and ButtonNotebook[] different?

I am looking for a concrete code example where EvaluationNotebook[] and ButtonNotebook[] will return different results. The ...
7
votes
1answer
149 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.: ...
7
votes
1answer
258 views

How to write plain Greek in a text cell

If I create a text cell and type some greek text, most of the symbols are italics as if the cell had an Input style. It doesn't happen with latin characters. I recollect that it is impossible to fix ...
7
votes
0answers
356 views

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

Using Palettes -> Writing Assistant -> Math Cells, you can enter aligned equations such as: ...
6
votes
3answers
377 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 ...
6
votes
3answers
131 views

How to select only NotebookObjects that are referring to ordinary notebooks? (not palettes etc.)

There is of course function Notebooks[] But, unfortunatelly it hasn't got useful options in this context. My question is how to pick ...
6
votes
3answers
500 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 ...