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.

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?

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

2 Answers 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

share|improve this answer
add comment

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?

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

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.