Mat2TeX

Mat2TeX(M) displays the matrix M by TeX format. For example,
gap> R := GroupAssociationScheme(SymmetricGroup(3));
[ [ 0, 1, 1, 2, 2, 1 ], [ 1, 0, 2, 1, 1, 2 ], [ 1, 2, 0, 1, 1, 2 ], 
  [ 2, 1, 1, 0, 2, 1 ], [ 2, 1, 1, 2, 0, 1 ], [ 1, 2, 2, 1, 1, 0 ] ]
gap> Mat2TeX(R);
0 & 1 & 1 & 2 & 2 & 1 \\
1 & 0 & 2 & 1 & 1 & 2 \\
1 & 2 & 0 & 1 & 1 & 2 \\
2 & 1 & 1 & 0 & 2 & 1 \\
2 & 1 & 1 & 2 & 0 & 1 \\
1 & 2 & 2 & 1 & 1 & 0 \\