3

Given this input

FullForm[ToString[TraditionalForm[x]]]

Mathematica outputs

"\!\(TraditionalForm\`x\)"

It seems like \! at the beginning of the string indicates that the following is to be interpreted as an expression. But this can't be quite right, because

"\!\(Minus\`x\)"

displays as simply x, rather than -x.

How should the escape characters \!, \(, \`, \) be understood?

Kuba
  • 136,707
  • 13
  • 279
  • 740
Stephen Powell
  • 1,061
  • 5
  • 13

1 Answers1

3

I decided to edit the title and answer this question as wiki because I think it is not easy for new users to find this kind of information. The more if they are not aware of special handling of ? ! in search fields.

So the explanation of things like:

\!\(TraditionalForm\` c (1 + x)\)   

is in the tutorial String Representation of Boxes.


Here are related topics on SE:

Kuba
  • 136,707
  • 13
  • 279
  • 740