1

I am having a slight style issue using the appendix package. While everything comes out fine in the TOC and inside the document, in the PDF the chapters are formatted as "Appendix Math Models". I would prefer to have them as "Appendix B: Math Models." Was wondering if someone could help me resolve the issue, please.

The CLS is here:

% LaTeX format for theses at MIT
% Based on "Specifications for Thesis Preparation" 

% `vi' and `upcase' options by Krishna Sethuraman - [email protected]
% Margins and heading types by Peter Nuth  - [email protected]
% Title and abstract page by Stephen Gildea - [email protected]
% Look in this directory for example file mitthesis.doc
% Also for propcover.tex - Boilerplate for PHD proposal.

% To use this style - say something like:
%  for dull, boring thesis format:
%   \documentclass[12pt]{mitthesis}
%       \pagestyle{plain}
% OR for fast drafts: 
%   \documentclass[11pt,singlespace,draft]{mitthesis}
%   \pagestyle{drafthead}
% OR for Tech Reports:
%   \documentclass[12pt,twoside]{mitthesis} 
%   \pagestyle{headings}
% OR
%  some other combination...
%
%%%% New options:
% 
% Option `twoside':
%   Good for producing Tech Reports.
%   The default is single-sided printing, which is what M.I.T. wants on the
%   thesis document itself.
%
% Option `singlespace':
%   Good for drafts.
%   Double-spaced theses are the default.
%   That is what M.I.T. asks for in the formal specifications.
%
%   Note that MIT does not REQUIRE all theses to be double-spaced anymore.
%   Someone in the library system said that it's OK to be single-spaced.
%   (Regardless of what the specs. say...)
%   To get singlespacing in an area - Use  the 'singlespace' environment. 
%
% Option `draft':
%   Puts `overfull' boxes at the end of lines that are too long. 
%
% Pagestyle `drafthead':
%   Puts the date and the label ``*DRAFT*'' in the footer.
%
%%%%%%%%%%
%
%%%% Parameters to initialize for boilerplate page:
%
%   \title{Mixed Circular Cylindrical Shells}
%   \author{J. Casey Salas}
%   \prevdegrees{B.S., University of California (1978) \\
%            S.M., Massachusetts Institute of Technology (1981)}
%   \department{Department of Electrical Engineering and Computer Science}
%   \degree{Doctor of Philosophy}
%% If the thesis is for two degrees simultaneously, list them both
%% separated by \and like this:
%   \degree{Doctor of Philosophy \and Master of Science}
%   \degreemonth{February}
%   \degreeyear{1987}
%   \thesisdate{December 10, 1986}
%% If the thesis is copyright by the Institute, leave this line out and
%% the standard copyright line will be used instead.
%   \copyrightnotice{J. Casey Salas, 1986}
%% If there is more than one supervisor, use the \supervisor command
%% once for each.
%   \supervisor{John D. Galli}{Director, Sound Instrument Laboratory}
%% This is the department committee chairman, not the thesis committee chairman
%   \chairman{Arthur C. Smith}
%        {Chairman, Departmental Committee on Graduate Students}
%% Make the titlepage based on the above information.  If you need
%% something special and can't use the standard form, you can specify
%% the exact text of the titlepage yourself.  Put it in a titlepage
%% environment and leave blank lines where you want vertical space.
%% The spaces will be adjusted to fill the entire page.  The dotted
%% lines for the signatures are made with the \signature command.
%
%% The abstractpage environment sets up everything on the page except
%% the text itself.  The title and other header material are put at the
%% top of the page, and the supervisors are listed at the bottom.  A
%% new page is begun both before and after.  Of course, an abstract may
%% be more than one page itself.  If you need more control over the
%% format of the page, you can use the abstract environment, which puts
%% the word "Abstract" at the beginning and single spaces its text.
%
%   \begin{abstractpage}
%       Abstract goes here.
%   \end{abstractpage}
%
%%%%%%%% Newer additions 
%
% documentclass options - 
% vi        For MIT course VI or VIII thesis - will copyright the thesis to
%       you while giving MIT permission to copy and distribute it.
% upcase    Will put much of the cover page in uppercase, as per the
%       example on page 17 of the *Specifications for Thesis
%       Preparation*, (revised 1989)
% Also added ``All Rights Reserved'' to default copyright notice.
%
%%%%%%%%%%%
% 
% Documentclass options (vi and upcase) and changes to copyright notice
%   Copyright (c) 1990, by Krishna Sethuraman.
%
% Pagestyle and header generation
%   Copyright (c) 1987, 1988 by Peter Nuth
%
% Original version
%    Copyright (c) 1987 by Stephen Gildea
% Permission to copy all or part of this work is granted, provided
% that the copies are not made or distributed for resale, and that
% the copyright notice and this notice are retained.
% 
% THIS WORK IS PROVIDED ON AN "AS IS" BASIS.  THE AUTHOR PROVIDES NO
% WARRANTY WHATSOEVER, EITHER EXPRESS OR IMPLIED, REGARDING THE WORK,
% INCLUDING WARRANTIES WITH RESPECT TO ITS MERCHANTABILITY OR FITNESS
% FOR ANY PARTICULAR PURPOSE.
%%%%%%%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mitthesis}[1999/10/20]

\def\mystretch{1.5}     % Double spacing hack
\DeclareOption{doublespace}{}   % This is default
                % So we do not read this style twice
\DeclareOption{singlespace}{        % If he explicitly wants single spacing
    \typeout{Single spaced}
    \def\mystretch{1}}  

%% `vi' and `upcase' document style options.  Krishna Sethuraman (1990)
\newcount\vithesis
\DeclareOption{vi}{\typeout{Course VI/VIII thesis style.}\advance\vithesis by1}
\vithesis=0

\DeclareOption{upcase}{\typeout{Uppercase cover page.}
    \gdef\choosecase#1{\uppercase\expandafter{#1}}}
\def\choosecase#1{#1}

%% leftblank option by Kevin Fu
\newif\if@leftblank \@leftblankfalse

\DeclareOption{leftblank}{\typeout{Intentionally Leaving Pages Blank}
\@leftblanktrue}

%  Thesis looks much like report
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions
\LoadClass{report}

% If the user wants single spacing, set baselinestretch=1.

\usepackage{setspace}

% Note - doublespace.sty has some float-related troubles in
% combination with graphics or color, and is not officially compliant
% with 2e.  setspace is a replacement which is 2e-compliant.

% Read the doublespace style that we got from Rochester:
%\input setdoublespace.sty      

\def\baselinestretch{\mystretch}    % Double spacing hack

%%%%%%%  Set up margins and formatting params %%%

% Margins.
%  Note we want 1in top margin assuming no header line, so push header
%   into 1in margin.
%  Draft mode brings the header back down.

\setlength{\oddsidemargin}{0.25in}  % 1.25in left margin 
\setlength{\evensidemargin}{0.25in} % 1.25in left margin (even pages)
\setlength{\topmargin}{0.0in}       % 1in top margin
\setlength{\textwidth}{6.0in}       % 6.0in text - 1.25in rt margin
\setlength{\textheight}{9in}        % Body ht for 1in margins
\addtolength{\topmargin}{-\headheight}  % No header, so compensate
\addtolength{\topmargin}{-\headsep} % for header height and separation

% The next two macros compensate page style for headers and footers
% We only need them in page styles that USE headers and footers.
    % If we have a header, it must be 1in from top of page.
\def\pulldownheader{            % Shift header down 1in from top
    \addtolength{\topmargin}{\headheight}   
    \addtolength{\topmargin}{\headsep}  
    \addtolength{\textheight}{-\headheight}
    \addtolength{\textheight}{-\headsep}
}
    % If we have a footer, put it 1in up from bottom
\def\pullupfooter{              % Shift footer up
    \addtolength{\textheight}{-\footskip}
%    \addtolength{\textheight}{-\footheight}  %footheight doesn't
%                           exist in 2e
}

%%%%%%%  End of margins and formatting params %%%

%%%%%%%  Fix various header and footer problems %%%

% Draft mark on the right side of left pages (outside)
% this mark is also the only one visible on single sided.
\newcommand{\draftrmark}{**DRAFT**} 
% Draft mark on the left side of right pages (outside)
\newcommand{\draftlmark}{**DRAFT**} % 

% Macros to make changing the Draft easier
\newcommand{\drmark}[1]{\renewcommand{\draftrmark}{#1}}
\newcommand{\dlmark}[1]{\renewcommand{\draftlmark}{#1}}
\newcommand{\dmark}[1]{\drmark{#1}\dlmark{#1}}

% Format for draft of thesis.  Define our own PageStyle -
% Just like headings, but has foot lines with the date and warning

\if@twoside         % If two-sided printing.
\def\ps@drafthead{
    \let\@mkboth\markboth
    \def\@oddfoot{\rm \today \hfil \sc \draftrmark}
    \def\@evenfoot{\sc \draftlmark \hfil \rm \today }
    \def\@evenhead{\rm \thepage\hfil \sl \leftmark}
    \def\@oddhead{\hbox{}\sl \rightmark \hfil \rm\thepage}
    \def\chaptermark##1{\markboth {\uppercase{\ifnum \c@secnumdepth >\m@ne
    \@chapapp\ \thechapter. \ \fi ##1}}{}}
    \def\sectionmark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\z@
    \thesection. \ \fi ##1}}}
    \pulldownheader             % Bring header down from edge
    \pullupfooter               % Bring footer up
}
\else               % If one-sided printing.
\def\ps@drafthead{
    \let\@mkboth\markboth
    \def\@oddfoot{\rm \today \hfil \sc \draftrmark}
    \def\@oddhead{\hbox{}\sl \rightmark \hfil \rm\thepage}
    \def\chaptermark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\m@ne
    \@chapapp\ \thechapter. \ \fi ##1}}}
    \pulldownheader             % Bring header down from edge
    \pullupfooter               % Bring footer up
}
\fi

% I redefine these formats that were defined in report.sty
% Definition of 'headings' page style 
%  Note the use of ##1 for parameter of \def\chaptermark inside the
%  \def\ps@headings.
%

\if@twoside                 % If two-sided printing.
\def\ps@headings{\let\@mkboth\markboth
    \def\@oddfoot{}
    \def\@evenfoot{}        % No feet.
    \def\@evenhead{\rm \thepage\hfil \sl \leftmark} % Left heading.
    \def\@oddhead{\hbox{}\sl \rightmark \hfil \rm\thepage}  % Right heading.
    \def\chaptermark##1{\markboth {\uppercase{\ifnum \c@secnumdepth >\m@ne
    \@chapapp\ \thechapter. \ \fi ##1}}{}}  
    \def\sectionmark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\z@
    \thesection. \ \fi ##1}}}
    \pulldownheader             % Bring header down from edge
}
\else                       % If one-sided printing.
\def\ps@headings{\let\@mkboth\markboth
    \def\@oddfoot{}
    \def\@evenfoot{}        %     No feet.
    \def\@oddhead{\hbox {}\sl \rightmark \hfil \rm\thepage} % Heading.
    \def\chaptermark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\m@ne
    \@chapapp\ \thechapter. \ \fi ##1}}}
    \pulldownheader             % Bring header down from edge
}
\fi

% Redefinition of 'myheadings' page style.  
%
\def\ps@myheadings{\let\@mkboth\@gobbletwo
    \def\@oddfoot{}
    \def\@evenfoot{}
    \def\sectionmark##1{}
    \def\subsectionmark##1{}
    \def\@evenhead{\rm \thepage\hfil\sl\leftmark\hbox {}}   %
    \def\@oddhead{\hbox{}\sl\rightmark \hfil \rm\thepage}   %
    \pulldownheader             % Bring header down from edge
}                       

% Redefine '/chapter' to always start on an odd page.
% Should make no difference in singleside mode.
%
\if@leftblank
% Prints "THIS PAGE INTENTIONALLY LEFT BLANK" on blank pages.
\def\chapter{\clearpage\ifodd\c@page\else
   \hbox{}\par\vfill\centerline%
   {THIS PAGE INTENTIONALLY LEFT BLANK}%
   \vfill\newpage\fi
   \thispagestyle{plain}    % Page style of chapter page is 'plain'
   \global\@topnum\z@       % Prevents figures from going at top of page.
   \@afterindentfalse       % Suppresses indent in first paragraph.  Change
   \secdef\@chapter\@schapter}  % to \@afterindenttrue to have indent.
\else
\def\chapter{\cleardoublepage   % Starts new page.
   \thispagestyle{plain}    % Page style of chapter page is 'plain'
   \global\@topnum\z@       % Prevents figures from going at top of page.
   \@afterindentfalse       % Suppresses indent in first paragraph.  Change
   \secdef\@chapter\@schapter}  % to \@afterindenttrue to have indent.
\fi
% If using the report style, use - instead of . in the figure number.
\@ifundefined{thechapter}{}{\def\thefigure{\thechapter-\arabic{figure}}}


%%%%%%%%%  End of Style parameters %%%%

% Here's Gildea's Boilerplate Stuff.
% Copyright (c) 1987 by Stephen Gildea
% Permission to copy all or part of this work is granted, provided
% that the copies are not made or distributed for resale, and that
% the copyright notice and this notice are retained.

%% Define all the pieces that go on the title page and the abstract.

% \title and \author already exist

\def\prevdegrees#1{\gdef\@prevdegrees{#1}}
\def\@prevdegrees{}

\def\department#1{\gdef\@department{#1}}

% If you are getting two degrees, use \and between the names.
\def\degree#1{\setbox0\hbox{#1}  %for side effect of setting \@degreeword
  \gdef\@degree{#1}}

% \and is used inside the \degree argument to separate two degrees
\def\and{\gdef\@degreeword{degrees} \par and \par}
\def\@degreeword{degree}

% The copyright notice stuff is a tremendous mess.
%
% \@copyrightnotice is used by \maketitle to actually put text on the
% page; it defaults to ``Copyright MIT 19xx.  All rights reserved.''
% \copyrightnoticetext takes an argument and defined \@copyrightnotice
% to that argument.  \copyrightnotice takes an argument, and calls
% \copyrightnoticetext with that argument, preceeded by a copyright
% symbol and followed by ``All rights reserved.'' and the standard
% permission notice.
% 
% If you use the 'vi' option, \copyrightnoticetext is used to set the
% copyright to ``(C) Your Name, Current Year in Roman Numerals.''
% followed by the permission notice.

% If there is no \copyrightnotice command, it is asssumed that MIT
% holds the copyright.  This commands adds the copyright symbol to the
% beginning, and puts the standard permission notice below.
%% ``All rights reserved'' added.  Krishna Sethuraman (1990)
\def\copyrightnotice#1{\copyrightnoticetext{\copyright\ #1.  All rights
reserved.\par\permission}}

% Occacionally you will need to exactly specify the text of the 
% copyright notice.  The \copyrightnoticetext command is then useful.
\long\def\copyrightnoticetext#1{\gdef\@copyrightnotice{#1}}
\def\@copyrightnotice{\copyright\ \Mit\ \@degreeyear.  All rights reserved.}

%% `vi' documentclass option: Specifying this option automatically
%% copyrights the thesis to the author and gives MIT permission to copy and
%% distribute the document.  If you want, you can still specify
%% \copyrightnotice{stuff} to copyright to someone else, or
%% \copyrightnoticetext{stuff} to specify the exact text of the copyright
%% notice.
\ifodd\vithesis \copyrightnoticetext{\copyright\ \@author,
\uppercase\expandafter{\romannumeral\@degreeyear}.  All rights reserved.\par\permission}
%% or just
%%\@degreeyear}}
\typeout{Copyright given to author,
    permission to copy/distribute given to WPI.}
\else \typeout{Thesis document copyright WPI unless otherwise (manually) specified}
\fi

\def\thesisdate#1{\gdef\@thesisdate{#1}}

% typically just a month and year
\def\degreemonth#1{\gdef\@degreemonth{#1}}
\def\degreeyear#1{\gdef\@degreeyear{#1}}

% Usage: \supervisor{name}{title}
%        \chairman{name}{title}

% since there can be more than one supervisor,
% we build the appropriate boxes for the titlepage and
% the abstractpage as the user makes multiple calls
% to \supervisor
\newbox\@titlesupervisor    \newbox\@abstractsupervisor

\def\supervisor#1#2{\setbox\@titlesupervisor\vbox
  {\unvbox\@titlesupervisor \vskip 10pt% plus 1fil minus 1fil
  \def\baselinestretch{1}\large
\signature{Accepted by}{#1 \\ #2, Thesis Supervisor}}  
%\signature{Certified by}{#1 \\ #2 \\ Thesis Supervisor}}
  %\signature{Certified by}{#1 \\ #2}}
  \setbox\@abstractsupervisor\vbox{\unvbox\@abstractsupervisor
  \vskip\baselineskip \def\baselinestretch{1}\@normalsize 
  \par\noindent Thesis Supervisor: #1 \\ Title: #2}}

% department chairman, not thesis committee chairman
\def\chairman#1#2{\gdef\@chairmanname{#1}\gdef\@chairmantitle{#2}}

% Thesis Member
\def\memberA#1#2{\gdef\@memberAname{#1}\gdef\@memberAtitle{#2}}
\def\memberB#1#2{\gdef\@memberBname{#1}\gdef\@memberBtitle{#2}}
\def\memberC#1#2{\gdef\@memberCname{#1}\gdef\@memberCtitle{#2}}
\def\memberTA#1#2{\gdef\@memberTAname{#1}\gdef\@memberTAtitle{#2}}

%% `upcase' documentclass option: \choosecase is defined either as a dummy or
%% a macro to change the (expanded) argument to uppercase.
\def\maketitle{\begin{titlepage}
\large
{\def\baselinestretch{1.2}\Large\bf \choosecase{\@title} \par}
%by\par
%{\Large  \choosecase{\@author}}
%\par
%\@prevdegrees
%\par
\bigskip
\choosecase{A thesis} \\
\choosecase{submitted to the faculty of the}
\par
\MIT
\par
\choosecase{as a partial fulfillment of the requirements for the} \\
%\par
\choosecase{Degree of Master of Science} \\
%\par
\choosecase{in} \\
%\par
\choosecase{Mechanical Engineering}
\par
\bigskip 
%\@degreemonth\ \@degreeyear
%\par
%\@copyrightnotice
%\par
%\vskip 3\baselineskip
By: \\
\medskip
\rule{3.5in}{.5pt} \\
\choosecase{\@author}\\
%\par
{\@thesisdate} \\
%\signature{Author}{\@department \\ \@thesisdate}
\bigskip \bigskip
Approved by: \\
\medskip
\vfill
\rule{3.975in}{.5pt} \\
{\@memberTAname, \@memberTAtitle}
\par
\vfill
\rule{3.35in}{.5pt} \\
{\@memberAname, \@memberAtitle}
\par
\vfill 
\rule{3.4in}{.5pt} \\
{\@memberBname, \@memberBtitle}
\par
\vfill
\rule{6in}{.5pt} \\
{\@memberCname, \@memberCtitle}
\par
\vfill
\rule{4.5in}{.5pt} \\
{\@chairmanname, \@chairmantitle}
\par
\vfill
\end{titlepage}}

% this environment should probably be called abstract,
% but we want people to also be able to get at the more
% basic abstract environment
\def\abstractpage{\cleardoublepage
\begin{center}{\large{\bf \@title} \\
by \\
\@author \\[\baselineskip]}
\par
\def\baselinestretch{1}\@normalsize
Submitted to the \@department \\
on {\@thesisdate} in partial fulfillment of the \\
requirements for the \@degreeword\ of \\
\@degree
\end{center}
\par
\begin{abstract}}

%% Changed from \unvbox to \unvcopy for use with multiple copies of abstract
%% page.
%% Krishna Sethuraman (1990)
\def\endabstractpage{\end{abstract}\noindent
 \unvcopy\@abstractsupervisor \newpage}

%% This counter is used to save the page number for the second copy of
%% the abstract.
\newcounter{savepage}

% You can use the titlepage environment to do it all yourself if you
% don't want to use \maketitle.  If the titlepage environment, the
% paragraph skip is infinitely stretchable, so if you leave a blank line
% between lines that you want space between, the space will stretch so
% that the title page fills up the entire page.
\def\titlepage{\cleardoublepage\centering
  \thispagestyle{empty}
  \parindent 0pt \parskip 10pt plus 1fil minus 1fil
  \def\baselinestretch{1}\@normalsize\vbox to \vsize\bgroup\vbox to 9in\bgroup}
% The \kern0pt pushes any depth into the height.  Thanks to Richard Stone.
\def\endtitlepage{\par\kern 0pt\egroup\vss\egroup\newpage}

\def\MIT{WORCESTER POLYTECHNIC INSTITUTE}
\def\Mit{Worcester Polytechnic Institute}

\def\permission{\par\noindent{\centering
   The author hereby grants to WPI permission to reproduce and to
   distribute publicly paper and electronic copies of this thesis
   document in whole or in part in any medium now known or hereafter
   created.}\par}

\def\signature#1#2{\par\noindent#1\dotfill\null\\*
  {\raggedleft #2\par}}

\def\abstract{\subsection*{Abstract}\small\def\baselinestretch{1}\@normalsize}
\def\endabstract{\par}

Preamble:

% -*- Mode:TeX -*-

%% IMPORTANT: The official thesis specifications are available at:
%%            http://libraries.mit.edu/archives/thesis-specs/
%%
%%            Please verify your thesis' formatting and copyright
%%            assignment before submission.  If you notice any
%%            discrepancies between these templates and the 
%%            MIT Libraries' specs, please let us know
%%            by e-mailing [email protected]

%% The documentclass options along with the pagestyle can be used to generate
%% a technical report, a draft copy, or a regular thesis.  You may need to
%% re-specify the pagestyle after you \include  cover.tex.  For more
%% information, see the first few lines of mitthesis.cls. 
% \documentclass[12pt,twoside]{mitthesis}
%%
%%  If you want your thesis copyright to you instead of MIT, use the
%%  ``vi'' option, as above.
%%
\documentclass[12pt,twoside]{mitthesis}
%%
%% If you want blank pages before new chapters to be labelled ``This
%% Page Intentionally Left Blank'', use the ``leftblank'' option, as
%% above. 

%\usepackage{lgrind}

%% These have been added at the request of the MIT Libraries, because
%% some PDF conversions mess up the ligatures.  -LB, 1/22/2014
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{newtxmath}
\usepackage{newtxtext}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{notoccite}
\usepackage{cite}
\usepackage{xcolor}
\usepackage{amssymb,amsmath,mathtools}
\usepackage{textgreek}
\usepackage[numbered,framed]{matlab-prettifier}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{footnote}
\usepackage[justification=centering]{caption}
\usepackage{subcaption}
\usepackage[notindex,notbib]{tocbibind} % http://tex.stackexchange.com/questions/59619/index-not-linked-properly-in-the-navigation, broken for index so I overrode it in the root file
\usepackage{array,multirow,bigstrut}
\usepackage{enumitem}

%% Make the index
\usepackage{makeidx}
\makeindex

%% Fix spacing between numbers in circles
\newcommand{\rowgroup}[1]{\hspace{-1em}#1}
\usepackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
    \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}

%% Create a blankpage
\usepackage{afterpage}
\newcommand\blankpage{%
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \newpage}

%% Absolute  Value
\DeclarePairedDelimiter\abs{\lvert}{\rvert}%
\DeclarePairedDelimiter\norm{\lVert}{\rVert}%
\makeatletter
\let\oldabs\abs
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
%
\let\oldnorm\norm
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
\makeatother

%% Custom Column
\newcolumntype{R}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{L}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{H}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcolumntype{Q}[1]{>{\raggedright\arraybackslash}p{#1}}

%% hyperref, cleveref, url, etc.
\usepackage[hyphens]{url}
\usepackage{breakurl} 
\usepackage{hyperref}
\hypersetup{%
colorlinks=true,% hyperlinks will be coloured
citecolor=blue, % hyperlink text will be blue  
linkcolor=blue,% hyperlink text will be blue
linkbordercolor=blue,% hyperlink border will be blue
filecolor=blue,
urlcolor=blue,
breaklinks = true,
}
\urlstyle{same} 
\usepackage[nameinlink]{cleveref}

%% Appendix
\usepackage[titletoc,title,header]{appendix}

%% listings
\usepackage{listings}
\lstset{
frame=tblr, % draw a frame at the top, bottom, left, and right of the code block
showstringspaces=false, % don't mark spaces in strings
numbers=left, % display line numbers on the left
commentstyle=\color{green}, % comment color
keywordstyle=\color{blue}, % keyword color
stringstyle=\color{red}, % string color
breaklines=true,
}
\renewcommand\lstlistlistingname{List of Scripts}
\renewcommand\lstlistingname{Script}

%% Custom Units
\usepackage{siunitx}
% Units (http://tex.stackexchange.com/questions/21936/differences-between-siunits-and-siunitx-packages) http://tex.stackexchange.com/questions/2320/siunitx-scientific-notation
\DeclareSIUnit[number-unit-product = {}]{\inchQ}{\textquotedbl}
\DeclareSIUnit[number-unit-product = {\thinspace}]{\in}{in}
\DeclareSIUnit\lp{lp}
\DeclareSIUnit\pixels{pixels} % Used once for a single pixel
\DeclareSIUnit\pixel{pixel}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This bit allows you to either specify only the files which you wish to
%% process, or `all' to process all files which you \include.
%% Krishna Sethuraman (1990).

%\typein [\files]{Enter file names to process, (chap1,chap2 ...), or `all' to
%process all files:}
%\def\all{all}
%\ifx\files\all \typeout{Including all files.} \else \typeout{Including only \files.} \includeonly{\files} \fi

\pagestyle{plain}

\begin{document}
\crefname{lstlisting}{script}{scripts}
\Crefname{lstlisting}{Script}{Scripts}
\crefname{listing}{script}{scripts}
\Crefname{listing}{Script}{Scripts}
% Chapters
\include{cover}
\pagestyle{plain}
\include{contents}
%\include{Purpose}
%\include{Introduction}
\include{OpticalPrinciplesandPhotonics}
%\include{OpticalBench}
%\include{Results}
%\include{Conclusion}
\begin{appendices}
\include{Appendix_RAD}
%\include{Appendix_Fibers}
%\include{Appendix_Math}
%\include{Appendix_Code}
%\include{Appendix_Misc}
\end{appendices}
%\include{biblio}
%\include{index}
\end{document}

Here is the appendix for Appendix_RAD:

\chapter{Readily-available Detectors}\label{app:RAD}

\begin{figure}[h!]
\centering
\includegraphics[width=\linewidth,keepaspectratio]{Appendix/lensdata}
\captionof{figure}[Minimum working distance and magnification as function of extender ring length.]{Minimum working distance and magnification as function of extender ring length. Reproduced from \cite{FLIROptics}.}
\label{fig:efl50mm}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=\linewidth,keepaspectratio]{Appendix/50mmAsio}
\captionof{figure}[Testing data for SC6101 imaging lens.]{Testing data for SC6101 imaging lens. Reproduced from \cite{FLIROptics2}.}
\label{fig:50mmAsio}
\end{figure}

\begin{figure} %trim={<left> <lower> <right> <upper>}
\centering
\includegraphics[width=\linewidth,keepaspectratio]{Appendix/FLIRSC6000datasheet_1.png}
\captionof{figure}[Datasheet for SC6000 camera series: 1 of 2.]{Datasheet for SC6000 camera series: 1 of 2. Reproduced from \cite{FLIRSC6000DS}.}
\label{fig:FLIRSC6000datasheet1}
\end{figure}

\begin{figure} %trim={<left> <lower> <right> <upper>}
\centering
\includegraphics[width=\linewidth,keepaspectratio]{Appendix/FLIRSC6000datasheet_2.png}
\captionof{figure}[Datasheet for SC6000 camera series: 2 of 2.]{Datasheet for SC6000 camera series: 2 of 2. Reproduced from \cite{FLIRSC6000DS}.}
\label{fig:FLIRSC6000datasheet2}
\end{figure}

\begin{figure}
\centering
\includegraphics[height=.95\textheight,keepaspectratio]{Appendix/IRA}
\captionof{figure}[MCT-13-0.5 detector spectral response.]{MCT-13-0.5 detector spectral response. Provided by \cite{IRA}.}
\label{fig:HGCDTEdetSpe}
\end{figure}

\clearpage
\newpage
13
  • 2
    Perhaps the problem lies with this uncommon .cls file you have. (Can you share it?) Under the book and report classes, no such problem would exist (assuming your \include-d files aren't also including any funky definitions of your own devising).
    – jon
    Feb 15, 2017 at 3:02
  • 1
    Did you mean something like this?: \chapter*{Appendix B: Math Models} \phantomsection \addcontentsline{toc}{chapter}{Appendix B: Math Models}
    – Bobyandbob
    Feb 15, 2017 at 8:38
  • @jon: I have added the .cls file above! The \includes don't redefine anything. Bobyandbob I will give that a try if I cannot get the Appendix to be sorted automatically! Feb 15, 2017 at 21:43
  • I removed \usepackage{lgrind} and I do not get lettered appendices. I am trying with only one appendix that only includes images to see if that will work. I am also trying it without \clearpage and \newpage at the bottom of the appendices! Feb 16, 2017 at 23:14
  • @jon: Still no luck! I have updated my original post to make it as exact as possible. Feb 17, 2017 at 0:20

1 Answer 1

1

In the interests of getting to the root of the problem and solution, try this minimal working example. Does it produce the output you want to see?

% As the problem relates to section headings in the appendices (and,
% specifically, in the PDF bookmarks), we leave in the packages that
% seem to relate to the typesetting of:
% - sectional headings;
% - appendices;
% - hyperref;
% - cleverref;
%
% ... in all likelihood, tocbibind and cleveref could be omitted as well

\documentclass[12pt,twoside]{mitthesis}

\usepackage{etoolbox}% provides: \AtBeginEnvironment
%% Appendix
\usepackage[titletoc,title,header]{appendix}
\usepackage[notindex,notbib]{tocbibind} %
\usepackage{hyperref}
\usepackage{bookmark}% companion to hyperref; better control over PDF bookmarks
\usepackage[nameinlink]{cleveref}

\AtBeginEnvironment{appendices}{
  \bookmarksetup{numbered}}

\begin{document}

\tableofcontents

\chapter{Cover}
This is some text.

\begin{appendices}

  \makeatletter
  \renewcommand\thechapter{\@Alph\c@chapter:}
  \renewcommand\thesection{\@Alph\c@chapter.\@arabic\c@section}
  \makeatother
  % \bookmarksetup{numbered}% <-- or put here instead of in \AtBeginEnvironment

  \chapter{Appendix--RAD}
  \section{A RAD Section}
  This section has words

  \chapter{Appendix--RAD2}

\end{appendices}

\chapter{Another Chapter}

It is here to show that the effects of the \verb+\renewcommands+ are
limited to the \texttt{appendices} environment.

\end{document}
2
  • That totally did it! Thank you @Jon for your help! Feb 20, 2017 at 16:58
  • Actually, just noticed in \Cref{app:rad} it displays "Chapter E:" instead of "Appendix E". Any idea? Feb 20, 2017 at 17:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .