[Tex/LaTex] Setting spaces (with titlespacing) and fonts

line-spacing

I am struggling with the spaces and font.
Firstly, how can I set the spaces like below? (All paragraphs will be have 1.5 line spacing too)
Secondly, how can I set all fonts as Times New Roman and 12pt?

Sample

1. CHAPTER

(1.5 line spacing)

1.1. Section

(1.5 line spacing)

Paragraph

(2 line spacing)

1.2. Section

(1.5 line spacing)

Paragraph

(2 line spacing)

1.2.1. Subsection

(1.5 line spacing)

Paragraph

(2 line spacing)

1.2.1.1. Subsubsection

(1.5 line spacing)

Paragraph

(2 line spacing)

Thank you.

\documentclass[12pt]{report} 
\usepackage[hidelinks]{hyperref}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[turkish,english,shorthands=:!]{babel}
\usepackage{apacite}
\usepackage[a4paper,left=30mm,top=30mm,right=25mm,bottom=25mm]{geometry}
\usepackage{epigraph}
\usepackage{graphicx}
\usepackage{float}
\usepackage{mathptmx} 
\usepackage[titletoc,title]{appendix}
\usepackage{afterpage}
\usepackage[doublespacing]{setspace}
\usepackage{tocloft}
\usepackage{url}
\usepackage{indentfirst}
\usepackage{tikz}               
\usetikzlibrary{positioning}    
\usepackage{longtable} 
\usepackage{tabularx} 
\usepackage{lipsum} 
\usepackage[nottoc,numbib]{tocbibind}  





%****************************************
% CHAPTERS
% Chapter titles
\usepackage{titlesec}

% Remove (Chapter X).
\titleformat{\chapter}[display]
  {\normalfont\bfseries}{}{0pt}{\Large}

% Spaces
\titlespacing*{\chapter}{1cm}{0cm}{0cm}
\titleformat{\chapter}[block]{\bfseries\fontsize{12pt}{12pt}}{\thechapter.}{1em}{\normalsize}

\titlespacing*{\section}{1cm}{0cm}{0cm}
\titleformat{\section}[hang]{\bfseries\fontsize{12pt}{12pt}}{\thesection.}{1em}{\normalsize}

\titlespacing*{\subsection}{1cm}{0cm}{0cm}
\titleformat{\subsection}[hang]{\bfseries\fontsize{12pt}{12pt}}{\thesubsection.}{1em}{\normalsize}

\titlespacing*{\subsubsection}{1cm}{0cm}{0cm}
\titleformat{\subsubsection}[hang]{\bfseries\fontsize{12pt}{12pt}}{\thesubsubsection.}{1em}{\normalsize}


% BEGIN
\begin{document}

\pagenumbering{gobble}
\pagenumbering{arabic}


\setlength{\parindent}{1cm} %Paragraph intend


% Chapter 1
\chapter{CHAPTER}
\lipsum[3-4]
\section{Section}
\lipsum[3-4]
\section{Section}
\lipsum[1-2]
\subsection{Subsection}
\lipsum[1-2]
%........................................

\end{document}

Best Answer

Part 1: 1.5 line spacing

Depending on what exactly you mean by 1.5 line spacing, there are different solutions. Don’t use \usepackage[doublespacing]{setspace}.

  1. If you want 12pt text on a 1.5*12 = 18pt leading, then you can use

    \usepackage[onehalfspacing]{setspace}
    

    or even better

    \usepackage[onehalfspacing,nodisplayskipstretch]{setspace}
    
  2. If you want the line spacing to be 1.5 times that of the single line spacing, then you can use

    \usepackage[nodisplayskipstretch]{setspace}
    \setstretch{1.5}
    
  3. If you want your line-spacing calculation to be based on that of Microsoft Word, then you should know that in MS Word “single line spacing” depends on the typeface/font.

    For Times New Roman, the single line spacing is 2048 units of text on 2355 units of leading. In TeX, a 12pt report has 12pt text on 14.5pt leading.

    So, in order to achieve 1.5 line spacing as MS Word, you need a stretch value of (1.5*2355/2048)/(14.5/12) = 1.427465:

    \usepackage[nodisplayskipstretch]{setspace}
    \setstretch{1.427465}
    

Part 2: Times New Roman typeface

Use TeX Gyre Termes, a Times New Roman clone:

% https://ctan.org/pkg/newtx
\usepackage{newtxtext}
\usepackage{newtxmath}

If you do so, then don’t use \usepackage{mathptmx}.

Added: Let me know if you know which one is TeX Gyre Termes and which one is Times New Roman.

TeX Gyre Termes vs Times New Roman

Again, if your goal is to mimic MS Word, then you need to slightly scale up the typeface as well as the line spacing stretch by a factor of 72.27/72 = 1.00375. This is because TeX’s 1pt is 1/72.27 inches, while MS Word’s 1pt is 1/72 inches.

\documentclass[12pt]{report}
\usepackage[scaled=1.00375]{newtxtext}
\usepackage[scaled=1.00375]{newtxmath}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.432818}% <-- 1.00375*1.427465
...
\usepackage[hidelinks]{hyperref}% <-- Load hyperref last
...
\begin{document}
...
\end{document}

Additional notes: You generally want your \usepackage[hidelinks]{hyperref} to be the last package loading in your preamble. And since hyperref is loaded, you don’t need \usepackage{url} any more.

Part 3: Modify the vertical spaces and put them together

Added: Please at least read Section 9.2 of the titlesec manual. Your code is not suitable for your desired format.

To modify the vertical space around headings in a consistent way, I propose to create a macro \myvspace two macros \myonehalfvspace and \mytwovspace. Depending on what exactly you mean by 1.5 line spacing, the value you put in \newcommand*{\myonehalfvspace}{...} can be any one of 18pt, 21.75pt, 20.698242pt or 20.775861pt. Same goes for \mytwovspace.

\documentclass[12pt]{report}
% Page settings
\usepackage[
    tmargin=4cm,% top margin, your ``4cm'' request
    %bmargin=?,% bottom margin
    %lmargin=?,% left margin
    %rmargin=?% right margin
  ]{geometry}
% Font and line spacing settings
\usepackage[scaled=1.00375]{newtxtext}
\usepackage[scaled=1.00375]{newtxmath}
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.432818}% <-- 1.00375*1.427465
% Customize headings
\usepackage{titlesec}
\newcommand*{\myonehalfvspace}{20.775861pt}% <-- Define a macro \myonehalfvspace
\newcommand*{\mytwovspace}{27.701147pt}% <-- Define a macro \mytwovspace
% Chapter heading
\titleformat{\chapter}
  {\normalfont\normalsize\bfseries}{\thechapter.}{1em}{}
\titlespacing{\chapter}{1cm}{\myonehalfvspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Section heading
\titleformat{\section}
  {\normalfont\normalsize\bfseries}{\thesection.}{.5em}{}
\titlespacing{\section}{1cm}{\mytwovspace plus 4pt minus 2pt}{\myonehalfvspace plus 2pt minus 2pt}
% Paragraph indent
\setlength{\parindent}{1cm}
% Dummy text
\usepackage{lipsum}

\begin{document}
\chapter{CHAPTER}
\section{Section}
\lipsum[4]
\section{Section}
\lipsum[4]
\end{document}

Output

result

Do you really want your headings to be at the same size? Note where 4cm and 1cm appear in the code.