I have three equations in an align environment which I'd like to be numbered as follows: (1a), (1b), (2) [The numbers are just indicative; I don't want them to be exactly 1 and 2]
With subequations I can easily get the numbering (1a), (1b), (1c)
\documentclass{article}
\usepackage{amsmath}
\begin{document}
%
\begin{subequations}
\begin{align}
\mathbf{a} &= \begin{bmatrix}
a_1\\
\vdots \\
a_2
\end{bmatrix} \label{eq:1a} \\
&= \left[ a_1 \ \ldots \ a_2 \right]^\mathrm{T} \label{eq:1b}\\
%
\mathbf{b} &= \left[ b_1 \ldots \b_2 \right]^\mathrm{T}, \label{eq:2}
\end{align}
\end{subequations}
%
\end{document}
Using some code found here, I can increase by one the third equation number, obtaining (1a), (1b), (2a), but that's still not what I want
\documentclass{article}
\usepackage{amsmath}
\renewenvironment{subequations}[1][]{% optional argument: label-name for (first) parent equation
\refstepcounter{equation}%
% \def\theparentequation{\arabic{parentequation}}% we patched it already :)
\setcounter{parentequation}{\value{equation}}% parentequation = equation
\setcounter{equation}{0}% (sub)equation = 0
\def\theequation{\theparentequation\alph{equation}}%
\let\parentlabel\label% Evade sanitation performed by amsmath
\ifx\\#1\\\relax\else\label{#1}\fi% #1 given: \label{#1}, otherwise: nothing
\ignorespaces
}{%
\setcounter{equation}{\value{parentequation}}% equation = subequation
\ignorespacesafterend
}
\newcommand*{\nextParentEquation}[1][]{% optional argument: label-name for (first) parent equation
\refstepcounter{parentequation}% parentequation++
\setcounter{equation}{0}% equation = 0
\ifx\\#1\\\relax\else\parentlabel{#1}\fi% #1 given: \label{#1}, otherwise: nothing
}
\begin{document}
%%
\begin{subequations}
\begin{align}
\mathbf{a} &= \begin{bmatrix}
a_1\\
\vdots \\
a_2
\end{bmatrix} \label{eq:1a} \\
&= \left[ a_1 \ \ldots \ a_2 \right]^\mathrm{T} \label{eq:1b}\\ \nextParentEquation
%
\mathbf{b} &= \left[ b_1 \ \ldots \ b_2 \right]^\mathrm{T}, \label{eq:2}
\end{align}
\end{subequations}
%%
\end{document}
Does anyone know how to modify the code to obtain exactly (1a), (1b), (2)?
I tried to remove the packages one by one and the problem arises when I include
– gbernardi Jul 05 '16 at 15:58cleverefcleveref. Having a real example can help solve the problem. – egreg Jul 05 '16 at 15:59