2

I'm trying to write my LaTex document. Up til now it was compiling fine. Now, after I add in \tableofcontents command, all pages after the Table of Contents are now in capital letters. I'm not sure if there is a command I've put in incorrectly that's messing it up or something. I've tried looking but couldn't find anything as to the problem.

My code is as follows:

\documentclass[BSc, applied]{usydthesis}    % use "amsart" instead of "article" for AMSLaTeX format
\usepackage{geometry}                       % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                          % ... or a4paper or a5paper or ... 
%\geometry{landscape}                       % Activate for for rotated page geometry
\usepackage[parfill]{parskip}           % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{xcolor,graphicx}
\graphicspath{ {images/} }
                % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode

                                % TeX will automatically convert eps --> pdf in pdflatex        
\usepackage{amssymb}
\usepackage[retainorgcmds]{IEEEtrantools}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{latexsym}
\usepackage{mathrsfs}

\usepackage[numbers]{natbib}

\title{Modelling Predatory Trading}
\author{Emma}
%\date{}                            % Activate to display a given date or no date
\renewcommand{\Today}{October 2015}

\numberwithin{equation}{chapter}


%%%%%%%%%%%%%%%

\begin{document}

\maketitle
\tableofcontents

\pagenumbering{roman}
\chapter*{Abstract}
text

\chapter*{Introduction}

text

\chapter{Chapter 1}

\end{document}

The class file is as follows (I ran into problems trying to just change this to an article class file), or the link to the source file is http://www.maths.usyd.edu.au/u/SMS/essay.tex

% LaTeX2e thesis style for Maths at the University of Sydney.
% It sets up a title page, loads up the amsbook class file and
% then redefines a number of things which I don't like in amsbook.

% Andrew Mathas May, 2002

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{usydthesis}
  [2002/05/10 University of Sydney thesis class file - Andrew Mathas]

% options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\SMSsection{Pure Mathematics}
\DeclareOption{pure}{\def\SMSsection{Pure Mathematics}}
\DeclareOption{applied}{\def\SMSsection{Applied Mathematics}}
\DeclareOption{stats}{\def\SMSsection{Statistics}}

\newif\ifHandBook\HandBookfalse
\DeclareOption{handbook}{\HandBooktrue}

\def\MasterClass{amsbook}

% degree types
\def\@thesistype{An essay}
\def\@degree{something cool}
\DeclareOption{BA}{\def\@thesistype{An essay}
                   \def\@degree{B.A.~(Honours)}
}
\DeclareOption{BSc}{\def\@thesistype{An essay}
                    \def\@degree{B.Sc.~(Honours)}
}
\DeclareOption{MA}{\def\@thesistype{A thesis}
                    \def\@degree{Master of Arts}
}
\DeclareOption{MSc}{\def\@thesistype{A thesis}
                    \def\@degree{Master of Science}
}
\DeclareOption{PhD}{\def\@thesistype{A thesis}
                    \def\@degree{Doctor of Philosophy}
}
\newif\ifBook\Bookfalse
\DeclareOption{book}{\Booktrue\def\MasterClass{book}}

\newif\ifSMStimes\SMStimestrue
\DeclareOption{notimes}{\SMStimesfalse}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}\MasterClass}
\ProcessOptions\relax

\LoadClass[12pt]\MasterClass
\usepackage{amsmath,amsthm}

\hfuzz=4pt
\vfuzz=4pt

% packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% for the University crest
\usepackage{graphicx}

% amsmath
\usepackage{amssymb,amsmath}

% times fonts look better
\ifSMStimes
  \usepackage{times}
  \usepackage[T1]{fontenc}
  \usepackage{textcomp}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% we now change a few things in the standard amsbook setup

% sections are numbered within the chapters
\numberwithin{section}{chapter}

% chapters don't need to start on the left hand page
\def\chapter{%
  \clearpage
  \thispagestyle{plain}\global\@topnum\z@
  \@afterindenttrue \secdef\@chapter\@schapter}

% section numbers in appendices shouldn't have a dot in them
\def\appendix{\par
  \c@chapter\z@ \c@section\z@
  \let\chaptername\appendixname
  \def\thechapter{\@Alph\c@chapter}
  \renewcommand\thesection       {\thechapter\arabic{section}}
}

\ifBook\relax
\else
 %%put dotfill in toc entries and make chapter entries bold 
  \def\contentsname{\normalfont\scshape{Contents}}
  \def\@tocline#1#2#3#4#5#6#7{\relax
  \ifnum #1>\c@tocdepth % then omit
  \else
    \par \addpenalty\@secpenalty\addvspace{#2}%
    \begingroup \hyphenpenalty\@M
    \@ifempty{#4}{%
      \@tempdima\csname r@tocindent\number#1\endcsname\relax
    }{%
      \@tempdima#4\relax
    }%
    \parindent\z@ \leftskip#3\relax \advance\leftskip\@tempdima\relax
    \rightskip\@pnumwidth plus4em \parfillskip-\@pnumwidth
    {#5\leavevmode\hskip-\@tempdima #6}\nobreak\relax
    \dotfill\hbox to\@pnumwidth{\@tocpagenum{#5{#7}}}\par
    \nobreak
    \endgroup
  \fi
  }
  \def\l@chapter{\@tocline{0}{8pt plus1pt}{0pt}{}{\bfseries}}
\fi

% chapter at top of chapters should be \sc rather than in capitals
\def\@makechapterhead#1{\global\topskip 7.5pc\relax
  \begingroup
  \fontsize{\@xivpt}{18}\bfseries\centering
    \ifnum\c@secnumdepth>\m@ne
      \leavevmode \hskip-\leftskip
      \rlap{\vbox to\z@{\vss
          \centerline{\normalsize\mdseries
              \@xp{\scshape\chaptername}\enspace\thechapter}
          \vskip 3pc}}\hskip\leftskip\fi
     #1\par \endgroup
  \skip@34\p@ \advance\skip@-\normalbaselineskip
  \vskip\skip@ }

% the standard amsbook headings are not very good %%%%
\def\partrunhead#1#2#3{%
  \@ifnotempty{#2}{\ignorespaces#1 #2\unskip\@ifnotempty{#3}{. }}%
  \textsc{#3}
}

\let\chapterrunhead\partrunhead
\let\sectionrunhead\partrunhead

% give an easy way to change the font used on theorem labels
\let\SMStheoremfont=\bfseries

% the AMSmath theorems are indented by \parindent which looks silly
\def\@thm#1#2#3{%
  \ifhmode\unskip\unskip\par\fi
  \normalfont
  \trivlist
  \let\thmheadnl\relax
  \let\thm@swap\@gobble
  \let\thm@indent\noindent% no indent
  \thm@headfont{\SMStheoremfont}% heading font bold
  \thm@notefont{\fontseries\mddefault\upshape}%
  \thm@headpunct{.}% add period after heading
  \thm@headsep 5\p@ plus\p@ minus\p@\relax
  \thm@space@setup
  #1% style overrides
  \@topsep \thm@preskip               % used by thm head
  \@topsepadd \thm@postskip           % used by \@endparenv
  \def\@tempa{#2}\ifx\@empty\@tempa
    \def\@tempa{\@oparg{\@begintheorem{#3}{}}[]}%
  \else
    \refstepcounter{#2}%
    \def\@tempa{\@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]}%
  \fi
  \@tempa
}

% the AMSmath proofs are indented \parindent which looks silly
\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \itemindent\z@
  \item[\hskip\labelsep\SMStheoremfont #1\@addpunct{.}]\ignorespaces
}{\popQED\endtrivlist\@endpefalse}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% date on title page of thesis
\def\Today{\ifcase\month\or January\or February\or March\or
  April\or May\or June\or July\or August\or September\or
  October\or November\or December\fi\space\number\year}

% thesis title page
\def\@maketitle{
  \cleardoublepage\thispagestyle{empty}%
  \begingroup \topskip\z@skip
    \null\vfil
    \begingroup
    \LARGE\bfseries \centering
    \openup\medskipamount
    \@title\par\vspace{30pt}%
    \centering\mdseries\authors\par\bigskip
    \endgroup
    \vfil\vfil\vfil
    \begin{center}
      \ifHandBook\relax
      \else
        \@thesistype\ submitted in partial fulfillment of\\
        the requirements for the degree of\\
        \@degree
      \fi
    \vfil\vfil
      {\large\SMSsection\\[5pt]
      University of Sydney}\\
      \vskip6mm
      %\includegraphics[width=18mm]{USY_MB1_CMYK_Stacked_Logo}
    \vfil
      \normalsize\Today
    \end{center}
    \vfil
  \endgroup
  \cleardoublepage
}

% insert page break after tableofconents
\def\tableofcontents{%
  \@starttoc{toc}\contentsname\newpage
}

% control spacing in the bibliograph and fix up the toc entry
\def\thebibliography#1{%
  \c@chapter\z@ \c@section\z@\let\chaptername\relax
  \chapter*{References}\list
  {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
  \advance\leftmargin\labelsep
  \itemsep\z@\parsep\z@\topsep\z@\parskip\z@
  \usecounter{enumi}}
  \def\newblock{\hskip .11em plus .33em minus .07em}
  \sloppy\clubpenalty4000\widowpenalty4000
  \sfcode`\.=1000\relax}

% global macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% a good macros for doing sets: e.g. $\set{x|x>0}$.
{\catcode`\|=\active
  \gdef\set#1{\mathinner{\lbrace\,{\mathcode`\|"8000%
                                   \let|\midvert #1}\,\rbrace}}
}
\def\midvert{\egroup\mid\bgroup}

% change the default labels for enumerate
\renewcommand{\labelenumi}{\alph{enumi})}
\renewcommand{\labelenumii}{(\roman{enumii})}

\endinput
  • Welcome! Can you reproduce the issue with a standard class? If so, please change your example to use it. If not, please provide a link to the class file. – cfr Oct 25 '15 at 3:26
  • Thank you for posting a working example! At the same time, much of your code does not seem to be relevant to the question you're asking here. Please limit the example to only the code required for your issue to appear. You can have a look at this guide for how to prune your code for this purpose. – jarauh Oct 25 '15 at 3:27
  • @cfr I have added the class file and link to class file (the only difference between what I have copied to the question and the link is that in my file I removed the university crest file) – EmmaJ Oct 25 '15 at 3:40
  • @EmmaJ No need to post the class file here, that is fine as a link. But I guess most of the packages you include (graphicx, mathrsfs etc.) are not really needed. In this respect, you can produce a smaller example. Try to remove as many packages as possible such that the problem still appears. – jarauh Oct 25 '15 at 3:44
  • 1
    You are going to have problems with this class. Whoever wrote it is... misguided. Don't use the times option. If you want Times, use the current recommendations for fonts and not the obsolete package. The class already loads some of the packages you list. Stuff is going to break if you are not very, very careful. – cfr Oct 25 '15 at 4:09
1

The problem is, apparently, caused by the use of parskip. Somehow this is incompatible with the class's definition of \contentsname. The class ought not define \contentsname as it does, but it ought not do all kinds of things.

Two quick fixes (may break other stuff)

\renewcommand\contentsname{Contents}

or

\tableofcontents\normalfont
  • I did the latter and it fixed it up, thanks so much – EmmaJ Oct 25 '15 at 4:06

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.