figures(arraying) in two-column format

783 views
Skip to first unread message

Vivek A. Rane

unread,
Dec 14, 2011, 12:36:45 PM12/14/11
to latexus...@googlegroups.com
Hi,

I have to put array of images (2x2 array = total 4 images) in two-column format. Though I am able to do it, the problem with the text (which is following the images) will be overwritten on the right-column. So,

  1. How do one can place the images(array) in the right place, preferably on top of the page? (so that, just after the image/ figures, the text should follow in two-column format)
  2. What is this latex error: unknown graphics extension: .eps (I am using \usepackage{graphicx})
     + 1.353 \includegraphics[width=3.4in]{img.eps}
For this I have used the following:
-------------------------------------
\begin{figure}[h]
\begin{center}$
   \begin{array}{cc}
      \includegraphics[width=3.4in]{A.eps} & \includegraphics[width=3.4in]{B.eps}\\
      \includegraphics[width=3.4in]{C.eps} & \includegraphics[width=3.4in]{D.eps}
     \end{array}$
    \end{center}
   \caption{\ micrographs of ABCD}
 \label{fgr:1}
\end{figure}
-------------------------------------------------

What is the solution,

Thanks

Vivek

Ignasi

unread,
Dec 14, 2011, 1:04:23 PM12/14/11
to latexus...@googlegroups.com
On Wed, 14 Dec 2011 18:36:45 +0100, Vivek A. Rane <vive...@gmail.com>
wrote:

> Hi,
>
> I have to put array of images (2x2 array = total 4 images) in two-column
> format. Though I am able to do it, the problem with the text (which is
> following the images) will be overwritten on the right-column. So,
>

> 1. How do one can place the images(array) in the right place,
> *preferably
> on top of the page*? (so that, just after the image/ figures, the text


> should follow in two-column format)

> 2. What is this latex error: *unknown graphics extension: .eps* (I am
> using \usepackage{graphicx})*
> ** +* 1.353 \includegraphics[width=3.4in]{img.eps} *
> *


>
> For this I have used the following:
> -------------------------------------
> \begin{figure}[h]
> \begin{center}$
> \begin{array}{cc}
> \includegraphics[width=3.4in]{A.eps} &
> \includegraphics[width=3.4in]{B.eps}\\
> \includegraphics[width=3.4in]{C.eps} &
> \includegraphics[width=3.4in]{D.eps}
> \end{array}$
> \end{center}
> \caption{\ micrographs of ABCD}
> \label{fgr:1}
> \end{figure}
> -------------------------------------------------
>
> What is the solution,
>

You can find the answer in TeX FAQ:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=widefigs

Just replace \begin{figure} \end{figure} by \begin{figure*} and
\end{figure*}. This way your floating figure will expand over twocolumns.

In any case it's better not to include .eps or .pdf in \includegraphics
commands. This way your latex/pdflatex will select
which type it prefers. LaTeX accept .eps but not .pdf and pdflatex the
other way.

Also in TeX FAQ: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=unkgrfextn

Best regards,

Ignasi

Peter Flynn

unread,
Dec 14, 2011, 5:19:53 PM12/14/11
to latexus...@googlegroups.com
On Wed, Dec 14, 2011 at 5:36 PM, Vivek A. Rane <vive...@gmail.com> wrote:
Hi,

I have to put array of images (2x2 array = total 4 images) in two-column format.

Not clear about this. Do you mean that the whole array must go in one column, or do you mean that the two columns of the array span the two columns of the page format?
 
Though I am able to do it, the problem with the text (which is following the images) will be overwritten on the right-column.

I'm afraid I don't understand that at all.
 
So,
  1. How do one can place the images(array) in the right place, preferably on top of the page? (so that, just after the image/ figures, the text should follow in two-column format)
Ah. So the image array does span the full width: it's only the text which is in two columns, right?

You're using a figure. Figures are floats. They are not connected to the text, so they will go wherever there is space. If you don't want them to float, either don't use a figure, or use the float package and the [H] placement option. This is in all the documentation about LaTeX. Please take some time to read about it.
  1. What is this latex error: unknown graphics extension: .eps (I am using \usepackage{graphicx})
     + 1.353 \includegraphics[width=3.4in]{img.eps}
This is a different and unrelated question. It's basic LaTeX knowledge: you must read and understand this like you need to read and understand about floats.

pdflatex only uses PNG, JPG, or PDF graphics, not EPS
standard (DVI) LaTeX only uses EPS: it cannot use PNG, JPG, or PDF graphics

Convert your graphics to the appropriate format, and use \includegraphics[...]{B} without specifying the filetype. This is in all the documentation about LaTeX. Please take some time to read about it.

For this I have used the following:
-------------------------------------
\begin{figure}[h]
\begin{center}$
   \begin{array}{cc}
      \includegraphics[width=3.4in]{A.eps} & \includegraphics[width=3.4in]{B.eps}\\
      \includegraphics[width=3.4in]{C.eps} & \includegraphics[width=3.4in]{D.eps}
     \end{array}$
    \end{center}
   \caption{\ micrographs of ABCD}
 \label{fgr:1}
\end{figure}

Why on earth are you using array for this? Use tabular. Array is for mathematics!
 
-------------------------------------------------

What is the solution

Read some documentation first :-) Use the multicol package instead of the old [twocolumn] option if you are allowed to: it lets you start and stop multicols in mid-page, which is impossible with [twocolumn] mode.

\documentclass{article}
\usepackage{multicol,graphicx,lipsum}
\begin{document}
\begin{figure}[ht]
  \centering
  \begin{tabular}{cc}
    \includegraphics[width=3.4in]{A}
    & \includegraphics[width=3.4in]{B}\\
    \includegraphics[width=3.4in]{C}
    & \includegraphics[width=3.4in]{D}
  \end{tabular}
  \caption{Micrographs of ABCD}
  \label{fgr:micrographs-abcd}
\end{figure}
\begin{multicols}{2}
\lipsum[1]
\lipsum[2]
\lipsum[3]
\end{multicols}
\end{document}

///Peter
Reply all
Reply to author
Forward
0 new messages