When I have equations, as in
\begin{equation} ... \end{equation}
Can I arbitrarily assign the numbers to the equations? Instead of the usual order (1), (2), (3), ..., I'd like something like (1), (2.1), (2.2), (2.3), (3.1), (3.2), (4), ...
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityWhen I have equations, as in
\begin{equation} ... \end{equation}
Can I arbitrarily assign the numbers to the equations? Instead of the usual order (1), (2), (3), ..., I'd like something like (1), (2.1), (2.2), (2.3), (3.1), (3.2), (4), ...
Yes, absolutely, using the amsmath
package and its \tag
command.
A little example
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
y=mx+b\tag{1.2}
\end{equation}
or
\begin{equation}
y=mx+b\tag{duck}
\end{equation}
\end{document}
After reading your comment, if you want the equation
number to inherit the theorem
number, then you can use, for example,
\newtheorem{mytheorem}{Theorem}
\numberwithin{equation}{mytheorem}
and then you don't have to tag equations manually.