I have experience in latex and python.
I used texlive in linux OS and python 3.
Don't worry about the algorithm, we can solve it.
Do you want to an document latex like article? Please give me the detail of problem, I will solve it for you.
Best regards,