1
$\begingroup$

I want to install a new package in Mathematica. If I understand the userguide right, I also have to edit the UnicodeCharacters.tr-File by another *.tr-File for example containing

0x2219 [InnerProduct] ($ip$) Infix 460 None 5 5

(Output from FilePrint[]). How can I do this?

$\endgroup$
4
  • 1
    $\begingroup$ This is a little weird. Can you give a link to the new package that has these instructions? $\endgroup$ Commented Jun 24, 2022 at 16:20
  • 2
    $\begingroup$ Modifying .tr files in the layout is generally a "bad idea." $\endgroup$ Commented Jun 24, 2022 at 16:25
  • $\begingroup$ I already copied the UnicodeCharacters.tr File just in case $\endgroup$ Commented Jun 24, 2022 at 16:41
  • $\begingroup$ @J.M. the Package is from github.com/ArturasAcus/GeometricAlgebra $\endgroup$ Commented Jun 24, 2022 at 16:53

1 Answer 1

1
$\begingroup$

As an author of the package I would like to give some explanation (too long for a comment). First, I completely agree with the opinion that modification of system files is a very bad idea and should be avoided. Despite this, in this forum your can find a number of suggestions to modify KeyEvents (add/modify keyboard shortcuts), change initialization files, or even global system options.

I modified the UnicodeCharacters.tr because I was not smart enough to find another way to introduce "nice" notations for so called "geometric product", "outer (wedge) product" and "inner (scalar) product" and (most difficult) how to set correct precedences for these operations. In particular, among these I want the "inner product" to have the highest precedence, followed by "outer product" and "geometric product", respectively. If somebody could show how to avoid the modification of UnicodeCharacters.tr while keeping the same functionality I would be very interested to learn. The need to modify a system file in particular doesn't allow me to make a "paclet" version or any other auto install, which is a serious restriction.

Too carry out the modification, I recommend using the simplest text editor your have. Examples could be notepad, gvim, nedit, or any listed here and many others. Even MS Word or open office will be ok. Just open UnicodeCharacters.tr with any of these editors, append the mentioned lines to the end of the file (you can remove comments from that add.tr file if you want to avoid a warning, which shows only once, the first time you run Mathematica after the modification).

IMPORTANT: DO NOT EDIT UnicodeCharacters.tr with Mathematica itself! Mathematica will automatically modify the file's content and the file will be corrupted!

Regarding the safety of these modification, of course I cannot provide any warranty. In principle, the modifications may interfere with some computations. In my own experience using Mathematica with the modified UnicodeCharacters.tr a few hours a day every day starting from Mathematica 7, I haven't noticed any problem. Of course, I would not recommend to use the package for critical calculations. Indeed, this is not even a proper package, strictly speaking: it is just another Mathematica notebook containing some context modification commands. Even more: the package will never be finished, and is continuously modified (i.e. it will always remain "experimental"). Nevertheless, I found it quite useful for the geometric (Clifford) algebra community and I decided to share it at the user's own risk (all this is clearly stated in the installation instruction).

$\endgroup$
4
  • $\begingroup$ Perhaps this answer will give you some ideas for avoiding modification of UnicodeCharacters.tr. $\endgroup$ Commented Jun 26, 2022 at 5:26
  • $\begingroup$ @CarlWoll The main problem is how to set proper precedences between product operators. Not about how to input them. $\endgroup$ Commented Jun 26, 2022 at 15:34
  • 1
    $\begingroup$ Just add a SyntaxForm option for that $\endgroup$ Commented Jun 26, 2022 at 15:35
  • $\begingroup$ @CarlWoll The idea is interesting. Still cannot fully realize how different operations can be set to different precedences when interpretation have to occur simultaneously for few products. Please take a look at my old question mathematica.stackexchange.com/questions/89762/… . The idea, though, is interesting and I will try to explore it. $\endgroup$ Commented Jun 27, 2022 at 9:35

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.