[Tex/LaTex] vertical spaces after equation

equationsspacing

\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,
    \begin{equation}
    S(t;\gamma;\lambda)=\text{exp}\left\[\frac{\lambda}{\gamma}(1-e^{\gamma t})\right\]
    \end{equation}\\
    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.
    \begin{equation}
    \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{equation}
    \end{document}

can i apply the abovedisplayskip and belowdisplayskip to only one equation? i just want to use it for the equation with "allign"

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.

Best Answer

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,
    \begin{equation}
S(t;\gamma;\lambda)=\exp\left[\frac{\lambda}{\gamma}(1-\mathrm{e}^{\gamma t})\right]
    \end{equation}
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.
    \begin{equation}
\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{equation}
\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

enter image description here

is result what you looking for?

Related Question