latex part will need change. Probably a python script that generates it or smth.