I'm kind of new to this LaTeX thing and I've started out with the subfigure. I've just found out that this has been replaced by the subfig package, so I switched to this. However unlike the subfigure package (which gave me other problems though) it gives me problems with subfloats in a twocolumn environment. My preamble is as follows:
Code: Select all
documentclass[10pt,a4paper,twoside,twocolumn]{article}
\usepackage[scriptsize,hang]{caption}
\usepackage[margin=1.5cm,tmargin=3cm, bmargin=2cm]{geometry}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{multicol}
\usepackage[square,comma,sort&compress,nonamebreak]{natbib}
\usepackage{subfig}
\usepackage{hyphenat}
\usepackage{verbatim}
\usepackage{subeqn}
\usepackage{appendix}
\usepackage[colorlinks=false,pdfborder={0 0 0}]{hyperref}
\usepackage[nonumberlist,numberedsection,toc]{glossaries}
Code: Select all
\begin{figure}
\centering
\subfloat[\emph{Photoelectric effect:} Blablablacaption.\label{fig:photo}]{\includegraphics[width=6cm]{./Robert/photo.jpg}}
\subfloat[\emph{Compton effect:} Blablablacaption2.\label{fig:compton}]{\includegraphics[width=6cm]{./Robert/compton.jpg}}
\caption{Gamma-ray interaction effects}
\label{fig:gammarayeffects}
\end{figure}
It's clear to see that the image (figure 5) completely falls off the document on the right side, while I was under the impression the subfig package would automatically detect this and put the subfloats under eachother.
What did I do wrong? (I'm sure it's something easy, but I'm a n00b so I apologize in advance

Thanks