0

I have a system of equations and I used aligned environment to get a one number as label se here but I am not able to refer to it. I searched here and other places but all shows how to refer to equation when it is labeled using \label. However using label in aligned environment with \begin equation doesn't work.

\documentclass[14pt, a4paper, twoside]{report} 
\usepackage{amsmath}
\begin{document}
\begin{equation} 
\begin{aligned}
\frac{d\bar{x}(\tau)}{d\tau}=\quad&\bar{x}\left[1-\bar{x}-\bar {y}_{1}-\bar{y} _{2} \right] +\bar{s}(\tau),\quad \bar{x}(0)>0\\
\frac{d\bar{y}_{1}(\tau)}{d\tau}=\quad& \bar{y}_{1} \left[-\bar{\epsilon}_{1}-\bar{\omega}_{11}\bar {y}_{1}-\bar{g}_{12}\bar{y}_{2}+\bar{\beta}_{1}\bar{x}\right],\quad \bar{y}_{1}(0)>0 \\
\frac{d\bar{y}_{2}(\tau)}{d\tau}=\quad& \bar{y}_{2} \left[-\bar{\epsilon}_{2}+\bar{\gamma_{12}}\bar{y}_{1}-\bar{\omega}_{22}\bar {y}_{2}+\bar{\beta}_{2}\bar{x}\right],\quad \bar{y}_{2}(0)>0 \\
\end{aligned}
\end{equation}
\end{document}

In my document the system get the label (5.1) because it is inside chapter 5 but I want to refer to this other places. I can of course just write (5.1) but want more systematic way.

9
  • Not actually . How to use this?
    – F.O
    Commented Apr 28, 2020 at 23:02
  • I believe you can put \ref{label} inside the equation and then reference it elsewhere using \eqref{label}.
    – bclzyjhr
    Commented Apr 28, 2020 at 23:06
  • @ bclzyjhr I tried to use label but nothing comes out.
    – F.O
    Commented Apr 28, 2020 at 23:10
  • Oh, my mistake. I meant to say use \label{text} in the equation environment, then refer to it with \eqref{text} outside.
    – bclzyjhr
    Commented Apr 28, 2020 at 23:14
  • 1
    If I put \label{eq:pft} after \begin{equation} and \eqref{eq:pft} somewhere e.g. after \end{equation}, I get a reference. It is just an unfortunate practice to use one equation number (rather than subequations), but not as bad as non-upright differential ds.
    – user194703
    Commented Apr 28, 2020 at 23:26

1 Answer 1

1

You can reference the equation number using \label and \ref (or \eqref which adds parenthesis) the fact that the equation contains an aligned does not affect things at all.

\documentclass[14pt, a4paper, twoside]{report} 
\usepackage{amsmath}
\begin{document}
\begin{equation}\label{foo}
\begin{aligned}
\frac{d\bar{x}(\tau)}{d\tau}=\quad&\bar{x}\left[1-\bar{x}-\bar {y}_{1}-\bar{y} _{2} \right] +\bar{s}(\tau),\quad \bar{x}(0)>0\\
\frac{d\bar{y}_{1}(\tau)}{d\tau}=\quad& \bar{y}_{1} \left[-\bar{\epsilon}_{1}-\bar{\omega}_{11}\bar {y}_{1}-\bar{g}_{12}\bar{y}_{2}+\bar{\beta}_{1}\bar{x}\right],\quad \bar{y}_{1}(0)>0 \\
\frac{d\bar{y}_{2}(\tau)}{d\tau}=\quad& \bar{y}_{2} \left[-\bar{\epsilon}_{2}+\bar{\gamma_{12}}\bar{y}_{1}-\bar{\omega}_{22}\bar {y}_{2}+\bar{\beta}_{2}\bar{x}\right],\quad \bar{y}_{2}(0)>0 \\
\end{aligned}
\end{equation}

see \eqref{foo}
\end{document}

enter image description here

4
  • The problem is that I have got the number (5.1) in the middle (the same place you wrote (1) in your answer without using \label in my equation and setting \label with whatever doesn't change it but I do can refer to it using what is written inside \label.
    – F.O
    Commented Apr 28, 2020 at 23:52
  • I'm not qualified to say whether or not adding a brace on the right of this group would be mathematically appropriate, but it would tie them together in a manner that highlights the single equation number. (rcases) Commented Apr 29, 2020 at 13:48
  • @F.O sorry I can not understand that comment at all. \label has no effect on the printed number it is the internal key (like <p id="foo"> in html) for cross referencing. You supplied this example and it has no chapters and only one equation so it's numbered (1) your real document may have chapters and the equation gets number 5.1 that is fine, the exact same \label construct will then make \ref produce (5.1) not (1) Commented Apr 29, 2020 at 13:55
  • @DavidCarlisle I got confused because I thougt that \label should also change the equation number but I am wrong . Thanks for clarification.
    – F.O
    Commented Apr 29, 2020 at 13:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .