5

The Cell expression for:

<>

is

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?

Davorak
  • 407
  • 4
  • 7

2 Answers2

3

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?

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
2

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:

parentheses

DavidC
  • 16,724
  • 1
  • 42
  • 94