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.
8
votes
2answers
461 views
Collapse a section of a huge function
(I have recently taken to Mathematica... still a noobie)
Is there an elegant way of hiding/collapsing only a portion of a function (for example, in Matlab, within a function, one can collapse the for ...
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?
10
votes
3answers
790 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, ...
9
votes
2answers
254 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 ...
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.:
...
12
votes
2answers
1k 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:
...
10
votes
2answers
750 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
602 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 ...
3
votes
2answers
409 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 ...
2
votes
2answers
178 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:
...
10
votes
2answers
349 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 ...
6
votes
2answers
197 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
549 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 ...
24
votes
2answers
574 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
140 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 ...
6
votes
1answer
259 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
1answer
364 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 ...
27
votes
2answers
671 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
123 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 ...
19
votes
2answers
360 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
315 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
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
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 ...