I have several different .tex files that I wish to include in a source file. This works correctly using the \include command.
However what this means is that in the output PDF, each component file starts on a new page and ends with a \clearpage. So there are huge blank gaps between my different bits of text.
How can I combine my component files without any pagebreaks between them? I'd appreciate any suggestions on how to override the pagebreak command, or any ideas on alternatives to using \include.
Thank you!
General ⇒ Pagebreaks and Combining Files
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: Pagebreaks and Combining Files
Hello,
you can use the command input. This command put the code without formatting into the source file.
Marco
you can use the command input. This command put the code without formatting into the source file.
Marco
i am German. I can not use difficult words. 

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Pagebreaks and Combining Files
As an addition to the remarks of Marco you should know that the \include command internally is a sequence of commands.
This explains the page breaks you described.
Best regards
Thorsten¹
Code: Select all
\clearpage \input{filename} \clearpage
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Pagebreaks and Combining Files
Thank you to everyone who replied to my question. Your posts have been a great help and my problem is solved.
I've acknowledged the help I've received from this forum on my blog, http://latexforhumans.wordpress.com/.
I've acknowledged the help I've received from this forum on my blog, http://latexforhumans.wordpress.com/.