## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Figure between 2 paragraphs

Information and discussion about graphics, figures & tables in LaTeX documents.
maxime54
Posts: 3
Joined: Sat Jun 07, 2014 5:34 pm

### Figure between 2 paragraphs

Hi everyone,

I have just started to use LaTeX and I do not manage to do one thing : I would like to add a diagram (.png)between 2 paragraphs. However, when I try to do so, the diagram and the text place on top each other (superposition).
I looked for the solution on the Internet but no one works.
I hope you can help me.

(I apologize for my English mistakes, I'm not a native)

By the way, here is what I did :
\documentclass[10pt]{report}\usepackage[francais]{babel}  \usepackage[T1]{fontenc}\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}\usepackage{soul}\usepackage{color}\usepackage{graphicx}\usepackage{wrapfig}\usepackage{float}\usepackage{here}\usepackage{picins}\usepackage[section]{placeins}\makeatletter\renewcommand{\thesection}{\@arabic\c@section}\makeatother\begin{document}  Condition de réplication. \begin{figure}[!h]\begin{center}\includegraphics[scale=0.25]{replication.png} \caption{Schéma de la réplication chez les Procaryotes}\end{center}\end{figure} Avant Meselson et Stahl

Thanks in advance
Last edited by Stefan Kottwitz on Sat Jun 07, 2014 10:06 pm, edited 1 time in total.
Reason: inline code changed to code block

Tags:

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Please read some introductory material. Using the floating environment figure means, latex can put it where it fits best. This can be on top of a page, at the bottom, or sometomes on it's own page.

If you really don't want the pic to float, use \captionof{figure}{<your caption>} provided by package caption.

BTW: Environment center adds some extra vertical space, unnecessary using a floating environment.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

maxime54
Posts: 3
Joined: Sat Jun 07, 2014 5:34 pm
Thanks for your answer but whatever i do, i obtain the text and the diagram superposed
and there is an error I do not understand : "Cannot determine the size of graphique in danreplicationfork.bmp" How can i do to let Latex determine the size ?

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Oh, the pic is on the text, not above it on the paper?

LaTeX doesn't support bmp-graphics. Please convert it to a jpg-file (png would be possible as well) and try again.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

maxime54
Posts: 3
Joined: Sat Jun 07, 2014 5:34 pm
yes, pic is on the text. Even with a png pic it does not work. I do not understand at all why Latex does not want to have " text then pic then text"

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
You should try to prepare a minimal working example. This is the best and safest way to find the cause of errors.
All i can do now is guess, and there is nothing coming to mind right now.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Return to “Graphics, Figures & Tables”

### Who is online

Users browsing this forum: No registered users and 3 guests