Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I ref a figure in LaTeX before it occurs?

I always like my figures to be placed in between text as opposed to the top or bottom of the page. I also like to talk about the figure before it is shown. So I am trying to have something like this:

By looking at Figure~\ref{fig:VCO} you can see that blah blah blah.

\begin{figure}[h]
\caption{VCO test circuit}\label{fig:VCO}
\begin{center}
\includegraphics[width=0.9\columnwidth]{figures/VCO_circuit.eps}
\end{center}
\end{figure}

This doesn't seem to work because it I guess it is referencing something that hasn't occurred yet? Does anyone have some simple solution? I am still very new to LaTeX.

like image 333
Adam Avatar asked Oct 12 '10 16:10

Adam


People also ask

How do I reference a previous section in LaTeX?

In LaTeX you can easily reference a section by using \label{} next to a section and then \ref{} to create the reference. However, the reference only includes the number of the section, or the page with \pageref{} .

How do you cite a table in LaTeX?

It is a Latex convention to start table references by “tab:”, which no only lets you use the same name for a figure (starting with fig:) and a table, but makes it easier to distinguish between figures and tables. Use the command \ref{tab:} to reference a table in the text.

How do you force a figure after text in LaTeX?

The short answer: use the “float” package and then the [H] option for your figure. The longer answer: The default behaviour of figures is to float, so that LaTeX can find the best way to arrange them in your document and make it look better.


1 Answers

Generally LaTeX needs at least two passes to resolve all its references, the first time to write them to an auxiliary file and the second time to put them into the final ps/pdf/dvi file. So it does not matter where the reference is.

A third pass will be needed, for example, if your document has a long table-of-contents which will screw up page numbers.

like image 138
John Smith Avatar answered Oct 17 '22 01:10

John Smith