\documentclass[12pt] {article}
\usepackage{epsf}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{draftcopy}
\usepackage{palatino}
\usepackage{longtable}
\usepackage{multicol}
\usepackage{cases}
\usepackage{array}
\usepackage{authblk}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{color}
\usepackage[centerlast]{caption2}
\usepackage{rotating}
\usepackage{float}
\usepackage{tikz}
\usepackage[shortlabels]{enumitem}
\usepackage[breakable]{tcolorbox}
\usepackage{tocloft}
\usetikzlibrary{shapes, arrows, positioning}
\def\baselinestretch{2.0}
\setlength{\textwidth}{18cm} \setlength{\textheight}{21cm}
\setlength{\evensidemargin}{-0.15cm}
\def\toright#1{\leavevmode\unskip\nobreak\hfill\penalty13
\null\nobreak\hskip1em plus1fill\hbox{#1}}
\graphicspath{ {images/} }
\setlength{\oddsidemargin}{-0.15cm}
\title{\vspace{-4cm}\textbf{Mathematical Modelling}}
\author{Manjoy Das}
\affil{\textbf{Mail me -}\;XXXX}
\affil{\textbf{Hello me -}\;XXXXXX}
\date{\vspace{-5ex}}
\begin{document}
We know that
\begin{align}
\setcounter{equation}{0}
\sum_{n=0}^N P_n(t)&=1\nonumber\\
\Longrightarrow P_0(t)+\sum_{n=1}^N P_n(t)&=1\nonumber\\
\Longrightarrow P_0(t)=1-\sum_{n=1}^N P_n(t)&=
1-\sum_{n=1}^N\dfrac{(\mu t)^{N-n} e^{-\mu t}}{(N-n)!}
\end{align}
Thus from $(4)$ and $(5)$, we get
\begin{equation*}
P_n(t) =
\begin{cases}
\sum\limits_{n=1}^N\dfrac{(\mu t)^{N-n} e^{-\mu t}}{(N-n)!}, & 1\le n\le N, t\ge 0\\
1-\sum\limits_{n=1}^N\dfrac{(\mu t)^{N-n} e^{-\mu t}}{(N-n)!}, & n=0, t\ge 0
\end{cases}
\end{equation*}
Thus the number of departures in time $t$ follows the Poisson distribution.
\end{document}
这些线为什么重叠呢?
为了消除这些重叠,我需要\\
在\end{align}
和之后放置\end{equation*}
。
我的 MWE:
\documentclass[12pt] {article}
\usepackage{epsf}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{draftcopy}
\usepackage{palatino}
\usepackage{longtable}
\usepackage{multicol}
\usepackage{cases}
\usepackage{array}
\usepackage{authblk}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{color}
\usepackage[centerlast]{caption2}
\usepackage{rotating}
\usepackage{float}
\usepackage{tikz}
\usepackage[shortlabels]{enumitem}
\usepackage[breakable]{tcolorbox}
\usepackage{tocloft}
\usetikzlibrary{shapes, arrows, positioning}
\def\baselinestretch{2.0}
\setlength{\textwidth}{18cm} \setlength{\textheight}{21cm}
\setlength{\evensidemargin}{-0.15cm}
\def\toright#1{\leavevmode\unskip\nobreak\hfill\penalty13
\null\nobreak\hskip1em plus1fill\hbox{#1}}
\graphicspath{ {images/} }
\setlength{\oddsidemargin}{-0.15cm}
\title{\vspace{-4cm}\textbf{Mathematical Modelling}}
\author{Manjoy Das}
\affil{\textbf{Mail me -}\;XXXX}
\affil{\textbf{Hello me -}\;XXXXXX}
\date{\vspace{-5ex}}
\begin{document}
We know that
\begin{align}
\setcounter{equation}{0}
\sum_{n=0}^N P_n(t)&=1\nonumber\\
\Longrightarrow P_0(t)+\sum_{n=1}^N P_n(t)&=1\nonumber\\
\Longrightarrow P_0(t)=1-\sum_{n=1}^N P_n(t)&=
1-\sum_{n=1}^N\dfrac{(\mu t)^{N-n} e^{-\mu t}}{(N-n)!}
\end{align}\\
Thus from $(4)$ and $(5)$, we get
\begin{equation*}
P_n(t) =
\begin{cases}
\sum\limits_{n=1}^N\dfrac{(\mu t)^{N-n} e^{-\mu t}}{(N-n)!}, & 1\le n\le N, t\ge 0\\
1-\sum\limits_{n=1}^N\dfrac{(\mu t)^{N-n} e^{-\mu t}}{(N-n)!}, & n=0, t\ge 0
\end{cases}\vspace{0.5cm}
\end{equation*}\\
Thus the number of departures in time $t$ follows the Poisson distribution.
Thus the number of departures in time $t$ follows the Poisson distribution.
\end{document}
答案1
如果你texdoc amsmath
(可能通过texdoc.net网站),你可以在第 4 页看到
好吧,在或中尾随\\
不会造成任何损害aligned
,但无论如何最好还是遵循上述建议。gathered
alignedat
上面的段落谈到了额外的垂直空间,并没有提到在编号版本中会生成数字align
,gather
并且alignat
;事实上,额外的垂直空间是因为排版了一个空的等式。
\documentclass[12pt] {article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
We know that
\begin{align}
\sum_{n=0}^N P_n(t)&=1\nonumber\\
\Longrightarrow P_0(t)+\sum_{n=1}^N P_n(t)&=1\nonumber\\
\Longrightarrow P_0(t)=1-\sum_{n=1}^N P_n(t)&=
1-\sum_{n=1}^N\dfrac{(\mu t)^{N-n} e^{-\mu t}}{(N-n)!}
\end{align}
Thus from $(4)$ and $(5)$, we get
\begin{equation*}
P_n(t) =
\begin{cases}
\sum\limits_{n=1}^N\dfrac{(\mu t)^{N-n} e^{-\mu t}}{(N-n)!}, & 1\le n\le N, t\ge 0\\[2ex]
1-\sum\limits_{n=1}^N\dfrac{(\mu t)^{N-n} e^{-\mu t}}{(N-n)!}, & n=0, t\ge 0
\end{cases}
\end{equation*}
\end{document}
我将align*
其改为equation*
,因为它是一个单一方程,并在两种情况之间添加了一些垂直空间。
另外,您不应该使用$(4)$
类似的,而应该\eqref
使用您想要引用的方程式的合适的标签。