If you use LaTeX and sometimes want to override the TeX macro to get your figure right there you can do it.
You can use the exclamation point !
\begin{figure}[!ht]
\begin{center}
\includegraphics[scale=0.50]{image.png}
\end{center}
\end{figure}
However the results is not really nice as when Tex take care to do the layout. So the win-win solution would be to have Tex taking care of the layout, but force it to put all the figure that belong to a section within that section.
Well that’s pretty easy and the command
\clearpage{}
Just does the trick.
If instead you refer to a figure but instead of the number of the figure you can read the number of the section, this is because you have misplaced the caption with the label.
The label has to go after the caption, otherwise it will refer to the section not to the figure.
Right way:
\begin{figure}[htb]
\begin{center}
\includegraphics[scale=0.50]{image.png}
\caption{A wonderful image!}
\label{fig: image}
\end{center}
\end{figure}
Note the relax [htb]
. LaTeX will take care of the position for you.
December 24, 2011 at 12:16 pm
“The author is responsible for the content, and let latex do the typesetting!”, I think this the spirit of latex. So just let the figure be float, and latex will make it in the right place!
March 20, 2012 at 10:37 pm
Working great..
Thanks.
August 20, 2013 at 9:37 am
cool tnx a lot!
August 20, 2013 at 10:19 am
Glad it helped!
December 16, 2014 at 9:38 pm
Thanks, somehow now my pictures are in the right place! This is black magic:D
January 10, 2015 at 12:54 pm
First off I want to say awesome blog! I had a quick question which I’d like
to ask if you do not mind. I was interested to know how you center yourself and clear your mind prior to writing.
I’ve had a difficult time clearing my mind in getting
my thoughts out there. I truly do take pleasure in writing however it just seems
like the first 10 to 15 minutes are generally wasted simply just trying to figure out
how to begin. Any recommendations or hints?
Appreciate it!
January 10, 2015 at 3:12 pm
Hi, unfortunately I don’t know if I am the right person to ask, because I’ve just wrote one blog post last year only. (Not counting the result).
I think the major thing is to actually start do it, and give it a good two hours slot.
For example I have some ideas for two posts in my head at the moment, however I know if I don’t open a new post and start working on it right away I will loose interest and end up not publishing.
So my best and only advice is start do it, and than you are at half od the job 🙂
Good luck!