这里有谁知道为什么下面的代码似乎无法编译MiKTeX 2.9我正在使用阿姆斯特丹包裹:
$$\begin{align}
&1+(8 m - 2) (12 m + 1)^k + (48m^2 - 8 m + 1) (12 m + 1)^{2 k} \\
\\ &=1+(8 m - 2)\sum_{i=0}^{k}\binom{k}{i}(12m)^i + (48m^2 - 8 m + 1)\sum_{i=0}^{2k}\binom{2k}{i}(12m)^{i} \\
\\ &=1+(8 m - 2)\bigg(1+12km+\underbrace{\sum_{i=2}^{k}\binom{k}{i}(12m)^i}_{\text{divisible by $288m^2$}}\bigg)
\\ &\qquad\quad + (48m^2 - 8 m + 1)\bigg(1+24km+\binom{2k}{2}(12m)^{2}+\underbrace{\sum_{i=3}^{2k}\binom{2k}{i}(12m)^{i}}_{\text{divisible by $288m^2$}}\bigg) \\
\\ &\equiv 1+(8 m - 2)(1+12km)
\\ &\qquad\quad + (48m^2 - 8 m + 1)\bigg(1+24km+\binom{2k}{2}(12m)^{2}\bigg)\pmod{288m^2} \\
\\ &\equiv 48(k+1)m^2\pmod{288m^2}
\end{align}$$
我已经确认代码在 MathJAX 中完美呈现。然而,在 TeXnicCenter 中,编译时会弹出以下错误:
latex> ! Package amsmath Error: Erroneous nesting of equation structures;
latex> (amsmath) trying to recover with `aligned'.
latex> See the amsmath package documentation for explanation.
请帮忙。
答案1
除了省略两个实例之外$$
,您还需要(a)删除一些\\
指令和(b)有选择地插入\notag
指令。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
&1+(8 m - 2) (12 m + 1)^k + (48m^2 - 8 m + 1) (12 m + 1)^{2 k} \\
&\quad=1+(8 m - 2)\sum_{i=0}^{k}\binom{k}{i}(12m)^i +
(48m^2 - 8 m + 1)\sum_{i=0}^{2k}\binom{2k}{i}(12m)^{i} \\
&\quad=1+(8 m - 2)\biggl(1+12km
+\underbrace{\sum_{i=2}^{k}\binom{k}{i}(12m)^i}%
_{\text{divisible by $288m^2$}}\biggr)
\notag\\
&\quad\quad + (48m^2 - 8 m + 1)\biggl(1+24km+\binom{2k}{2}(12m)^{2}
+\underbrace{\sum_{i=3}^{2k}\binom{2k}{i}(12m)^{i}}%
_{\text{divisible by $288m^2$}}\biggr) \\
&\quad\equiv 1+(8 m - 2)(1+12km) \notag\\
&\quad\quad + (48m^2 - 8 m + 1)\biggl(1+24km+
\binom{2k}{2}(12m)^{2}\biggr)\pmod{288m^2} \\
&\quad\equiv 48(k+1)m^2\pmod{288m^2}\,.
\end{align}
\end{document}