Generate the whole tex-file.
Remove not needed files.
Compile PDF in the script.
Add Math-source files.