In order to answer this question, I just stumbled into the world of UpValues
. Though I managed to find a solution for the problem, I'm confused by my own code now 囧, consider the following line of code:
baseForm /: MakeBoxes[baseForm[a_, b_], fmt_] := ToBoxes@BaseForm[a, b]
It makes baseForm
display like BaseForm
, by setting upvalue to… where?
"That goes without saying, it's in baseForm
!" Huh?:
UpValues /@ {baseForm, TagSetDelayed, MakeBoxes, a, b,
Pattern, fmt, SetDelayed, ToBoxes, BaseForm}
(* {{}, {}, {}, {}, {}, {}, {}, {}, {}, {}} *)
The upvalue(?) can be found in the Information
of baseForm
, indeed:
??baseForm
But where is it stored in?