There's no point leaving LaTeX to automatically generate the section numbers if you have to keep track of them all, and change all your cross-references every time you add a new section. Fortunately LaTeX provides a way to generate the correct number. All you have to do is label the part of the document you want to reference, and then refer to this label when you want to cross-reference it[ Referring to labels in other documents ]. LaTeX will then determine the correct number that needs to be inserted at that point. This label can be anything you like as long as it is unique, but it's a good idea to make it something obvious so that, firstly, you can remember the label when you want to use it, and secondly, when you read through your code at some later date, it's immediately apparent to you to which part of the document you are referring.
LaTeX/Labels and Cross-referencing
Sectioning and Cross-references
Instructions for preparing an initial manuscript
In LaTeX, you can easily reference almost anything that can be numbered, and have LaTeX automatically updating the numbering for you whenever necessary. The objects which can be referenced include chapters, sections, subsections, footnotes, theorems, equations, figures and tables  , and the commands to be used do not depend on what you are referencing, and they are:. LaTeX will calculate the right numbering for the objects in the document; the marker you have used to label the object will not be shown anywhere in the document.
One of the most useful features of LaTeX is its ability to handle cross-references. To use this, we first define a label at the section or equation, table, etc. When you run LaTeX on a document with cross-references, it often doesn't know which section the references actually refer to. LaTeX Warning: Label s may have changed. Rerun to get cross-references right.