Questions related to the Mathematica front-end (graphical user interface).
19
votes
1answer
646 views
Customizing syntax highlighting for private cell styles
Is there any way to set up a cell style with a particular syntax highlighting?
For example, I'd like to have a CProgram cell to write in blue the C special words.
I have done it by setting ...
23
votes
2answers
629 views
Is it possible to change the colors of the highlighted code in the Mathematica frontend?
With Format -> Edit Stylesheet... it is possible to adjust text-properties, text-colors, formatting of equations, etc of a notebook and to use this style-definitions again by installing it as ...
16
votes
2answers
459 views
Automating Esc [[ Esc formatting?
Is it possible to program the Front End to automatically format double square brackets without having to type Esc[[Esc each time? It's awful to have to type Esc ...
11
votes
3answers
201 views
Why do buttons with ChoiceDialog freeze the front end?
Pressing the button below will freeze my front end. An unpainted white dialog box comes up, then it completely freezes, and I need to forcibly kill the front end. CPU usage stays at zero during ...
20
votes
2answers
471 views
How do I add new menuitems to menus?
What are some complete examples of what one would include in a FrontEnd init.m that would make use of FrontEnd`AddMenuCommands ...
16
votes
3answers
883 views
Antialiasing in 3D
Is it possible? Is it platform specific? Does it rely on the graphics hardware? Why does the antialiasing slider under Preferences > Appearance > Graphics do nothing? I remember seeing some ...
10
votes
2answers
299 views
How to automate a FrontEnd return?
I use some custom shortcut keys in KeyEventTranslations.tr. One is for the Delete All Output function:
...
12
votes
3answers
220 views
How can I get the unchanged Box form of an arbitrary expression?
One may observe that MakeBoxes does not give the actual Box form of various expressions:
MakeBoxes[{1*^4, 000123, a*b c}]
...
39
votes
2answers
930 views
Syntax highlighting for your own functions
Mathematica has a useful feature that for functions and special constructs getting passed local variables (for example Minimize or ...
23
votes
2answers
667 views
Saving a notebook as PDF, preserving syntax highlighting
Currently, one may save notebooks as PDFs from the menu by Save As... and then selecting PDF (on a Mac, I imagine it is similar on other OSs). However, the ...
13
votes
1answer
394 views
Programmatically move the cursor to a desired location on the screen
Is it possible to set/move the mouse pointer's location directly from Mathematica without using external tools like Run["xdotool mousemove x y"]?
13
votes
2answers
284 views
How to replace the style of the inline cell in a StyleSheet
I would like to change a StyleSheet in such a way that any text that is typed into the inline cell (the one created by Ctrl+9) is shown in a different font (e.g. the font of my choice). At present I ...
8
votes
3answers
227 views
How to anchor a Pane's scroll position to the bottom?
Suppose I have a Pane containing some dynamic text, for example that is being updated by a logging function.
...
92
votes
1answer
2k views
Implementing efficient multiple undo
The Mathematica Front End's built-in Undo command can only undo a single editing step.
Has anyone implemented or seen implemented an efficient and comfortable multiple undo?
I have in mind ideas ...
40
votes
2answers
776 views
Is it possible to improve Mathematica's auto-completion feature?
In this answer Brett Champion describes how one can intercept and modify the suggestions used for auto-completion.
Question: Is it possible to modify the suggestion for the automatic auto-completion ...
27
votes
6answers
1k views
How to visualize/edit a big matrix as a table?
Is it possible to visualize/edit a big matrix as a table ? I often end up exporting/copying big tables to Excel for seeing them, but I would prefer to stay in Mathematica and have a similar view as in ...
20
votes
1answer
307 views
Open two copies of the same notebook
Is there a way to open one notebook in two (or more) different windows? This can be helpful when working with a long notebook and one wants to edit one part of it while looking at a different part. ...
17
votes
1answer
185 views
How can I easily eliminate the dependency of a stylesheet on a non-built-in stylesheet?
As per discussion here:
User A has a notebook that uses custom definitions from styles.nb. Now user A passes the notebook to user B. The styles do not show up for B because B does not have styles.nb. ...
20
votes
1answer
371 views
What is the most effective way to setup a Notebook with transparent background but solid contents?
I know there is a Notebook option WindowOpacity can be used to adjust the opacity of a whole notebook. But what I want is keeping the text and graphics and so on ...
16
votes
4answers
482 views
What is the complete list of valid Front End Tokens?
What is the complete list of valid Front End Tokens?
Preferably by version number, for at least versions 7 and 8.
10
votes
2answers
265 views
Defining symbol shortcuts in the Front End
I was wondering (because I could not find any documentation on this) if it is possible to do shorthand abbreviations for domains or could one define them?
E.g.
In[1]:= Element[p,Complexes]
...
15
votes
3answers
427 views
How to convert between various ItemSize/ImageSize units?
How can one convert between the implicit units used by Grid (ems and line height for horizontal and vertical dimensions) and printers points (in ...
28
votes
3answers
470 views
Usage of \[InvisibleApplication] and other related invisible characters
From the front end, \[InvisibleApplication] can be entered as Esc @ Esc, and is an invisible operator for @!. By an unfortunate ...
10
votes
2answers
474 views
How can I change the keyboard shortcut for switching the active window?
The default keyboard shortcut (on Windows at least) for switching focus to the next window is Ctrl+F6, and for switching to the previous windows it's Shift+Ctrl+F6. How can I change this to Ctrl+Tab ...
18
votes
2answers
563 views
Is it possible to Print expressions in reverse order?
Let's say I'm debugging a program step by step and want to Print some expressions (using ShowIt, for example).
Is there a way to output the result of ...
7
votes
2answers
153 views
Restrict Sensitivity of Locators in LocatorPane
We can restrict the movement of locators in a LocatorPane as follows:
In the following example, the first locator's movement is confined to the x-axis and the ...
9
votes
1answer
161 views
Shortcut to insert CounterBox
Is there a shortcut to inserting a CounterBox as you type in text mode? I haven't yet made extensive use of them but I can foresee them in my near future and the ...
5
votes
1answer
217 views
How make AddMenuCommands work in an init.m
I want to add some items to the Mathematica 8.0.4 Help menu (under Mac OS X). In
[$UserBaseDirectory]/Autoload/FrontEnd/init.m
I have the following cell:
...
10
votes
2answers
739 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 ...
32
votes
3answers
1k views
Using the Mathematica front-end efficiently for editing notebooks
Background:
I have used Vim for 15+ years. There is a certain "one"-ness with the editor one achieves. Emacs users also experience this. Notepad users do not.
My current interaction with the ...
35
votes
3answers
549 views
How can I set up a versioning system within a notebook?
Since the Frontend crashes a lot, for important work it would be nice to have the notebook automatically branch and save itself every so many minutes.
For instance, commands like ...
25
votes
3answers
450 views
Is there a convenient way to copy/paste text-interspersed SE code snippets into Mathematica?
Is there a way to copy and paste code snippets from SE to Mathematica if these snippets are interspersed with text?
Like e.g. in Morphing Graphics, color and location in both the question and answer, ...
22
votes
2answers
471 views
How can I set an image to be the Notebook's background?
Is it possible to set a notebook's background to a nonscrolling image?
17
votes
1answer
282 views
How do I find all the possible events that work with EventHandler?
The EventHandler documentation, More Information section, lists 5 mouse events:
...
15
votes
1answer
228 views
Creating a cross referencing shortcut
I believe I have gather all the pieces of information I need to create what I want but yet I cannot make the connection. Let me start with the goal.
Simple Cross referencing
Let us start by creating ...
8
votes
2answers
259 views
How can one define an infix operator with an arbitrary unicode character?
You can setup "UsefulFunction[a, b]" to use custom infix notation "a [LeftRightArrow] b" as follows:
...
7
votes
2answers
211 views
How to select all initialization cells?
Is there an easy way to select all initialization cells (and only those) in a Mathematica notebook?
6
votes
1answer
376 views
Start Mathematica without the menu bar?
Is there any way to start Mathematica without the main menu bar? To be precise:
Sometimes I make standalone mini-applications that I would like to just have in their own little windows without the ...
14
votes
3answers
357 views
Memory Leak in Frontend - anyone know a workaround?
When using Rasterize on a Graphics expression composed of many differently coloured Graphics objects memory is allocated in the frontend which is then not released or reused when a similar graphic ...
12
votes
2answers
224 views
How can I make an InputField[] with a proper newline/carriage return?
The return key does not work as expected in an InputField, how can I overcome this?
11
votes
1answer
163 views
Implementing bookmarks in the front end when editing a package
Sometimes when working on larger pieces of code or on a larger package I really miss the option to bookmark the current line/position in the code.
Since the front-end is quite extendable my question ...
8
votes
2answers
516 views
How to change the style definitions for Default.nb?
I have looked over other questions related to style definitions, and looked through the Mathematica 8 documentation, but I do not know why I am having so much difficulty setting the default font in my ...
8
votes
1answer
247 views
Customize front end to add notifications when evaluation finishes?
Is it possible to add some customization code to the front end, so that when all cells have finished evaluating, some user code can be run?
Background: I'm currently running some Mathematica programs ...
13
votes
1answer
501 views
Why are some function names red?
I need to evaluate
Needs["GraphUtilities`"]
before I can use functions such as GraphPath[]. When I do so, some functions get ...
10
votes
1answer
192 views
Best way to add KeyEvents and faster Quit
Many users have asked how to add KeyEvents to speed/improve keyboard input. This is just a random example. The technique is always the same. It requires that you ...
7
votes
2answers
114 views
Close programmatically all cell groups in Mathematica?
Is it possible to collapse all cell groups in the current notebook? I tried
...
8
votes
2answers
180 views
Listing all celltags in a notebook
Is there a command to obtain all the CellTags and the style of the cell they are in? This question is derived from this question which was answered by jVincent. ...
7
votes
1answer
199 views
No Syntax Highlighting of Package Functions
Lately, my installation of Mathematica has decided not to highlight any symbols loaded from packages. The picture below is a good representation of this:
where after loading both ...
19
votes
2answers
487 views
What are the most common (usual) ways to make palettes with non-trivial functionality?
What are the best (most robust and most convenient) ways to create palettes that can be installed permanently (using Palettes -> Install Palette...) and are safe ...
16
votes
1answer
218 views
Saving my code before cell evaluations: Insurance against front end hanging
I guess my programming working style is not unique. I develop programs one cell at a time, and when I have some confidence about what I did, I put all my mess together refining the code, building up ...

