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.

F.O
  • 165
  • Not actually . How to use this? – F.O Apr 28 '20 at 23:02
  • I believe you can put \ref{label} inside the equation and then reference it elsewhere using \eqref{label}. – bclzyjhr Apr 28 '20 at 23:06
  • @ bclzyjhr I tried to use label but nothing comes out. – F.O Apr 28 '20 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 Apr 28 '20 at 23:14
  • I I see it works but this is not very convenient because setting label using \ label doesn't change the automated label from the chapter. – F.O Apr 28 '20 at 23:20
  • your question is most unclear as your example doesn't use any label. But the labelling is unrelated to the aligned which does not affect the number or cross reference a at all. Just use \begin{equation}\label{zzzz} then reference it as ... see \eqref{zzzz} from the text. – David Carlisle Apr 28 '20 at 23:26
  • 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. –  Apr 28 '20 at 23:26
  • @DavidCarlisle I used the idea mentioned her https://tex.stackexchange.com/questions/13396/how-to-get-only-one-vertically-centered-equation-number-in-align-environment-wit/13397 – F.O Apr 28 '20 at 23:37
  • but you say you have a problem with cross references but give no example of that use or show the problem. – David Carlisle Apr 28 '20 at 23:38

1 Answers1

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

David Carlisle
  • 757,742
  • 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 Apr 28 '20 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) – barbara beeton Apr 29 '20 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) – David Carlisle Apr 29 '20 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 Apr 29 '20 at 13:59