Please, could you help me resolve the LaTeX runaway argument error below?
Code: Select all
"File ended while scanning use of \contentsline."
"<inserted text>" \par
Esuene.
Code: Select all
"File ended while scanning use of \contentsline."
"<inserted text>" \par
NEW: TikZ book now 40% off at Amazon.com for a short time.
Code: Select all
\listfiles
\documentclass[onecolumn,a4paper,11pt]{report}
%
\usepackage[auto]{chappg} % To number pages per Chapter
%%%%%%%%%% WHAT TO INCLUDE IN OUTPUT FILE - Use the following to selectively exclude chapters
%\includeonly{toc,chapter1_CORR,chapter2_CORRed1,chapter3new_CORR,chapter4new_CORR,chapter5new_CORR}
\usepackage[dvips]{graphicx} %%%%%%%%%% Package for figures
\usepackage[percent]{overpic}%\setlength\unitlength{0.01}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage[font=small,labelfont=bf,labelsep=colon]{caption}[2012/02/19]
%\usepackage{ctable} % For FOOTNOTES directly below TABLES
\usepackage{footnote}
\makesavenoteenv{tabular}
\usepackage{threeparttable} % For FOOTNOTES in FLOATS
\usepackage{multirow}
\frenchspacing
\usepackage{array}
\usepackage[english]{babel} % For wrapping texts in a column with specified width
%%%%%%%%%%% Specify FONT-TYPE, use one with Maths Support:
\usepackage[T1]{fontenc}
\usepackage{mathptmx} % Font-type is Times with its Maths support
\usepackage[sort]{natbib}
\usepackage{xcolor}
\definecolor{fuchsia}{rgb}{1,0,1}
\definecolor{orange}{rgb}{1,0.6445,0}
\definecolor{brown}{rgb}{0.6445,0.1641,0.1641}
\definecolor{gray}{rgb}{0.5,0.5,0.7}
\definecolor{lightgray}{rgb}{0.8242,0.8242,0.8242}
\definecolor{indigo}{rgb}{0.3,0,0.51}
\definecolor{blueviolet}{rgb}{0.5391,0.168,0.8828}
%
\usepackage{varioref}
%
\usepackage{enumerate} % for optional arguments for the enumerate (numbered list) environment so that you can define the style in which LaTeX prints the counter.
\usepackage{rotating} % To rotate wide tables
\setlength{\rotFPtop}{0pt plus 1fil}
\usepackage{flafter} % The ``flafter package'' used to ensure floats are never placed before their references.
\usepackage[justification=centering, singlelinecheck=false]{subfig} % Uses sub-floats within a single float {Latex * center sub-float captions as well. Sub-floats are centred, and their Captions are also centred using ``singlelinecheck=false'' option.
\usepackage[below]{placeins} %\usepackage[section]{placeins}
\usepackage{verbatim} % Must be used to activate "`BLOCK COMMENTING"'
\usepackage{soul}
\usepackage{pdflscape}
\usepackage{dcolumn} % To construct tables with entries aligned on a ”decimal point” etc.
\usepackage{lastpage} % To find the total number of pages for use in "page X of Y"
\usepackage{amssymb}
\usepackage{amsmath}
\numberwithin{equation}{section} % To prepend the section number to all equation numbers.
\usepackage{appendix}
\usepackage{parskip}
% Rules for handling pre-zipped figures. To create zipped figs do these: % $ head myfigure.eps >myfigure.eps.bb; $ gzip myfigure.eps
\DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{`zcat #1}
\DeclareGraphicsRule{.epsi.gz}{eps}{.epsi.bb}{`zcat #1}
\DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{`zcat #1}
\setlength{\textheight}{240mm}
\setlength{\topmargin}{-5.4mm}
\setlength{\textwidth}{150mm}
\setlength{\oddsidemargin}{14.6mm}
\setlength{\evensidemargin}{14.6mm}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{4}
\usepackage[]{titlesec}
\titleformat{\chapter}[display]{\normalfont\LARGE\bfseries}{\chaptertitlename\ \thechapter}{15pt}{\LARGE}\titlespacing*{\chapter}{0pt}{*2}{*1}
\setlength{\textfloatsep}{0.5 cm}
\setlength{\intextsep}{0.5 cm}
%%%%%%%%
\renewcommand{\topfraction}{0.9}
\renewcommand{\textfraction}{0.1}
\renewcommand{\bottomfraction}{0.5}
\renewcommand{\floatpagefraction}{0.8}
\renewcommand\bibname{References} % Specify reference file
%%%%%%%%%%%%%%%%%%%%%%%%%%%% Begin the THESIS document here
\onehalfspacing % Line spacing
%% \\\\\ TO REMOVE EMPTY LINE SPACE BETWEEN ITEMS IN BIBLIOGRAPHY
\let\oldthebibliography=\thebibliography
\let\endoldthebibliography=\endthebibliography
\renewenvironment{thebibliography}[1]{%
\begin{oldthebibliography}{#1}%
\setlength{\parskip}{0ex}%
\setlength{\itemsep}{0ex}%
}%
{%
\end{oldthebibliography}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%% BEGIN DOCUMENT
\begin{document}
%
\include{cover} % This is the front page
%
\include{declare}
%
\include{acknowledge}
%
\include{abstract_CORR}
%
\tableofcontents
%
\listoffigures
%
\listoftables
%%%%%%%%
\setlength{\parskip}{0.5cm}
\setlength{\parindent}{0 cm}
%% Adjusting the amount of space above and below equations
\setlength\abovedisplayskip{0.15 cm}
\setlength\belowdisplayskip{0.15 cm}
%% Adjusting the amount of space above and below captions
\setlength\abovecaptionskip{0.15 cm}
\setlength\belowcaptionskip{0 cm}
%\addtolength\belowcaptionskip{0.5cm}
%% Adjusting the amount of space above and below captions
\setlength{\topskip}{0.5 cm}
\setlength{\footskip}{0.5 cm}
%\include{glossaryCORR}
\newpage
%%%%%%%% Set-up page numbering
\pagenumbering{arabic}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% PAGE LAYOUT %%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{fancy}
\fancyhead[L]{\textsl{\chaptername\ \thechapter}}
\fancyhead[R]{\textsl{}}
\fancyfoot[C]{}
\cfoot{\thepage\ of \pageref{LastPage}}
\renewcommand{\headrulewidth}{0.3pt}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
%%%%%%%% THESIS CHAPTERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%% Include the following chapters in LaTeX compilation
%\include{chapter1}
%
\include{chapter1_CORR}
%%%%%%%% DRAFT CORRECTIONS
%
\include{chapter2_CORRed1}
%
\include{chapter3new_CORR}
%
\include{chapter4new_CORR}
%
\include{chapter5new_CORR}
%%%%%%%% BIBLIOGRAPHY
\bibliographystyle{gji} % makebst Default bibliographystyle is ``plain''.
%\bibliographystyle{seg}
%
\addcontentsline{toc}{chapter}{\numberline { }References}%
\bibliography{myReferences}
\fancyhf{}
%%%%%%%% APPENDICES
\appendix
%\appendixpage
\addappheadtotoc
%\include{appendixCHAP1}
%
\include{appendCHAP2}
%
\include{appendCHAP3}
%
\include{appendCHAP4}
%
\include{appendCHAP5}
%
\include{appendCHAP5tanz}
\end{document}
\include
lines to make it testable, because I don't have the files you are including. Then it compiles without errors. So the problem is not in the posted code.\tableofcontents
is commented out in the preamble file (shown in MWE above), the entire code runs, producing my thesis document. However, the document produced has no table of contents for the chapters and appendices compiled. My document consists of 7 chapters and 8 appendices, and was 263 pages long (prior to the \contentsline
error). Let me add that the current compilation has 0 error, 29 warnings and 59 bad boxes!\tableofcontents
?One way of debugging is remove everything you inserted until you have the version that worked agein. I'm not suggesting to actually delete anything but to moveEmceeDIG wrote:[...] My document [...] was 263 pages long (prior to the\contentsline
error).
\end{document}
to an earlier place in the document. If that works subsequently move \end{document}
to a later place again, step by step. This way you should find the piece of code that causes the error.May be the solution is as simple as this: delete theEmceeDIG wrote:And how can I resolve this error from\tableofcontents
?
toc
file (and maybe also the aux
file) and see if it compiles. If it doesn't see above.NEW: TikZ book now 40% off at Amazon.com for a short time.