Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

How does one generate custom symbols? For example, the physicist notation for the rotation is "nabla cross function". In this case however, Mathematica complains that the [esc]del[esc] symbol evaluates to the unary operator Del[], which of course cannot take a cross ([esc]*[esc]) after it, since a bracket is expected.

Although a correctly looking output is generated by

Prefix[f[a], "\[Del]\[Times]"]

the result cannot simply be assigned to an operation (Prefix[...] := ...) you can type in using the nicely readable [esc] commands I mentioned above. Is there some way of doing this, i.e. invoking completely custom functionality to (combinations of) existing symbols?

share|improve this question
1  
Well, there's the Notation package... –  J. M. Jan 18 '12 at 1:12
    
Retagged from "Formatting and layout" tags to "Notation". I think this better describes this. –  Mike Bantegui Jan 18 '12 at 2:05
1  
In case you may be interested in, there are three undocumented symbol \[Laplace] \[Divergence] \[Curl] may be useful. –  Silvia Jan 18 '12 at 23:27
    
@Silvia Although those aren't necessarily related to the question, they might prove pretty useful, thanks! –  David Jan 18 '12 at 23:33
    
You should use \[Cross] (ESC cross ESC) rather than \[Times], since it's conceptually a cross product, not scalar multiplication. –  Mechanical snail Nov 15 '12 at 21:29

1 Answer 1

up vote 8 down vote accepted

You may wish to use the Notation package.

It lets you do these things fairly easily. I'd copy and paste some examples but they don't really copy and paste well. Read through the tutorials and you'll see some examples of how to do this.

You may also be interested in the Vector Analysis package.

share|improve this answer
1  
Notation[ParsedBoxWrapper[\(\[Del] \(\[Cross] a_\)\)] \ \[DoubleLongLeftRightArrow] ParsedBoxWrapper[\(f[a_]\)]] does the trick, actually. –  J. M. Jan 18 '12 at 1:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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