- Recursively parse commands
- Find used image files, discard rest
- Strip comments but make sure to not delete
%
needed for style (e.g. end of line) - Compile and keep .bbl file
- Pack all needed files as a .tar
- Keep output PDF to double check
- Convert images to JPGs
Example command:
python main2.py /path/to/main.tex --rename my_paper_final
- Try to parse
.log
or.fdb_latexmk
, which seems to know which files were included. - Have a flag for environments / commands to strip