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

How to create a notebook element that can replace itself?

I would like to create a notebook element that can replace itself. Here's an example to illustrate: ...
22
votes
3answers
867 views

How to place an image inside a notebook, with the minimum memory footprint?

When creating a notebook with images, like photos, the file tends to quickly get big, which makes it difficult to use the notebook format for training material containing a lot of images. Are there ...
4
votes
1answer
146 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 ...
13
votes
2answers
1k views

Relative paths for portable notebooks in Mathematica

I cannot find how to use relative paths in Mathematica. My directory structure is simple. ...
26
votes
4answers
2k views

Saving data inside a notebook so that I don't have to run it again?

Piggybacking on this, I am somehow not fully convinced that I can't save data generated by a calculation in a mathematica file so that when I re-launch said file, I wouldn't have to run my ...
5
votes
2answers
590 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 ...
16
votes
1answer
408 views

NotebookFind and String Pattern Expressions

Is there a way that NotebookFind can be used to match string pattern expressions rather than just strings? The documentation for ...
15
votes
2answers
605 views

Is it possible to embed the Mathematica editor?

Is it possible to embed a Mathematica window into a .NET application? I mean not just the interop, but actually making the notebook editor window part of a .NET form. Is this possible?
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 ...
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 ...
1
vote
1answer
145 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 ...
5
votes
1answer
104 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?
3
votes
1answer
344 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. ...
12
votes
1answer
230 views

How to make an unremovable modal window?

Is there any way to securely stick a notebook window (e.g. a dialog) on screen that it cannot be closed/removed/hidden by any of the standard OS shortcuts, like AltF4 or AltTab under Windows? The ...
12
votes
1answer
325 views

Is it possible to colorize brackets in the notebook editor to see matches more easily?

I've seen that if I click on a square bracket [, I can then use "Check Balance" in the right click menu to see where the matching bracket is. Is there a way to see ...
3
votes
0answers
85 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 ...
14
votes
6answers
917 views

Annoying display truncation of numerical results

I have a lot of data to inspect. An example of a number in my program is 123.189094 This gets displayed as 123.189 ...
3
votes
1answer
108 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 ...
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 ...
12
votes
3answers
1k views

Collapse a section of a huge function

Is there an elegant way of hiding/collapsing/folding only a portion of a function? If functions could span multiple cells, this would have been straight-forward!
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?
11
votes
3answers
1k views

Programmatically generate packages from notebook files?

Currently, there are two ways I know of to generate a package (.m) file from a notebook file; one is to set the AutoGeneratedPackage option in the Option Inspector, ...
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 ...
7
votes
1answer
148 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.: ...
15
votes
2answers
3k views

Pasting $\LaTeX$ into a Mathematica notebook

I have read that $\LaTeX$ source can be directly pasted into a Mathematica notebook. However, I have been unsuccessful in this regard. An example of the errors received are: ...
11
votes
2answers
2k views

Delete the current notebook cell using the keyboard

Is there another way than pressing Ctrl+. until the whole cell is selected and then pressing Del? If this is not built in, can I create some sort of a global macro to do this and bind it to a ...
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 ...
5
votes
3answers
637 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
2answers
221 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: ...
11
votes
4answers
2k views

How to change default notebook background color?

How does one change the default notebook background color?
11
votes
2answers
581 views

How to make a parallel auto-generated .m package from Initialization cells?

according to the documentation at ref/InitializationCell, When you first save a notebook that contains initialization cells, you have the option to make a ...
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 ...
12
votes
3answers
1k views

How to set default magnification for all windows

This is certainly a newbie question but I could not find the answer by searching. I am using Mathematica 8 under Windows 7. I want to use default magnification of 150% for all notebooks and help ...
26
votes
2answers
812 views

Good ways to organize and document collections of mathematica notebooks?

I've now been using Mathematica for about a year, and am starting to get a somewhat unwieldy collection of notebooks. Sometimes I've figured out how to do a particular task in one of them, and want ...
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 ...
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 ...
19
votes
3answers
872 views

How to find pieces of code responsible for syntax errors?

Especially: How to find the piece of code responsible for a missing parenthesis problem caused by a misplaced SuperScriptBox For last 30 minutes (and I was lucky ...
35
votes
2answers
1k views

Is there a way to separate variables between multiple notebooks?

I often correct homework by checking the calculations in Mathematica. Sometimes you would like to have two solutions open at once. However often defined symbols such as ...
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 ...
20
votes
2answers
456 views

Programmatically copy code so that all output is commented out

UPDATE: The final palette has a new home here! Please test and provide feedback (usability, suggestions, bugs) A note to the readers and voters: This is intended for community use, so please test the ...
12
votes
2answers
782 views

How to export to HTML and not lose Grid Frame in the generated HTML?

This is a known issue for me with Mathematica. When I export a notebook to HTML, Mathematica loses some decorations such as Grid Frame lines (in grid and like objects). For example, creating this ...
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
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 ...
32
votes
0answers
496 views

Numbered equations/formulas

How do you number equations in Mathematica notebooks so that they are exported correctly into latex? In case you don't know how to put numbered equations here is quick review. Open a new notebook ...