0
\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.

3
3

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?

8
  • 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
  • 2
    @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
  • 1
    Set a non-zero value for \parskip.
    – Bernard
    Dec 16 '17 at 12:48
  • 3
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.