Need help with formatting the fonts and the space around the headings

So I am quite a new Tex user, but I simply love it because it keeps me away from clicking on too many buttons and gives very pretty equations. So I decided to do one of my project reports in Tex and plan to learn it on the fly. I have done other reports in Tex before, but this time the formatting seems to be a little too demanding. Usually, no one really found the differences, but now they are pinpointing on little things a little too much. So I need help. I did try a lot of solutions suggested in other answers, but they seem to cause other weird problems such as messing up the font size in the Table of Contents, messing up space above and below the headings (Yes! This space is required to be equal by the University, but I have found a solution to this problem thanks to this site), or some simply do not work most probably due to package clashes.

\documentclass[hidelinks, chapterprefix=false, parskip=full, fontsize=12pt]{scrreprt}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{cancel}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage{scrlayer-scrpage}
\usepackage[A4, margin=2.7cm]{geometry}
\usepackage{CJKutf8}
\usepackage{pdfpages}
\usepackage{mathtools}
\usepackage{sectsty}
\usepackage{titlesec}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{placeins}
\usepackage{booktabs}
\makeatletter
\renewcommand*{\chapterformat}{%
\mbox{\chapapp~\thechapter\autodot \enskip}%
}
\makeatother
\setcounter{tocdepth}{2}
\setcounter{secnumdepth}{3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%Horrible Looking Times Font%%%%%%%%%%%%%%%%%%%
\usepackage{fontspec}
\setmainfont{Times New Roman}
%%%%%%%%%%%%%%%%%%%%%%Playing with the spacing around headings%%%%%%%%%%%
\renewcommand*{\chapterheadendvskip}{%
\vspace{1pt}%
}
\titlespacing{\section}{0pt}{*0}{*0}
\titlespacing{\subsection}{0pt}{*0}{*0}
\titlespacing{\subsubsection}{0pt}{*0}{*0}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%Adding dotted lines for Chapters in the TOC%%%%%%%%%%%%%%%
\makeatletter
\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1.0em \@plus\p@
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode \bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
#1\nobreak\
\leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfil\nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\fi}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%Font sizes%%%%%%%%%%%%%%%%%%%%%%%%
\chapterfont{\fontsize{16}{16}}
\sectionfont{\fontsize{15}{15}}
\subsectionfont{\fontsize{14}{14}}
\subsubsectionfont{\fontsize{12}{12}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%Making the Abstract start from the top%%%%%%%%%%%%%%%%
\usepackage{etoolbox}
\patchcmd{\abstract}{\null\vfil}{}{}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\chapterfont{\centering}
\addcontentsline{toc}{chapter}{Abstract}
\begin{document}
\cohead[Header]{Header}

\begin{abstract}
\chapterfont{\centering}
\pagenumbering{Roman}
\addcontentsline{toc}{chapter}{Abstract}
%%%%%%%%%%%Adding the header for the abstract page%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\thispagestyle{scrplain}

\cohead[Header]{Header}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter*{Abstract}
This is the abstract.
\\
\\
\textbf{Keywords:} Cool. Amazing. Awesome. Great. Fantastic.
\end{abstract}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%Adding the header for the Table of Contents%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapterfont{\centering}
\tableofcontents
\thispagestyle{scrplain}
\cohead[Header]{Header}

\newpage
%%%%%%%%%%%%%%
\pagestyle{scrplain}
\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}

\cohead[Header]{Header}

%%%%%%%%%%%%%%%%%%%
\chapter{Introduction}
Awesome! The power is just great.
\section{My Darling}
ABCDeFGHIJKLMNOPQRSTUVWXYZ\\
abcdefghijklmnopqrstuvwxyz\\
\textit{I just jump from outta nowhere and bite prey\\
And sink my teeth in 'em, and fill 'em\\
Full of poison, and make a noise like a snake before I kill 'em\\
And let 'em know that I just don't feel 'em\\
And smack 'em with the backward E, the Eminem emblem\\
I was taught if you gonna murder somebody you should face him\\
Tell him why, look him dead in the eye, then waste him\\
And the dark shall emerge from the fiery depths of hell\\
Then swallow the shell, all the hollow who dwell\\
In the shadows of all who are willing to sell their souls\\
For this rap game and it g-g-goes\\}
\subsection{Man}
ABCDeFGHIJKLMNOPQRSTUVWXYZ\\
abcdefghijklmnopqrstuvwxyz\\
I am a God.
\subsubsection{Power of equations}
ABCDeFGHIJKLMNOPQRSTUVWXYZ\\
abcdefghijklmnopqrstuvwxyz\\
I have power.
$$(a//b) = \int_\Omega vw \space dx \\ (a//b)_{\partial \Omega} = \int_{\partial \Omega} vw \space dx \\ u^{n + \frac{1}{2}} \approx \frac{(u^n + u^{n+1})}{2} \\ \partial_t u = \frac{u^*-u^n}{\Delta t}$$
\pagenumbering{arabic}

\renewcommand{\bibname}{References}
\begin{thebibliography}{}
\bibitem{1} Thunder Chad Dong，\textit{Projects}.
\end{thebibliography}
\end{document}


This gives the following output:

This is the sample minimum working code format that I am using. So I need the following things. I did try to get the following right using tonnes of other resources available online, but I am not able to get everything right at the same time.

• Everything in that goddamn 'MS-Word Times New Roman 12pt.' (I am well aware of the fact that there is not really one true or real Times New Roman font, but I just want something close to what the MS-Word gives). Frankly, I do not find the MS-Word Times New Roman font clean enough and it actually looks quite horrible sometimes, so anything that can just trick an eye to think it is 'Times New Roman' would be good enough, as long as the size of the font is very close to what MS-Words Times New Roman gives.

• Chapter heading size to be 16pt (According to MS-Word Times New Roman font and size). It just needs to trick the reader enough that there are not some glaring size differences between headings when the reader goes from the documents prepared by others to mine.

• Section heading size to be 15pt (Again, MS-Word Times New Roman font and size)

• Subsection heading size to be 14pt (Again, MS-Word Times New Roman font and size)

• Subsubsection heading size to be 12pt (You got it! MS-Word Times New Roman font and size)

• Math size to be 10.5pt and in that cursed MS-Word Times New ROMAN!

• Caption size to be 10.5pt Bold. At the moment, I am specifying this every time I am writing the caption. I did try the caption package but then the captions just disappeared, so there is definitely some conflict. Would be nice if there was a way to resolve this, but it is not that important. I can just type it with every caption, but that is certainly not an efficient way, so if you know, it would be nice to see how to redefine that command to achieve this.

I dont know why this minimum working example has Abstract listed twice in the Table of Contents. It appeared only in the minimum working example. It is not present in the full report. I have already finished the report in Tex.

So the results are supposed to be something like:

If you can help or give me any advice, please do! I look forward to hearing back from you.

Have an awesome day ahead!

P.S. I am using XeLaTex on overleaf to render the document because it is easier to play with fonts in it, I guess. I am not really sure. I am open to changing the rendering engine as long as it doesnt cause any conflicts.

• Welcome to TeX.SX! Your code does not compile properly. There are errors and warnings. Also tocbibind and KOMA-Script are incompatible... – DG' Oct 14 '20 at 7:47
• @DG' I am sorry about that. I am aware that there are errors and warnings, but I was like, "Well, I am getting the pdf I want, so lets not get into the warnings". I agree that is quite an ignorant move on my part, but I am also a newbie and do not really know much about Tex. I guess I did do stupid things on my part by not actually going through the documentation and manual because (was hoping to learn it on the fly). I will try to get into the details soon because I am definitely going to stick with it, so better to get better at it. Still, if you can suggest a fix, feel free! Cheers! – Dante_7744 Oct 14 '20 at 10:59

1 Answer

I found the answer! Adding the following block into the preamble seems to do the job.

%%%%%%%%Fonts%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{mathptmx}
\setkomafont{chapter}{\fontsize{16}{12}}
\setkomafont{section}{\fontsize{15}{12}}
\setkomafont{subsection}{\fontsize{14}{12}}
\setkomafont{subsubsection}{\fontsize{12}{12}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%