# [Tugindia] Haing problems with figure environment

S. venkataraman svenkat at ignou.ac.in
Thu Oct 16 16:13:03 CEST 2003


-----Original Message-----
From: chidarala [mailto:chidarala at rediffmail.com]
Sent: Wednesday, October 15, 2003 3:58 PM
To: tugindia at tug.org
Subject: [Tugindia] Haing problems with figure environment

Hai,
I am Ravi.
I have a problem with Figure enviornment.
I had typed a small size book with 60 figures. So i used the figure
environment like this for all the figures.
------------------------------------------------------------------------
\begin{figure}
\begin{center}
\input{Fig1.pstex_t}
\caption{Examples for convex property}
\end{center}\end{figure}
------------------------------------------------------------------------
So after that I am getting xdvi file with figures separately not in
between text where I had inserted.

I mean I got all the figures after the text separately.

How can I get figures in between text only.

Hi!,
As pointed out earlier in this list, you should not
use figure environment if you want the figure exactly where you
place it. Put the following before \begin{document}:
\newcommand{\myfigure}[2][Insert figure]{\refstepcounter{figure}
\begin{center}
#2\mbox{}\\
{\bfseries\small Fig:\thefigure :~#1}\label{mylabel}
\end{center}}
To insert figure, use something like:
\myfigure[Examples for convex property]{
\input{Fig1.pstex_t}}
Of course, if the figure is too big and there is not enough
Space, it will shift to the next page.
Regards,
Venkataraman.