Is there a utility that will take a LaTeX source file, find all the \input{some_external_file} lines, and insert the contents of those external files into the master document without compiling to PDF? I could write my own script to do this but it seems like a common enough need that someone would have solved it already.


Yes! It's called latexpand and does what you are describing.

Not the answer you're looking for? Browse other questions tagged or ask your own question.