I need to customize equation numbering as follows:
Some text ...
a+b (5)
3+2 (5')
... some more text....
c+d (6)
The idea is that (5') is an example of (5). I thought of using subequations, but I am not sure how to customize the inner numbering, as it would generate 5a and 5b, or 5.i, 5.ii, etc.... If I use \tag{} instead, I am not sure how to get the previous equation number (5, in the example).




\eqorn[_{x-y}]should work. – egreg Feb 11 '19 at 00:45subequationsand then make agatherenvironment with two equations having\eqorn[_a]and\eqorn[_b]respectively, I get1_aand1_b. If I then closesubequations, the next equation is numbered 2. – egreg Feb 11 '19 at 09:27\newcommand{\eqorn}[1][']{\tag{\theequation\ensuremath{#1}}}
\begin{document}
\begin{equation} \label{before} c+d \end{equation}
Some text ... \begin{gather} a+b \eqorn[a] \label{main} \ 3+2 \eqorn[b] \label{secondary} \end{gather} ... some more text.... \begin{equation} \label{after} c+d \end{equation} with references to \eqref{before}, \eqref{main} and \eqref{secondary}, \eqref{after}
\end{document}` However, you are right, this does not happen inside the subequation environment.
– R W Feb 11 '19 at 12:15\eqorncommand uses the last previously established equation number. If you want to get5<ornament-a>and5<ornament-b>, usesubequations. – egreg Feb 11 '19 at 16:38