0

Below are the set of lines I used to add the figures list, tables list, references to the table of contents (TOC).

\documentclass[12pt, titlepage, openany]{amsbook}

\setcounter{secnumdepth}{1}

\setcounter{tocdepth}{2}

\usepackage{tocvsec2}

\usepackage[bookmarksdepth=subsection]{hyperref}

\usepackage{amsmath, amsfonts, amssymb, amsthm}

\usepackage[all]{xy}

\usepackage{graphicx}

\usepackage[nottoc]{tocbibind}

\usepackage{aliascnt}

\usepackage[colorlinks, linktocpage, allcolors=black,%breaklinks{hyperref}

\usepackage{float}

\usepackage{cite}

\usepackage{xcolor}

\usepackage{amsmath,amssymb,amsfonts}

\usepackage{graphicx}

\usepackage{textcomp}

\usepackage{xcolor}

\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}

\usepackage{booktabs, multirow}

\usepackage{tabularx}

\usepackage{slashbox}

\usepackage{algorithm}

\usepackage[toc,page]{appendix}

\usepackage[noend]{algpseudocode}

\usepackage{siunitx}

\usepackage{subfig}

\usepackage{caption}

\interfootnotelinepenalty=10000

\input{UNTdissertation.sty}

\input{macros}

\newcommand\summaryname{ACKNOWLEDGMENTS}

\newenvironment{ACKNOWLEDGMENTS}

{\begin{center}

\bfseries{\summaryname} \end{center}}

\begin{document}

\frontmatter

\title{}

\author{}

\maketitle

\include{copyright}

\include{acknowledgments}

\listoffigures

\listoftables

\tableofcontents

\mainmatter

\allowdisplaybreaks

\include{chapter1}

\include{chapter2}

\include{chapter3}

\include{chapter4}

\include{chapter5}

\include{chapter6}

\backmatter

\bibliographystyle{unsrt}

\cleardoublepage

\renewcommand\bibname{REFERENCES}

\bibliography{references}

\end{document}

Below are the snippets of the pdf of TOC I get as the output. I wonder why they repeat twice. I'm not sure if it has to do with something else.

enter image description here

enter image description here

4
  • 4
    Welcome to tex.sx. There's not nearly enough information here for us to do anything but guess. We need to know at least the document class, but ideally, the best approach would be for you to provide a small compilable example, beginning with \documentclass and ending with \end{document} that demonstrates the problem. You can start by making a copy of your document, then removing everything that doesn't participate in the problem. What's left should give us a good test file to experiment with. Oct 10, 2021 at 2:44
  • Thank you for adding (at least) the document class. Unlike other document classes, the AMS classes (you are using amsbook) do add the information for starred chapter and section headers to the TOC, as this is wanted by AMS style. Therefore, when using an AMS class, do not add these explicitly. That is done here by the package tocbibind. Remove that and check to make sure it does what you want; there are options in the package to explicitly omit particular items. Oct 11, 2021 at 0:42
  • Off topic: with AMS classes, amsthm is built in and amsmath is automatically loaded. (You have also included these twice.) Also, hyperref should usually be loaded last, not near the beginning as you have done. Oct 11, 2021 at 0:44
  • Yeah, your second comment really helped. Thank you! I'm not familiar with latex. Thanks again! I'm not sure but if you can put this as an answer, I can accept it.
    – ShAd
    Oct 11, 2021 at 1:48

1 Answer 1

1

You're using the document class amsbook. Unlike the "basic" document classes (article, book and proc), the AMS classes do automatically add the information for starred chapter and section headings to the TOC, as this is wanted by AMS style. When using an AMS class, do not add this information explicitly.

You are also loading the package tocbibind. The main purpose of this package is to add information for "lists of", the bibliography, and similar sections -- all of which are defined as starred chapter or section headings -- to the TOC. Thus the double listings. Remove that package, or use the options it provides to explicitly omit the particular headings that are duplicated.

I'm not sufficiently familiar with tocbibind to know whether it is incompatible in other ways with AMS document classes, but suspect that in general, it shouldn't be used with them.

An extra word of advice here. Different document classes define things like page style, what is included in "lists of", and similar features in different ways, to satisfy different (often publishers') requirements, so in order for a helper to provide an accurate answer to most questions of this nature, it is essential to know at least the document class being used.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .