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)

9
votes
3answers
128 views

questions with hidden but revealable hints and answers

I would like to create a notebook with questions that have attached hints and answers. The hints and answers should be hidden, but the display should clearly indicate (e.g., with a button) that each ...
9
votes
5answers
602 views

How to create a screen shot of a notebook

I would like to use Mathematica programmatically to take snapshots or screenshots of any open notebook. For example, I would like to get from the notebook created with this command ...
9
votes
1answer
179 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
3answers
1k 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 of ...
9
votes
1answer
751 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 ...
9
votes
2answers
203 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 ...
9
votes
2answers
693 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 ...
9
votes
1answer
175 views

How to get a list of all expressions in a notebook matching a certain pattern?

Suppose I have a Mathematica notebook saved to a certain location on disk. Given a pattern I need to get the list of all expressions matching this pattern that appear in input, output or print cells ...
9
votes
3answers
1k views

Viewing Mathematica Demonstrations Project Code

I hope I am going insane and the I'm not seeing the snake about to bite me... How does one view the code in the demonstration projects that one can download from wolfram.com? It seems like all of ...
9
votes
1answer
85 views

How to put Magnification control in docked cell

I have made a handy toolbar that provides access to menu items that are not visible when I F12 a workbook. I would like to add the following function to a button in the toolbar: ...
9
votes
1answer
147 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
1answer
254 views

How to save the result in the Notebook (.nb) and shut down the computer when the calculation is done

I have a notebook(.nb) which its calculation is time-consuming and long. I can not observe it if the calculation is done or not. Therefore, I want to : Save the results in the notebook(.nb) ( I do ...
9
votes
2answers
184 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
336 views

how to efficiently jump between sections in a notebook?

I have functions defined in some section of the notebook and some cells where I use these functions maaaaany pages below in the same notebook. If I want to go and change the definition of the function ...
9
votes
0answers
54 views

Issue with undo after copying a string inside a string

Bug introduced in 10.0 and persisting through 10.4.1 or later Here's a small but annoying issue related to undo and copying of strings. Steps required to get the problem: Type ...
9
votes
0answers
158 views

Wrapping text around pasted graphic

I would like to use Mathematica to create all my documents for my high school math class. I cannot, however, find a way to copy and paste a diagram (let's say from Geogebra) and then place it where I ...
9
votes
0answers
126 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
4answers
255 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
1k 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 ...
8
votes
3answers
231 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
1k 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
1k 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 File -> Save As......
8
votes
2answers
386 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 Mathematica,...
8
votes
2answers
581 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 ...
8
votes
3answers
122 views

Create a closed notebook

When using nb = CreateDocument[], is there an option that prevents the notebook from opening automatically? And is there a command that opens the notebook when ...
8
votes
2answers
224 views

How to paste an equation to a graphics

I wonder why PasteButton["Plot", Plot[\[SelectionPlaceholder], {x, 0, 10}]] applied to x^2 --- highlighted --- doesn't work.
8
votes
2answers
900 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 ...
8
votes
2answers
109 views

Why a function returns two different values if copied into a Notebook or imported with Get from a Wolfram Mathematica Package?

I have some Mathematica code that shows a behaviour I really cannot understand. The code only contains a bunch of function definitions. If I paste it in the Notebook Front End and I evaluate it, I ...
8
votes
1answer
132 views

Auto highlighting input cells depending on input expression (eg its Head)

Is it possible to programmatically highlight (eg, by change background color) an input cell conditional on the input expression's Head (or other attributes) upon evaluation? For example, would like ...
8
votes
2answers
172 views

Labeled destroys the log scales in “log” plots when notebook is re-opened

Bug introduced in 10 or earlier and persists through 10.4 While testing this pdf export bug caused by Labeled, I noticed that this function also destroys the log ...
8
votes
2answers
160 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
2answers
510 views

Adapting “Find and Replace” functionality to work with Patterns

I was thinking if there is something like Find and Replace (Crtl+F) functionality adapted to work with patterns. Probably not, but it seems possible to create this with some effort and skills in <...
8
votes
1answer
970 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 ...
8
votes
1answer
350 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
107 views

Framing a combination of cells in the notebook

In my notebook, I have the following cells, which I tried to put around a single frame with a light blue background color. After entering the cells, I selected all four, then clicked the frame ...
8
votes
1answer
493 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
926 views

Creating self destructing notebook

Inspired by this post I've been trying to implement the idea in Wolfram with no success yet. I've come pretty close though and need some help. So I've managed to do this: ...
8
votes
1answer
133 views

Programming scripts to create and modify stylesheets: problems with contexts

I am trying to emulate the shift and shift+tab feature in the Outline.nb stylesheet that comes with Mathematica. I added the following code to a private ...
8
votes
2answers
111 views

Seeking for method to speedup and get more flexable control Notebook History

When doing calculations in notebook, I modify the code a lot, and there are several versions of similar codes in the same notebook. But I found myself easily forgot which version is the newest, and I ...
8
votes
1answer
242 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 ...
8
votes
1answer
228 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
801 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 ...
8
votes
1answer
324 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
84 views

Reading Cells or Boxes expression by expression

Let's say we have a cell: (*newline*) (*newline*) Plot[ x, {x, 0, 1} ] (*newline*) Plot[x, {x, 0, 2}] How to read it expression by expression? ...
8
votes
1answer
85 views

On an existing notebook, how to transform all “double brackets” into “DoubleBracket”

Sometimes, having all double brackets [[...]] transformed into \\[LeftDoubleBracket] ... \\[RightDoubleBracket] can really ...
8
votes
1answer
100 views

How to sort cells?

Is there a way to programmatically reorder the section cells in a notebook alphabetically? For example:
8
votes
1answer
150 views

When are EvaluationNotebook[] and ButtonNotebook[] different?

I am looking for a concrete code example where EvaluationNotebook[] and ButtonNotebook[] will return different results. The ...
8
votes
2answers
344 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
0answers
318 views

How to write markdown with Mathematica?

Usually I typeset with Latex and Compute with Mathematica and then copy the outputs as Latex code and insert them in Latex, so I have to switch between Latex and Mathematica frequently. Thanks to the ...
8
votes
0answers
477 views

Keyboard issues with Mathematica 9.0.1 for Linux [closed]

After working for a while with Manipulate function and increasing the number of variables to be manipulated, keyboard stops working properly in the Notebook. It ...