这是一个 MNWE(最小不起作用的示例):
\documentclass[12pt,letterpaper]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\section{Hello World}
\begin{subequations}
\frac{a}{b} = 0 \\
\end{subequations}
\end{document}
错误:
line 12: Missing $ inserted \frac{a}{b}
line 12: Extra }, or forgotten $ \frac{a}{b}
line 13: Missing $ inserted \end{subequations}
line 13: Missing } inserted \end{subequations}
我该如何修复 MNWE?
答案1
subeequations
本身不会启动数学模式,但其中所有编号方程式将编号为 1a、1b 等。环境还可以包含文本。
\documentclass[12pt,letterpaper]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\section{Hello World}
\begin{subequations}
Here is some text.
\begin{equation}
\frac{a}{b} = 0
\end{equation}
Then follows some more text, followed by some more equations.
\begin{gather}
a=b \\
c = d
\end{gather}
\end{subequations}
The next equation is not part of the subequations.
\begin{equation}
g=h
\end{equation}
\end{document}