%\documentclass[sunil1,ChapterTOCs]{sunil}
\documentclass[sunil1]{sunil}

\oddsidemargin=5.25pc
\evensidemargin=5.5pc
\topmargin=3.5pc

% LOAD PACKAGES
\usepackage[T1]{fontenc}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{latexsym}
\usepackage{pstcol,pstricks,pst-text,pst-grad,pst-node}
\usepackage{wasysym}
\usepackage{marvosym}
\usepackage{amscd}
\usepackage{psfrag}
\usepackage{pxfonts}

\usepackage{makeidx}
\makeindex

%\usepackage{showidx}
\usepackage{multicol}
\frenchspacing
\tolerance=5000

\usepackage{setspace}


% CONTROL CAPTION FONTS
\newcommand{\captionfonts}{\textrm{}}
\makeatletter  % Allow the use of @ in command names
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
 \sbox\@tempboxa{{\captionfonts #1: #2}}%
  \ifdim \wd\@tempboxa >\hsize
    {\captionfonts #1: #2\par}
 \else
    \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
\makeatother   % Cancel the effect of \makeatletter


% LOAD MY MACRO FILE CONSISTING OF SHORTCUTS FOR SYMBOLS AND COMMANDS. FOR EXAMPLE, MY SHORTCUT
%%%%%%FOR $\displaystyle ...$ is $\ds ...$.

\input{My_Macros.tex}

% USE A HEADER CONSISTING OF CHAPTER NUMBER ON LEFT AND SECTION NUMBER ON RIGHT
\usepackage{fancyhdr}
    \renewcommand{\chaptermark}[1]{         % Lower Case Chapter marker style
      \markboth{\chaptername\ \thechapter.\ #1}{}} %
    \renewcommand{\sectionmark}[1]{        % Lower case Section marker style
      \markright{\thesection.\ #1}}         %
    \fancyhead[LE,RO]{\bfseries\thepage}    % Page number (boldface) in left on even
                                            % pages and right on odd pages
    \fancyhead[RE]{\bfseries\leftmark}      % Chapter in the right on even pages
    \fancyhead[LO]{\bfseries\rightmark}     % Section in the left on odd pages



% CREATE THEOREM-LIKE STRUCTURES

\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]
\newtheorem{activity}{Sample Application }[section]

%Exercise indentation
\newlength{\exerciseindent}
\setlength{\exerciseindent}{1 cm}

\newtheorem{waypoint}{Waypoint}[section]

\newenvironment{progress_ck}[1][.9\linewidth]
{ \vspace{.1in} \noindent \begin{center}
\begin{minipage}[c]{#1}
\centering
$\Diamondblack$  \rule{ .9 \linewidth}{.025 in}  $\Diamondblack$
\begin{waypoint}}
{\end{waypoint}
$\Diamondblack$ \rule{ .9 \linewidth}{.025 in} $\Diamondblack$
\end{minipage} \end{center}}

\newcounter{progress_ck_counter}

% START OF MAIN DOCUMENT BODY

\begin{document}
\frontmatter
\pagestyle{empty}
\title{Linear and Nonlinear\\
Programming with Maple:\\
An Interactive, Applications-Based Approach}
\author{Paul E. Fishback}
\date{\today}
\maketitle

\clearemptydoublepage

    \newenvironment{dedication}
      {%\cleardoublepage
      \vspace*{\stretch{1}} \begin{center}  \LARGE}
      {\end{center} \vspace*{\stretch{3}} }
    \begin{dedication}
    \emph{\textbf{For Barb, Andy, and Margaret}}
\end{dedication}

\clearemptydoublepage
\newpage
\clearemptydoublepage

\setcounter{page}{7}

\tableofcontents

\clearemptydoublepage
\addcontentsline{toc}{chapter}{\numberline{}List of Figures}
\listoffigures

\clearemptydoublepage
\addcontentsline{toc}{chapter}{\numberline{}List of Tables}
\listoftables

\clearemptydoublepage
\addcontentsline{toc}{chapter}{\numberline{}Foreword}
\include{Foreword}

\mainmatter

\renewcommand{\sectionmark}[1]{\markright{\thesection. #1}}

\part{Linear Programming}\label{P:Linear_Programming}
\setcounter{chapter}{0}
%\chapter{An Introduction to Linear Programming}\label{C:Intro_Linear_Programming}
 \input{LP_Prototype_Standard_Form}
  \input{LP_Graphical}
 \input{LP_BFS}
 \clearemptydoublepage

% \chapter{The Simplex Algorithm}\label{C:Simplex_Algorithm}
 \input{Simplex}
\input{Special_cases}
\input{Big_M}
\input{Partitioned_Matrix_View_Simplex}
 \input{Revised_Simplex}
 \input{LP_Interior_Method}

 \clearemptydoublepage
%\chapter{Standard Applications of Linear Programming}\label{C:Standard_Applications}
 \input{Maple_Diet_Problem}
 \input{Transportation_Transshipment}
 \input{ShortestPath_MaximumFlow}

 \clearemptydoublepage
% \chapter{Duality and Sensitivity Analysis}\label{C:Duality_Sensitivity}
 \input{Duality}
 \input{Sensitivity}
 \input{Dual_Simplex}

 \clearemptydoublepage
 %\chapter{Integer Linear Programming}\label{C:Integer_Linear_Programming}
 \renewcommand{\sectionmark}[1]{\markright{Integer Linear Programming and the Branch and Bound Method}}
 \input{Intro_IP_Branch_and_Bound_Method}
 
 \renewcommand{\sectionmark}[1]{\markright{\thesection. #1}}
\input{IP_Cutting_Plane_Algorithm}
\clearemptydoublepage

\renewcommand{\sectionmark}[1]{\markright{\thesection. #1}}

\part{Nonlinear Programming}\label{P:Nonlinear_Programming}
%\chapter{Algebraic Methods for Unconstrained Problems}\label{C:UnconstrainedAlgebraicMethods}
\input{Overview_of_NLP}
\input{differentiability_gradient}
\input{sufficient_first_order_convexity}
\input{sufficient_SECOND_order_convexity}

\clearemptydoublepage
%\chapter{Numeric Tools for Unconstrained NLPs}\label{C:Numeric_Methods}
\input{SteepestDescentMethod}
\input{NewtonsMethod}
\input{LevenbergMarquardt}

\clearemptydoublepage
%\chapter{Methods for Constrained Nonlinear Problems}\label{C:Nonlinear_Problems}
\input{Lagrangian-KKTTheorem}
\input{ConvexNLPs}
\input{SaddlePointCriteria}
\input{QuadraticProgramming}
\input{SequentialQuadraticProgramming}

\clearemptydoublepage

\appendix

\renewcommand{\chaptermark}[1]{         % Lower Case Chapter marker style
      \markboth{Appendix A}{}} %
    \renewcommand{\sectionmark}[1]{        % Lower case Section marker style
      \markright{\thesection.\ #1}}         %

\chapter{Projects}
\input{Projects/project_land_levelling}
\input{Projects/project_Welches_logistics_model}
\input{Projects/project_scheduling_prison_guards}
\input{Projects/project_breast_cancer_diagnosis}
 \input{Projects/project_markowitz_portfolio}
\input{Projects/project_predator_prey_bimatrix_game}


\clearemptydoublepage

\renewcommand{\chaptermark}[1]{         % Lower Case Chapter marker style
      \markboth{Appendix B}{}} %
    \renewcommand{\sectionmark}[1]{        % Lower case Section marker style
      \markright{Important Results from Linear Algebra}}         %
\input{Linear_Algebra_Appendix}

\clearemptydoublepage

\renewcommand{\chaptermark}[1]{         % Lower Case Chapter marker style
      \markboth{Appendix C}{}} %
    \renewcommand{\sectionmark}[1]{        % Lower case Section marker style
      \markright{Getting Started with Maple}}         %
\input{Maple_Getting_Started}

\clearemptydoublepage

\renewcommand{\chaptermark}[1]{         % Lower Case Chapter marker style
      \markboth{Appendix D}{Summary of Maple Commands}} %
           % Lower case Section marker style
      %\markright{Summary of Maple Commands}         %
\input{Maple_Appendix}

\clearemptydoublepage
\newpage
\clearemptydoublepage

\backmatter

\clearemptydoublepage
\markboth{Bibliography}{Bibliography}
\input{references}

\clearemptydoublepage
\markboth{Index}{Index}
\printindex
\end{document}
