Hello,
I do not know why but I am having a problem in referring to the figure in my
article. Below is my code for the figure I include in the article. I labeled
the figure as "screenshot". Then in the text, I refer to the figure by
writing \ref{screenshot} . However, when I compile the file, a reference
number like "1" does not appear but instead "??" appears. I also have tables
in the article and their references work just fine.
What might be the problem?
\begin{figure}[p]\footnotesize
\label{fig:screenshot}
\caption{\footnotesize{Scenarios}}
\scalebox{0.85}{\includegraphics[angle=0]{screenshot.pdf}}
\end{figure}
|
|
0
|
|
|
|
Reply
|
minimus
|
1/20/2011 8:50:36 PM |
|
"minimus" <minimus@live.co.uk> wrote:
> I do not know why but I am having a problem in referring to the figure in my
> article. Below is my code for the figure I include in the article. I labeled
> the figure as "screenshot". Then in the text, I refer to the figure by
> writing \ref{screenshot} . However, when I compile the file, a reference
> number like "1" does not appear but instead "??" appears. I also have tables
> in the article and their references work just fine.
>
> What might be the problem?
> \begin{figure}[p]\footnotesize
> \label{fig:screenshot}
> \caption{\footnotesize{Scenarios}}
Use \label *after* or inside \caption (see LaTeX book, ...):
> \scalebox{0.85}{\includegraphics[angle=0]{screenshot.pdf}}
% simplified (see grfguide.pdf):
\includegraphics[scale=.85]{screenshot.pdf}
--
Heiko Oberdiek
|
|
0
|
|
|
|
Reply
|
Heiko
|
1/20/2011 8:11:35 PM
|
|
On Jan 20, 8:50=A0pm, "minimus" <mini...@live.co.uk> wrote:
> Hello,
>
> I do not know why but I am having a problem in referring to the figure in=
my
> article. Below is my code for the figure I include in the article. I labe=
led
> the figure as "screenshot". Then in the text, I refer to the figure by
> writing \ref{screenshot} . However, when I compile the file, a reference
> number like "1" does not appear but instead "??" appears. I also have tab=
les
> in the article and their references work just fine.
>
> What might be the problem?
It is not clear because your example doesn't show everything:-) First,
you need to compile twice before you get the reference in the output.
Second, could it be that you have to write \ref{fig:screenshot}?
> \begin{figure}[p]\footnotesize
> \label{fig:screenshot}
> \caption{\footnotesize{Scenarios}}
> \scalebox{0.85}{\includegraphics[angle=3D0]{screenshot.pdf}}
> \end{figure}
Regards,
Marc van Dongen
|
|
0
|
|
|
|
Reply
|
Marc
|
1/20/2011 9:02:35 PM
|
|
Am 20.01.2011 21:50, schrieb minimus:
>
> I do not know why but I am having a problem in referring to the figure
> in my article. Below is my code for the figure I include in the article.
> I labeled the figure as "screenshot". Then in the text, I refer to the
> figure by writing \ref{screenshot} . However, when I compile the file, a
> reference number like "1" does not appear but instead "??" appears. I
> also have tables in the article and their references work just fine.
>
> What might be the problem?
>
> \begin{figure}[p]\footnotesize
> \label{fig:screenshot}
> \caption{\footnotesize{Scenarios}}
> \scalebox{0.85}{\includegraphics[angle=0]{screenshot.pdf}}
> \end{figure}
put the \label _after_ the \caption command and run at least pdflatex twice.
Herbert
|
|
0
|
|
|
|
Reply
|
Herbert
|
1/20/2011 9:07:10 PM
|
|
"Heiko Oberdiek" wrote in message
news:iha8h1$fep$1@news.eternal-september.org...
"minimus" <minimus@live.co.uk> wrote:
> I do not know why but I am having a problem in referring to the figure in
> my
> article. Below is my code for the figure I include in the article. I
> labeled
> the figure as "screenshot". Then in the text, I refer to the figure by
> writing \ref{screenshot} . However, when I compile the file, a reference
> number like "1" does not appear but instead "??" appears. I also have
> tables
> in the article and their references work just fine.
>
> What might be the problem?
> \begin{figure}[p]\footnotesize
> \label{fig:screenshot}
> \caption{\footnotesize{Scenarios}}
Use \label *after* or inside \caption (see LaTeX book, ...):
> \scalebox{0.85}{\includegraphics[angle=0]{screenshot.pdf}}
% simplified (see grfguide.pdf):
\includegraphics[scale=.85]{screenshot.pdf}
--
Heiko Oberdiek
I have put the label after the caption command. Worked! Thanks a lot. It was
my mistake. I don�t know how I could manage Latex if this group did not
exist. Thank you so much.
|
|
0
|
|
|
|
Reply
|
minimus
|
1/20/2011 10:47:31 PM
|
|
On Jan 20, 8:11=A0pm, Heiko Oberdiek <heiko.oberd...@googlemail.com>
wrote:
> "minimus" <mini...@live.co.uk> wrote:
> > \scalebox{0.85}{\includegraphics[angle=3D0]{screenshot.pdf}}
>
> % simplified (see grfguide.pdf):
> \includegraphics[scale=3D.85]{screenshot.pdf}
Because you mentioned that:
I recently discovered that:
\includegraphics[width=3DW,height=3DH]{image}
results in a TeX box with the exact dimension W x H, but:
\resizebox{W}{H}{\includegraphics{image}}
results in a TeX box with
width =3D (W / W_image) * W_image =3D ~W (i.e. W with rounding errors)
height =3D (H / H_image) * H_image =3D ~H (i.e. H with rounding errors)
This is because it uses \scalebox internally, but \includegraphics
only simply set the box and lets the scaling be done by the output
driver.
The error tends to be quite below 0.5pt, but I wonder why \resizebox
does not enforce the correct dimensions.
Martin
|
|
0
|
|
|
|
Reply
|
Martin
|
1/21/2011 1:46:43 PM
|
|
|
5 Replies
562 Views
(page loaded in 0.044 seconds)
Similiar Articles: problem with referring to the figure - comp.text.texHello, I do not know why but I am having a problem in referring to the figure in my article. Below is my code for the figure I include in the a... Need help figuring out how to write the script for this problem ...problem with referring to the figure - comp.text.tex Need help figuring out how to write the script for this problem ... Pulling out fields in a CSV file - comp.lang.awk ... Interpreter latex in a figure does not work - comp.soft-sys.matlab ...problem with referring to the figure - comp.text.tex... the file, a reference number like "1" does not ... I don t know how I could manage Latex if this group did not ... Delaunay, DelaunayTri, tsearch and pointLocation problems. - comp ...The problem will be when tsearch is no longer availible. We can easily ... problem with referring to the figure - comp.text.tex... sys.matlab tsearch and DelaunayTri ... Use default latex font in Plots (not OT but almost) - comp.soft ...problem with referring to the figure - comp.text.tex... to XeLaTeX Problem with Math Fonts... - comp.text.tex ..... between the first two and last two '$' as math, and ... tsearch and DelaunayTri - comp.soft-sys.matlabproblem with referring to the figure - comp.text.tex tsearch and DelaunayTri - comp.soft-sys.matlab tsearch and DelaunayTri - comp.soft-sys.matlab Read these data in ... !P.Multi Broken in IDL 8.0.1 - comp.lang.idl-pvwaveproblem with referring to the figure - comp.text.tex!P.Multi Broken in IDL 8.0.1 - comp.lang.idl-pvwave problem with referring to the figure - comp.text.tex... caption ... Problem sending binary file via socket. - comp.unix.programmer ...For server portion, I was referring to the second print ... like a client...) it's basically impossible to figure ... Problem sending binary file via socket. - comp.unix ... figure labels position -> 'auto' ? - comp.soft-sys.matlab ...figure labels position -> 'auto' ? - comp.soft-sys ... corelation and crosscorelation - comp ... Referring to the figure ... improve strlen - comp.lang.asm.x86... isn't problem ... how to properly audit generic user accounts - comp.unix.solaris ...Hi All, I am trying to figure out a way to properly ... royal pain) I am not sure how to approach the problem. ... Could you refer me to any resorces on solaris auditing? problem with referring to the figure - comp.text.tex | Computer GroupHello, I do not know why but I am having a problem in referring to the figure in my article. Below is my code for the figure I include in the a... By referring to the figure , determine the mass of each of the followiBy referring to the figure , determine the mass of each of the following salts required to form a saturated solution in 250 g of water at 30 degrees C: a)KClO3, Pb ... 7/24/2012 1:59:07 AM
|