GeneralMany different errors, but compilation is ok

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
salvu
Posts: 3
Joined: Wed Aug 17, 2011 9:02 am

Many different errors, but compilation is ok

Post by salvu »

Hi to all,
This is my first post here and I apologise if I chose the wrong section.

I am using TexMaker 2.1 to write my dissertation. I have divided this into different files with a main file calling the others in order. I am compiling by doing Latex, Bibtex, Latex, Latex and finally PDFLatex. The document is produced in pdf with all parts being as they should but all TexMaker is reporting "Processes exited with error(s)" except for the BibTex process (this exits normally) and when I look at the errors there are quite a few plus many warnings and badbox etc.
I get different errors for for each document when I open the errors list after compiling. One recurrent error is "! Undefined control sequence. \chapter" and "! LaTeX Error: Missing \begin{document}."
What I would like to ask is: Do I have to insert all the \usepackage like what I have on the Main file in all the other files as well? I also get other errors such as those regarding NatBib, \cite errors and many others. I also have many No boundaries errors but I think these are because I use png's for pictures instead of eps. The following is the content of my main file.

Code: Select all

\documentclass[11pt,a4paper]{report}
\usepackage{times}
\usepackage{url}
\usepackage{graphicx}
\usepackage{Tabbing}
\usepackage{fancyhdr}
\usepackage{extramarks}
\usepackage{chngpage}
\usepackage[square]{natbib}
\usepackage[final]{pdfpages}
\usepackage{url}
\usepackage[below]{placeins}
\usepackage{setspace}
\onehalfspacing
\frenchspacing

\begin{document}
\newpage
\tableofcontents
\newpage
\listoffigures
\newpage
\listoftables
\newpage

\input{introduction}
\newpage
\input{chapter1}
\newpage
\input{chapter2}
\newpage
\input{chapter3}
\newpage
\input{chapter4}
\newpage
\input{chapter5}
\newpage
\input{chapter6}
\newpage
\bibliographystyle{plain}
\bibliography{mybibfile}
\end{document}
In the code each chapter file is a different file in the folder.

Thanks for any information or help.

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

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Many different errors, but compilation is ok

Post by Stefan Kottwitz »

Hi,

compile the main document, not the single chapter documents which are included.
Perhaps post your .log file here as attachment, we could check that.

Stefan
LaTeX.org admin
salvu
Posts: 3
Joined: Wed Aug 17, 2011 9:02 am

Re: Many different errors, but compilation is ok

Post by salvu »

Thanks.
I only compile from the main file usually alhtough sometimes by mistake I do compile the single chapters and wonder what has happened until I see that the main file tab is not the one selected. I will upload the log file. It will show that the chapters are named differently from what I specified in the previous post. I edited the post to shorten the text. The log file is attached. Thanks for your help.
Attachments
Main_Thesis.log
(23.21 KiB) Downloaded 281 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Many different errors, but compilation is ok

Post by Stefan Kottwitz »

Hi,
  • your bibliography is not compatible with natbib author-year citations,
  • check specanddesign.tex Chapter 3 line 28 or directly before
  • check line 131 in chapter 5 (or later file), there's a table where the column definition doesn't match the following columns, I guess responsible is a & which you should write as \&, see Special LaTeX characters.
Stefan
LaTeX.org admin
Post Reply