Suppose I have two figure in my document, figure 1 and 2. I refer to the figure 2 in the test like: "...,see figure 2." Now if I put another figure before figure 2, its number should become figure 3, and "...,see figure 2." should automatically become "...,see figure 3.".
How can I do that? I could not understand the answer in this question.