The box-formmating behavior is affected by the downvalues of the symbol
MakeBoxes. But the formatting behavior is not exactly
MakeBoxes, but seems to be the same to menu command "ConvertTo/StandardForm". There's an example for the difference: 159959.
Another key process of evaluations in Mathematica is sending the content of evaluating input cell to evaluators. This can be strongly changed by setting the option
CellEvaluationFunction (however, for example, this way can't handle multi-line cell, see: 29264).
Similarly, is there any way to change the box-formatting behavior more than changing the definition of
(Not essential for understanding this question. You can skip them if you are not interested.)
Is any way to change the cell-creation behavior which is similar to
If[# =!= Null, CellPrint@Cell[BoxData@MakeBoxes@#, "Output"(* , ... *)]] &?
Why the default form used for output-formatting differs in different environments of the kernel(approximately
ToString[#, InputForm]&for command-line,
BoxData@ToBoxes[#, StandardForm]&for notebook)? Can we choose a form for it programmatically? See: 226209