Simplify LaTeX source files by removing comments and resolving
\includes,\inputs, etc. More information: https://www.ctan.org/pkg/latexpand.
latexpand {{[-o|--output]}} {{path/to/output.tex}} {{path/to/file.tex}}
latexpand --keep-comments {{[-o|--output]}} {{path/to/output.tex}} {{path/to/file.tex}}
\includes, \inputs etc.:latexpand --keep-includes {{[-o|--output]}} {{path/to/output.tex}} {{path/to/file.tex}}
\usepackages as far as the corresponding STY files can be found:latexpand --expand-usepackage {{[-o|--output]}} {{path/to/output.tex}} {{path/to/file.tex}}
latexpand --expand-bbl {{path/to/bibliography.bbl}} {{[-o|--output]}} {{path/to/output.tex}} {{path/to/file.tex}}