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

learn more… | top users | synonyms

8
votes
2answers
369 views

How to Enable Syntax Coloring of Pattern Match Variable Only (i.e. Without Coloring any Associated Pattern)?

Syntax coloring for the following function definition foo[x_List] := ... will color green (and italicize by default) the argument name ...
1
vote
1answer
157 views

keyboard sequence for Magnify in version 8?

It used to be that you could find a Magnify item in the Format menu of the Mathematica front-end, at the very bottom if I remember correctly. You could get at the item in Windows by a keyboard ...
8
votes
1answer
261 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 ...
5
votes
1answer
113 views

Remove CellMargins option from many cells

I have a very old notebook in which many cells had the CellMargins option set manually. What's the easiest way to remove all those manual option settings?
10
votes
1answer
331 views

How can I style text like in the documentation?

I'm writing an article, and I really like this style that you get when you type ?AnyFunction. Is it possible to achieve this?
3
votes
1answer
388 views

Option to change cursor/caret shape

While editing on a Mathematica notebook, I often find myself needing to do something else outside of Mathematica for a few hours. After finishing such outside tasks, I resume to work on the notebook. ...
5
votes
2answers
447 views

Developing domain specific languages and computational knowledge engines using Mathematica

In one of Leonid Shifrin's excellent summaries, he mentioned that MMA capabilities include developing Domain Specific Languages (DSL). I'd like to develop a Health care IT application that can ...
5
votes
1answer
216 views

Why does the Front End group backslashes into pairs?

What is \\ for? Help finds nothing on it. An odd number of backslashes greater than one are grouped by two and the last one is displayed with a different color. ...
15
votes
2answers
603 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 ...
18
votes
2answers
635 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 ...
4
votes
0answers
246 views

Front-end glitch when interacting with dynamic content

This is now bugging me too much to ignore it anymore. When I interact with a notebook that has dynamic content, for example moving a slider, Mathematica regularly brings other open notebook windows to ...
31
votes
6answers
2k 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 ...
12
votes
1answer
582 views

Finding a Specific Line in a Package

In a package I am developing, I accidentally left this line Protect[ uncompleted prior to running the package. Mathematica produced this error message ...
17
votes
3answers
475 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 ...
13
votes
2answers
543 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 ...
26
votes
3answers
688 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, ...
9
votes
2answers
653 views

Avoiding an unresponsive user interface in OS X

I have found that despite Mathematica's numerous updates, each of which have added much functionality, one fundamental issue remains unaddressed: The unresponsiveness of the UI when I make a mistake ...
9
votes
1answer
131 views

Why are some functions available without having to load their parent package?

Functions such as GraphDistanceMatrix[] or AdjacencyMatrix[] are available without invoking ...
18
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 ...
4
votes
2answers
396 views

Close subgroup of cells and keep them closed

Styles can be used to give your calculation a book-like structure; with chapters, sections and paragraphs. Closing those subgroups of cells you don't want to see is then very powerful to create visual ...
8
votes
1answer
187 views

Pasting TemplateBox with a Dynamic argument

Ok, this is pretty specific... The objective is to use a TemplateBox to format something that is programatically inserted with ...
9
votes
1answer
171 views

Is there a way to have a Tooltip for non-editable raster graphics produced by MakeBoxes?

I have a function which produces a large object I would like to hide. Formatting is of course an option but I'm hoping for something a little more meaningful using raster graphics and ...
8
votes
3answers
1k views

How to prevent the welcome screen from showing up after I close my last notebook? (Ubuntu 11.10, MMA 8.0.4.0)

I would like to prevent the welcome screen from showing up after I close my last notebook. This is not an issue on my Windows machine, so I suspect it is system dependent. I am running Ubuntu 11.10. ...
11
votes
3answers
569 views

Is it possible to insert an animated image into Mathematica notebook?

I find it very convenient to use Mathematica notebooks to organise the codes + results. I was wondering if it is possible to insert an animated image (say an animated gif) in the middle of a ...
9
votes
1answer
260 views

SubTitle and SubSubTitle do not group by default

For some reason, the SubTitle and SubSubTitle cell formats do not group automatically on my machine any more, and I cannot ...
8
votes
2answers
146 views

Make the selection become the button you click

Let's assume I want a button that, when you click it, get the cell that contains it selected. This approach won't work, it selects the cell containg the selection previous to the click. ...
12
votes
3answers
1k views

Collapse a section of a huge function

Is there an elegant way of hiding/collapsing/folding only a portion of a function? If functions could span multiple cells, this would have been straight-forward!
8
votes
2answers
255 views

Prevent text from wrapping in a notebook

By default in the Notebook interface the text wraps. Is it possible to prevent this wrapping?
7
votes
2answers
384 views

Detecting double click events

Is there a way to detect double click events? I did not find anything on the doc page of EventHandler. Use case: I want to re-implement the ...
2
votes
1answer
132 views

Copy TraditionalForm output to TraditionalForm input while keeping formatting

When I want to copy a scientific notated number from a TraditionalForm output to an input it formats it in a weird way: Another thing I want to do is only copy a few number of decimals, and remove ...
17
votes
3answers
296 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 ...
9
votes
0answers
414 views

How to copy hyperlink addresses using the keyboard

I would like to copy the address of a hyperlink in Mathematica using the keyboard. I found code for copying hyperlink addresses in ContextMenus.tr: ...
9
votes
1answer
133 views

How does AutoStyleWords work?

The title says it all. I assume it provides some way of automatically applying a certain style, or a list of options, to certain words written, just like other options of the sort like ...
8
votes
2answers
282 views

What is modifying an init.m that changes menu Palettes order?

When I installed the mathStatica application, it seems to have made some kind of change deep in my Mathematica 8.0.4 system files. That change causes the mathStatica palette to appear out of ...
26
votes
5answers
908 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.
15
votes
3answers
729 views

Opening a context menu (with the Menu key)

Is it by any chance possible to make the Menu key work as one would expect in Mathematica: opening a context menu? The Menu key does nothing in version 7 or 8 on Windows.
3
votes
2answers
116 views

Getting the complete Cell expression some input would generate as output

I can think of calling Print and then SelectionMove to copy the expression and then delete it. Is there any more transparent ...
7
votes
2answers
262 views

Creating a TeXForm/TraditionalForm/etcForm - like function

How could we go about creating a function that behaves like those? After a while thinking, my best try is with CellPrint printing an ...
5
votes
1answer
160 views

CellEvaluationFunction or $PreRead stripping inline cells from text cells

I want to create a textual style that has some CellEvaluationFunction that processes the contents of the cell a certain way. Particularly, it has to do something ...
8
votes
2answers
437 views

Opening new notebooks with a non-default window size

I'd like to set Mathematica (8.0.4.0) up so it opens new notebooks with the "NaturalColor" stylesheet and with a window size like {800,770}. I tried to change ...
9
votes
1answer
193 views

How do I programmatically add to contextual menus?

To programmatically add to menus you can do as described here: How do I add to menus? What can I do to programmatically add to contextual menus? Is something similar to ...
7
votes
1answer
162 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.: ...
5
votes
2answers
168 views

How change order of items added to the Palettes menu?

After installing an add-on package (Spin) in $UserBaseDirectory/Applications, there is now a new palette for that package listed on the ...
12
votes
1answer
540 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 ...
6
votes
1answer
429 views

How to execute kernel command from Front End?

Documentation for Yuri E. Kandrashkin's OptionsExplorer package says to add the following menu commands in MenuSetup.tr: ...
11
votes
4answers
559 views

How to automate a FrontEnd return?

I use some custom shortcut keys in KeyEventTranslations.tr. One is for the Delete All Output function: ...
14
votes
2answers
3k 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 ...
111
votes
2answers
4k views

Implementing efficient multiple undo

At the time this question was asked, version 10 was not out yet. The Front End of Mathematica 10 does have multiple undo, see the answer by John Fultz. The Mathematica Front End's built-in Undo ...
21
votes
0answers
447 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 ...
16
votes
2answers
865 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 ...