我尝试在multline
环境中写出以下等式的分隔符,但最右边的分隔符未显示在输出中。
\documentclass[a4paper,fleqn]{cas-dc}
\usepackage{float}
\hyphenation{multiplicative-multiple} \usepackage{amsmath}
\usepackage [numbers] {natbib}
\begin{document}
\begin{multline}
|E(A,M,Q)|\approx \frac{e^{-A}}{1-e^{-A}}+\left|\frac{2^{-Q}e^{A/2}}{\frac{\gamma_{th}}{\eta^2\bar{\gamma}}} \sum_{q=0}^{Q}(-1)^{M+1+q}\times\\
\binom{Q}{q}\mathcal{R}\Biggl(\frac{\mathcal{M}_C\Bigl(-\frac{A+j2\pi (M+q+1)}{2\frac{\gamma_{th}}{\eta^2\bar{\gamma}}}\Bigr)}{\frac{A+j2\pi (M+q+1)}{2\frac{\gamma_{th}}{\eta^2\bar{\gamma}}}}\Biggr)\right|
\end{multline}
\end{document}
任何在这方面提供的帮助都将受到高度赞赏。
答案1
片段代码的第一个版本运行良好,但结果却很难看:
\documentclass[a4paper,fleqn]{cas-dc}
\usepackage{amsmath}
\usepackage[numbers]{natbib}
%---------------- Show page layout. Don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
\begin{multline}
|E(A,M,Q)|\approx \frac{e^{-A}}{1-e^{-A}}+\Bigg|\frac{2^{-Q}e^{A/2}}{\frac{\gamma_{th}}{\eta^2\bar{\gamma}}} \sum_{q=0}^{Q}(-1)^{M+1+q}\times\\
\binom{Q}{q}\mathcal{R}\Biggl(\frac{\mathcal{M}_C\Bigl(-\frac{A+j2\pi (M+q+1)}{2\frac{\gamma_{th}}{\eta^2\bar{\gamma}}}\Bigr)}{\frac{A+j2\pi (M+q+1)}{2\frac{\gamma_{th}}{\eta^2\bar{\gamma}}}}\Biggr)\Biggr|
\end{multline}
\end{document}
(红线表示页面布局的一部分)。
编辑 MWE 后,当您\left|
在第一行和第二行插入方程式时\right|
,会出现错误。它们必须在同一行中关闭或打开。例如:
\documentclass[a4paper,fleqn]{cas-dc}
\usepackage{amsmath}
\usepackage[numbers]{natbib}
%---------------- Show page layout. Don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
\begin{multline}
|E(A,M,Q)|\approx \frac{e^{-A}}{1-e^{-A}}+\left|\frac{2^{-Q}e^{A/2}}{\frac{\gamma_{th}}{\eta^2\bar{\gamma}}} \sum_{q=0}^{Q}(-1)^{M+1+q}\right.\times\\
\left.\binom{Q}{q}\mathcal{R}\Biggl(\frac{\mathcal{M}_C\Bigl(-\frac{A+j2\pi (M+q+1)}{2\frac{\gamma_{th}}{\eta^2\bar{\gamma}}}\Bigr)}{\frac{A+j2\pi (M+q+1)}{2\frac{\gamma_{th}}{\eta^2\bar{\gamma}}}}\Biggr)\right|
\end{multline}
\end{document}
结果仍然很糟糕:
从这两个结果可以看出,你可以在一行中写出你的方程式:
\documentclass[a4paper,fleqn]{cas-dc}
\usepackage{amsmath}
\usepackage[numbers]{natbib}
%---------------- Show page layout. Don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
\begin{equation}
|E(A,M,Q)|\approx \frac{e^{-A}}{1-e^{-A}}+\left|\frac{2^{-Q}e^{A/2}}{\frac{\gamma_{th}}{\eta^2\bar{\gamma}}} \sum_{q=0}^{Q}(-1)^{M+1+q}\times
\binom{Q}{q}\mathcal{R}\left(\frac{\mathcal{M}_C\Bigl(-\frac{A+j2\pi (M+q+1)}{2\frac{\gamma_{th}}{\eta^2\bar{\gamma}}}\Bigr)}{\frac{A+j2\pi (M+q+1)}{2\frac{\gamma_{th}}{\eta^2\bar{\gamma}}}}\right)\,\right|
\end{equation}
\end{document}
并得到更好的结果:
编辑: 如果你的文档有两列,那么第二个示例可以写如下:
\documentclass[a4paper,fleqn, twocolumn]{cas-dc}
\usepackage{amsmath}
\usepackage[numbers]{natbib}
%---------------- Show page layout. Don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
\begin{multline}
|E(A,M,Q)|\approx \frac{e^{-A}}{1-e^{-A}}+\left|\frac{2^{-Q}e^{A/2}}{\frac{\gamma_{th}}{\eta^2\bar{\gamma}}} \sum_{q=0}^{Q}(-1)^{M+1+q}\times\right.\\
\left.\binom{Q}{q}\mathcal{R}\left(\frac{\mathcal{M}_C\Bigl(-\frac{A+j2\pi (M+q+1)}{2\frac{\gamma_{th}}{\eta^2\bar{\gamma}}}\Bigr)}{\frac{A+j2\pi (M+q+1)}{2\frac{\gamma_{th}}{\eta^2\bar{\gamma}}}}\right)\,\right|
\end{multline}
\end{document}