From 7d7ae3b6fa3d96b29649746aaaf7e4e79ac52b10 Mon Sep 17 00:00:00 2001
From: Longman E <el7g15@soton.ac.uk>
Date: Wed, 9 Jan 2019 17:07:32 +0000
Subject: [PATCH] Improve the items in the table of contents

---
 ecsdocs.dtx | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/ecsdocs.dtx b/ecsdocs.dtx
index 41e89a1..adc0c7c 100644
--- a/ecsdocs.dtx
+++ b/ecsdocs.dtx
@@ -1069,7 +1069,7 @@
 %
 %    \begin{macrocode}
 \renewcommand\listoffigures{
-\btypeout{List of Figures}
+\addtotoc{\listfigurename}
 \begin{spacing}{1}{
     \setlength{\parskip}{1pt}
     \if@twocolumn
@@ -1103,7 +1103,7 @@
 %
 %    \begin{macrocode}
 \renewcommand\listoftables{
-\btypeout{List of Tables}
+\addtotoc{\listtablename}
 \begin{spacing}{1}{
     \setlength{\parskip}{1pt}
     \if@twocolumn
@@ -1206,8 +1206,7 @@ attributed;
 \item where I have quoted from the work of others, the source is always given. With
 the exception of such quotations, this thesis is entirely my own work;
 \item I have acknowledged all main sources of help;
-\item where and part of this
-thesis
+\item where the thesis
  is based on work done by myself jointly with others, I have
 made clear exactly what was done by others and what I have contributed myself;
 \ifthenelse{\isempty{#1}}
@@ -1428,7 +1427,7 @@ PhD Thesis, pagination. }
 %% ----------------------------------------------------------------
 \begin{document}
 %<*testthesis>
-%% TODO: Check that the page numbering isn't destroyed
+%% TODO: Add ORCiD and DOI options
 \pagenumbering{gobble} % removes page number
 \copyrightDeclaration{} % !!! Comment this line when printing the hardcopy !!!
 %</testthesis>
@@ -1461,6 +1460,8 @@ This work is all about \dots
 \tableofcontents
 \listoffigures
 \listoftables
+%% The List of listings does not, by default, appear in the ToC, so....
+\addtotoc{List of Listings}
 \lstlistoflistings
 \listofsymbols{ll}{$w$ & The weight vector}
 %</testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp>
@@ -1483,6 +1484,13 @@ This work is all about \dots
 %<*testthesis|testminithesis|testprogress|testproject|testreport|testgdp>
 \include{Introduction}
 \include{Conclusions}
+\begin{lstlisting}[caption=Without a title it doesn't appear in the table]
+This is a test listing
+
+It has several lines
+That
+say not much at all
+\end{lstlisting}
 \appendix
 \include{AppendixA}
 \backmatter
-- 
GitLab