0

I am making a report. The table of contents needs to be adjusted to as shown below

sdevToc

I have used packages for adjusting Table of Contents, However I am not able to get the following things

  1. Aligning of Chapter Title Text

The following is MWC

\documentclass[12pt,twoside,openright]{report}
\usepackage{subfigure}
\usepackage[subfigure]{tocloft}
\usepackage[cmex10]{amsmath}
\usepackage{setspace}
\usepackage{caption}
\usepackage{etoolbox}
\usepackage{tabularx}
\usepackage[toc,page]{appendix}
\usepackage{acronym}
\usepackage{titletoc}
%for removing dots in toc
\renewcommand{\cftdot}{}
%for changing acronym to normal font instead of bold
\renewcommand\acsfont{\normalfont}
%for page font to be normal
\renewcommand{\cftchappagefont}{\normalfont}
\cftsetindents{section}{0em}{2em}
\cftsetindents{subsection}{0.3in}{0.5in}
\cftsetindents{subsubsection}{0.8in}{0.6in}


\renewcommand\cfttoctitlefont{\hfill\Large\bfseries}
\renewcommand\cftaftertoctitle{\hfill\mbox{}}

\setcounter{tocdepth}{3}%decides depth of sections to be shown in table of contents


%
\setlength{\cftbeforetoctitleskip}{-3em}
\RequirePackage[compact]{titlesec}
\captionsetup{labelsep=period}
%\setlength{\cftbeforechapskip}{0pt}
\setcounter{secnumdepth}{3}

\makeatletter
\patchcmd{\@makechapterhead}{50\p@}{0pt}{}{}
\patchcmd{\@makeschapterhead}{50\p@}{0pt}{}{}
\makeatother 

\cleardoublepage %\cleardoublepage %for openright
\renewcommand{\chaptername}{CHAPTER}
\renewcommand{\thechapter}{\Roman{chapter}}%chapter number in roman

%For displaying chapter title and heading in centre with required font
\titleformat{\chapter}[display]
{\normalfont\large\bfseries\centering}{\chaptertitlename\ \thechapter}{0pc}{\large}%changing font size,and centering of chapter heading
%style of chapter in toc
\titlecontents*{chapter}% <section-type>
  [0pt]% <left>
  {\addvspace{1em}}% <above-code>
  {\bfseries\chaptername\ \thecontentslabel\qquad}% <numbered-entry-format>
  {}% <numberless-entry-format>
  {\normalsize\hfill\contentspage}% <filler-page-format>
  \newpage

%\renewcommand{\thechapter}{\arabic{chapter}}
\begin{document}

\cleardoublepage
\pagenumbering{roman}
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\tableofcontents
\cleardoublepage
\pagenumbering{arabic}
\renewcommand{\thechapter}{\arabic{chapter}}
\chapter{THIS IS A VERY BIG CHAPTER HEADLINE AND NEEDS TO BE ALIGNED}
\section{GENERAL}


\end{document}

Please suggest what could be done to achieve the format in image attached. Please let me know if any other information is required. Thanks.

  • 1
    subfigure is an outdated package and you're loading titletoc twice, also in conjunction with tocloft, which is not recommended – user31729 Mar 18 '18 at 7:39
  • Will subfigure affect ToC format...I tried using the suggestion in tex.stackexchange.com/questions/165052/… But not able to get desired result – S.Dev Mar 18 '18 at 9:15
  • 1
    And could you please modify your sample code to something that actually shows the problems without us having to add a lot, without containing non-relevant code? (hint: '-' in ToC chapter: look at your \titlecontents*{chapter} definition) – remco Mar 18 '18 at 9:18
  • Main issue is aligning the multi-line chapter name in ToC – S.Dev Mar 18 '18 at 10:48
  • I have updated MWC. Any suggestions for resolving the issue – S.Dev Mar 18 '18 at 14:12

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.