If you are writing a book or a thesis, which usually has more than one chapter it is a -- in my opinion -- very good strategy to write an central dokument, including document class, praeambel (perhaps an own file), \begin{document}
, the chapters, each in one file (names like preface.tex
, ìntroduction.tex
, conclusion.tex
. Do not use chapter1.tex
or 3.tex
etc. because it could happen you have to change the order of your chapters). Make the central document understandable at once.
Each chapter file includes the hole chapter including chapter heading!
If you use \include{introduction}
you can not forget to start a new chapter on a new (or right) side, because \include
does it for you.
So the central document should be:
\documentclass[options]{documentclass}
\input{praeambel.tex}
\begin{document}
\frontmatter % if book or scrbook
\include{preface} % starts on new page!
\tableofcontents
\mainmatter % if book or scrbook
\include{introduction}
% ...
\end{document}
and the file intrduction.tex
contains:
\chapter{Introduction}%
\label{sec:introduction}
the chapter text ...
and so on.
Just keep things together which belong together and devide (build logical units) were it is possible.
\include
(see tex.stackexchange.com/questions/246/… for the difference from\input
).\chapter
line inside thechapterx.tex
file and use\include
. but i often put a commented-out copy of that\chapter
line in the driver file, to help me remember what i'm doing, and if i have to make any special adjustments to that chapter, like add an\addtocontents
line, i also put that in thechapterx.tex
file and a comment in the driver file. comments are good things.\include
vs\input
thing, but I was wondering if there is a big difference on putting chapter in or out of the included file. The only valid difference I found is with\appendix
, where I'll get different result on defining it outside the inputted file...