There appears to be a problem with a menu command Convert To / StandardForm
(Crtl+Shift+N) with respect to InterpretationBox
which contains TagBox
(which is how Column/Grid
and friends are typeset).
Here's an example:
obj /: MakeBoxes[obj[arg__], fmt_] := With[
{appearance = MakeBoxes[Panel[Column[{arg}], "obj"], fmt]}
, InterpretationBox[appearance, obj[arg]]
]
obj[1, 2, 3, 4]
% // InputForm
obj[1, 2, 3, 4]
So far everything is ok. But select the Input cell containing intial obj
and use the menu command. This is what happens:
I find it unexpected because all round trips like
ToExpression@MakeBoxes@obj[1, 2, 3, 4]
work well.
Question: Is this expected? If yes, what would be a general fix to the typesetting idiom presented above?
Few workarounds are presented in: Make a custom object look like MatrixForm of a matrix?, where this issue came up. But they are not general enough.
The issue was noticed by xzczd and investigated by jkuczm but without any final conclusion.