Customize equation numbering for Cases environment? [duplicate]

I want to use equation numbering like this

I tried like this but doesn't work

$$\begin{cases} \varlimsup_{r \to \infty} \dfrac{\log ^{+} n\left\{U_{k=1}^{N} \Omega\left(\theta_{k}+\varepsilon, \theta_{k+1}-\varepsilon ; r\right), f=0\right\}}{\log r}<\mu, &\text{if } \mu>0 \tag{2.5}\label{e2.5}\\ \varlimsup_{r \rightarrow \infty} \dfrac{\sum_{k=1}^{N} n\left(\Omega\left(\theta_{k}+\varepsilon, \theta_{k+1}-\varepsilon ; r\right), f=0\right)}{\log r}<+\infty, & \text{if } \mu=0,\tag{2.6}\label{e2.6} \end{cases}$$

• See the empheq package Apr 12 at 17:12

Another solution, based on empheq and alignat, to have full control on the spacing between the two alignment columns. Also some improvements (some left … \right pairs are unnecessary here, and I preferred to replace the other ones with \bigl … \bigr). Last, the U_{k=1}^N coding should be \bigcup_{k=1}^N.

\documentclass{article}
\usepackage{empheq}
\counterwithin{equation}{section}

\begin{document}

\setcounter{section}{2}

\begin{empheq}[left=\empheqlbrace]{alignat=2}
& \varlimsup_{r \to \infty} \frac{\log ^{+} n\bigl\{\bigcup_{k=1}^{N} \Omega(\theta_{k}+\varepsilon, \theta_{k+1}-\varepsilon ; r), f=0\bigr\}}{\log r}<\mu,& \quad & \text{if } \mu>0 \label{eqn1}\\
%
& \varlimsup_{r \rightarrow \infty} \frac{\sum\limits_{k=1}^{N} n\bigl(\Omega(\theta_{k}+\varepsilon, \theta_{k+1}-\varepsilon ; r), f=0\bigr)}{\log r}<+\infty, & & \text{if } \mu=0 \label{eqn2}
\end{empheq}

\end{document}


Using the empheq package, you can assign equation number inside cases.

\documentclass[preview]{standalone}
\usepackage{amsmath}
\usepackage{empheq}

\begin{document}
\begin{empheq}[left={\empheqlbrace }]{align}
&\varlimsup_{r \to \infty} \dfrac{\log ^{+} n\left\{U_{k=1}^{N} \Omega\left(\theta_{k}+\varepsilon, \theta_{k+1}-\varepsilon ; r\right), f=0\right\}}{\log r}<\mu,\quad && \text{if } \mu>0 \label{eqn1}\\
%
&\varlimsup_{r \rightarrow \infty} \dfrac{\sum_{k=1}^{N} n\left(\Omega\left(\theta_{k}+\varepsilon, \theta_{k+1}-\varepsilon ; r\right), f=0\right)}{\log r}<+\infty,\quad && \text{if } \mu=0 \label{eqn2}
\end{empheq}
\end{document}


With {DispWithArrows} of witharrows:

\documentclass{article}
\usepackage{amsmath}
\usepackage{witharrows}

\begin{document}
\begin{DispWithArrows}<>[format=ll,fleqn]
\varlimsup\limits_{r \to \infty} \dfrac{\log ^{+} n\left\{U_{k=1}^{N} \Omega\left(\theta_{k}+\varepsilon, \theta_{k+1}-\varepsilon ; r\right), f=0\right\}}{\log r}<\mu,\quad & \text{if } \mu>0 \label{eqn1}\\
%
\varlimsup\limits_{r \rightarrow \infty} \dfrac{\sum_{k=1}^{N} n\left(\Omega\left(\theta_{k}+\varepsilon, \theta_{k+1}-\varepsilon ; r\right), f=0\right)}{\log r}<+\infty,\quad & \text{if } \mu=0 \label{eqn2}
\end{DispWithArrows}
\end{document}