[Tex/LaTex] how to add number to the title of sections and subsection using the titlesec package


I am using the titlesec package but the numbering of section and subsections disappeared. I need to retrieve it. my code is


I need to achive the following specs:
Main headings: Arial, Size 12, Bold, Uppercase, Center Justified.

Sub-headings: Arial, Size 12, Bold, Title case, Left Justified.

Best Answer

You should use \thesection and \thesubsection in the appropriate places; also \MakeUppercase should go in the last argument for \section.

\usepackage{tgtermes,tgheros} % use your preferred ones for the fonts
\usepackage{lipsum} % this is just to produce some text




\section{A section title}


\subsection{A subsection title}



enter image description here