0

I tried to enter a second section to my report along with centering it, but whenever I center it, it end's up with something is missing.

\documentclass[12pt, a4paper]{report}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath, amssymb, amsfonts}
\usepackage{fancyhdr}
\usepackage{hyphenat}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[R]{Enzymatic Synthesis of Emollient Esters}
\fancyfoot[R]{\thepage}
\fancyfoot[L]{Dept. of Chemical Eng., SCOE}
\renewcommand{\headrulewidth}{0pt}
\usepackage{mathptmx}
\usepackage{graphicx}
\usepackage{float}
\parindent 0ex
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1.5}

\begin{document}

\begin{center}
 \section{ \textbf{ INTRODUCTION}}
\end{center}

\begin{center}
\section{LITERATURE STUDY}\
\end{center}

\end{document}
Werner
  • 603,163
RBK
  • 15
  • 4

1 Answers1

1

Simple with titlesec:

\documentclass[12pt, a4paper]{report}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath, amssymb, amsfonts}
\usepackage{fancyhdr}
\usepackage{hyphenat}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[R]{Enzymatic Synthesis of Emollient Esters}
\fancyfoot[R]{\thepage}
\fancyfoot[L]{Dept. of Chemical Eng., SCOE}
\renewcommand{\headrulewidth}{0pt}
\usepackage{mathptmx}
\usepackage{graphicx}
\usepackage{float}
\parindent 0ex
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1.5}
\usepackage[center]{titlesec}
\usepackage{lipsum}

\begin{document}

\chapter{SOME CHAPTER}

\lipsum[1]

 \section{INTRODUCTION}
\lipsum[2-4]
\section{LITERATURE STUDY}
\lipsum[5-7]

\end{document} 

enter image description here

Bernard
  • 271,350
  • thanks that pretty much solved my problem, on the other hand i also tried one more thing, i used the package sectsty, and a command of \sectionfont{\centering}, which solved my problem too – RBK Dec 14 '17 at 18:30
  • @RBK: Both work in this case. If you need to further customise your sections, chapters, &c., titlesec is much more powerful, and it has companion packages, titleps for headers and footers, which is simpler to use than fancyhdr, and titletoc, for table of contents, list of figures or tables, and the like. – Bernard Dec 14 '17 at 19:40