# vertical spaces after equation

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{color}
\usepackage$hmarginratio=2:2${geometry}
\usepackage{epstopdf}
\usepackage{afterpage}
\usepackage{ upgreek }
\usepackage{mathtools}
\begin{document}
The survival function is defined as the probability that an individual survives longer than t. It can be expressed as\\
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}
\begin{align*}
S(t)&=P(T>t)\\
&=1-P(T\leq t)\\
&=1-F(t)
\end{align*}\\

The survival function of the Gompertz distribution is given by,
$$S(t;\gamma;\lambda)=\text{exp}\left$\frac{\lambda}{\gamma}(1-e^{\gamma t})\right$$$\\
The hazard function of survival time is defined as the probability that an individual fails in a very short interval, t + $\Delta$t, given that the individual has survived to t.
$$\frac{\lim_{\Delta t\to 0} P\left$\begin{tabular}{c} an individual fails in the interval (t, t+\Delta t),\\ given the individual has survived to t \end{tabular} \right$} {\Delta t}$$
\end{document}


Can I apply the \abovedisplayskip and \belowdisplayskip to only one equation? I just want to use it for the equation with align but it applies for every equation below it.

• is \\  after align intentional? remove them and not change deliberately defined \abovedisplayskip and \belowdisplayskip amounts. Dec 16 '17 at 12:08
• You are apparently using \onehalfspacing or \doublespacing for producing the image, but don't set them in the example. Dec 16 '17 at 13:40
• Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. May 30 '18 at 8:23

in your document you have many issues, so i doubt that you can compile it:

• \left\[ is wrong, correct is \left[ also similarly for \right] ...
• instead \text{exp} use declared math operators \exp
• \\ after math environments are false, delete them

edit:

• for more space between paragraphs you should change \parskip, for example \setlength\parskip{1\baselineskip}

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\setlength\parskip{1\baselineskip}

\begin{document}
The survival function is defined as the probability that an individual survives longer than t. It can be expressed as
\begin{align*}
S(t)&=P(T>t)\\
&=1-P(T\leq t)\\
&=1-F(t)
\end{align*}

The survival function of the Gompertz distribution is given by,
$$S(t;\gamma;\lambda)=\exp\left[\frac{\lambda}{\gamma}(1-\mathrm{e}^{\gamma t})\right]$$
The hazard function of survival time is defined as the probability that an individual fails in a very short interval, t + $\Delta$t, given that the individual has survived to t.
$$\frac{\lim_{\Delta t\to 0} P \left[ \parbox{0.55\linewidth}{an individual fails in the interval (t, t+\Delta t),\\ given the individual has survived to t} \right] }{\Delta t}$$
\end{document}


note (1): for given example the most of your preamble is unnecessary.

note (2): for starting new paragraph you need to insert empty line before it

is result what you looking for?

• i want to have spaces after an equation like the spaces i did between paragraph. i use \\ between paragraph to get spacing
– yap
Dec 16 '17 at 12:37
• @yap never use \\  at the end of a paragraph. Dec 16 '17 at 12:41
• then how should i get a bigger space after a paragraph?
– yap
Dec 16 '17 at 12:43
• Set a non-zero value for \parskip. Dec 16 '17 at 12:48
• If you want to insert additional vertical space only between some paragraphs and not all of them, simply use either \smallskip (~.25\baselineskip), \medskip (~.5\baselineskip), or \bigskip (\baselineskip), before or after a \par` command (or a blank line), depending on what amount of spacing you want. Caution, these are elastic spaces, so they may vary according to the needs of the typeset page. Dec 16 '17 at 14:07