我尝试用 LaTeX 编译此代码,但它显示如下错误
alignment tab character $ has been changed to cr.
这是我的某些代码中出现错误的地方。
有人能帮我弄清楚如何解决这个问题吗?
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}
\usepackage{amsfonts}
\usepackage{physics}
\usepackage[skins]{tcolorbox}
\usepackage{slashed}
\newcommand{\ms}{\medspace}
\newcommand{\I}{\mathbb{I}}%for identity matrix
\renewcommand{\l}{\left(}
\renewcommand{\r}{\right)}
\renewcommand{\a}{\alpha}
\newcommand{\p}{\hat{\slashed{P}}}
\newcommand{\s}{\sigma}
\renewcommand{\P}{\hat{P}}
\newcommand{\A}{\hat{A}}
\begin{document}
\begin{multline}
(p_0+\hat{p}_x)\qty[u_1(z)e^{\frac{i}{\hbar}xp_x}\qty(Ae^{\frac{i}{\hbar}yp_y}+A'e^{-\frac{i}{\hbar}yp_y})] & + i\hat{p}_y\qty[u_1(z) e^{\frac{i}{\hbar}xp_x}\qty(Ae^{\frac{i}{\hbar}yp_y}+A'e^{-\frac{i}{\hbar}yp_y} )]& =\ms\xi\qty[\ms u_2(z)e^{\frac{i}{\hbar}xp_x}\qty(Ae^{\frac{i}{\hbar}yp_y} + A'e^{-\frac{i}{\hbar}yp_y})]&\quad-i\hbar\partial_z\qty[u_2(z)e^{\frac{i}{\hbar}xp_x}\qty(Ae^{\frac{i}{\hbar}yp_y}+A'e^{-\frac{i}{\hbar}yp_y})]
\end{multline}
\end{document}