0

I have the following code: My question is I would like to reduce the font size for the chapter headings in the TOC only but preserve the font size in the actual heading of the chapter body. I have this code but it still shows large fonts for the chapters in the TOC. Any help is greatly appreciated!

\documentclass[a4paper,USenglish, hidelinks,11pt,portrait,onecolumn,openany]{report}
% Packages
\usepackage{xspace}
\usepackage{url}
\usepackage[htt]{hyphenat}
\usepackage{microtype}
% \usepackage[noligatures]{microtype}
\usepackage[utf8]{inputenc}
\usepackage{parskip}
\usepackage[a4paper, inner=3.0cm, outer=2.0cm, top=2.0cm, bottom=2.0cm, bindingoffset=0cm]{geometry}
% \usepackage[a4paper, inner=3.0cm, outer=1.0cm, top=2.0cm, bottom=2.0cm, bindingoffset=1cm]{geometry}
% Chapter 7 (Table of Contents and References..)
% Packages
\usepackage{xspace}
\usepackage{url}
\usepackage[htt]{hyphenat}
\usepackage{microtype}
% \usepackage[noligatures]{microtype}
\usepackage{blindtext}
% this package sets space between lines
% \usepackage[doublespacing]{setspace}
\usepackage{setspace} % spacing inside tables...
\usepackage{fancyhdr}
\usepackage{array}
\usepackage{verbatim}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage [font=small, labelfont=bf, margin=1cm]{caption}
\usepackage{varioref}
\usepackage{cleveref}
% \usepackage{hyperref}
\usepackage{tocloft}
\usepackage{titletoc}
\usepackage{titlesec}
\usepackage{minitoc}
% nottoc option removes self referencing of Table Of Contents (TOC) 
\usepackage[nottoc]{tocbibind} 
%\usepackage[notlof]{tocbibind}
% \usepackage{biblatex}
\usepackage{natbib}
\usepackage{fixltx2e}
\usepackage{upgreek}
\usepackage{latexsym}
\usepackage{siunitx}
\usepackage{lmodern}
\usepackage{kpfonts}
\usepackage{pxfonts}

% Times New Roman 
% using both packages produces better text and math fonts...
\usepackage{mathptmx}
\usepackage{mathpazo}

\usepackage{graphicx} %\usepackage[demo]{graphicx}
\usepackage{fancyhdr}
\usepackage{verbatim}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{cleveref}
\usepackage{ragged2e}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{xcolor} % change text color

% Import math packages
\usepackage{amsmath} 
\usepackage{amssymb} 
\usepackage{amscd} 
% \usepackage{amsthm} %introduces errors .. avoid

\usepackage{float}
\usepackage{placeins}
\usepackage{afterpage}
\usepackage{adjustbox}

\usepackage{epstopdf}
\usepackage{pdfpages}
\usepackage{afterpage}
\usepackage{placeins}
\usepackage{relsize}
% math package
% \usepackage{afterpage}
% \def\oneraggedpage{\raggedbottom\afterpage{\flushbottom}}

\usepackage{sectsty} % to center the chapter or section or subsection title..
% Only center chapters and not sections and subsections..
\chapterfont{\centering} % goes with package sectsty above..

% other options..
% \sectionfont{\centering}
% \subsectionfont{\centering}
% \allsectionsfont{\centering}

% makes double quotations easier....
\usepackage [autostyle, english = american]{csquotes}
\MakeOuterQuote{"}

% drawing a circle with color
\usepackage{tikz}
\newcommand{\tikzcircle}[2][red,fill=red]{\tikz[baseline=-0.5ex]\draw[#1,radius=#2] (0,0) circle ;}%

\usepackage{multirow, booktabs, boldline, hhline}
\usepackage{morefloats}
\usepackage{textcomp}


\crefname{enumi}{position}{positions}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
% User Defined Commands
\newcommand{\uDefBfSeries}[3][\itshape]{#1}   
\newcommand{\keyword}[2][\bfseries\itshape]{{#1#2}}


\crefname{enumi}{position}{positions}
\pagestyle{empty}
\newcommand{\normal}[1]{\multicolumn{1}{l}{#1}}
\newcommand{\head}[1]{\textnormal{\textbf{#1}}}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} % for centering of columns with justify

% Scales the spaces within the table to 100% of their original..
\renewcommand{\arraystretch}{1.0}

% scales the default interline space to 1.5 its default value. Of course that number can be set to any value.
\renewcommand{\baselinestretch}{2.0} % for 2.0 double spacing between lines..

\graphicspath{{D:/RESEARCH\_2/Dissertation/Final\_Results}} % Note: the delimiter should be '/' instead of '\' to work...

\everymath{\displaystyle}
\DeclareMathOperator{\dis}{d} % for writing norm operator


% \titleformat{\section}
% {\normalfont\fontsize{12}{15}\bfseries}{\thesection}{1em}{}


% titlespacing{\section}{0pt}{0pt}{0pt} % this reduces space between (sub)sections to 0pt, for example
\titlespacing\section{0pt}{11pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{11pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{8pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\paragraph{0pt}{6pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

%% this will reduce spaces between parts (above and below) of texts within a (sub)section to 0pt, for example - like between an 'eqnarray' and text
\AtBeginDocument{
\setlength\abovedisplayskip{6pt}
\setlength\belowdisplayskip{8pt}
}

% Modify paragraph to make it a sub-section..
% \makeatother
\setcounter{secnumdepth}{4} % how many sectioning levels to assign numbers to
\setcounter{tocdepth}{4}    % how many sectioning levels to show in ToC

% Using \setlength is highly recommended..
\setlength{\extrarowheight}{4pt}
\setlength{\heavyrulewidth}{1.2pt} %default for top and bottom rule
\setlength{\lightrulewidth}{0.2pt} %thickness of \midrule
\setlength{\cmidrulewidth}{0.5pt} %thickness of \cmidrule

\setlength{\abovetopsep}{0pt} %space above top rule
\setlength{\belowbottomsep}{0pt} %space below bottom rule
\setlength{\aboverulesep}{0pt} %for space above \midrule \cmidrule and \bottomrule
\setlength{\belowrulesep}{0pt} %for space below \midrule, \cmidrule and \toprule

\setlength{\cmidrulekern}{0pt}  %for trimming in \cmidrule
\setlength{\abovetopsep}{0pt} %leaves 'x'pt space below caption and start of table otherwise use \vspace{10pt} to LEAVE SPACE BET CAP AND TAB.

% \setlength\abovedisplayskip{4pt}
% \setlength\belowdisplayskip{4pt}
% \setlength\abovedisplayshortskip{2pt}
% \setlength\belowdisplayshortskip{2pt}

% Pargraph settings
\setlength{\parindent}{4em}
\setlength{\parskip}{1em}

% \makeatletter
% \makeatother

\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy} %for fancy headers
\rhead{\thepage}

%Fix headers on Table of Contents and List of Figures:
\fancypagestyle{plain}{}
%\pagenumbering{roman}

%\fancyfoot[R]{\thepage}
%\fancyhead[R]{\thepage}

% Overriding fancy header
%\lhead{Left header}
%\rhead{Right header}
%\chead{Center header}

%\lfoot{Left footer}
%\rfoot{Right footer}
%\cfoot{Center footer}

% Enable these 3
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
\titleformat*{\section}{\small}
\renewcommand{\chaptertitlefont}{\normalfont\sffamily\small}

% From natbib package....reduces font size for bibliography entries
% \def\bibfont{\footnotesize}
\def\bibfont{\normalsize}

\usepackage{abstract}
\renewcommand{\abstractnamefont}{\normalfont\huge}
\renewcommand\abstractname{\uppercase{abstract}}
\renewcommand\abstractname{\normalfont\textsc{abstract}}

\begin{document}
  \renewcommand{\contentsname}{\fontsize{18}{2}\selectfont\ TABLE OF CONTENTS}
  \centering{\tableofcontents}
  \chapter{\fontsize{15}{10}\selectfont\ INTRODUCTION}
  \chapter{\fontsize{15}{10}\selectfont\ LITERATURE SURVEY}
\end{document}
  • You've already loaded titlesec, use that instead of sectsty to format your chapter and section titles. titlesec also allows you some control on the table of contents listings. Loading all three of tocloft and titletoc and titlesec is a pretty bad idea, see the documentations of any of the three packages to see why (especially tocloft). – Willie Wong Jul 29 '16 at 5:01
  • Overall, your minimum example is not very minimal. And you are loading way too many packages, many of which will lead to conflicts and many of which have duplicate functionality. You shouldn't need to load both varioref and cleveref. The packages xspace, url, hyphenat, and microtype are loaded twice. I can't see why you would want to load all of lmodern, kpfonts, and pxfonts, as well as mathptmx and mathpazo. The ams* packages should be loaded earlier, definitely before cleveref. – Willie Wong Jul 29 '16 at 5:06
  • Oh, and in my being aghast at all the packages that you loaded and most likely don't need, I forgot to say: absolutely don't put font changing commands in \chapter. Like I said in the first comment, read the titlesec documentation and use it to display the chapter titles the way you want it in a consistent way. – Willie Wong Jul 29 '16 at 5:08
3

Welcome to this site. Please note that asking the same question 2 times within 5 minutes with a different subject line does not really help -- you can edit your first question.

As @WillieWong mentioned, load packages you need and you know what they do -- loading as many packages as possible only helps getting conflicts.

A solution to your issue would be to locally change the format of headings of \tableofcontents, here a solution with titlesec.sty:

\documentclass[a4paper,11pt,openany]{report}

\usepackage{titlesec}

\usepackage[utf8]{inputenc}

\begin{document}
\begingroup
  \titleformat{\chapter}[display]
    {\filright}
    {}
    {0pt}
    {\large\bfseries}% <== Adjust to your needs
  \tableofcontents
\endgroup
\chapter{Introduction}
\chapter{Literature Survey}
\end{document}

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.