0

I am using a document class template that is specific to my university's dissertation formatting requirements (the utexastheses.cls). It was made by a student a few years ago, and the university does not maintain it. Whoever made the template did not have an appendix (or the appendix formatting has changed since it was made a few years ago), because when I try to make an appendix the formatting does not comply with current formatting requirements. The standard approaches to making an appendix do not work, nor do many of the suggestions I've found on dozens of other questions / posts / blogs / etc.

I am using Rmarkdown and compiling the PDF from a .Rnw file via Sweave.

Below is what is produced by the existing template. I have included two versions, one where the \chapter{} is blank, and one where I use \chapter{Appendices}.

When I use

\appendix
\chapter{}
\section{The CATE as a ratio of covariances}

I get the following: toc1 text1

When I use:

\appendix
\chapter{Appendices}
\section{The CATE as a ratio of covariances}

I get the following: toc2 text2

What I need is to have the TOC to look like:

 Appendices                                                     128 
   Appendix A The CATE as a ratio of covariances .............. 128
   Appendix B CATE in Morgan and Winship (2014) ............... 130
   Appendix C Data-Generating Syntax .......................... 132
   Appendix D Estimator Syntax ................................ 136

And I need the text to start with just "Appendix A" centered and justified at the top of the page (and so on for each other other appendices). I cannot have "Appendices" as a header - it needs to jump straight to displaying the individual appendix names.

I've pasted what I believe are the relevant bits from the document class template; the entire template can be found here. If I have not included some important information, please let me know and I will edit my question to include that information.

% table of contents configuration
\RequirePackage[nottoc]{tocbibind}
\RequirePackage{tocloft}
\renewcommand{\contentsname}{Table of Contents} % default: Contents
\renewcommand{\cftdotsep}{0.25} % default: 4.5
% Prefix chapter numbers with "Chapter " and add space as needed
\renewcommand{\cftchappresnum}{\@chapapp\ }
\newlength{\cftchappresnum@width}
\settowidth{\cftchappresnum@width}{\cftchappresnum}
\addtolength{\cftchapnumwidth}{\cftchappresnum@width}

% chapter heading configuration
% simplified version of the original from report.cls
\def\@makechapterhead#1{{%
  \centering\headingsize
  % print "Chapter N"
  \@chapapp\space\thechapter
  \par\nobreak
  \vskip.25\baselineskip
  \@makeschapterhead{#1}
}}
% star-chapter variation
\def\@makeschapterhead#1{{
  \centering\headingsize
  % prevent page break between following lines at all costs
  \interlinepenalty=10000
  \bfseries #1\par\nobreak
  \vskip\baselineskip
}}

% toc/lot/lof heading configuration
\setlength{\cftbeforetoctitleskip}{\z@}
\setlength{\cftaftertoctitleskip}{.25\baselineskip}
\renewcommand{\cfttoctitlefont}{\headingsize\bfseries\hspace*{\fill}}
\renewcommand{\cftaftertoctitle}{\hspace*{\fill}}
% copy toc to lot
\setlength{\cftbeforelottitleskip}{\cftbeforetoctitleskip}
\setlength{\cftafterlottitleskip}{\cftaftertoctitleskip}
\renewcommand{\cftlottitlefont}{\cfttoctitlefont}
\renewcommand{\cftafterlottitle}{\cftaftertoctitle}
% copy toc to lof
\setlength{\cftbeforeloftitleskip}{\cftbeforetoctitleskip}
\setlength{\cftafterloftitleskip}{\cftaftertoctitleskip}
\renewcommand{\cftloftitlefont}{\cfttoctitlefont}
\renewcommand{\cftafterloftitle}{\cftaftertoctitle}

\newcommand{\maketableofcontents}{%
  \clearpage
  \tableofcontents
  \clearpage
  \listoftables
  \clearpage
  \listoffigures
  \clearpage\pagenumbering{arabic}
}

\newcommand{\makeappendix}{%
  \appendix
  % ensure that the TOC picks up the redefined value of \@chapapp
  \addtocontents{toc}{\protect\renewcommand\protect\cftchappresnum{\@chapapp\ }}
}

A brute force solution is fine by me (if one exists). If someone is able to format the template so all future masters/doctoral students can include appendices, I'll gladly pull and branch the template and link to this question in the notes.

6
  • 1
    Welcome to TeX.SE! Are you using the utexasthesis document class? Please provide the code which you used to produce the example.
    – luki
    Mar 20, 2020 at 21:49
  • We can't try what you have done as you have not provided the documentclass you use (plus many othe ommisions such as how you actually try and typeset appendices). I could make at guess at these and try and provide an answer, but if I guess wrong then I will have wasted my time. I am not prepared to do that. --- GOM Mar 21, 2020 at 19:25
  • @luki Thank you all for helping me edit my question. I have now included the code that I use to make the included pictures, and I have linked to the utexasthesis.cls that I am using in the case that it's helpful.
    – CRunyon
    Mar 23, 2020 at 16:45
  • @PeterWilson Thank you as well.
    – CRunyon
    Mar 23, 2020 at 16:47
  • @CRunyon I tried to download the utexasthesis.cls file but all I got was an empty file. Anyway, looking at the instructions it seems that it is not based on the memoir class. I am unable to help you. Sorry. Mar 23, 2020 at 19:20

1 Answer 1

0

I found the solution I needed here: Custom ToC for appendices

It wasn't exactly what I needed, but close enough that I could figure out what I needed to do with only a few small changes.

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.