Suggest me LaTeX
command and package on how the words Chapter 1
can be appeared in the table of contents instead of just 1
and so on for the next chapters.
Following is the template of the thesis of our university:
\documentclass[12pt,openany,oneside]{book}
\usepackage[pdftex]{graphicx}
\usepackage[a4paper,portrait,left=1.5in,
right=1in,top=1in, bottom=1.33in, footskip=0.33in]{geometry}
%\usepackage{sectsty}
%\sectionfont{\fontsize{12}{15}\selectfont}
\usepackage{titlesec}
\usepackage{lipsum}
%\titleformat{\chapter}[display]
%{\normalfont\Large\filcenter\sffamily}
%{\vspace*{\fill}
%\titlerule[1pt]
%\vspace{1pc}
%\LARGE\MakeUppercase{\chaptertitlename}~\thechapter}
%{1pc}
%{\titlerule\Huge}
%[\vspace*{\fill}\newpage]
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}{\chaptertitlename
\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{250pt}{40pt}
\usepackage{epstopdf}
\usepackage{subfigure}
\usepackage{epsfig}
\usepackage{color}
%\usepackage{a4wide}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{ntheorem}
\usepackage[normalem]{ulem}
\usepackage{chngcntr}
%\usepackage[pdfencoding = auto, psdextra, bookmarksdepth = 4]{hyperref}
%\usepackage{microtype}
\overfullrule=5pt
\hfuzz=20pt
\vfuzz=20pt
\hbadness=10000
\vbadness=\maxdimen
\renewcommand{\chaptermark}[1]{
\markboth{\chaptername\ \thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{
\markright {\thesection.\ #1}}
\parindent0pt
\newlength{\defbaselineskip}
\setlength{\defbaselineskip}{\baselineskip}
\newcommand{\setlinespacing}[1]%
{\setlength{\baselineskip}{#1 \defbaselineskip}}
\newcommand{\doublespacing}{\setlength{\baselineskip}%
{2.0 \defbaselineskip}}
\newcommand{\singlespacing}{\setlength{\baselineskip}{\defbaselineskip}}
\setlinespacing{1.5}
\newtheorem*{theorem-non}{Theorem}
\newtheorem{definition}{Definition}[chapter]
\newtheorem{lemma}{Lemma}[chapter]
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{remark}{Remark}[chapter]
\newtheorem{example}{Example}[chapter]
\newtheorem{corollary}{Corollary}[chapter]
\newenvironment{proof}%
{\medskip\par\noindent{\bf Proof\;}}%
{\hspace{\fill}$\Box$\medskip\par}
\numberwithin{equation}{chapter}
\numberwithin{theorem}{chapter}
\numberwithin{lemma}{chapter}
\numberwithin{corollary}{chapter}
\numberwithin{example}{chapter}
\numberwithin{remark}{chapter}
\numberwithin{definition}{chapter}
\renewcommand{\bibname}{}
\hyphenpenalty 50
\newtheorem{property}{Property}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newcommand{\cchapter}[1]{\chapter[#1]}{\centering #1}}
%%%%%%%%%%%%%%%%%%%%%
%\newgeometry{left=1.5in, right=1.0in, bottom=1.75in, top=1in, footskip=0.75in}
%\addtolength{\oddsidemargin}{0.5cm}
% \addtolength{\evensidemargin}{0.5cm}
% \addtolength{\textwidth}{0.0cm}
% \addtolength{\topmargin}{0.0cm}
% \addtolength{\textheight}{0.0cm}
%%%%%%%%%%%%%%%%%%%
\usepackage[noabbrev]{cleveref}
\begin{document}
\pagestyle{plain} \setlinespacing{1.5}
%\input{Acknowledgement}
\newpage
\input{mytitle.tex}
%%%%%%%%%%%%%%%%%%%%
\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
\input{chap1.tex}
%%%%%%%%%%%%%%%%%%
\input{chap2.tex}
%%%%%%%%%%%%%%%%%%
\input{chap3.tex}
%%%%%%%%%%%%%%%%
\input{chap4.tex}
%%%%%%%%%%%%%%%%%
\input{chap5.tex}
%%%%%%%%%%%%%%%%%%%
\input{chap6.tex}
%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%
\input{chap7.tex}
%%%%%%%%%%%%%%%%%%%
\input{chap8.tex}
\input{bib.tex}
%%%%%%%%%%%%%%%
\end{document}
Table of contents have the following command:
\newpage
\tableofcontents
epstopdf
andepsfig
packages. (b) Don't load thesubfigure
package, as it's badly depecated; instead, load eithersubfig
orsubcaption
. (c) Don't specify the optionpdftex
while loadinggraphicx
. (d) Loadxcolor
, notcolor
.\documentclass{book} \begin{document} \tableofcontents \chapter{AAA} \section{A1} \section{A2} \chapter{BBB} \section{B1} \section{B2} \end{document}
.