Questions related to the Mathematica front-end (graphical user interface).

learn more… | top users | synonyms

109
votes
2answers
3k 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 ...
51
votes
4answers
3k 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 ...
48
votes
2answers
1k 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 ...
46
votes
2answers
1k 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 ...
36
votes
3answers
762 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 ...
34
votes
8answers
7k views

How can I improve Mathematica's resolution on a macbook retina display?

Mathematica looks a bit fuzzy on the retina screen, how can I increase the resolution? Here another screenshot showing a direct comparison between the browser and Mathematica
30
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 ...
30
votes
4answers
648 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 ...
30
votes
2answers
1k 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 ...
29
votes
5answers
1k views

Can the banner in the Home Edition be removed?

The Mathematica Home Edition shows a banner at the top of every notebook: Is there a way to (permanently) get rid of it, without violating the EULA? Edit Yesterday, I sent this message to WRI ...
28
votes
3answers
2k 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 ...
28
votes
2answers
777 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?
28
votes
3answers
978 views

Automatically check student answers in tests

I am a physics teacher and I am looking for a way to create homework assignments within Mathematica so that each problem has an input field that students can use to check their answers. For example, ...
28
votes
2answers
613 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 ...
26
votes
1answer
709 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. ...
25
votes
5answers
831 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.
25
votes
2answers
591 views

Special Mathematica Cell to work with R code

I have enjoyed working with R inside Mathematica. But it would be nice If I could have a special R cell. For example, instead of typing ...
25
votes
2answers
1k 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 ...
25
votes
3answers
656 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, ...
25
votes
3answers
696 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 ...
24
votes
2answers
927 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 ...
24
votes
2answers
623 views

Template completion

In version 8, if one evaluates test::usage="test[x,y]"; then types test, then shift-cmd-k (or shift-ctrl-k), a template ...
23
votes
1answer
488 views

Do you really want to quit the kernel? Yes!

When I have entered some bad code and hit shift+enter before thinking about the perils of finite RAM my computer obviously starts suffering. I have found two options that usually lets me recover ...
23
votes
1answer
496 views

How do I find all the possible events that work with EventHandler?

The EventHandler documentation, More Information section, lists 5 mouse events: ...
22
votes
1answer
923 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 ...
22
votes
2answers
698 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 ...
21
votes
0answers
427 views

Changing FrontEnd automatic scrolling in version 8

In Mathematica versions < 8, the FrontEnd has a very intelligent behavior: On evaluation, it by default automatically scrolls down the Notebook window to the last printed Output cell but also ...
20
votes
2answers
474 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 ...
20
votes
2answers
705 views

How do I extract the contents of a selected cell as plain text?

My aim is to extract the contents of an Input cells as plain text. Ideally I would like to be able to select one or more Input cells and press a button which would then extract the text from these ...
20
votes
1answer
307 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. ...
19
votes
1answer
720 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"]?
18
votes
2answers
623 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 ...
18
votes
1answer
194 views

What's the internal command for entering a fraction?

I'm looking for the FrontEnd`Foo[...]-like command that's triggered when pressing Ctrl + /. Are there any discoverability ...
17
votes
4answers
439 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?
17
votes
3answers
286 views

Is there a way to require confirmation for execution of certain cells?

Often I have Notebooks where I generate several images and export them into files. Now when I want to change one image, I'd like to just re-evaluate the complete notebook, however I generally do not ...
17
votes
1answer
1k 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 ...
17
votes
1answer
426 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 ...
16
votes
2answers
784 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 ...
16
votes
2answers
371 views

Are later versions of the Front-End compatible with older Kernels?

At my graduate school, all of the clusters still use version-6, and I only have version-7 and version-8 installed on my computer. I would like to use those machines remotely. Are either of the ...
16
votes
3answers
447 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 ...
16
votes
2answers
576 views

Custom Mathematica Shortcut: Copy as $\LaTeX$

If you edit the Wolfram Research\Mathematica\8.0\SystemFiles\FrontEnd\TextResources\Windows\MenuSetup.tr file you can make Ctrl+Shift+C copy not plain but in ...
16
votes
1answer
405 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 ...
15
votes
3answers
359 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}] ...
15
votes
2answers
299 views

Automatically close Mathematica

It seems there are a lot of related topics but I haven't found an answer. I want to automatically quit Mathematica after some procedures are done but dialog window appears: ...
15
votes
2answers
302 views

Obtaining the number in CounterBox

Is there a way of obtaining the current number of a counterbox? Say for instance that in a new notebook you create 3 section cells. Then by evaluating the command: ...
15
votes
2answers
282 views

MathKernel doesn't return all Messages

In Mathematica I run this command: Plot[Sin[x], {x, 1, 15}, GridLines -> error] It generates a Plot with this error message: A GridLines specification ...
15
votes
2answers
558 views

Command Completion

Note: As of version 9, this functionality is available and works out of the box. I've a few questions about Command Completion in Mathematica. I recently discovered this feature, and it's really ...
15
votes
1answer
324 views

What is Sub Mathematica?

When looking at the locally available licenses, I see four entries: "Mathematica", "MathKernel", "Sub Mathematica" and "Sub Mathkernel". Now "Mathematica", "MathKernel" and "Sub Mathkernel" are clear, ...
15
votes
3answers
598 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 ...
15
votes
1answer
217 views

Running some code every time a new notebook is opened

Is it possible to automatically execute some code every time a new notebook is opened? So for example I would like to print a message "New notebook" every time a new notebook is opened. This ...