% Original Authors: Akshay Kumar, Aman Thakur, Aniket Kumar, Prashant Yelpale, Sonu Aswar, Rakesh Kumar, Ravi Kumar, Jayaprakash Katual
% Department of Electrical Engineering NIT Hamirpur
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[oneside,12pt,a4paper]{report}
% ---------------------------
% Packages
% ---------------------------
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguages{hindi}
\newfontfamily\devanagarifont[Script=Devanagari]{Noto Serif Devanagari}
% Set main font (Times)
\setmainfont{Times New Roman}
\usepackage{amsmath,amssymb,mathtools,amsfonts}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{siunitx}
\usepackage{float}
\usepackage{array}
\usepackage{multirow}
\usepackage{enumitem}
\usepackage{lipsum}
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage{xcolor}
\usepackage{setspace}
\usepackage{textpos} % absolute positioning (if you use)
\usepackage{pdfpages}
\usepackage{cite}
\usepackage{tocloft}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{pdflscape}
\usepackage{algorithm,algpseudocode}
\usepackage{svg}
\usepackage{etoolbox}% single svg package; set inkscape options if needed
\usepackage{eso-pic} % for watermark shipout
\usepackage{epstopdf}
\usepackage[hidelinks]{hyperref}
\usepackage{listings}
\usepackage{tabularx}
\newtheorem{definition}{Definition}
% Geometry
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=25mm,bmargin=25mm,lmargin=38mm,rmargin=25mm}
% Numbering within section for equations
\numberwithin{equation}{section}
% ---------------------------
% Title / heading formats
% ---------------------------
\titleformat{\chapter}[display]
{\normalfont\fontsize{22}{26}\selectfont\filright\bfseries\color{black}}
{\textit{\chaptertitlename\ \thechapter}} % "Chapter N" italic
{2.5cm}
{\bfseries}
\titlespacing*{\chapter}{0pt}{5cm}{2.5cm}
\titleformat{name=\chapter, numberless}[display]
{\normalfont\fontsize{22}{26}\selectfont\filright\bfseries\color{black}}
{}
{0.5cm}
{\fontsize{22}{26}\selectfont\bfseries}
\titleformat{\section}
{\normalfont\fontsize{18}{21.6}\selectfont\bfseries}
{\thesection}
{1em}
{}
\titleformat{\subsection}
{\normalfont\fontsize{14}{16.8}\selectfont\bfseries}
{\thesubsection}
{1em}
{}
\titleformat{\subsubsection}
{\normalfont\fontsize{12}{14.4}\selectfont\bfseries}
{\thesubsubsection}
{1em}
{}
% spacing tweaks (one line before sections)
\titlespacing*{\section}{0pt}{\baselineskip}{\baselineskip}
\titlespacing*{\subsection}{0pt}{\baselineskip}{\baselineskip}
\titlespacing*{\subsubsection}{0pt}{\baselineskip}{\baselineskip}
% Captions
\captionsetup[table]{labelfont=bf,font=small}
\captionsetup[figure]{labelfont=bf,font=small}
% ---------------------------
% Watermark helper (eso-pic)
% ---------------------------
\newcommand\BackgroundPic{%
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
\includegraphics[width=0.6\paperwidth,height=0.6\paperheight,keepaspectratio]{IMAGE/nithwatermark.jpg}%
\vfill
}}}
% ---------------------------
% hyperref (load late)
% ---------------------------
\usepackage[hidelinks]{hyperref}
%---------------------------- Contents Text Size Changer and Underline-----
% Change font size of "Contents"
\renewcommand{\cfttoctitlefont}{\LARGE\bfseries}
% Line under the title
\renewcommand{\cftaftertoctitle}{%
\par\vspace{8pt}
\noindent\hrule height 1.8pt
\vspace{-30pt}
}
%---------------------------- List of Figures Size Changer and Underline-----
\renewcommand{\cftloftitlefont}{\LARGE\bfseries} % Title font change
\renewcommand{\cftafterloftitle}{%
\par\vspace{8pt}%
\noindent\hrule height 1.8pt%
\vspace{-20pt}%
}
%---------------------------- List of Tables Size Changer and Underline-----
\renewcommand{\cftlottitlefont}{\LARGE\bfseries} % Title font change
\renewcommand{\cftafterlottitle}{%
\par\vspace{8pt}%
\noindent\hrule height 1.8pt%
\vspace{-20pt}%
}
%---------------------------- References Size Changer and Underline-----
\titleformat{\chapter}[display]
{\normalfont\fontsize{22}{26}\selectfont\filright\bfseries\color{black}}
{\textit{\chaptertitlename\ \thechapter}}
{2.5cm}
{\bfseries}
\titlespacing*{\chapter}{0pt}{5 cm}{2.5 cm}
% Numberless chapters (e.g., \chapter*{References}) — right aligned, SMALL top gap
\titleformat{name=\chapter, numberless}[display]
{\normalfont\fontsize{22}{26}\selectfont\raggedleft\bfseries\color{black}} % raggedleft -> right aligned
{}
{0.5cm}
{\fontsize{22}{26}\selectfont\bfseries}
% Make numberless chapters have a SMALLER gap from the top (so they appear near top)
\titlespacing*{name=\chapter, numberless}{0pt}{-2.0cm}{0.8cm} % adjust 1.0cm if needed
\makeatletter
\patchcmd{\thebibliography}
{\chapter*{\bibname}}
{}% replace it with nothing
{}% success - do nothing
{\PackageWarning{patchbib}{Failed to patch \string\thebibliography}}% failure message
\makeatother
\renewcommand{\bibname}{References}
% ---------------------------
% Document begin
% ---------------------------
\begin{document}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
% Cover, title, certificate etc. (keep your files)
\input{coverpage}
\cleardoublepage
\pagenumbering{roman}
\input{titlepage.tex}
\cleardoublepage
% Watermark for certificate page only:
% ===== Certificate page with correct hyperlink anchor =====
\cleardoublepage % ensure we're on a fresh page
\phantomsection % create an anchor for hyperref
\addcontentsline{toc}{chapter}{Certificate} % TOC entry points here
\AddToShipoutPictureBG*{\BackgroundPic} % start watermark (background)
\input{certificate.tex} % certificate content file
\ClearShipoutPictureBG % end watermark
\clearpage
\addcontentsline{toc}{chapter}{Acknowledgements}
\input{acknowledgment.tex}
\cleardoublepage
\addcontentsline{toc}{chapter}{Abstract}
\input{abstract.tex}
\cleardoublepage
% Table of contents with temporary narrower margins
\newgeometry{tmargin=11mm,lmargin=38mm,rmargin=25mm,bmargin=25mm}
\thispagestyle{empty}
\begin{flushright}
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{4}
\end{flushright}
\cleardoublepage
\restoregeometry
% List of figures/tables
\newgeometry{tmargin=11mm,lmargin=38mm,rmargin=25mm,bmargin=25mm}
\begin{flushright}
\addcontentsline{toc}{chapter}{ List of Figures}
\listoffigures
\end{flushright}
\restoregeometry
\cleardoublepage
\newgeometry{tmargin=11mm,lmargin=38mm,rmargin=25mm,bmargin=25mm}
\begin{flushright}
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\end{flushright}
\restoregeometry
\cleardoublepage
\addcontentsline{toc}{chapter}{List of Abbreviations}
\input{LOA.tex}
\cleardoublepage
% Begin main chapters
\pagenumbering{arabic}
\renewcommand\thesubsubsection{\Alph{subsubsection}.}
\input{chapters/chapter1.tex}\cleardoublepage
\input{chapters/chapter2.tex}\cleardoublepage
\input{chapters/chapter3.tex}\cleardoublepage
\input{chapters/chapter4.tex}\cleardoublepage
\input{chapters/chapter5.tex}\cleardoublepage
% List of publications & references (kept similar to yours)
\cleardoublepage
\addcontentsline{toc}{chapter}{List of Publications}
\input{listofpublications}
% ---------------------------
% ---------------------------
% ---------- REFERENCES (single heading, no duplicate "Bibliography") ----------
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{References} % TOC entry / hyperref anchor
% Print a single, right-aligned numberless chapter title (uses numberless titleformat)
\chapter*{References}
% Optional rule under heading (remove if you already have one)
\vspace{-20pt}
\noindent\hrule height 1.8pt
\vspace{-2pt}
\bibliographystyle{IEEEtran}
\bibliography{References}
\clearpage
\end{document}