As I learned recently there are some types of expressions in Mathematica which are automatically parsed by the FrontEnd.
For example if we evaluate HoldComplete[Rotate[Style[expr, Red], 0.5]]
we see that the FrontEnd does not display the original expression:
Is it possible to control such behavior of the FrontEnd?
And is it possible to get complete list of expressions those are parsed by the FrontEnd automatically?
EDIT
We can see calls to MakeBoxes
when using Print
:
On[MakeBoxes]; Print[HoldComplete@Rotate["text", Pi/2]]
But copy-pasting the printed output gives changed expression: HoldComplete[Rotate["text", 1.5707963267948966]]
. It shows that Print
does not respect HoldComplete
.
When creating output Cell
there should be calls for MakeBoxes
too. Is there a way to see them?
I have found a post by John Fultz with pretty clear explanation of how graphics functionality works:
This means that the conversion is performed in the Kernel by a call to
MakeBoxes
.This call can be intercepted through high-level code:
Here is what we get as output:
One can see that
MakeBoxes
does not respectHoldAllComplete
attribute.The list of symbols which are auto-converted before sending to the FrontEnd one can get from
FormatValues
:Not quite an answer, but in Preferences > Evaluation there are options to "Only use textual boxes when converting (input|output) to typeset forms."
If you check these, then using Cell > Convert To... > StandardForm etc... will show the Rotate[..] instead of the visually rotated result.
John Fultz has recently answered my question on converting
TableForm
to "typeset" expressions and it is worth to cite it here since it amplifies (while partially contradicts) the general explanation cited in my previous answer:So in this case the final stage of the conversion of the expression is done by the FrontEnd.
There are two aspects to what you witness. First, transcription of the expression you entered into boxes and rendering those boxes by Front-End. By default the output is typeset using StandardForm, which has a typesetting rule to render graphics and geometric transforms. If you use InputForm, there are no such rule. You can control which form is used via Preferences->Evaluation.
You can convince yourself that HoldComplete correctly did its job by using InputForm or FullForm on the input, or using InputForm display on the output cell.
EDIT Using the OutputForm:
In[13]:= OutputForm[%]
Out[13]//OutputForm= HoldComplete[Rotate[expr, 0.5]]
In regard to your question about complete list of symbols, it includes Graphics, geometric operations, and possibly others, but I do not know of the complete list.