# Problem using Part in main file while %including chapters

I am using MikTex and WinEdt on a Windows machine.

I am writing a book and right now I have it structured with chapters, sections etc. I want to add parts. Here is my main file

    \documentclass[12pt,reqno]{book}      % Sets 12pt font, equation numbers on right
\usepackage{amsmath,amssymb,amsfonts} % Typical maths resource packages
\usepackage{graphics}                 % Packages to allow inclusion of graphics
\usepackage{color}                    % For creating coloured text and background

\usepackage{listings}
\usepackage[english]{SASnRdisplay}

\lstdefinestyle{base}{
language=SAS,
%emptylines=1,
%breaklines=true,
%basicstyle=\ttfamily\color{black},
moredelim=**[is][\color{red}]{@}{@},
}

\lstset{emph={%
PROC, QUANTREG, proc, quantreg, data,class,model% add SAS keywords here
},emphstyle={\bfseries}%
}%

\usepackage[colorlinks,citecolor=blue,linkcolor=blue]{hyperref}                 % For creating hyperlinks in cross references. It should be after the color package. The option colorlinks produces colored entries without boxes. The option citecolor=blue changes the default green citations to blue.

\usepackage{fancyvrb}%Verbatim
\usepackage[acronym]{glossaries}
\usepackage{natbib}
\usepackage{latexsym}
\usepackage[dvipdf]{graphicx}
\usepackage{mathptmx}
\usepackage{alltt}
\usepackage{float}
\usepackage[toc,page]{appendix}

\usepackage{fancyhdr}
\usepackage[final]{showlabels}
\usepackage{comment}

\DeclareGraphicsExtensions{.png}
\parindent 1cm
\parskip 0.2cm
\topmargin 0.2cm
\oddsidemargin 1cm
\evensidemargin  0.5cm
\textwidth 15cm %12cm %use 15 in final
\textheight 21cm
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{definition}[theorem]{Definition}

\def\R{\mathbb{ R}}
\def\S{\mathbb{ S}}
\def\I{\mathbb{ I}}
\makeindex

\pagestyle{fancy}
\fancyhf{}
\fancyfoot[CE,CO]{\thepage}

\title{The General Linear Model: Assumptions, violations and remedies or What to do when your dependent variable won't behave}
{Peter Flom}{http://www.statisticalanalysisconsulting.com}\\

\date{ }

\makeglossaries

\begin{document}
\maketitle
%\pagenumbering{roman}
\frontmatter
\input{titlepage}% that contains    \begin{titlepage}...\end{titlepage}  THIS ISN'T WORKING RIGHTT
%   \input{dedication}% saying "this book is created for my parents..."
\tableofcontents
\listoffigures
\listoftables
%\listoflistings
\include{Preface}
\mainmatter

% Do not put an {\tt end{document}} command at the end of chapter files;
% just one such command is needed at the end of the book.

% I AM NOT SURE ABOUT THE PART STRUCTURE
%\part{Introductory material}
\include{Intro}
\include{General_thoughts} %on modeling
%\part{Problems with independent variables
\include{Outliers} %and influential points
\include{Collinearity}
%\part{Problems with dependent variables
\include{BetaReg}
\include{Dependent_errors}
%\part{Nonlinear relationships}
\include{Nonlinear_relationships}  %Break this into several chapters

\include{Nonnormal_errors} %quantile regression
\include{Measurement_Error}
\include{Summary}
\begin{appendices}
%\include{app1} %ANOVA is linear reggression
%\include{app2} %Matrix notation
\end{appendices}

%\clearpage
\backmatter
\printglossary[type=\acronymtype]
\printglossary
\bibliographystyle{plainnat}
\bibliography{c:/writing/references}

%\begin{thebibliography}{99}
%\end{thebibliography}

%\include{index}
\end{document}


This works fine. However, when I uncomment the \part commands it comes out exactly the same way. Do I need to \include the parts and then have chapters within parts? That would ruin a lot of the utility of \include.

• Oh. Sheesh. Closing the argument made the whole thing work. The weird thing is that, without that } it still compiled and produced output! Thanks. – Peter Flom Apr 7 at 20:53

Runaway argument?

Searching for "Problems with independent variables" in your sample shows that you have \part{Problems with independent variables but you don't close the argument (hence, "Runaway argument"). Also, the next \part command isn't closed.