0

This question already has an answer here:

My problem is that the ToC is appearing as a section inside the ToC and I have no idea why since it has never happened in previous documents.

What it looks like:

Preamble:

\documentclass[a4paper,11pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{array}
\usepackage{multirow, array}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{epstopdf}
\usepackage{cancel}
\usepackage{listings}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{tensor}
\usepackage{amscd}
\usepackage{xy}
\usepackage{psfrag}
\usepackage{cite}
\usepackage{xcolor}
\usepackage{enumerate}
\usepackage{calc}
\usepackage{graphics}
\usepackage{epsfig}
\usepackage{miniplot}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{subfigure}
\usepackage{rotfloat}
\usepackage{mathrsfs}
\usepackage{pdfpages}
\usepackage{nicefrac}
\usepackage{float}
\usepackage{booktabs}
\usepackage{lscape} 
\usepackage[hidelinks]{hyperref}
\usepackage{indentfirst}
\usepackage{anysize}
\papersize{29.7cm}{21cm}
\marginsize{4.5cm}{3.0cm}{2cm}{1.5cm}
\usepackage[output-decimal-marker={,}]{siunitx}
\usepackage{titlesec}
\usepackage{subfigure}
\usepackage[dotinlabels]{titletoc}
\titlelabel{\thetitle.\ }
\textwidth=175mm
\usepackage{fancyhdr} %%cabeceras
\usepackage[square,numbers,comma,sort&compress]{natbib}
\usepackage{nomencl}                 
\usepackage{ifthen}
\renewcommand{\nomgroup}[1]{%
    \ifthenelse{\equal{#1}{G}}{\item[\textbf{Greek Symbols}]}{% 
    \ifthenelse{\equal{#1}{L}}{\item[\textbf{Latin Symbols}]}{%
    \ifthenelse{\equal{#1}{A}}{\item[\textbf{Acronyms}]}{}}}}
\makenomenclature
\pagestyle{fancy}
\usepackage{lipsum}
\usepackage{caption}
\usepackage{tocbibind}
\usepackage[toc,page]{appendix}
\captionsetup{labelsep = period}
\renewcommand{\figurename}{Fig.}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
\newcommand{\un}[1]{\;\mathrm{#1}}
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand\listfigurename{LIST OF FIGURES}
\numberwithin{equation}{section}
\begin{document}
\tableofcontents
\newpage
\listoffigures

Thank you

marked as duplicate by LaRiFaRi, egreg table-of-contents Jul 16 '15 at 10:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Use \usepackage[nottoc]{tocbibind} – user31729 Jul 16 '15 at 9:25
  • Thanks, @ChristianHupfer, it worked. I found it strange since I've been written on LaTeX for some years and it had never happened before. – Zynk Jul 16 '15 at 10:23

Browse other questions tagged or ask your own question.