2

I am a novice in Latex. Recently I am trying to use minipage to show some figures. The code I am using is as following:

\begin{figure}[t]

\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=0.eps, width=7cm}
\caption{Extracting root node coordinates for calculating LEMBR}\label{fig1}
\end{minipage}
\\[1cm]
\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=1.eps, width=6cm}
\caption{Sending LEMBRs from client sites to Query Site,Calculating GEMBR at Query site and sending them back to client sites parallely}\label{fig2}
\end{minipage}
\\[1cm]
\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=2.eps, width=4.5cm}
\caption{Partitioning the copy of GEMBR at each client sites}\label{fig3}
\end{minipage}
\\[1cm]
\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=3.eps, width=6cm}
\caption{Mapping Leaf Level objects at each site on the partitioned GEMBR}\label{fig4}
\end{minipage}

\end{figure}

I am using the above code inside each sections of my paper. But problem is I don't find last 3 figures,it appears to me that those are invisible. What could be the problem? Also, those figures are not found when I am referencing them from my writing,it shows ?? instead.

This is the minimal code which has the same problem, just compile it with some random epsfiles. In this case it doesnt show first four figures and puts ?? in their references.

\documentclass{ssdbm}
\def\pdfshellescape{1}
\usepackage{epstopdf} %automatically converts eps->pdf for use in pdfLaTeX.
\usepackage{graphicx}

\begin{document}

\title{Test} 

\numberofauthors{1} 
\author{MiNdFrEaK}

\maketitle
\begin{abstract}

\end{abstract}

\terms{Test0,Test1,Test2}

%\keywords{} % NOT required for Proceedings

\section{Introduction}

\cite{VO11,GA84,SC03}

\section{Preliminaries}

1)This is shown in Figure \ref{fig1}.  

2)This is shown in Figure \ref{fig2}.

3)This is shown in Figure \ref{fig2}.

4)This is shown in Figure \ref{fig3}.

5)This is depicted in \ref{fig4}.


\begin{figure}[t]

\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=0.eps, width=7cm}
\caption{Figure 1}\label{fig1}
\end{minipage}
\\[1cm]
\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=1.eps, width=6cm}
\caption{Figure 2}\label{fig2}
\end{minipage}
\\[1cm]
\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=2.eps, width=4.5cm}
\caption{Figure 3}\label{fig3}
\end{minipage}
\\[1cm]
\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=3.eps, width=6cm}
\caption{Figure 4}\label{fig4}
\end{minipage}

%%and repeat everything from \begin{minipage}... to \end{minipage} again for each image
\end{figure}


\section{Some Strategy Name1}

The PMSJ algorithm comprises of the following steps:

1)This is shown in Figure \ref{fig5}.

2)This is shown in Figure \ref{fig6}.

3)This is depicted in Figure \ref{fig7}.

\begin{figure}[t]

\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=P_1.eps, width=6cm}
\caption{Figure 5}\label{fig5}
\end{minipage}
\\[1cm]
\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=P_2.eps, width=6cm}
\caption{Figure 6}\label{fig6}
\end{minipage}
\\[1cm]
\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=P_3.eps, width=6cm}
\caption{Figure 7}\label{fig7}
\end{minipage}


%%and repeat everything from \begin{minipage}... to \end{minipage} again for each image
\end{figure}

\section{Some Strategy Name2}

The steps for BFSJ are as follows:

1)This is shown in Figure \ref{fig8}.

2)This is depicted in Figure \ref{fig9}.

3)This is shown in Figure \ref{fig10}.

\begin{figure}[t]

\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=B_1.eps, width=6cm}
\caption{Figure 8}\label{fig8}
\end{minipage}
\\[1cm]
\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=B_2.eps, width=6cm}
\caption{Figure 9}\label{fig9}
\end{minipage}
\\[1cm]
\begin{minipage}[t]{\linewidth}
\centering
\epsfig{file=B_3.eps, width=6cm}
\caption{figure 10}\label{fig10}
\end{minipage}

%%and repeat everything from \begin{minipage}... to \end{minipage} again for each image

\end{figure}

\section{Conclusions}

\section{Acknowledgments}

\balance

\bibliographystyle{abbrv}
\bibliography{ssdbm}  

\end{document}
5
  • Any special reason why you are using the old \epsfig? Nowadays you can include all images using \includegraphics[width=..]{filename} from the graphicx package. Feb 3, 2013 at 9:46
  • 2
    The conference template that I was given has imposed epsfig.
    – N. F.
    Feb 3, 2013 at 9:47
  • 1
    Ahh, I should have thought that it was something like this. BTW, I don't see anything wrong in particular with your code. Please consider adding a full but minimal working example (MWE) that causes your problem in order to be able to analyze it more throughly. Feb 3, 2013 at 9:50
  • Welcome to TeX.SX. Feb 3, 2013 at 9:59
  • @MiNdFrEaK Don't do \def\pdfshellescape{1}
    – egreg
    Feb 3, 2013 at 12:16

1 Answer 1

2

I don't think TeX can insert page breaks inside figure environments. So, by putting several images inside one figure environment, you may cause some to drop off the foot of the page. The usual arrangement is to have each image inside its own figure environment, along with the appropriate caption and label.

\documentclass{article}
\usepackage{lipsum} %For dummy text
\begin{document}
\lipsum[1-2]
\begin{figure}
\centering
\rule{4cm}{4cm} % Replace with image                                            
\caption{A nice figure}
\label{fig1}
\end{figure}
\lipsum[2]
\begin{figure}
\centering
\rule{4cm}{4cm} % Replace with image
\caption{Another nice figure}
\label{fig2}
\end{figure}
\lipsum[3]
\end{document}

Alternatively, have a look at the subfig package if you want to display several images as part of the same figure.

1
  • 2
    if this is actually the reason (and it's a logical guess), there should be an "overfull vbox" message in the log file for the page on which the figures are disappearing. that's the first place one should look. Feb 3, 2013 at 16:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .