0

I am facing three types of problems with the table of contents.

First, I want to remove underlining (from the section titles) and bold (from the chapter titles) from the table of contents. The page now looks like this:

enter image description here

For context, the reason the section titles have underlined text is that I have used underline for all section titles, as given in the below picture, which is the university formatting rule for theses:

enter image description here

I do not know, though, why the chapter titles are turning bold.

The second problem is that, as you can see, the table of contents does not include INTRODUCTION as the first chapter. I did use \chapter{} code for INTRODUCTION as well though.

The Latex code for my document is large, so I am just including the code until the first chapter (INTRODUCTION) below. I hope it helps.

\documentclass[12pt]{report}
\usepackage[left=1.5in, right=1in, top=1in, bottom=1.5in]{geometry}
\usepackage{setspace}
\usepackage{amsbsy}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{textcomp}
\usepackage{lscape}
\usepackage{amsmath}
\usepackage{calc}
\usepackage[rm,tiny]{titlesec} %added this to change the chapter title's font as default regular text font.

\newlength{\depthofsumsign}
\setlength{\depthofsumsign}{\depthof{$\sum$}}
\newlength{\totalheightofsumsign}
\newlength{\heightanddepthofargument}

\usepackage{pdflscape,booktabs}
\usepackage[flushleft]{threeparttable}
\renewcommand\TPTtagStyle{\textit} 
\usepackage[font=it,skip=0.5\baselineskip]{caption} % italic text for captions

%to put page numbers as the header
\fancyhf{}
\fancyhead[C]{\thepage}
\pagestyle{fancy}

\titleformat{\chapter}{\normalfont\centering}{}{0pt}{}
\titlelabel{}
\titlespacing*{\chapter}{0pt}{-25pt}{4pt}

\titleformat{\section}{\normalfont\centering}{}{0pt}{}

%koleygr: Redefining chapter to include \thispagestyle{fancy}
\let\oldchapter\chapter
\makeatletter
\def\chapter{%
\@ifstar{\@Starred}{\@nonStarred}%
}
\def\@Starred{%
\@ifnextchar[%
{\GenericWarning{}{Warning: A starred section can not have parameters. I am going to ignore them!}\@StarredWith}%
{\@StarredWithout}%
}      
\def\@StarredWith[#1]#2{%
\oldchapter*{#2}%
\thispagestyle{fancy}
}
\def\@StarredWithout#1{
\oldchapter*{#1}%
\thispagestyle{fancy}
}
\def\@nonStarred{%
\@ifnextchar[%
{\@nonStarredWith}%
{\@nonStarredWithout}%
}
\def\@nonStarredWith[#1]#2{%
\oldchapter[#1]{#2}%
\thispagestyle{fancy}
}
\def\@nonStarredWithout#1{%
\oldchapter{#1}%
\thispagestyle{fancy}
}
\makeatother

\interfootnotelinepenalty=10000

\begin{document}

\setlength{\headheight}{50pt} %to note where the header lies.
\setlength{\headsep}{15pt} %to set the distance between header and the first line after it.

\renewcommand{\headrulewidth}{0pt}
\doublespacing
\thispagestyle{empty}
\begin{center}
\vspace*{0.2in}
THESIS TITLE\\
\vspace*{0.4in}
by\\
Samyam Shrestha\\\

\vspace*{1.2in}
\singlespacing
A thesis submitted in partial fulfillment\\
of the requirements for the degree\\
\doublespacing
of\\
Master of Science\\
in\\
Applied Economics\\\

\vspace*{1in}
UNIVERSITY\\
University location\\
\vspace*{0.2in}
Date
\end{center}
\pagebreak

\pagenumbering{gobble}
\begin{center}
\vspace*{1in}
\textcopyright COPYRIGHT\\
by\\
Samyam Shrestha\\
2019\\
All Rights Reserved
\end{center}
\pagebreak

\begin{center}
ACKNOWLEDGEMENTS
\end{center}

Acknowledgment text

\pagebreak
\tableofcontents

\pagebreak

\begin{center}
ABSTRACT
\end{center}
\singlespacing
\noindent
Abstract text\\


\pagebreak

\pagenumbering{arabic}
\setcounter{page}{1}
\doublespacing

\chapter{INTRODUCTION}

Introduction starts\

Third, and this is just a trivial problem, but is there any way I can remove the numbering in the section titles (and just keep the numbering in the chapter titles)?

Edit: For the third problem, I did try using \section*{\underline{}} command, but it hid those section titles from the table of contents altogether (and only showed the chapter title).

Thanks a lot!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.