2

I'm writing my thesis using Latex, in my thesis I don't have any table, however list of table title appears. How to exclude it? and suggestions?

  • Do you have \listoftables in the document, if so delete it. If not then a minimal working example (MWE) for your problem may be needed. In particular, which class are you using (can you link to where it can be found online if it's non-standard/not on CTAN). – Dai Bowen Oct 24 '16 at 8:27
  • It's in this link: kfupm.edu.sa/deanships/dgs/Pages/thesis_manual.aspx – Ahmed Oct 24 '16 at 8:29
  • What a nice template. With overfull boxes and undefined references by default! – Henri Menke Oct 24 '16 at 8:40
  • The class file provides an email adress for comments and bugs of the class. Please write them an email and politely inform them that the template needs some serious attention. If a template loads the very same package three times within less than ten lines, you can be sure the template is bad. – Johannes_B Oct 24 '16 at 9:35
1

In the file kfupm_thesis.cls, search for the lines

\addtocontents{toc}{\contentsline {chapter}{\numberline {}LIST OF TABLES}{\pageref{ListofTables}}}
\label{ListofTables}
\listoftables

\eject

and comment them out.

% \addtocontents{toc}{\contentsline {chapter}{\numberline {}LIST OF TABLES}{\pageref{ListofTables}}}
% \label{ListofTables}
% \listoftables

% \eject

Don't forget to run latex twice for the changes to show their effect.

  • Thank you. It runs fine Since you work in it, can you solve an other problem? – Ahmed Oct 24 '16 at 8:55
  • The abbreviation does not appear!! – Ahmed Oct 24 '16 at 8:57
  • @Ahmed Feel free to ask another question on this platform. I'm sure that someone here will help, maybe me, whoever has the time and expertise. But please don't ask follow-up questions in the comments. It is difficult to provide all the information for describing the problem. – gernot says Reinstate Monica Oct 24 '16 at 8:57
  • The abbreviation does not appear!! – Ahmed Oct 24 '16 at 9:05
  • 1
    @Ahmed Please ask a separate question and provide enough information. At the moment I don't know to which abbreviation you refer. In your new question, provide the source code of a complete small document (starting with \documentclass and ending with \end{document}) that illustrates the problem, and describe what's wrong and how you expect it to behave. – gernot says Reinstate Monica Oct 24 '16 at 9:50
1

<rant>
The code in the definition of preamble is hilariously horrible. The instructions are similarly absurd, suggesting \include in the preamble for the macro files.
</rant>

You can avoid modifying the class file by doing

\documentclass[ms, 12pt]{kfupm_thesis}

%% For PhD Thesis enable the next line

%\documentclass[phd, 12pt]{kfupm_thesis}

\usepackage{etoolbox}
\patchcmd{\preamble}{\addtocontents}{\maybeaddtocontents}{}{}
\patchcmd{\preamble}{\addtocontents}{\maybeaddtocontents}{}{}

\long\def\maybeaddtocontents#1\label#2#3#4\eject{%
  \ifx#3\listoftables
    % suppress
  \else
    % list of figures is OK
    \addtocontents#1\label{#2}#3#4\eject
  \fi
}

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

% The following file defines margins and text width

\input{def} %%%% NOT \include

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following file defines the settings for including List of Abbreviations

\input{set_loa} %%% NOT \include

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following file defines the inclusion of packages and some other required commands

\input{setting} %%% NOT \include

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

\begin{document}
0

After \documentclass[...]{kfupm_thesis} add

\newenvironment{preamble}{%
\setstretch{1.5}
%\thispagestyle{plain}
%\pagenumbering{roman}
\eject
\tableofcontents

\eject

\addtocontents{toc}{\contentsline {chapter}{\numberline {}LIST OF TABLES}{\pageref{ListofTables}}}
\label{ListofTables}
\listoftables

\eject

%\addtocontents{toc}{\contentsline {chapter}{\numberline {}LIST OF FIGURES}{\pageref{ListofFigures}}}
\label{ListofFigures}
\listoffigures

\eject

\setstretch{2}

}{%
\eject
\pagestyle{plain}
\pagenumbering{arabic}
\eject
}
  • Thank you for your time, but there is an error and it does not run – Ahmed Oct 24 '16 at 8:44
0

Use:

\documentclass[ms, 12pt]{kfupm_thesis}
\let\listoftables\relax
[...]

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.