Advertisement
simonjtyler

Times <-> CenterDot

Dec 2nd, 2011
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. (* http://stackoverflow.com/questions/8353879 *)
  2.  
  3. Unprotect[CenterDot, Times];
  4. (* ClearAll[CenterDot, Times] *)
  5. CenterDot = Times;
  6. Times /: MakeBoxes[Times[a__], fmt_] :=
  7. With[{slots = Array[Slot, Length[{a}]],
  8. rslots = Riffle[Array[Slot, Length[{a}]], "\[CenterDot]"],
  9. boxes = ToBoxes /@ {a}},
  10. TemplateBox[boxes, "CenterDot",
  11. DisplayFunction -> (RowBox[rslots] &),
  12. InterpretationFunction -> (RowBox[slots] &),
  13. Editable -> True, Selectable -> True]];
  14. Protect[CenterDot, Times];
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement