Message Boards Message Boards

How to create new special characters?

GROUPS:

Greetings! As a part of my research, I am trying to define some new operators in wolfram mathematica. So far I've been able to use the existing special characters to this end. For example, the definition:

a_ \[LeftArrow] b_ :=  "great sucess"

Is working just fine, and can be cleared via

Clear[LeftArrow]

However, I want to define more operators with symbols that are not part of the special characters list. e.g.

\[AwesomeSpecialCharacter]=Overscript["\[LeftArrow]","+"]

(this obviously doesn't work) Is there a way to create such a new special character so I could later define it as an operator?

POSTED BY: lior samuel
Answer
9 days ago
In[1]:= hugo := Overscript["\[LeftArrow]", "+"]

In[2]:= hugo

Out[2]= 
\!\(\*OverscriptBox["\<\"\[LeftArrow]\"\>", "\<\"+\"\>"]\)
POSTED BY: Hans Dolhaine
Answer
9 days ago

Also, Look at Format]. See the Documentation [on output formats and Format here

You can define a function and have it display as your special character or you can define a variable to display as a special character.

POSTED BY: Neil Singer
Answer
9 days ago

If I understand you correctly, these changes to symbols and formatting do not apply at the input level. For example even after Hans' example I couldn't write:

a_\[hugo]b_:="whatever"

Because the expression \[hugo] is still meaningless. What I'm saying is that I want to create a new operator that can be used when writing expressions, and not just to format a function to look like use of an operator...

POSTED BY: lior samuel
Answer
9 days ago

Lior,

You want the notation package. Use the notation palette to make creating your notation easier.

Regards

Neil

POSTED BY: Neil Singer
Answer
9 days ago

Excellent, this is exactly it.

Many thanks, Neil!

POSTED BY: lior samuel
Answer
8 days ago

Group Abstract Group Abstract