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

learn more… | top users | synonyms

9
votes
2answers
633 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
128 views

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

Functions such as GraphDistanceMatrix[] or AdjacencyMatrix[] are available without invoking ...
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 ...
4
votes
2answers
378 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
168 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
553 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
251 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
145 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!
7
votes
2answers
244 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
373 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
131 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
293 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
132 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
266 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 ...
25
votes
5answers
882 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
713 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
114 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
252 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
154 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
418 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
192 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
158 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
161 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
531 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
427 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
530 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
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
434 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
827 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 ...
10
votes
3answers
475 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. ...
9
votes
1answer
696 views

Changing default window appearance

Since every single time I start Mathematica, my first action is aligning the windows properly (Notebook on the left for $2/3$ of the screen, help on the right for the other $1/3$), I was wondering ...
6
votes
1answer
155 views

Changing the MouseAppearance on the entire notebook front end

Using MouseAppearance one can change the cursor image when passing over an expression. Is it possible to change the cursor image for the entire notebook front end ...
7
votes
1answer
290 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: ...
15
votes
3answers
611 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 ...
9
votes
2answers
420 views

Text in columns

So far I've only seen the front end work in a one-cell-below-the-other manner, so I am probably not expecting much of this question, but here it goes. Is there any way to create a document with text ...
12
votes
2answers
536 views

How to set focus of a dialog window?

I have a dialog, which, when pops up, requests input from the user. How can I set the window up that the focus is on the InputField of the new window (i.e. the ...
50
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 ...
9
votes
2answers
243 views

What is this character: [esc][comma][esc]?

What is the character obtained with they key sequence Esc,Esc called? On my front end it is not displayed, but there's something there messing up my input. It's a bit annoying when I'm after a $\mu$ ...
11
votes
4answers
3k views

How to change default notebook background color?

How does one change the default notebook background color?
7
votes
2answers
349 views

How do I prevent auto loading of blank notebook at startup?

I'm using Mathematica 8 with operating system Mac OS X Lion. When I open Mathematica it always loads a blank notebook. I don't want it to load anything by default. In the Preferences pane there ...
10
votes
1answer
212 views

Mouse gestures or keyboard shortcuts for navigating forward/backward in the documentation center

Is there any way to get gestures (e.g. trackpad- or Magic-Mouse-swiping left/right) to work for navigating forward and backward in the Mathematica help browser, particularly on a Mac? If not, what are ...
12
votes
2answers
684 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 ...
7
votes
2answers
367 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 ...
20
votes
2answers
751 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 ...
9
votes
2answers
347 views

Default position and size of front-end windows (in Windows 7)

I'm running Mathematica 8 on Windows 7. When I start the Mathematica front end, I would like the menu bar and the blank notebook that opens to appear at a different position and with a different size ...