In particular, the subsection turns out to be numbered 2.2.1, and the
figure turns out to be numbered 1. However in the text in the end of
the paragraph I'm getting "... visualized in Figure 2.2.1." whereas it
should be "... Figure 1.". I have rerun LaTeX numerous times on the
file, so this is not a question of running it twice to get references
right.
,----
| \subsubsection{Combined Whitebox-Blackbox Approach}
| \label{sec:test_approach}
|
| [snip the paragraph text]
| This mechanism is visualized in Figure \ref{fig:tstrat}.
|
| \begin{figure}[htbp]
| \begin{center}
| \shadowbox{\resizebox{5cm}{!}{\includegraphics{test_strategy.eps}}}
| \label{fig:tstrat}
| \caption{Combination of blackbox and whitebox testing strategies.}
| \end{center}
| \end{figure}
`----
So it seems that LaTeX thinks that by \label{fig:tstrat} I label
the current section, not the figure. How would I rectify this?
Many thanks for any ideas,
--
Arcady Genkin
Don't read everything you believe.
label caption figure
you will find that this is one of the most asked latex questions ever. The
solution to your problem is:
you cannot put the \label line before the \caption line!
it's good habit then to write
\begin{figure}[options]
\caption{mycaption}\label{mylabel}
\etc...
or, some people like
\begin{figure}[options]
\caption{\label{mylabel} mycaption}
\etc...
Put the \label after the \caption.
Cheers, Thomas
--
Thomas Lotze - thomas.lotze@gmx.<CUT-IT>.net
http://www.thomas-lotze.de http://www.bannertausch-b150.de
http://thestories.cjb.net
> Given the following snippet of LaTeX code, I get a dissagreeing
> numbers between the \ref and \label for the figure.
> ...
> | \label{fig:tstrat}
> | \caption{Combination of blackbox and whitebox testing strategies.}
> | \end{center}
> ...
Put the \label AFTER the \caption and Read The Fine Manuals.
--
Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html
Univ. of Padova, Dept. of Physics - Padova, Italy lor...@pd.infn.it
The instructions said to use Windows 98 or better - so I installed FreeBSD.