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


\lstloadlanguages{SAS, R}


    PROC, QUANTREG, proc, quantreg, data,class,model% add SAS keywords here

\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.



\parindent 1cm
\parskip 0.2cm
\topmargin 0.2cm
\oddsidemargin 1cm
\evensidemargin  0.5cm
\textwidth 15cm %12cm %use 15 in final
\textheight 21cm

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

\fancyhead[LE,LO]{Chapter \thechapter}


\title{The General Linear Model: Assumptions, violations and remedies or What to do when your dependent variable won't behave}
\author{\htmladdnormallink           % Puts a hyperlink on to the author's name
{Peter Flom}{http://www.statisticalanalysisconsulting.com}\\
{\small\em \copyright 2019 }}

 \date{ }


        \input{titlepage}% that contains    \begin{titlepage}...\end{titlepage}  THIS ISN'T WORKING RIGHTT
        %\input{copyright}% that contains copyright, ISBN, etc.
     %   \input{dedication}% saying "this book is created for my parents..."
     %   \input{author}% about the author

% 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.

%\part{Introductory material}
   \include{General_thoughts} %on modeling
%\part{Problems with independent variables
   \include{Outliers} %and influential points
%\part{Problems with dependent variables
%\part{Nonlinear relationships}
    \include{Nonlinear_relationships}  %Break this into several chapters

  \include{Nonnormal_errors} %quantile regression
   %\include{app1} %ANOVA is linear reggression
   %\include{app2} %Matrix notation




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 '19 at 20:53

Compiling your sample (commenting out the references to files I don't have), I get the error:

Runaway argument?
{Problems with independent variables \chapter {Outliers} \chapter {Co\ETC.
! File ended while scanning use of \@xdblarg.
<inserted text> 

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.