Page LayoutProblems with use of \include and \input

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Bio-ir
Posts: 2
Joined: Tue Jan 10, 2012 11:27 am

Problems with use of \include and \input

Post by Bio-ir »

Hello everybody,

Like everywones first time on the forum i need to post that i am very new to latex. I like the concept and would like to keep on working with it though i have some problems while using the \include and \input commands.

Let me elaborate: i am writing a masters thesis wchich in the end will contain around 100 pages that's why i want to divide my mainmatter according to sections and subsections with the \include and \input command.

My code:

Code: Select all

\include{introduction}
\include{LiteratuurSoil}
\input{LiteratuurTillage}
\input{LiteratuurForces}
My problem:

the command \include will start that file on a new page (like it should according to all help files). Though when i use \input it also start on a new page. anybody got an idea?

Thanks in advance

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Problems with use of \include and \input

Post by Frits »

Do LiteratuurTillage.tex and LiteratuurForces.tex start with new chapters or with a \newpage or \clearpage command? Note that chapters always start on a new page.

Secondly, for large documents I suggest to use \include commands only. I've written something on that, which you can find here.
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
Bio-ir
Posts: 2
Joined: Tue Jan 10, 2012 11:27 am

Re: Problems with use of \include and \input

Post by Bio-ir »

Thanks for the reply!

Though it is not what i am looking for. I need those parts to be one chapter.

I actually need the oppostie: inputting separte .tex files without clearing the page.

A solution would be to write everything in the same file which i will include to my mainmatter later on. Due to length of each file this would get a bit crazy.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Problems with use of \include and \input

Post by Stefan Kottwitz »

\input does not clear the page. If you notice a page break with \input, it's caused by the file content.

Stefan
LaTeX.org admin
Post Reply