[Tex/LaTex] Changing section heading style

formattingsectioning

I would like to change the section/subsection style of my LaTeX document. The following is an example of what I would like:

3. Methodology and data: An explanation (Level 1. 12 font. In bold. Period after number.)

3.1. Empirical methods (Level 2. Subheading in italics NOT bold. Font size same as level 1. Periods after numbers.)

3.1.1. Testing vectors (Level 3. Subsubheading in italics NOT bold. Font size same as level 1. Periods after numbers.)

Similarly, the above section/subsection style should continue on for all subheadings.

I would like only the above changes to be applied to my entire document. I want all other section/subsection settings to remain as default (i.e, flushed left etc). Cross referencing should also remain as the default, e.g., 3.1.1. should be cross referenced as "3.1.1" (no italics and no period after the last number).

My MWE is currently:

\documentclass[twoside, a4paper, 12pt]{article}
\usepackage{ragged2e}
\usepackage{booktabs,tabularx}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{verbatim}
\usepackage{amsmath, amssymb}
\usepackage{natbib}
\usepackage{tikz}
\usepackage{enumerate}
\usetikzlibrary{matrix, arrows}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{listings}
\usepackage{color}
\usepackage{float}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage{lscape}
\usepackage{cases}
\usepackage{multirow}
\usepackage[figuresright]{rotating}
\usepackage{setspace}
\usepackage{lscape}
\usepackage{longtable}
\usepackage{caption}
\usepackage{pslatex}
\usepackage[update,prepend]{epstopdf}
\usepackage[pdftex,colorlinks,linkcolor=black,citecolor=black]{hyperref}
\usepackage[official]{eurosym}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}

\linespread{2}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}


\begin{document}




\bibliographystyle{apa-good}
\bibliography{bibliography}
\end{document}

Best Answer

titlesec is able to do what you need:

\documentclass[12pt]{article}
\usepackage{titlesec}
\titleformat{\section}
  {\normalfont\normalsize\bfseries}{\thesection.}{1em}{}
\titleformat{\subsection}
  {\normalfont\normalsize\itshape}{\thesubsection.}{1em}{}
\titleformat{\subsubsection}
  {\normalfont\normalsize\itshape}{\thesubsubsection.}{1em}{}
\begin{document}
\section{Test}
\subsection{Test Test}
\subsubsection{Test Test Test}
\end{document}

Note: As your document will be in 12pt, I used \normalsize to get the sectioning headings to 12pt.