Message Boards Message Boards

0
|
4940 Views
|
5 Replies
|
4 Total Likes
View groups...
Share
Share this post:

[?] Create new special characters?

Posted 7 years ago

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
5 Replies

Lior,

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

Regards

Neil

POSTED BY: Neil Singer
Posted 7 years ago

Excellent, this is exactly it.

Many thanks, Neil!

POSTED BY: Lior Samuel
Posted 7 years 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

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
In[1]:= hugo := Overscript["\[LeftArrow]", "+"]

In[2]:= hugo

Out[2]= 
\!\(\*OverscriptBox["\<\"\[LeftArrow]\"\>", "\<\"+\"\>"]\)
POSTED BY: Hans Dolhaine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract