0

I need help to get

  1. the ToC heading in the center of the page. The code

    \renewcommand{\contentsname}{\centering Table of Contents}

    did not work for me.

  2. I need the dots after the chapter names to be bold face.

  3. The Glossary and List of symbols also appear in the toc. I need to remove these from the ToC as well.

My code is as follows;

\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\hyphenation{signifi-cant im-proved tele-communication}

\usepackage[hidelinks]{hyperref}
\hypersetup{colorlinks=true,allcolors=black}

\usepackage{fancyhdr}
\fancypagestyle{fancyhf}{
    \fancyhead[L]{\nouppercase{\textbf{\leftmark}}}
    \fancyhead[R]{}
    \fancyfoot[C]{\thepage} 
    \renewcommand{\headrulewidth}{0.1pt}
}
\fancypagestyle{plain}{
    \fancyhead{}
    \fancyfoot[C]{\thepage}
    \renewcommand{\headrulewidth}{0pt}
}

\usepackage{tocloft}
%\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}} % for parts
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % for chapters

\renewcommand{\contentsname}{\hfill\bfseries\Large Table of Contents\hfill}   
%\renewcommand{\cftaftertoctitle}{\hfill}


%\renewcommand{\contentsname}{Table of Contents}

\usepackage{datetime}
\usepackage{enumitem}
\usepackage[printonlyused]{acronym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{amsfonts}

\usepackage[ruled,vlined]{algorithm2e}
\newcommand\mycommfont[1]{\footnotesize\ttfamily\textcolor{blue}{#1}}
\SetCommentSty{mycommfont}

\usepackage{caption}
\usepackage{graphicx}
\graphicspath{{fig/}{graphs/}}

\usepackage[backend=bibtex,style=ieee,sorting=none,minnames=1]{biblatex}

\usepackage{array}
\usepackage[table]{xcolor}

\usepackage[automake,style=long,symbols,nonumberlist]{glossaries-extra}
\makeglossaries
\loadglsentries{symbols}

\usepackage[left=1.5in,right=1in,top=1in,bottom=1in]{geometry}
\renewcommand{\baselinestretch}{1.5}

\addbibresource{references.bib}


%custom commands
\renewcommand{\vec}[1]{\boldsymbol{\mathit{#1}}}


% Title Page
\title{MS Thesis}
\author{Imdad Ul Haq}
\date{\today --- \currenttime}

\begin{document}
%\maketitle

\pagenumbering{roman}
\pagestyle{plain}
\setcounter{page}{9}

%\include{front_page}

%\include{thesis_title}

%\include{supurvisor_consent}

%\include{final_approval}

%\include{declaration}

%\include{certificate}

%\include{dedication}

%\include{acknowledgments}

\include{abstract}

\begin{normalsize}
    \tableofcontents

%   \ifx\totalfigures
    \listoffigures
%   \fi

\end{normalsize}

%\listoftables
\ifx\totaltables
    \listoftables
\fi

\include{abbreviations}

\printglossaries[symbols,style=long,title={List of Symbols}]

\pagenumbering{arabic}
\pagestyle{fancyhf}
\begin{normalsize}
\chapter{Introduction}\label{chap_1}
\include{chap_1}

\chapter{Background Theory and Literature Review}\label{chap_2}
\include{chap_2}

\chapter{System Model for NOMA in Sparse Multipath Propagation Environments}\label{chap_3}
\include{chap_3}

\chapter{Channel Estimation Techniques based on SiT coupled with CS Theory}\label{chap_4}
\include{chap_4}

\chapter{Performance Evaluation of Proposed Channel Estimation Techniques}\label{chap_5}
\include{chap_5}

\chapter{Conclusion}\label{chap_6}
\include{chap_6}

\renewcommand*{\UrlFont}{\rmfamily}
\printbibliography

\chapter*{sample symbols}
\include{sym_rough}
\end{normalsize}
\end{document}

1 Answer 1

1

The following minimal example addresses the first two of your requests:

enter image description here

\documentclass{report}

\usepackage{tocloft,lipsum}

% Center ToC heading
\renewcommand{\cfttoctitlefont}{\hfill\bfseries\Large}
\renewcommand{\cftaftertoctitle}{\hfill\mbox{}}
\renewcommand{\contentsname}{Table of Contents}

\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % for chapters
% Make \chapter leaders bold
\let\oldcftchapleader\cftchapleader
\renewcommand{\cftchapleader}{\bfseries\oldcftchapleader}

\begin{document}

\tableofcontents

\listoffigures

\listoftables

\sloppy % Just for this example
\chapter{First chapter}\lipsum[1-50]
\chapter{Second chapter}\lipsum[1-50]
\chapter{Third chapter}\lipsum[1-50]
\chapter{Last chapter}\lipsum[1-50]

\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}

\end{document}

If you want to avoid a chapter from being included in the ToC, you can try with

{\renewcommand{\addcontentsline}[3]{}% Remove capability to write to ToC
\chapter{<title>}}

where \chapter{<title>} represents your \printglossaries command.

2
  • Thanks a lot. It worked but now the list of figure is not printing on the next page, rather it gets print on the same page after the toc entries Dec 21, 2018 at 7:55
  • @SalmanKhan: Use \clearpage\listoffigures.
    – Werner
    Dec 21, 2018 at 16:26

You must log in to answer this question.

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