🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #1777

Re: Latex figure labels

#1777
From: Marc Clarke
Date: Fri, 31 Aug 1990 22:26
24 lines
1083 bytes
> / hpdtl:comp.text / ceblair@ux1.cso.uiuc.edu (Charles Blair) / 12:30 pm  Aug  2, 1990 /
> 
>    I am having trouble with references to figures in LaTeX.  I have
> 
>   \begin{figure}\label{name}
>    ...
>    \end{figure}
> 
> and later in the document (it's report style, if that matters) I use
> \ref{name}.  What I get is the number of the section with the figure,
> instead of the number of the figure, even though the caption numbers come
> out ok.  Thanks for any help!
> 
> Charles Blair  (please e-mail)

You have to use:

\begin{figure}
...
\caption{The caption for the figure.}
\label{name}
\end{figure}

and the \label *must come after* the \caption.
Technical Details
Message-ID: <8400009@hpdtl.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!hpcc01!hpcea!hpdtl!clarke
References: <1990Aug2.193059.21556@ux1.cso.uiuc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!hpcc01!hpcea!hpdtl!clarke
From: clarke@hpdtl.HP.COM (Marc Clarke)
Newsgroups: comp.text
Subject: Re: Latex figure labels
Message-ID: <8400009@hpdtl.HP.COM>
Date: 31 Aug 90 22:26:28 GMT
References: <1990Aug2.193059.21556@ux1.cso.uiuc.edu>
Organization: HP Design Tech. Lab., Palo Alto, CA
Lines: 24