6

I have 8 figures, which need to included in a two-column style paper. The figures should be added at the top of the corresponding page, three figures in each row (figure alignment is not as the two-column style).

i.e.:

fig1:   fig2:    fig3:

fig4:   fig5:    fig6:

Each figure should not start with (a)... (b)...... likewise.

Can anybody tell how to do this in LaTeX?

5
  • Welcome to TeX.SX! Your post was migrated here from another Stack Exchange site. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question.
    – jub0bs
    Commented Jun 25, 2014 at 16:51
  • 1
    See this question: tex.stackexchange.com/questions/37581/… Commented Jun 25, 2014 at 16:55
  • You can also arrange them using a tabular. Unlike captions (which are used by hyperref and the toc) subcaptions are just text. Commented Jun 25, 2014 at 21:28
  • If you want to place multiple figures with captions into a single float, use \capstart from hypcap at the beginning, and either add multiple captions or use \refstepcounter{figure} and \label{fig:} where you write the captions. Commented Jun 25, 2014 at 21:35
  • My apologies. I hit the down vote button in error and didn't notice until too late. Commented Jun 26, 2014 at 3:54

3 Answers 3

5

You can use subcaption to produce sub-elements inside a float:

enter image description here

\documentclass[twocolumn]{article}
\usepackage{lipsum,graphicx,subcaption}

\captionsetup[subfigure]{labelformat=simple,labelsep=colon}
\renewcommand{\thesubfigure}{fig\arabic{subfigure}}

\begin{document}

\begin{figure*}[t]
  \centering
  \subcaptionbox{Fig1}[.3\linewidth][c]{%
    \includegraphics[width=.2\linewidth]{example-image-a}}\quad
  \subcaptionbox{Fig2}[.3\linewidth][c]{%
    \includegraphics[width=.2\linewidth]{example-image-b}}\quad
  \subcaptionbox{Fig3}[.3\linewidth][c]{%
    \includegraphics[width=.2\linewidth]{example-image-c}}

  \bigskip

  \subcaptionbox{Fig4}[.3\linewidth][c]{%
    \includegraphics[width=.2\linewidth]{example-image-c}}\quad
  \subcaptionbox{Fig5}[.3\linewidth][c]{%
    \includegraphics[width=.2\linewidth]{example-image-b}}\quad
  \subcaptionbox{Fig6}[.3\linewidth][c]{%
    \includegraphics[width=.2\linewidth]{example-image-a}}
  \caption{This is a figure}
\end{figure*}

\lipsum[1-10]

\end{document}

Note that column-spanning floats in twocolumn mode will always follow the page where you put the figure* environment. If you want it on a different page, you need to adjust the placement accordingly.

5

One simple approach with the multicol package:

\documentclass[twocolumn]{article}
\usepackage{lipsum,graphicx,multicol}
\begin{document}
%\abovecaptionskip=0pt
\begin{figure*}[t]
\begin{multicols}{3}
    \includegraphics[width=\linewidth]{example-image-a}\par\caption{caption}
    \includegraphics[width=\linewidth]{example-image-b}\par\caption{caption}
    \includegraphics[width=\linewidth]{example-image-c}\par\caption{caption}
\end{multicols}
\begin{multicols}{3}
    \includegraphics[width=\linewidth]{example-image-a}\par\caption{caption}
    \includegraphics[width=\linewidth]{example-image-b}\par\caption{caption}
    \includegraphics[width=\linewidth]{example-image-c}\par\caption{caption}
\end{multicols}
\end{figure*}
\lipsum[1-10]
\end{document}
5
  • It works with hyperref and \listoffigures, but not hypcap. Commented Jun 27, 2014 at 16:17
  • @JohnKormy I disagree. As far I can see, the MWE works perfectly in TeXLive 2013 with hypcap also, using evince as pdf viewer. Try using this package after hyperref and one \capstart for each each \includegraphics (six commands), just before of each image.
    – Fran
    Commented Jun 27, 2014 at 16:44
  • Eek! All this time I've been typing \startcap instead of \capstart! It appears I just re-invented the wheel for no reason. Commented Jun 27, 2014 at 18:25
  • @Fran: It works brilliantly, but the problem is I am not able to add labels to my subfigures. How do I do that?
    – Srivatsan
    Commented Nov 20, 2015 at 16:00
  • 1
    @ThePredator I see no problem with \caption{... \label{x}}, \caption{... \label{y}} .... and then make the cross-reference with \ref{x} as \ref{y}, just a with floats with only one figure.
    – Fran
    Commented Nov 20, 2015 at 18:09
1

Okay, it was a little more complicated than I thought. The hard part was getting the links go to the top of the images.

I should mention that the hyperlinks to figures 1-3 all actually link to figure 3. But so long as they are all on the same level, it doesn't matter. If you want to set a label, do it after the corresponding \figtarget.

\documentclass[twocolumn]{article}
\usepackage{graphicx}
\usepackage{mwe}
\usepackage{hyperref}

\hypersetup{pdftoolbar=true,pdfpagemode=UseNone,pdfstartview=FitH,
  colorlinks=true,extension=}

\newcounter{multifig}

% uased to synchronize \figtarget to \figcaption
\newcommand{\multifig}{\setcounter{multifig}{\thefigure}}

% location of hyperlink target (place \label after)
\newcommand{\figtarget}{\refstepcounter{figure}}

% corresponding caption
\newcommand{\figcaption}[1]% #1 = text
{\stepcounter{multifig}
\addcontentsline{lof}{figure}{\string\numberline {\arabic{multifig}}{\ignorespaces #1}}
Figure \arabic{multifig}: #1}

\begin{document}
\listoffigures

\begin{figure*}[t]
\multifig% better safe than sorry
\centering
\begin{tabular}{ccc}
\figtarget & \figtarget & \figtarget \\
\includegraphics[width=1.5in]{example-image} &
\includegraphics[width=1.5in]{example-image-a} &
\includegraphics[width=1.5in]{example-image-b} \\
\figcaption{first} & \figcaption{second} & \figcaption{third} \\
\figtarget & \figtarget & \figtarget \\
\includegraphics[width=1.5in]{example-image} &
\includegraphics[width=1.5in]{example-image-a} &
\includegraphics[width=1.5in]{example-image-b} \\
\figcaption{fourth} & \figcaption{fifth} & \figcaption{sixth}
\end{tabular}
\end{figure*}

\lipsum[1-8]

\begin{figure}[t]
\centering\includegraphics[width=1.5in]{example-image}
\caption{normal}
\end{figure}

\lipsum[9]
\end{document}

multifig

Intead of a tabular, one could put each image/caption into a separate parbox and pack them together with \hfill or \hfil.

You must log in to answer this question.

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