I recently asked a question regarding the numbering of a block of equations within an align environment of which only some should be numbered as subequations; in my case I had three equations that I wanted to be numbered (1a), (1b), (2).
I was pointed to an already proposed solution here, which I tested and it is indeed working, but I found out that this solution fails when including the cleveref package. Here you can see the MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{cleveref} % Comment/uncomment to see the difference
\makeatletter
\newcounter{manualsubequation}
\renewcommand{\themanualsubequation}{\alph{manualsubequation}}
\newcommand{\startsubequation}{%
\setcounter{manualsubequation}{0}%
\refstepcounter{equation}\ltx@label{manualsubeq\theequation}%
\xdef\labelfor@subeq{manualsubeq\theequation}%
}
\newcommand{\tagsubequation}{%
\stepcounter{manualsubequation}%
\tag{\ref{\labelfor@subeq}\themanualsubequation}%
}
\let\subequationlabel\ltx@label
\makeatother
\begin{document}
\begin{align}
% With 2 elements
\startsubequation\subequationlabel{eq:prefyk}
a &= \begin{bmatrix}
a_1 \\
\vdots \\
a_2
\end{bmatrix}
\tagsubequation\label{eq:prefyka} \\
&= \left[ a_1 \quad\!\! \ldots \quad\!\! a_2 \right]^\mathrm{T} \tagsubequation\label{eq:prefykb}\\
b &= \left[ b_1 \quad\!\! \ldots \quad\!\! b_2 \right]^\mathrm{T}, \label{eq:prefe}
\end{align}
\end{document}
If the line \usepackage{cleveref} is included, the result is the following.
Is there any way to get around this problem?


