PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : including a graphic



Yang
09-03-2007, 12:15
hey,

the problem is I wanna \ref a graphic which I have already labeled in a subsection. but it resulted that the reference of that figure is the number of that subsection. but it is not the case when it was in a section or a chapter, it worked quite well.

thanks for helping lar...................

Yang

rais
09-03-2007, 12:32
Hi there,
I see two possibilities:
a) you've twice the same label (you can verify this by looking up your log-file, s.th. like "there were multiply defined labels" hints to that), or (more likely)
b) you've given your figure the \label prior to its \caption---just reverse the order of commands ;)
Regards,

Yang
09-03-2007, 13:09
hey Rais,

thanks so much, but there are no such two cases in my work, and I check the log-file, really confused about all the infos, as I just began to use Latex for my thesis for 2 weeks. and the infos about including that grahpic:
<figure/speedtorquech.jpg, id=1, 1204.5pt x 903.375pt>
File: figure/speedtorquech.jpg Graphic file (type jpg)

<use figure/speedtorquech.jpg>

LaTeX Warning: `!h' float specifier changed to `!ht'.

bobmalaria
09-03-2007, 13:22
hi,

you use the '!h' command because you don't want the figure to float.
it would be better if you use the package 'caption' which offers the command 'captionof'


\usepackage{caption}


\includegraphics...
\captionof{figure}{some text}

the message LaTeX Warning: `!h' float specifier changed to `!ht' means that latex is unable to place the graphic at the place you have choosen, so it changes the option to [ht]

oh and by the way. you don't need the file extension *.jpg

bischi
09-03-2007, 13:42
Always caption and then label (not reversed!). For sample code see l2picfaq.pdf

Greetings,

Bischi

Yang
09-03-2007, 13:45
thanks up there, problem solved!

bischi
09-03-2007, 14:12
What was it?

greetings Bischi