On 03/09/2012 07:46 AM, paul sutton wrote:
Hi
I am using kile (latex editor for kde) and have created a simple how to
file, the code is below, what is happening is that it compiles
fine, however where I have the picture inserted this a
appears first then the text that in the source is above it. I would
have expected this the other way round. I thought I would ask here to
see if anyone can shed light on what is going on. I use lyx normally
but want to learn produce some pure LaTeX files so I can learn both.
That is because figures are floats: LaTeX puts them where it wants, with
hints from you. Read this:
http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
or something similar.
If you want the graphic exactly where it is in the text, then you need
to load the float package:
\usepackage{float}
and use the "here definitely" option:
\begin{figure}[H]
....
\end{figure}
That tells LaTeX: Put it where it is.
Richard
\documentclass[11pt,british]{report}
\usepackage{graphicx}
\begin{document}
Simple Geany How to:
\\
1. If Geany is not already installed you need to go to the Ubuntu
software centre and install it.
\\
2. Once installed you can start the application from either the side
bar (software centre may give you the option to add to sidebar so please
scroll
down to see what other options are available.
\begin{figure}
\centering
\includegraphics[width=418pt,height=247pt]{./geany1.png}
% geany1.png: 1037x695 pixel, 72dpi, 36.58x24.52 cm, bb=0 0 1037 695
\caption{Geany Editor}
\end{figure}
If you start a new file with File - New or you can start a specifc type
of file with File - New (from template) the latter gives you some basic
headers for that type
of file, e.g c, python, latex etc.
\begin{figure}
\centering
\includegraphics[width=418pt,height=247pt]{./geany2a.png}
% geany1.png: 1037x695 pixel, 72dpi, 36.58x24.52 cm, bb=0 0 1037 695
\caption{Geany Editor with python template}
\end{figure}
\end{document}
thanks for any help., I have attached