In Mathematica, we can often get very special symbols by typing esc ... esc or \[...], such as the Wolf or Mathematica's logo. Is it possible to define new special symbols like those and then use them as \[Wolf]?
Asked
Active
Viewed 542 times
6
J. M.'s missing motivation
- 124,525
- 11
- 401
- 574
Riccardo Cazzin
- 428
- 2
- 12
-
2see InputAliases – kglr Aug 25 '17 at 22:14
1 Answers
5
It depends on what you mean by a "special symbol".
If you just want an Esc ... Esc shortcut to insert some predetermined expression, you can use an input alias.
Any Unicode character in the basic multilingual plane can be entered by typing \:xxxx, where xxxx is its code point in hexadecimal. You can of course define a more memorable input alias for it.
If you really want something that behaves like a character but has a custom glyph, then the answer is "not really". You would have to find an unused code point in the Private Use Area and edit Mathematica's font files to add a glyph for that code point. Which means these notebooks would only display correctly on your machine.
J. M.'s missing motivation
- 124,525
- 11
- 401
- 574
Itai Seggev
- 14,113
- 60
- 84
-
Thanks a lot. I wanted to create a brand new character, but I think I'll give up – Riccardo Cazzin Aug 26 '17 at 18:09
-
1I'm alright with this; I'm not quite ready to see emojis in a Mathematica notebook just yet... – J. M.'s missing motivation Aug 26 '17 at 22:09
-
@Itai May I ask you what encoding is used by the input form
\xxx? For example,"\041"corresponds to the character"!"with code 33. – Alexey Popkov Aug 27 '17 at 03:37 -