扫描使用 \substack 时文件结束

扫描使用 \substack 时文件结束

当我将外部 pdf 从默认更改为 Adob​​e Reader 时,一切都很好。之后它再也无法运行,并显示上述错误。令人沮丧

\documentclass[12]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{relsize}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}
\begin{document}
\section{Capacity} \par 
Let $\rho_{P}$ and $\rho_{S}$ be the capacity of PU and SU service respectively. Correspondingly we obtain
$$ \rho_{P} =\sum_{x\epsilon S}(i_{n} + i_{r})\mu_{P}\pi(x)$$\par
$$ \rho_{S} =\sum_{x\epsilon S}(j_{n1} + j_{n2} + j_{r1} + j_{r2})\mu_{S}\pi(x)$$
\section{Channel Availability}
$A_P$ denotes availability of PU service. We obtain
$$ A_{P}=1-\sum_{\substack{x\epsilon S \\B(x)=M \;or\; B_n(x)=M-R(x);\; j_{n1}=j_{n2}=0}}\pi(x)$$ 
Similarly, $A_{S1}$ denotes availability of $SU_{1}$ service. We obtain $$ A_{S1}=1-\sum_{x\epsilon S \\B(x)=M \;or\; B_n(x)=M-R(x);\; j_{n2}=0}\pi(x)$$
Similarly, $A_{S2}$ denotes availability of $SU_{2}$ service. We obtain\\
$$A_{S2}=1-\sum_{\substack{x\epsilon S \\B(x)=M}}\pi(x)$$\par 
Accordingly the blocking probabilities of PU and SU services, denoted as $P^{B}_{P}$ and $P^{B}_{S}$ respectively, are obtained as
$$ P^{B}_{P}=1-A_P$$
$$P^{B}_{S1}=1-A_{S1}$$
$$P^{B}_{S2}=1-A_{S2}$$\par 
The retainability of a service, $\theta$ , is expressed as
$$\theta= 1 - P_F$$\\ 
where $P_F$ is the forced termination probability of that service. \par
Now, denote the rate of forced terminations SUs due to PU arrivals as $R_S$. Then we have
$$ R_{S1}=\lambda_P \sum_{\substack{x\epsilon S \\B(x)=M;\;\; j_{n2}=j_{r2}=0;\;\;  j_{n1}>0}}\pi(x)$$\\
Similarly, the rate of forced termination of $SU_{2}$ due to $PU$ and $SU_1$ arrivals are respectively given as:
$$ R_{S2}=\lambda_P \sum_{\substack{x\epsilon S \\B(x)=M;\;j_{n2}>0$$ and 
$$ R_{S2}=\lambda_S \sum_{\substack{x\epsilon S \\B(x)=M;\;j_{n2}>0$$ \par
\section{Forced Termination on Channel Failure}
In addition, ongoing $SU_1$ services can also be terminated upon a channel failure when all other channels in the CRN are busy. Denote the rate of forced termination of SUs due to channel failure as $R^{'}_{S1}$. It is obtained by 
$$ R^{'}_{S1}=\lambda_F\sum_{x\epsilon S \\B(x)=M\\ ((j_{n1}>0;\;j_{n2}=j_{r2}=0)\; or\; (B_n(x)=0;\;jr_1=0\; jr_1>0))}(M-f)\pi(x).$$
For $SU_2$, we have 
$$ R^{'}_{S2}=\lambda_F \sum_{\substack{x\epsilon S\\ (j_{n2}>0\;or\;\; j_{r1}>0))}}(M-f)\pi(x).$$
\par 
\section{Retainability}
\subsection{Retainability of the SN:}
Since the effective rate in which a new SU service is assigned a channel is $\Lambda_S=A_S\lambda_S$, we have $ P^F_S=(R_S+R^{'}_{S})/\Lambda_S$\\
Correspondingly, the retainability of SU services, $\theta_S$, can be expressed as 
$$ \theta_S=1-\frac{(R_S + R^{'}_{S})}{\Lambda_S}$$
\par 
\subsection{Retainability of the PN:} Similarly, the forced termination probability of PU services due to channel failures, $P^F_P$, can be expressed as 
$$ P^F_P=\frac{(R_P+R^{'}_P)}{\Lambda_P}$$\\
where $R^{'}_P$ and $\Lambda_P$ are given by 
$$R^{'}_P=\lambda_F \quad \sum_{\substack{x\epsilon S \\B(x)=M\\ ((j_{n1}=j_{n2}=j_{r2}=0;\; i_n>0)\; or\; (B_n(x)=j_{r2}=0;\; i_r>0))}} (M - f) \pi(x)$$\\
and $\Lambda_P=A_p\lambda_P$ respectively. Note that $R_P$, which denotes the forced termination rate of PUs due to new user arrivals, always equals zero since none of the ongoing PUs can be terminated due to the arrivals of new users. Therefore, the retainability of PU services, $\theta_P$, is given by 
$$\theta_P=1-\frac{R^{'}_P}{\Lambda_P}$$
\par 
\section{NUP}
Accordingly, the NUP for SU services, $Q_S$, can be defined as the probability that an SU service cannot be completed successfully. It is obtained by calculating the ratio between the rate of service completions and the rate of arrivals as follows:\par  
\begin{eqnarray*}
Q_S&=& \text{1 - (prob. of successfully finishing an SU service)}\\
&=&1 - \frac{\lambda_S(1 - P^B_S)(1-P^F_S)}{\lambda_S}\\
&=&P^B_S + P^F_S - P^B_S P^F_S\\
Q_S&=&P^B_S + P^F_S - P^B_S P^F_S
\end{eqnarray*}
Similarly, the NUP for PUs, $Q_P$ can be derived as follows.
$$Q_P=P^B_P + P^F_P - P^B_PP^F_P$$
\end{document}

答案1

主要问题是缺少一些括号:应该是

\sum_{\substack{<row>\\<row>\\...\\<row>}}

最后加上括号!

这也是完善代码的好时机。

  1. 该选项12应该是12pt

  2. 很少(如果有的话)需要\par在文档正文中使用;请改用空行

  3. 切勿$$在 LaTeX 中使用;对于单个方程式,\[...\]请改用

  4. gather*连续居中方程应作为单一环境输入

  5. “属于”的符号是\in,不是\epsilon

  6. 不要\\在数学显示后添加

  7. 从来不用eqnarray,更喜欢align

  8. R^{'}应该只是R'

  9. 而不是\;or\;你应该使用\text{ or }

您应该尝试使\substacks 更紧凑,因为如果太长,公式就会难以阅读。

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{relsize}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}

\begin{document}

\section{Capacity}

Let $\rho_{P}$ and $\rho_{S}$ be the capacity of PU and SU service 
respectively. Correspondingly we obtain
\begin{gather*}
\rho_{P} =\sum_{x\in S}(i_{n} + i_{r})\mu_{P}\pi(x)
\\
\rho_{S} =\sum_{x\in S}(j_{n1} + j_{n2} + j_{r1} + j_{r2})\mu_{S}\pi(x)
\end{gather*}

\section{Channel Availability}

$A_P$ denotes availability of PU service. We obtain
\[
A_{P}=
1-\sum_{\substack{x\in S \\ B(x)=M\text{ or }B_n(x)=M-R(x);\\ j_{n1}=j_{n2}=0}}\pi(x)
\]
Similarly, $A_{S1}$ denotes availability of $SU_{1}$ service. 
We obtain
\[
A_{S1}=1-\sum_{\substack{x\in S \\ B(x)=M\text{ or }B_n(x)=M-R(x);\\ j_{n2}=0}}\pi(x)
\]
Similarly, $A_{S2}$ denotes availability of $SU_{2}$ service. We obtain
\[
A_{S2}=1-\sum_{\substack{x\in S \\ B(x)=M}}\pi(x)
\]

Accordingly the blocking probabilities of PU and SU services, 
denoted as $P^{B}_{P}$ and $P^{B}_{S}$ respectively, are obtained as
\begin{gather*}
P^{B}_{P}=1-A_P
\\
P^{B}_{S1}=1-A_{S1}
\\
P^{B}_{S2}=1-A_{S2}
\end{gather*}
The retainability of a service, $\theta$ , is expressed as
\[
\theta= 1 - P_F
\]
where $P_F$ is the forced termination probability of that service.

Now, denote the rate of forced terminations SUs due to PU arrivals 
as $R_S$. Then we have
\[
R_{S1}=
\lambda_P \sum_{\substack{x\in S \\ B(x)=M;\\ j_{n2}=j_{r2}=0;\\  j_{n1}>0}}\pi(x)
\]
Similarly, the rate of forced termination of $SU_{2}$ due to $PU$ 
and $SU_1$ arrivals are respectively given as:
\[
R_{S2}=\lambda_P \sum_{\substack{x\in S \\B(x)=M;\\ j_{n2}>0}}\pi(x)
\]
and 
\[
R_{S2}=\lambda_S \sum_{\substack{x\in S \\B(x)=M;\\ j_{n2}>0}}\pi(x)
\]

\section{Forced Termination on Channel Failure}

In addition, ongoing $SU_1$ services can also be terminated upon a 
channel failure when all other channels in the CRN are busy. Denote 
the rate of forced termination of SUs due to channel failure as 
$R'_{S1}$. It is obtained by 
\[
R'_{S1}=\lambda_F\sum_{\substack{x\in S \\B(x)=M\\ ((j_{n1}>0;\; j_{n2}=j_{r2}=0)\;
\text{ or }\; (B_n(x)=0;\;jr_1=0\; jr_1>0))}}(M-f)\pi(x).
\]
For $SU_2$, we have 
\[
R'_{S2}=\lambda_F \sum_{\substack{x\in S\\ (j_{n2}>0\text{ or }j_{r1}>0))}}
  (M-f)\pi(x).
\]

\section{Retainability}

\subsection{Retainability of the SN:}

Since the effective rate in which a new SU service is assigned a channel 
is $\Lambda_S=A_S\lambda_S$, we have $ P^F_S=(R_S+R'_{S})/\Lambda_S$.

Correspondingly, the retainability of SU services, $\theta_S$, can be expressed as 
\[
theta_S=1-\frac{(R_S + R'_{S})}{\Lambda_S}
\]

\subsection{Retainability of the PN:} 

Similarly, the forced termination probability of PU services due to 
channel failures, $P^F_P$, can be expressed as 
\[
P^F_P=\frac{(R_P+R'_P)}{\Lambda_P}
\]
where $R'_P$ and $\Lambda_P$ are given by 
\[
R'_P=\lambda_F \sum_{\substack{x\in S \\B(x)=M\\ 
  ((j_{n1}=j_{n2}=j_{r2}=0;\; i_n>0)\text{ or }(B_n(x)=j_{r2}=0;\; i_r>0))}} 
(M - f) \pi(x)
\]
and $\Lambda_P=A_p\lambda_P$ respectively. Note that $R_P$, which denotes 
the forced termination rate of PUs due to new user arrivals, always equals 
zero since none of the ongoing PUs can be terminated due to the arrivals 
of new users. Therefore, the retainability of PU services, $\theta_P$, 
is given by 
\[
\theta_P=1-\frac{R'_P}{\Lambda_P}
\]

\section{NUP}

Accordingly, the NUP for SU services, $Q_S$, can be defined as the 
probability that an SU service cannot be completed successfully. 
It is obtained by calculating the ratio between the rate of service 
completions and the rate of arrivals as follows:
\begin{align*}
Q_S &= 1- \text{(prob. of successfully finishing an SU service)}\\
    &= 1 - \frac{\lambda_S(1 - P^B_S)(1-P^F_S)}{\lambda_S}\\
    &= P^B_S + P^F_S - P^B_S P^F_S\\
Q_S &= P^B_S + P^F_S - P^B_S P^F_S
\end{align*}
Similarly, the NUP for PUs, $Q_P$ can be derived as follows:
\[
Q_P=P^B_P + P^F_P - P^B_PP^F_P
\]

\end{document}

答案2

缺少四个括号。请尝试编译以下更正后的代码。

\documentclass[12]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{relsize}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}
\begin{document}
\section{Capacity} \par 
Let $\rho_{P}$ and $\rho_{S}$ be the capacity of PU and SU service respectively. Correspondingly we obtain
$$ \rho_{P} =\sum_{x\epsilon S}(i_{n} + i_{r})\mu_{P}\pi(x)$$\par
$$ \rho_{S} =\sum_{x\epsilon S}(j_{n1} + j_{n2} + j_{r1} + j_{r2})\mu_{S}\pi(x)$$
\section{Channel Availability}
$A_P$ denotes availability of PU service. We obtain
$$ A_{P}=1-\sum_{\substack{x\epsilon S \\B(x)=M \;or\; B_n(x)=M-R(x);\; j_{n1}=j_{n2}=0}}\pi(x)$$ 
Similarly, $A_{S1}$ denotes availability of $SU_{1}$ service. We obtain $$ A_{S1}=1-\sum_{x\epsilon S \\B(x)=M \;or\; B_n(x)=M-R(x);\; j_{n2}=0}\pi(x)$$
Similarly, $A_{S2}$ denotes availability of $SU_{2}$ service. We obtain\\
$$A_{S2}=1-\sum_{\substack{x\epsilon S \\B(x)=M}}\pi(x)$$\par 
Accordingly the blocking probabilities of PU and SU services, denoted as $P^{B}_{P}$ and $P^{B}_{S}$ respectively, are obtained as
$$ P^{B}_{P}=1-A_P$$
$$P^{B}_{S1}=1-A_{S1}$$
$$P^{B}_{S2}=1-A_{S2}$$\par 
The retainability of a service, $\theta$ , is expressed as
$$\theta= 1 - P_F$$\\ 
where $P_F$ is the forced termination probability of that service. \par
Now, denote the rate of forced terminations SUs due to PU arrivals as $R_S$. Then we have
$$ R_{S1}=\lambda_P \sum_{\substack{x\epsilon S \\B(x)=M;\;\; j_{n2}=j_{r2}=0;\;\;  j_{n1}>0}}\pi(x)$$\\
Similarly, the rate of forced termination of $SU_{2}$ due to $PU$ and $SU_1$ arrivals are respectively given as:
\textcolor{red}{\bfseries{}There are two "\}" missing in the index of the sum}
$$ R_{S2}=\lambda_P \sum_{\substack{x\epsilon S \\B(x)=M}};\;j_{n2}>0$$ and 
$$ R_{S2}=\lambda_S \sum_{\substack{x\epsilon S \\B(x)=M}};\;j_{n2}>0$$ \par
\section{Forced Termination on Channel Failure}
In addition, ongoing $SU_1$ services can also be terminated upon a channel failure when all other channels in the CRN are busy. Denote the rate of forced termination of SUs due to channel failure as $R^{'}_{S1}$. It is obtained by 
$$ R^{'}_{S1}=\lambda_F\sum_{x\epsilon S \\B(x)=M\\ ((j_{n1}>0;\;j_{n2}=j_{r2}=0)\; or\; (B_n(x)=0;\;jr_1=0\; jr_1>0))}(M-f)\pi(x).$$
For $SU_2$, we have 
$$ R^{'}_{S2}=\lambda_F \sum_{\substack{x\epsilon S\\ (j_{n2}>0\;or\;\; j_{r1}>0))}}(M-f)\pi(x).$$
\par 
\section{Retainability}
\subsection{Retainability of the SN:}
Since the effective rate in which a new SU service is assigned a channel is $\Lambda_S=A_S\lambda_S$, we have $ P^F_S=(R_S+R^{'}_{S})/\Lambda_S$\\
Correspondingly, the retainability of SU services, $\theta_S$, can be expressed as 
$$ \theta_S=1-\frac{(R_S + R^{'}_{S})}{\Lambda_S}$$
\par 
\subsection{Retainability of the PN:} Similarly, the forced termination probability of PU services due to channel failures, $P^F_P$, can be expressed as 
$$ P^F_P=\frac{(R_P+R^{'}_P)}{\Lambda_P}$$\\
where $R^{'}_P$ and $\Lambda_P$ are given by 
$$R^{'}_P=\lambda_F \quad \sum_{\substack{x\epsilon S \\B(x)=M\\ ((j_{n1}=j_{n2}=j_{r2}=0;\; i_n>0)\; or\; (B_n(x)=j_{r2}=0;\; i_r>0))}} (M - f) \pi(x)$$\\
and $\Lambda_P=A_p\lambda_P$ respectively. Note that $R_P$, which denotes the forced termination rate of PUs due to new user arrivals, always equals zero since none of the ongoing PUs can be terminated due to the arrivals of new users. Therefore, the retainability of PU services, $\theta_P$, is given by 
$$\theta_P=1-\frac{R^{'}_P}{\Lambda_P}$$
\par 
\section{NUP}
Accordingly, the NUP for SU services, $Q_S$, can be defined as the probability that an SU service cannot be completed successfully. It is obtained by calculating the ratio between the rate of service completions and the rate of arrivals as follows:\par  
\begin{eqnarray*}
Q_S&=& \text{1 - (prob. of successfully finishing an SU service)}\\
&=&1 - \frac{\lambda_S(1 - P^B_S)(1-P^F_S)}{\lambda_S}\\
&=&P^B_S + P^F_S - P^B_S P^F_S\\
Q_S&=&P^B_S + P^F_S - P^B_S P^F_S
\end{eqnarray*}
Similarly, the NUP for PUs, $Q_P$ can be derived as follows.
$$Q_P=P^B_P + P^F_P - P^B_PP^F_P$$
\end{document}

您将看到一条用红色打印的注释,显示相关位置。您可以删除这些标记。各种编辑器都具有语法高亮功能(https://en.wikipedia.org/wiki/Syntax_highlighting)其中一些可以帮助你更轻松地找到缺失的括号,请参见LaTeX 编辑器/IDE或者https://en.wikipedia.org/wiki/Comparison_of_TeX_editors

请参见为什么 \[ ... \] 比 $$ ... $$ 更可取?$$、\[、align、equation 和 displaymath 之间有什么区别?。 视频https://youtu.be/LFrdqQZ8FFc也可能有帮助。

我不知道这与Adobe Reader

相关内容