I tried to write a very simple code in Magma to print a matrix in a way that can be copypasted directly in Latex.
PrintLatex:= function(M)
for i in [1..NumberOfRows(M)] do
for j in [1..NumberOfColumns(M)-1] do
printf("%o &", M[i,j]);
end for;
printf("%o \\", M[i,NumberOfColumns(M)]);
end for;
return 0;
end function;
M:=ZeroMatrix(Integers(),3,3);
PrintLatex(M);
However, when I run the following code I get an error, saying
PrintLatex(
M: [0 0 0] [0 0 0] [0 0 0]
)
>> printf("%o \\", M[i,NumberOfColumns(M)]);
^
Runtime error in elt< ... >: No permutation group context in which to create
cycle
I have no idea what the online calculator is talking about. Permutation group context?! Can anyone point me in the right direction?