# Spacing before section heading is uneven

In every chapter the first section heading has a problem of overlapping with the previous paragraph.

Here is the code and I'm new to latex.

\documentclass[12pt,a4paper,twoside,openright]{report}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
\usepackage{subfigure}
\usepackage{scrextend}
\usepackage[table,xcdraw]{xcolor}
\usepackage{gensymb}
\usepackage{amsmath}
\usepackage{lscape}
\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{fancyhdr}
\usepackage{subfig} %for sub figure
\usepackage{epsfig} %for using eps figure
\usepackage{pdfsync}
\usepackage{epstopdf}%using eps fig in pdflatex compailing
\usepackage[ddmmyyyy,hhmmss]{datetime}
%\usepackage{newlfont}
\usepackage{caption} %to remove numbering in the figure captions
\usepackage[authoryear]{natbib}   %used to use different bib styles
\usepackage{hyperref} %used to han­dle cross-ref­er­enc­ing com­mands in LaTeX to pro­duce hy­per­text links in the doc­u­ment.
\usepackage{setspace} %Pro­vides sup­port for set­ting the spac­ing be­tween lines in a doc­u­ment.
\usepackage{rotating} %used to rotate the figures, tables sideways
\usepackage{multirow} %used to merge the rows of table
\usepackage{fancyhdr} %pro­vides ex­ten­sive fa­cil­i­ties, both for con­struct­ing head­ers and foot­ers
\usepackage{sectsty}  %used to set the section and chapter heading font size
%\usepackage[labelsep=space]{caption}%to remove the colon in the caption
%\usepackage{latexsym}
\usepackage{makeidx}
\usepackage[T1]{fontenc}  %used to type special characters, accent letters
\usepackage{array}
%
%\usepackage{lineno}
%\linenumbers    %package and the command are used to put line numbers
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hvfloat,lipsum}
\usepackage[labelsep=space]{caption}%to remove the colon in the caption of the figures and tables.

\usepackage{ragged2e} % text justify
%\usepackage[a4paper]{geometry} % to set margind for individual pages
%\geometry{
%left={1in},
%right={1in},
%top={1.5in},
%bottom={1in},
%}
\usepackage{enumitem}
\usepackage[acronym]{glossaries} % abbrivations
%\usepackage[subfigure]{tocloft} %  To get space between text and numbering in toc
%\cftsetindents{section}{0em}{3em}
%\cftsetindents{subsection}{3em}{4em}

%\usepackage[none]{hyphenat} % to remove word break
%\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\pagenumbering{gobble}% Remove page numbers (and reset to 1)
\pagenumbering{arabic}% Arabic page numbers (and reset to 1)
\usepackage{pslatex} %Times font
\usepackage{mathtools}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\newcommand{\listofnotations}{\chapter*{Nomenclature}\input{7_Expansions.tex}}
%{\begin{tabbing}12345678901234\=\kill \parbox{0.75in}{\hfill$#1$} \> \parbox[t]{5in}{#2
%(page \pageref{#2})}
%\end{tabbing}}
%\newcommand{\newnot}[1]{\label{#1}}

%\setlength{\parskip}{1ex plus0.3ex minus0.0ex}
%\onehalfspacing
\renewcommand{\baselinestretch}{1.5} % the line spacing is 1.5
\renewcommand{\bibname}{Bibliography}

\usepackage{mathptmx}%Times new roman nearest match
\chapterfont{\LARGE}
\sectionfont{\large}

%Command             10pt    11pt    12pt
%\tiny               5       6       6
%\scriptsize         7       8       8
%\footnotesize       8       9       10
%\small              9       10      10.95
%\normalsize         10      10.95   12
%\large              12      12      14.4
%\Large              14.4    14.4    17.28
%\LARGE              17.28   17.28   20.74
%\huge               20.74   20.74   24.88
%\Huge               24.88   24.88   24.88

%\numberwithin{figure}{section}
%\numberwithin{table}{section}

%\setlength{\topmargin}{1.5in} % top margin is .5 in
%\newgeometry{top=1.5in, bottom=1in}
\usepackage[top=1.5in, bottom=1in, outer=1in, inner=1.5in]{geometry}
%\setlength{\oddsidemargin}{0.7in} % left margin is 1 in on right pages
%\setlength{\evensidemargin}{0in} % same for left pages, 2-sided document

\newtheorem{theorem}{Theorem}[section]
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conclusion}[theorem]{Conclusion}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{summary}[theorem]{Summary}

%\newenvironment{proof}[1][Proof]{\noindent\textbf{#1: }}{\hspace{\stretch{1}}\rule{0.5em}{0.5em}}

\newcommand\N{\mathfrak{N}}
\newcommand\F{\mathbf{F}}
\newcommand\T{\mathbf{T}}

%\makeindex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\pagenumbering{gobble}% Remove page numbers (and reset to 1)

\thispagestyle{empty} %produces the title page without page number
\newgeometry{top=1.5in, bottom=1in, left=0.75in, right=0.75in}
\doublespacing{\include{Front_Back_Matter/1_Titlepage}}
\restoregeometry

\thispagestyle{empty}
\phantom{a}
\newpage

\thispagestyle{empty}
\include{Front_Back_Matter/2_Dedication}

\thispagestyle{empty}
\phantom{a}
\newpage  %these two lines produces a blank page in the beginning of the thesis.

\thispagestyle{empty}
\include{Front_Back_Matter/3_Declaration}

\thispagestyle{empty}
\phantom{a}
\newpage

\thispagestyle{empty}
\include{Front_Back_Matter/4_Certificate}

\thispagestyle{empty}
\phantom{a}
\newpage

\thispagestyle{empty}
\include{Front_Back_Matter/5_Acknowledgement}

\pagenumbering{roman}
\include{Front_Back_Matter/6_Thesisabsract}

\newpage
\thispagestyle{empty}
\tableofcontents

%\newpage
%\thispagestyle{empty}
%\phantom{a}
%\newpage

\newpage
\listoffigures

\newpage
\listoftables

\newpage
\thispagestyle{empty}
\phantom{a}
\newpage

%\newpage
%%include{Front_Back_Matter/8_Symbols}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\begin{center}
%Department of Mathematical and Computational Sciences, \\National Institute of Technology Karnataka, \\Surathkal, Mangalore-575025
%\\
%{\em E-mail:} smhegde@nitk.ac.in, suresh.dara@gmail.com
%\end{center}
%\maketitle

%\begin{abstract}
%
%\end{abstract}

\newpage
\thispagestyle{empty}
\phantom{a}
\newpage

\pagenumbering{arabic}

%\thispagestyle{empty}
%\include{Front_Back_Matter/chap1}

\include{chap_1_Introduction}

\newpage
\include{chap_2}

\newpage
\include{chap_3}
%
%

\newpage
\include{chap_4}

\newpage
\include{chap_5}

\newpage
\include{chap_6}

\newpage
\bibliographystyle{Bibliography/apa}
\nocite{*}
\bibliography{Bibliography/mydatabase}

\newpage
\include{pub}

\newpage
\include{Front_Back_Matter/My_Biodata}

\end{document}

• For reference, you should read I've just been asked to write a minimal working example (MWE), what is that? We're usually only interested in the detail that replicates the problem... – Werner Jan 31 '20 at 20:37
• Hello! It's not really possible for us to help you because we can't run your code. Please see the link @Werner posted. Sorry, this is off the point, but you might want to pay closer attention to what packages you use. Some of your packages and commands might conflict (like setspace with \renewcommand{\baselinestretch}{1.5}), some you load multiple times, some are redundant (for example mathtools,amssymb,amsthm should suffice for all ams packages), etc. This makes it difficult to de-bug and more likely you run into errors in the first place. – TivV Jan 31 '20 at 22:16