Questions related to the Mathematica front-end (graphical user interface).
5
votes
1answer
110 views
Why is SystemDialogInput failing to return a save file path?
I am encountering a problem using SystemDialogInput within a Button. The
code below shows what I am doing. To test this create a ...
4
votes
1answer
86 views
Is there a way to programmatically do a “save as ” on an init.nb file to save it as init.m?
I am using Mathematica 8.0.4.0 running under Windows 7. Is there a way to programmatically do a "save as " on an init.nb file to save it as init.m?
In the documentation center under ...
22
votes
2answers
472 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?
5
votes
1answer
109 views
New display format needed: “drag box”
I want to create a new display type, especially for numbers or text, but potentially for arbitrary objects as well. I want a "drag box" where not all of the number (object) is visible, but dragging ...
4
votes
1answer
93 views
What is the syntax for selecting multiple layers in an Overlay?
From the documentation:
Overlay[{Subscript[expr, 1],Subscript[expr, 2],...},{i,j,...},s]
allows selections to be made and controls to be clicked in
Subscript[expr, s].
and an example of ...
6
votes
3answers
103 views
Use Slider2D to add data points to a list
This bit of code sets up a list with the first entry already in it -- {{1,1}}
...
4
votes
2answers
120 views
How to display cell groups in documentation pages
I recently introduced my WildCats package in the Meta Thread What third-party packages do you use? and @Szabolcs promptly observed that:
"I noticed that there are many cell groups in the documentation ...
12
votes
2answers
332 views
How can I overload autocompletion to work with full contexts?
I would like for the autocomplete feature to search through contexts, for example if I have a symbol named A`B`C`MyFunction, when I type A` and press "cmd + shift + k" it will complete it.
Edit
To ...
7
votes
2answers
115 views
Close programmatically all cell groups in Mathematica?
Is it possible to collapse all cell groups in the current notebook? I tried
...
3
votes
1answer
206 views
How to close the (local) Debug window/palette
I have this local debug window that is so annoying
How can I hide it? What is the purpose of it?
10
votes
2answers
268 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]
...
8
votes
2answers
233 views
How do I change the pressed button appearance?
On my system when a default button is pressed it turns light blue. This appearance can be changed using this code from the documentation:
Use a second element to get the appearance of a pressed ...
3
votes
0answers
85 views
TeXToBoxes and BoxesToTeX BoxRules options
A recent question has gotten me to look more into the tex conversion rules. Consider the following latex string:
...
15
votes
1answer
231 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
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. ...
9
votes
1answer
162 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 ...
8
votes
1answer
133 views
Accessing the Options of the parent Cell
From within the Kernel, it is possible to access a Cell's options using CurrentValue. For instance, in a ...
8
votes
3answers
154 views
Intermediate display similar to PrintTemporary
Using MMA we often come across situations like the following
cityLIST = CityData[#, "Name"] & /@ CityData[];
This code if you evaluate will emit some display ...
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?
35
votes
3answers
552 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 ...
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
218 views
What is the simplest way to set the toolbar of a notebook to an image?
For custom stylesheets, it's nice to have a graphic banner in the Docked Cell. According to the doc page tutorial/IntroductionToToolbars, this is how you do it, but it seem a bit overkill:
...
9
votes
2answers
205 views
Copying Greek text from notebooks as unicode [duplicate]
Possible Duplicate:
How to “Copy as Unicode” from a Notebook?
How can I copy Greek text from notebooks as proper Unicode that can be pasted into other applications? If I type ...
7
votes
1answer
156 views
How to add an entirely new menu
Is it possible to add an entirely new menu, say menu "CustomApp" on the fly?
For example a CustomApp package could add its own menu "CustomApp" with submenus, ect, once Needed.
Former examples I ...
10
votes
1answer
193 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 ...
10
votes
2answers
220 views
17
votes
1answer
283 views
How do I find all the possible events that work with EventHandler?
The EventHandler documentation, More Information section, lists 5 mouse events:
...
5
votes
1answer
78 views
Unexpected behavior of PasteButton
Assume the following very complex palette:
CreatePalette[
PasteButton[FontColor -> RGBColor[1, 0, 0]]
];
Its purpose is to insert a ...
15
votes
2answers
239 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:
...
4
votes
1answer
131 views
Searching Notebooks for String Patterns using Workbench v2
The Workbench webpage describing new features in version 2 lists the ability to "Search notebook documents with the Mathematica pattern search utility" under the heading Mathematica Front End ...
3
votes
1answer
134 views
Inline cells and conversion rules
In the following link you can find the following about ConversionRules when exporting to HTML:
specifies mappings from Mathematica cell styles to HTML elements, ...
7
votes
1answer
412 views
Creating and editing new stylesheets
I'm trying to create a stylesheet, but the process has become painful. I'm sure that this has to do something with resetting something in Mathematica everytime I make changes to the stylesheet. To ...
7
votes
1answer
122 views
Making cells group
After reading rcollyer's post I'm still not able to understand how grouping rules work.
Here is a problem I'm facing. What I want is to create a new title, section and subsection styles. I want the ...
23
votes
2answers
635 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 ...
15
votes
1answer
189 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 ...
9
votes
1answer
131 views
Preserving indentation when creating a new line (when editing in a package)
Background:
This is the third question in a row of questions about how to make editing packages in the front-end much more bearable (the other two are here and here). It seems that the front end is ...
11
votes
1answer
259 views
How to Print to the Console
Background:
Using the settings under Edit-> Preferences->Evaluation I can redirect all the Print statments to the console.
What I'd really like to do is redirect just some specific ...
24
votes
3answers
554 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, ...
2
votes
1answer
205 views
Borked Find Window in OS X
I've been having this happen to me on a daily basis with the Find & Replace window on OS X:
No text can be typed into the red regions, so all find & replace functionality is gone when this ...
6
votes
0answers
118 views
How to create a floating image with no window background [duplicate]
Possible Duplicate:
What is the most effective way to setup a Notebook with transparent background but solid contents?
When MMA 8 starts, a floating image of spikey is shown. As you can see ...
6
votes
1answer
377 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 ...
8
votes
2answers
166 views
Keeping Quotation Marks in Output
I am running into the following seemingly simple problem. I have this code:
testphrase="i love you";
input=ToLowerCase[StringSplit[testphrase, Whitespace]]
It ...
3
votes
2answers
79 views
TextAlignment->Center in a notebook with WindowSize->All
I'm creating a dialog with CreateDialog. I want one of its cells to have its text centered.
By default (and I like that default), the notebook created has ...
11
votes
1answer
164 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 ...
4
votes
1answer
176 views
Running a package automatically when it's saved
When developing some new code (eg. a function to analyse something) I usually make a .m and .nb file. The code goes in to .m is then called from the .nb.
But sometimes I forget to run the package ...
0
votes
0answers
55 views
InputString in Button freezes Mathematica [duplicate]
Possible Duplicate:
Why does Button[ … , ChoiceDialog[] ] freeze the front end?
Warning: the following code may freeze your session, as it does mine. I have to wait for the dialog ...
16
votes
2answers
461 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
1answer
112 views
Text replacement rules in $FrontEnd?
I want to set up a part of my Mathematica package so that typing <-Space is replaced with the left arrow character (← or ...
6
votes
1answer
98 views
How to let output and message be print to two separate external files?
How to let output and message be print to two separate external files? Also, I'd like the content print out to have similar look as when it's print inside the notebook, i.e. it should be in ...
3
votes
1answer
76 views
Syntax Coloring for “Possible Unwanted Assignment” Issue
Apparently Mathematica's syntax coloring engine believes that the second assignment in the following code excerpt (concocted for illustration purposes only) is a "Possible Unwanted Assignment" since ...

