# How to display only one reference for equation using \align?

Good morning. I would like to understand how to write this equation and receive only one reference (example: equation 1.1) and not euqation 1.1 and 1.2 relative to the second line of the equation. This is my code:

\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{ {Figures/} }

\usepackage[%
style=apa, backend=biber
]{biblatex}

\usepackage{float,lipsum,subfig}
\usepackage{amsmath,geometry,booktabs}
\usepackage{mathtools,array,dcolumn,longtable}
\usepackage[justification = centering]{caption}
\usepackage{titlesec}
\usepackage{etoolbox}
\usepackage{siunitx}
\usepackage{xurl}
\usepackage{hyperref}

\begin{document}
\begin{align}
p= count[r_{j(i)}=0]\\
q=count[r_{j(i)}>10]
\label{eq:eqr}
\end{align}

\end{document}


• Another approach is to use equation and alignat. Sep 11 '19 at 13:13

I suggest split:

\documentclass[11pt]{report}
\usepackage{amsmath}

\begin{document}
$$\label{eq:eqr} \begin{split} \text{from}\quad r_i\geq20;\quad i= p+q \quad\text{where}\quad p &= \operatorname{count}[r_{j(i)}=0]\\ q &= \operatorname{count}[r_{j(i)}>10] \end{split}$$

\end{document}


You could also vertically center the two conditions, but in this case a brace seems needed.

\documentclass[11pt]{report}
\usepackage{amsmath}

\begin{document}
\label{eq:eqr} \text{from}\quad r_i\geq20;\quad i= p+q \quad\text{where}\quad \left\{\begin{aligned} p &= \operatorname{count}[r_{j(i)}=0]\\ q &= \operatorname{count}[r_{j(i)}>10] \end{aligned} \right.

\end{document}


• perfect! and what about placing p and q a bit upper? Sep 11 '19 at 10:03
• @Elisam For my humble opinion is perfect. Sep 11 '19 at 21:25
• @Elisam I added a possible alternative version; I'd avoid omitting the brace. Sep 11 '19 at 21:34
• @Sebastiano thank you! Sep 12 '19 at 9:07
• @egreg really thanks, i will consider both versions Sep 12 '19 at 9:08