# How to insert one latex document into another.

This is probably online but I am not sure how to word the search. I have a long latex document, and it is getting messy editing it, is there a way to split the chapters into separate latex documents and insert like a reference to them in the main document such that when the main document is build they will show in the pdf.

Thanks.

-

## migrated from stackoverflow.comMay 7 '12 at 11:35

This question came from our site for professional and enthusiast programmers.

@duffymo thanks \include was what I was looking for. –  mihajlv May 6 '12 at 23:59
Your question was migrated here from another stackexchange site. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  Martin Scharrer May 7 '12 at 13:02
–  Martin Scharrer May 7 '12 at 13:06

use \input{firstfile}
Altin Thanks for the answer \include{firstfile} was what I was looking for. –  mihajlv May 6 '12 at 23:58