
在使用小節編寫報告時,我遇到了方程式編號的問題。每當我標記方程並引用它們時,我只想獲取方程的編號,但是似乎對於同一小節中的方程,當我引用它們時,我會得到相同的方程編號。有人可以幫忙嗎?我確信這可能是一些愚蠢的事情。
\documentclass[a4paper,11pt]{article}
\usepackage{amsmath}
\begin{document}
\section{Section 1}
\subsection{SubSection 1}
Random equation shown below:
\begin{equation}
v = \frac{d}{t}
\end{equation}
\label{eq:1}
This is Equation \ref{eq:1}. Another equation is:
\begin{equation}
E = mc^2
\end{equation}
\label{eq:2}
This is Equation \ref{eq:2}.
\subsection{Subsection 2}
This is another random equation:
\begin{equation}
F = ma
\end{equation}
\label{eq:3}
This is Equation \ref{eq:3}.
\end{document}
這就是附加的程式碼為我產生的結果。相同的方程式編號但是引用了兩個不同的方程式。