Graphics, Figures & Tablesproblem with adding figure

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
rayman
Posts: 24
Joined: Thu Feb 24, 2011 11:53 am

problem with adding figure

Post by rayman »

Hello! I am having a problem with adding a figure to my text. I mean it has been added but it appears all the time in the wrong place, it pops up always on the last page, why it is like that?

here is the command I use

Code: Select all

\begin{figure}[H]
	\centering
		\includegraphics[scale=0.30]{C:/Users/Jacek/Desktop/labsh3.jpg}
		\caption{Harmonisk svängning}
	\label{1}
\end{figure}
and the packages I use

Code: Select all

\documentclass[a4paper,12pt]{article}
\usepackage{epsfig}
\usepackage[swedish]{babel}
\usepackage[latin1]{inputenc}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{epsfig}
\usepackage[pdftex]{graphicx}
\usepackage{url} %url
Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

problem with adding figure

Post by localghost »

rayman wrote:[…] I mean it has been added but it appears all the time in the wrong place, it pops up always on the last page, why it is like that? […]
Because you give the wrong placement parameter to the figure environment. What you try to do only works with the float package. I would try another approach.

Code: Select all

\begin{figure}[!ht]
% figure content
\end{figure}
Further explanations and solutions via forum search.


Thorsten
rayman
Posts: 24
Joined: Thu Feb 24, 2011 11:53 am

Re: problem with adding figure

Post by rayman »

unfortunately that one does not work either.
It is very strange, I have always used the same command so far and it always worked but for some reason it does not work now.....
rayman
Posts: 24
Joined: Thu Feb 24, 2011 11:53 am

Re: problem with adding figure

Post by rayman »

Now it works, the package was needed like you mentioned, thank you!:)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

problem with adding figure

Post by localghost »

rayman wrote:Now it works […]
Then please mark the topic (not the last post) accordingly as written in Section 3 of the Board Rules (to be read before posting) and as you have already been asked for. Please keep that in mind for the future so that further reminders will not be necessary.
Post Reply