I will give you an example of how you should proceed. I will post a minimal main .tex file (copy and save it as maintest.tex, for example) and a typical file to be included (copy and save it in the same directory as the above file as chaptone.tex) Process the maintest file and you will see the chapter one title followed by some text.
The main file will contain the preamble. All the other files that will be included don't need preamble nor the commands \begin{document} or \end{document}.
Here is the contents of the maintest.tex file:
Code: Select all
\documentclass[11pt,a4paper,titlepage,twoside,final]{book}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage{float,xcolor}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{makeidx}
\usepackege{blindtext}
\usepackage[final]{hyperref}
\begin{document}
\include{chaptone}
\end{document}
And now the contents of the chaptone.tex file:
Code: Select all
\chapter{The first chapter}
\Blindtext
Some remarks are in order:
1) I changed your preamble a little bit. It's better to use the
babel package with the ngerman option than just the ngerman package.
2) It's better to use the
xcolor package than the color package.
3) Do not use the a4 package. (you can find the reasons in
this document).
4) the blindtext package was loaded only to automatically generate some text. You can delete it safely once the test has been performed.
5) It's a good practice to load the
hyperref package after loading all the other packages.
6) Since you are writing in German, maybe you would prefer to use the
scrbook class of the
KOMA-Script bundle instead of the standard LaTeX book class.
1,1,2,3,5,8,13,21,34,55,89,144,233,...