I am trying to remove the space between the elements that I show in the following image. The space I talk about is denoted by the gray line (that line is not produced by LaTeX, it is merely a way to visualize the space in question)
To be more exact the spaces I want to reduce are:
Space between sections and subsections
Space between sections/subsections and text/images/math
Space between text images and math
How can I do that?
I have tried to use the followings but they didn't give me a good result and a good way to handle the spaces with precision.
\usepackage{titlesec}
\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
MWE
\documentclass{article}
\usepackage
[
top = 0.2in,
bottom = 0.2in,
left = 0.2in,
right = 0.2in,
]{geometry}
\usepackage[fontsize=8pt]{scrextend}
\usepackage{amsmath}
\usepackage{unicode-math}
\usepackage{parskip}
\setlength{\parindent}{0cm}
\usepackage{multicol}
\begin{document}
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\columnseprule=0.8pt
\begin{multicols*}{4}
\section*{Section Title 1}
\subsection*{Subsection Title 1}
Text here
\subsection*{Subsection Title 2}
%
\begin{align*}
&x+y=1\\
&x+z=2
\end{align*}
\subsection*{Subsection Title 3}
\includegraphics[width=\columnwidth]{1.png}
%
\begin{equation*}
x+y=1
\end{equation*}
\includegraphics[width=\columnwidth]{2.png}
\subsection*{Subsection Title 4}
\includegraphics[width=\columnwidth]{1.png}
%
\begin{equation*}
x+y=1
\end{equation*}
\end{multicols*}
\end{document}

\baselineskip,\lineskiplimit,\lineskip. Nothing more is needed. LaTeX (unfortunately) makes things more complicated. – wipet Apr 13 '16 at 20:2512pt plus 4pt minus 2ptis 'rubber': you are asking for 12pt plus 4pts worth of possible stretch and up to 2pts worth of 'shrink'.12ptby itself would not stretch or shrink. – jon Apr 13 '16 at 20:28\begin{document}insert the line \showthe\parskipand see what it says (it will report on your screen, and halt the job temporarily). then add\setlength{\parskip}{0pt}` and try again; see if there's any difference. that's only part of the story, but it does play a part. – barbara beeton Apr 13 '16 at 20:28\parskip. – barbara beeton Apr 13 '16 at 20:37\titlespacingdoesn't define the vertical spacing before and after a section title, but what is added to the normal\baselineskip. – Bernard Apr 13 '16 at 20:45