# Parskip messes up vertical spaces

Because of a previous question of mine regarding how can someone typeset a mathematical document I understood that the best way is to make every customization globally. Having tried it I think that this is indeed the best way. But I have a problem with parskip package. When I try to change the vertical space between the paragraphs automatically also changes the vertical space between the hline and the paragraph below it (under sections, subsections etc I use \hline to separate the title from the text below it) and also the space between the items in an itemize environment. I have not yet tried it extensively so I can only guess that there would be more undesirable side-effects. I have found a lot of similar questions regarding environments like itemize but not how to prevent parskip mess up every other vertical space. How can I make the changes in parskip not to affect other spaces rather than the space between two paragraphs?

\documentclass[12pt]{article}

\usepackage
[
top=0.7in,
bottom=1.2in,
left=0.8in,
right=0.8in
]{geometry}

%=================================================
%=================================================

\usepackage{parskip}

\setlength{\parindent}{0cm}

%=================================================
%=================================================

\usepackage[fleqn]{amsmath}

\usepackage{unicode-math}

%=================================================
%=================================================

\usepackage{fontspec}

\usepackage[english,greek]{babel}

\setmainfont
[
Ligatures=TeX,
Extension=.otf,
UprightFont=*,
BoldFont=*Bold,
ItalicFont=*It,
BoldItalicFont=*BoldIt,
Mapping=tex-text
]{GFSArtemisia}

\setsansfont[Mapping=tex-text]{GFSArtemisia.otf}

%Math fonts

\setmathfont{latinmodern-math.otf}
\setmathfont[range=\varnothing]{Asana-Math.otf}
\setmathfont[range=\int]{latinmodern-math.otf}

\newcommand{\srr}
{
\hrule

\vspace{1cm}
}

\begin{document}

\section{Θεωρία Συνόλων}

\srr

Για τις πράξεις ανάμεσα σε ενδεχόμενα ισχύουν:

\begin{itemize}
\item η αντιμεταθετική
\item η προσεταιριστική
\item η επιμεριστική
\end{itemize}

Θεωρούμε ότι έχουμε $n$ ενδεχόμενα.

Η ένωση τους είναι ένα ενδεχόμενο που εμφανίζεται όταν εμφανιστεί τουλάχιστον ένα από αυτά.

Η τομή τους είναι ένα ενδεχόμενο που εμφανίζεται όταν εμφανιστούν όλα μαζί.

Ασυμβίβαστα ανά δύο ονομάζονται $n$ ενδεχόμενα όταν η εμφάνιση του ενός αποκλείει την εμφάνιση οποιουδήποτε άλλου:
$$A_{i}\cap A_{j}=\varnothing$$

\subsection{Κανόνες De Morgan}

\srr

Οι κανόνες De Morgan είναι:
\begin{align}
(A\cup B)'&=A'\cap B'\\
(A\cap B)'&=A'\cup B'
\end{align}

\end{document}

• Don't put spaces between paragraphs. It's bad for your health and sometimes typography (always). – percusse Oct 21 '14 at 20:35
• And don't say \everymath{\displaystyle}. I'll tell you this every time I'll see the wrong instruction. – egreg Oct 21 '14 at 20:38
• @egreg I am sorry and I know that I have been warned against it far too many times but I just like it. I may in the future abolish it and I am sure that I will if I write something to be published but now these are just personal notes. Also because I mostly write notes I need spaces between paragraphs and these can only be achieved "correctly" by parskip. – Adam Oct 21 '14 at 20:45
• remove all the \srr and (if you want underlined section titles) redefine the section format to put them in (while compensating for any positive value of \parskip) secsty package can help with section heading formatting. – David Carlisle Oct 21 '14 at 21:19
• and don't say \everymath{\displaystyle} you'll upset @egreg and hurt the eyes of any readers of the document:-) – David Carlisle Oct 21 '14 at 21:21

Just like spacing and font choices, the design of an underlined section head is part of the document design so should be in the definition of \section not added by hand in each section of the document.

\documentclass[12pt]{article}

\usepackage
[
top=0.7in,
bottom=1.2in,
left=0.8in,
right=0.8in
]{geometry}

%=================================================
%=================================================

\usepackage{parskip}

\setlength{\parindent}{0cm}

\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries\zzline}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\large\bfseries\zzline}}

\newcommand\zzline[1]{%
#1\par\hrule}
\makeatother

%=================================================
%=================================================

\usepackage[fleqn]{amsmath}

\usepackage{unicode-math}

%=================================================
%=================================================

\usepackage{fontspec}

\usepackage[english,greek]{babel}

\setmainfont
[
Ligatures=TeX,
Extension=.otf,
UprightFont=*,
BoldFont=*Bold,
ItalicFont=*It,
BoldItalicFont=*BoldIt,
Mapping=tex-text
]{GFSArtemisia}

\setsansfont[Mapping=tex-text]{GFSArtemisia.otf}

%Math fonts

\setmathfont{latinmodern-math.otf}
\setmathfont[range=\varnothing]{Asana-Math.otf}
\setmathfont[range=\int]{latinmodern-math.otf}

\begin{document}

\section{Θεωρία Συνόλων}

Για τις πράξεις ανάμεσα σε ενδεχόμενα ισχύουν:

\begin{itemize}
\item η αντιμεταθετική
\item η προσεταιριστική
\item η επιμεριστική
\end{itemize}

Θεωρούμε ότι έχουμε $n$ ενδεχόμενα.

Η ένωση τους είναι ένα ενδεχόμενο που εμφανίζεται όταν εμφανιστεί τουλάχιστον ένα από αυτά.

Η τομή τους είναι ένα ενδεχόμενο που εμφανίζεται όταν εμφανιστούν όλα μαζί.

Ασυμβίβαστα ανά δύο ονομάζονται $n$ ενδεχόμενα όταν η εμφάνιση του ενός αποκλείει την εμφάνιση οποιουδήποτε άλλου:
$$A_{i}\cap A_{j}=\varnothing$$

\subsection{Κανόνες De Morgan}

Οι κανόνες De Morgan είναι:
\begin{align}
(A\cup B)'&=A'\cap B'\\
(A\cap B)'&=A'\cup B'
\end{align}

\end{document}

• Thank you very much I already used your code but that doesn't address the problem that I state with my question regarding the spaces under the lines or inside environments etc. :) – Adam Oct 21 '14 at 21:54
• well it allows you to control the space under the lines which is the 1.5ex.. you can reduce that to compensate for parskip if that's what you want. look at texdoc parskip you'll see it admits that it only changes so much (less than I remembered perhaps) and correctly points out that a more complete approach is to design the class from scratch with separated paragraphs in mind, either the ntg classes or koma (ntg is closer to article so is usually a simple change from article to artikel3 koma's classes are more extensive but also offer this functionality as mentioned in comments – David Carlisle Oct 21 '14 at 22:02
• Why parskip changes everything? Isn't it used only to change the space between paragraphs? I mean ok someone can say that the space between lines and text is covered by the definition of parskip but the space between items is completely irrelevant! I can only guess that this will also mess up the space between tables, images and so on... – Adam Oct 21 '14 at 22:08
• @Adam almost everything is a paragraph internally – David Carlisle Oct 21 '14 at 22:21
• @Adam try artikel3 instead of article, or if it's just notes and you want it spaced out use article increase \parskip and just let the spaces increase, really anything is better than putting \vspace everywhere, it makes that tex code basically unusable for anything other than that one use. – David Carlisle Oct 21 '14 at 22:36