Questions tagged [notebooks]
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.
1,374 questions
0
votes
0
answers
44
views
How do I switch off the spell checking in notebook text cells? [duplicate]
When I write my notebooks I usually use English in the text cells. However, in some cases, I need to write in Russian or German. Then the German or Russian text appears underlined. Please find below ...
5
votes
0
answers
69
views
Is it possible to modify the evaluation timestamp format?
There's an option in the options inspector to display a timestamp upon evaluation of a cell: Notebook Options → Evaluation Options → EvaluationCompletionAction → AddTimeStamp. That causes the date and ...
17
votes
1
answer
625
views
How are people using the Notebook Assistant and how useful is it?
This is more of a community question than an answerable problem. If it's out of bounds I'll be happy to withdraw it. But, one year out, I'm curious as to other WL users' experiences with the ...
0
votes
0
answers
82
views
Selecting notebook cells in MMA 14.3.0
I'm trying a notebook in 14.3.0 for the first time and trying to select cells for deletion, etc. But whenever I move my cursor to the cell bracket, the scroll bar expands and blocks the pointer from ...
0
votes
0
answers
75
views
How can I run cleanup code automatically at the end of an evaluation (without wrapping the code)?
I would like to invisibly open a notebook, return the notebook object, use it in subsequent intermediate evaluations within the active overall evaluation, and then close the notebook object at the end ...
4
votes
1
answer
241
views
Pollution in context added by BeginPackage remains even after Exit
Tested in
$Version
(* "14.3.0 for Microsoft Windows (64-bit) (July 8, 2025)" *)
The issue can be reproduced in the following manner. First, execute the ...
0
votes
0
answers
44
views
NotebookOpen opens subgroups when Visible-> False is used
If I have a notebook (in this case its a .wl file, idk if that matters) that I close some cell groups in, and then I close that and open it later, typically the same cells are opened/closed as when I ...
0
votes
0
answers
54
views
Get file directory, whether notebook or script
I have some code, currently in a notebook, which should produce some output in the same directory as the notebook, for which I am using NotebookDirectory[]. I would ...
1
vote
0
answers
110
views
Why are notebooks not saved on the drive when you save it [closed]
I lost three days of work because Mathematica doesn't save notebooks to the hard drive unless you change their names. All multiple saving of the notebooks were purely virtual, and when Mathematica ...
0
votes
0
answers
66
views
Skip evaluation of some section
I’m using Section and Subsection styles in a Mathematica Notebook to organize code. I want to control whether Input cells under ...
1
vote
1
answer
173
views
Print just the plots in a notebook [duplicate]
Is there a way to quickly print all of the plots (and nothing else) in a notebook?
1
vote
0
answers
65
views
Set tab width in code cells and .wl notebooks
How can one set the default tab-width for code cells and the default cells in a .wl notebook. At the moment, the default is 4.
Note: I know this is a basic question, but neither Google, Stack Exchange,...
5
votes
1
answer
164
views
Change user-assigned symbol syntax coloring
I would like user-assigned symbols to be colored dark blue instead of black, to distinguish them from built-in symbols. Is this possible? I wasn't able to find any option available for this in the ...
0
votes
1
answer
148
views
Randomly disabled UNDO
I am using
mathematica 12.3.1.0 Linux x86 (64bit)
When I am writing some script on mathematica notebook, at some random points, the undo function stop tracking of what I have been doing.
For example, ...
1
vote
1
answer
98
views
Mouse over bubble comment or hidden comment for further explanations about an equation
Hello I am pretty new to Mathematica, using v 14.1, I usually use it primarily for writing as notes for future reminding how I did certain problems to remind me of understanding it if I had forgotten, ...
1
vote
0
answers
86
views
Exclude Sections/Subsections/... from evaluation. Use NonEvaluatingSection?
I have a notebook with many sections, subsections and subsubsections. I want to evaluate the notebook or a section but would like to have certain subsections or subsubsections not evaluate. How do I ...
0
votes
0
answers
64
views
How can I make the notebook scroll speed independent of the height of the notebook contents?
When I am working in a very long notebook, the mouse wheel scrolls much faster than it does in a short notebook. This is very annoying because scrolling around gets more and more difficult the longer ...
2
votes
0
answers
190
views
How to activate smooth scrolling of notebooks in version 14.2 on Linux
I work on Linux OpenSuse Leap 15.6 with Mathematica Apps V12 and V14.2 installed on separate partitions. Scrolling of Mathematica Notebooks in V12 and V14 behave differently. Scrolling in V12 is ...
0
votes
0
answers
41
views
Why does the word confidential appear at the top of my Mathematica 12 window? [duplicate]
I inadvertently pushed a button(s) and the word Confidential appeared at the top of my notebook window. Then I noticed that I could hide or display the code. I really like this feature but I don't ...
11
votes
2
answers
622
views
Option "Assumptions" can cause crash in a notebook (*.nb)
Update 2
It seems that it has been fixed in V. 14.2.1.
Update
As what Domen mentions in the comment, as well as I have tested it, it seems highly relevant to the option "Code caption language&...
4
votes
1
answer
334
views
Stylesheets not working in Mathematica 14.2
I have 14.2 and I chose macOS stylesheet option from writing assistant. Now the yellow color is not applied anymore in 14.2
The white part of the notebook should be yellow.
Does anyone has this issue?
0
votes
0
answers
32
views
How to turn off automatic highlighting of character? [duplicate]
The Mathematica notebook highlights all instances of a symbol while typing. I found a description of this feature on the "Summary of New and Improved Features in 14.1" (link) with:
...
6
votes
1
answer
90
views
Is it possible to specify that the next output cell created have a specific CellTag?
I would like to specify that the next output cell created has the specified CellTag. I want only that cell to have that tag. Ideally I want that tag in addition to ...
2
votes
1
answer
85
views
Create a keyboard shortcut to make a selection-dependent hyperlink?
I'd like to create a keyboard shortcut, say Ctrl+H, that replaces some text XYZ with ...
7
votes
0
answers
409
views
How to make an unpaid version of the new notebook assistant?
I already pay many dollars to openai and other llm vendors every month and I have a separate key for each service. Is there a way to make a side-docked "Assistant Notebook"
that does the ...
1
vote
0
answers
91
views
How to remove unexpected menuebar in notebook?
While working with a notebook an additional blue bar popped up:
Don't know how it happens.
My Question: How could I remove this "blue bar"?
Thanks!
3
votes
1
answer
202
views
Appearance of text in notebook
I'm running Mathematica 13 on Linux, both at home and at work.
I brought a notebook I was working on at home to work, but when I opened it the commands were completely out of place - characters seem ...
1
vote
0
answers
73
views
Change the color of the edge of the notebook
In an attempt to have a truly dark theme for Mathematica, I am using one of the dark themes, a custom CSS (inspired by this answer) and only a few WindowElements (...
0
votes
1
answer
106
views
Finding cells modified on in a particular week?
I have a directory with ".nb" files (currently 503 of them), and I know that I've been modifying one of them on week 45 of 2023.
I'm looking for code that will list .nb files that have a ...
3
votes
0
answers
122
views
How to ClearAll["Global`*"] when I close any notebook?
Assume there are several notebooks opened. I want to ClearAll["Global`*"] when I close any notebook(by clicking the close button of the window).
The code below is my attempt although it does ...
5
votes
1
answer
158
views
Can one make a minimizable palette?
I would like to minimize my palettes sometimes.
This was the closest that I could find, but it's not quite the same. Also, the WindowFloating options is deprecated ...
1
vote
0
answers
120
views
How to Style certain words in ExternalLanguage cells?
I know I can Style all content of a cell using:
...
1
vote
0
answers
84
views
How to apply a function f to the output of external language cell?
I have a External language session of "SQL-JDBC" created and connected to the External language cell:
...
5
votes
2
answers
165
views
Button That Makes a Variable Change Between Two Values Over a Specified Time Duration
The code below produces a button that toggles the right cell bracket margin of the current notebook between 0 and 150.
...
2
votes
1
answer
207
views
Pressing Ctrl+( with highlighted text converts them into some markup code and won't undo
I am new to Mathematica, and I am using Mathematica v12.3. I am writing some math notes which include text and some equations. I know that in a text cell I can press CTRL+( and start typing some ...
0
votes
0
answers
86
views
How to stop the cursor from jumping out of parentheses/brackets/braces
I am having an issue that is seriously impacting my ability to fluently write code in wolframnotebook 14.1.
Whenever my cursor is just behind an opening bracket/parenthesis/brace, it automatically ...
4
votes
1
answer
163
views
Switch between different documents in the same window
This feature comes from one book Introduction to Machine Learning.
Its notebook edition provides the following interactive features without open new window:
But it cannot view and edit the source ...
1
vote
1
answer
127
views
How can I provide a custom LLMTool to the current chatbook?
I wrote a useful LLMTool that works well with LLMSynthesize, but now I want to chat with it using the full chatbook interface. Is there a way to add that tool to the current notebook's ...
1
vote
0
answers
86
views
How to save and restore cursor position?
After performing some operations on cells in a notebook (with NotebookWrite and NotebookDelete) I need to restore the cursor's position within a particular cell. How can this be done?
I've found that <...
2
votes
1
answer
155
views
Evaluate section in a loop
I would like to evaluate a section several times for different values of some variables. I can evaluate it once with a simple command, but not in a loop.
To evaluate it only once, this code works
<...
2
votes
1
answer
133
views
Why is doing Monitor with a ProgressIndicator so slow?
Here's a handy "monitored map" function:
...
7
votes
2
answers
286
views
How to choose colors that are friendly to color deficient people?
I need to prepare a Mathematica notebook for presentation,
in which I want to use several different colors in order to
highlight some key symbols.
To make the presentation accesible to color deficient ...
2
votes
0
answers
135
views
Why do notebooks by default put symbols in Global context where they can collide with all other notebooks?
This default setting can cause subtle and difficult to find problems, such as inconsistent or incorrect answers when symbols, variables or functions in different notebooks have the same name. I speak ...
4
votes
1
answer
158
views
Is there an easy way to batch the change of StyleSheet in 120 notebooks
At one point in the past I believed that a style sheet colocated with a notebook would not require a path. For example, if my notebook resided in the same directory as this style sheet, the style ...
2
votes
0
answers
74
views
Create custom Code like Cell
I like the formatting for Code and would like to use it for all my input. However, I want to be able to have both Initialization and non-initialization cells and I'...
1
vote
1
answer
107
views
Controlling Manipulate using a mouse-over wheel scroll
Can I get Manipulateto allow me, once the plot appears, to hover my mouse over the plot and scroll my mouse wheel to vary the parameter $a$? Currently I need to ...
3
votes
1
answer
146
views
Defining an output format that doesn't break Ctrl+Shift+I
I'm used to pressing Ctrl+Shift+I (or N if I want a shorter form) to reformat my input cells in a nicer way after editing them, e.g., to remove unnecessary parentheses, add or remove spaces as needed, ...
2
votes
1
answer
123
views
How to clear NotebookEventActions or unbind keyboard event
I tried to write a function to "Evaluate in Place", as I've shown in: How to get the output of evaluating in place and append the output to the place.
But now I have encountered a new ...
2
votes
1
answer
258
views
How to get the output of evaluating in place and append the output to the place
I am trying to use MMA for some engineering calculations, and the text cell contains both descriptive text and mathematical formulas. The example is as follows:
...
0
votes
1
answer
93
views
Appending Tabs to an existing TabView output
I would like to do a kind of versioned TabView for several runs of the same code.
I would like some help in fixing this prototype code:
...