Graphics, Figures & TablesFigure between 2 paragraphs

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

Figure between 2 paragraphs

Post by maxime54 »

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 :

Code: Select all

\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.

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Figure between 2 paragraphs

Post by Johannes_B »

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

Re: Figure between 2 paragraphs

Post by maxime54 »

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 ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Figure between 2 paragraphs

Post by Johannes_B »

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

Re: Figure between 2 paragraphs

Post by maxime54 »

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"
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Figure between 2 paragraphs

Post by Johannes_B »

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.
Post Reply