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)

6
votes
4answers
148 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 ...
5
votes
2answers
122 views

How can I determine the hyperlink of a currently opened documentation page programmatically?

Every pages in the documentation has a hyperlink. Here are some examples: ...
5
votes
2answers
598 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 ...
3
votes
2answers
222 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: ...
7
votes
1answer
259 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
1answer
117 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 ...
6
votes
1answer
158 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...? ...
5
votes
3answers
170 views

How do I create a package from an existing notebook?

I have a notebook containing some functions, for example: f[x_] := 2*x g[x_] := x^2 Now I would like to convert this notebook to a package, ...
4
votes
1answer
113 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 ...
11
votes
3answers
175 views

How to collect expressions from cells created by Print?

I have a notebook where evaluation of a certain cell produced hundreds of adjacent output cells using Print. I need to create a list containing all expressions from ...
11
votes
1answer
337 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)?
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. ...
8
votes
2answers
190 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
3answers
237 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 ...
4
votes
1answer
162 views

Setting a Counter in Mathematica Notebook

I would like to write a book using Mathematica, but I will write one chapter on several files. How to tell Mathematica that the BookChapterNumber pointer has the ...
3
votes
0answers
40 views

Is it possible to enclose code into collapsible/expandable regions? [duplicate]

In some programming languages (e.g. C#, Visual Basic) there are language constructs that have no effect on the execution of code whatsoever, but exist solely to allow grouping fragments of code into ...
3
votes
2answers
80 views

How to specify a StyleSheet of a newly programmatically-created notebook?

I would like to make a button that opens a notebook upon pressing. The point is that I would like the notebook to be made according to a specified StyleSheet. To be more specific, here is a simple ...
3
votes
2answers
98 views

ToBoxes Respect Spaces Code

Is there a way to force either ToBoxes or MakeBoxes to respect the spacing that occurs in the code? For example is there a way ...
3
votes
1answer
518 views

Manipulate (Linux version of Mathematica)

I'm runnning Mathematica 9 on Ubuntu 11.10. After installing CDF player I still have problem (most of time) with Manipulate. Only way I'm able to change value of a ...
2
votes
2answers
185 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 ...
0
votes
0answers
47 views

Why are fonts in my notebooks grainy after transferring to a new machine? [duplicate]

After transferring Mathematica (and successfully transferring my license) to a new machine (a Retina MacBook Pro) all the fonts in my documents look jagged: How do I get Mathematica to show smooth ...
8
votes
2answers
109 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
4answers
799 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
1answer
131 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
117 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 ...
2
votes
0answers
103 views

Mouse cursor disappears

After working on a notebook for a while sometimes my mouse cursor disappears. I can click on different cells and the text cursor will move accordingly but I just can't see the mouse cursor. Just now ...
2
votes
2answers
133 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: ...
1
vote
2answers
61 views

NotebookWrite Cell with Grid

I'd like to NotebookWrite a Cell in StandardForm with a ...
0
votes
2answers
80 views

Cases Message Valid Notebook Structure

Note: Spelunking will likely be needed. Execute the following. You should get back and error along the lines of First::first:... This error is unimportant except ...
0
votes
1answer
96 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 ...