How to include a file in LaTeX wihout causing a newpage

fuz picture fuz · Oct 3, 2010 · Viewed 9k times · Source

I hope, this question is not too offtopic.

I have a bigger school project which involves some documentation. The documentation is a LaTeX file, and looks like this:

...
some explanation

\section {someCode}
\include{someCode.hs}
some explanation
...

The files someCode.hs.tex are auto-genereated from their corresponding .hs-Files using Pygments and a Makefile.

The Problem is: Each time, I include something, a pagebreak is inserted before. This is neither expected nor wanted. I googled, but found no answer. Any ideas?

Answer

emrea picture emrea · Oct 3, 2010

Use \input instead of \include.