I am using \subfloat
inside a table (tabular
) to represent 6 images in across both columns of a two column document, as shown below. I am having no error message, but the images this figure and all the others after it won't appear in the pdf file.
\begin{figure*}[h]
\centering
\begin{tabular}{ccc}
\subfloat[a]{\includegraphics[width=0.3\textwidth]{images/A.pdf}} &
\subfloat[b]{\includegraphics[width=0.3\textwidth]{images/Bt.pdf}} &
\subfloat[c]{\includegraphics[width=0.3\textwidth]{images/C.pdf}} \\
\subfloat[d]{\includegraphics[width=0.3\textwidth]{images/D.pdf}} &
\subfloat[e]{\includegraphics[width=0.3\textwidth]{images/E.pdf}} &
\subfloat[f]{\includegraphics[width=0.3\textwidth]{images/F.pdf}}\\
\subfloat[g]{\includegraphics[width=0.3\textwidth]{images/G.pdf}} &
\subfloat[h]{\includegraphics[width=0.3\textwidth]{images/H.pdf}} &
\subfloat[i]{\includegraphics[width=0.3\textwidth]{images/I.pdf}}
\end{tabular}
\caption[]{Description}
\label{fig:ABC}
\end{figure*}
I've verified that if I leave only 3 images it will appear when I generate the PDF. So this might be a problem related to the width of figure relative to the page width.
I've tried to use subfigure
but it didn't worked either. I've tried changing the maximum number of figures in the .tex
document but it didn't helped.
I would appreciate some solution that would allow me to put 6 images in the same figure in a two column document, each one with a capture bellow it.
Edit 1:
Follows a minimal example that reproduces my problem:
\RequirePackage{fix-cm}
\documentclass[twocolumn]{svjour3}% twocolumn
\journalname{Journal}
\usepackage[pdftex]{graphicx}
\graphicspath{{./images/}}
\DeclareGraphicsExtensions{.pdf}
\usepackage[cmex10]{amsmath}
\usepackage{algorithmic}
\usepackage[font=footnotesize, caption=false]{subfig}
\usepackage{url}
\usepackage{fixltx2e}
\usepackage{stfloats}
\usepackage{array}
\usepackage{multirow}
\usepackage{color}
\usepackage{acronym}
\begin{document}
\title{X}
\author{ author }
\maketitle
\begin{figure*}[h]
\centering
\begin{tabular}{ccc}
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/a1.pdf}} &
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/b1.pdf}} &
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/c1.pdf}} \\
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/d1.pdf}} &
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/e1.pdf}} &
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/f1.pdf}}
\end{tabular}
\caption[]{Caption}
\label{fig:per}
\end{figure*}
\begin{figure*}[h]
\centering
\begin{tabular}{ccc}
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/a.pdf}} &
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/b.pdf}} &
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/c.pdf}} \\
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/d.pdf}} &
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/e.pdf}} &
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/f.pdf}}\\
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/g.pdf}} &
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/h.pdf}} &
\subfloat[a]{\includegraphics[width=0.35\textwidth]{images/i.pdf}}
\end{tabular}
\begin{tabular}{c}
\subfloat{\includegraphics[trim=0cm 0cm 0cm 11cm, clip=true, width=0.35\textwidth]{images/legend.pdf}}
\end{tabular}
\caption[]{Caption}
\label{fig:rep}
\end{figure*}
\end{document}
The result of compiling this is a page with the name of the journal, an x as title and author written bellow. No images show up.
Best Answer
There's a missing closing square bracket square in the (first) optional argument for
\subfloat
in the lineit should be
The missing brace, however, triggers an error message and in your question you said no errors were produced?
A complete example:
The
demo
option forgraphicx
simply replaces actual figures with black rectangles; do not use that option in your actual document.The output: