1
$\begingroup$

It is not clear, what symbol is used in Notation function description for arrows? How to enter it in textual mode within Workbench?

Here: http://reference.wolfram.com/mathematica/Notation/ref/Notation.html

$\endgroup$
1
  • $\begingroup$ Perhaps if you copy the code from the front end as inputform? $\endgroup$
    – Ajasja
    Jan 25, 2013 at 13:53

1 Answer 1

2
$\begingroup$

The Notation function is part of the Notation package. You need to load the package first, then you can use the Notation palette to simply paste the Notation template and fill the placeholders.

If you cannot use the notation palette,for ex. because you are using a code editor like in WB, then you use the notation template with option Action -> PrintNotationRules. The Notation templates are user interfaces to easily input NotationMakeExpression and/or NotationMakeBoxes commands. So my suggested workflow is the following:

  • load the Notation package in a new notebook
  • using the notation palette, make your special notation. Use the Action -> PrintNotationRules option in the template

The output are NotationMakeExpression and/or NotationMakeBoxes cells. Select the contents of these cells and paste them in the code cells of your .m file in WB. Of course you must also have a Needs["Notation`"] command present in your .m file.

That's it!

Personally I use a different workflow for my packages (my WildCats package heavily uses the Notation package). I use WB calling MMA as editor of my .nb files which autogenerate the .m files for my package. I described this technique here.

You can read the documentation page:"Options and Auxiliary Functions". At the end the section :"The Option Action" the option Action -> PrintNotationRules is explained.

Happy Notation creation! :-)

$\endgroup$
2
  • $\begingroup$ I need to enter code from Within Wolfram Workbench. This is programmers environment based on Eclipse and has no any palettes. $\endgroup$
    – Suzan Cioc
    Mar 26, 2013 at 11:32
  • $\begingroup$ @SuzanCioc I just updated my answer to cover this case $\endgroup$
    – magma
    Mar 26, 2013 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.