I compiled my tex file in Linux without any problems (text edior: Xemacs). I'm now running the file in TeXWorks with MikteX. I used the subfig package and the following worked perfectly:
\subfloat{\label{fig:a}}{\includegraphics[scale=0.12]{somefigname.jpg}}
or
\subfloat[n=50]{\label{fig:a}}{\includegraphics[scale=0.14]{someotherfigname.jpg}}
I kept getting the 'undefined control sequence' error after trying to compile it in Win7. Having done some research, I installed the caption package (by running pdflatex caption.ins) and changed the \subfloat command above to \subcaption. Now instead of the error above, I'm getting two new:
! Package caption Error: For a successful cooperation we need at least version
``2004/02/13 v1.2' of package listings,
but only version
``2002/04/01 1.0 (Carsten Heinz)'
is available.
The second one is:
! LaTeX Error: Counter too large.
When trying to install the caption package through mpm, I keep getting the 'connection failure' error.
I'm kind of lost here and have no idea what to do. Any suggestions?
listingspackage is quite old. I would suggest you upgrade to TeXLive2012 unless there is a really good reason to use a very old distribution. – Peter Grill Nov 15 '12 at 6:44