I asked a question earlier today, where I learned that the subequations
environment provided by amsmath does not enter math mode: Missing $ inserted error when using \frac inside subequations environment?
According to the documentation however, align should enter math mode (see pg. 10). Then, why does the following MNWE (minimum not working example) not work?
\documentclass[12pt,letterpaper]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\section{Hello World}
\begin{subequations}
\begin{align}
\frac{a}{b} &= 0 \\
x + y &= \frac{a}{b} \\
\end{align}
\end{subequations}
\end{document}
The errors being produced seemingly suggesting once again that align is not a math mode environment?
line 14: Missing $ inserted I've inserted a begin-math/end-math symbol since I think
line 15: Missing \endgroup inserted x + y &
line 15: Missing $ inserted x + y &= \frac{a}{b}
line 15: Extra }, or forgotten $ x + y &= \frac{a}{b}
line 16: Misplaced \cr \end{align}
line 16: Missing $ inserted \end{align}
line 16: Missing } inserted \end{align}
line 16: Misplaced \noalign \end{align}
line 16: Extra }, or forgotten \endgroup \end{align}
line 16: Missing $ inserted \end{align}
line 0: Display math should end with $$
In particular, note the error for line 14: "I think therefore I insert $?". Okay, all jokes aside, what's up here? Am I not understanding the documentation correctly?
align
...align
, or else you get a blank line labeled(1c)
.align
does not like empty lines inside of it. Removing all empty lines makes everything work okay. Thanks to Werner for pointing this out in the comments above.tabular
, placing it on the last line is ignored. But inalign
type environments, placing \\ on the final line actually creates a blank following line.