From: Bruce Colletti on
Re 7.0.1 under WinXP.

Is there simpler code (than that below) for this task:

- For numeric list X = {x1,...,xN}, color and display the form x1 + ... + xN

- To color, first split X into m-element sublists

- Color red (blue) the elements in odd (even) numbered sublists

Thanks.

Bruce


f[X_List, m_Integer] := Module[{Y},
Y = Partition[X, m];
Z = MapThread[(c = If[OddQ@#2, Red, Blue];
Style[#, c, Bold, 18] & /@ #1) &, {Y, Range(a)Length@Y}];
Infix[Flatten@Z, Style["+", 18]]];

f[Table[1,{15}],3]