0

I need to add the list of tables and list of figures into the Contents table and change their page numbering into Arabic. My template.cls code is below:

\NeedsTeXFormat{LaTeX2e} \ProvidesClass{template}

\RequirePackage{setspace}

\LoadClass[11pt, a4paper]{report}

\oddsidemargin 14.6truemm \evensidemargin 0truemm \marginparwidth 40pt \marginparsep 10pt \topmargin 0truemm \headsep 10truemm \textheight 224truemm \textwidth 145truemm

\brokenpenalty=10000

\onehalfspacing

\def\degreetitle#1{\gdef@degreetitle{#1}} \def\rpttype#1{\gdef@rpttype{#1}}

\def\principaladviser#1{\gdef@principaladviser{#1}} \def\advis@r{Advisor} % default spelling---we are English! \def\principaladvisor#1{\gdef@principaladviser{#1}\gdef\advis@r{Advisor}} \def\firstreader#1{\gdef@firstreader{#1}} \def\secondreader#1{\gdef@secondreader{#1}} \def\submitdate#1{\gdef@submitdate{#1}} \def\copyrightyear#1{\gdef@copyrightyear{#1}} \def@title{}\def@author{}\def@dept{School of Computing} \def@principaladviser{}\def@firstreader{}\def@secondreader{} \def@submitdate{\ifcase\the\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\the\year}

\newif\ifcopyright \newif\iffigurespage \newif\iftablespage \newif\ifalgorithmspage \newif\ifsigpage \copyrightfalse \figurespagetrue \tablespagetrue \algorithmspagefalse \sigpagefalse

\def\titlep{% \thispagestyle{empty}% \null\vskip1in% \begin{center} \large\sc\expandafter{@title}\ \vskip 0.25in {\Large @author} \vskip 0.45in \includegraphics[height=40mm]{rgulogo} \vfill \vskip 0.25in \end{center} \begin{center} \sc A report submitted as part of the requirements for the degree\ of @degreetitle \at the School of Computing \Robert Gordon University\ Aberdeen, Scotland

    \end{center}
    \vfill
    \vskip 0.5in
    \begin{center}
            \@submitdate
    \end{center}
    \vfill
    \begin{center}
            \normalfont
            Supervisor \@principaladviser\\
    \end{center}\vskip.5in\newpage}

\def\declpage{% \prefacesection{Declaration} \begin{center} \begin{minipage}{4.5in} \parindent=0pt I confirm that the work contained in this @rpttype \space project report has been composed solely by myself and has not been accepted in any previous application for a degree. All sources of information have been specifically acknowledged and all verbatim extracts are distinguished by quotation marks. \par \vskip 2in Signed ............................................ \hspace{0.5 in} Date ......................\ \hspace*{0.4 in} @author \par \end{minipage}% \end{center}% \vfill}

\def\beforeabstract{ \pagenumbering{roman} \pagestyle{plain} \titlep \ifsigpage\signaturepage\fi

\def\afterabstract{ %% \newpage % \declpage

\tableofcontents \newpage \iftablespage \addvspace{10pt} \listoftables \newpage \fi \iffigurespage \addvspace{10pt} \listoffigures \newpage \fi \ifalgorithmspage \addvspace{10pt} \listofalgorithms \newpage \fi}

    }


\def\prefacesection#1{% \chapter*{#1} \addcontentsline{toc}{chapter}{#1}}

\def\afterpreface{\newpage \pagestyle{plain}}

\pagestyle{plain}

\def\thebibliography#1{\chapter*{\bibname@mkboth {\uppercase{\bibname}}{\uppercase{\bibname}}}% \addcontentsline{toc}{chapter}{\bibname}% \list {@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \usecounter{enumiv}% \let\p@enumiv@empty \def\theenumiv{\arabic{enumiv}}}% \def\newblock{\hskip .11em plus.33em minus.07em}% \sloppy\clubpenalty4000\widowpenalty4000 \sfcode`.=@m}

\def\endthebibliography{% \def@noitemerr{@warning{Empty `thebibliography' environment}}% \endlist}

and the .Tex code

\documentclass{template}
\usepackage{graphicx,parskip,appendix,float}
\usepackage[ruled] {algorithm2e}
\usepackage{url,amsmath,amssymb,fancybox,listings,pdfpages,caption,multicol,datetime,rotating, booktabs}
\usepackage{acro}
%\usepackage[usenames,dvipsnames]{color}
\usepackage[pagebackref=false,pdffitwindow=true]{hyperref}
\usepackage{csquotes}
%\usepackage[style=authoryear-ibid,backend=biber]{biblatex}
\usepackage[
    backend=biber,
    style=numeric,
    sortcites=true,
    sorting=none,
    backref,
    natbib,
    hyperref
]{biblatex}
\addbibresource{thesis.bib}

%NOTE: The hyperref usepackage should be the last \usepackage!! %NOTE: When pagebackref=true an error will appear at the end of compiling. press `q' to ignore %NOTE: Referencing Algorithms does not work if this usepackage is before the hyperref include.!! %NOTE: This is a comment, ignored when the document is compiled %NOTE: The following document configuration settings generally do not need to be modified %NOTE: More packages may need to be added to provide additional functionality

\hypersetup{ pdftitle = {Report Title}, pdfauthor = {Author Name}, pdfsubject = {Subject Area}, pdfkeywords = {Comma separated list of keywords}, colorlinks = true, anchorcolor = blue, filecolor = blue, urlcolor = blue, linkcolor = blue, %NOTE: change (blue) to (colIdentifier) to have links within the document in Black citecolor = blue, %NOTE: change (blue) to (colIdentifier) to have citation links within the document in Black }

\definecolor{colBackGrnd}{rgb}{1,1,0.8} \definecolor{colKeys}{rgb}{0,0,1} \definecolor{colIdentifier}{rgb}{0,0,0} \definecolor{colComments}{rgb}{0,.5,0} \definecolor{colString}{rgb}{0,0,1} \definecolor{colWhite}{rgb}{1,1,1}

\newcommand{\MyHookSign}{\hbox{\ensuremath\hookleftarrow}}

\newtheorem{Theorem}{Theorem} \newtheorem{Proposition}[Theorem]{Proposition} \newtheorem{Lemma}[Theorem]{Lemma} \newtheorem{Proof}[Theorem]{Proof} \newtheorem{Remark}[Theorem]{Remark} \newtheorem{Claim}[Theorem]{Claim} \newtheorem{Example}[Theorem]{Example} \newtheorem{Definition}[Theorem]{Definition}

%NOTE: Setup for including program listings \lstset{% float=H, basicstyle=\ttfamily\footnotesize, identifierstyle=\color{colIdentifier}, keywordstyle=\color{colIdentifier}, % stringstyle=\color{colIdentifier}, commentstyle=\color{colIdentifier}, % columns=flexible, tabsize=2, frame=single, extendedchars=true, % showspaces=false, showstringspaces=false, numbers=left, % numberstyle=\footnotesize, breaklines=true, prebreak={\space\MyHookSign}, language=Java, backgroundcolor=\color{colBackGrnd}, breakautoindent=true, % captionpos=b% } %\hypersetup{colorlinks=true, citecolor=\color{colIdentifier}}

\sloppy %NOTE: To ensure the Right Hand Margin is used (Especially for long URLS) %NOTE: END of the document configuration settings

\begin{document}

\DeclareGraphicsExtensions{.jpg,.png,.gif,.pdf} %NOTE: When inserting Figures if the extension of the graphic file is not provided LaTeX will automatically search % for the extensions declared above, in the order declared.

\title{\huge{Report Title}} \author{Author Full Name} \degreetitle{Degree Title} % Replace with appropriate degree \rpttype{MSc} % Replace MSc with BSc for Honours Degree Year projects. \principaladviser{Dr. XXX XXX}

\include{intro/abstract} \listofalgorithms %NOTE: Will generate a list of Algorithms in the Table of Contents Section %\lstlistoflistings %NOTE: Will generate a list of Program Listings in the Table of Contents Section

%NOTE: Include the relative reference for each chapter to be included % dividing the thesis file structure into a number of directories aids development % format: directoryName/filename (the .tex extension is not required for the filename)

\include{intro/introduction} \include{Lit/Literature review} \include{design/design} \include{impl/implementation} \include{conclude/conclude}

\footnotesize %NOTE: reduced the size of the text for the bibliography %NOTE: set the style for the bibliography and display the references used within the document \printbibliography \normalsize \appendix \include{appendix/appendix} \end{document} %NOTE: END of document, nothing after this point

  • 1
    Welcome to TeX.SE! Please show us a short compilable TeX code using this class resulting in your issue. Then we do not have to guess what you are doing ... – Mensch Aug 04 '23 at 21:21
  • @Mensch I have updated the post to include the TeX file code. – Samikzr Aug 04 '23 at 21:26
  • 2
    The currently shown code does neither show a table of contents nor a list of figures nor a list of tables. Please note, that a minimal working example always should show the problem without the need to guess or change anything. Otherwise it is mostly useless and it would be hard or even impossible to help. But maybe … – cabohah Aug 05 '23 at 08:36
  • I'm sorry I'm new to this, but i am using a template on overleaf https://www.overleaf.com/latex/templates/rgu-thesis-template-2023/jjzgwddwzmqm – Samikzr Aug 05 '23 at 17:40

0 Answers0