# #StackBounty: #include #parts Problem using Part in main file while %including chapters

### Bounty: 50

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}

lstloadlanguages{SAS, R}

lstdefinestyle{base}{
language=SAS,
%emptylines=1,
%breaklines=true,
%basicstyle=ttfamilycolor{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}

defR{mathbb{ R}}
defS{mathbb{ S}}
defI{mathbb{ I}}
makeindex

pagestyle{fancy}
fancyhf{}
fancyhead[LE,LO]{Chapter thechapter}
fancyhead[RE,RO]{thesection}
fancyfoot[CE,CO]{thepage}

pagestyle{headings}

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}\
{smallem copyright 2019 }}

date{ }

makeglossaries
loadglsentries{glossary.tex}

begin{document}
maketitle
addcontentsline{toc}{chapter}{Contents}
%pagenumbering{roman}
frontmatter
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
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
%pagestyle{headings}
backmatter
printglossary[type=acronymtype]
printglossary
bibliographystyle{plainnat}
bibliography{c:/writing/references}

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

%include{index}
addcontentsline{toc}{chapter}{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.

Get this bounty!!!

This site uses Akismet to reduce spam. Learn how your comment data is processed.