My university doesn't provide me a template and I've used an external template from another university to write my final thesis. I've adding some useful things to improve the template and now I have a format issue.
I'm trying to exclude the line List of Figures and List of Tables from Table of Contents.
I've checked some previous questions but no one works for me [1] [2] and [3].
From link 1: when I tried to use tocbibind package, I have had a problem with tocbibind.sty (\tocchapter already defined)
From link 2: it uses a different template and I can't change it at this point this.
From Link 3: the use of an asterisk just at the end of \listoffigures and \listoftables does nothing (\listoffigures* , \listoftables* ).
My documentclass is an amsbook and this is the preamble:
\documentclass[openany, 11pt]{amsbook}
\usepackage{atbegshi}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,spanish,es-lcroman]{babel}
\usepackage{bookman}
\decimalpoint
\usepackage{graphicx}
\usepackage{amsfonts,amsgen,amsmath,amssymb}
\usepackage[top=2.5cm, bottom=2.5cm, right=2.5cm, left=3cm]{geometry}
\usepackage{afterpage}
\usepackage{colortbl,longtable}
\usepackage[pdfborder={0 0 0}]{hyperref}
\usepackage{pdfpages}
\usepackage{url}
\usepackage[stable]{footmisc}
\usepackage{parskip} % para separar párrafos con espacio.
\usepackage{hyperref}
\usepackage{verbatim}
\usepackage{pgfplots}
\usepackage{pgf-pie}
\usepackage{rotating}
\usepackage{longtable}
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\renewcommand{\numberline}[1]{#1. }
...
This is the document:
\input{preamble.tex}
\begin{document}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\tableofcontents
\listoffigures
\listoftables
\mainmatter
\input{content-chapter1.tex}
...
\input{content-chapterN.tex}
\appendix
\end{document}
\SkipTocEntry; how it's defined depends on whether or not you're usinghyperref. – barbara beeton Apr 22 '20 at 21:02\SkipTocEntrywith\DeclareRobustCommand{\gobblefour}[4]{}was the key point. – Nicolás Rodríguez Apr 22 '20 at 22:18