# Include TEXT from another file before generating PDF

I have a tex file which compiles fine and generates PDF without any problem. I need to include text (contents of a text file) from another .txt file at the end of tex file so that generated PDF would have this text in it.

In other words, How can I call another file (text file) to include its contents in a tex file before generating PDF?

• You can use \input{}. Look for more on it. – Sigur Nov 13 '13 at 22:20
• If you want to print file.txt verbatim, then put \usepackage{verbatim} in the preamble and \verbatiminput{file.txt} where you want the contents of file.txt to appear. – Dan Nov 14 '13 at 19:58

It is not obvious if you want to merge your text file or reproduce it as it is. Hence there are both solutions:

\documentclass{article}

\begin{document}

A beginning.