我需要你帮我想出一些窍门或技巧,将我的 MWE 包含在一个双列页面中,并带有证明环境,其数学对齐,并包含用于解释的文本。问题是,当我运行它时,它超出了列空间。我希望它包含在一个双列页面文档中。
\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{multicol}% set this to 2 colomn
\setlength{\columnsep}{7mm}% set the space betw colomn 7mm
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\usepackage{ulem}
\newcommand{\msout}[1]{\text{\sout{\ensuremath{#1}}}}
\newcommand{\numberthis}{\refstepcounter{equation}\tag{\arabic{equation}}}
\newcommand{\labeln}[1]{\numberthis\label{#1}}
\newcommand{\mathonehalf}{\ensuremath{\frac{1}{2}}}
\usepackage{blindtext}
\begin{document}
\begin{multicols}{2}
\blindtext
\blindtext
\begin{proof}
\begin{align}
\mu &= np \\
&= \mathonehalf n;\\
\sigma &= \sqrt{np\left(1-p\right)} \labeln{eq:sigma}\\
&= \mathonehalf \sqrt{n};\\
Z &= \dfrac{X-\mu}{\sigma}\\
&= \frac{X-\mathonehalf n}{\mathonehalf \sqrt{n}};\\
\vartriangle Z&= \frac{\left(X+1\right)-\mathonehalf n}{\mathonehalf
\sqrt{n}} - \frac{X-\mathonehalf n}{\mathonehalf \sqrt{n}}\\
\vartriangle Z&= \dfrac{1}{\mathonehalf \sqrt{n}} \labeln{eq:dz}\\
\lim_{n \to \infty} \vartriangle Z &= 0 \labeln{eq:limdz}\\
\vartriangle Y&= \dfrac{n!}{\left(n-X-1\right)!\,X+1!}\left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2} \sqrt{n}\right) - \dfrac{n!}{\left(n-X\right)!\,X!}\left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2} \sqrt{n}\right) \nonumber\\
&= \left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2} \sqrt{n}\right)n!\,\left[\dfrac{\left(n-x\right)!\,x!-\left(n-x-1\right)!\left(n-x\right)!}{\left(n-x-1\right)!\left(n-x\right)!\,\left(n-x\right)!\,x!}\right] \nonumber\\
&= \left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2} \sqrt{n}\right)n!\,\left[\dfrac{\msout{\mathsf{\left(n-x-1\right)!\,x!}}\left[\left(n-x\right)-\left(x+1\right)\right]}{\msout{\mathsf{\left(n-x-1\right)!}}\left(x+1\right)!\,\left(n-x\right)!\,\msout{\mathsf{x!}}}\right] \nonumber\\
&= \left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2} \sqrt{n}\right)\left[\dfrac{n!}{\left(x+1\right)!\,\left(n-x\right)!}\right]\left[\left(n-x\right)-\left(x+1\right)\right] \nonumber\\
&= \left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2} \sqrt{n}\right)\left[\dfrac{n!}{\left(n-x\right)!\,x!}\right]\dfrac{\left(n-x-x-1\right)}{\left(x+1\right)} \nonumber\\
\text{From equation \ref{eq:dz} and equation \eqref{eq:sigma} }\\
\end{align}
\end{proof}
References to $\sigma$ \eqref{eq:sigma} and $\Delta Z$ \eqref{eq:dz}.
\blindtext
\end{multicols}
\end{document}
答案1
您可以使用\intertext
文本。除此之外,您可以overfull \hbox
通过不对齐所有方程式并将右侧部分拆分为两行来摆脱 es。结果仍然不太吸引人,主要是因为您的表达式太大而无法放入如此狭窄的空间。
\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{multicol}% set this to 2 colomn
\setlength{\columnsep}{7mm}% set the space betw colomn 7mm
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\usepackage{ulem}
\newcommand{\msout}[1]{\text{\sout{\ensuremath{#1}}}}
\newcommand{\numberthis}{\refstepcounter{equation}\tag{\arabic{equation}}}
\newcommand{\labeln}[1]{\numberthis\label{#1}}
\newcommand{\mathonehalf}{\ensuremath{\frac{1}{2}}}
\usepackage{blindtext}
\begin{document}
\begin{multicols}{2}
\blindtext
\blindtext
\begin{proof}
\begin{align}
\mu =& np \\
=& \mathonehalf n;\\
\sigma =& \sqrt{np\left(1-p\right)} \labeln{eq:sigma}\\
=& \mathonehalf \sqrt{n};\\
Z =& \dfrac{X-\mu}{\sigma}\\
=& \frac{X-\mathonehalf n}{\mathonehalf \sqrt{n}};\\
\vartriangle Z=& \frac{\left(X+1\right)-\mathonehalf n}{\mathonehalf
\sqrt{n}} - \frac{X-\mathonehalf n}{\mathonehalf \sqrt{n}}\\
\vartriangle Z=& \dfrac{1}{\mathonehalf \sqrt{n}} \labeln{eq:dz}\\
\lim_{n \to \infty} \vartriangle Z =& 0 \labeln{eq:limdz}
\end{align}
\begin{align}
\vartriangle Y=& \dfrac{n!}{\left(n-X-1\right)!\,X+1!}\left(\tfrac{1}{2}
n\right)\left(\tfrac{1}{2} \sqrt{n}\right) \nonumber\\
&\,- \dfrac{n!}{\left(n-X\right)!\,X!}\left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2} \sqrt{n}\right) \nonumber\\
=& \left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2} \sqrt{n}\right)n!\nonumber\\
&\,\left[\dfrac{\left(n-x\right)!\,x!-\left(n-x-1\right)!\left(n-x\right)!}{\left(n-x-1\right)!\left(n-x\right)!\,\left(n-x\right)!\,x!}\right] \nonumber\\
=& \left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2}
\sqrt{n}\right)n!\nonumber\\
&\,\left[\dfrac{\msout{\mathsf{\left(n-x-1\right)!\,x!}}\left[\left(n-x\right)-\left(x+1\right)\right]}{\msout{\mathsf{\left(n-x-1\right)!}}\left(x+1\right)!\,\left(n-x\right)!\,\msout{\mathsf{x!}}}\right] \nonumber\\
=& \left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2} \sqrt{n}\right)\left[\dfrac{n!}{\left(x+1\right)!\,\left(n-x\right)!}\right]
\nonumber\\
&\,\left[\left(n-x\right)-\left(x+1\right)\right] \nonumber\\
=& \left(\tfrac{1}{2} n\right)\left(\tfrac{1}{2} \sqrt{n}\right)
\left[\dfrac{n!}{\left(n-x\right)!\,x!}\right]\nonumber\\
&\,\dfrac{\left(n-x-x-1\right)}{\left(x+1\right)} \nonumber\\
\intertext{From equation \ref{eq:dz} and equation \eqref{eq:sigma} }\\
\end{align}
\end{proof}
References to $\sigma$ \eqref{eq:sigma} and $\Delta Z$ \eqref{eq:dz}.
\blindtext
\end{multicols}
\end{document}