Wolfram Function Repository (Under Development)
Instantuse addon functions for the Wolfram Language
Generate a matrix from a list such that no row or column contains the same element twice
ResourceFunction["LatinSquare"][n] generates an n x n matrix containing the numbers 1 to n such that no row or column contain the same element twice. 

ResourceFunction["LatinSquare"][list] Generate a Latin square using the elements of list. 
Generate Latin squares containing the numerals 1 through 4:
In[1]:= 

Out[1]= 

Generate Latin squares containing strings:
In[2]:= 

Out[2]= 

Reduced form Latin squares are Latin squares where the first row and first column are sorted in order:
In[3]:= 

Out[3]= 

The basis set for a Latin square cannot contain duplicate elements
In[4]:= 

Out[4]= 
