I recently discovered the autonum package that allow to number only the referenced equations. It's great, but I often write optimization problems on multiple lines and would like an "all or nothing" approach: either one line is cited and the whole problem is numbered or nothing is and it is not numbered at all. Is it possible ?
As a second choice I would like to force manually the whole problem to be numbered, is there any way to do that?
Here is a minimal working example, where I would like to have both lines numbered.
\documentclass{article}
\usepackage{amsmath,cleveref,autonum}
\begin{document}
\begin{subequations}
\begin{align}
\min_x \quad & f(x) \\
s.t. \quad & g(x) \leq 0 \label{cst}
\end{align}
\end{subequations}
Constraint is \ref{cst}
\end{document}