Custom format/display of sums of vectors
According to Jason Harris's talk at Wolfram Technology Conference 2019, the way to do that is:
MakeBoxes[line[
t_
, p : _List /; VectorQ @ Unevaluated @ p
, u : _List /; VectorQ @ Unevaluated @ u
]
, StandardForm] :=
With[
{argsp = Map[Function[{a}, MakeBoxes[a, StandardForm], HoldAll]
, Unevaluated @ p, {1}]
, argsu = Map[Function[{a}, MakeBoxes[a, StandardForm], HoldAll]
, Unevaluated @ u, {1}]}
, RowBox[{"(", "", GridBox[Transpose @ {argsp}], "", ")", "+",
MakeBoxes[t, StandardForm], "(", "",
GridBox[Transpose @ {argsu}], "", ")"}]
];
line[t, {1, 2, 3}, {-1, 0, 1}]
I'm a beginner on this subject, so there may be subtelties I'm not aware.