I am wondering if it is recommended to adhere to a convention of defining labels before or after captions. Moreover, if that is the case, why?
Asked
Active
Viewed 712 times
0
-
As far as I know, you should always define the label after a caption. If you define it before, it will refer to a previous caption, and the reference in text won't be correct. – MarcoG Jun 16 '15 at 12:58
-
This is discussed in some depth under Is there any difference between nesting \label in \caption and putting \label outside \caption?. The question is slightly different but the answer is likely to be similar. – Chris H Jun 16 '15 at 12:59
-
Sorry for the duplicate, thank you for the swift reply though :) – Sigve Karolius Jun 16 '15 at 13:02
1 Answers
3
It is \caption that provides the number information that \label stores. If \label is placed before \caption it catches some irrelevant information.
daleif
- 54,450