drever wrote:
Hello!
The label and reference mechanism seems to have a problem with
figures. When I reference to a label of a figure that was inserted
with the "Insert Label" and reference to it from the text, the
reference in the pdf-output is sometimes wrong. If I click on the
refernece in lyx I'm directed to the correct location.
Sorry for the vague describtion, but I didn't find a regular pattern
in the occurence of the problem. I'll give an example:
Figure 1.1 has label fig:example, the figure caption shows figure 1.1
correctly in the pdf.
A reference to this figure is inserted in the text with
\ref{fig:example}.
The referenced figure in the pdf should display figure 1.1 but
displays figure 1.3.2. 1.2.3 seems to be the number of the subsection
the figure occurs in.
I'm using the packet subfigure, perhaps it has something to do with
the problem.
Is this a known problem? Any help?
Looks like "user error". Well, perhaps the documentation is lacking.
When you insert a label, then that label gets its number from the
closest numbered entity in front of it.
So if you want to label a figure, put the label inside the figure caption.
That way you are sure that the caption number is the closest numbered
entity. (Nobody ever puts a section inside of a caption.)
If the label is outside the caption, then chances are that LaTeX
(which actually process the label texts) thinks you want to
reference the section instead, and uses the section number.
Helge Hafting