1

I am having issues with removing the ruledline between my chapter number and chapter heading. I wanted to add some space between the TOC heading and the actual content list. Here is my MWE. Please help me. I have been battling this issue since the past week with little success.

\documentclass[a4paper,14pt]{extreport}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsbsy}
\usepackage{color}
\usepackage{graphicx}
\usepackage[english]{babel}
\usepackage{microtype}
\usepackage{lscape}
\usepackage[small,compact,clearempty,indentfirst]{titlesec}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\titleformat{\chapter}[display]
{\normalfont\Large\filcenter\sffamily}
{\vspace*{\fill}
%\titlerule[0pt]%
\vspace{1pt}%
%\titlerule
\vspace{1pc}%
\LARGE{\chaptertitlename}~\thechapter}{1pc}
{\titlerule\huge}
[\vspace*{\fill}\newpage]

\titlespacing*{\chapter}{1pt}{1pt}{1pt}

\titleformat{name=\chapter,numberless}[display]
{\normalfont\Large\filcenter\sffamily}
{}
{1pt}
{\titlerule[0pt]\Huge}
%[\titlerule]
\makeatletter
\renewcommand\@biblabel[1]{#1.}
\makeatother
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\pagestyle{plain}
\newcommand{\helv}{%
\fontfamily{T1}\fontseries{b}\fontsize{12}{12}\selectfont}
\renewcommand{\chaptermark}[1]{%
\markboth{\sc {
        \helv \chaptername\ \thechapter.%
        \ #1}}{}}
\fancyhead{{\bf \sc \helv{\leftmark}}}
\lhead{}
\chead{}
\cfoot{\bf{\sf \thepage}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\baselinestretch}{1.4}
\usepackage[hmargin=1.2in,vmargin=1.2in]{geometry}
\begin{document}
    \setcounter{tocdepth}{1}
    \tableofcontents
    \newpage
    \addcontentsline{toc}{section}{\textit{\bf{\small{List of Figures }}}}
    \listoffigures
     \newpage

    \thispagestyle{empty}
    %\chapter*{\textbf{Bibliography}}
    \addcontentsline{toc}{chapter}{\bf Bibliography}
    \rhead{\textbf{\sc{\helv{BIBLIOGRAPHY}}}
    \setcitestyle{numbers}
    \bibliographystyle{ieeetr}
    \bibliography{thesisref}
\end{document}
6
  • 2
    Welcome to TeX.SE! You're not looking for \tocname, are you? And perhas you want to have a look at this question. BTW, I like your attempt to provide some code, but it would be much better if it started with \documentclass and had some minimal content ending with \end{document}. In particular, the answer to your question may depend on the document class you are using.
    – user121799
    Oct 1, 2018 at 2:22
  • @marmot Thank you very much. Indeed the question you linked to solved a part of my problem. But the other issues remain.
    – Vishesh
    Oct 1, 2018 at 2:38
  • I'll be happy to look at it after dinner but please add some minimal content \begin{document} .... \end{document} which generates some table of contents and illustrates the issue.
    – user121799
    Oct 1, 2018 at 2:42
  • @marmot I have edited it as required. Thanks for your help.
    – Vishesh
    Oct 1, 2018 at 3:39
  • You already got a nice answer. Does it work for you? If yes, you may consider to accept it by clicking on the check mark left of it. If not, you might want add a comment under the answer saying what you like to have in addition.
    – user121799
    Oct 1, 2018 at 3:56

1 Answer 1

2

With babel you have to use

\addto\captionsenglish{%
  \renewcommand{\contentsname}{TABLE OF CONTENTS}%
}

Example without the \titlerule and additional space after unnumbered chapters:

\documentclass[a4paper,14pt]{extreport}
\usepackage[english]{babel}
\usepackage{microtype}

\usepackage[small,compact,clearempty,indentfirst]{titlesec}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\titleformat{\chapter}[display]
{\normalfont\Large\filcenter\sffamily}
{\vspace*{\fill}\LARGE{\chaptertitlename}~\thechapter}%<- changed
{1pc}
{\huge}%<- changed
[\vspace*{\fill}\newpage]

\titlespacing*{\chapter}{1pt}{1pt}{1pt}

\titleformat{name=\chapter,numberless}[display]
{\normalfont\Large\filcenter\sffamily}
{}
{1pt}
{\Huge}% <- changed
[\vspace{2em}]% <- added 

\addto\captionsenglish{%
  \renewcommand{\contentsname}{TABLE OF CONTENTS}%
}

\usepackage{blindtext}% only for dummy text in the MWE
\begin{document}
\tableofcontents
\Blinddocument
\end{document}

Result:

enter image description here

Note that I have removed the unrelated packages etc.

1
  • Thank you so much. I don't mean to exaggerate, but you just saved me from wasting a year of my life.
    – Vishesh
    Oct 1, 2018 at 4:39

You must log in to answer this question.

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