Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Susie
Posts: 3 Joined: Thu Sep 30, 2021 11:21 am
Post
by Susie » Thu Sep 30, 2021 11:32 am
Hi all,
I am having a problem with table of contents. The list of figures and list of tables are showing twice in the table of contents please see the attached image. Your help is highly appreciate it
Here's my code:
Code: Select all
\documentclass[12pt,a4paper, oneside, openright]{report}
\pagestyle{plain}
\tableofcontents
\cleardoublepage
\cleardoublepage
\pagestyle{plain}
\listoffigures
\addcontentsline{toc}{section}{\numberline{}List of Figures}
\cleardoublepage
\pagestyle{plain}
\listoftables
\addcontentsline{toc}{section}{\numberline{}List of Tables}
Attachments
TOC.PNG (20.56 KiB) Viewed 4606 times
Last edited by
Stefan Kottwitz on Thu Sep 30, 2021 6:25 pm, edited 1 time in total.
Reason: code marked
NEW: TikZ book now 40% off at Amazon.com for a short time.
Bartman
Posts: 369 Joined: Fri Jan 03, 2020 2:39 pm
Post
by Bartman » Thu Sep 30, 2021 2:36 pm
Without a
minimal working example, one can only make assumptions.
Are you loading the
tocbibind
package in the preamble?
OT: The one-sided printing is the default setting of the
report
class.
Susie
Posts: 3 Joined: Thu Sep 30, 2021 11:21 am
Post
by Susie » Thu Sep 30, 2021 2:59 pm
Hi Bartman,
Thanks for your respond. Here are all the packages I am using and yes I have tocbibind package. Would you be able to help me with this issue please ?
Code: Select all
\documentclass[12pt,a4paper, oneside, openright]{report}
\usepackage{lineno,hyperref}
\usepackage{upgreek}
\usepackage{amsmath}
\usepackage{latexsym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{color}
\usepackage[version=3]{mhchem}
\usepackage[mediumspace,mediumqspace,Grey,squaren]{SIunits}
\modulolinenumbers[5]
\usepackage{blindtext}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\bibliographystyle{elsarticle-num}
\renewcommand{\baselinestretch}{2.0}
\usepackage{titlesec}
\usepackage[greek,english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{pifont}
\usepackage{lipsum}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{capt-of}% or use the larger `caption` package
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{setspace}
\usepackage[version=3]{mhchem}
\usepackage{lscape}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[T1]{fontenc}
\usepackage[varg]{txfonts}
\usepackage{graphicx}
\usepackage[left=34mm, right=26mm, top=1in, bottom=1in]{geometry} %page margins setting
\graphicspath{{images/}}
\usepackage{setspace}
\usepackage[round]{natbib}
\usepackage[titletoc]{appendix}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage[nottoc]{tocbibind}
\usepackage{blindtext}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\bibliographystyle{elsarticle-num}
\renewcommand{\baselinestretch}{2.0}
\usepackage{titlesec}
\usepackage[greek,english]{babel}
\usepackage{times}
\usepackage{titletoc}
\usepackage{lipsum}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\titlecontents{chapter}[0pt]{\vskip 3pt}{\bfseries\chaptername~\thecontentslabel:\quad}{\bfseries}{\bfseries\hfill \contentspage}[]
\usepackage{pdflscape}
\usepackage{everypage}
\newcommand{\Lpagenumber}{\ifdim\textwidth=\linewidth\else\bgroup
\dimendef\margin=0 %use \margin instead of \dimen0
\ifodd\value{page}\margin=\oddsidemargin
\else\margin=\evensidemargin
\fi
\raisebox{\dimexpr -\topmargin-\headheight-\headsep-0.5\linewidth}[0pt][0pt]{%
\rlap{\hspace{\dimexpr \margin+\textheight+\footskip}%
\llap{\rotatebox{90}{\thepage}}}}%
\egroup\fi}
\AddEverypageHook{\Lpagenumber}%
\modulolinenumbers[5]
\usepackage{plain}
\bibliographystyle{achemso}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{mciteplus}
\usepackage{float}
\usepackage{caption}
%\usepackage[overload]{textcase}
\usepackage{epigraph}
%\usepackage[left=3cm,right=2cm,top=3cm,bottom=2cm]{geometry}
\usepackage{fancyhdr}
\fancyhf{}
\cfoot{\thepage}
\pagestyle{fancy}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
\usepackage{lipsum}
\usepackage{nicefrac}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{multirow}
\modulolinenumbers[5]
\usepackage{glossaries}
\makeglossaries
\usepackage{nomencl}
\makenomenclature
\renewcommand{\nomname}{List of Abbreviation}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\nouppercase \rightmark}
\fancyhead[LO,RE]{\nouppercase \leftmark}
\usepackage{lmodern}
\usepackage{quotchap}
\renewcommand{\chapterheadstartvskip}{\vspace*{-1\baselineskip}}
\makeatletter
\let\size@chapter\Large
\makeatother
\usepackage{float}
\usepackage{tocloft}
\addto{\captionsenglish}{\renewcommand*{\contentsname}{Table of Contents}}
\usepackage{ragged2e}
\newenvironment{dedication}
{\clearpage
\thispagestyle{empty}
\vspace*{\stretch{1}}
\raggedleft
\itshape
\justifying
}
{\par
\vspace{\stretch{3}}
\clearpage
}
Last edited by
Stefan Kottwitz on Thu Sep 30, 2021 6:24 pm, edited 1 time in total.
Reason: code marked
Bartman
Posts: 369 Joined: Fri Jan 03, 2020 2:39 pm
Post
by Bartman » Thu Sep 30, 2021 3:18 pm
Please mark your code.
You still have to decide if the entries for the table of figures and tables should be in the table of contents on the chapter and or section level.
OT: There are packages in your preamble whose relationship to hyperref
is unknown to me. In most cases, it is advisable to load the named package last. However, it is definitely not recommended to load the package almost at the beginning of a longer list of other packages.