Skip to main content
Tweeted twitter.com/#!/StackMma/status/259581849960075265
added 2 characters in body
Source Link
Mr.Wizard
  • 275.2k
  • 34
  • 606
  • 1.5k

One may observe that MakeBoxes does not give the actual Box form of various expressions:

MakeBoxes[{1*^4, 000123, a*b c}] 
RowBox[{"{", RowBox[{"10000", ",", "123", ",", RowBox[{"a", " ", "b", " ", "c"}]}], "}"}] 

The 1*^4 was expandexpanded, the leading zeros of 000123 were stripped, and the distinction between * and (space) was lost.

Also, MakeBoxes doesn't like syntactically invalid or incomplete strings:

MakeBoxes[0001+`1,*^6*a b] 

Syntax::sntxi: Incomplete expression; more input is needed.

How can one get the actual Box form visible with Show Expression (Ctrl+Shift+E) without copy & paste?

One may observe that MakeBoxes does not give the actual Box form of various expressions:

MakeBoxes[{1*^4, 000123, a*b c}] 
RowBox[{"{", RowBox[{"10000", ",", "123", ",", RowBox[{"a", " ", "b", " ", "c"}]}], "}"}] 

The 1*^4 was expand, the leading zeros of 000123 were stripped, and the distinction between * and (space) was lost.

Also, MakeBoxes doesn't like syntactically invalid or incomplete strings:

MakeBoxes[0001+`1,*^6*a b] 

Syntax::sntxi: Incomplete expression; more input is needed.

How can one get the actual Box form visible with Show Expression (Ctrl+Shift+E) without copy & paste?

One may observe that MakeBoxes does not give the actual Box form of various expressions:

MakeBoxes[{1*^4, 000123, a*b c}] 
RowBox[{"{", RowBox[{"10000", ",", "123", ",", RowBox[{"a", " ", "b", " ", "c"}]}], "}"}] 

The 1*^4 was expanded, the leading zeros of 000123 were stripped, and the distinction between * and (space) was lost.

Also, MakeBoxes doesn't like syntactically invalid or incomplete strings:

MakeBoxes[0001+`1,*^6*a b] 

Syntax::sntxi: Incomplete expression; more input is needed.

How can one get the actual Box form visible with Show Expression (Ctrl+Shift+E) without copy & paste?

Source Link
Mr.Wizard
  • 275.2k
  • 34
  • 606
  • 1.5k

How can I get the unchanged Box form of an arbitrary expression?

One may observe that MakeBoxes does not give the actual Box form of various expressions:

MakeBoxes[{1*^4, 000123, a*b c}] 
RowBox[{"{", RowBox[{"10000", ",", "123", ",", RowBox[{"a", " ", "b", " ", "c"}]}], "}"}] 

The 1*^4 was expand, the leading zeros of 000123 were stripped, and the distinction between * and (space) was lost.

Also, MakeBoxes doesn't like syntactically invalid or incomplete strings:

MakeBoxes[0001+`1,*^6*a b] 

Syntax::sntxi: Incomplete expression; more input is needed.

How can one get the actual Box form visible with Show Expression (Ctrl+Shift+E) without copy & paste?