The Cell expression for:



Cell[BoxData["<>"], "Input"]

However similar expressions are parsed into RowBox(s), for example:


Cell[BoxData[RowBox[{">", "<"}]], "Input"]

How do I get expressions like >< to act like <> does?

  • 1
    $\begingroup$ My bet is you can't. Operators are predefined and I definately hope someone proves me wrong $\endgroup$ – Rojo Aug 23 '12 at 23:26
  • $\begingroup$ You could probably put something together with InterpretationBox and MakeBoxes $\endgroup$ – rm -rf Aug 23 '12 at 23:37
  • $\begingroup$ @R.M I will look into it last time I tried to use InterpretationBox I ran into a dead end. $\endgroup$ – Davorak Aug 23 '12 at 23:51

Michael Pilat has stated that you cannot create your own compound operators.

You may find some utility in these posts:

Prefix operator with low precedence

How can one define an infix operator with an arbitrary unicode character?

| improve this answer | |
  • $\begingroup$ Shouldn't it be closed as a duplicate then? $\endgroup$ – rm -rf Aug 24 '12 at 2:53
  • $\begingroup$ @R.M which one where? $\endgroup$ – Mr.Wizard Aug 24 '12 at 7:12

Are you interested only in the case of "less than" and "greater than" symbols? Might other variations serve the purpose?

The following parentheses are represented like "<>" (they are represented without using RowBox), regardless of the order of the characters:


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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