Graphics, Figures & TablesText not coming between two figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Rahul
Posts: 29
Joined: Wed Jul 24, 2013 10:07 am

Text not coming between two figures

Post by Rahul »

Code: Select all

\documentclass[12pt,journal,compsoc]{IEEEtran}
\usepackage{alltt}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{array}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{float}
\usepackage{lipsum}


\begin{document}

\begin{figure}[!t]
  \centering
  \includegraphics
	[width=2.5in]{image1}
  \caption{Spatial contraction of a domain block.}
  \label{referenceForText}
\end{figure}


\noindent

rms value corresponding to all Djs in the selected quadrant. These parameters are calculated as given in equations 4.2, 4.3 and 4.4 respectively. Domain block corresponding to which rms value is minimum, is chosen alongwith si and oi. Each

\begin{figure}[!t]
  \centering
  \includegraphics
	[width=2.5in]{image2}
  \caption{The square isometries.}
  \label{referenceForText}
\end{figure}
\end{document}
Text is not occurring.you have to run it on your machines for the 'images'.Image1 and image2.
Last edited by Rahul on Fri Aug 09, 2013 2:14 am, edited 3 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Text not coming between two figures

Post by Johannes_B »

As already mentioned in my previous posts, you don't have to use floating environments, if you don't want your figures and/or tables to float. You can use the capt-of-package to place captions. Please read about floating environments in some introductory literature. Please read about minimal working examples and the substituion of figures and also, please preview your post before submitting.

Just for understanding? Are you guys sharing this account? You are often asking similar questions. Do expect to get a different answer?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Rahul
Posts: 29
Joined: Wed Jul 24, 2013 10:07 am

Re: Text not coming between two figures

Post by Rahul »

Can you please give me a straight answer to my question ?
I am here to get answers not to read manuals.I am sorry to say that but that a truth.
I have given a mwe and you can check it on your pc as well.
Please,I need help cause after reading \captionof I am not able too understand it.
Also MWE link help doesn't work here.

Infominimal working example
http://theoval.cmp.uea.ac.uk/~nlct/late ... files.html
[/MWE]
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Text not coming between two figures

Post by Johannes_B »

Hi Rahul,

your questions often are on some "I just started using LaTeX"-level problems. You should really have read some introductory material first. That is my advice to any newbie to LaTeX. Reading documentations is part of the learning process.
I am here to get answers not to read manuals.

We all read and still read documentations, (almost) all our LaTeX-knowledge comes from reading either documentations or source code or blogs. When hearing about a package i don't know, i take a look at the docu to see if it is helpful.

To your problem. Consider the following, you have a graphic that takes up one third (1/3) of th page. Just before that is some text, taking up 3/4 of the page. LaTeX can now put the graphic on the next page, leaving some empty space on the previous one. Floating environments enable LaTeX to put the graphic to the next page, and to fill up the rest of th first with text coming after the graphic in your code. I hope that's understandable for you. f you want to know more about floats, take a look into the wikibook on LaTeX. If you want to know how to influence the position of float environments ... in LaTeX?, click the link.

The \inlcudegraphics-command works just fine, but to add a caption, you need the capt-of-package.

Code: Select all

\documentclass[12pt,journal,compsoc]{IEEEtran}
\usepackage[demo]{graphicx}
\usepackage{capt-of}

\begin{document}

\begin{center}
\includegraphics[width=2.5in]{example-image-a}
\captionof{figure}{Spatial contraction of a domain block.}
\end{center}

\noindent % to  have an effect, you have to delete the blank line
%
rms value corresponding to all Djs in the selected quadrant. 
These parameters are calculated as given in equations 4.2, 4.3 
and 4.4 respectively. Domain block corresponding to which rms 
value is minimum, is chosen alongwith si and oi. Each

\begin{center}
\includegraphics[width=2.5in]{example-image-b}
\captionof{figure}{The square isometries.}
\label{fig:aLabelForReferencing}
\end{center}

\begin{figure}
\centering
\includegraphics[width=2.5in]{example-image-c}
\caption{caption ofthe floating graphic}
\end{figure}

Somethig strange seems to haben here. Please read section 2 of the capt-of manual to understand this behaviour.

\end{document}
You need to be very careful, see the code for more information. I think there is a package to prevent this from happening, but i cannot remember the name of it.
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