I have some very wide equations within a proof environment which I want to contain in a two-column document, I thus think of using \resizebox{1.3\columnwidth}{!}{% to archive that generate this error message "package amsmath error: invalid use of \intertext{" as seen in MWE1 below.
\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}
\resizebox{1.3\columnwidth}{!}{%
$\begin{aligned}
\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{aligned}$
}
\end{proof}
References to $\sigma$ \eqref{eq:sigma} and $\Delta Z$ \eqref{eq:dz}.
\blindtext
\end{multicols}
\end{document}
Even when I use \begin{align}...\end{align} it shows that the maths is not in maths mode as seen in MWE2 below.
\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}
\resizebox{1.3\columnwidth}{!}{%
\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}
I want to use texts within the proof environment and also want to use the\resizebox{ command while I keep the mathematical part align but not aliging the text part.
intertext
is designed for display environments such asalign
not inlinealigned
but don't use\resizebox
with text, especially not mathematics, just choose a smaller font size such as\small