GeneralRemove items from Table of Contents

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
kaioh
Posts: 7
Joined: Thu Aug 18, 2011 7:12 pm

Remove items from Table of Contents

Post by kaioh »

Hello.

I'm writting my PhD thesis and I'm facing several problems regarding the table of contents. One problem is that Contents itself appears in the table of contents and List of Figures and List of Tables appears duplicated. Anyone knows how to solve this problem?

The preamble of my tex file is the following:

Code: Select all

\documentclass[phd,12pt,twoside,a4paper]{report}
\usepackage[DF,newLogo]{uaThesis}
\usepackage[sectionbib]{chapterbib}
\usepackage{lettrine}
\usepackage{type1cm}
\usepackage{cite}
\usepackage{hyperref}
\usepackage{color}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[ansinew]{inputenc}
\usepackage{subfigure}
\usepackage{ulem}\normalem
\usepackage{multirow}
\usepackage{enumerate}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage[nottoc]{tocbibind}
\usepackage{booktabs}
\usepackage{revnum}
\usepackage{appendix}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{siunitx}
\usepackage{enumitem}
\usepackage[nottoc]{tocbibind}
\usepackage{microtype}

\usepackage{xcolor}
\hypersetup{
    colorlinks=true,
    linkcolor={blue!50!black},
    citecolor={red!50!black},
    urlcolor={green!50!black}
}

...

% Table of Contents:
\pagenumbering{roman}
\cleardoublepage
\tableofcontents

% List of Figures:
\cleardoublepage
\listoffigures

% List of Tables:
\cleardoublepage
\listoftables
What I have is then:

Contents

Contents ----------------------- i
List of Figures ---------------- v
List of Figures ---------------- v
List of Tables ----------------- ix
List of Tables ----------------- ix

Regards.
Last edited by Stefan Kottwitz on Wed Sep 30, 2015 5:47 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Remove items from Table of Contents

Post by Johannes_B »

Where can we get package uaThesis? I am pretty sure that the package makes the instances appear in the table of contents. As this seems to be a university class, it is very likely that the university wants to have the entries in the toc.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
kaioh
Posts: 7
Joined: Thu Aug 18, 2011 7:12 pm

Re: Remove items from Table of Contents

Post by kaioh »

Hello.

Package uaThesis can be found here: https://dl.dropboxusercontent.com/u/684863/uaThesis.sty

Yes, this package is university class, however, the problem is that list of figures and list of tables appears twice, which is an error, of course. Also, it makes no sense to have 'Contents' as an entry in Contents!

Thank you for your time.

Álvaro
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Remove items from Table of Contents

Post by Johannes_B »

Just as i thought, the package defines starred chapters in a way that includes them in the table of contents. You are loading package tocbibind which is supposed to place lists and others in the toc as well. Option nottoc prevents the toc from going to the toc (because it is pointless); that's why you see the toc just once.

By the way, there are a lot of obsolete and strange stuff going on in your code. Did you copy and paste it from somewhere? I recommend reading LaTeX for complete novices and start from scratch.


Back to topic at hand: There is a reason the package file does what it does. Ask the maintainer about it, maybe even the office of your university that makes the rules. The class also needs a proper license. Right now, it has none, which basically means you are not allowed to use it. Getting in touch with the author seems to be a very good idea for many reasons. And i didn't even mention the strange things going on in the package, ... oh wait, i just did.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply