包含 align* 环境的宏不使用预定义宏

包含 align* 环境的宏不使用预定义宏

align*由于环境不使用预定义宏,可能存在哪些原因Finished

\documentclass{article}
\usepackage{amsmath}

% ============ Itemize ============
\makeatletter
\newcommand{\Itemize}[2]
{
    \begin{itemize}
        \item #1
        \item #2
    \ItemizeFinished
}
\newcommand{\ItemizeFinished}{\end{itemize}}

% ============ Align ============
\newcommand{\Align}[2]
{
    \begin{align*}
        #1 &= #2
    \AlignFinished
}
\newcommand{\AlignFinished}{\end{align*}}

\makeatother

\begin{document}
    \Align{1}{2}
\end{document}

难道不是应该在命令到达其末尾\AlignFinished时调用吗?\Align

我收到以下错误pdfTeX 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian)

! LaTeX Error: \begin{align*} on input line 27 ended by \end{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.28 \end{document}

?

相关内容