Use itertools
Create custom latex decorator