TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use the command \input{} to insert two textfiles, text1.tex and text2.tex, into my latex working file. I want these two textfiles to produce one single paragraph when I am compiling my working file. However, when I place


in a single line in the working file, the content of the two text files still ends up in two different paragraphs in the compiled text. I have tried to put the command \nolinebreak between the two \input{} commands without success.

So, how can I prevent a new paragraph to be produced between the two textfiles?

share|improve this question
it produces one paragraph for me. Helps to add a trailing % as in \input{text1.tex}%. – Peter Grill Apr 16 '12 at 15:56
up vote 11 down vote accepted

Remove the empty line in text1.tex or text2.tex which produces the new paragraph. –

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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