Of course we know,the
TreeForm[a + b^2 + c^3 + d] will give a
Graphics object.How to assign to a variable an expression which typesets to the same box structure as a TreeForm of a particular input?
Maybe one think we just use the
var=TreeForm[a + b^2 + c^3 + d],but you will find the
Head of the
TreeForm.I record a gif for specify this case.
And I found this regular is apply to any
*Form function.Such as
a = InputForm[Graphics[Circle]]; Head[a]
I have a awkward workaround calling the clipboard can do it almost.
var = NotebookGet[CopyToClipboard[TreeForm[a + b^2 + c^3 + d]]; ClipboardNotebook]
But there are some problem in this solution.
varinclude all information,but the
- I really don't want to call the clipboard.
So how to assign the
Graphics object to a variable?