Putting (\ref{7.1}) and (\ref{eq9}) in (\ref{6}), we get \ref{eq8}
This prints as
Putting (7.1) and (3) in (3), we get 3
where eq6, eq8 and eq9 are labeled inline, 7.1 is labeled inside \begin{align)
$$Y = C_3 \cos ky + C_4 \sin ky \eqno{(9)} \label{eq9}$$
\begin{align}
\frac{\mathrm{d}^2 X}{\mathrm{d}^2 x^2} - k^2X = 0 \tag{7.1} \label{7.1}
\end{align}
so the inline labels aren't working. How to fix this?
$$ $$does not give you an equation number. Use theequationenvironment instead. Besides, you can use\eqref{}macro which includes the bracket for you. By the way, use\[ \]orequation*environment instead of$$ $$. – Teddy van Jerry Nov 21 '22 at 05:31eq9) is not really how labels are intended to be used, the idea is that you use a descriptive name in your label and let LaTeX handle everything related to numbering automatically. So use for example\label{pythagoreantheorem}instead of\label{eq9}. – Marijn Nov 21 '22 at 08:00$$isn't inline-math. Don't use$$: Why is\[ … \]preferable to$$? – Qrrbrbirlbel Nov 25 '22 at 10:20