Graphics, Figures & TablesIncluded Images don't appear

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Callebaut
Posts: 2
Joined: Sun Nov 27, 2011 1:35 pm

Included Images don't appear

Post by Callebaut »

Hi.

I'm relatively new to LaTeX. I'm trying to include figures in my documents for the first time.

I'm using TexShop with Pdftex as a composer.

Here's my problem :
When I type a document empty but for an image, everything works and the image appears.

Code: Select all

\documentclass{article}
\usepackage[applemac]{inputenc} %sur pc remplacer applemac par latin1
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}   
\usepackage[pdftex]{graphicx} %manipulation des images

\begin{document}

	\begin{figure}[H]
		\center
		\includegraphics[width = 100 mm]{transversal}
		\label{fig1}
		\caption{Vibration transversale d'une corde.}
	\end{figure}
	
\end{document}
But as soon as I add some texts before or after the image, it stops appearing.

Code: Select all

\documentclass{article}
\usepackage[applemac]{inputenc} %sur pc remplacer applemac par latin1
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}   
\usepackage[pdftex]{graphicx} %manipulation des images

\begin{document}
\subsection{l'oscillation transversale.}
		L'oscillation transversale est due au déplacement des points de la corde perpendiculairement par rapport a la position d'équilibre.
		
	\begin{figure}[H]
		\center
		\includegraphics[width = 100 mm]{transversal}
		\label{fig1}
		\caption{Vibration transversale d'une corde.}
	\end{figure}
	
\end{document}
I don't get any compilation errors, the image just isn't there on my pdf document.

It is probably a dumb mistake I made or a tag I forgot to add but I can't find it and I couldn't find anyone with a similar problem on Google.
Please help me :) Thanks in advance.

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
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Included Images don't appear

Post by Stefan Kottwitz »

Hi Callebaut,

welcome to the board!

[H] is not a standard LaTeX option for figures. Have a look at this post from today where the options are explained:
[H] requires loading the float package:

Code: Select all

\usepackage{float}
If you fix this, and the image doesn't appear yet, perhaps post your .log file as attachment to a post here, for the second small example here which doesn't work for you.

Stefan
LaTeX.org admin
Callebaut
Posts: 2
Joined: Sun Nov 27, 2011 1:35 pm

Re: Included Images don't appear

Post by Callebaut »

Works like a charm ! Thank you so much !
Post Reply