This question already has an answer here:

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.

marked as duplicate by Werner, Community Aug 31 '18 at 17:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


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.